fix(products): fix breadcrumbs and product filtering (backport from main)
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled

This commit is contained in:
2026-02-24 16:04:21 +01:00
parent 915eb61613
commit 5397309103
43805 changed files with 4324295 additions and 3 deletions

View File

@@ -0,0 +1,2 @@
import { intersectionWith } from "../fp";
export = intersectionWith;

View File

@@ -0,0 +1,168 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const {
JAVASCRIPT_MODULE_TYPE_AUTO,
JAVASCRIPT_MODULE_TYPE_DYNAMIC
} = require("../ModuleTypeConstants");
const RuntimeGlobals = require("../RuntimeGlobals");
const WebpackError = require("../WebpackError");
const {
evaluateToString,
expressionIsUnsupported,
toConstantDependency
} = require("../javascript/JavascriptParserHelpers");
const makeSerializable = require("../util/makeSerializable");
const ConstDependency = require("./ConstDependency");
const SystemRuntimeModule = require("./SystemRuntimeModule");
/** @typedef {import("../../declarations/WebpackOptions").JavascriptParserOptions} JavascriptParserOptions */
/** @typedef {import("../Compiler")} Compiler */
/** @typedef {import("../Dependency").DependencyLocation} DependencyLocation */
/** @typedef {import("../javascript/JavascriptParser")} Parser */
/** @typedef {import("../javascript/JavascriptParser").Range} Range */
const PLUGIN_NAME = "SystemPlugin";
class SystemPlugin {
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply(compiler) {
compiler.hooks.compilation.tap(
PLUGIN_NAME,
(compilation, { normalModuleFactory }) => {
compilation.hooks.runtimeRequirementInModule
.for(RuntimeGlobals.system)
.tap(PLUGIN_NAME, (module, set) => {
set.add(RuntimeGlobals.requireScope);
});
compilation.hooks.runtimeRequirementInTree
.for(RuntimeGlobals.system)
.tap(PLUGIN_NAME, (chunk, _set) => {
compilation.addRuntimeModule(chunk, new SystemRuntimeModule());
});
/**
* @param {Parser} parser parser parser
* @param {JavascriptParserOptions} parserOptions parserOptions
* @returns {void}
*/
const handler = (parser, parserOptions) => {
if (parserOptions.system === undefined || !parserOptions.system) {
return;
}
/**
* @param {string} name name
*/
const setNotSupported = (name) => {
parser.hooks.evaluateTypeof
.for(name)
.tap(PLUGIN_NAME, evaluateToString("undefined"));
parser.hooks.expression
.for(name)
.tap(
PLUGIN_NAME,
expressionIsUnsupported(
parser,
`${name} is not supported by webpack.`
)
);
};
parser.hooks.typeof
.for("System.import")
.tap(
PLUGIN_NAME,
toConstantDependency(parser, JSON.stringify("function"))
);
parser.hooks.evaluateTypeof
.for("System.import")
.tap(PLUGIN_NAME, evaluateToString("function"));
parser.hooks.typeof
.for("System")
.tap(
PLUGIN_NAME,
toConstantDependency(parser, JSON.stringify("object"))
);
parser.hooks.evaluateTypeof
.for("System")
.tap(PLUGIN_NAME, evaluateToString("object"));
setNotSupported("System.set");
setNotSupported("System.get");
setNotSupported("System.register");
parser.hooks.expression.for("System").tap(PLUGIN_NAME, (expr) => {
const dep = new ConstDependency(
RuntimeGlobals.system,
/** @type {Range} */ (expr.range),
[RuntimeGlobals.system]
);
dep.loc = /** @type {DependencyLocation} */ (expr.loc);
parser.state.module.addPresentationalDependency(dep);
return true;
});
parser.hooks.call.for("System.import").tap(PLUGIN_NAME, (expr) => {
parser.state.module.addWarning(
new SystemImportDeprecationWarning(
/** @type {DependencyLocation} */ (expr.loc)
)
);
return parser.hooks.importCall.call({
type: "ImportExpression",
source:
/** @type {import("estree").Literal} */
(expr.arguments[0]),
loc: expr.loc,
range: expr.range,
options: null
});
});
};
normalModuleFactory.hooks.parser
.for(JAVASCRIPT_MODULE_TYPE_AUTO)
.tap(PLUGIN_NAME, handler);
normalModuleFactory.hooks.parser
.for(JAVASCRIPT_MODULE_TYPE_DYNAMIC)
.tap(PLUGIN_NAME, handler);
}
);
}
}
class SystemImportDeprecationWarning extends WebpackError {
/**
* @param {DependencyLocation} loc location
*/
constructor(loc) {
super(
"System.import() is deprecated and will be removed soon. Use import() instead.\n" +
"For more info visit https://webpack.js.org/guides/code-splitting/"
);
this.name = "SystemImportDeprecationWarning";
this.loc = loc;
}
}
makeSerializable(
SystemImportDeprecationWarning,
"webpack/lib/dependencies/SystemPlugin",
"SystemImportDeprecationWarning"
);
module.exports = SystemPlugin;
module.exports.SystemImportDeprecationWarning = SystemImportDeprecationWarning;

View File

@@ -0,0 +1,9 @@
import type { PayloadRequest, SelectType } from 'payload';
export type Context = {
headers: {
[key: string]: string;
};
req: PayloadRequest;
select: SelectType;
};
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"useQueue.d.ts","sourceRoot":"","sources":["../../src/hooks/useQueue.ts"],"names":[],"mappings":"AAEA,KAAK,cAAc,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;AAEzC,KAAK,iBAAiB,GAAG;IACvB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IACzB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,OAAO,GAAG,IAAI,CAAA;CACrC,CAAA;AAED,KAAK,SAAS,GAAG,CAAC,EAAE,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,iBAAiB,KAAK,IAAI,CAAA;AAE1E;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,QAAQ,IAAI;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CA8CA"}

View File

@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './square-asterisk.js';
//# sourceMappingURL=asterisk-square.js.map

View File

@@ -0,0 +1,19 @@
import { DirectusRelation } from "../../../schema/relation.cjs";
import { NestedPartial } from "../../../types/utils.cjs";
import { ApplyQueryFields } from "../../../types/output.cjs";
import { RestCommand } from "../../types.cjs";
//#region src/rest/commands/create/relations.d.ts
type CreateRelationOutput<Schema, Item extends object = DirectusRelation<Schema>> = ApplyQueryFields<Schema, Item, '*'>;
/**
* Create a new relation.
*
* @param item The relation to create
* @param query Optional return data query
*
* @returns Returns the relation object for the created relation.
*/
declare const createRelation: <Schema>(item: NestedPartial<DirectusRelation<Schema>>) => RestCommand<CreateRelationOutput<Schema>, Schema>;
//#endregion
export { CreateRelationOutput, createRelation };
//# sourceMappingURL=relations.d.cts.map

View File

@@ -0,0 +1,120 @@
/// <reference types="node" />
import type { Plugin, ParseOptions, Module, Output, Options, Script, Program, JsMinifyOptions, WasmAnalysisOptions } from "@swc/types";
export type * from "@swc/types";
export { newMangleNameCache as experimental_newMangleNameCache } from "./binding";
import { BundleInput } from "./spack";
import type { NapiMinifyExtra } from "./binding";
/**
* Version of the swc binding.
*/
export declare const version: string;
/**
* @deprecated JavaScript API is deprecated. Please use Wasm plugin instead.
*/
export declare function plugins(ps: Plugin[]): Plugin;
export declare class Compiler {
private fallbackBindingsPluginWarningDisplayed;
minify(src: string | Buffer, opts?: JsMinifyOptions, extras?: NapiMinifyExtra): Promise<Output>;
minifySync(src: string | Buffer, opts?: JsMinifyOptions, extras?: NapiMinifyExtra): Output;
/**
* @deprecated Use Rust instead.
*/
parse(src: string, options: ParseOptions & {
isModule: false;
}): Promise<Script>;
parse(src: string, options?: ParseOptions, filename?: string): Promise<Module>;
parseSync(src: string, options: ParseOptions & {
isModule: false;
}): Script;
parseSync(src: string, options?: ParseOptions, filename?: string): Module;
parseFile(path: string, options: ParseOptions & {
isModule: false;
}): Promise<Script>;
parseFile(path: string, options?: ParseOptions): Promise<Module>;
parseFileSync(path: string, options: ParseOptions & {
isModule: false;
}): Script;
parseFileSync(path: string, options?: ParseOptions): Module;
/**
* Note: this method should be invoked on the compiler instance used
* for `parse()` / `parseSync()`.
*/
print(m: Program, options?: Options): Promise<Output>;
/**
* Note: this method should be invoked on the compiler instance used
* for `parse()` / `parseSync()`.
*/
printSync(m: Program, options?: Options): Output;
transform(src: string | Program, options?: Options): Promise<Output>;
transformSync(src: string | Program, options?: Options): Output;
transformFile(path: string, options?: Options): Promise<Output>;
transformFileSync(path: string, options?: Options): Output;
bundle(options?: BundleInput | string): Promise<{
[name: string]: Output;
}>;
}
export declare function experimental_analyze(src: string, options?: WasmAnalysisOptions): Promise<string>;
/**
* @deprecated Use Rust instead.
*/
export declare function parse(src: string, options: ParseOptions & {
isModule: false;
}): Promise<Script>;
export declare function parse(src: string, options?: ParseOptions): Promise<Module>;
export declare function parseSync(src: string, options: ParseOptions & {
isModule: false;
}): Script;
export declare function parseSync(src: string, options?: ParseOptions): Module;
export declare function parseFile(path: string, options: ParseOptions & {
isModule: false;
}): Promise<Script>;
export declare function parseFile(path: string, options?: ParseOptions): Promise<Module>;
export declare function parseFileSync(path: string, options: ParseOptions & {
isModule: false;
}): Script;
export declare function parseFileSync(path: string, options?: ParseOptions): Module;
export declare function print(m: Program, options?: Options): Promise<Output>;
export declare function printSync(m: Program, options?: Options): Output;
export declare function transform(src: string | Program, options?: Options): Promise<Output>;
export declare function transformSync(src: string | Program, options?: Options): Output;
export declare function transformFile(path: string, options?: Options): Promise<Output>;
export declare function transformFileSync(path: string, options?: Options): Output;
export declare function bundle(options?: BundleInput | string): Promise<{
[name: string]: Output;
}>;
export declare function minify(src: string | Buffer, opts?: JsMinifyOptions, extras?: NapiMinifyExtra): Promise<Output>;
export declare function minifySync(src: string | Buffer, opts?: JsMinifyOptions, extras?: NapiMinifyExtra): Output;
/**
* Configure custom trace configuration runs for a process lifecycle.
* Currently only chromium's trace event format is supported.
* (https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview)
*
* This should be called before calling any binding interfaces exported in `@swc/core`, such as
* `transform*`, or `parse*` or anything. To avoid breaking changes, each binding fn internally
* sets default trace subscriber if not set.
*
* Unlike other configuration, this does not belong to individual api surface using swcrc
* or api's parameters (`transform(..., {trace})`). This is due to current tracing subscriber
* can be configured only once for the global scope. Calling `registerGlobalTraceConfig` multiple
* time won't cause error, subsequent calls will be ignored.
*
* As name implies currently this is experimental interface may change over time without semver
* major breaking changes. Please provide feedbacks,
* or bug report at https://github.com/swc-project/swc/discussions.
*/
export declare function __experimental_registerGlobalTraceConfig(traceConfig: {
type: "traceEvent";
fileName?: string;
}): void;
/**
* @ignore
*
* Returns current binary's metadata to determine which binary is actually loaded.
*
* This is undocumented interface, does not guarantee stability across `@swc/core`'s semver
* as internal representation may change anytime. Use it with caution.
*/
export declare function getBinaryMetadata(): {
target: string | undefined;
};
export declare const DEFAULT_EXTENSIONS: readonly string[];

View File

@@ -0,0 +1 @@
{"version":3,"file":"extensions.js","names":[],"sources":["../../../../src/rest/commands/read/extensions.ts"],"sourcesContent":["import type { DirectusExtension } from '../../../schema/extension.js';\nimport type { RestCommand } from '../../types.js';\n\n/**\n * List the available extensions in the project.\n * @returns An array of extensions.\n */\nexport const readExtensions =\n\t<Schema>(): RestCommand<DirectusExtension<Schema>[], Schema> =>\n\t() => ({\n\t\tpath: `/extensions/`,\n\t\tmethod: 'GET',\n\t});\n"],"mappings":"AAOA,MAAa,WAEL,CACN,KAAM,eACN,OAAQ,MACR"}

View File

@@ -0,0 +1,43 @@
"use strict";
/* @minVersion 7.22.0 */
function dispose_SuppressedError(suppressed, error) {
if (typeof SuppressedError !== "undefined") {
// eslint-disable-next-line no-undef
dispose_SuppressedError = SuppressedError;
} else {
dispose_SuppressedError = function SuppressedError(suppressed, error) {
this.suppressed = suppressed;
this.error = error;
this.stack = new Error().stack;
};
dispose_SuppressedError.prototype = Object.create(Error.prototype, { constructor: { value: dispose_SuppressedError, writable: true, configurable: true } });
}
return new dispose_SuppressedError(suppressed, error);
}
function _dispose(stack, error, hasError) {
function next() {
while (stack.length > 0) {
try {
var r = stack.pop();
var p = r.d.call(r.v);
if (r.a) return Promise.resolve(p).then(next, err);
} catch (e) {
return err(e);
}
}
if (hasError) throw error;
}
function err(e) {
error = hasError ? new dispose_SuppressedError(e, error) : e;
hasError = true;
return next();
}
return next();
}
exports._ = _dispose;

View File

@@ -0,0 +1,43 @@
import { DirectusVersion } from "../../../schema/version.js";
import { NestedPartial, UnpackList } from "../../../types/utils.js";
import { RestCommand } from "../../types.js";
//#region src/rest/commands/utils/versions.d.ts
/**
* Save item changes to an existing Content Version.
*
* @param id Primary key of the Content Version.
* @param item The item changes to save to the specified Content Version.
*
* @returns State of the item after save.
*/
declare const saveToContentVersion: <Schema, Collection extends keyof Schema, Item = UnpackList<Schema[Collection]>>(id: DirectusVersion<Schema>["id"], item: NestedPartial<Item>) => RestCommand<Item, Schema>;
/**
* Compare an existing Content Version with the main version of the item.
*
* @param id Primary key of the Content Version.
*
* @returns All fields with different values, along with the hash of the main version of the item and the information
whether the Content Version is outdated (i.e. main version of the item has been updated since the creation of the
Content Version)
*/
declare const compareContentVersion: <Schema, Collection extends keyof Schema, Item = UnpackList<Schema[Collection]>>(id: DirectusVersion<Schema>["id"]) => RestCommand<{
outdated: boolean;
mainHash: string;
current: Partial<Item>;
main: Item;
}, Schema>;
/**
* Promote an existing Content Version to become the new main version of the item.
*
* @param id Primary key of the version.
* @param mainHash The current hash of the main version of the item (obtained from the `compare` endpoint).
* @param fields Optional array of field names of which the values are to be promoted. By default, all fields are selected.
*
* @returns The primary key of the promoted item.
*/
declare const promoteContentVersion: <Schema, Collection extends keyof Schema, Item = UnpackList<Schema[Collection]>>(id: DirectusVersion<Schema>["id"], mainHash: string, fields?: (keyof UnpackList<Item>)[]) => RestCommand<string | number, Schema>;
//#endregion
export { compareContentVersion, promoteContentVersion, saveToContentVersion };
//# sourceMappingURL=versions.d.ts.map

View File

@@ -0,0 +1,88 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var indexes_exports = {};
__export(indexes_exports, {
Index: () => Index,
IndexBuilder: () => IndexBuilder,
IndexBuilderOn: () => IndexBuilderOn,
index: () => index,
uniqueIndex: () => uniqueIndex
});
module.exports = __toCommonJS(indexes_exports);
var import_entity = require("../entity.cjs");
class IndexBuilderOn {
constructor(name, unique) {
this.name = name;
this.unique = unique;
}
static [import_entity.entityKind] = "SingleStoreIndexBuilderOn";
on(...columns) {
return new IndexBuilder(this.name, columns, this.unique);
}
}
class IndexBuilder {
static [import_entity.entityKind] = "SingleStoreIndexBuilder";
/** @internal */
config;
constructor(name, columns, unique) {
this.config = {
name,
columns,
unique
};
}
using(using) {
this.config.using = using;
return this;
}
algorythm(algorythm) {
this.config.algorythm = algorythm;
return this;
}
lock(lock) {
this.config.lock = lock;
return this;
}
/** @internal */
build(table) {
return new Index(this.config, table);
}
}
class Index {
static [import_entity.entityKind] = "SingleStoreIndex";
config;
constructor(config, table) {
this.config = { ...config, table };
}
}
function index(name) {
return new IndexBuilderOn(name, false);
}
function uniqueIndex(name) {
return new IndexBuilderOn(name, true);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Index,
IndexBuilder,
IndexBuilderOn,
index,
uniqueIndex
});
//# sourceMappingURL=indexes.cjs.map

View File

@@ -0,0 +1,61 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.weakMap = void 0;
const node_crypto_1 = require("node:crypto");
const errors_js_1 = require("../util/errors.js");
const webcrypto_js_1 = require("./webcrypto.js");
const is_key_object_js_1 = require("./is_key_object.js");
const invalid_key_input_js_1 = require("../lib/invalid_key_input.js");
const is_key_like_js_1 = require("./is_key_like.js");
const is_jwk_js_1 = require("../lib/is_jwk.js");
exports.weakMap = new WeakMap();
const namedCurveToJOSE = (namedCurve) => {
switch (namedCurve) {
case 'prime256v1':
return 'P-256';
case 'secp384r1':
return 'P-384';
case 'secp521r1':
return 'P-521';
case 'secp256k1':
return 'secp256k1';
default:
throw new errors_js_1.JOSENotSupported('Unsupported key curve for this operation');
}
};
const getNamedCurve = (kee, raw) => {
let key;
if ((0, webcrypto_js_1.isCryptoKey)(kee)) {
key = node_crypto_1.KeyObject.from(kee);
}
else if ((0, is_key_object_js_1.default)(kee)) {
key = kee;
}
else if ((0, is_jwk_js_1.isJWK)(kee)) {
return kee.crv;
}
else {
throw new TypeError((0, invalid_key_input_js_1.default)(kee, ...is_key_like_js_1.types));
}
if (key.type === 'secret') {
throw new TypeError('only "private" or "public" type keys can be used for this operation');
}
switch (key.asymmetricKeyType) {
case 'ed25519':
case 'ed448':
return `Ed${key.asymmetricKeyType.slice(2)}`;
case 'x25519':
case 'x448':
return `X${key.asymmetricKeyType.slice(1)}`;
case 'ec': {
const namedCurve = key.asymmetricKeyDetails.namedCurve;
if (raw) {
return namedCurve;
}
return namedCurveToJOSE(namedCurve);
}
default:
throw new TypeError('Invalid asymmetric key type for this operation');
}
};
exports.default = getNamedCurve;

View File

@@ -0,0 +1 @@
{"version":3,"file":"contextManager.d.ts","sourceRoot":"","sources":["../../src/contextManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EAAW,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAYlE,MAAM,MAAM,uBAAuB,GAAG;IACpC,iBAAiB,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAC9C,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,KAAK,8BAA8B,CAAC,sBAAsB,SAAS,cAAc,IAAI,KACnF,GAAG,IAAI,EAAE,OAAO,EAAE,KACf,sBAAsB,GAAG;IAC5B,0BAA0B,IAAI,uBAAuB,CAAC;CACvD,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,sBAAsB,SAAS,cAAc,EACnF,mBAAmB,EAAE,KAAK,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,sBAAsB,GACtE,8BAA8B,CAAC,sBAAsB,CAAC,CAgExD"}

View File

@@ -0,0 +1,9 @@
/**
* Partition a pattern into a list of literals and placeholders
* https://tc39.es/ecma402/#sec-partitionpattern
* @param pattern
*/
export declare function PartitionPattern<T extends string>(pattern: string): Array<{
type: T;
value: string | undefined;
}>;

View File

@@ -0,0 +1 @@
{"version":3,"names":["STATEMENT_OR_BLOCK_KEYS","exports","FLATTENABLE_KEYS","FOR_INIT_KEYS","COMMENT_KEYS","LOGICAL_OPERATORS","UPDATE_OPERATORS","BOOLEAN_NUMBER_BINARY_OPERATORS","EQUALITY_BINARY_OPERATORS","COMPARISON_BINARY_OPERATORS","BOOLEAN_BINARY_OPERATORS","NUMBER_BINARY_OPERATORS","BINARY_OPERATORS","ASSIGNMENT_OPERATORS","map","op","BOOLEAN_UNARY_OPERATORS","NUMBER_UNARY_OPERATORS","STRING_UNARY_OPERATORS","UNARY_OPERATORS","INHERIT_KEYS","optional","force","BLOCK_SCOPED_SYMBOL","Symbol","for","NOT_LOCAL_BINDING"],"sources":["../../src/constants/index.ts"],"sourcesContent":["export const STATEMENT_OR_BLOCK_KEYS = [\"consequent\", \"body\", \"alternate\"];\nexport const FLATTENABLE_KEYS = [\"body\", \"expressions\"];\nexport const FOR_INIT_KEYS = [\"left\", \"init\"];\nexport const COMMENT_KEYS = [\n \"leadingComments\",\n \"trailingComments\",\n \"innerComments\",\n] as const;\n\nexport const LOGICAL_OPERATORS = [\"||\", \"&&\", \"??\"];\nexport const UPDATE_OPERATORS = [\"++\", \"--\"];\n\nexport const BOOLEAN_NUMBER_BINARY_OPERATORS = [\">\", \"<\", \">=\", \"<=\"];\nexport const EQUALITY_BINARY_OPERATORS = [\"==\", \"===\", \"!=\", \"!==\"];\nexport const COMPARISON_BINARY_OPERATORS = [\n ...EQUALITY_BINARY_OPERATORS,\n \"in\",\n \"instanceof\",\n];\nexport const BOOLEAN_BINARY_OPERATORS = [\n ...COMPARISON_BINARY_OPERATORS,\n ...BOOLEAN_NUMBER_BINARY_OPERATORS,\n];\nexport const NUMBER_BINARY_OPERATORS = [\n \"-\",\n \"/\",\n \"%\",\n \"*\",\n \"**\",\n \"&\",\n \"|\",\n \">>\",\n \">>>\",\n \"<<\",\n \"^\",\n];\nexport const BINARY_OPERATORS = [\n \"+\",\n ...NUMBER_BINARY_OPERATORS,\n ...BOOLEAN_BINARY_OPERATORS,\n \"|>\",\n];\n\nexport const ASSIGNMENT_OPERATORS = [\n \"=\",\n \"+=\",\n ...NUMBER_BINARY_OPERATORS.map(op => op + \"=\"),\n ...LOGICAL_OPERATORS.map(op => op + \"=\"),\n];\n\nexport const BOOLEAN_UNARY_OPERATORS = [\"delete\", \"!\"];\nexport const NUMBER_UNARY_OPERATORS = [\"+\", \"-\", \"~\"];\nexport const STRING_UNARY_OPERATORS = [\"typeof\"];\nexport const UNARY_OPERATORS = [\n \"void\",\n \"throw\",\n ...BOOLEAN_UNARY_OPERATORS,\n ...NUMBER_UNARY_OPERATORS,\n ...STRING_UNARY_OPERATORS,\n];\n\nexport const INHERIT_KEYS = {\n optional: [\"typeAnnotation\", \"typeParameters\", \"returnType\"],\n force: [\"start\", \"loc\", \"end\"],\n} as const;\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM) {\n // eslint-disable-next-line no-restricted-globals\n exports.BLOCK_SCOPED_SYMBOL = Symbol.for(\"var used to be block scoped\");\n // eslint-disable-next-line no-restricted-globals\n exports.NOT_LOCAL_BINDING = Symbol.for(\n \"should not be considered a local binding\",\n );\n}\n"],"mappings":";;;;;;AAAO,MAAMA,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,CAAC;AACnE,MAAME,gBAAgB,GAAAD,OAAA,CAAAC,gBAAA,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC;AAChD,MAAMC,aAAa,GAAAF,OAAA,CAAAE,aAAA,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;AACtC,MAAMC,YAAY,GAAAH,OAAA,CAAAG,YAAA,GAAG,CAC1B,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,CACP;AAEH,MAAMC,iBAAiB,GAAAJ,OAAA,CAAAI,iBAAA,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;AAC5C,MAAMC,gBAAgB,GAAAL,OAAA,CAAAK,gBAAA,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC;AAErC,MAAMC,+BAA+B,GAAAN,OAAA,CAAAM,+BAAA,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC;AAC9D,MAAMC,yBAAyB,GAAAP,OAAA,CAAAO,yBAAA,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC;AAC5D,MAAMC,2BAA2B,GAAAR,OAAA,CAAAQ,2BAAA,GAAG,CACzC,GAAGD,yBAAyB,EAC5B,IAAI,EACJ,YAAY,CACb;AACM,MAAME,wBAAwB,GAAAT,OAAA,CAAAS,wBAAA,GAAG,CACtC,GAAGD,2BAA2B,EAC9B,GAAGF,+BAA+B,CACnC;AACM,MAAMI,uBAAuB,GAAAV,OAAA,CAAAU,uBAAA,GAAG,CACrC,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,IAAI,EACJ,GAAG,EACH,GAAG,EACH,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,GAAG,CACJ;AACM,MAAMC,gBAAgB,GAAAX,OAAA,CAAAW,gBAAA,GAAG,CAC9B,GAAG,EACH,GAAGD,uBAAuB,EAC1B,GAAGD,wBAAwB,EAC3B,IAAI,CACL;AAEM,MAAMG,oBAAoB,GAAAZ,OAAA,CAAAY,oBAAA,GAAG,CAClC,GAAG,EACH,IAAI,EACJ,GAAGF,uBAAuB,CAACG,GAAG,CAACC,EAAE,IAAIA,EAAE,GAAG,GAAG,CAAC,EAC9C,GAAGV,iBAAiB,CAACS,GAAG,CAACC,EAAE,IAAIA,EAAE,GAAG,GAAG,CAAC,CACzC;AAEM,MAAMC,uBAAuB,GAAAf,OAAA,CAAAe,uBAAA,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC;AAC/C,MAAMC,sBAAsB,GAAAhB,OAAA,CAAAgB,sBAAA,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;AAC9C,MAAMC,sBAAsB,GAAAjB,OAAA,CAAAiB,sBAAA,GAAG,CAAC,QAAQ,CAAC;AACzC,MAAMC,eAAe,GAAAlB,OAAA,CAAAkB,eAAA,GAAG,CAC7B,MAAM,EACN,OAAO,EACP,GAAGH,uBAAuB,EAC1B,GAAGC,sBAAsB,EACzB,GAAGC,sBAAsB,CAC1B;AAEM,MAAME,YAAY,GAAAnB,OAAA,CAAAmB,YAAA,GAAG;EAC1BC,QAAQ,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,YAAY,CAAC;EAC5DC,KAAK,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK;AAC/B,CAAU;AAIRrB,OAAO,CAACsB,mBAAmB,GAAGC,MAAM,CAACC,GAAG,CAAC,6BAA6B,CAAC;AAEvExB,OAAO,CAACyB,iBAAiB,GAAGF,MAAM,CAACC,GAAG,CACpC,0CACF,CAAC","ignoreList":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/folders/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAClF,OAAO,KAAK,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAC5E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAEjD,MAAM,MAAM,eAAe,GAAG;IAC5B,mBAAmB,CAAC,EAAE;QACpB,IAAI,EAAE;YACJ,UAAU,EAAE,cAAc,CAAA;YAC1B,KAAK,EAAE,QAAQ,CAAA;SAChB,EAAE,CAAA;KACJ,CAAA;IACD,MAAM,CAAC,EAAE,eAAe,GAAG,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAAA;IACxD,UAAU,EAAE,cAAc,EAAE,CAAA;IAC5B,IAAI,EAAE,MAAM,CAAA;CACb,GAAG,UAAU,CAAA;AAEd,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,CAAC,EAAE,cAAc,EAAE,CAAA;IAC7B,EAAE,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,OAAO,CAAA;IACtB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE;QACL,MAAM,EAAE;YACN,oBAAoB,EAAE,cAAc,CAAA;SACrC,CAAA;KACF,CAAA;IACD,IAAI,EAAE,cAAc,CAAA;CACrB,GAAG,yBAAyB,CAAA;AAE7B;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,GAAG,MAAM,IAAI,MAAM,GAAG,MAAM,EAAE,CAAA;AAElE;;GAEG;AACH,KAAK,iBAAiB,GAAG;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AACD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,qBAAqB,CAAA;IAC9B,UAAU,EAAE,cAAc,CAAA;IAC1B,KAAK,EAAE;QACL,sBAAsB,EAAE,MAAM,CAAA;QAC9B,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;QAC1B,UAAU,EAAE,cAAc,EAAE,CAAA;QAC5B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;QACnB,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,GAAG,iBAAiB,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,WAAW,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAA;IACtC,SAAS,EAAE,gBAAgB,EAAE,CAAA;IAC7B,yBAAyB,EAAE,cAAc,EAAE,GAAG,SAAS,CAAA;IACvD,UAAU,EAAE,gBAAgB,EAAE,CAAA;CAC/B,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,CAAC,CAAC,EACtB,UAAU,GACX,EAAE;QACD,UAAU,EAAE,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAA;KAC5C,KAAK,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAA;IACnF;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IACf;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,8BAA8B,GAAG;IAC3C;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,CAAA;AAED,KAAK,kBAAkB,GAAG,WAAW,GAAG,MAAM,GAAG,WAAW,CAAA;AAE5D,MAAM,MAAM,cAAc,GAAG,IAAI,kBAAkB,EAAE,GAAG,kBAAkB,CAAA"}

View File

@@ -0,0 +1,32 @@
'use strict'
const { test } = require('tap')
const writer = require('flush-write-stream')
const pino = require('../')
function capture () {
const ws = writer((chunk, enc, cb) => {
ws.data += chunk.toString()
cb()
})
ws.data = ''
return ws
}
test('pino uses LF by default', async ({ ok }) => {
const stream = capture()
const logger = pino(stream)
logger.info('foo')
logger.error('bar')
ok(/foo[^\r\n]+\n[^\r\n]+bar[^\r\n]+\n/.test(stream.data))
})
test('pino can log CRLF', async ({ ok }) => {
const stream = capture()
const logger = pino({
crlf: true
}, stream)
logger.info('foo')
logger.error('bar')
ok(/foo[^\n]+\r\n[^\n]+bar[^\n]+\r\n/.test(stream.data))
})

View File

@@ -0,0 +1,17 @@
import { GraphQLError } from '../error/GraphQLError';
import type { GraphQLSchema } from './schema';
/**
* Implements the "Type Validation" sub-sections of the specification's
* "Type System" section.
*
* Validation runs synchronously, returning an array of encountered errors, or
* an empty array if no errors were encountered and the Schema is valid.
*/
export declare function validateSchema(
schema: GraphQLSchema,
): ReadonlyArray<GraphQLError>;
/**
* Utility function which asserts a schema is valid by throwing an error if
* it is invalid.
*/
export declare function assertValidSchema(schema: GraphQLSchema): void;

View File

@@ -0,0 +1,38 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.js");
const dateFormats = {
full: "EEEE, do 'de' MMMM y",
long: "y-MMMM-dd",
medium: "y-MMM-dd",
short: "yyyy-MM-dd",
};
const timeFormats = {
full: "Ho 'horo kaj' m:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm",
};
const dateTimeFormats = {
any: "{{date}} {{time}}",
};
const formatLong = (exports.formatLong = {
date: (0, _index.buildFormatLongFn)({
formats: dateFormats,
defaultWidth: "full",
}),
time: (0, _index.buildFormatLongFn)({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: (0, _index.buildFormatLongFn)({
formats: dateTimeFormats,
defaultWidth: "any",
}),
});

View File

@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Banknote = createLucideIcon("Banknote", [
["rect", { width: "20", height: "12", x: "2", y: "6", rx: "2", key: "9lu3g6" }],
["circle", { cx: "12", cy: "12", r: "2", key: "1c9p78" }],
["path", { d: "M6 12h.01M18 12h.01", key: "113zkx" }]
]);
export { Banknote as default };
//# sourceMappingURL=banknote.js.map

View File

@@ -0,0 +1,11 @@
"use strict";
exports.getRoundingMethod = getRoundingMethod;
function getRoundingMethod(method) {
return (number) => {
const round = method ? Math[method] : Math.trunc;
const result = round(number);
// Prevent negative zero
return result === 0 ? 0 : result;
};
}

View File

@@ -0,0 +1,64 @@
(function (Prism) {
var funcPattern = /\\(?:[^a-z()[\]]|[a-z*]+)/i;
var insideEqu = {
'equation-command': {
pattern: funcPattern,
alias: 'regex'
}
};
Prism.languages.latex = {
'comment': /%.*/,
// the verbatim environment prints whitespace to the document
'cdata': {
pattern: /(\\begin\{((?:lstlisting|verbatim)\*?)\})[\s\S]*?(?=\\end\{\2\})/,
lookbehind: true
},
/*
* equations can be between $$ $$ or $ $ or \( \) or \[ \]
* (all are multiline)
*/
'equation': [
{
pattern: /\$\$(?:\\[\s\S]|[^\\$])+\$\$|\$(?:\\[\s\S]|[^\\$])+\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,
inside: insideEqu,
alias: 'string'
},
{
pattern: /(\\begin\{((?:align|eqnarray|equation|gather|math|multline)\*?)\})[\s\S]*?(?=\\end\{\2\})/,
lookbehind: true,
inside: insideEqu,
alias: 'string'
}
],
/*
* arguments which are keywords or references are highlighted
* as keywords
*/
'keyword': {
pattern: /(\\(?:begin|cite|documentclass|end|label|ref|usepackage)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,
lookbehind: true
},
'url': {
pattern: /(\\url\{)[^}]+(?=\})/,
lookbehind: true
},
/*
* section or chapter headlines are highlighted as bold so that
* they stand out more
*/
'headline': {
pattern: /(\\(?:chapter|frametitle|paragraph|part|section|subparagraph|subsection|subsubparagraph|subsubsection|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\})/,
lookbehind: true,
alias: 'class-name'
},
'function': {
pattern: funcPattern,
alias: 'selector'
},
'punctuation': /[[\]{}&]/
};
Prism.languages.tex = Prism.languages.latex;
Prism.languages.context = Prism.languages.latex;
}(Prism));

View File

@@ -0,0 +1,9 @@
export function invariant(condition, message) {
const booleanCondition = Boolean(condition);
if (!booleanCondition) {
throw new Error(
message != null ? message : 'Unexpected invariant triggered.',
);
}
}

View File

@@ -0,0 +1,8 @@
"use strict";
exports.eachDayOfIntervalWithOptions = void 0;
var _index = require("../eachDayOfInterval.cjs");
var _index2 = require("./_lib/convertToFP.cjs"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const eachDayOfIntervalWithOptions = (exports.eachDayOfIntervalWithOptions = (0,
_index2.convertToFP)(_index.eachDayOfInterval, 2));

View File

@@ -0,0 +1 @@
{"version":3,"file":"ensureUsernameOrEmail.d.ts","sourceRoot":"","sources":["../../src/auth/ensureUsernameOrEmail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAA;AACpF,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAIjF,KAAK,2BAA2B,CAAC,KAAK,SAAS,cAAc,IAAI;IAC/D,WAAW,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAA;IAC7C,cAAc,EAAE,MAAM,CAAA;IACtB,IAAI,EAAE,8BAA8B,CAAC,KAAK,CAAC,CAAA;IAC3C,GAAG,EAAE,cAAc,CAAA;CACpB,GAAG,CACA;IACE,SAAS,EAAE,QAAQ,CAAA;IACnB,WAAW,CAAC,EAAE,KAAK,CAAA;CACpB,GACD;IACE,SAAS,EAAE,QAAQ,CAAA;IACnB,WAAW,EAAE,8BAA8B,CAAC,KAAK,CAAC,CAAA;CACnD,CACJ,CAAA;AACD,eAAO,MAAM,qBAAqB,GAAI,KAAK,SAAS,cAAc,oHAO/D,2BAA2B,CAAC,KAAK,CAAC,SAiDpC,CAAA"}

View File

@@ -0,0 +1,17 @@
import type {Vocabulary} from "../types"
export const metadataVocabulary: Vocabulary = [
"title",
"description",
"default",
"deprecated",
"readOnly",
"writeOnly",
"examples",
]
export const contentVocabulary: Vocabulary = [
"contentMediaType",
"contentEncoding",
"contentSchema",
]

View File

@@ -0,0 +1,168 @@
import { NoopCache } from "../cache/core/index.js";
import { Column } from "../column.js";
import { entityKind, is } from "../entity.js";
import { NoopLogger } from "../logger.js";
import {
MySqlPreparedQuery,
MySqlSession,
MySqlTransaction
} from "../mysql-core/session.js";
import { fillPlaceholders, sql } from "../sql/sql.js";
import { mapResultRow } from "../utils.js";
class PlanetScalePreparedQuery extends MySqlPreparedQuery {
constructor(client, queryString, params, logger, cache, queryMetadata, cacheConfig, fields, customResultMapper, generatedIds, returningIds) {
super(cache, queryMetadata, cacheConfig);
this.client = client;
this.queryString = queryString;
this.params = params;
this.logger = logger;
this.fields = fields;
this.customResultMapper = customResultMapper;
this.generatedIds = generatedIds;
this.returningIds = returningIds;
}
static [entityKind] = "PlanetScalePreparedQuery";
rawQuery = { as: "object" };
query = { as: "array" };
async execute(placeholderValues = {}) {
const params = fillPlaceholders(this.params, placeholderValues);
this.logger.logQuery(this.queryString, params);
const {
fields,
client,
queryString,
rawQuery,
query,
joinsNotNullableMap,
customResultMapper,
returningIds,
generatedIds
} = this;
if (!fields && !customResultMapper) {
const res = await this.queryWithCache(queryString, params, async () => {
return await client.execute(queryString, params, rawQuery);
});
const insertId = Number.parseFloat(res.insertId);
const affectedRows = res.rowsAffected;
if (returningIds) {
const returningResponse = [];
let j = 0;
for (let i = insertId; i < insertId + affectedRows; i++) {
for (const column of returningIds) {
const key = returningIds[0].path[0];
if (is(column.field, Column)) {
if (column.field.primary && column.field.autoIncrement) {
returningResponse.push({ [key]: i });
}
if (column.field.defaultFn && generatedIds) {
returningResponse.push({ [key]: generatedIds[j][key] });
}
}
}
j++;
}
return returningResponse;
}
return res;
}
const { rows } = await this.queryWithCache(queryString, params, async () => {
return await client.execute(queryString, params, query);
});
if (customResultMapper) {
return customResultMapper(rows);
}
return rows.map((row) => mapResultRow(fields, row, joinsNotNullableMap));
}
iterator(_placeholderValues) {
throw new Error("Streaming is not supported by the PlanetScale Serverless driver");
}
}
class PlanetscaleSession extends MySqlSession {
constructor(baseClient, dialect, tx, schema, options = {}) {
super(dialect);
this.baseClient = baseClient;
this.schema = schema;
this.options = options;
this.client = tx ?? baseClient;
this.logger = options.logger ?? new NoopLogger();
this.cache = options.cache ?? new NoopCache();
}
static [entityKind] = "PlanetscaleSession";
logger;
client;
cache;
prepareQuery(query, fields, customResultMapper, generatedIds, returningIds, queryMetadata, cacheConfig) {
return new PlanetScalePreparedQuery(
this.client,
query.sql,
query.params,
this.logger,
this.cache,
queryMetadata,
cacheConfig,
fields,
customResultMapper,
generatedIds,
returningIds
);
}
async query(query, params) {
this.logger.logQuery(query, params);
return await this.client.execute(query, params, { as: "array" });
}
async queryObjects(query, params) {
return this.client.execute(query, params, { as: "object" });
}
all(query) {
const querySql = this.dialect.sqlToQuery(query);
this.logger.logQuery(querySql.sql, querySql.params);
return this.client.execute(querySql.sql, querySql.params, { as: "object" }).then((eQuery) => eQuery.rows);
}
async count(sql2) {
const res = await this.execute(sql2);
return Number(
res["rows"][0]["count"]
);
}
transaction(transaction) {
return this.baseClient.transaction((pstx) => {
const session = new PlanetscaleSession(this.baseClient, this.dialect, pstx, this.schema, this.options);
const tx = new PlanetScaleTransaction(
this.dialect,
session,
this.schema
);
return transaction(tx);
});
}
}
class PlanetScaleTransaction extends MySqlTransaction {
static [entityKind] = "PlanetScaleTransaction";
constructor(dialect, session, schema, nestedIndex = 0) {
super(dialect, session, schema, nestedIndex, "planetscale");
}
async transaction(transaction) {
const savepointName = `sp${this.nestedIndex + 1}`;
const tx = new PlanetScaleTransaction(
this.dialect,
this.session,
this.schema,
this.nestedIndex + 1
);
await tx.execute(sql.raw(`savepoint ${savepointName}`));
try {
const result = await transaction(tx);
await tx.execute(sql.raw(`release savepoint ${savepointName}`));
return result;
} catch (err) {
await tx.execute(sql.raw(`rollback to savepoint ${savepointName}`));
throw err;
}
}
}
export {
PlanetScalePreparedQuery,
PlanetScaleTransaction,
PlanetscaleSession
};
//# sourceMappingURL=session.js.map

View File

@@ -0,0 +1,2 @@
import{extractData as e}from"./extract-data.js";const t=async(t,n,r=globalThis.fetch)=>(n.headers=typeof n.headers==`object`&&!Array.isArray(n.headers)?n.headers:{},r(t,n).then(t=>e(t).catch(e=>{let n={message:``,errors:e&&typeof e==`object`&&`errors`in e?e.errors:e,response:t};return e&&typeof e==`object`&&`data`in e&&(n.data=e.data),Array.isArray(n.errors)&&n.errors[0]?.message&&(n.message=n.errors[0].message),Promise.reject(n)})));export{t as request};
//# sourceMappingURL=request.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/transform/read/hasManyNumber.ts"],"sourcesContent":["import type { NumberField } from 'payload'\n\ntype Args = {\n field: NumberField\n locale?: string\n numberRows: Record<string, unknown>[]\n ref: Record<string, unknown>\n withinArrayOrBlockLocale?: string\n}\n\nexport const transformHasManyNumber = ({\n field,\n locale,\n numberRows,\n ref,\n withinArrayOrBlockLocale,\n}: Args) => {\n let result: unknown[]\n\n if (withinArrayOrBlockLocale) {\n result = numberRows.reduce((acc, { locale, number }) => {\n if (locale === withinArrayOrBlockLocale) {\n if (typeof number === 'string') {\n number = Number(number)\n }\n acc.push(number)\n }\n\n return acc\n }, [])\n } else {\n result = numberRows.map(({ number }) => {\n if (typeof number === 'string') {\n number = Number(number)\n }\n return number\n })\n }\n\n if (locale) {\n ref[field.name][locale] = result\n } else {\n ref[field.name] = result\n }\n}\n"],"names":["transformHasManyNumber","field","locale","numberRows","ref","withinArrayOrBlockLocale","result","reduce","acc","number","Number","push","map","name"],"mappings":"AAUA,OAAO,MAAMA,yBAAyB,CAAC,EACrCC,KAAK,EACLC,MAAM,EACNC,UAAU,EACVC,GAAG,EACHC,wBAAwB,EACnB;IACL,IAAIC;IAEJ,IAAID,0BAA0B;QAC5BC,SAASH,WAAWI,MAAM,CAAC,CAACC,KAAK,EAAEN,MAAM,EAAEO,MAAM,EAAE;YACjD,IAAIP,WAAWG,0BAA0B;gBACvC,IAAI,OAAOI,WAAW,UAAU;oBAC9BA,SAASC,OAAOD;gBAClB;gBACAD,IAAIG,IAAI,CAACF;YACX;YAEA,OAAOD;QACT,GAAG,EAAE;IACP,OAAO;QACLF,SAASH,WAAWS,GAAG,CAAC,CAAC,EAAEH,MAAM,EAAE;YACjC,IAAI,OAAOA,WAAW,UAAU;gBAC9BA,SAASC,OAAOD;YAClB;YACA,OAAOA;QACT;IACF;IAEA,IAAIP,QAAQ;QACVE,GAAG,CAACH,MAAMY,IAAI,CAAC,CAACX,OAAO,GAAGI;IAC5B,OAAO;QACLF,GAAG,CAACH,MAAMY,IAAI,CAAC,GAAGP;IACpB;AACF,EAAC"}

View File

@@ -0,0 +1,254 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.cjs");
const eraValues = {
narrow: ["p.m.ē", "m.ē"],
abbreviated: ["p. m. ē.", "m. ē."],
wide: ["pirms mūsu ēras", "mūsu ērā"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["1. cet.", "2. cet.", "3. cet.", "4. cet."],
wide: [
"pirmais ceturksnis",
"otrais ceturksnis",
"trešais ceturksnis",
"ceturtais ceturksnis",
],
};
const formattingQuarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["1. cet.", "2. cet.", "3. cet.", "4. cet."],
wide: [
"pirmajā ceturksnī",
"otrajā ceturksnī",
"trešajā ceturksnī",
"ceturtajā ceturksnī",
],
};
const monthValues = {
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
abbreviated: [
"janv.",
"febr.",
"marts",
"apr.",
"maijs",
"jūn.",
"jūl.",
"aug.",
"sept.",
"okt.",
"nov.",
"dec.",
],
wide: [
"janvāris",
"februāris",
"marts",
"aprīlis",
"maijs",
"jūnijs",
"jūlijs",
"augusts",
"septembris",
"oktobris",
"novembris",
"decembris",
],
};
const formattingMonthValues = {
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
abbreviated: [
"janv.",
"febr.",
"martā",
"apr.",
"maijs",
"jūn.",
"jūl.",
"aug.",
"sept.",
"okt.",
"nov.",
"dec.",
],
wide: [
"janvārī",
"februārī",
"martā",
"aprīlī",
"maijā",
"jūnijā",
"jūlijā",
"augustā",
"septembrī",
"oktobrī",
"novembrī",
"decembrī",
],
};
const dayValues = {
narrow: ["S", "P", "O", "T", "C", "P", "S"],
short: ["Sv", "P", "O", "T", "C", "Pk", "S"],
abbreviated: [
"svētd.",
"pirmd.",
"otrd.",
"trešd.",
"ceturtd.",
"piektd.",
"sestd.",
],
wide: [
"svētdiena",
"pirmdiena",
"otrdiena",
"trešdiena",
"ceturtdiena",
"piektdiena",
"sestdiena",
],
};
const formattingDayValues = {
narrow: ["S", "P", "O", "T", "C", "P", "S"],
short: ["Sv", "P", "O", "T", "C", "Pk", "S"],
abbreviated: [
"svētd.",
"pirmd.",
"otrd.",
"trešd.",
"ceturtd.",
"piektd.",
"sestd.",
],
wide: [
"svētdienā",
"pirmdienā",
"otrdienā",
"trešdienā",
"ceturtdienā",
"piektdienā",
"sestdienā",
],
};
const dayPeriodValues = {
narrow: {
am: "am",
pm: "pm",
midnight: "pusn.",
noon: "pusd.",
morning: "rīts",
afternoon: "diena",
evening: "vakars",
night: "nakts",
},
abbreviated: {
am: "am",
pm: "pm",
midnight: "pusn.",
noon: "pusd.",
morning: "rīts",
afternoon: "pēcpusd.",
evening: "vakars",
night: "nakts",
},
wide: {
am: "am",
pm: "pm",
midnight: "pusnakts",
noon: "pusdienlaiks",
morning: "rīts",
afternoon: "pēcpusdiena",
evening: "vakars",
night: "nakts",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "am",
pm: "pm",
midnight: "pusn.",
noon: "pusd.",
morning: "rītā",
afternoon: "dienā",
evening: "vakarā",
night: "naktī",
},
abbreviated: {
am: "am",
pm: "pm",
midnight: "pusn.",
noon: "pusd.",
morning: "rītā",
afternoon: "pēcpusd.",
evening: "vakarā",
night: "naktī",
},
wide: {
am: "am",
pm: "pm",
midnight: "pusnaktī",
noon: "pusdienlaikā",
morning: "rītā",
afternoon: "pēcpusdienā",
evening: "vakarā",
night: "naktī",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
const number = Number(dirtyNumber);
return number + ".";
};
const localize = (exports.localize = {
ordinalNumber,
era: (0, _index.buildLocalizeFn)({
values: eraValues,
defaultWidth: "wide",
}),
quarter: (0, _index.buildLocalizeFn)({
values: quarterValues,
defaultWidth: "wide",
formattingValues: formattingQuarterValues,
defaultFormattingWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: (0, _index.buildLocalizeFn)({
values: monthValues,
defaultWidth: "wide",
formattingValues: formattingMonthValues,
defaultFormattingWidth: "wide",
}),
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
formattingValues: formattingDayValues,
defaultFormattingWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
});

View File

@@ -0,0 +1 @@
{"version":3,"file":"carrier.d.ts","sourceRoot":"","sources":["../../src/carrier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAI7D;;;GAGG;AACH,MAAM,WAAW,OAAO;IACtB,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAED,KAAK,gBAAgB,GAAG;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,aAAa,CAAC,CAAC;AAEtD,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,oBAAoB,CAAC;IAC3B,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAE1B,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,qBAAqB,CAAC,EAAE,KAAK,CAAC;IAC9B,mBAAmB,CAAC,EAAE,KAAK,CAAC;IAC5B,cAAc,CAAC,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IACtC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;IAE7D;;;OAGG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAEnE,4FAA4F;IAC5F,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,UAAU,CAAC;IAC/C,4FAA4F;IAC5F,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,MAAM,CAAC;CAChD;AAED;;;;;;IAMI;AACJ,wBAAgB,cAAc,IAAI,OAAO,CAIxC;AAED,wEAAwE;AACxE,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,aAAa,CAShE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,SAAS,MAAM,aAAa,EACjE,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,WAAW,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,EAC/C,GAAG,6CAAa,GACf,WAAW,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAKlC"}

View File

@@ -0,0 +1,8 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { format as fn } from "../format.mjs";
import { convertToFP } from "./_lib/convertToFP.mjs";
export const formatWithOptions = convertToFP(fn, 3);
// Fallback for modularized imports:
export default formatWithOptions;

View File

@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Layers = createLucideIcon("Layers", [
[
"path",
{
d: "m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",
key: "8b97xw"
}
],
["path", { d: "m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65", key: "dd6zsq" }],
["path", { d: "m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65", key: "ep9fru" }]
]);
export { Layers as default };
//# sourceMappingURL=layers.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"metrics.js","sourceRoot":"","sources":["../../../src/api/metrics.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH,oEAAmE;AACnE,2DAIkC;AAClC,iCAAiC;AAEjC,MAAM,QAAQ,GAAG,SAAS,CAAC;AAE3B;;GAEG;AACH,MAAa,UAAU;IAGrB,+FAA+F;IAC/F,gBAAuB,CAAC;IAExB,oDAAoD;IAC7C,MAAM,CAAC,WAAW;QACvB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACnB,IAAI,CAAC,SAAS,GAAG,IAAI,UAAU,EAAE,CAAC;SACnC;QAED,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;;OAGG;IACI,sBAAsB,CAAC,QAAuB;QACnD,OAAO,IAAA,6BAAc,EAAC,QAAQ,EAAE,QAAQ,EAAE,cAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAChE,CAAC;IAED;;OAEG;IACI,gBAAgB;QACrB,OAAO,IAAA,wBAAS,EAAC,QAAQ,CAAC,IAAI,uCAAmB,CAAC;IACpD,CAAC;IAED;;OAEG;IACI,QAAQ,CACb,IAAY,EACZ,OAAgB,EAChB,OAAsB;QAEtB,OAAO,IAAI,CAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED,uCAAuC;IAChC,OAAO;QACZ,IAAA,+BAAgB,EAAC,QAAQ,EAAE,cAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IACjD,CAAC;CACF;AA7CD,gCA6CC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Meter, MeterOptions } from '../metrics/Meter';\nimport { MeterProvider } from '../metrics/MeterProvider';\nimport { NOOP_METER_PROVIDER } from '../metrics/NoopMeterProvider';\nimport {\n getGlobal,\n registerGlobal,\n unregisterGlobal,\n} from '../internal/global-utils';\nimport { DiagAPI } from './diag';\n\nconst API_NAME = 'metrics';\n\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Metrics API\n */\nexport class MetricsAPI {\n private static _instance?: MetricsAPI;\n\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n private constructor() {}\n\n /** Get the singleton instance of the Metrics API */\n public static getInstance(): MetricsAPI {\n if (!this._instance) {\n this._instance = new MetricsAPI();\n }\n\n return this._instance;\n }\n\n /**\n * Set the current global meter provider.\n * Returns true if the meter provider was successfully registered, else false.\n */\n public setGlobalMeterProvider(provider: MeterProvider): boolean {\n return registerGlobal(API_NAME, provider, DiagAPI.instance());\n }\n\n /**\n * Returns the global meter provider.\n */\n public getMeterProvider(): MeterProvider {\n return getGlobal(API_NAME) || NOOP_METER_PROVIDER;\n }\n\n /**\n * Returns a meter from the global meter provider.\n */\n public getMeter(\n name: string,\n version?: string,\n options?: MeterOptions\n ): Meter {\n return this.getMeterProvider().getMeter(name, version, options);\n }\n\n /** Remove the global meter provider */\n public disable(): void {\n unregisterGlobal(API_NAME, DiagAPI.instance());\n }\n}\n"]}

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B zC"},B:{"1":"3 4 5 6 7 8 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I","2":"C L M G N","164":"0 1 2 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","3138":"O","12292":"P"},C:{"1":"0 1 2 3 4 5 6 7 8 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C","2":"0C VC","260":"9 J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 4C 5C"},D:{"1":"3 4 5 6 7 8 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC","164":"0 1 2 9 J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},E:{"1":"eC RC ED SC fC gC hC iC jC FD TC kC lC mC nC oC GD UC pC qC rC sC HD tC uC vC wC ID","2":"6C bC","164":"J bB K D E F A B C L M G 7C 8C 9C AD cC PC QC BD CD DD dC"},F:{"1":"0 1 2 3 4 5 6 7 8 p q r s t u v w x y z","2":"F B C JD KD LD MD PC xC ND QC","164":"9 G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o"},G:{"1":"eC RC iD SC fC gC hC iC jC jD TC kC lC mC nC oC kD UC pC qC rC sC lD tC uC vC wC","164":"E bC OD yC PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD eD fD gD hD dC"},H:{"2":"mD"},I:{"1":"I","164":"rD sD","676":"VC J nD oD pD qD yC"},J:{"164":"D A"},K:{"1":"H","2":"A B C PC xC QC"},L:{"1":"I"},M:{"1":"OC"},N:{"2":"A B"},O:{"164":"RC"},P:{"1":"EB FB GB HB IB","164":"9 J AB BB CB DB tD uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D"},Q:{"164":"4D"},R:{"164":"5D"},S:{"1":"7D","260":"6D"}},B:4,C:"CSS Masks",D:true};

View File

@@ -0,0 +1,5 @@
var OverloadYield = require("./OverloadYield.js");
function _awaitAsyncGenerator(e) {
return new OverloadYield(e, 0);
}
module.exports = _awaitAsyncGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -0,0 +1,21 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const BoomBox = createLucideIcon("BoomBox", [
["path", { d: "M4 9V5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4", key: "vvzvr1" }],
["path", { d: "M8 8v1", key: "xcqmfk" }],
["path", { d: "M12 8v1", key: "1rj8u4" }],
["path", { d: "M16 8v1", key: "1q12zr" }],
["rect", { width: "20", height: "12", x: "2", y: "9", rx: "2", key: "igpb89" }],
["circle", { cx: "8", cy: "15", r: "2", key: "fa4a8s" }],
["circle", { cx: "16", cy: "15", r: "2", key: "14c3ya" }]
]);
export { BoomBox as default };
//# sourceMappingURL=boom-box.js.map

View File

@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.zIndex = void 0;
var parser_1 = require("../syntax/parser");
exports.zIndex = {
name: 'z-index',
initialValue: 'auto',
prefix: false,
type: 0 /* VALUE */,
parse: function (_context, token) {
if (token.type === 20 /* IDENT_TOKEN */) {
return { auto: true, order: 0 };
}
if (parser_1.isNumberToken(token)) {
return { auto: false, order: token.number };
}
throw new Error("Invalid z-index number parsed");
}
};
//# sourceMappingURL=z-index.js.map

View File

@@ -0,0 +1,28 @@
"use strict";
exports.enGB = void 0;
var _index = require("./en-US/_lib/formatDistance.js");
var _index2 = require("./en-US/_lib/formatRelative.js");
var _index3 = require("./en-US/_lib/localize.js");
var _index4 = require("./en-US/_lib/match.js");
var _index5 = require("./en-GB/_lib/formatLong.js");
/**
* @category Locales
* @summary English locale (United Kingdom).
* @language English
* @iso-639-2 eng
* @author Alex [@glintik](https://github.com/glintik)
*/
const enGB = (exports.enGB = {
code: "en-GB",
formatDistance: _index.formatDistance,
formatLong: _index5.formatLong,
formatRelative: _index2.formatRelative,
localize: _index3.localize,
match: _index4.match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 4,
},
});

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/singlestore-proxy/migrator.ts"],"sourcesContent":["import type { MigrationConfig } from '~/migrator.ts';\nimport { readMigrationFiles } from '~/migrator.ts';\nimport { sql } from '~/sql/sql.ts';\nimport type { SingleStoreRemoteDatabase } from './driver.ts';\n\nexport type ProxyMigrator = (migrationQueries: string[]) => Promise<void>;\n\nexport async function migrate<TSchema extends Record<string, unknown>>(\n\tdb: SingleStoreRemoteDatabase<TSchema>,\n\tcallback: ProxyMigrator,\n\tconfig: MigrationConfig,\n) {\n\tconst migrations = readMigrationFiles(config);\n\n\tconst migrationsTable = config.migrationsTable ?? '__drizzle_migrations';\n\tconst migrationTableCreate = sql`\n\t\tcreate table if not exists ${sql.identifier(migrationsTable)} (\n\t\t\tid serial primary key,\n\t\t\thash text not null,\n\t\t\tcreated_at bigint\n\t\t)\n\t`;\n\tawait db.execute(migrationTableCreate);\n\n\tconst dbMigrations = await db.select({\n\t\tid: sql.raw('id'),\n\t\thash: sql.raw('hash'),\n\t\tcreated_at: sql.raw('created_at'),\n\t}).from(sql.identifier(migrationsTable).getSQL()).orderBy(\n\t\tsql.raw('created_at desc'),\n\t).limit(1);\n\n\tconst lastDbMigration = dbMigrations[0];\n\n\tconst queriesToRun: string[] = [];\n\n\tfor (const migration of migrations) {\n\t\tif (\n\t\t\t!lastDbMigration\n\t\t\t|| Number(lastDbMigration.created_at) < migration.folderMillis\n\t\t) {\n\t\t\tqueriesToRun.push(\n\t\t\t\t...migration.sql,\n\t\t\t\t`insert into ${\n\t\t\t\t\tsql.identifier(migrationsTable).value\n\t\t\t\t} (\\`hash\\`, \\`created_at\\`) values('${migration.hash}', '${migration.folderMillis}')`,\n\t\t\t);\n\t\t}\n\t}\n\n\tawait callback(queriesToRun);\n}\n"],"mappings":"AACA,SAAS,0BAA0B;AACnC,SAAS,WAAW;AAKpB,eAAsB,QACrB,IACA,UACA,QACC;AACD,QAAM,aAAa,mBAAmB,MAAM;AAE5C,QAAM,kBAAkB,OAAO,mBAAmB;AAClD,QAAM,uBAAuB;AAAA,+BACC,IAAI,WAAW,eAAe,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAM7D,QAAM,GAAG,QAAQ,oBAAoB;AAErC,QAAM,eAAe,MAAM,GAAG,OAAO;AAAA,IACpC,IAAI,IAAI,IAAI,IAAI;AAAA,IAChB,MAAM,IAAI,IAAI,MAAM;AAAA,IACpB,YAAY,IAAI,IAAI,YAAY;AAAA,EACjC,CAAC,EAAE,KAAK,IAAI,WAAW,eAAe,EAAE,OAAO,CAAC,EAAE;AAAA,IACjD,IAAI,IAAI,iBAAiB;AAAA,EAC1B,EAAE,MAAM,CAAC;AAET,QAAM,kBAAkB,aAAa,CAAC;AAEtC,QAAM,eAAyB,CAAC;AAEhC,aAAW,aAAa,YAAY;AACnC,QACC,CAAC,mBACE,OAAO,gBAAgB,UAAU,IAAI,UAAU,cACjD;AACD,mBAAa;AAAA,QACZ,GAAG,UAAU;AAAA,QACb,eACC,IAAI,WAAW,eAAe,EAAE,KACjC,uCAAuC,UAAU,IAAI,OAAO,UAAU,YAAY;AAAA,MACnF;AAAA,IACD;AAAA,EACD;AAEA,QAAM,SAAS,YAAY;AAC5B;","names":[]}

View File

@@ -0,0 +1,92 @@
var composeArgs = require('./_composeArgs'),
composeArgsRight = require('./_composeArgsRight'),
countHolders = require('./_countHolders'),
createCtor = require('./_createCtor'),
createRecurry = require('./_createRecurry'),
getHolder = require('./_getHolder'),
reorder = require('./_reorder'),
replaceHolders = require('./_replaceHolders'),
root = require('./_root');
/** Used to compose bitmasks for function metadata. */
var WRAP_BIND_FLAG = 1,
WRAP_BIND_KEY_FLAG = 2,
WRAP_CURRY_FLAG = 8,
WRAP_CURRY_RIGHT_FLAG = 16,
WRAP_ARY_FLAG = 128,
WRAP_FLIP_FLAG = 512;
/**
* Creates a function that wraps `func` to invoke it with optional `this`
* binding of `thisArg`, partial application, and currying.
*
* @private
* @param {Function|string} func The function or method name to wrap.
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @param {*} [thisArg] The `this` binding of `func`.
* @param {Array} [partials] The arguments to prepend to those provided to
* the new function.
* @param {Array} [holders] The `partials` placeholder indexes.
* @param {Array} [partialsRight] The arguments to append to those provided
* to the new function.
* @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
* @param {Array} [argPos] The argument positions of the new function.
* @param {number} [ary] The arity cap of `func`.
* @param {number} [arity] The arity of `func`.
* @returns {Function} Returns the new wrapped function.
*/
function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
var isAry = bitmask & WRAP_ARY_FLAG,
isBind = bitmask & WRAP_BIND_FLAG,
isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
isFlip = bitmask & WRAP_FLIP_FLAG,
Ctor = isBindKey ? undefined : createCtor(func);
function wrapper() {
var length = arguments.length,
args = Array(length),
index = length;
while (index--) {
args[index] = arguments[index];
}
if (isCurried) {
var placeholder = getHolder(wrapper),
holdersCount = countHolders(args, placeholder);
}
if (partials) {
args = composeArgs(args, partials, holders, isCurried);
}
if (partialsRight) {
args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
}
length -= holdersCount;
if (isCurried && length < arity) {
var newHolders = replaceHolders(args, placeholder);
return createRecurry(
func, bitmask, createHybrid, wrapper.placeholder, thisArg,
args, newHolders, argPos, ary, arity - length
);
}
var thisBinding = isBind ? thisArg : this,
fn = isBindKey ? thisBinding[func] : func;
length = args.length;
if (argPos) {
args = reorder(args, argPos);
} else if (isFlip && length > 1) {
args.reverse();
}
if (isAry && ary < length) {
args.length = ary;
}
if (this && this !== root && this instanceof wrapper) {
fn = Ctor || createCtor(fn);
}
return fn.apply(thisBinding, args);
}
return wrapper;
}
module.exports = createHybrid;

View File

@@ -0,0 +1,36 @@
import type { ContextOptions, DateArg } from "./types.js";
/**
* The {@link addQuarters} function options.
*/
export interface AddQuartersOptions<DateType extends Date = Date>
extends ContextOptions<DateType> {}
/**
* @name addQuarters
* @category Quarter Helpers
* @summary Add the specified number of year quarters to the given date.
*
* @description
* Add the specified number of year quarters to the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param amount - The amount of quarters to be added.
* @param options - An object with options
*
* @returns The new date with the quarters added
*
* @example
* // Add 1 quarter to 1 September 2014:
* const result = addQuarters(new Date(2014, 8, 1), 1)
* //=; Mon Dec 01 2014 00:00:00
*/
export declare function addQuarters<
DateType extends Date,
ResultDate extends Date = DateType,
>(
date: DateArg<DateType>,
amount: number,
options?: AddQuartersOptions<ResultDate> | undefined,
): ResultDate;

View File

@@ -0,0 +1,9 @@
import { getMessagesFromConfig } from '../server/react-server/getMessages.js';
import useConfig from './useConfig.js';
function useMessages() {
const config = useConfig('useMessages');
return getMessagesFromConfig(config);
}
export { useMessages as default };

View File

@@ -0,0 +1 @@
export declare function isFixed(node: HTMLElement, computedStyle?: CSSStyleDeclaration): boolean;

View File

@@ -0,0 +1 @@
{"version":3,"file":"_types.js","sourceRoot":"","sources":["../../src/definitions/_types.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1 @@
{"version":3,"file":"washing-machine.js","sources":["../../../src/icons/washing-machine.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name WashingMachine\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMyA2aDMiIC8+CiAgPHBhdGggZD0iTTE3IDZoLjAxIiAvPgogIDxyZWN0IHdpZHRoPSIxOCIgaGVpZ2h0PSIyMCIgeD0iMyIgeT0iMiIgcng9IjIiIC8+CiAgPGNpcmNsZSBjeD0iMTIiIGN5PSIxMyIgcj0iNSIgLz4KICA8cGF0aCBkPSJNMTIgMThhMi41IDIuNSAwIDAgMCAwLTUgMi41IDIuNSAwIDAgMSAwLTUiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/washing-machine\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst WashingMachine = createLucideIcon('WashingMachine', [\n ['path', { d: 'M3 6h3', key: '155dbl' }],\n ['path', { d: 'M17 6h.01', key: 'e2y6kg' }],\n ['rect', { width: '18', height: '20', x: '3', y: '2', rx: '2', key: 'od3kk9' }],\n ['circle', { cx: '12', cy: '13', r: '5', key: 'nlbqau' }],\n ['path', { d: 'M12 18a2.5 2.5 0 0 0 0-5 2.5 2.5 0 0 1 0-5', key: '17lach' }],\n]);\n\nexport default WashingMachine;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,iBAAiB,gBAAkB,CAAA,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC9E,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA8C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7E,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"datacategory.d.ts","sourceRoot":"","sources":["../../../src/types-hoist/datacategory.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,YAAY,GAEpB,SAAS,GAET,OAAO,GAEP,aAAa,GAEb,QAAQ,GAER,UAAU,GAEV,YAAY,GAEZ,SAAS,GAET,UAAU,GAEV,SAAS,GAET,SAAS,GAET,UAAU,GAEV,MAAM,GAEN,UAAU,GAEV,UAAU,GAEV,QAAQ,GAER,SAAS,CAAC"}

View File

@@ -0,0 +1,98 @@
'use strict';
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
var React = require('react');
var index = require('./index-665c4ed8.cjs.prod.js');
var Select = require('./Select-36d15f93.cjs.prod.js');
var _excluded = ["allowCreateWhileLoading", "createOptionPosition", "formatCreateLabel", "isValidNewOption", "getNewOptionData", "onCreateOption", "options", "onChange"];
var compareOption = function compareOption() {
var inputValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
var option = arguments.length > 1 ? arguments[1] : undefined;
var accessors = arguments.length > 2 ? arguments[2] : undefined;
var candidate = String(inputValue).toLowerCase();
var optionValue = String(accessors.getOptionValue(option)).toLowerCase();
var optionLabel = String(accessors.getOptionLabel(option)).toLowerCase();
return optionValue === candidate || optionLabel === candidate;
};
var builtins = {
formatCreateLabel: function formatCreateLabel(inputValue) {
return "Create \"".concat(inputValue, "\"");
},
isValidNewOption: function isValidNewOption(inputValue, selectValue, selectOptions, accessors) {
return !(!inputValue || selectValue.some(function (option) {
return compareOption(inputValue, option, accessors);
}) || selectOptions.some(function (option) {
return compareOption(inputValue, option, accessors);
}));
},
getNewOptionData: function getNewOptionData(inputValue, optionLabel) {
return {
label: optionLabel,
value: inputValue,
__isNew__: true
};
}
};
function useCreatable(_ref) {
var _ref$allowCreateWhile = _ref.allowCreateWhileLoading,
allowCreateWhileLoading = _ref$allowCreateWhile === void 0 ? false : _ref$allowCreateWhile,
_ref$createOptionPosi = _ref.createOptionPosition,
createOptionPosition = _ref$createOptionPosi === void 0 ? 'last' : _ref$createOptionPosi,
_ref$formatCreateLabe = _ref.formatCreateLabel,
formatCreateLabel = _ref$formatCreateLabe === void 0 ? builtins.formatCreateLabel : _ref$formatCreateLabe,
_ref$isValidNewOption = _ref.isValidNewOption,
isValidNewOption = _ref$isValidNewOption === void 0 ? builtins.isValidNewOption : _ref$isValidNewOption,
_ref$getNewOptionData = _ref.getNewOptionData,
getNewOptionData = _ref$getNewOptionData === void 0 ? builtins.getNewOptionData : _ref$getNewOptionData,
onCreateOption = _ref.onCreateOption,
_ref$options = _ref.options,
propsOptions = _ref$options === void 0 ? [] : _ref$options,
propsOnChange = _ref.onChange,
restSelectProps = _objectWithoutProperties(_ref, _excluded);
var _restSelectProps$getO = restSelectProps.getOptionValue,
getOptionValue = _restSelectProps$getO === void 0 ? Select.getOptionValue : _restSelectProps$getO,
_restSelectProps$getO2 = restSelectProps.getOptionLabel,
getOptionLabel = _restSelectProps$getO2 === void 0 ? Select.getOptionLabel : _restSelectProps$getO2,
inputValue = restSelectProps.inputValue,
isLoading = restSelectProps.isLoading,
isMulti = restSelectProps.isMulti,
value = restSelectProps.value,
name = restSelectProps.name;
var newOption = React.useMemo(function () {
return isValidNewOption(inputValue, index.cleanValue(value), propsOptions, {
getOptionValue: getOptionValue,
getOptionLabel: getOptionLabel
}) ? getNewOptionData(inputValue, formatCreateLabel(inputValue)) : undefined;
}, [formatCreateLabel, getNewOptionData, getOptionLabel, getOptionValue, inputValue, isValidNewOption, propsOptions, value]);
var options = React.useMemo(function () {
return (allowCreateWhileLoading || !isLoading) && newOption ? createOptionPosition === 'first' ? [newOption].concat(_toConsumableArray(propsOptions)) : [].concat(_toConsumableArray(propsOptions), [newOption]) : propsOptions;
}, [allowCreateWhileLoading, createOptionPosition, isLoading, newOption, propsOptions]);
var onChange = React.useCallback(function (newValue, actionMeta) {
if (actionMeta.action !== 'select-option') {
return propsOnChange(newValue, actionMeta);
}
var valueArray = Array.isArray(newValue) ? newValue : [newValue];
if (valueArray[valueArray.length - 1] === newOption) {
if (onCreateOption) onCreateOption(inputValue);else {
var newOptionData = getNewOptionData(inputValue, inputValue);
var newActionMeta = {
action: 'create-option',
name: name,
option: newOptionData
};
propsOnChange(index.valueTernary(isMulti, [].concat(_toConsumableArray(index.cleanValue(value)), [newOptionData]), newOptionData), newActionMeta);
}
return;
}
propsOnChange(newValue, actionMeta);
}, [getNewOptionData, inputValue, isMulti, name, newOption, onCreateOption, propsOnChange, value]);
return _objectSpread(_objectSpread({}, restSelectProps), {}, {
options: options,
onChange: onChange
});
}
exports.useCreatable = useCreatable;

View File

@@ -0,0 +1,11 @@
//#region src/rest/utils/throw-if-empty.d.ts
/**
*
* @param value
* @param message
* @throws Throws an error if an empty array or string is provided
*/
declare const throwIfEmpty: (value: string | unknown[], message: string) => void;
//#endregion
export { throwIfEmpty };
//# sourceMappingURL=throw-if-empty.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"appendNonTrashedFilter.d.ts","sourceRoot":"","sources":["../../src/utilities/appendNonTrashedFilter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAE9C,eAAO,MAAM,sBAAsB,kDAKhC;IACD,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,OAAO,CAAA;IACpB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,KAAK,CAAA;CACb,KAAG,KAmBH,CAAA"}

View File

@@ -0,0 +1,112 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPluginFromInput = exports.getExtMetadata = exports.getRouteMetadata = exports.isPatchableExtMethod = exports.isDirectExtInput = exports.isLifecycleExtEventObj = exports.isLifecycleExtType = exports.getPluginName = void 0;
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
const semconv_1 = require("./semconv");
const internal_types_1 = require("./internal-types");
const AttributeNames_1 = require("./enums/AttributeNames");
const instrumentation_1 = require("@opentelemetry/instrumentation");
function getPluginName(plugin) {
if (plugin.name) {
return plugin.name;
}
else {
return plugin.pkg.name;
}
}
exports.getPluginName = getPluginName;
const isLifecycleExtType = (variableToCheck) => {
return (typeof variableToCheck === 'string' &&
internal_types_1.HapiLifecycleMethodNames.has(variableToCheck));
};
exports.isLifecycleExtType = isLifecycleExtType;
const isLifecycleExtEventObj = (variableToCheck) => {
const event = variableToCheck?.type;
return event !== undefined && (0, exports.isLifecycleExtType)(event);
};
exports.isLifecycleExtEventObj = isLifecycleExtEventObj;
const isDirectExtInput = (variableToCheck) => {
return (Array.isArray(variableToCheck) &&
variableToCheck.length <= 3 &&
(0, exports.isLifecycleExtType)(variableToCheck[0]) &&
typeof variableToCheck[1] === 'function');
};
exports.isDirectExtInput = isDirectExtInput;
const isPatchableExtMethod = (variableToCheck) => {
return !Array.isArray(variableToCheck);
};
exports.isPatchableExtMethod = isPatchableExtMethod;
const getRouteMetadata = (route, semconvStability, pluginName) => {
const attributes = {
[semantic_conventions_1.ATTR_HTTP_ROUTE]: route.path,
};
if (semconvStability & instrumentation_1.SemconvStability.OLD) {
attributes[semconv_1.ATTR_HTTP_METHOD] = route.method;
}
if (semconvStability & instrumentation_1.SemconvStability.STABLE) {
// Note: This currently does *not* normalize the method name to uppercase
// and conditionally include `http.request.method.original` as described
// at https://opentelemetry.io/docs/specs/semconv/http/http-spans/
// These attributes are for a *hapi* span, and not the parent HTTP span,
// so the HTTP span guidance doesn't strictly apply.
attributes[semantic_conventions_1.ATTR_HTTP_REQUEST_METHOD] = route.method;
}
let name;
if (pluginName) {
attributes[AttributeNames_1.AttributeNames.HAPI_TYPE] = internal_types_1.HapiLayerType.PLUGIN;
attributes[AttributeNames_1.AttributeNames.PLUGIN_NAME] = pluginName;
name = `${pluginName}: route - ${route.path}`;
}
else {
attributes[AttributeNames_1.AttributeNames.HAPI_TYPE] = internal_types_1.HapiLayerType.ROUTER;
name = `route - ${route.path}`;
}
return { attributes, name };
};
exports.getRouteMetadata = getRouteMetadata;
const getExtMetadata = (extPoint, pluginName) => {
if (pluginName) {
return {
attributes: {
[AttributeNames_1.AttributeNames.EXT_TYPE]: extPoint,
[AttributeNames_1.AttributeNames.HAPI_TYPE]: internal_types_1.HapiLayerType.EXT,
[AttributeNames_1.AttributeNames.PLUGIN_NAME]: pluginName,
},
name: `${pluginName}: ext - ${extPoint}`,
};
}
return {
attributes: {
[AttributeNames_1.AttributeNames.EXT_TYPE]: extPoint,
[AttributeNames_1.AttributeNames.HAPI_TYPE]: internal_types_1.HapiLayerType.EXT,
},
name: `ext - ${extPoint}`,
};
};
exports.getExtMetadata = getExtMetadata;
const getPluginFromInput = (pluginObj) => {
if ('plugin' in pluginObj) {
if ('plugin' in pluginObj.plugin) {
return pluginObj.plugin.plugin;
}
return pluginObj.plugin;
}
return pluginObj;
};
exports.getPluginFromInput = getPluginFromInput;
//# sourceMappingURL=utils.js.map

View File

@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const TableProperties = createLucideIcon("TableProperties", [
["path", { d: "M15 3v18", key: "14nvp0" }],
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M21 9H3", key: "1338ky" }],
["path", { d: "M21 15H3", key: "9uk58r" }]
]);
export { TableProperties as default };
//# sourceMappingURL=table-properties.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"tablets.js","sources":["../../../src/icons/tablets.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Tablets\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSI3IiBjeT0iNyIgcj0iNSIgLz4KICA8Y2lyY2xlIGN4PSIxNyIgY3k9IjE3IiByPSI1IiAvPgogIDxwYXRoIGQ9Ik0xMiAxN2gxMCIgLz4KICA8cGF0aCBkPSJtMy40NiAxMC41NCA3LjA4LTcuMDgiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/tablets\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Tablets = createLucideIcon('Tablets', [\n ['circle', { cx: '7', cy: '7', r: '5', key: 'x29byf' }],\n ['circle', { cx: '17', cy: '17', r: '5', key: '1op1d2' }],\n ['path', { d: 'M12 17h10', key: 'ls21zv' }],\n ['path', { d: 'm3.46 10.54 7.08-7.08', key: '1rehiu' }],\n]);\n\nexport default Tablets;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAC1C,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACtD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAyB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACxD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/auth/operations/access.ts"],"sourcesContent":["import type { PayloadRequest } from '../../types/index.js'\nimport type { SanitizedPermissions } from '../types.js'\n\nimport { killTransaction } from '../../utilities/killTransaction.js'\nimport { adminInit as adminInitTelemetry } from '../../utilities/telemetry/events/adminInit.js'\nimport { getAccessResults } from '../getAccessResults.js'\n\ntype Arguments = {\n req: PayloadRequest\n}\n\nexport const accessOperation = async (args: Arguments): Promise<SanitizedPermissions> => {\n const { req } = args\n\n adminInitTelemetry(req)\n\n try {\n return getAccessResults({ req })\n } catch (e: unknown) {\n await killTransaction(req)\n throw e\n }\n}\n"],"names":["killTransaction","adminInit","adminInitTelemetry","getAccessResults","accessOperation","args","req","e"],"mappings":"AAGA,SAASA,eAAe,QAAQ,qCAAoC;AACpE,SAASC,aAAaC,kBAAkB,QAAQ,gDAA+C;AAC/F,SAASC,gBAAgB,QAAQ,yBAAwB;AAMzD,OAAO,MAAMC,kBAAkB,OAAOC;IACpC,MAAM,EAAEC,GAAG,EAAE,GAAGD;IAEhBH,mBAAmBI;IAEnB,IAAI;QACF,OAAOH,iBAAiB;YAAEG;QAAI;IAChC,EAAE,OAAOC,GAAY;QACnB,MAAMP,gBAAgBM;QACtB,MAAMC;IACR;AACF,EAAC"}

View File

@@ -0,0 +1,623 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import type { EditorConfig, Klass, KlassConstructor, LexicalEditor } from './LexicalEditor';
import type { BaseSelection, RangeSelection } from './LexicalSelection';
import { type DecoratorNode, type ElementNode, NODE_STATE_KEY } from '.';
import { PROTOTYPE_CONFIG_METHOD } from './LexicalConstants';
import { type NodeState, type NodeStateJSON, type Prettify, type RequiredNodeStateConfig } from './LexicalNodeState';
export type NodeMap = Map<NodeKey, LexicalNode>;
/**
* The base type for all serialized nodes
*/
export type SerializedLexicalNode = {
/** The type string used by the Node class */
type: string;
/** A numeric version for this schema, defaulting to 1, but not generally recommended for use */
version: number;
/**
* Any state persisted with the NodeState API that is not
* configured for flat storage
*/
[NODE_STATE_KEY]?: Record<string, unknown>;
};
/**
* EXPERIMENTAL
* The configuration of a node returned by LexicalNode.$config()
*
* @example
* ```ts
* class CustomText extends TextNode {
* $config() {
* return this.config('custom-text', {extends: TextNode}};
* }
* }
* ```
*/
export interface StaticNodeConfigValue<T extends LexicalNode, Type extends string> {
/**
* The exact type of T.getType(), e.g. 'text' - the method itself must
* have a more generic 'string' type to be compatible wtih subclassing.
*/
readonly type?: Type;
/**
* An alternative to the internal static transform() method
* that provides better type inference.
*/
readonly $transform?: (node: T) => void;
/**
* An alternative to the static importJSON() method
* that provides better type inference.
*/
readonly $importJSON?: (serializedNode: SerializedLexicalNode) => T;
/**
* An alternative to the static importDOM() method
*/
readonly importDOM?: DOMConversionMap;
/**
* EXPERIMENTAL
*
* An array of RequiredNodeStateConfig to initialize your node with
* its state requirements. This may be used to configure serialization of
* that state.
*
* This function will be called (at most) once per editor initialization,
* directly on your node's prototype. It must not depend on any state
* initialized in the constructor.
*
* @example
* ```ts
* const flatState = createState("flat", {parse: parseNumber});
* const nestedState = createState("nested", {parse: parseNumber});
* class MyNode extends TextNode {
* $config() {
* return this.config(
* 'my-node',
* {
* extends: TextNode,
* stateConfigs: [
* { stateConfig: flatState, flat: true},
* nestedState,
* ]
* },
* );
* }
* }
* ```
*/
readonly stateConfigs?: readonly RequiredNodeStateConfig[];
/**
* If specified, this must be the exact superclass of the node. It is not
* checked at compile time and it is provided automatically at runtime.
*
* You would want to specify this when you are extending a node that
* has non-trivial configuration in its $config such
* as required state. If you do not specify this, the inferred
* types for your node class might be missing some of that.
*/
readonly extends?: Klass<LexicalNode>;
}
/**
* This is the type of LexicalNode.$config() that can be
* overridden by subclasses.
*/
export type BaseStaticNodeConfig = {
readonly [K in string]?: StaticNodeConfigValue<LexicalNode, string>;
};
/**
* Used to extract the node and type from a StaticNodeConfigRecord
*/
export type StaticNodeConfig<T extends LexicalNode, Type extends string> = BaseStaticNodeConfig & {
readonly [K in Type]?: StaticNodeConfigValue<T, Type>;
};
/**
* Any StaticNodeConfigValue (for generics and collections)
*/
export type AnyStaticNodeConfigValue = StaticNodeConfigValue<any, any>;
/**
* @internal
*
* This is the more specific type than BaseStaticNodeConfig that a subclass
* should return from $config()
*/
export type StaticNodeConfigRecord<Type extends string, Config extends AnyStaticNodeConfigValue> = BaseStaticNodeConfig & {
readonly [K in Type]?: Config;
};
/**
* Extract the type from a node based on its $config
*
* @example
* ```ts
* type TextNodeType = GetStaticNodeType<TextNode>;
* // ? 'text'
* ```
*/
export type GetStaticNodeType<T extends LexicalNode> = ReturnType<T[typeof PROTOTYPE_CONFIG_METHOD]> extends StaticNodeConfig<T, infer Type> ? Type : string;
/**
* The most precise type we can infer for the JSON that will
* be produced by T.exportJSON().
*
* Do not use this for the return type of T.exportJSON()! It must be
* a more generic type to be compatible with subclassing.
*/
export type LexicalExportJSON<T extends LexicalNode> = Prettify<Omit<ReturnType<T['exportJSON']>, 'type'> & {
type: GetStaticNodeType<T>;
} & NodeStateJSON<T>>;
/**
* Omit the children, type, and version properties from the given SerializedLexicalNode definition.
*/
export type LexicalUpdateJSON<T extends SerializedLexicalNode> = Omit<T, 'children' | 'type' | 'version'>;
/** @internal */
export interface LexicalPrivateDOM {
__lexicalTextContent?: string | undefined | null;
__lexicalLineBreak?: HTMLBRElement | HTMLImageElement | undefined | null;
__lexicalDirTextContent?: string | undefined | null;
__lexicalDir?: 'ltr' | 'rtl' | null | undefined;
__lexicalUnmanaged?: boolean | undefined;
}
export declare function $removeNode(nodeToRemove: LexicalNode, restoreSelection: boolean, preserveEmptyParent?: boolean): void;
export type DOMConversionProp<T extends HTMLElement> = (node: T) => DOMConversion<T> | null;
export type DOMConversionPropByTagName<K extends string> = DOMConversionProp<K extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[K] : HTMLElement>;
export type DOMConversionTagNameMap<K extends string> = {
[NodeName in K]?: DOMConversionPropByTagName<NodeName>;
};
/**
* An identity function that will infer the type of DOM nodes
* based on tag names to make it easier to construct a
* DOMConversionMap.
*/
export declare function buildImportMap<K extends string>(importMap: {
[NodeName in K]: DOMConversionPropByTagName<NodeName>;
}): DOMConversionMap;
export type DOMConversion<T extends HTMLElement = HTMLElement> = {
conversion: DOMConversionFn<T>;
priority?: 0 | 1 | 2 | 3 | 4;
};
export type DOMConversionFn<T extends HTMLElement = HTMLElement> = (element: T) => DOMConversionOutput | null;
export type DOMChildConversion = (lexicalNode: LexicalNode, parentLexicalNode: LexicalNode | null | undefined) => LexicalNode | null | undefined;
export type DOMConversionMap<T extends HTMLElement = HTMLElement> = Record<NodeName, DOMConversionProp<T>>;
type NodeName = string;
export type DOMConversionOutput = {
after?: (childLexicalNodes: Array<LexicalNode>) => Array<LexicalNode>;
forChild?: DOMChildConversion;
node: null | LexicalNode | Array<LexicalNode>;
};
export type DOMExportOutputMap = Map<Klass<LexicalNode>, (editor: LexicalEditor, target: LexicalNode) => DOMExportOutput>;
export type DOMExportOutput = {
after?: (generatedElement: HTMLElement | DocumentFragment | Text | null | undefined) => HTMLElement | DocumentFragment | Text | null | undefined;
element: HTMLElement | DocumentFragment | Text | null;
};
export type NodeKey = string;
export declare class LexicalNode {
['constructor']: KlassConstructor<typeof LexicalNode>;
/** @internal */
__type: string;
/** @internal */
__key: string;
/** @internal */
__parent: null | NodeKey;
/** @internal */
__prev: null | NodeKey;
/** @internal */
__next: null | NodeKey;
/** @internal */
__state?: NodeState<this>;
/**
* Returns the string type of this node. Every node must
* implement this and it MUST BE UNIQUE amongst nodes registered
* on the editor.
*
*/
static getType(): string;
/**
* Clones this node, creating a new node with a different key
* and adding it to the EditorState (but not attaching it anywhere!). All nodes must
* implement this method.
*
*/
static clone(_data: unknown): LexicalNode;
/**
* Override this to implement the new static node configuration protocol,
* this method is called directly on the prototype and must not depend
* on anything initialized in the constructor. Generally it should be
* a trivial implementation.
*
* @example
* ```ts
* class MyNode extends TextNode {
* $config() {
* return this.config('my-node', {extends: TextNode});
* }
* }
* ```
*/
$config(): BaseStaticNodeConfig;
/**
* This is a convenience method for $config that
* aids in type inference. See {@link LexicalNode.$config}
* for example usage.
*/
config<Type extends string, Config extends StaticNodeConfigValue<this, Type>>(type: Type, config: Config): StaticNodeConfigRecord<Type, Config>;
/**
* Perform any state updates on the clone of prevNode that are not already
* handled by the constructor call in the static clone method. If you have
* state to update in your clone that is not handled directly by the
* constructor, it is advisable to override this method but it is required
* to include a call to `super.afterCloneFrom(prevNode)` in your
* implementation. This is only intended to be called by
* {@link $cloneWithProperties} function or via a super call.
*
* @example
* ```ts
* class ClassesTextNode extends TextNode {
* // Not shown: static getType, static importJSON, exportJSON, createDOM, updateDOM
* __classes = new Set<string>();
* static clone(node: ClassesTextNode): ClassesTextNode {
* // The inherited TextNode constructor is used here, so
* // classes is not set by this method.
* return new ClassesTextNode(node.__text, node.__key);
* }
* afterCloneFrom(node: this): void {
* // This calls TextNode.afterCloneFrom and LexicalNode.afterCloneFrom
* // for necessary state updates
* super.afterCloneFrom(node);
* this.__addClasses(node.__classes);
* }
* // This method is a private implementation detail, it is not
* // suitable for the public API because it does not call getWritable
* __addClasses(classNames: Iterable<string>): this {
* for (const className of classNames) {
* this.__classes.add(className);
* }
* return this;
* }
* addClass(...classNames: string[]): this {
* return this.getWritable().__addClasses(classNames);
* }
* removeClass(...classNames: string[]): this {
* const node = this.getWritable();
* for (const className of classNames) {
* this.__classes.delete(className);
* }
* return this;
* }
* getClasses(): Set<string> {
* return this.getLatest().__classes;
* }
* }
* ```
*
*/
afterCloneFrom(prevNode: this): void;
static importDOM?: () => DOMConversionMap<any> | null;
constructor(key?: NodeKey);
/**
* Returns the string type of this node.
*/
getType(): string;
isInline(): boolean;
/**
* Returns true if there is a path between this node and the RootNode, false otherwise.
* This is a way of determining if the node is "attached" EditorState. Unattached nodes
* won't be reconciled and will ultimately be cleaned up by the Lexical GC.
*/
isAttached(): boolean;
/**
* Returns true if this node is contained within the provided Selection., false otherwise.
* Relies on the algorithms implemented in {@link BaseSelection.getNodes} to determine
* what's included.
*
* @param selection - The selection that we want to determine if the node is in.
*/
isSelected(selection?: null | BaseSelection): boolean;
/**
* Returns this nodes key.
*/
getKey(): NodeKey;
/**
* Returns the zero-based index of this node within the parent.
*/
getIndexWithinParent(): number;
/**
* Returns the parent of this node, or null if none is found.
*/
getParent<T extends ElementNode>(): T | null;
/**
* Returns the parent of this node, or throws if none is found.
*/
getParentOrThrow<T extends ElementNode>(): T;
/**
* Returns the highest (in the EditorState tree)
* non-root ancestor of this node, or null if none is found. See {@link lexical!$isRootOrShadowRoot}
* for more information on which Elements comprise "roots".
*/
getTopLevelElement(): ElementNode | DecoratorNode<unknown> | null;
/**
* Returns the highest (in the EditorState tree)
* non-root ancestor of this node, or throws if none is found. See {@link lexical!$isRootOrShadowRoot}
* for more information on which Elements comprise "roots".
*/
getTopLevelElementOrThrow(): ElementNode | DecoratorNode<unknown>;
/**
* Returns a list of the every ancestor of this node,
* all the way up to the RootNode.
*
*/
getParents(): Array<ElementNode>;
/**
* Returns a list of the keys of every ancestor of this node,
* all the way up to the RootNode.
*
*/
getParentKeys(): Array<NodeKey>;
/**
* Returns the "previous" siblings - that is, the node that comes
* before this one in the same parent.
*
*/
getPreviousSibling<T extends LexicalNode>(): T | null;
/**
* Returns the "previous" siblings - that is, the nodes that come between
* this one and the first child of it's parent, inclusive.
*
*/
getPreviousSiblings<T extends LexicalNode>(): Array<T>;
/**
* Returns the "next" siblings - that is, the node that comes
* after this one in the same parent
*
*/
getNextSibling<T extends LexicalNode>(): T | null;
/**
* Returns all "next" siblings - that is, the nodes that come between this
* one and the last child of it's parent, inclusive.
*
*/
getNextSiblings<T extends LexicalNode>(): Array<T>;
/**
* @deprecated use {@link $getCommonAncestor}
*
* Returns the closest common ancestor of this node and the provided one or null
* if one cannot be found.
*
* @param node - the other node to find the common ancestor of.
*/
getCommonAncestor<T extends ElementNode = ElementNode>(node: LexicalNode): T | null;
/**
* Returns true if the provided node is the exact same one as this node, from Lexical's perspective.
* Always use this instead of referential equality.
*
* @param object - the node to perform the equality comparison on.
*/
is(object: LexicalNode | null | undefined): boolean;
/**
* Returns true if this node logically precedes the target node in the
* editor state, false otherwise (including if there is no common ancestor).
*
* Note that this notion of isBefore is based on post-order; a descendant
* node is always before its ancestors. See also
* {@link $getCommonAncestor} and {@link $comparePointCaretNext} for
* more flexible ways to determine the relative positions of nodes.
*
* @param targetNode - the node we're testing to see if it's after this one.
*/
isBefore(targetNode: LexicalNode): boolean;
/**
* Returns true if this node is an ancestor of and distinct from the target node, false otherwise.
*
* @param targetNode - the would-be child node.
*/
isParentOf(targetNode: LexicalNode): boolean;
/**
* Returns a list of nodes that are between this node and
* the target node in the EditorState.
*
* @param targetNode - the node that marks the other end of the range of nodes to be returned.
*/
getNodesBetween(targetNode: LexicalNode): Array<LexicalNode>;
/**
* Returns true if this node has been marked dirty during this update cycle.
*
*/
isDirty(): boolean;
/**
* Returns the latest version of the node from the active EditorState.
* This is used to avoid getting values from stale node references.
*
*/
getLatest(): this;
/**
* Returns a mutable version of the node using {@link $cloneWithProperties}
* if necessary. Will throw an error if called outside of a Lexical Editor
* {@link LexicalEditor.update} callback.
*
*/
getWritable(): this;
/**
* Returns the text content of the node. Override this for
* custom nodes that should have a representation in plain text
* format (for copy + paste, for example)
*
*/
getTextContent(): string;
/**
* Returns the length of the string produced by calling getTextContent on this node.
*
*/
getTextContentSize(): number;
/**
* Called during the reconciliation process to determine which nodes
* to insert into the DOM for this Lexical Node.
*
* This method must return exactly one HTMLElement. Nested elements are not supported.
*
* Do not attempt to update the Lexical EditorState during this phase of the update lifecycle.
*
* @param _config - allows access to things like the EditorTheme (to apply classes) during reconciliation.
* @param _editor - allows access to the editor for context during reconciliation.
*
* */
createDOM(_config: EditorConfig, _editor: LexicalEditor): HTMLElement;
/**
* Called when a node changes and should update the DOM
* in whatever way is necessary to make it align with any changes that might
* have happened during the update.
*
* Returning "true" here will cause lexical to unmount and recreate the DOM node
* (by calling createDOM). You would need to do this if the element tag changes,
* for instance.
*
* */
updateDOM(_prevNode: unknown, _dom: HTMLElement, _config: EditorConfig): boolean;
/**
* Controls how the this node is serialized to HTML. This is important for
* copy and paste between Lexical and non-Lexical editors, or Lexical editors with different namespaces,
* in which case the primary transfer format is HTML. It's also important if you're serializing
* to HTML for any other reason via {@link @lexical/html!$generateHtmlFromNodes}. You could
* also use this method to build your own HTML renderer.
*
* */
exportDOM(editor: LexicalEditor): DOMExportOutput;
/**
* Controls how the this node is serialized to JSON. This is important for
* copy and paste between Lexical editors sharing the same namespace. It's also important
* if you're serializing to JSON for persistent storage somewhere.
* See [Serialization & Deserialization](https://lexical.dev/docs/concepts/serialization#lexical---html).
*
* */
exportJSON(): SerializedLexicalNode;
/**
* Controls how the this node is deserialized from JSON. This is usually boilerplate,
* but provides an abstraction between the node implementation and serialized interface that can
* be important if you ever make breaking changes to a node schema (by adding or removing properties).
* See [Serialization & Deserialization](https://lexical.dev/docs/concepts/serialization#lexical---html).
*
* */
static importJSON(_serializedNode: SerializedLexicalNode): LexicalNode;
/**
* Update this LexicalNode instance from serialized JSON. It's recommended
* to implement as much logic as possible in this method instead of the
* static importJSON method, so that the functionality can be inherited in subclasses.
*
* The LexicalUpdateJSON utility type should be used to ignore any type, version,
* or children properties in the JSON so that the extended JSON from subclasses
* are acceptable parameters for the super call.
*
* If overridden, this method must call super.
*
* @example
* ```ts
* class MyTextNode extends TextNode {
* // ...
* static importJSON(serializedNode: SerializedMyTextNode): MyTextNode {
* return $createMyTextNode()
* .updateFromJSON(serializedNode);
* }
* updateFromJSON(
* serializedNode: LexicalUpdateJSON<SerializedMyTextNode>,
* ): this {
* return super.updateFromJSON(serializedNode)
* .setMyProperty(serializedNode.myProperty);
* }
* }
* ```
**/
updateFromJSON(serializedNode: LexicalUpdateJSON<SerializedLexicalNode>): this;
/**
* @experimental
*
* Registers the returned function as a transform on the node during
* Editor initialization. Most such use cases should be addressed via
* the {@link LexicalEditor.registerNodeTransform} API.
*
* Experimental - use at your own risk.
*/
static transform(): ((node: LexicalNode) => void) | null;
/**
* Removes this LexicalNode from the EditorState. If the node isn't re-inserted
* somewhere, the Lexical garbage collector will eventually clean it up.
*
* @param preserveEmptyParent - If falsy, the node's parent will be removed if
* it's empty after the removal operation. This is the default behavior, subject to
* other node heuristics such as {@link ElementNode#canBeEmpty}
* */
remove(preserveEmptyParent?: boolean): void;
/**
* Replaces this LexicalNode with the provided node, optionally transferring the children
* of the replaced node to the replacing node.
*
* @param replaceWith - The node to replace this one with.
* @param includeChildren - Whether or not to transfer the children of this node to the replacing node.
* */
replace<N extends LexicalNode>(replaceWith: N, includeChildren?: boolean): N;
/**
* Inserts a node after this LexicalNode (as the next sibling).
*
* @param nodeToInsert - The node to insert after this one.
* @param restoreSelection - Whether or not to attempt to resolve the
* selection to the appropriate place after the operation is complete.
* */
insertAfter(nodeToInsert: LexicalNode, restoreSelection?: boolean): LexicalNode;
/**
* Inserts a node before this LexicalNode (as the previous sibling).
*
* @param nodeToInsert - The node to insert before this one.
* @param restoreSelection - Whether or not to attempt to resolve the
* selection to the appropriate place after the operation is complete.
* */
insertBefore(nodeToInsert: LexicalNode, restoreSelection?: boolean): LexicalNode;
/**
* Whether or not this node has a required parent. Used during copy + paste operations
* to normalize nodes that would otherwise be orphaned. For example, ListItemNodes without
* a ListNode parent or TextNodes with a ParagraphNode parent.
*
* */
isParentRequired(): boolean;
/**
* The creation logic for any required parent. Should be implemented if {@link isParentRequired} returns true.
*
* */
createParentElementNode(): ElementNode;
selectStart(): RangeSelection;
selectEnd(): RangeSelection;
/**
* Moves selection to the previous sibling of this node, at the specified offsets.
*
* @param anchorOffset - The anchor offset for selection.
* @param focusOffset - The focus offset for selection
* */
selectPrevious(anchorOffset?: number, focusOffset?: number): RangeSelection;
/**
* Moves selection to the next sibling of this node, at the specified offsets.
*
* @param anchorOffset - The anchor offset for selection.
* @param focusOffset - The focus offset for selection
* */
selectNext(anchorOffset?: number, focusOffset?: number): RangeSelection;
/**
* Marks a node dirty, triggering transforms and
* forcing it to be reconciled during the update cycle.
*
* */
markDirty(): void;
/**
* @internal
*
* When the reconciler detects that a node was mutated, this method
* may be called to restore the node to a known good state.
*/
reconcileObservedMutation(dom: HTMLElement, editor: LexicalEditor): void;
}
/**
* Insert a series of nodes after this LexicalNode (as next siblings)
*
* @param firstToInsert - The first node to insert after this one.
* @param lastToInsert - The last node to insert after this one. Must be a
* later sibling of FirstNode. If not provided, it will be its last sibling.
*/
export declare function insertRangeAfter(node: LexicalNode, firstToInsert: LexicalNode, lastToInsert?: LexicalNode): void;
export {};

View File

@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Plug = createLucideIcon("Plug", [
["path", { d: "M12 22v-5", key: "1ega77" }],
["path", { d: "M9 8V2", key: "14iosj" }],
["path", { d: "M15 8V2", key: "18g5xt" }],
["path", { d: "M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z", key: "osxo6l" }]
]);
export { Plug as default };
//# sourceMappingURL=plug.js.map

View File

@@ -0,0 +1,30 @@
import type { ColumnBuilderBaseConfig } from "../../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../../column.cjs";
import { entityKind } from "../../../entity.cjs";
import { PgColumn, PgColumnBuilder } from "../common.cjs";
export type PgSparseVectorBuilderInitial<TName extends string> = PgSparseVectorBuilder<{
name: TName;
dataType: 'string';
columnType: 'PgSparseVector';
data: string;
driverParam: string;
enumValues: undefined;
}>;
export declare class PgSparseVectorBuilder<T extends ColumnBuilderBaseConfig<'string', 'PgSparseVector'>> extends PgColumnBuilder<T, {
dimensions: number | undefined;
}> {
static readonly [entityKind]: string;
constructor(name: string, config: PgSparseVectorConfig);
}
export declare class PgSparseVector<T extends ColumnBaseConfig<'string', 'PgSparseVector'>> extends PgColumn<T, {
dimensions: number | undefined;
}> {
static readonly [entityKind]: string;
readonly dimensions: number | undefined;
getSQLType(): string;
}
export interface PgSparseVectorConfig {
dimensions: number;
}
export declare function sparsevec(config: PgSparseVectorConfig): PgSparseVectorBuilderInitial<''>;
export declare function sparsevec<TName extends string>(name: TName, config: PgSparseVectorConfig): PgSparseVectorBuilderInitial<TName>;

View File

@@ -0,0 +1,248 @@
import * as decoder from "./decoder";
import * as t from "@webassemblyjs/ast";
/**
* TODO(sven): I added initial props, but we should rather fix
* https://github.com/xtuc/webassemblyjs/issues/405
*/
var defaultDecoderOpts = {
dump: false,
ignoreCodeSection: false,
ignoreDataSection: false,
ignoreCustomNameSection: false
}; // traverses the AST, locating function name metadata, which is then
// used to update index-based identifiers with function names
function restoreFunctionNames(ast) {
var functionNames = [];
t.traverse(ast, {
FunctionNameMetadata: function FunctionNameMetadata(_ref) {
var node = _ref.node;
functionNames.push({
name: node.value,
index: node.index
});
}
});
if (functionNames.length === 0) {
return;
}
t.traverse(ast, {
Func: function (_Func) {
function Func(_x) {
return _Func.apply(this, arguments);
}
Func.toString = function () {
return _Func.toString();
};
return Func;
}(function (_ref2) {
var node = _ref2.node;
// $FlowIgnore
var nodeName = node.name;
var indexBasedFunctionName = nodeName.value;
var index = Number(indexBasedFunctionName.replace("func_", ""));
var functionName = functionNames.find(function (f) {
return f.index === index;
});
if (functionName) {
var oldValue = nodeName.value;
nodeName.value = functionName.name; // $FlowIgnore
nodeName.numeric = oldValue; // $FlowIgnore
delete nodeName.raw;
}
}),
// Also update the reference in the export
ModuleExport: function (_ModuleExport) {
function ModuleExport(_x2) {
return _ModuleExport.apply(this, arguments);
}
ModuleExport.toString = function () {
return _ModuleExport.toString();
};
return ModuleExport;
}(function (_ref3) {
var node = _ref3.node;
if (node.descr.exportType === "Func") {
// $FlowIgnore
var nodeName = node.descr.id;
var index = nodeName.value;
var functionName = functionNames.find(function (f) {
return f.index === index;
});
if (functionName) {
node.descr.id = t.identifier(functionName.name);
}
}
}),
ModuleImport: function (_ModuleImport) {
function ModuleImport(_x3) {
return _ModuleImport.apply(this, arguments);
}
ModuleImport.toString = function () {
return _ModuleImport.toString();
};
return ModuleImport;
}(function (_ref4) {
var node = _ref4.node;
if (node.descr.type === "FuncImportDescr") {
// $FlowIgnore
var indexBasedFunctionName = node.descr.id;
var index = Number(indexBasedFunctionName.replace("func_", ""));
var functionName = functionNames.find(function (f) {
return f.index === index;
});
if (functionName) {
// $FlowIgnore
node.descr.id = t.identifier(functionName.name);
}
}
}),
CallInstruction: function (_CallInstruction) {
function CallInstruction(_x4) {
return _CallInstruction.apply(this, arguments);
}
CallInstruction.toString = function () {
return _CallInstruction.toString();
};
return CallInstruction;
}(function (nodePath) {
var node = nodePath.node;
var index = node.index.value;
var functionName = functionNames.find(function (f) {
return f.index === index;
});
if (functionName) {
var oldValue = node.index;
node.index = t.identifier(functionName.name);
node.numeric = oldValue; // $FlowIgnore
delete node.raw;
}
})
});
}
function restoreLocalNames(ast) {
var localNames = [];
t.traverse(ast, {
LocalNameMetadata: function LocalNameMetadata(_ref5) {
var node = _ref5.node;
localNames.push({
name: node.value,
localIndex: node.localIndex,
functionIndex: node.functionIndex
});
}
});
if (localNames.length === 0) {
return;
}
t.traverse(ast, {
Func: function (_Func2) {
function Func(_x5) {
return _Func2.apply(this, arguments);
}
Func.toString = function () {
return _Func2.toString();
};
return Func;
}(function (_ref6) {
var node = _ref6.node;
var signature = node.signature;
if (signature.type !== "Signature") {
return;
} // $FlowIgnore
var nodeName = node.name;
var indexBasedFunctionName = nodeName.value;
var functionIndex = Number(indexBasedFunctionName.replace("func_", ""));
signature.params.forEach(function (param, paramIndex) {
var paramName = localNames.find(function (f) {
return f.localIndex === paramIndex && f.functionIndex === functionIndex;
});
if (paramName && paramName.name !== "") {
param.id = paramName.name;
}
});
})
});
}
function restoreModuleName(ast) {
t.traverse(ast, {
ModuleNameMetadata: function (_ModuleNameMetadata) {
function ModuleNameMetadata(_x6) {
return _ModuleNameMetadata.apply(this, arguments);
}
ModuleNameMetadata.toString = function () {
return _ModuleNameMetadata.toString();
};
return ModuleNameMetadata;
}(function (moduleNameMetadataPath) {
// update module
t.traverse(ast, {
Module: function (_Module) {
function Module(_x7) {
return _Module.apply(this, arguments);
}
Module.toString = function () {
return _Module.toString();
};
return Module;
}(function (_ref7) {
var node = _ref7.node;
var name = moduleNameMetadataPath.node.value; // compatiblity with wast-parser
if (name === "") {
name = null;
}
node.id = name;
})
});
})
});
}
export function decode(buf, customOpts) {
var opts = Object.assign({}, defaultDecoderOpts, customOpts);
var ast = decoder.decode(buf, opts);
if (opts.ignoreCustomNameSection === false) {
restoreFunctionNames(ast);
restoreLocalNames(ast);
restoreModuleName(ast);
}
return ast;
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/views/Version/RenderFieldsToDiff/fields/Upload/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,cAAc,EACd,UAAU,EACV,WAAW,EACX,8BAA8B,EAC/B,MAAM,SAAS,CAAA;AAEhB,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAG1E,OAAO,cAAc,CAAA;AAErB,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,KAAK,gBAAgB,GAAG,CAAC,QAAQ,GAAG,UAAU,CAAC,GAAG,MAAM,GAAG,MAAM,CAAA;AACjE,KAAK,aAAa,GAAG;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,CAAC,QAAQ,GAAG,UAAU,CAAC,GAAG,MAAM,GAAG,MAAM,CAAA;CAAE,CAAA;AAE7F,KAAK,SAAS,GAAG,gBAAgB,GAAG,aAAa,CAAA;AAEjD,eAAO,MAAM,MAAM,EAAE,8BAwCpB,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC;IACvC,KAAK,EAAE,WAAW,CAAA;IAClB,IAAI,EAAE,UAAU,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,EAAE,OAAO,CAAA;IACpB,GAAG,EAAE,cAAc,CAAA;IACnB,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,CAAA;IAC3B,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,CAAA;CAC1B,CAiFA,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC;IACtC,KAAK,EAAE,WAAW,CAAA;IAClB,IAAI,EAAE,UAAU,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,EAAE,OAAO,CAAA;IACpB,GAAG,EAAE,cAAc,CAAA;IACnB,SAAS,EAAE,SAAS,CAAA;IACpB,OAAO,EAAE,SAAS,CAAA;CACnB,CA2DA,CAAA"}

View File

@@ -0,0 +1,234 @@
import { MCP_PROTOCOL_VERSION_ATTRIBUTE, CLIENT_PORT_ATTRIBUTE, CLIENT_ADDRESS_ATTRIBUTE, MCP_SESSION_ID_ATTRIBUTE, NETWORK_PROTOCOL_VERSION_ATTRIBUTE, NETWORK_TRANSPORT_ATTRIBUTE, MCP_TRANSPORT_ATTRIBUTE, MCP_SERVER_NAME_ATTRIBUTE, MCP_SERVER_TITLE_ATTRIBUTE, MCP_SERVER_VERSION_ATTRIBUTE } from './attributes.js';
import { getProtocolVersionForTransport, getClientInfoForTransport, getSessionDataForTransport } from './sessionManagement.js';
import { isValidContentItem } from './validation.js';
/**
* Session and party info extraction functions for MCP server instrumentation
*
* Handles extraction of client/server info and session data from MCP messages.
*/
/**
* Extracts and validates PartyInfo from an unknown object
* @param obj - Unknown object that might contain party info
* @returns Validated PartyInfo object with only string properties
*/
function extractPartyInfo(obj) {
const partyInfo = {};
if (isValidContentItem(obj)) {
if (typeof obj.name === 'string') {
partyInfo.name = obj.name;
}
if (typeof obj.title === 'string') {
partyInfo.title = obj.title;
}
if (typeof obj.version === 'string') {
partyInfo.version = obj.version;
}
}
return partyInfo;
}
/**
* Extracts session data from "initialize" requests
* @param request - JSON-RPC "initialize" request containing client info and protocol version
* @returns Session data extracted from request parameters including protocol version and client info
*/
function extractSessionDataFromInitializeRequest(request) {
const sessionData = {};
if (isValidContentItem(request.params)) {
if (typeof request.params.protocolVersion === 'string') {
sessionData.protocolVersion = request.params.protocolVersion;
}
if (request.params.clientInfo) {
sessionData.clientInfo = extractPartyInfo(request.params.clientInfo);
}
}
return sessionData;
}
/**
* Extracts session data from "initialize" response
* @param result - "initialize" response result containing server info and protocol version
* @returns Partial session data extracted from response including protocol version and server info
*/
function extractSessionDataFromInitializeResponse(result) {
const sessionData = {};
if (isValidContentItem(result)) {
if (typeof result.protocolVersion === 'string') {
sessionData.protocolVersion = result.protocolVersion;
}
if (result.serverInfo) {
sessionData.serverInfo = extractPartyInfo(result.serverInfo);
}
}
return sessionData;
}
/**
* Build client attributes from stored client info
* @param transport - MCP transport instance
* @returns Client attributes for span instrumentation
*/
function getClientAttributes(transport) {
const clientInfo = getClientInfoForTransport(transport);
const attributes = {};
if (clientInfo?.name) {
attributes['mcp.client.name'] = clientInfo.name;
}
if (clientInfo?.title) {
attributes['mcp.client.title'] = clientInfo.title;
}
if (clientInfo?.version) {
attributes['mcp.client.version'] = clientInfo.version;
}
return attributes;
}
/**
* Build client attributes from PartyInfo directly
* @param clientInfo - Client party info
* @returns Client attributes for span instrumentation
*/
function buildClientAttributesFromInfo(clientInfo) {
const attributes = {};
if (clientInfo?.name) {
attributes['mcp.client.name'] = clientInfo.name;
}
if (clientInfo?.title) {
attributes['mcp.client.title'] = clientInfo.title;
}
if (clientInfo?.version) {
attributes['mcp.client.version'] = clientInfo.version;
}
return attributes;
}
/**
* Build server attributes from stored server info
* @param transport - MCP transport instance
* @returns Server attributes for span instrumentation
*/
function getServerAttributes(transport) {
const serverInfo = getSessionDataForTransport(transport)?.serverInfo;
const attributes = {};
if (serverInfo?.name) {
attributes[MCP_SERVER_NAME_ATTRIBUTE] = serverInfo.name;
}
if (serverInfo?.title) {
attributes[MCP_SERVER_TITLE_ATTRIBUTE] = serverInfo.title;
}
if (serverInfo?.version) {
attributes[MCP_SERVER_VERSION_ATTRIBUTE] = serverInfo.version;
}
return attributes;
}
/**
* Build server attributes from PartyInfo directly
* @param serverInfo - Server party info
* @returns Server attributes for span instrumentation
*/
function buildServerAttributesFromInfo(serverInfo) {
const attributes = {};
if (serverInfo?.name) {
attributes[MCP_SERVER_NAME_ATTRIBUTE] = serverInfo.name;
}
if (serverInfo?.title) {
attributes[MCP_SERVER_TITLE_ATTRIBUTE] = serverInfo.title;
}
if (serverInfo?.version) {
attributes[MCP_SERVER_VERSION_ATTRIBUTE] = serverInfo.version;
}
return attributes;
}
/**
* Extracts client connection info from extra handler data
* @param extra - Extra handler data containing connection info
* @returns Client address and port information
*/
function extractClientInfo(extra)
{
return {
address:
extra?.requestInfo?.remoteAddress ||
extra?.clientAddress ||
extra?.request?.ip ||
extra?.request?.connection?.remoteAddress,
port: extra?.requestInfo?.remotePort || extra?.clientPort || extra?.request?.connection?.remotePort,
};
}
/**
* Extracts transport types based on transport constructor name
* @param transport - MCP transport instance
* @returns Transport type mapping for span attributes
*/
function getTransportTypes(transport) {
if (!transport?.constructor) {
return { mcpTransport: 'unknown', networkTransport: 'unknown' };
}
const transportName = typeof transport.constructor?.name === 'string' ? transport.constructor.name : 'unknown';
let networkTransport = 'unknown';
const lowerTransportName = transportName.toLowerCase();
if (lowerTransportName.includes('stdio')) {
networkTransport = 'pipe';
} else if (lowerTransportName.includes('http') || lowerTransportName.includes('sse')) {
networkTransport = 'tcp';
}
return {
mcpTransport: transportName,
networkTransport,
};
}
/**
* Build transport and network attributes
* @param transport - MCP transport instance
* @param extra - Optional extra handler data
* @returns Transport attributes for span instrumentation
* @note sessionId may be undefined during initial setup - session should be established by client during initialize flow
*/
function buildTransportAttributes(
transport,
extra,
) {
const sessionId = transport && 'sessionId' in transport ? transport.sessionId : undefined;
const clientInfo = extra ? extractClientInfo(extra) : {};
const { mcpTransport, networkTransport } = getTransportTypes(transport);
const clientAttributes = getClientAttributes(transport);
const serverAttributes = getServerAttributes(transport);
const protocolVersion = getProtocolVersionForTransport(transport);
const attributes = {
...(sessionId && { [MCP_SESSION_ID_ATTRIBUTE]: sessionId }),
...(clientInfo.address && { [CLIENT_ADDRESS_ATTRIBUTE]: clientInfo.address }),
...(clientInfo.port && { [CLIENT_PORT_ATTRIBUTE]: clientInfo.port }),
[MCP_TRANSPORT_ATTRIBUTE]: mcpTransport,
[NETWORK_TRANSPORT_ATTRIBUTE]: networkTransport,
[NETWORK_PROTOCOL_VERSION_ATTRIBUTE]: '2.0',
...(protocolVersion && { [MCP_PROTOCOL_VERSION_ATTRIBUTE]: protocolVersion }),
...clientAttributes,
...serverAttributes,
};
return attributes;
}
export { buildClientAttributesFromInfo, buildServerAttributesFromInfo, buildTransportAttributes, extractClientInfo, extractSessionDataFromInitializeRequest, extractSessionDataFromInitializeResponse, getClientAttributes, getServerAttributes, getTransportTypes };
//# sourceMappingURL=sessionExtraction.js.map

View File

@@ -0,0 +1,103 @@
'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { getTranslation } from '@payloadcms/translations';
import React, { useCallback, useMemo } from 'react';
import { RenderCustomComponent } from '../../elements/RenderCustomComponent/index.js';
import { FieldDescription } from '../../fields/FieldDescription/index.js';
import { FieldError } from '../../fields/FieldError/index.js';
import { useField } from '../../forms/useField/index.js';
import { withCondition } from '../../forms/withCondition/index.js';
import { useTranslation } from '../../providers/Translation/index.js';
import { FieldLabel } from '../FieldLabel/index.js';
import { mergeFieldStyles } from '../mergeFieldStyles.js';
import { fieldBaseClass } from '../shared/index.js';
import './index.scss';
const EmailFieldComponent = props => {
const {
field,
field: {
admin: {
autoComplete,
className,
description,
placeholder
} = {},
label,
localized,
required
} = {},
path: pathFromProps,
readOnly,
validate
} = props;
const {
i18n
} = useTranslation();
const memoizedValidate = useCallback((value, options) => {
if (typeof validate === 'function') {
return validate(value, {
...options,
required
});
}
}, [validate, required]);
const {
customComponents: {
AfterInput,
BeforeInput,
Description,
Error,
Label
} = {},
disabled,
path,
setValue,
showError,
value: value_0
} = useField({
potentiallyStalePath: pathFromProps,
validate: memoizedValidate
});
const styles = useMemo(() => mergeFieldStyles(field), [field]);
return /*#__PURE__*/_jsxs("div", {
className: [fieldBaseClass, 'email', className, showError && 'error', (readOnly || disabled) && 'read-only'].filter(Boolean).join(' '),
style: styles,
children: [/*#__PURE__*/_jsx(RenderCustomComponent, {
CustomComponent: Label,
Fallback: /*#__PURE__*/_jsx(FieldLabel, {
label: label,
localized: localized,
path: path,
required: required
})
}), /*#__PURE__*/_jsxs("div", {
className: `${fieldBaseClass}__wrap`,
children: [/*#__PURE__*/_jsx(RenderCustomComponent, {
CustomComponent: Error,
Fallback: /*#__PURE__*/_jsx(FieldError, {
path: path,
showError: showError
})
}), BeforeInput, /*#__PURE__*/_jsx("input", {
autoComplete: autoComplete,
disabled: readOnly || disabled,
id: `field-${path.replace(/\./g, '__')}`,
name: path,
onChange: setValue,
placeholder: getTranslation(placeholder, i18n),
required: required,
type: "email",
value: value_0 || ''
}), AfterInput]
}), /*#__PURE__*/_jsx(RenderCustomComponent, {
CustomComponent: Description,
Fallback: /*#__PURE__*/_jsx(FieldDescription, {
description: description,
path: path
})
})]
});
};
export const EmailField = withCondition(EmailFieldComponent);
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,8 @@
import type { I18nClient } from '@payloadcms/translations';
import type { Metadata } from 'next';
import type { SanitizedConfig } from 'payload';
export declare const generateNotFoundViewMetadata: ({ config, i18n, }: {
config: SanitizedConfig;
i18n: I18nClient;
}) => Promise<Metadata>;
//# sourceMappingURL=metadata.d.ts.map

View File

@@ -0,0 +1,170 @@
import type { Maybe } from '../jsutils/Maybe';
import type { ObjMap } from '../jsutils/ObjMap';
import type { GraphQLError } from '../error/GraphQLError';
import type {
SchemaDefinitionNode,
SchemaExtensionNode,
} from '../language/ast';
import { OperationTypeNode } from '../language/ast';
import type {
GraphQLAbstractType,
GraphQLInterfaceType,
GraphQLNamedType,
GraphQLObjectType,
} from './definition';
import type { GraphQLDirective } from './directives';
/**
* Test if the given value is a GraphQL schema.
*/
export declare function isSchema(schema: unknown): schema is GraphQLSchema;
export declare function assertSchema(schema: unknown): GraphQLSchema;
/**
* Custom extensions
*
* @remarks
* Use a unique identifier name for your extension, for example the name of
* your library or project. Do not use a shortened identifier as this increases
* the risk of conflicts. We recommend you add at most one extension field,
* an object which can contain all the values you need.
*/
export interface GraphQLSchemaExtensions {
[attributeName: string]: unknown;
}
/**
* Schema Definition
*
* A Schema is created by supplying the root types of each type of operation,
* query and mutation (optional). A schema definition is then supplied to the
* validator and executor.
*
* Example:
*
* ```ts
* const MyAppSchema = new GraphQLSchema({
* query: MyAppQueryRootType,
* mutation: MyAppMutationRootType,
* })
* ```
*
* Note: When the schema is constructed, by default only the types that are
* reachable by traversing the root types are included, other types must be
* explicitly referenced.
*
* Example:
*
* ```ts
* const characterInterface = new GraphQLInterfaceType({
* name: 'Character',
* ...
* });
*
* const humanType = new GraphQLObjectType({
* name: 'Human',
* interfaces: [characterInterface],
* ...
* });
*
* const droidType = new GraphQLObjectType({
* name: 'Droid',
* interfaces: [characterInterface],
* ...
* });
*
* const schema = new GraphQLSchema({
* query: new GraphQLObjectType({
* name: 'Query',
* fields: {
* hero: { type: characterInterface, ... },
* }
* }),
* ...
* // Since this schema references only the `Character` interface it's
* // necessary to explicitly list the types that implement it if
* // you want them to be included in the final schema.
* types: [humanType, droidType],
* })
* ```
*
* Note: If an array of `directives` are provided to GraphQLSchema, that will be
* the exact list of directives represented and allowed. If `directives` is not
* provided then a default set of the specified directives (e.g. `@include` and
* `@skip`) will be used. If you wish to provide *additional* directives to these
* specified directives, you must explicitly declare them. Example:
*
* ```ts
* const MyAppSchema = new GraphQLSchema({
* ...
* directives: specifiedDirectives.concat([ myCustomDirective ]),
* })
* ```
*/
export declare class GraphQLSchema {
description: Maybe<string>;
extensions: Readonly<GraphQLSchemaExtensions>;
astNode: Maybe<SchemaDefinitionNode>;
extensionASTNodes: ReadonlyArray<SchemaExtensionNode>;
__validationErrors: Maybe<ReadonlyArray<GraphQLError>>;
private _queryType;
private _mutationType;
private _subscriptionType;
private _directives;
private _typeMap;
private _subTypeMap;
private _implementationsMap;
constructor(config: Readonly<GraphQLSchemaConfig>);
get [Symbol.toStringTag](): string;
getQueryType(): Maybe<GraphQLObjectType>;
getMutationType(): Maybe<GraphQLObjectType>;
getSubscriptionType(): Maybe<GraphQLObjectType>;
getRootType(operation: OperationTypeNode): Maybe<GraphQLObjectType>;
getTypeMap(): TypeMap;
getType(name: string): GraphQLNamedType | undefined;
getPossibleTypes(
abstractType: GraphQLAbstractType,
): ReadonlyArray<GraphQLObjectType>;
getImplementations(interfaceType: GraphQLInterfaceType): {
objects: ReadonlyArray<GraphQLObjectType>;
interfaces: ReadonlyArray<GraphQLInterfaceType>;
};
isSubType(
abstractType: GraphQLAbstractType,
maybeSubType: GraphQLObjectType | GraphQLInterfaceType,
): boolean;
getDirectives(): ReadonlyArray<GraphQLDirective>;
getDirective(name: string): Maybe<GraphQLDirective>;
toConfig(): GraphQLSchemaNormalizedConfig;
}
declare type TypeMap = ObjMap<GraphQLNamedType>;
export interface GraphQLSchemaValidationOptions {
/**
* When building a schema from a GraphQL service's introspection result, it
* might be safe to assume the schema is valid. Set to true to assume the
* produced schema is valid.
*
* Default: false
*/
assumeValid?: boolean;
}
export interface GraphQLSchemaConfig extends GraphQLSchemaValidationOptions {
description?: Maybe<string>;
query?: Maybe<GraphQLObjectType>;
mutation?: Maybe<GraphQLObjectType>;
subscription?: Maybe<GraphQLObjectType>;
types?: Maybe<ReadonlyArray<GraphQLNamedType>>;
directives?: Maybe<ReadonlyArray<GraphQLDirective>>;
extensions?: Maybe<Readonly<GraphQLSchemaExtensions>>;
astNode?: Maybe<SchemaDefinitionNode>;
extensionASTNodes?: Maybe<ReadonlyArray<SchemaExtensionNode>>;
}
/**
* @internal
*/
export interface GraphQLSchemaNormalizedConfig extends GraphQLSchemaConfig {
description: Maybe<string>;
types: ReadonlyArray<GraphQLNamedType>;
directives: ReadonlyArray<GraphQLDirective>;
extensions: Readonly<GraphQLSchemaExtensions>;
extensionASTNodes: ReadonlyArray<SchemaExtensionNode>;
assumeValid: boolean;
}
export {};

View File

@@ -0,0 +1,28 @@
var arrayFilter = require('./_arrayFilter'),
baseRest = require('./_baseRest'),
baseXor = require('./_baseXor'),
isArrayLikeObject = require('./isArrayLikeObject');
/**
* Creates an array of unique values that is the
* [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
* of the given arrays. The order of result values is determined by the order
* they occur in the arrays.
*
* @static
* @memberOf _
* @since 2.4.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @returns {Array} Returns the new array of filtered values.
* @see _.difference, _.without
* @example
*
* _.xor([2, 1], [2, 3]);
* // => [1, 3]
*/
var xor = baseRest(function(arrays) {
return baseXor(arrayFilter(arrays, isArrayLikeObject));
});
module.exports = xor;

View File

@@ -0,0 +1,36 @@
{
"name": "@webassemblyjs/wast-printer",
"version": "1.14.1",
"description": "WebAssembly text format printer",
"main": "lib/index.js",
"module": "esm/index.js",
"keywords": [
"webassembly",
"javascript",
"ast",
"compiler",
"printer",
"wast"
],
"scripts": {
"test": "mocha"
},
"author": "Sven Sauleau",
"license": "MIT",
"dependencies": {
"@webassemblyjs/ast": "1.14.1",
"@xtuc/long": "4.2.2"
},
"devDependencies": {
"@webassemblyjs/helper-test-framework": "1.14.1",
"@webassemblyjs/wast-parser": "1.14.1"
},
"repository": {
"type": "git",
"url": "https://github.com/xtuc/webassemblyjs.git"
},
"publishConfig": {
"access": "public"
},
"gitHead": "25d52b1296e151ac56244a7c3886661e6b4a69ea"
}

View File

@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './square-arrow-up.js';
//# sourceMappingURL=arrow-up-square.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../src/strings.ts"],"names":[],"mappings":"AAuBA,qBAAa,YAAY;IACvB,GAAG,SAAK;IACR,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,MAAM,CAA6B;IAE3C,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAStB,KAAK,IAAI,MAAM;CAIhB;AAED,qBAAa,YAAY;IACvB,GAAG,SAAK;IACR,QAAgB,MAAM,CAAS;gBAEnB,MAAM,EAAE,MAAM;IAI1B,IAAI,IAAI,MAAM;IAId,IAAI,IAAI,MAAM;IAId,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAK9B"}

View File

@@ -0,0 +1,52 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { diag } from '@opentelemetry/api';
import { ATTR_PROCESS_COMMAND, ATTR_PROCESS_COMMAND_ARGS, ATTR_PROCESS_EXECUTABLE_NAME, ATTR_PROCESS_EXECUTABLE_PATH, ATTR_PROCESS_OWNER, ATTR_PROCESS_PID, ATTR_PROCESS_RUNTIME_DESCRIPTION, ATTR_PROCESS_RUNTIME_NAME, ATTR_PROCESS_RUNTIME_VERSION, } from '../../../semconv';
import * as os from 'os';
/**
* ProcessDetector will be used to detect the resources related current process running
* and being instrumented from the NodeJS Process module.
*/
class ProcessDetector {
detect(_config) {
const attributes = {
[ATTR_PROCESS_PID]: process.pid,
[ATTR_PROCESS_EXECUTABLE_NAME]: process.title,
[ATTR_PROCESS_EXECUTABLE_PATH]: process.execPath,
[ATTR_PROCESS_COMMAND_ARGS]: [
process.argv[0],
...process.execArgv,
...process.argv.slice(1),
],
[ATTR_PROCESS_RUNTIME_VERSION]: process.versions.node,
[ATTR_PROCESS_RUNTIME_NAME]: 'nodejs',
[ATTR_PROCESS_RUNTIME_DESCRIPTION]: 'Node.js',
};
if (process.argv.length > 1) {
attributes[ATTR_PROCESS_COMMAND] = process.argv[1];
}
try {
const userInfo = os.userInfo();
attributes[ATTR_PROCESS_OWNER] = userInfo.username;
}
catch (e) {
diag.debug(`error obtaining process owner: ${e}`);
}
return { attributes };
}
}
export const processDetector = new ProcessDetector();
//# sourceMappingURL=ProcessDetector.js.map

View File

@@ -0,0 +1,9 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { differenceInCalendarDays as fn } from "../differenceInCalendarDays.js";
import { convertToFP } from "./_lib/convertToFP.js";
export const differenceInCalendarDays = convertToFP(fn, 2);
// Fallback for modularized imports:
export default differenceInCalendarDays;

View File

@@ -0,0 +1 @@
{"version":3,"file":"deepMerge.js","names":["deepMergeSimple","obj1","obj2","output","key","Object","prototype","hasOwnProperty","call","Array","isArray"],"sources":["../../src/utilities/deepMerge.ts"],"sourcesContent":["/**\n * Very simple, but fast deepMerge implementation. Only deepMerges objects, not arrays and clones everything.\n * Do not use this if your object contains any complex objects like React Components, or if you would like to combine Arrays.\n * If you only have simple objects and need a fast deepMerge, this is the function for you.\n *\n * obj2 takes precedence over obj1 - thus if obj2 has a key that obj1 also has, obj2's value will be used.\n *\n * @param obj1 base object\n * @param obj2 object to merge \"into\" obj1\n */\nexport function deepMergeSimple<T = object>(obj1: object, obj2: object): T {\n const output = { ...obj1 }\n\n for (const key in obj2) {\n if (Object.prototype.hasOwnProperty.call(obj2, key)) {\n if (typeof obj2[key] === 'object' && !Array.isArray(obj2[key]) && obj1[key]) {\n output[key] = deepMergeSimple(obj1[key], obj2[key])\n } else {\n output[key] = obj2[key]\n }\n }\n }\n\n return output as T\n}\n"],"mappings":"AAAA;;;;;;;;;GAUA,OAAO,SAASA,gBAA4BC,IAAY,EAAEC,IAAY;EACpE,MAAMC,MAAA,GAAS;IAAE,GAAGF;EAAK;EAEzB,KAAK,MAAMG,GAAA,IAAOF,IAAA,EAAM;IACtB,IAAIG,MAAA,CAAOC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACN,IAAA,EAAME,GAAA,GAAM;MACnD,IAAI,OAAOF,IAAI,CAACE,GAAA,CAAI,KAAK,YAAY,CAACK,KAAA,CAAMC,OAAO,CAACR,IAAI,CAACE,GAAA,CAAI,KAAKH,IAAI,CAACG,GAAA,CAAI,EAAE;QAC3ED,MAAM,CAACC,GAAA,CAAI,GAAGJ,eAAA,CAAgBC,IAAI,CAACG,GAAA,CAAI,EAAEF,IAAI,CAACE,GAAA,CAAI;MACpD,OAAO;QACLD,MAAM,CAACC,GAAA,CAAI,GAAGF,IAAI,CAACE,GAAA,CAAI;MACzB;IACF;EACF;EAEA,OAAOD,MAAA;AACT","ignoreList":[]}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/gel/index.ts"],"sourcesContent":["export * from './driver.ts';\nexport * from './session.ts';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,wBAAd;AACA,wBAAc,yBADd;","names":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"InvalidSchema.d.ts","sourceRoot":"","sources":["../../src/errors/InvalidSchema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,qBAAa,aAAc,SAAQ,QAAQ;gBAC7B,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG;CAG1C"}

View File

@@ -0,0 +1,10 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const instanceof_1 = __importDefault(require("../definitions/instanceof"));
const instanceofPlugin = (ajv) => ajv.addKeyword((0, instanceof_1.default)());
exports.default = instanceofPlugin;
module.exports = instanceofPlugin;
//# sourceMappingURL=instanceof.js.map

View File

@@ -0,0 +1,15 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const FlagTriangleRight = createLucideIcon("FlagTriangleRight", [
["path", { d: "M7 22V2l10 5-10 5", key: "17n18y" }]
]);
export { FlagTriangleRight as default };
//# sourceMappingURL=flag-triangle-right.js.map

View File

@@ -0,0 +1,3 @@
export { cs } from '@payloadcms/translations/languages/cs';
//# sourceMappingURL=cs.js.map

View File

@@ -0,0 +1,59 @@
import type { AnthropicAiOptions } from '@sentry/core';
export declare const instrumentAnthropicAi: ((options?: AnthropicAiOptions | undefined) => import("@opentelemetry/instrumentation").Instrumentation<import("@opentelemetry/instrumentation").InstrumentationConfig>) & {
id: string;
};
/**
* Adds Sentry tracing instrumentation for the Anthropic AI SDK.
*
* This integration is enabled by default.
*
* When configured, this integration automatically instruments Anthropic AI SDK client instances
* to capture telemetry data following OpenTelemetry Semantic Conventions for Generative AI.
*
* @example
* ```javascript
* import * as Sentry from '@sentry/node';
*
* Sentry.init({
* integrations: [Sentry.anthropicAIIntegration()],
* });
* ```
*
* ## Options
*
* - `recordInputs`: Whether to record prompt messages (default: respects `sendDefaultPii` client option)
* - `recordOutputs`: Whether to record response text (default: respects `sendDefaultPii` client option)
*
* ### Default Behavior
*
* By default, the integration will:
* - Record inputs and outputs ONLY if `sendDefaultPii` is set to `true` in your Sentry client options
* - Otherwise, inputs and outputs are NOT recorded unless explicitly enabled
*
* @example
* ```javascript
* // Record inputs and outputs when sendDefaultPii is false
* Sentry.init({
* integrations: [
* Sentry.anthropicAIIntegration({
* recordInputs: true,
* recordOutputs: true
* })
* ],
* });
*
* // Never record inputs/outputs regardless of sendDefaultPii
* Sentry.init({
* sendDefaultPii: true,
* integrations: [
* Sentry.anthropicAIIntegration({
* recordInputs: false,
* recordOutputs: false
* })
* ],
* });
* ```
*
*/
export declare const anthropicAIIntegration: (options?: AnthropicAiOptions | undefined) => import("@sentry/core").Integration;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,106 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var datetime_exports = {};
__export(datetime_exports, {
SingleStoreDateTime: () => SingleStoreDateTime,
SingleStoreDateTimeBuilder: () => SingleStoreDateTimeBuilder,
SingleStoreDateTimeString: () => SingleStoreDateTimeString,
SingleStoreDateTimeStringBuilder: () => SingleStoreDateTimeStringBuilder,
datetime: () => datetime
});
module.exports = __toCommonJS(datetime_exports);
var import_entity = require("../../entity.cjs");
var import_utils = require("../../utils.cjs");
var import_common = require("./common.cjs");
class SingleStoreDateTimeBuilder extends import_common.SingleStoreColumnBuilder {
/** @internal */
// TODO: we need to add a proper support for SingleStore
generatedAlwaysAs(_as, _config) {
throw new Error("Method not implemented.");
}
static [import_entity.entityKind] = "SingleStoreDateTimeBuilder";
constructor(name) {
super(name, "date", "SingleStoreDateTime");
}
/** @internal */
build(table) {
return new SingleStoreDateTime(
table,
this.config
);
}
}
class SingleStoreDateTime extends import_common.SingleStoreColumn {
static [import_entity.entityKind] = "SingleStoreDateTime";
constructor(table, config) {
super(table, config);
}
getSQLType() {
return `datetime`;
}
mapToDriverValue(value) {
return value.toISOString().replace("T", " ").replace("Z", "");
}
mapFromDriverValue(value) {
return /* @__PURE__ */ new Date(value.replace(" ", "T") + "Z");
}
}
class SingleStoreDateTimeStringBuilder extends import_common.SingleStoreColumnBuilder {
/** @internal */
// TODO: we need to add a proper support for SingleStore
generatedAlwaysAs(_as, _config) {
throw new Error("Method not implemented.");
}
static [import_entity.entityKind] = "SingleStoreDateTimeStringBuilder";
constructor(name) {
super(name, "string", "SingleStoreDateTimeString");
}
/** @internal */
build(table) {
return new SingleStoreDateTimeString(
table,
this.config
);
}
}
class SingleStoreDateTimeString extends import_common.SingleStoreColumn {
static [import_entity.entityKind] = "SingleStoreDateTimeString";
constructor(table, config) {
super(table, config);
}
getSQLType() {
return `datetime`;
}
}
function datetime(a, b) {
const { name, config } = (0, import_utils.getColumnNameAndConfig)(a, b);
if (config?.mode === "string") {
return new SingleStoreDateTimeStringBuilder(name);
}
return new SingleStoreDateTimeBuilder(name);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
SingleStoreDateTime,
SingleStoreDateTimeBuilder,
SingleStoreDateTimeString,
SingleStoreDateTimeStringBuilder,
datetime
});
//# sourceMappingURL=datetime.cjs.map

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B zC"},B:{"1":"0 1 2 3 4 5 6 7 8 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I"},C:{"1":"0 1 2 3 4 5 6 7 8 EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C","2":"9 0C VC J bB K D E F A B C L M G N O P cB AB BB CB DB 4C 5C"},D:{"1":"0 1 2 3 4 5 6 7 8 sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC","2":"9 J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB"},E:{"1":"E F A B C L M G 9C AD cC PC QC BD CD DD dC eC RC ED SC fC gC hC iC jC FD TC kC lC mC nC oC GD UC pC qC rC sC HD tC uC vC wC ID","2":"J bB K D 6C bC 7C 8C"},F:{"1":"0 1 2 3 4 5 6 7 8 fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"9 F B C G N O P cB AB BB CB DB EB FB GB HB IB dB eB JD KD LD MD PC xC ND QC"},G:{"1":"E SD TD UD VD WD XD YD ZD aD bD cD dD eD fD gD hD dC eC RC iD SC fC gC hC iC jC jD TC kC lC mC nC oC kD UC pC qC rC sC lD tC uC vC wC","2":"bC OD yC PD QD RD"},H:{"2":"mD"},I:{"1":"I","2":"VC J nD oD pD qD yC rD sD"},J:{"2":"D","16":"A"},K:{"1":"H","2":"A B C PC xC QC"},L:{"1":"I"},M:{"1":"OC"},N:{"2":"A B"},O:{"1":"RC"},P:{"1":"9 AB BB CB DB EB FB GB HB IB tD uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D","2":"J"},Q:{"1":"4D"},R:{"1":"5D"},S:{"1":"6D 7D"}},B:6,C:"Array.prototype.findIndex",D:true};

View File

@@ -0,0 +1,70 @@
import { jsx as _jsx } from "react/jsx-runtime";
import { PayloadIcon } from '@payloadcms/ui/shared';
import fs from 'fs/promises';
import { ImageResponse } from 'next/og.js';
import path from 'path';
import React from 'react';
import { fileURLToPath } from 'url';
import { OGImage } from './image.js';
const filename = fileURLToPath(import.meta.url);
const dirname = path.dirname(filename);
export const runtime = 'nodejs';
export const contentType = 'image/png';
export const generateOGImage = async req => {
const config = req.payload.config;
if (config.admin.meta.defaultOGImageType === 'off') {
return Response.json({
error: `Open Graph images are disabled`
}, {
status: 400
});
}
try {
const {
searchParams
} = new URL(req.url);
const hasTitle = searchParams.has('title');
const title = hasTitle ? searchParams.get('title')?.slice(0, 100) : '';
const hasLeader = searchParams.has('leader');
const leader = hasLeader ? searchParams.get('leader')?.slice(0, 100).replace('-', ' ') : '';
const description = searchParams.has('description') ? searchParams.get('description') : '';
let fontData;
try {
// TODO: replace with `.woff2` file when supported
// See https://github.com/vercel/next.js/issues/63935
// Or better yet, use a CDN like Google Fonts if ever supported
fontData = fs.readFile(path.join(dirname, 'roboto-regular.woff'));
} catch (e) {
req.payload.logger.error(`Error reading font file or not readable: ${e.message}`);
}
const fontFamily = 'Roboto, sans-serif';
return new ImageResponse(/*#__PURE__*/_jsx(OGImage, {
description: description,
Fallback: PayloadIcon,
fontFamily: fontFamily,
Icon: config.admin?.components?.graphics?.Icon,
importMap: req.payload.importMap,
leader: leader,
title: title
}), {
...(fontData ? {
fonts: [{
name: 'Roboto',
data: await fontData,
style: 'normal',
weight: 400
}]
} : {}),
height: 630,
width: 1200
});
} catch (e) {
req.payload.logger.error(`Error generating Open Graph image: ${e.message}`);
return Response.json({
error: `Internal Server Error: ${e.message}`
}, {
status: 500
});
}
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,70 @@
import { entityKind } from "../../entity.js";
import { MySqlColumn, MySqlColumnBuilder } from "./common.js";
class MySqlEnumColumnBuilder extends MySqlColumnBuilder {
static [entityKind] = "MySqlEnumColumnBuilder";
constructor(name, values) {
super(name, "string", "MySqlEnumColumn");
this.config.enumValues = values;
}
/** @internal */
build(table) {
return new MySqlEnumColumn(
table,
this.config
);
}
}
class MySqlEnumColumn extends MySqlColumn {
static [entityKind] = "MySqlEnumColumn";
enumValues = this.config.enumValues;
getSQLType() {
return `enum(${this.enumValues.map((value) => `'${value}'`).join(",")})`;
}
}
class MySqlEnumObjectColumnBuilder extends MySqlColumnBuilder {
static [entityKind] = "MySqlEnumObjectColumnBuilder";
constructor(name, values) {
super(name, "string", "MySqlEnumObjectColumn");
this.config.enumValues = values;
}
/** @internal */
build(table) {
return new MySqlEnumObjectColumn(
table,
this.config
);
}
}
class MySqlEnumObjectColumn extends MySqlColumn {
static [entityKind] = "MySqlEnumObjectColumn";
enumValues = this.config.enumValues;
getSQLType() {
return `enum(${this.enumValues.map((value) => `'${value}'`).join(",")})`;
}
}
function mysqlEnum(a, b) {
if (typeof a === "string" && Array.isArray(b) || Array.isArray(a)) {
const name = typeof a === "string" && a.length > 0 ? a : "";
const values = (typeof a === "string" ? b : a) ?? [];
if (values.length === 0) {
throw new Error(`You have an empty array for "${name}" enum values`);
}
return new MySqlEnumColumnBuilder(name, values);
}
if (typeof a === "string" && typeof b === "object" || typeof a === "object") {
const name = typeof a === "object" ? "" : a;
const values = typeof a === "object" ? Object.values(a) : typeof b === "object" ? Object.values(b) : [];
if (values.length === 0) {
throw new Error(`You have an empty array for "${name}" enum values`);
}
return new MySqlEnumObjectColumnBuilder(name, values);
}
}
export {
MySqlEnumColumn,
MySqlEnumColumnBuilder,
MySqlEnumObjectColumn,
MySqlEnumObjectColumnBuilder,
mysqlEnum
};
//# sourceMappingURL=enum.js.map

View File

@@ -0,0 +1,81 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Jarid Margolin @jaridmargolin
*/
"use strict";
const inspect = require("util").inspect.custom;
const makeSerializable = require("./util/makeSerializable");
/** @typedef {import("./Chunk")} Chunk */
/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */
/** @typedef {import("./Module")} Module */
/** @typedef {import("./serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */
/** @typedef {import("./serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */
class WebpackError extends Error {
/**
* Creates an instance of WebpackError.
* @param {string=} message error message
* @param {{ cause?: unknown }} options error options
*/
constructor(message, options = {}) {
super(message, options);
/** @type {string=} */
this.details = undefined;
/** @type {(Module | null)=} */
this.module = undefined;
/** @type {DependencyLocation=} */
this.loc = undefined;
/** @type {boolean=} */
this.hideStack = undefined;
/** @type {Chunk=} */
this.chunk = undefined;
/** @type {string=} */
this.file = undefined;
}
/**
* @returns {string} inspect message
*/
[inspect]() {
return (
this.stack +
(this.details ? `\n${this.details}` : "") +
(this.cause ? `\n${this.cause}` : "")
);
}
/**
* @param {ObjectSerializerContext} context context
*/
serialize({ write }) {
write(this.name);
write(this.message);
write(this.stack);
write(this.cause);
write(this.details);
write(this.loc);
write(this.hideStack);
}
/**
* @param {ObjectDeserializerContext} context context
*/
deserialize({ read }) {
this.name = read();
this.message = read();
this.stack = read();
this.cause = read();
this.details = read();
this.loc = read();
this.hideStack = read();
}
}
makeSerializable(WebpackError, "webpack/lib/WebpackError");
/** @type {typeof WebpackError} */
module.exports = WebpackError;

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/libsql/driver-core.ts"],"sourcesContent":["import type { Client, ResultSet } from '@libsql/client';\nimport type { BatchItem, BatchResponse } from '~/batch.ts';\nimport { entityKind } from '~/entity.ts';\nimport { DefaultLogger } from '~/logger.ts';\nimport {\n\tcreateTableRelationsHelpers,\n\textractTablesRelationalConfig,\n\ttype ExtractTablesWithRelations,\n\ttype RelationalSchemaConfig,\n\ttype TablesRelationalConfig,\n} from '~/relations.ts';\nimport { BaseSQLiteDatabase } from '~/sqlite-core/db.ts';\nimport { SQLiteAsyncDialect } from '~/sqlite-core/dialect.ts';\nimport type { DrizzleConfig } from '~/utils.ts';\nimport { LibSQLSession } from './session.ts';\n\nexport class LibSQLDatabase<\n\tTSchema extends Record<string, unknown> = Record<string, never>,\n> extends BaseSQLiteDatabase<'async', ResultSet, TSchema> {\n\tstatic override readonly [entityKind]: string = 'LibSQLDatabase';\n\n\t/** @internal */\n\tdeclare readonly session: LibSQLSession<TSchema, ExtractTablesWithRelations<TSchema>>;\n\n\tasync batch<U extends BatchItem<'sqlite'>, T extends Readonly<[U, ...U[]]>>(\n\t\tbatch: T,\n\t): Promise<BatchResponse<T>> {\n\t\treturn this.session.batch(batch) as Promise<BatchResponse<T>>;\n\t}\n}\n\n/** @internal */\nexport function construct<\n\tTSchema extends Record<string, unknown> = Record<string, never>,\n>(client: Client, config: DrizzleConfig<TSchema> = {}): LibSQLDatabase<TSchema> & {\n\t$client: Client;\n} {\n\tconst dialect = new SQLiteAsyncDialect({ casing: config.casing });\n\tlet logger;\n\tif (config.logger === true) {\n\t\tlogger = new DefaultLogger();\n\t} else if (config.logger !== false) {\n\t\tlogger = config.logger;\n\t}\n\n\tlet schema: RelationalSchemaConfig<TablesRelationalConfig> | undefined;\n\tif (config.schema) {\n\t\tconst tablesConfig = extractTablesRelationalConfig(\n\t\t\tconfig.schema,\n\t\t\tcreateTableRelationsHelpers,\n\t\t);\n\t\tschema = {\n\t\t\tfullSchema: config.schema,\n\t\t\tschema: tablesConfig.tables,\n\t\t\ttableNamesMap: tablesConfig.tableNamesMap,\n\t\t};\n\t}\n\n\tconst session = new LibSQLSession(client, dialect, schema, { logger, cache: config.cache }, undefined);\n\tconst db = new LibSQLDatabase('async', dialect, session, schema) as LibSQLDatabase<TSchema>;\n\t(<any> db).$client = client;\n\t(<any> db).$cache = config.cache;\n\tif ((<any> db).$cache) {\n\t\t(<any> db).$cache['invalidate'] = config.cache?.onMutate;\n\t}\n\treturn db as any;\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAC9B;AAAA,EACC;AAAA,EACA;AAAA,OAIM;AACP,SAAS,0BAA0B;AACnC,SAAS,0BAA0B;AAEnC,SAAS,qBAAqB;AAEvB,MAAM,uBAEH,mBAAgD;AAAA,EACzD,QAA0B,UAAU,IAAY;AAAA,EAKhD,MAAM,MACL,OAC4B;AAC5B,WAAO,KAAK,QAAQ,MAAM,KAAK;AAAA,EAChC;AACD;AAGO,SAAS,UAEd,QAAgB,SAAiC,CAAC,GAElD;AACD,QAAM,UAAU,IAAI,mBAAmB,EAAE,QAAQ,OAAO,OAAO,CAAC;AAChE,MAAI;AACJ,MAAI,OAAO,WAAW,MAAM;AAC3B,aAAS,IAAI,cAAc;AAAA,EAC5B,WAAW,OAAO,WAAW,OAAO;AACnC,aAAS,OAAO;AAAA,EACjB;AAEA,MAAI;AACJ,MAAI,OAAO,QAAQ;AAClB,UAAM,eAAe;AAAA,MACpB,OAAO;AAAA,MACP;AAAA,IACD;AACA,aAAS;AAAA,MACR,YAAY,OAAO;AAAA,MACnB,QAAQ,aAAa;AAAA,MACrB,eAAe,aAAa;AAAA,IAC7B;AAAA,EACD;AAEA,QAAM,UAAU,IAAI,cAAc,QAAQ,SAAS,QAAQ,EAAE,QAAQ,OAAO,OAAO,MAAM,GAAG,MAAS;AACrG,QAAM,KAAK,IAAI,eAAe,SAAS,SAAS,SAAS,MAAM;AAC/D,EAAO,GAAI,UAAU;AACrB,EAAO,GAAI,SAAS,OAAO;AAC3B,MAAW,GAAI,QAAQ;AACtB,IAAO,GAAI,OAAO,YAAY,IAAI,OAAO,OAAO;AAAA,EACjD;AACA,SAAO;AACR;","names":[]}

View File

@@ -0,0 +1,37 @@
/**
* This is a copy of the Vercel AI integration from the node SDK.
*
* The only difference is that it does not use `@opentelemetry/instrumentation`
* because Cloudflare Workers do not support it.
*
* Therefore, we cannot automatically patch setting `experimental_telemetry: { isEnabled: true }`
* and users have to manually set this to get spans.
*/
/**
* Adds Sentry tracing instrumentation for the [ai](https://www.npmjs.com/package/ai) library.
* This integration is not enabled by default, you need to manually add it.
*
* For more information, see the [`ai` documentation](https://sdk.vercel.ai/docs/ai-sdk-core/telemetry).
*
* You need to enable collecting spans for a specific call by setting
* `experimental_telemetry.isEnabled` to `true` in the first argument of the function call.
*
* ```javascript
* const result = await generateText({
* model: openai('gpt-4-turbo'),
* experimental_telemetry: { isEnabled: true },
* });
* ```
*
* If you want to collect inputs and outputs for a specific call, you must specifically opt-in to each
* function call by setting `experimental_telemetry.recordInputs` and `experimental_telemetry.recordOutputs`
* to `true`.
*
* ```javascript
* const result = await generateText({
* model: openai('gpt-4-turbo'),
* experimental_telemetry: { isEnabled: true, recordInputs: true, recordOutputs: true },
* });
*/
export declare const vercelAIIntegration: () => import("@sentry/core").Integration;
//# sourceMappingURL=vercelai.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"isRowCollapsed.js","names":["isRowCollapsed","collapsedPrefs","field","previousRow","row","collapsed","undefined","includes","id","admin","initCollapsed"],"sources":["../../../src/forms/fieldSchemasToFormState/isRowCollapsed.ts"],"sourcesContent":["import type { ArrayField, BlocksField, CollapsedPreferences, Row } from 'payload'\n\nexport function isRowCollapsed({\n collapsedPrefs,\n field,\n previousRow,\n row,\n}: {\n collapsedPrefs: CollapsedPreferences\n field: ArrayField | BlocksField\n previousRow: Row | undefined\n row: Row\n}): boolean {\n if (previousRow && 'collapsed' in previousRow) {\n return previousRow.collapsed ?? false\n }\n\n // If previousFormState is `undefined`, check preferences\n if (collapsedPrefs !== undefined) {\n return collapsedPrefs.includes(row.id) // Check if collapsed in preferences\n }\n\n // If neither exists, fallback to `field.admin.initCollapsed`\n return field.admin.initCollapsed\n}\n"],"mappings":"AAEA,OAAO,SAASA,eAAe;EAC7BC,cAAc;EACdC,KAAK;EACLC,WAAW;EACXC;AAAG,CAMJ;EACC,IAAID,WAAA,IAAe,eAAeA,WAAA,EAAa;IAC7C,OAAOA,WAAA,CAAYE,SAAS,IAAI;EAClC;EAEA;EACA,IAAIJ,cAAA,KAAmBK,SAAA,EAAW;IAChC,OAAOL,cAAA,CAAeM,QAAQ,CAACH,GAAA,CAAII,EAAE,EAAE;AAAA;EACzC;EAEA;EACA,OAAON,KAAA,CAAMO,KAAK,CAACC,aAAa;AAClC","ignoreList":[]}

View File

@@ -0,0 +1,5 @@
export declare const ClipboardActionLabel: ({ isPaste, isRow, }: {
isPaste?: boolean;
isRow?: boolean;
}) => import("react").JSX.Element;
//# sourceMappingURL=ClipboardActionLabel.d.ts.map

View File

@@ -0,0 +1,4 @@
'use strict';
const ansiRegex = require('ansi-regex');
module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string;

View File

@@ -0,0 +1,31 @@
import { Event, StackFrame } from '@sentry/core';
export declare const MAX_CONTEXTLINES_COLNO: number;
export declare const MAX_CONTEXTLINES_LINENO: number;
interface ContextLinesOptions {
/**
* Sets the number of context lines for each frame when loading a file.
* Defaults to 7.
*
* Set to 0 to disable loading and inclusion of source files.
**/
frameContextLines?: number;
}
/**
* Exported for testing purposes.
*/
export declare function resetFileContentCache(): void;
/**
* Resolves context lines before and after the given line number and appends them to the frame;
*/
export declare function addContextToFrame(lineno: number, frame: StackFrame, contextLines: number, contents: Record<number, string> | undefined): void;
/** Exported only for tests, as a type-safe variant. */
export declare const _contextLinesIntegration: (options?: ContextLinesOptions) => {
name: string;
processEvent(event: Event): Promise<Event>;
};
/**
* Capture the lines before and after the frame's context.
*/
export declare const contextLinesIntegration: (options?: ContextLinesOptions | undefined) => import("@sentry/core").Integration;
export {};
//# sourceMappingURL=contextlines.d.ts.map

View File

@@ -0,0 +1,145 @@
// Copyright 2012 The Obvious Corporation.
/*
* bits: Bitwise buffer utilities. The utilities here treat a buffer
* as a little-endian bigint, so the lowest-order bit is bit #0 of
* `buffer[0]`, and the highest-order bit is bit #7 of
* `buffer[buffer.length - 1]`.
*/
/*
* Modules used
*/
"use strict";
/*
* Exported bindings
*/
/**
* Extracts the given number of bits from the buffer at the indicated
* index, returning a simple number as the result. If bits are requested
* that aren't covered by the buffer, the `defaultBit` is used as their
* value.
*
* The `bitLength` must be no more than 32. The `defaultBit` if not
* specified is taken to be `0`.
*/
export function extract(buffer, bitIndex, bitLength, defaultBit) {
if (bitLength < 0 || bitLength > 32) {
throw new Error("Bad value for bitLength.");
}
if (defaultBit === undefined) {
defaultBit = 0;
} else if (defaultBit !== 0 && defaultBit !== 1) {
throw new Error("Bad value for defaultBit.");
}
var defaultByte = defaultBit * 0xff;
var result = 0; // All starts are inclusive. The {endByte, endBit} pair is exclusive, but
// if endBit !== 0, then endByte is inclusive.
var lastBit = bitIndex + bitLength;
var startByte = Math.floor(bitIndex / 8);
var startBit = bitIndex % 8;
var endByte = Math.floor(lastBit / 8);
var endBit = lastBit % 8;
if (endBit !== 0) {
// `(1 << endBit) - 1` is the mask of all bits up to but not including
// the endBit.
result = get(endByte) & (1 << endBit) - 1;
}
while (endByte > startByte) {
endByte--;
result = result << 8 | get(endByte);
}
result >>>= startBit;
return result;
function get(index) {
var result = buffer[index];
return result === undefined ? defaultByte : result;
}
}
/**
* Injects the given bits into the given buffer at the given index. Any
* bits in the value beyond the length to set are ignored.
*/
export function inject(buffer, bitIndex, bitLength, value) {
if (bitLength < 0 || bitLength > 32) {
throw new Error("Bad value for bitLength.");
}
var lastByte = Math.floor((bitIndex + bitLength - 1) / 8);
if (bitIndex < 0 || lastByte >= buffer.length) {
throw new Error("Index out of range.");
} // Just keeping it simple, until / unless profiling shows that this
// is a problem.
var atByte = Math.floor(bitIndex / 8);
var atBit = bitIndex % 8;
while (bitLength > 0) {
if (value & 1) {
buffer[atByte] |= 1 << atBit;
} else {
buffer[atByte] &= ~(1 << atBit);
}
value >>= 1;
bitLength--;
atBit = (atBit + 1) % 8;
if (atBit === 0) {
atByte++;
}
}
}
/**
* Gets the sign bit of the given buffer.
*/
export function getSign(buffer) {
return buffer[buffer.length - 1] >>> 7;
}
/**
* Gets the zero-based bit number of the highest-order bit with the
* given value in the given buffer.
*
* If the buffer consists entirely of the other bit value, then this returns
* `-1`.
*/
export function highOrder(bit, buffer) {
var length = buffer.length;
var fullyWrongByte = (bit ^ 1) * 0xff; // the other-bit extended to a full byte
while (length > 0 && buffer[length - 1] === fullyWrongByte) {
length--;
}
if (length === 0) {
// Degenerate case. The buffer consists entirely of ~bit.
return -1;
}
var byteToCheck = buffer[length - 1];
var result = length * 8 - 1;
for (var i = 7; i > 0; i--) {
if ((byteToCheck >> i & 1) === bit) {
break;
}
result--;
}
return result;
}

View File

@@ -0,0 +1,13 @@
export { columnToCodeConverter } from '../sqlite/columnToCodeConverter.js';
export { countDistinct } from '../sqlite/countDistinct.js';
export { convertPathToJSONTraversal } from '../sqlite/createJSONQuery/convertPathToJSONTraversal.js';
export { createJSONQuery } from '../sqlite/createJSONQuery/index.js';
export { defaultDrizzleSnapshot } from '../sqlite/defaultSnapshot.js';
export { deleteWhere } from '../sqlite/deleteWhere.js';
export { dropDatabase } from '../sqlite/dropDatabase.js';
export { execute } from '../sqlite/execute.js';
export { init } from '../sqlite/init.js';
export { insert } from '../sqlite/insert.js';
export { requireDrizzleKit } from '../sqlite/requireDrizzleKit.js';
export * from '../sqlite/types.js';
//# sourceMappingURL=sqlite.d.ts.map

View File

@@ -0,0 +1,56 @@
import areInputsEqual from './are-inputs-equal';
export type EqualityFn<TFunc extends (...args: any[]) => any> = (
newArgs: Parameters<TFunc>,
lastArgs: Parameters<TFunc>,
) => boolean;
export type MemoizedFn<TFunc extends (this: any, ...args: any[]) => any> = {
clear: () => void;
(this: ThisParameterType<TFunc>, ...args: Parameters<TFunc>): ReturnType<TFunc>;
};
// internal type
type Cache<TFunc extends (this: any, ...args: any[]) => any> = {
lastThis: ThisParameterType<TFunc>;
lastArgs: Parameters<TFunc>;
lastResult: ReturnType<TFunc>;
};
function memoizeOne<TFunc extends (this: any, ...newArgs: any[]) => any>(
resultFn: TFunc,
isEqual: EqualityFn<TFunc> = areInputsEqual,
): MemoizedFn<TFunc> {
let cache: Cache<TFunc> | null = null;
// breaking cache when context (this) or arguments change
function memoized(
this: ThisParameterType<TFunc>,
...newArgs: Parameters<TFunc>
): ReturnType<TFunc> {
if (cache && cache.lastThis === this && isEqual(newArgs, cache.lastArgs)) {
return cache.lastResult;
}
// Throwing during an assignment aborts the assignment: https://codepen.io/alexreardon/pen/RYKoaz
// Doing the lastResult assignment first so that if it throws
// the cache will not be overwritten
const lastResult = resultFn.apply(this, newArgs);
cache = {
lastResult,
lastArgs: newArgs,
lastThis: this,
};
return lastResult;
}
// Adding the ability to clear the cache of a memoized function
memoized.clear = function clear() {
cache = null;
};
return memoized;
}
export default memoizeOne;

View File

@@ -0,0 +1,10 @@
"use strict";
exports.setMonth = void 0;
var _index = require("../setMonth.js");
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const setMonth = (exports.setMonth = (0, _index2.convertToFP)(
_index.setMonth,
2,
));

View File

@@ -0,0 +1,12 @@
import { Parser } from "../Parser.js";
import type { ParseFlags, ParseResult } from "../types.js";
export declare class TimestampSecondsParser extends Parser<number> {
priority: number;
parse(dateString: string): ParseResult<number>;
set<DateType extends Date>(
date: DateType,
_flags: ParseFlags,
value: number,
): [DateType, ParseFlags];
incompatibleTokens: "*";
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"sun-moon.js","sources":["../../../src/icons/sun-moon.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SunMoon\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgOGEyLjgzIDIuODMgMCAwIDAgNCA0IDQgNCAwIDEgMS00LTQiIC8+CiAgPHBhdGggZD0iTTEyIDJ2MiIgLz4KICA8cGF0aCBkPSJNMTIgMjB2MiIgLz4KICA8cGF0aCBkPSJtNC45IDQuOSAxLjQgMS40IiAvPgogIDxwYXRoIGQ9Im0xNy43IDE3LjcgMS40IDEuNCIgLz4KICA8cGF0aCBkPSJNMiAxMmgyIiAvPgogIDxwYXRoIGQ9Ik0yMCAxMmgyIiAvPgogIDxwYXRoIGQ9Im02LjMgMTcuNy0xLjQgMS40IiAvPgogIDxwYXRoIGQ9Im0xOS4xIDQuOS0xLjQgMS40IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/sun-moon\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst SunMoon = createLucideIcon('SunMoon', [\n ['path', { d: 'M12 8a2.83 2.83 0 0 0 4 4 4 4 0 1 1-4-4', key: '1fu5g2' }],\n ['path', { d: 'M12 2v2', key: 'tus03m' }],\n ['path', { d: 'M12 20v2', key: '1lh1kg' }],\n ['path', { d: 'm4.9 4.9 1.4 1.4', key: 'b9915j' }],\n ['path', { d: 'm17.7 17.7 1.4 1.4', key: 'qc3ed3' }],\n ['path', { d: 'M2 12h2', key: '1t8f8n' }],\n ['path', { d: 'M20 12h2', key: '1q8mjw' }],\n ['path', { d: 'm6.3 17.7-1.4 1.4', key: '5gca6' }],\n ['path', { d: 'm19.1 4.9-1.4 1.4', key: 'wpu9u6' }],\n]);\n\nexport default SunMoon;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAoB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACjD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAsB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACnD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAqB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,SAAS,CAAA,CAAA;AAAA,CAAA,CACjD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAqB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACpD,CAAC,CAAA,CAAA;;"}

Some files were not shown because too many files have changed in this diff Show More