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,7 @@
import type { ErrorObject } from "../types";
export default class ValidationError extends Error {
readonly errors: Partial<ErrorObject>[];
readonly ajv: true;
readonly validation: true;
constructor(errors: Partial<ErrorObject>[]);
}

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9saWIvZXhhY3QvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEFueVJlY29yZCB9IGZyb20gXCIuLi9hbnktcmVjb3JkXCI7XG5pbXBvcnQgeyBJc05ldmVyIH0gZnJvbSBcIi4uL2lzLW5ldmVyXCI7XG5cbnR5cGUgSXNVbmlvbjxUVW5pb24+ID0gVW5pb25Ub1R1cGxlPFRVbmlvbj5bXCJsZW5ndGhcIl0gZXh0ZW5kcyAxID8gZmFsc2UgOiB0cnVlO1xuXG50eXBlIFVuaW9uVG9GdW5jdGlvbkluc2VydGlvbjxUVW5pb24+ID0gKFRVbmlvbiBleHRlbmRzIGFueSA/IChhcmc6ICgpID0+IFRVbmlvbikgPT4gYW55IDogbmV2ZXIpIGV4dGVuZHMgKFxuICBhcmc6IGluZmVyIFRQYXJhbSxcbikgPT4gYW55XG4gID8gVFBhcmFtXG4gIDogbmV2ZXI7XG5cbnR5cGUgVW5pb25Ub1R1cGxlPFRVbmlvbj4gPSBVbmlvblRvRnVuY3Rpb25JbnNlcnRpb248VFVuaW9uPiBleHRlbmRzICgpID0+IGluZmVyIFRSZXR1cm5UeXBlXG4gID8gWy4uLlVuaW9uVG9UdXBsZTxFeGNsdWRlPFRVbmlvbiwgVFJldHVyblR5cGU+PiwgVFJldHVyblR5cGVdXG4gIDogW107XG5cbnR5cGUgRXhhY3RVbmlvbkxlbmd0aDxcbiAgVFZhbHVlLFxuICBUU2hhcGUsXG4gIFRWYWx1ZUxlbmd0aCA9IFVuaW9uVG9UdXBsZTxUVmFsdWU+W1wibGVuZ3RoXCJdLFxuICBUU2hhcGVMZW5ndGggPSBVbmlvblRvVHVwbGU8VFNoYXBlPltcImxlbmd0aFwiXSxcbj4gPSBUVmFsdWVMZW5ndGggZXh0ZW5kcyBUU2hhcGVMZW5ndGggPyB0cnVlIDogZmFsc2U7XG5cbnR5cGUgWG9yPFQsIFU+ID0gVCBleHRlbmRzIHRydWUgPyAoVSBleHRlbmRzIHRydWUgPyB0cnVlIDogZmFsc2UpIDogVSBleHRlbmRzIGZhbHNlID8gdHJ1ZSA6IGZhbHNlO1xuXG50eXBlIEFuZDxUVHVwbGU+ID0gVFR1cGxlIGV4dGVuZHMgW2luZmVyIEhlYWQsIC4uLmluZmVyIFJlc3RdXG4gID8gSGVhZCBleHRlbmRzIHRydWVcbiAgICA/IEFuZDxSZXN0PlxuICAgIDogZmFsc2VcbiAgOiBUVHVwbGUgZXh0ZW5kcyBbXVxuICA/IHRydWVcbiAgOiBmYWxzZTtcblxudHlwZSBPYmplY3RLZXlFeGFjdDxUVmFsdWUsIFRTaGFwZT4gPSBBbmQ8XG4gIFtJc05ldmVyPEV4Y2x1ZGU8a2V5b2YgVFZhbHVlLCBrZXlvZiBUU2hhcGU+PiwgSXNOZXZlcjxFeGNsdWRlPGtleW9mIFRTaGFwZSwga2V5b2YgVFZhbHVlPj5dXG4+O1xuXG50eXBlIE9iamVjdFZhbHVlRGlmZjxUVmFsdWUsIFRTaGFwZT4gPSB7XG4gIFtUS2V5IGluIGtleW9mIFRWYWx1ZV06IEV4Y2x1ZGU8VFZhbHVlW1RLZXldLCBUU2hhcGVbVEtleSAmIGtleW9mIFRTaGFwZV0+O1xufVtrZXlvZiBUVmFsdWVdO1xuXG50eXBlIE9iamVjdFZhbHVlRXhhY3Q8VFZhbHVlLCBUU2hhcGU+ID0gQW5kPFxuICBbSXNOZXZlcjxPYmplY3RWYWx1ZURpZmY8VFZhbHVlLCBUU2hhcGU+PiwgSXNOZXZlcjxPYmplY3RWYWx1ZURpZmY8VFNoYXBlLCBUVmFsdWU+Pl1cbj47XG5cbnR5cGUgT2JqZWN0RXhhY3Q8VFZhbHVlLCBUU2hhcGU+ID0gW1RWYWx1ZV0gZXh0ZW5kcyBbVFNoYXBlXVxuICA/IEFuZDxcbiAgICAgIFtcbiAgICAgICAgWG9yPElzVW5pb248VFZhbHVlPiwgSXNVbmlvbjxUU2hhcGU+PixcbiAgICAgICAgRXhhY3RVbmlvbkxlbmd0aDxUVmFsdWUsIFRTaGFwZT4sXG4gICAgICAgIE9iamVjdEtleUV4YWN0PFRWYWx1ZSwgVFNoYXBlPixcbiAgICAgICAgT2JqZWN0VmFsdWVFeGFjdDxUVmFsdWUsIFRTaGFwZT4sXG4gICAgICBdXG4gICAgPiBleHRlbmRzIHRydWVcbiAgICA/IFRWYWx1ZVxuICAgIDogbmV2ZXJcbiAgOiBuZXZlcjtcblxudHlwZSBJc0FycmF5PFRWYWx1ZT4gPSBbVFZhbHVlXSBleHRlbmRzIFtyZWFkb25seSBhbnlbXV0gPyB0cnVlIDogZmFsc2U7XG5cbnR5cGUgSXNSZWFkb25seTxUQXJyYXk+ID0gUmVhZG9ubHk8VEFycmF5PiBleHRlbmRzIFRBcnJheSA/IHRydWUgOiBmYWxzZTtcblxudHlwZSBTYW1lTGVuZ3RoPFRWYWx1ZSBleHRlbmRzIHJlYWRvbmx5IGFueVtdLCBUU2hhcGUgZXh0ZW5kcyByZWFkb25seSBhbnlbXT4gPSBJc05ldmVyPFxuICBQcmltaXRpdmVFeGFjdDxUVmFsdWVbXCJsZW5ndGhcIl0sIFRTaGFwZVtcImxlbmd0aFwiXT5cbj4gZXh0ZW5kcyB0cnVlXG4gID8gZmFsc2VcbiAgOiB0cnVlO1xuXG50eXBlIEFycmF5RXhhY3Q8VFZhbHVlIGV4dGVuZHMgcmVhZG9ubHkgYW55W10sIFRTaGFwZSBleHRlbmRzIHJlYWRvbmx5IGFueVtdPiA9IEFuZDxcbiAgW1xuICAgIC8vIGJvdGggYXJyYXlzXG4gICAgSXNBcnJheTxUVmFsdWU+LFxuICAgIElzQXJyYXk8VFNoYXBlPixcbiAgICAvLyBzYW1lIGxlbmd0aFxuICAgIFNhbWVMZW5ndGg8VFZhbHVlLCBUU2hhcGU+LFxuICAgIC8vIGJvdGggcmVhZG9ubHkgb3Igbm90XG4gICAgWG9yPElzUmVhZG9ubHk8VFZhbHVlPiwgSXNSZWFkb25seTxUU2hhcGU+PixcbiAgXVxuPiBleHRlbmRzIHRydWVcbiAgPyBbVFZhbHVlLCBUU2hhcGVdIGV4dGVuZHMgW3JlYWRvbmx5IChpbmZlciBUVmFsdWVFbGVtZW50KVtdLCByZWFkb25seSAoaW5mZXIgVFNoYXBlRWxlbWVudClbXV1cbiAgICA/IEV4YWN0PFRWYWx1ZUVsZW1lbnQsIFRTaGFwZUVsZW1lbnQ+IGV4dGVuZHMgVFZhbHVlRWxlbWVudFxuICAgICAgPyBUVmFsdWVcbiAgICAgIDogbmV2ZXJcbiAgICA6IG5ldmVyXG4gIDogbmV2ZXI7XG5cbnR5cGUgUHJpbWl0aXZlRXhhY3Q8VFZhbHVlLCBUU2hhcGU+ID0gW1RWYWx1ZV0gZXh0ZW5kcyBbVFNoYXBlXSA/IChbVFNoYXBlXSBleHRlbmRzIFtUVmFsdWVdID8gVFZhbHVlIDogbmV2ZXIpIDogbmV2ZXI7XG5cbmV4cG9ydCB0eXBlIEV4YWN0PFRWYWx1ZSwgVFNoYXBlPiA9IFtUVmFsdWVdIGV4dGVuZHMgW3JlYWRvbmx5IGFueVtdXVxuICA/IFtUU2hhcGVdIGV4dGVuZHMgW3JlYWRvbmx5IGFueVtdXVxuICAgID8gQXJyYXlFeGFjdDxUVmFsdWUsIFRTaGFwZT5cbiAgICA6IG5ldmVyXG4gIDogW1RWYWx1ZV0gZXh0ZW5kcyBbQW55UmVjb3JkXVxuICA/IE9iamVjdEV4YWN0PFRWYWx1ZSwgVFNoYXBlPlxuICA6IFByaW1pdGl2ZUV4YWN0PFRWYWx1ZSwgVFNoYXBlPjtcbiJdfQ==

View File

@@ -0,0 +1,106 @@
var baseSetData = require('./_baseSetData'),
createBind = require('./_createBind'),
createCurry = require('./_createCurry'),
createHybrid = require('./_createHybrid'),
createPartial = require('./_createPartial'),
getData = require('./_getData'),
mergeData = require('./_mergeData'),
setData = require('./_setData'),
setWrapToString = require('./_setWrapToString'),
toInteger = require('./toInteger');
/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
/** 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_PARTIAL_FLAG = 32,
WRAP_PARTIAL_RIGHT_FLAG = 64;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max;
/**
* Creates a function that either curries or invokes `func` with optional
* `this` binding and partially applied arguments.
*
* @private
* @param {Function|string} func The function or method name to wrap.
* @param {number} bitmask The bitmask flags.
* 1 - `_.bind`
* 2 - `_.bindKey`
* 4 - `_.curry` or `_.curryRight` of a bound function
* 8 - `_.curry`
* 16 - `_.curryRight`
* 32 - `_.partial`
* 64 - `_.partialRight`
* 128 - `_.rearg`
* 256 - `_.ary`
* 512 - `_.flip`
* @param {*} [thisArg] The `this` binding of `func`.
* @param {Array} [partials] The arguments to be partially applied.
* @param {Array} [holders] The `partials` 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 createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
if (!isBindKey && typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
var length = partials ? partials.length : 0;
if (!length) {
bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
partials = holders = undefined;
}
ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
arity = arity === undefined ? arity : toInteger(arity);
length -= holders ? holders.length : 0;
if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
var partialsRight = partials,
holdersRight = holders;
partials = holders = undefined;
}
var data = isBindKey ? undefined : getData(func);
var newData = [
func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
argPos, ary, arity
];
if (data) {
mergeData(newData, data);
}
func = newData[0];
bitmask = newData[1];
thisArg = newData[2];
partials = newData[3];
holders = newData[4];
arity = newData[9] = newData[9] === undefined
? (isBindKey ? 0 : func.length)
: nativeMax(newData[9] - length, 0);
if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
}
if (!bitmask || bitmask == WRAP_BIND_FLAG) {
var result = createBind(func, bitmask, thisArg);
} else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
result = createCurry(func, bitmask, arity);
} else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
result = createPartial(func, bitmask, thisArg, partials);
} else {
result = createHybrid.apply(undefined, newData);
}
var setter = data ? baseSetData : setData;
return setWrapToString(setter(result, newData), func, bitmask);
}
module.exports = createWrap;

View File

@@ -0,0 +1,22 @@
/**
* @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 CircleDashed = createLucideIcon("CircleDashed", [
["path", { d: "M10.1 2.182a10 10 0 0 1 3.8 0", key: "5ilxe3" }],
["path", { d: "M13.9 21.818a10 10 0 0 1-3.8 0", key: "11zvb9" }],
["path", { d: "M17.609 3.721a10 10 0 0 1 2.69 2.7", key: "1iw5b2" }],
["path", { d: "M2.182 13.9a10 10 0 0 1 0-3.8", key: "c0bmvh" }],
["path", { d: "M20.279 17.609a10 10 0 0 1-2.7 2.69", key: "1ruxm7" }],
["path", { d: "M21.818 10.1a10 10 0 0 1 0 3.8", key: "qkgqxc" }],
["path", { d: "M3.721 6.391a10 10 0 0 1 2.7-2.69", key: "1mcia2" }],
["path", { d: "M6.391 20.279a10 10 0 0 1-2.69-2.7", key: "1fvljs" }]
]);
export { CircleDashed as default };
//# sourceMappingURL=circle-dashed.js.map

View File

@@ -0,0 +1,49 @@
import type { Envelope } from '../types-hoist/envelope';
import type { InternalBaseTransportOptions, Transport } from '../types-hoist/transport';
export declare const MIN_DELAY = 100;
export declare const START_DELAY = 5000;
export interface OfflineStore {
push(env: Envelope): Promise<void>;
unshift(env: Envelope): Promise<void>;
shift(): Promise<Envelope | undefined>;
}
export type CreateOfflineStore = (options: OfflineTransportOptions) => OfflineStore;
export interface OfflineTransportOptions extends InternalBaseTransportOptions {
/**
* A function that creates the offline store instance.
*/
createStore?: CreateOfflineStore;
/**
* Flush the offline store shortly after startup.
*
* Defaults: false
*/
flushAtStartup?: boolean;
/**
* Called before an event is stored.
*
* Return false to drop the envelope rather than store it.
*
* @param envelope The envelope that failed to send.
* @param error The error that occurred.
* @param retryDelay The current retry delay in milliseconds.
* @returns Whether the envelope should be stored.
*/
shouldStore?: (envelope: Envelope, error: Error, retryDelay: number) => boolean | Promise<boolean>;
/**
* Should an attempt be made to send the envelope to Sentry.
*
* If this function is supplied and returns false, `shouldStore` will be called to determine if the envelope should be stored.
*
* @param envelope The envelope that will be sent.
* @returns Whether we should attempt to send the envelope
*/
shouldSend?: (envelope: Envelope) => boolean | Promise<boolean>;
}
/**
* Wraps a transport and stores and retries events when they fail to send.
*
* @param createTransport The transport to wrap.
*/
export declare function makeOfflineTransport<TO>(createTransport: (options: TO) => Transport): (options: TO & OfflineTransportOptions) => Transport;
//# sourceMappingURL=offline.d.ts.map

View File

@@ -0,0 +1,13 @@
import { AuthenticationStorage } from "../types.js";
//#region src/auth/utils/memory-storage.d.ts
/**
* Simple memory storage implementation
*
* @returns AuthenticationStorage
*/
declare const memoryStorage: () => AuthenticationStorage;
//#endregion
export { memoryStorage };
//# sourceMappingURL=memory-storage.d.ts.map

View File

@@ -0,0 +1,3 @@
export { Listeners } from './Listeners';
export { getEventListenerTarget } from './getEventListenerTarget';
export { hasExceededDistance } from './hasExceededDistance';

View File

@@ -0,0 +1,808 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.extendSchema = extendSchema;
exports.extendSchemaImpl = extendSchemaImpl;
var _devAssert = require('../jsutils/devAssert.js');
var _inspect = require('../jsutils/inspect.js');
var _invariant = require('../jsutils/invariant.js');
var _keyMap = require('../jsutils/keyMap.js');
var _mapValue = require('../jsutils/mapValue.js');
var _kinds = require('../language/kinds.js');
var _predicates = require('../language/predicates.js');
var _definition = require('../type/definition.js');
var _directives = require('../type/directives.js');
var _introspection = require('../type/introspection.js');
var _scalars = require('../type/scalars.js');
var _schema = require('../type/schema.js');
var _validate = require('../validation/validate.js');
var _values = require('../execution/values.js');
var _valueFromAST = require('./valueFromAST.js');
/**
* Produces a new schema given an existing schema and a document which may
* contain GraphQL type extensions and definitions. The original schema will
* remain unaltered.
*
* Because a schema represents a graph of references, a schema cannot be
* extended without effectively making an entire copy. We do not know until it's
* too late if subgraphs remain unchanged.
*
* This algorithm copies the provided schema, applying extensions while
* producing the copy. The original schema remains unaltered.
*/
function extendSchema(schema, documentAST, options) {
(0, _schema.assertSchema)(schema);
(documentAST != null && documentAST.kind === _kinds.Kind.DOCUMENT) ||
(0, _devAssert.devAssert)(false, 'Must provide valid Document AST.');
if (
(options === null || options === void 0 ? void 0 : options.assumeValid) !==
true &&
(options === null || options === void 0
? void 0
: options.assumeValidSDL) !== true
) {
(0, _validate.assertValidSDLExtension)(documentAST, schema);
}
const schemaConfig = schema.toConfig();
const extendedConfig = extendSchemaImpl(schemaConfig, documentAST, options);
return schemaConfig === extendedConfig
? schema
: new _schema.GraphQLSchema(extendedConfig);
}
/**
* @internal
*/
function extendSchemaImpl(schemaConfig, documentAST, options) {
var _schemaDef, _schemaDef$descriptio, _schemaDef2, _options$assumeValid;
// Collect the type definitions and extensions found in the document.
const typeDefs = [];
const typeExtensionsMap = Object.create(null); // New directives and types are separate because a directives and types can
// have the same name. For example, a type named "skip".
const directiveDefs = [];
let schemaDef; // Schema extensions are collected which may add additional operation types.
const schemaExtensions = [];
for (const def of documentAST.definitions) {
if (def.kind === _kinds.Kind.SCHEMA_DEFINITION) {
schemaDef = def;
} else if (def.kind === _kinds.Kind.SCHEMA_EXTENSION) {
schemaExtensions.push(def);
} else if ((0, _predicates.isTypeDefinitionNode)(def)) {
typeDefs.push(def);
} else if ((0, _predicates.isTypeExtensionNode)(def)) {
const extendedTypeName = def.name.value;
const existingTypeExtensions = typeExtensionsMap[extendedTypeName];
typeExtensionsMap[extendedTypeName] = existingTypeExtensions
? existingTypeExtensions.concat([def])
: [def];
} else if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) {
directiveDefs.push(def);
}
} // If this document contains no new types, extensions, or directives then
// return the same unmodified GraphQLSchema instance.
if (
Object.keys(typeExtensionsMap).length === 0 &&
typeDefs.length === 0 &&
directiveDefs.length === 0 &&
schemaExtensions.length === 0 &&
schemaDef == null
) {
return schemaConfig;
}
const typeMap = Object.create(null);
for (const existingType of schemaConfig.types) {
typeMap[existingType.name] = extendNamedType(existingType);
}
for (const typeNode of typeDefs) {
var _stdTypeMap$name;
const name = typeNode.name.value;
typeMap[name] =
(_stdTypeMap$name = stdTypeMap[name]) !== null &&
_stdTypeMap$name !== void 0
? _stdTypeMap$name
: buildType(typeNode);
}
const operationTypes = {
// Get the extended root operation types.
query: schemaConfig.query && replaceNamedType(schemaConfig.query),
mutation: schemaConfig.mutation && replaceNamedType(schemaConfig.mutation),
subscription:
schemaConfig.subscription && replaceNamedType(schemaConfig.subscription),
// Then, incorporate schema definition and all schema extensions.
...(schemaDef && getOperationTypes([schemaDef])),
...getOperationTypes(schemaExtensions),
}; // Then produce and return a Schema config with these types.
return {
description:
(_schemaDef = schemaDef) === null || _schemaDef === void 0
? void 0
: (_schemaDef$descriptio = _schemaDef.description) === null ||
_schemaDef$descriptio === void 0
? void 0
: _schemaDef$descriptio.value,
...operationTypes,
types: Object.values(typeMap),
directives: [
...schemaConfig.directives.map(replaceDirective),
...directiveDefs.map(buildDirective),
],
extensions: Object.create(null),
astNode:
(_schemaDef2 = schemaDef) !== null && _schemaDef2 !== void 0
? _schemaDef2
: schemaConfig.astNode,
extensionASTNodes: schemaConfig.extensionASTNodes.concat(schemaExtensions),
assumeValid:
(_options$assumeValid =
options === null || options === void 0
? void 0
: options.assumeValid) !== null && _options$assumeValid !== void 0
? _options$assumeValid
: false,
}; // Below are functions used for producing this schema that have closed over
// this scope and have access to the schema, cache, and newly defined types.
function replaceType(type) {
if ((0, _definition.isListType)(type)) {
// @ts-expect-error
return new _definition.GraphQLList(replaceType(type.ofType));
}
if ((0, _definition.isNonNullType)(type)) {
// @ts-expect-error
return new _definition.GraphQLNonNull(replaceType(type.ofType));
} // @ts-expect-error FIXME
return replaceNamedType(type);
}
function replaceNamedType(type) {
// Note: While this could make early assertions to get the correctly
// typed values, that would throw immediately while type system
// validation with validateSchema() will produce more actionable results.
return typeMap[type.name];
}
function replaceDirective(directive) {
const config = directive.toConfig();
return new _directives.GraphQLDirective({
...config,
args: (0, _mapValue.mapValue)(config.args, extendArg),
});
}
function extendNamedType(type) {
if (
(0, _introspection.isIntrospectionType)(type) ||
(0, _scalars.isSpecifiedScalarType)(type)
) {
// Builtin types are not extended.
return type;
}
if ((0, _definition.isScalarType)(type)) {
return extendScalarType(type);
}
if ((0, _definition.isObjectType)(type)) {
return extendObjectType(type);
}
if ((0, _definition.isInterfaceType)(type)) {
return extendInterfaceType(type);
}
if ((0, _definition.isUnionType)(type)) {
return extendUnionType(type);
}
if ((0, _definition.isEnumType)(type)) {
return extendEnumType(type);
}
if ((0, _definition.isInputObjectType)(type)) {
return extendInputObjectType(type);
}
/* c8 ignore next 3 */
// Not reachable, all possible type definition nodes have been considered.
false ||
(0, _invariant.invariant)(
false,
'Unexpected type: ' + (0, _inspect.inspect)(type),
);
}
function extendInputObjectType(type) {
var _typeExtensionsMap$co;
const config = type.toConfig();
const extensions =
(_typeExtensionsMap$co = typeExtensionsMap[config.name]) !== null &&
_typeExtensionsMap$co !== void 0
? _typeExtensionsMap$co
: [];
return new _definition.GraphQLInputObjectType({
...config,
fields: () => ({
...(0, _mapValue.mapValue)(config.fields, (field) => ({
...field,
type: replaceType(field.type),
})),
...buildInputFieldMap(extensions),
}),
extensionASTNodes: config.extensionASTNodes.concat(extensions),
});
}
function extendEnumType(type) {
var _typeExtensionsMap$ty;
const config = type.toConfig();
const extensions =
(_typeExtensionsMap$ty = typeExtensionsMap[type.name]) !== null &&
_typeExtensionsMap$ty !== void 0
? _typeExtensionsMap$ty
: [];
return new _definition.GraphQLEnumType({
...config,
values: { ...config.values, ...buildEnumValueMap(extensions) },
extensionASTNodes: config.extensionASTNodes.concat(extensions),
});
}
function extendScalarType(type) {
var _typeExtensionsMap$co2;
const config = type.toConfig();
const extensions =
(_typeExtensionsMap$co2 = typeExtensionsMap[config.name]) !== null &&
_typeExtensionsMap$co2 !== void 0
? _typeExtensionsMap$co2
: [];
let specifiedByURL = config.specifiedByURL;
for (const extensionNode of extensions) {
var _getSpecifiedByURL;
specifiedByURL =
(_getSpecifiedByURL = getSpecifiedByURL(extensionNode)) !== null &&
_getSpecifiedByURL !== void 0
? _getSpecifiedByURL
: specifiedByURL;
}
return new _definition.GraphQLScalarType({
...config,
specifiedByURL,
extensionASTNodes: config.extensionASTNodes.concat(extensions),
});
}
function extendObjectType(type) {
var _typeExtensionsMap$co3;
const config = type.toConfig();
const extensions =
(_typeExtensionsMap$co3 = typeExtensionsMap[config.name]) !== null &&
_typeExtensionsMap$co3 !== void 0
? _typeExtensionsMap$co3
: [];
return new _definition.GraphQLObjectType({
...config,
interfaces: () => [
...type.getInterfaces().map(replaceNamedType),
...buildInterfaces(extensions),
],
fields: () => ({
...(0, _mapValue.mapValue)(config.fields, extendField),
...buildFieldMap(extensions),
}),
extensionASTNodes: config.extensionASTNodes.concat(extensions),
});
}
function extendInterfaceType(type) {
var _typeExtensionsMap$co4;
const config = type.toConfig();
const extensions =
(_typeExtensionsMap$co4 = typeExtensionsMap[config.name]) !== null &&
_typeExtensionsMap$co4 !== void 0
? _typeExtensionsMap$co4
: [];
return new _definition.GraphQLInterfaceType({
...config,
interfaces: () => [
...type.getInterfaces().map(replaceNamedType),
...buildInterfaces(extensions),
],
fields: () => ({
...(0, _mapValue.mapValue)(config.fields, extendField),
...buildFieldMap(extensions),
}),
extensionASTNodes: config.extensionASTNodes.concat(extensions),
});
}
function extendUnionType(type) {
var _typeExtensionsMap$co5;
const config = type.toConfig();
const extensions =
(_typeExtensionsMap$co5 = typeExtensionsMap[config.name]) !== null &&
_typeExtensionsMap$co5 !== void 0
? _typeExtensionsMap$co5
: [];
return new _definition.GraphQLUnionType({
...config,
types: () => [
...type.getTypes().map(replaceNamedType),
...buildUnionTypes(extensions),
],
extensionASTNodes: config.extensionASTNodes.concat(extensions),
});
}
function extendField(field) {
return {
...field,
type: replaceType(field.type),
args: field.args && (0, _mapValue.mapValue)(field.args, extendArg),
};
}
function extendArg(arg) {
return { ...arg, type: replaceType(arg.type) };
}
function getOperationTypes(nodes) {
const opTypes = {};
for (const node of nodes) {
var _node$operationTypes;
// FIXME: https://github.com/graphql/graphql-js/issues/2203
const operationTypesNodes =
/* c8 ignore next */
(_node$operationTypes = node.operationTypes) !== null &&
_node$operationTypes !== void 0
? _node$operationTypes
: [];
for (const operationType of operationTypesNodes) {
// Note: While this could make early assertions to get the correctly
// typed values below, that would throw immediately while type system
// validation with validateSchema() will produce more actionable results.
// @ts-expect-error
opTypes[operationType.operation] = getNamedType(operationType.type);
}
}
return opTypes;
}
function getNamedType(node) {
var _stdTypeMap$name2;
const name = node.name.value;
const type =
(_stdTypeMap$name2 = stdTypeMap[name]) !== null &&
_stdTypeMap$name2 !== void 0
? _stdTypeMap$name2
: typeMap[name];
if (type === undefined) {
throw new Error(`Unknown type: "${name}".`);
}
return type;
}
function getWrappedType(node) {
if (node.kind === _kinds.Kind.LIST_TYPE) {
return new _definition.GraphQLList(getWrappedType(node.type));
}
if (node.kind === _kinds.Kind.NON_NULL_TYPE) {
return new _definition.GraphQLNonNull(getWrappedType(node.type));
}
return getNamedType(node);
}
function buildDirective(node) {
var _node$description;
return new _directives.GraphQLDirective({
name: node.name.value,
description:
(_node$description = node.description) === null ||
_node$description === void 0
? void 0
: _node$description.value,
// @ts-expect-error
locations: node.locations.map(({ value }) => value),
isRepeatable: node.repeatable,
args: buildArgumentMap(node.arguments),
astNode: node,
});
}
function buildFieldMap(nodes) {
const fieldConfigMap = Object.create(null);
for (const node of nodes) {
var _node$fields;
// FIXME: https://github.com/graphql/graphql-js/issues/2203
const nodeFields =
/* c8 ignore next */
(_node$fields = node.fields) !== null && _node$fields !== void 0
? _node$fields
: [];
for (const field of nodeFields) {
var _field$description;
fieldConfigMap[field.name.value] = {
// Note: While this could make assertions to get the correctly typed
// value, that would throw immediately while type system validation
// with validateSchema() will produce more actionable results.
type: getWrappedType(field.type),
description:
(_field$description = field.description) === null ||
_field$description === void 0
? void 0
: _field$description.value,
args: buildArgumentMap(field.arguments),
deprecationReason: getDeprecationReason(field),
astNode: field,
};
}
}
return fieldConfigMap;
}
function buildArgumentMap(args) {
// FIXME: https://github.com/graphql/graphql-js/issues/2203
const argsNodes =
/* c8 ignore next */
args !== null && args !== void 0 ? args : [];
const argConfigMap = Object.create(null);
for (const arg of argsNodes) {
var _arg$description;
// Note: While this could make assertions to get the correctly typed
// value, that would throw immediately while type system validation
// with validateSchema() will produce more actionable results.
const type = getWrappedType(arg.type);
argConfigMap[arg.name.value] = {
type,
description:
(_arg$description = arg.description) === null ||
_arg$description === void 0
? void 0
: _arg$description.value,
defaultValue: (0, _valueFromAST.valueFromAST)(arg.defaultValue, type),
deprecationReason: getDeprecationReason(arg),
astNode: arg,
};
}
return argConfigMap;
}
function buildInputFieldMap(nodes) {
const inputFieldMap = Object.create(null);
for (const node of nodes) {
var _node$fields2;
// FIXME: https://github.com/graphql/graphql-js/issues/2203
const fieldsNodes =
/* c8 ignore next */
(_node$fields2 = node.fields) !== null && _node$fields2 !== void 0
? _node$fields2
: [];
for (const field of fieldsNodes) {
var _field$description2;
// Note: While this could make assertions to get the correctly typed
// value, that would throw immediately while type system validation
// with validateSchema() will produce more actionable results.
const type = getWrappedType(field.type);
inputFieldMap[field.name.value] = {
type,
description:
(_field$description2 = field.description) === null ||
_field$description2 === void 0
? void 0
: _field$description2.value,
defaultValue: (0, _valueFromAST.valueFromAST)(
field.defaultValue,
type,
),
deprecationReason: getDeprecationReason(field),
astNode: field,
};
}
}
return inputFieldMap;
}
function buildEnumValueMap(nodes) {
const enumValueMap = Object.create(null);
for (const node of nodes) {
var _node$values;
// FIXME: https://github.com/graphql/graphql-js/issues/2203
const valuesNodes =
/* c8 ignore next */
(_node$values = node.values) !== null && _node$values !== void 0
? _node$values
: [];
for (const value of valuesNodes) {
var _value$description;
enumValueMap[value.name.value] = {
description:
(_value$description = value.description) === null ||
_value$description === void 0
? void 0
: _value$description.value,
deprecationReason: getDeprecationReason(value),
astNode: value,
};
}
}
return enumValueMap;
}
function buildInterfaces(nodes) {
// Note: While this could make assertions to get the correctly typed
// values below, that would throw immediately while type system
// validation with validateSchema() will produce more actionable results.
// @ts-expect-error
return nodes.flatMap(
// FIXME: https://github.com/graphql/graphql-js/issues/2203
(node) => {
var _node$interfaces$map, _node$interfaces;
return (
/* c8 ignore next */
(_node$interfaces$map =
(_node$interfaces = node.interfaces) === null ||
_node$interfaces === void 0
? void 0
: _node$interfaces.map(getNamedType)) !== null &&
_node$interfaces$map !== void 0
? _node$interfaces$map
: []
);
},
);
}
function buildUnionTypes(nodes) {
// Note: While this could make assertions to get the correctly typed
// values below, that would throw immediately while type system
// validation with validateSchema() will produce more actionable results.
// @ts-expect-error
return nodes.flatMap(
// FIXME: https://github.com/graphql/graphql-js/issues/2203
(node) => {
var _node$types$map, _node$types;
return (
/* c8 ignore next */
(_node$types$map =
(_node$types = node.types) === null || _node$types === void 0
? void 0
: _node$types.map(getNamedType)) !== null &&
_node$types$map !== void 0
? _node$types$map
: []
);
},
);
}
function buildType(astNode) {
var _typeExtensionsMap$na;
const name = astNode.name.value;
const extensionASTNodes =
(_typeExtensionsMap$na = typeExtensionsMap[name]) !== null &&
_typeExtensionsMap$na !== void 0
? _typeExtensionsMap$na
: [];
switch (astNode.kind) {
case _kinds.Kind.OBJECT_TYPE_DEFINITION: {
var _astNode$description;
const allNodes = [astNode, ...extensionASTNodes];
return new _definition.GraphQLObjectType({
name,
description:
(_astNode$description = astNode.description) === null ||
_astNode$description === void 0
? void 0
: _astNode$description.value,
interfaces: () => buildInterfaces(allNodes),
fields: () => buildFieldMap(allNodes),
astNode,
extensionASTNodes,
});
}
case _kinds.Kind.INTERFACE_TYPE_DEFINITION: {
var _astNode$description2;
const allNodes = [astNode, ...extensionASTNodes];
return new _definition.GraphQLInterfaceType({
name,
description:
(_astNode$description2 = astNode.description) === null ||
_astNode$description2 === void 0
? void 0
: _astNode$description2.value,
interfaces: () => buildInterfaces(allNodes),
fields: () => buildFieldMap(allNodes),
astNode,
extensionASTNodes,
});
}
case _kinds.Kind.ENUM_TYPE_DEFINITION: {
var _astNode$description3;
const allNodes = [astNode, ...extensionASTNodes];
return new _definition.GraphQLEnumType({
name,
description:
(_astNode$description3 = astNode.description) === null ||
_astNode$description3 === void 0
? void 0
: _astNode$description3.value,
values: buildEnumValueMap(allNodes),
astNode,
extensionASTNodes,
});
}
case _kinds.Kind.UNION_TYPE_DEFINITION: {
var _astNode$description4;
const allNodes = [astNode, ...extensionASTNodes];
return new _definition.GraphQLUnionType({
name,
description:
(_astNode$description4 = astNode.description) === null ||
_astNode$description4 === void 0
? void 0
: _astNode$description4.value,
types: () => buildUnionTypes(allNodes),
astNode,
extensionASTNodes,
});
}
case _kinds.Kind.SCALAR_TYPE_DEFINITION: {
var _astNode$description5;
return new _definition.GraphQLScalarType({
name,
description:
(_astNode$description5 = astNode.description) === null ||
_astNode$description5 === void 0
? void 0
: _astNode$description5.value,
specifiedByURL: getSpecifiedByURL(astNode),
astNode,
extensionASTNodes,
});
}
case _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION: {
var _astNode$description6;
const allNodes = [astNode, ...extensionASTNodes];
return new _definition.GraphQLInputObjectType({
name,
description:
(_astNode$description6 = astNode.description) === null ||
_astNode$description6 === void 0
? void 0
: _astNode$description6.value,
fields: () => buildInputFieldMap(allNodes),
astNode,
extensionASTNodes,
isOneOf: isOneOf(astNode),
});
}
}
}
}
const stdTypeMap = (0, _keyMap.keyMap)(
[..._scalars.specifiedScalarTypes, ..._introspection.introspectionTypes],
(type) => type.name,
);
/**
* Given a field or enum value node, returns the string value for the
* deprecation reason.
*/
function getDeprecationReason(node) {
const deprecated = (0, _values.getDirectiveValues)(
_directives.GraphQLDeprecatedDirective,
node,
); // @ts-expect-error validated by `getDirectiveValues`
return deprecated === null || deprecated === void 0
? void 0
: deprecated.reason;
}
/**
* Given a scalar node, returns the string value for the specifiedByURL.
*/
function getSpecifiedByURL(node) {
const specifiedBy = (0, _values.getDirectiveValues)(
_directives.GraphQLSpecifiedByDirective,
node,
); // @ts-expect-error validated by `getDirectiveValues`
return specifiedBy === null || specifiedBy === void 0
? void 0
: specifiedBy.url;
}
/**
* Given an input object node, returns if the node should be OneOf.
*/
function isOneOf(node) {
return Boolean(
(0, _values.getDirectiveValues)(_directives.GraphQLOneOfDirective, node),
);
}

View File

@@ -0,0 +1 @@
{"version":3,"names":["_arrayLikeToArray","require","_arrayWithoutHoles","arr","Array","isArray","arrayLikeToArray"],"sources":["../../src/helpers/arrayWithoutHoles.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n\nimport arrayLikeToArray from \"./arrayLikeToArray.ts\";\n\nexport default function _arrayWithoutHoles<T>(arr: T[]) {\n if (Array.isArray(arr)) return arrayLikeToArray<T>(arr);\n}\n"],"mappings":";;;;;;AAEA,IAAAA,iBAAA,GAAAC,OAAA;AAEe,SAASC,kBAAkBA,CAAIC,GAAQ,EAAE;EACtD,IAAIC,KAAK,CAACC,OAAO,CAACF,GAAG,CAAC,EAAE,OAAO,IAAAG,yBAAgB,EAAIH,GAAG,CAAC;AACzD","ignoreList":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"tunnelRoute.js","sources":["../../../src/client/tunnelRoute.ts"],"sourcesContent":["import { debug, dsnFromString, GLOBAL_OBJ } from '@sentry/core';\nimport type { BrowserOptions } from '@sentry/react';\nimport { DEBUG_BUILD } from '../common/debug-build';\n\nconst globalWithInjectedValues = GLOBAL_OBJ as typeof GLOBAL_OBJ & {\n _sentryRewritesTunnelPath?: string;\n};\n\n/**\n * Applies the `tunnel` option to the Next.js SDK options based on `withSentryConfig`'s `tunnelRoute` option.\n */\nexport function applyTunnelRouteOption(options: BrowserOptions): void {\n const tunnelRouteOption = process.env._sentryRewritesTunnelPath || globalWithInjectedValues._sentryRewritesTunnelPath;\n if (tunnelRouteOption && options.dsn) {\n const dsnComponents = dsnFromString(options.dsn);\n if (!dsnComponents) {\n return;\n }\n const sentrySaasDsnMatch = dsnComponents.host.match(/^o(\\d+)\\.ingest(?:\\.([a-z]{2}))?\\.sentry\\.io$/);\n if (sentrySaasDsnMatch) {\n const orgId = sentrySaasDsnMatch[1];\n const regionCode = sentrySaasDsnMatch[2];\n let tunnelPath = `${tunnelRouteOption}?o=${orgId}&p=${dsnComponents.projectId}`;\n if (regionCode) {\n tunnelPath += `&r=${regionCode}`;\n }\n options.tunnel = tunnelPath;\n DEBUG_BUILD && debug.log(`Tunneling events to \"${tunnelPath}\"`);\n } else {\n DEBUG_BUILD && debug.warn('Provided DSN is not a Sentry SaaS DSN. Will not tunnel events.');\n }\n }\n}\n"],"names":[],"mappings":";;;AAIA,MAAM,wBAAA,GAA2B;;AAEjC;;AAEA;AACA;AACA;AACO,SAAS,sBAAsB,CAAC,OAAO,EAAwB;AACtE,EAAE,MAAM,iBAAA,GAAoB,OAAO,CAAC,GAAG,CAAC,yBAAA,IAA6B,wBAAwB,CAAC,yBAAyB;AACvH,EAAE,IAAI,iBAAA,IAAqB,OAAO,CAAC,GAAG,EAAE;AACxC,IAAI,MAAM,gBAAgB,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC;AACpD,IAAI,IAAI,CAAC,aAAa,EAAE;AACxB,MAAM;AACN,IAAI;AACJ,IAAI,MAAM,kBAAA,GAAqB,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,+CAA+C,CAAC;AACxG,IAAI,IAAI,kBAAkB,EAAE;AAC5B,MAAM,MAAM,KAAA,GAAQ,kBAAkB,CAAC,CAAC,CAAC;AACzC,MAAM,MAAM,UAAA,GAAa,kBAAkB,CAAC,CAAC,CAAC;AAC9C,MAAM,IAAI,UAAA,GAAa,CAAC,EAAA,iBAAA,CAAA,GAAA,EAAA,KAAA,CAAA,GAAA,EAAA,aAAA,CAAA,SAAA,CAAA,CAAA;AACA,MAAA,IAAA,UAAA,EAAA;AACA,QAAA,UAAA,IAAA,CAAA,GAAA,EAAA,UAAA,CAAA,CAAA;AACA,MAAA;AACA,MAAA,OAAA,CAAA,MAAA,GAAA,UAAA;AACA,MAAA,WAAA,IAAA,KAAA,CAAA,GAAA,CAAA,CAAA,qBAAA,EAAA,UAAA,CAAA,CAAA,CAAA,CAAA;AACA,IAAA,CAAA,MAAA;AACA,MAAA,WAAA,IAAA,KAAA,CAAA,IAAA,CAAA,gEAAA,CAAA;AACA,IAAA;AACA,EAAA;AACA;;;;"}

View File

@@ -0,0 +1,11 @@
A reader for the PostgreSQL binary format for numeric values, producing a string. Designed for [pg][].
```js
const readNumeric = require('pg-numeric');
readNumeric(Buffer.from('000600020000000a000c0d801ed203db198f0834', 'hex'))
// '1234567890.0987654321'
```
[pg]: https://github.com/brianc/node-postgres

View File

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

View File

@@ -0,0 +1,12 @@
import type { Locale } from "./types.js";
/**
* @category Locales
* @summary French locale (Switzerland).
* @language French
* @iso-639-2 fra
* @author Jean Dupouy [@izeau](https://github.com/izeau)
* @author François B [@fbonzon](https://github.com/fbonzon)
* @author Van Vuong Ngo [@vanvuongngo](https://github.com/vanvuongngo)
* @author Alex Hoeing [@dcbn](https://github.com/dcbn)
*/
export declare const frCH: Locale;

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../../src/fields/hooks/afterRead/traverseFields.ts"],"sourcesContent":["import type { SanitizedCollectionConfig } from '../../../collections/config/types.js'\nimport type { SanitizedGlobalConfig } from '../../../globals/config/types.js'\nimport type { RequestContext, TypedFallbackLocale } from '../../../index.js'\nimport type {\n JsonObject,\n PayloadRequest,\n PopulateType,\n SelectMode,\n SelectType,\n} from '../../../types/index.js'\nimport type { Field, TabAsField } from '../../config/types.js'\n\nimport { promise } from './promise.js'\n\ntype Args = {\n /**\n * Data of the nearest parent block. If no parent block exists, this will be the `undefined`\n */\n blockData?: JsonObject\n collection: null | SanitizedCollectionConfig\n context: RequestContext\n currentDepth: number\n depth: number\n doc: JsonObject\n draft: boolean\n fallbackLocale: TypedFallbackLocale\n /**\n * The depth of the current field being processed.\n * Fields without names (i.e. rows, collapsibles, unnamed groups)\n * simply pass this value through\n *\n * @default 0\n */\n fieldDepth?: number\n /**\n * fieldPromises are used for things like field hooks. They should be awaited before awaiting populationPromises\n */\n fieldPromises: Promise<void>[]\n fields: (Field | TabAsField)[]\n findMany: boolean\n flattenLocales: boolean\n global: null | SanitizedGlobalConfig\n locale: null | string\n overrideAccess: boolean\n parentIndexPath: string\n /**\n * @todo make required in v4.0\n */\n parentIsLocalized?: boolean\n parentPath: string\n parentSchemaPath: string\n populate?: PopulateType\n populationPromises: Promise<void>[]\n req: PayloadRequest\n select?: SelectType\n selectMode?: SelectMode\n showHiddenFields: boolean\n siblingDoc: JsonObject\n triggerAccessControl?: boolean\n triggerHooks?: boolean\n}\n\nexport const traverseFields = ({\n blockData,\n collection,\n context,\n currentDepth,\n depth,\n doc,\n draft,\n fallbackLocale,\n fieldDepth = 0,\n fieldPromises,\n fields,\n findMany,\n flattenLocales,\n global,\n locale,\n overrideAccess,\n parentIndexPath,\n parentIsLocalized,\n parentPath,\n parentSchemaPath,\n populate,\n populationPromises,\n req,\n select,\n selectMode,\n showHiddenFields,\n siblingDoc,\n triggerAccessControl = true,\n triggerHooks = true,\n}: Args): void => {\n fields.forEach((field, fieldIndex) => {\n fieldPromises.push(\n promise({\n blockData,\n collection,\n context,\n currentDepth,\n depth,\n doc,\n draft,\n fallbackLocale,\n field,\n fieldDepth,\n fieldIndex,\n fieldPromises,\n findMany,\n flattenLocales,\n global,\n locale,\n overrideAccess,\n parentIndexPath,\n parentIsLocalized,\n parentPath,\n parentSchemaPath,\n populate,\n populationPromises,\n req,\n select,\n selectMode,\n showHiddenFields,\n siblingDoc,\n siblingFields: fields,\n triggerAccessControl,\n triggerHooks,\n }),\n )\n })\n}\n"],"names":["promise","traverseFields","blockData","collection","context","currentDepth","depth","doc","draft","fallbackLocale","fieldDepth","fieldPromises","fields","findMany","flattenLocales","global","locale","overrideAccess","parentIndexPath","parentIsLocalized","parentPath","parentSchemaPath","populate","populationPromises","req","select","selectMode","showHiddenFields","siblingDoc","triggerAccessControl","triggerHooks","forEach","field","fieldIndex","push","siblingFields"],"mappings":"AAYA,SAASA,OAAO,QAAQ,eAAc;AAkDtC,OAAO,MAAMC,iBAAiB,CAAC,EAC7BC,SAAS,EACTC,UAAU,EACVC,OAAO,EACPC,YAAY,EACZC,KAAK,EACLC,GAAG,EACHC,KAAK,EACLC,cAAc,EACdC,aAAa,CAAC,EACdC,aAAa,EACbC,MAAM,EACNC,QAAQ,EACRC,cAAc,EACdC,MAAM,EACNC,MAAM,EACNC,cAAc,EACdC,eAAe,EACfC,iBAAiB,EACjBC,UAAU,EACVC,gBAAgB,EAChBC,QAAQ,EACRC,kBAAkB,EAClBC,GAAG,EACHC,MAAM,EACNC,UAAU,EACVC,gBAAgB,EAChBC,UAAU,EACVC,uBAAuB,IAAI,EAC3BC,eAAe,IAAI,EACd;IACLlB,OAAOmB,OAAO,CAAC,CAACC,OAAOC;QACrBtB,cAAcuB,IAAI,CAChBlC,QAAQ;YACNE;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAuB;YACAtB;YACAuB;YACAtB;YACAE;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAO,eAAevB;YACfiB;YACAC;QACF;IAEJ;AACF,EAAC"}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"escapeSQLValue.d.ts","sourceRoot":"","sources":["../../src/utilities/escapeSQLValue.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,QAAmB,CAAA;AAEjD,eAAO,MAAM,cAAc,UAAW,OAAO,KAAG,OAAO,GAAG,IAAI,GAAG,MAAM,GAAG,MAoBzE,CAAA"}

View File

@@ -0,0 +1 @@
export default function useTimeZone(): import("../core.js").Timezone | undefined;

View File

@@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// https://github.com/ajv-validator/ajv/issues/889
const equal = require("fast-deep-equal");
equal.code = 'require("ajv/dist/runtime/equal").default';
exports.default = equal;
//# sourceMappingURL=equal.js.map

View File

@@ -0,0 +1,89 @@
"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 unique_constraint_exports = {};
__export(unique_constraint_exports, {
UniqueConstraint: () => UniqueConstraint,
UniqueConstraintBuilder: () => UniqueConstraintBuilder,
UniqueOnConstraintBuilder: () => UniqueOnConstraintBuilder,
unique: () => unique,
uniqueKeyName: () => uniqueKeyName
});
module.exports = __toCommonJS(unique_constraint_exports);
var import_entity = require("../entity.cjs");
var import_table_utils = require("../table.utils.cjs");
function unique(name) {
return new UniqueOnConstraintBuilder(name);
}
function uniqueKeyName(table, columns) {
return `${table[import_table_utils.TableName]}_${columns.join("_")}_unique`;
}
class UniqueConstraintBuilder {
constructor(columns, name) {
this.name = name;
this.columns = columns;
}
static [import_entity.entityKind] = "PgUniqueConstraintBuilder";
/** @internal */
columns;
/** @internal */
nullsNotDistinctConfig = false;
nullsNotDistinct() {
this.nullsNotDistinctConfig = true;
return this;
}
/** @internal */
build(table) {
return new UniqueConstraint(table, this.columns, this.nullsNotDistinctConfig, this.name);
}
}
class UniqueOnConstraintBuilder {
static [import_entity.entityKind] = "PgUniqueOnConstraintBuilder";
/** @internal */
name;
constructor(name) {
this.name = name;
}
on(...columns) {
return new UniqueConstraintBuilder(columns, this.name);
}
}
class UniqueConstraint {
constructor(table, columns, nullsNotDistinct, name) {
this.table = table;
this.columns = columns;
this.name = name ?? uniqueKeyName(this.table, this.columns.map((column) => column.name));
this.nullsNotDistinct = nullsNotDistinct;
}
static [import_entity.entityKind] = "PgUniqueConstraint";
columns;
name;
nullsNotDistinct = false;
getName() {
return this.name;
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
UniqueConstraint,
UniqueConstraintBuilder,
UniqueOnConstraintBuilder,
unique,
uniqueKeyName
});
//# sourceMappingURL=unique-constraint.cjs.map

View File

@@ -0,0 +1,25 @@
/**
* @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 EthernetPort = createLucideIcon("EthernetPort", [
[
"path",
{
d: "m15 20 3-3h2a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h2l3 3z",
key: "rbahqx"
}
],
["path", { d: "M6 8v1", key: "1636ez" }],
["path", { d: "M10 8v1", key: "1talb4" }],
["path", { d: "M14 8v1", key: "1rsfgr" }],
["path", { d: "M18 8v1", key: "gnkwox" }]
]);
export { EthernetPort as default };
//# sourceMappingURL=ethernet-port.js.map

View File

@@ -0,0 +1 @@
export type UnionToIntersection<Union> = (Union extends any ? (arg: Union) => void : never) extends (arg: infer Intersection) => void ? Intersection : never;

View File

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

View File

@@ -0,0 +1,528 @@
"use strict";
var _utils = require("./utils.js");
var _core = require("./core.js");
var _is = require("../validators/is.js");
const defineType = (0, _utils.defineAliasedType)("TypeScript");
const bool = (0, _utils.assertValueType)("boolean");
const tSFunctionTypeAnnotationCommon = () => ({
returnType: {
validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"),
optional: true
},
typeParameters: {
validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"),
optional: true
}
});
defineType("TSParameterProperty", {
aliases: ["LVal"],
visitor: ["parameter"],
fields: {
accessibility: {
validate: (0, _utils.assertOneOf)("public", "private", "protected"),
optional: true
},
readonly: {
validate: (0, _utils.assertValueType)("boolean"),
optional: true
},
parameter: {
validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern")
},
override: {
validate: (0, _utils.assertValueType)("boolean"),
optional: true
},
decorators: {
validate: (0, _utils.arrayOfType)("Decorator"),
optional: true
}
}
});
defineType("TSDeclareFunction", {
aliases: ["Statement", "Declaration"],
visitor: ["id", "typeParameters", "params", "returnType"],
fields: Object.assign({}, (0, _core.functionDeclarationCommon)(), tSFunctionTypeAnnotationCommon())
});
defineType("TSDeclareMethod", Object.assign({
visitor: ["decorators", "key", "typeParameters", "params", "returnType"]
}, (0, _core.classMethodOrPropertyUnionShapeCommon)(), {
fields: Object.assign({}, (0, _core.classMethodOrDeclareMethodCommon)(), tSFunctionTypeAnnotationCommon())
}));
defineType("TSQualifiedName", {
aliases: ["TSEntityName"],
visitor: ["left", "right"],
fields: {
left: (0, _utils.validateType)("TSEntityName"),
right: (0, _utils.validateType)("Identifier")
}
});
const signatureDeclarationCommon = () => ({
typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
["parameters"]: (0, _utils.validateArrayOfType)("ArrayPattern", "Identifier", "ObjectPattern", "RestElement"),
["typeAnnotation"]: (0, _utils.validateOptionalType)("TSTypeAnnotation")
});
const callConstructSignatureDeclaration = {
aliases: ["TSTypeElement"],
visitor: ["typeParameters", "parameters", "typeAnnotation"],
fields: signatureDeclarationCommon()
};
defineType("TSCallSignatureDeclaration", callConstructSignatureDeclaration);
defineType("TSConstructSignatureDeclaration", callConstructSignatureDeclaration);
const namedTypeElementCommon = () => ({
key: (0, _utils.validateType)("Expression"),
computed: {
default: false
},
optional: (0, _utils.validateOptional)(bool)
});
defineType("TSPropertySignature", {
aliases: ["TSTypeElement"],
visitor: ["key", "typeAnnotation"],
fields: Object.assign({}, namedTypeElementCommon(), {
readonly: (0, _utils.validateOptional)(bool),
typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
kind: {
optional: true,
validate: (0, _utils.assertOneOf)("get", "set")
}
})
});
defineType("TSMethodSignature", {
aliases: ["TSTypeElement"],
visitor: ["key", "typeParameters", "parameters", "typeAnnotation"],
fields: Object.assign({}, signatureDeclarationCommon(), namedTypeElementCommon(), {
kind: {
validate: (0, _utils.assertOneOf)("method", "get", "set")
}
})
});
defineType("TSIndexSignature", {
aliases: ["TSTypeElement"],
visitor: ["parameters", "typeAnnotation"],
fields: {
readonly: (0, _utils.validateOptional)(bool),
static: (0, _utils.validateOptional)(bool),
parameters: (0, _utils.validateArrayOfType)("Identifier"),
typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
}
});
const tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSIntrinsicKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"];
for (const type of tsKeywordTypes) {
defineType(type, {
aliases: ["TSType", "TSBaseType"],
visitor: [],
fields: {}
});
}
defineType("TSThisType", {
aliases: ["TSType", "TSBaseType"],
visitor: [],
fields: {}
});
const fnOrCtrBase = {
aliases: ["TSType"],
visitor: ["typeParameters", "parameters", "typeAnnotation"]
};
defineType("TSFunctionType", Object.assign({}, fnOrCtrBase, {
fields: signatureDeclarationCommon()
}));
defineType("TSConstructorType", Object.assign({}, fnOrCtrBase, {
fields: Object.assign({}, signatureDeclarationCommon(), {
abstract: (0, _utils.validateOptional)(bool)
})
}));
defineType("TSTypeReference", {
aliases: ["TSType"],
visitor: ["typeName", "typeParameters"],
fields: {
typeName: (0, _utils.validateType)("TSEntityName"),
["typeParameters"]: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
}
});
defineType("TSTypePredicate", {
aliases: ["TSType"],
visitor: ["parameterName", "typeAnnotation"],
builder: ["parameterName", "typeAnnotation", "asserts"],
fields: {
parameterName: (0, _utils.validateType)("Identifier", "TSThisType"),
typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
asserts: (0, _utils.validateOptional)(bool)
}
});
defineType("TSTypeQuery", {
aliases: ["TSType"],
visitor: ["exprName", "typeParameters"],
fields: {
exprName: (0, _utils.validateType)("TSEntityName", "TSImportType"),
["typeParameters"]: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
}
});
defineType("TSTypeLiteral", {
aliases: ["TSType"],
visitor: ["members"],
fields: {
members: (0, _utils.validateArrayOfType)("TSTypeElement")
}
});
defineType("TSArrayType", {
aliases: ["TSType"],
visitor: ["elementType"],
fields: {
elementType: (0, _utils.validateType)("TSType")
}
});
defineType("TSTupleType", {
aliases: ["TSType"],
visitor: ["elementTypes"],
fields: {
elementTypes: (0, _utils.validateArrayOfType)("TSType", "TSNamedTupleMember")
}
});
defineType("TSOptionalType", {
aliases: ["TSType"],
visitor: ["typeAnnotation"],
fields: {
typeAnnotation: (0, _utils.validateType)("TSType")
}
});
defineType("TSRestType", {
aliases: ["TSType"],
visitor: ["typeAnnotation"],
fields: {
typeAnnotation: (0, _utils.validateType)("TSType")
}
});
defineType("TSNamedTupleMember", {
visitor: ["label", "elementType"],
builder: ["label", "elementType", "optional"],
fields: {
label: (0, _utils.validateType)("Identifier"),
optional: {
validate: bool,
default: false
},
elementType: (0, _utils.validateType)("TSType")
}
});
const unionOrIntersection = {
aliases: ["TSType"],
visitor: ["types"],
fields: {
types: (0, _utils.validateArrayOfType)("TSType")
}
};
defineType("TSUnionType", unionOrIntersection);
defineType("TSIntersectionType", unionOrIntersection);
defineType("TSConditionalType", {
aliases: ["TSType"],
visitor: ["checkType", "extendsType", "trueType", "falseType"],
fields: {
checkType: (0, _utils.validateType)("TSType"),
extendsType: (0, _utils.validateType)("TSType"),
trueType: (0, _utils.validateType)("TSType"),
falseType: (0, _utils.validateType)("TSType")
}
});
defineType("TSInferType", {
aliases: ["TSType"],
visitor: ["typeParameter"],
fields: {
typeParameter: (0, _utils.validateType)("TSTypeParameter")
}
});
defineType("TSParenthesizedType", {
aliases: ["TSType"],
visitor: ["typeAnnotation"],
fields: {
typeAnnotation: (0, _utils.validateType)("TSType")
}
});
defineType("TSTypeOperator", {
aliases: ["TSType"],
visitor: ["typeAnnotation"],
builder: ["typeAnnotation", "operator"],
fields: {
operator: {
validate: (0, _utils.assertValueType)("string"),
default: "keyof"
},
typeAnnotation: (0, _utils.validateType)("TSType")
}
});
defineType("TSIndexedAccessType", {
aliases: ["TSType"],
visitor: ["objectType", "indexType"],
fields: {
objectType: (0, _utils.validateType)("TSType"),
indexType: (0, _utils.validateType)("TSType")
}
});
defineType("TSMappedType", {
aliases: ["TSType"],
visitor: ["typeParameter", "nameType", "typeAnnotation"],
builder: ["typeParameter", "typeAnnotation", "nameType"],
fields: Object.assign({}, {
typeParameter: (0, _utils.validateType)("TSTypeParameter")
}, {
readonly: (0, _utils.validateOptional)((0, _utils.assertOneOf)(true, false, "+", "-")),
optional: (0, _utils.validateOptional)((0, _utils.assertOneOf)(true, false, "+", "-")),
typeAnnotation: (0, _utils.validateOptionalType)("TSType"),
nameType: (0, _utils.validateOptionalType)("TSType")
})
});
defineType("TSTemplateLiteralType", {
aliases: ["TSType", "TSBaseType"],
visitor: ["quasis", "types"],
fields: {
quasis: (0, _utils.validateArrayOfType)("TemplateElement"),
types: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType")), function (node, key, val) {
if (node.quasis.length !== val.length + 1) {
throw new TypeError(`Number of ${node.type} quasis should be exactly one more than the number of types.\nExpected ${val.length + 1} quasis but got ${node.quasis.length}`);
}
})
}
}
});
defineType("TSLiteralType", {
aliases: ["TSType", "TSBaseType"],
visitor: ["literal"],
fields: {
literal: {
validate: function () {
const unaryExpression = (0, _utils.assertNodeType)("NumericLiteral", "BigIntLiteral");
const unaryOperator = (0, _utils.assertOneOf)("-");
const literal = (0, _utils.assertNodeType)("NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral", "TemplateLiteral");
const validator = function validator(parent, key, node) {
if ((0, _is.default)("UnaryExpression", node)) {
unaryOperator(node, "operator", node.operator);
unaryExpression(node, "argument", node.argument);
} else {
literal(parent, key, node);
}
};
validator.oneOfNodeTypes = ["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral", "TemplateLiteral", "UnaryExpression"];
return validator;
}()
}
}
});
defineType("TSExpressionWithTypeArguments", {
aliases: ["TSType"],
visitor: ["expression", "typeParameters"],
fields: {
expression: (0, _utils.validateType)("TSEntityName"),
typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
}
});
defineType("TSInterfaceDeclaration", {
aliases: ["Statement", "Declaration"],
visitor: ["id", "typeParameters", "extends", "body"],
fields: {
declare: (0, _utils.validateOptional)(bool),
id: (0, _utils.validateType)("Identifier"),
typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")),
body: (0, _utils.validateType)("TSInterfaceBody")
}
});
defineType("TSInterfaceBody", {
visitor: ["body"],
fields: {
body: (0, _utils.validateArrayOfType)("TSTypeElement")
}
});
defineType("TSTypeAliasDeclaration", {
aliases: ["Statement", "Declaration"],
visitor: ["id", "typeParameters", "typeAnnotation"],
fields: {
declare: (0, _utils.validateOptional)(bool),
id: (0, _utils.validateType)("Identifier"),
typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
typeAnnotation: (0, _utils.validateType)("TSType")
}
});
defineType("TSInstantiationExpression", {
aliases: ["Expression"],
visitor: ["expression", "typeParameters"],
fields: {
expression: (0, _utils.validateType)("Expression"),
["typeParameters"]: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
}
});
const TSTypeExpression = {
aliases: ["Expression", "LVal", "PatternLike"],
visitor: ["expression", "typeAnnotation"],
fields: {
expression: (0, _utils.validateType)("Expression"),
typeAnnotation: (0, _utils.validateType)("TSType")
}
};
defineType("TSAsExpression", TSTypeExpression);
defineType("TSSatisfiesExpression", TSTypeExpression);
defineType("TSTypeAssertion", {
aliases: ["Expression", "LVal", "PatternLike"],
visitor: ["typeAnnotation", "expression"],
fields: {
typeAnnotation: (0, _utils.validateType)("TSType"),
expression: (0, _utils.validateType)("Expression")
}
});
defineType("TSEnumBody", {
visitor: ["members"],
fields: {
members: (0, _utils.validateArrayOfType)("TSEnumMember")
}
});
defineType("TSEnumDeclaration", {
aliases: ["Statement", "Declaration"],
visitor: ["id", "members"],
fields: {
declare: (0, _utils.validateOptional)(bool),
const: (0, _utils.validateOptional)(bool),
id: (0, _utils.validateType)("Identifier"),
members: (0, _utils.validateArrayOfType)("TSEnumMember"),
initializer: (0, _utils.validateOptionalType)("Expression"),
body: (0, _utils.validateOptionalType)("TSEnumBody")
}
});
defineType("TSEnumMember", {
visitor: ["id", "initializer"],
fields: {
id: (0, _utils.validateType)("Identifier", "StringLiteral"),
initializer: (0, _utils.validateOptionalType)("Expression")
}
});
defineType("TSModuleDeclaration", {
aliases: ["Statement", "Declaration"],
visitor: ["id", "body"],
fields: Object.assign({
kind: {
validate: (0, _utils.assertOneOf)("global", "module", "namespace")
},
declare: (0, _utils.validateOptional)(bool)
}, {
global: (0, _utils.validateOptional)(bool)
}, {
id: (0, _utils.validateType)("Identifier", "StringLiteral"),
body: (0, _utils.validateType)("TSModuleBlock", "TSModuleDeclaration")
})
});
defineType("TSModuleBlock", {
aliases: ["Scopable", "Block", "BlockParent", "FunctionParent"],
visitor: ["body"],
fields: {
body: (0, _utils.validateArrayOfType)("Statement")
}
});
defineType("TSImportType", {
aliases: ["TSType"],
builder: ["argument", "qualifier", "typeParameters"],
visitor: ["argument", "options", "qualifier", "typeParameters"],
fields: Object.assign({}, {
argument: (0, _utils.validateType)("StringLiteral")
}, {
qualifier: (0, _utils.validateOptionalType)("TSEntityName")
}, {
typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
}, {
options: {
validate: (0, _utils.assertNodeType)("ObjectExpression"),
optional: true
}
})
});
defineType("TSImportEqualsDeclaration", {
aliases: ["Statement", "Declaration"],
visitor: ["id", "moduleReference"],
fields: Object.assign({}, {
isExport: (0, _utils.validate)(bool)
}, {
id: (0, _utils.validateType)("Identifier"),
moduleReference: (0, _utils.validateType)("TSEntityName", "TSExternalModuleReference"),
importKind: {
validate: (0, _utils.assertOneOf)("type", "value"),
optional: true
}
})
});
defineType("TSExternalModuleReference", {
visitor: ["expression"],
fields: {
expression: (0, _utils.validateType)("StringLiteral")
}
});
defineType("TSNonNullExpression", {
aliases: ["Expression", "LVal", "PatternLike"],
visitor: ["expression"],
fields: {
expression: (0, _utils.validateType)("Expression")
}
});
defineType("TSExportAssignment", {
aliases: ["Statement"],
visitor: ["expression"],
fields: {
expression: (0, _utils.validateType)("Expression")
}
});
defineType("TSNamespaceExportDeclaration", {
aliases: ["Statement"],
visitor: ["id"],
fields: {
id: (0, _utils.validateType)("Identifier")
}
});
defineType("TSTypeAnnotation", {
visitor: ["typeAnnotation"],
fields: {
typeAnnotation: {
validate: (0, _utils.assertNodeType)("TSType")
}
}
});
defineType("TSTypeParameterInstantiation", {
visitor: ["params"],
fields: {
params: (0, _utils.validateArrayOfType)("TSType")
}
});
defineType("TSTypeParameterDeclaration", {
visitor: ["params"],
fields: {
params: (0, _utils.validateArrayOfType)("TSTypeParameter")
}
});
defineType("TSTypeParameter", {
builder: ["constraint", "default", "name"],
visitor: ["constraint", "default"],
fields: {
name: {
validate: (0, _utils.assertValueType)("string")
},
in: {
validate: (0, _utils.assertValueType)("boolean"),
optional: true
},
out: {
validate: (0, _utils.assertValueType)("boolean"),
optional: true
},
const: {
validate: (0, _utils.assertValueType)("boolean"),
optional: true
},
constraint: {
validate: (0, _utils.assertNodeType)("TSType"),
optional: true
},
default: {
validate: (0, _utils.assertNodeType)("TSType"),
optional: true
}
}
});
//# sourceMappingURL=typescript.js.map

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F zC","1028":"B","1316":"A"},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 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","164":"9 0C VC J bB K D E F A B C L M G N O P cB AB 4C 5C","516":"BB CB DB EB FB GB"},D:{"1":"0 1 2 3 4 5 6 7 8 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 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC","33":"AB BB CB DB EB FB GB HB","164":"9 J bB K D E F A B C L M G N O P cB"},E:{"1":"F A B C L M G 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","33":"D E 8C 9C","164":"J bB K 6C bC 7C"},F:{"1":"0 1 2 3 4 5 6 7 8 9 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 p q r s t u v w x y z QC","2":"F B C JD KD LD MD PC xC ND","33":"G N"},G:{"1":"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","33":"E RD SD","164":"bC OD yC PD QD"},H:{"1":"mD"},I:{"1":"I rD sD","164":"VC J nD oD pD qD yC"},J:{"1":"A","164":"D"},K:{"1":"H QC","2":"A B C PC xC"},L:{"1":"I"},M:{"1":"OC"},N:{"1":"B","292":"A"},O:{"1":"RC"},P:{"1":"9 J AB BB CB DB EB FB GB HB IB tD uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D"},Q:{"1":"4D"},R:{"1":"5D"},S:{"1":"6D 7D"}},B:4,C:"CSS Flexible Box Layout Module",D:true};

View File

@@ -0,0 +1,127 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.mjs";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.mjs";
const matchOrdinalNumberPattern = /^(\d+)(èr|nd|en)?[a]?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(ab\.J\.C|apr\.J\.C|apr\.J\.-C)/i,
abbreviated: /^(ab\.J\.-C|ab\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,
wide: /^(abans Jèsus-Crist|après Jèsus-Crist)/i,
};
const parseEraPatterns = {
any: [/^ab/i, /^ap/i],
};
const matchQuarterPatterns = {
narrow: /^T[1234]/i,
abbreviated: /^[1234](èr|nd|en)? trim\.?/i,
wide: /^[1234](èr|nd|en)? trimèstre/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^(GN|FB|MÇ|AB|MA|JN|JL|AG|ST|OC|NV|DC)/i,
abbreviated: /^(gen|febr|març|abr|mai|junh|jul|ag|set|oct|nov|dec)\.?/i,
wide: /^(genièr|febrièr|març|abril|mai|junh|julhet|agost|setembre|octòbre|novembre|decembre)/i,
};
const parseMonthPatterns = {
any: [
/^g/i,
/^f/i,
/^ma[r?]|MÇ/i,
/^ab/i,
/^ma[i?]/i,
/^ju[n?]|JN/i,
/^ju[l?]|JL/i,
/^ag/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
};
const matchDayPatterns = {
narrow: /^d[glmcjvs]\.?/i,
short: /^d[glmcjvs]\.?/i,
abbreviated: /^d[glmcjvs]\.?/i,
wide: /^(dimenge|diluns|dimars|dimècres|dijòus|divendres|dissabte)/i,
};
const parseDayPatterns = {
narrow: [/^dg/i, /^dl/i, /^dm/i, /^dc/i, /^dj/i, /^dv/i, /^ds/i],
short: [/^dg/i, /^dl/i, /^dm/i, /^dc/i, /^dj/i, /^dv/i, /^ds/i],
abbreviated: [/^dg/i, /^dl/i, /^dm/i, /^dc/i, /^dj/i, /^dv/i, /^ds/i],
any: [
/^dg|dime/i,
/^dl|dil/i,
/^dm|dima/i,
/^dc|dimè/i,
/^dj|dij/i,
/^dv|div/i,
/^ds|dis/i,
],
};
const matchDayPeriodPatterns = {
any: /(^(a\.?m|p\.?m))|(ante meridiem|post meridiem)|((del |de la |de l)(matin|aprèp-miègjorn|vèspre|ser|nuèch))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /(^a)|ante meridiem/i,
pm: /(^p)|post meridiem/i,
midnight: /^mièj/i,
noon: /^mièg/i,
morning: /matin/i,
afternoon: /aprèp-miègjorn/i,
evening: /vèspre|ser/i,
night: /nuèch/i,
},
};
export const match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
};

View File

@@ -0,0 +1,120 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from 'react';
import { FieldLabel } from '../../fields/FieldLabel/index.js';
import { ChevronIcon } from '../../icons/Chevron/index.js';
import { useListQuery } from '../../providers/ListQuery/index.js';
import { useTranslation } from '../../providers/Translation/index.js';
import './index.scss';
const baseClass = 'sort-column';
export const SortColumn = props => {
const $ = _c(19);
const {
name,
appearance,
disable: t0,
Label,
label
} = props;
const disable = t0 === undefined ? false : t0;
const {
handleSortChange,
query
} = useListQuery();
const {
t
} = useTranslation();
const {
sort
} = query;
const desc = `-${name}`;
const asc = name;
let ascClasses;
if ($[0] !== asc || $[1] !== sort) {
ascClasses = [`${baseClass}__asc`];
if (sort === asc) {
ascClasses.push(`${baseClass}--active`);
}
$[0] = asc;
$[1] = sort;
$[2] = ascClasses;
} else {
ascClasses = $[2];
}
let descClasses;
if ($[3] !== desc || $[4] !== sort) {
descClasses = [`${baseClass}__desc`];
if (sort === desc) {
descClasses.push(`${baseClass}--active`);
}
$[3] = desc;
$[4] = sort;
$[5] = descClasses;
} else {
descClasses = $[5];
}
const t1 = appearance && `${baseClass}--appearance-${appearance}`;
let t2;
if ($[6] !== t1) {
t2 = [baseClass, t1].filter(Boolean);
$[6] = t1;
$[7] = t2;
} else {
t2 = $[7];
}
const t3 = t2.join(" ");
let t4;
if ($[8] !== Label || $[9] !== asc || $[10] !== ascClasses || $[11] !== desc || $[12] !== descClasses || $[13] !== disable || $[14] !== handleSortChange || $[15] !== label || $[16] !== t || $[17] !== t3) {
t4 = _jsxs("div", {
className: t3,
children: [_jsx("span", {
className: `${baseClass}__label`,
children: Label ?? _jsx(FieldLabel, {
hideLocale: true,
label,
unstyled: true
})
}), !disable && _jsxs("div", {
className: `${baseClass}__buttons`,
children: [_jsx("button", {
"aria-label": t("general:sortByLabelDirection", {
direction: t("general:ascending"),
label
}),
className: [...ascClasses, `${baseClass}__button`].filter(Boolean).join(" "),
onClick: () => void handleSortChange(asc),
type: "button",
children: _jsx(ChevronIcon, {
direction: "up"
})
}), _jsx("button", {
"aria-label": t("general:sortByLabelDirection", {
direction: t("general:descending"),
label
}),
className: [...descClasses, `${baseClass}__button`].filter(Boolean).join(" "),
onClick: () => void handleSortChange(desc),
type: "button",
children: _jsx(ChevronIcon, {})
})]
})]
});
$[8] = Label;
$[9] = asc;
$[10] = ascClasses;
$[11] = desc;
$[12] = descClasses;
$[13] = disable;
$[14] = handleSortChange;
$[15] = label;
$[16] = t;
$[17] = t3;
$[18] = t4;
} else {
t4 = $[18];
}
return t4;
};
//# sourceMappingURL=index.js.map

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 MessageCircleOff = createLucideIcon("MessageCircleOff", [
["path", { d: "M20.5 14.9A9 9 0 0 0 9.1 3.5", key: "1iebmn" }],
["path", { d: "m2 2 20 20", key: "1ooewy" }],
["path", { d: "M5.6 5.6C3 8.3 2.2 12.5 4 16l-2 6 6-2c3.4 1.8 7.6 1.1 10.3-1.7", key: "1ov8ce" }]
]);
export { MessageCircleOff as default };
//# sourceMappingURL=message-circle-off.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"items.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/items.ts"],"names":[],"mappings":";;;AAEA,mDAAuC;AACvC,6CAAqF;AACrF,kCAAqC;AAErC,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,OAAO;IACb,UAAU,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC;IAC1C,MAAM,EAAE,aAAa;IACrB,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,MAAM,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QACxB,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;YAAE,OAAO,aAAa,CAAC,GAAG,EAAE,iBAAiB,EAAE,MAAM,CAAC,CAAA;QAC/E,EAAE,CAAC,KAAK,GAAG,IAAI,CAAA;QACf,IAAI,IAAA,wBAAiB,EAAC,EAAE,EAAE,MAAM,CAAC;YAAE,OAAM;QACzC,GAAG,CAAC,EAAE,CAAC,IAAA,oBAAa,EAAC,GAAG,CAAC,CAAC,CAAA;IAC5B,CAAC;CACF,CAAA;AAED,SAAgB,aAAa,CAC3B,GAAe,EACf,UAAkB,EAClB,SAAsB,GAAG,CAAC,MAAM;IAEhC,MAAM,EAAC,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;IAClD,gBAAgB,CAAC,YAAY,CAAC,CAAA;IAC9B,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,IAAI,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,KAAK,KAAK,IAAI,EAAE,CAAC;QAC9D,EAAE,CAAC,KAAK,GAAG,qBAAc,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,CAAA;IAC/D,CAAC;IACD,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC/B,MAAM,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,IAAA,WAAC,EAAA,GAAG,IAAI,SAAS,CAAC,CAAA;IAC/C,MAAM,CAAC,OAAO,CAAC,CAAC,GAAc,EAAE,CAAS,EAAE,EAAE;QAC3C,IAAI,IAAA,wBAAiB,EAAC,EAAE,EAAE,GAAG,CAAC;YAAE,OAAM;QACtC,GAAG,CAAC,EAAE,CAAC,IAAA,WAAC,EAAA,GAAG,GAAG,MAAM,CAAC,EAAE,EAAE,GAAG,EAAE,CAC5B,GAAG,CAAC,SAAS,CACX;YACE,OAAO;YACP,UAAU,EAAE,CAAC;YACb,QAAQ,EAAE,CAAC;SACZ,EACD,KAAK,CACN,CACF,CAAA;QACD,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,CAAA;IACf,CAAC,CAAC,CAAA;IAEF,SAAS,gBAAgB,CAAC,GAAoB;QAC5C,MAAM,EAAC,IAAI,EAAE,aAAa,EAAC,GAAG,EAAE,CAAA;QAChC,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,CAAA;QACvB,MAAM,SAAS,GAAG,CAAC,KAAK,GAAG,CAAC,QAAQ,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,UAAU,CAAC,KAAK,KAAK,CAAC,CAAA;QACzF,IAAI,IAAI,CAAC,YAAY,IAAI,CAAC,SAAS,EAAE,CAAC;YACpC,MAAM,GAAG,GAAG,IAAI,OAAO,QAAQ,CAAC,oCAAoC,UAAU,4CAA4C,aAAa,GAAG,CAAA;YAC1I,IAAA,sBAAe,EAAC,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,YAAY,CAAC,CAAA;QAC7C,CAAC;IACH,CAAC;AACH,CAAC;AApCD,sCAoCC;AAED,kBAAe,GAAG,CAAA"}

View File

@@ -0,0 +1,56 @@
"use strict";
exports.closestIndexTo = closestIndexTo;
var _index = require("./toDate.cjs");
/**
* @name closestIndexTo
* @category Common Helpers
* @summary Return an index of the closest date from the array comparing to the given date.
*
* @description
* Return an index of the closest date from the array comparing to the given date.
*
* @param dateToCompare - The date to compare with
* @param dates - The array to search
*
* @returns An index of the date closest to the given date or undefined if no valid value is given
*
* @example
* // Which date is closer to 6 September 2015?
* const dateToCompare = new Date(2015, 8, 6)
* const datesArray = [
* new Date(2015, 0, 1),
* new Date(2016, 0, 1),
* new Date(2017, 0, 1)
* ]
* const result = closestIndexTo(dateToCompare, datesArray)
* //=> 1
*/
function closestIndexTo(dateToCompare, dates) {
// [TODO] It would be better to return -1 here rather than undefined, as this
// is how JS behaves, but it would be a breaking change, so we need
// to consider it for v4.
const timeToCompare = +(0, _index.toDate)(dateToCompare);
if (isNaN(timeToCompare)) return NaN;
let result;
let minDistance;
dates.forEach((date, index) => {
const date_ = (0, _index.toDate)(date);
if (isNaN(+date_)) {
result = NaN;
minDistance = NaN;
return;
}
const distance = Math.abs(timeToCompare - +date_);
if (result == null || distance < minDistance) {
result = index;
minDistance = distance;
}
});
return result;
}

View File

@@ -0,0 +1,27 @@
import type { ContextOptions, DateArg } from "./types.js";
/**
* The {@link isFriday} function options.
*/
export interface IsFridayOptions extends ContextOptions<Date> {}
/**
* @name isFriday
* @category Weekday Helpers
* @summary Is the given date Friday?
*
* @description
* Is the given date Friday?
*
* @param date - The date to check
* @param options - An object with options
*
* @returns The date is Friday
*
* @example
* // Is 26 September 2014 Friday?
* const result = isFriday(new Date(2014, 8, 26))
* //=> true
*/
export declare function isFriday(
date: DateArg<Date> & {},
options?: IsFridayOptions | undefined,
): boolean;

View File

@@ -0,0 +1,7 @@
function isRefObject(ref) {
return (ref &&
typeof ref === "object" &&
Object.prototype.hasOwnProperty.call(ref, "current"));
}
export { isRefObject };

View File

@@ -0,0 +1 @@
{"version":3,"file":"consola.d.ts","sourceRoot":"","sources":["../../../src/integrations/consola.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAIxC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D;;GAEG;AACH,UAAU,sBAAsB;IAC9B;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAEjC;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;CACzC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;;;;;;;;OAeG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IAEvB;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;;;;;;;;OAYG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;IAEjB;;;;OAIG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;IAEZ;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,sBAA2B,GAAG,eAAe,CA0D3F"}

View File

@@ -0,0 +1,349 @@
import { memoize } from "@formatjs/fast-memoize";
import { data as jsonData } from "./languageMatching.js";
import { regions } from "./regions.generated.js";
export const UNICODE_EXTENSION_SEQUENCE_REGEX = /-u(?:-[0-9a-z]{2,8})+/gi;
/**
* Asserts that a condition is true, throwing an error if it is not.
* Used for runtime validation and type narrowing.
*
* @param condition - The condition to check
* @param message - Error message if condition is false
* @param Err - Error constructor to use (defaults to Error)
* @throws {Error} When condition is false
*
* @example
* ```ts
* invariant(locale !== undefined, 'Locale must be defined')
* // locale is now narrowed to non-undefined type
* ```
*/
export function invariant(condition, message, Err = Error) {
if (!condition) {
throw new Err(message);
}
}
// This is effectively 2 languages in 2 different regions in the same cluster
const DEFAULT_MATCHING_THRESHOLD = 838;
let PROCESSED_DATA;
function processData() {
if (!PROCESSED_DATA) {
const paradigmLocales = jsonData.supplemental.languageMatching["written-new"][0]?.paradigmLocales?._locales.split(" ");
const matchVariables = jsonData.supplemental.languageMatching["written-new"].slice(1, 5);
const data = jsonData.supplemental.languageMatching["written-new"].slice(5);
const matches = data.map((d) => {
const key = Object.keys(d)[0];
const value = d[key];
return {
supported: key,
desired: value._desired,
distance: +value._distance,
oneway: value.oneway === "true" ? true : false
};
}, {});
PROCESSED_DATA = {
matches,
matchVariables: matchVariables.reduce((all, d) => {
const key = Object.keys(d)[0];
const value = d[key];
all[key.slice(1)] = value._value.split("+");
return all;
}, {}),
paradigmLocales: [...paradigmLocales, ...paradigmLocales.map((l) => new Intl.Locale(l.replace(/_/g, "-")).maximize().toString())]
};
}
return PROCESSED_DATA;
}
function isMatched(locale, languageMatchInfoLocale, matchVariables) {
const [language, script, region] = languageMatchInfoLocale.split("-");
let matches = true;
if (region && region[0] === "$") {
const shouldInclude = region[1] !== "!";
const matchRegions = shouldInclude ? matchVariables[region.slice(1)] : matchVariables[region.slice(2)];
const expandedMatchedRegions = matchRegions.map((r) => regions[r] || [r]).reduce((all, list) => [...all, ...list], []);
matches &&= !(expandedMatchedRegions.indexOf(locale.region || "") > -1 != shouldInclude);
} else {
matches &&= locale.region ? region === "*" || region === locale.region : true;
}
matches &&= locale.script ? script === "*" || script === locale.script : true;
matches &&= locale.language ? language === "*" || language === locale.language : true;
return matches;
}
function serializeLSR(lsr) {
return [
lsr.language,
lsr.script,
lsr.region
].filter(Boolean).join("-");
}
function findMatchingDistanceForLSR(desired, supported, data) {
for (const d of data.matches) {
let matches = isMatched(desired, d.desired, data.matchVariables) && isMatched(supported, d.supported, data.matchVariables);
if (!d.oneway && !matches) {
matches = isMatched(desired, d.supported, data.matchVariables) && isMatched(supported, d.desired, data.matchVariables);
}
if (matches) {
const distance = d.distance * 10;
if (data.paradigmLocales.indexOf(serializeLSR(desired)) > -1 != data.paradigmLocales.indexOf(serializeLSR(supported)) > -1) {
return distance - 1;
}
return distance;
}
}
throw new Error("No matching distance found");
}
function findMatchingDistanceImpl(desired, supported) {
const desiredLocale = new Intl.Locale(desired).maximize();
const supportedLocale = new Intl.Locale(supported).maximize();
const desiredLSR = {
language: desiredLocale.language,
script: desiredLocale.script || "",
region: desiredLocale.region || ""
};
const supportedLSR = {
language: supportedLocale.language,
script: supportedLocale.script || "",
region: supportedLocale.region || ""
};
let matchingDistance = 0;
const data = processData();
if (desiredLSR.language !== supportedLSR.language) {
matchingDistance += findMatchingDistanceForLSR({
language: desiredLocale.language,
script: "",
region: ""
}, {
language: supportedLocale.language,
script: "",
region: ""
}, data);
}
if (desiredLSR.script !== supportedLSR.script) {
matchingDistance += findMatchingDistanceForLSR({
language: desiredLocale.language,
script: desiredLSR.script,
region: ""
}, {
language: supportedLocale.language,
script: supportedLSR.script,
region: ""
}, data);
}
if (desiredLSR.region !== supportedLSR.region) {
matchingDistance += findMatchingDistanceForLSR(desiredLSR, supportedLSR, data);
}
return matchingDistance;
}
/**
* Calculates the matching distance between two locales using the CLDR Enhanced Language Matching algorithm.
* This function is memoized for performance, as distance calculations are expensive.
*
* The distance represents how "far apart" two locales are, with 0 being identical (after maximization).
* Distances are calculated based on Language-Script-Region (LSR) differences using CLDR data.
*
* @param desired - The desired locale (e.g., "en-US")
* @param supported - The supported locale to compare against (e.g., "en-GB")
* @returns The calculated distance between the locales
*
* @example
* ```ts
* findMatchingDistance('en-US', 'en-US') // 0 - identical
* findMatchingDistance('en-US', 'en-GB') // 40 - same language/script, different region
* findMatchingDistance('es-CO', 'es-419') // 39 - regional variant
* findMatchingDistance('en', 'fr') // 840 - completely different languages
* ```
*
* @see https://unicode.org/reports/tr35/#EnhancedLanguageMatching
*/
export const findMatchingDistance = memoize(findMatchingDistanceImpl, { serializer: (args) => `${args[0]}|${args[1]}` });
/**
* Generates fallback candidates by progressively removing subtags
* e.g., "en-US" -> ["en-US", "en"]
* "zh-Hans-CN" -> ["zh-Hans-CN", "zh-Hans", "zh"]
*/
function getFallbackCandidates(locale) {
const candidates = [];
let current = locale;
while (current) {
candidates.push(current);
const lastDash = current.lastIndexOf("-");
if (lastDash === -1) break;
current = current.substring(0, lastDash);
}
return candidates;
}
/**
* Finds the best locale match using a three-tier optimization hierarchy.
*
* ## Three-Tier Matching Algorithm:
*
* **Tier 1 - Fast Path** (O(n)): Exact string matching via Set lookup
* - Example: 'en' matches 'en' exactly → distance 0
* - Solves #4936: 48x faster than baseline (12ms vs 610ms with 700+ locales)
*
* **Tier 2 - Fallback Path** (O(k×n)): Maximization + progressive subtag removal
* - Maximizes requested locale, then removes subtags right-to-left
* - Example: "zh-TW" → "zh-Hant-TW" → ["zh-Hant-TW", "zh-Hant", "zh"]
* - Distance: 0 for maximized match, 10 per removed subtag + position penalty
* - 40-50x faster than full UTS #35, handles 99% of real-world cases correctly
*
* **Tier 3 - Slow Path** (O(n×m), memoized): Full UTS #35 CLDR matching
* - Calculates Language-Script-Region distances using CLDR data
* - Handles complex cases like cross-script matching (sr-Cyrl ↔ sr-Latn)
* - Only used when Tiers 1 & 2 find no match
* - Still 6x faster than baseline due to memoization
*
* ## Performance Impact of Maximization:
*
* While Tier 2 now calls `Intl.Locale().maximize()` once per requested locale,
* this is still much faster than Tier 3's full distance calculation:
* - Tier 1: ~12ms (exact match, no maximization)
* - Tier 2: ~13-15ms (maximization + fallback)
* - Tier 3: ~100ms+ (full UTS #35 with all supported locales)
*
* @param requestedLocales - Locale identifiers in preference order
* @param supportedLocales - Available locale identifiers
* @param threshold - Maximum distance (default: 838, from CLDR)
* @returns Matching result with distances
*
* @example
* ```ts
* // Tier 1: Exact match
* findBestMatch(['en'], ['en', 'fr'])
* // → { matchedSupportedLocale: 'en', distances: { en: { en: 0 } } }
*
* // Tier 2: Fallback with maximization
* findBestMatch(['zh-TW'], ['zh-Hant'])
* // → zh-TW maximizes to zh-Hant-TW, falls back to zh-Hant (distance 0)
*
* findBestMatch(['en-US'], ['en'])
* // → en-US maximizes to en-Latn-US, falls back to en (distance 10)
*
* // Tier 3: Full calculation
* findBestMatch(['en-XZ'], ['ja', 'ko'])
* // → No fallback match, uses UTS #35 to find closest match
* ```
*
* @see https://unicode.org/reports/tr35/#EnhancedLanguageMatching
* @see https://github.com/formatjs/formatjs/issues/4936
*/
// WeakMap to cache canonicalized supported locales arrays
const canonicalizedSupportedCache = new WeakMap();
export function findBestMatch(requestedLocales, supportedLocales, threshold = DEFAULT_MATCHING_THRESHOLD) {
let lowestDistance = Infinity;
let result = {
matchedDesiredLocale: "",
distances: {}
};
// Get or compute canonicalized supported locales (one by one to preserve indices)
let canonicalizedSupportedLocales = canonicalizedSupportedCache.get(supportedLocales);
if (!canonicalizedSupportedLocales) {
canonicalizedSupportedLocales = supportedLocales.map((locale) => {
try {
const canonical = Intl.getCanonicalLocales([locale]);
return canonical[0] || locale;
} catch {
return locale;
}
});
canonicalizedSupportedCache.set(supportedLocales, canonicalizedSupportedLocales);
}
const supportedSet = new Set(canonicalizedSupportedLocales);
// === TIER 1: FAST PATH - Exact Match ===
// Check for exact matches in ALL requested locales
// This is the fastest path and handles the majority of real-world cases
for (let i = 0; i < requestedLocales.length; i++) {
const desired = requestedLocales[i];
if (supportedSet.has(desired)) {
const distance = 0 + i * 40;
result.distances[desired] = { [desired]: distance };
if (distance < lowestDistance) {
lowestDistance = distance;
result.matchedDesiredLocale = desired;
result.matchedSupportedLocale = desired;
}
// Only return immediately if this is the first requested locale (distance=0)
// Otherwise, continue checking for potentially better matches
if (i === 0) {
return result;
}
}
}
// If we found an exact match in Tier 1 (but not for first locale), check Tier 2
// to see if there's a better fallback match with lower distance
// If no exact match found, Tier 2 will find fallback matches
// === TIER 2: FALLBACK PATH - Maximization + Progressive Subtag Removal ===
// Try maximization-based matching before resorting to expensive Tier 3
// This handles cases like zh-TW → zh-Hant efficiently
for (let i = 0; i < requestedLocales.length; i++) {
const desired = requestedLocales[i];
// Maximize then fallback (for linguistic accuracy like zh-TW → zh-Hant)
try {
const maximized = new Intl.Locale(desired).maximize().toString();
if (maximized !== desired) {
const maximizedCandidates = getFallbackCandidates(maximized);
for (let j = 0; j < maximizedCandidates.length; j++) {
const candidate = maximizedCandidates[j];
if (candidate === desired) continue;
if (supportedSet.has(candidate)) {
// Check if candidate also maximizes to the same form
// e.g., zh-TW → zh-Hant-TW and zh-Hant → zh-Hant-TW (distance 0)
// but es-co → es-Latn-CO and es → es-Latn-ES (distance 10)
let distance;
try {
const candidateMaximized = new Intl.Locale(candidate).maximize().toString();
distance = candidateMaximized === maximized ? 0 + i * 40 : j * 10 + i * 40;
} catch {
distance = j * 10 + i * 40;
}
if (!result.distances[desired]) {
result.distances[desired] = {};
}
result.distances[desired][candidate] = distance;
if (distance < lowestDistance) {
lowestDistance = distance;
result.matchedDesiredLocale = desired;
result.matchedSupportedLocale = candidate;
}
break;
}
}
}
} catch {}
}
// If Tier 2 found a perfect maximized match (distance 0), return immediately (fast path)
if (result.matchedSupportedLocale && lowestDistance === 0) {
return result;
}
// === TIER 3: SLOW PATH - Full UTS #35 Distance Calculation ===
// Always run Tier 3 for full CLDR accuracy
// Tier 3 may find better matches than Tier 2's fallback approach
// findMatchingDistance is memoized, so repeated calculations are cached
requestedLocales.forEach((desired, i) => {
if (!result.distances[desired]) {
result.distances[desired] = {};
}
canonicalizedSupportedLocales.forEach((canonicalLocale, supportedIndex) => {
const originalSupported = supportedLocales[supportedIndex];
// findMatchingDistance is memoized via fast-memoize
// Use the canonical locale for distance calculation
const distance = findMatchingDistance(desired, canonicalLocale);
// Add some weight to the distance based on the order of the supported locales
// Add penalty for the order of the requested locales, which currently is 0 since ECMA-402
// doesn't really have room for weighted locales like `en; q=0.1`
const finalDistance = distance + 0 + i * 40;
// Store and return the original locale, not the canonical one
// Tier 3 overwrites Tier 2 distances (Tier 3 is more accurate)
result.distances[desired][originalSupported] = finalDistance;
if (finalDistance < lowestDistance) {
lowestDistance = finalDistance;
result.matchedDesiredLocale = desired;
result.matchedSupportedLocale = originalSupported;
}
});
});
if (lowestDistance >= threshold) {
result.matchedDesiredLocale = undefined;
result.matchedSupportedLocale = undefined;
}
return result;
}

View File

@@ -0,0 +1,9 @@
import type { Locale } from "./types.js";
/**
* @category Locales
* @summary Persian/Farsi locale (Iran).
* @language Persian
* @iso-639-2 ira
* @author Morteza Ziyae [@mort3za](https://github.com/mort3za)
*/
export declare const faIR: Locale;

View File

@@ -0,0 +1,20 @@
export const parseCookies = (headers)=>{
const list = new Map();
const rc = headers.get('Cookie');
if (rc) {
rc.split(';').forEach((cookie)=>{
const parts = cookie.split('=');
const key = parts.shift()?.trim();
const encodedValue = parts.join('=');
try {
const decodedValue = decodeURI(encodedValue);
list.set(key, decodedValue);
} catch {
// ignore invalid encoded values
}
});
}
return list;
};
//# sourceMappingURL=parseCookies.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["React","CloseMenuIcon","_jsx","className","viewBox","xmlns","d","strokeLinecap"],"sources":["../../../src/icons/CloseMenu/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport './index.scss'\n\nexport const CloseMenuIcon: React.FC = () => (\n <svg className=\"icon icon--close-menu\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\">\n <path className=\"stroke\" d=\"M14 6L6 14M6 6L14 14\" strokeLinecap=\"square\" />\n </svg>\n)\n"],"mappings":";AAAA,OAAOA,KAAA,MAAW;AAElB,OAAO;AAEP,OAAO,MAAMC,aAAA,GAA0BA,CAAA,kBACrCC,IAAA,CAAC;EAAIC,SAAA,EAAU;EAAwBC,OAAA,EAAQ;EAAYC,KAAA,EAAM;YAC/D,aAAAH,IAAA,CAAC;IAAKC,SAAA,EAAU;IAASG,CAAA,EAAE;IAAuBC,aAAA,EAAc","ignoreList":[]}

View File

@@ -0,0 +1,7 @@
/*
* This file was automatically generated.
* DO NOT MODIFY BY HAND.
* Run `yarn fix:special` to update
*/
declare const check: (options: import("../../declarations/plugins/IgnorePlugin").IgnorePluginOptions) => boolean;
export = check;

View File

@@ -0,0 +1,351 @@
/**
* 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 { CommandPayloadType, EditorThemeClasses, Klass, LexicalCommand, MutatedNodes, MutationListeners, NodeMutation, RegisteredNode, RegisteredNodes, Spread } from './LexicalEditor';
import type { EditorState } from './LexicalEditorState';
import type { BaseSelection, PointType, RangeSelection } from './LexicalSelection';
import type { RootNode } from './nodes/LexicalRootNode';
import { DecoratorNode, ElementNode, LineBreakNode, UpdateTag } from '.';
import { LexicalEditor } from './LexicalEditor';
import { LexicalNode, type NodeKey, type NodeMap, type StaticNodeConfigValue } from './LexicalNode';
import { type TextFormatType, TextNode } from './nodes/LexicalTextNode';
export declare const emptyFunction: () => void;
export declare function setPendingNodeToClone(pendingNode: null | LexicalNode): void;
export declare function getPendingNodeToClone(): null | LexicalNode;
export declare function resetRandomKey(): void;
export declare function generateRandomKey(): string;
/**
* @internal
*/
export declare function getRegisteredNodeOrThrow(editor: LexicalEditor, nodeType: string): RegisteredNode;
/**
* @internal
*/
export declare function getRegisteredNode(editor: LexicalEditor, nodeType: string): undefined | RegisteredNode;
export declare const isArray: (arg: any) => arg is any[];
export declare const scheduleMicroTask: (fn: () => void) => void;
export declare function $isSelectionCapturedInDecorator(node: Node): boolean;
export declare function isSelectionCapturedInDecoratorInput(anchorDOM: Node): boolean;
export declare function isSelectionWithinEditor(editor: LexicalEditor, anchorDOM: null | Node, focusDOM: null | Node): boolean;
/**
* @returns true if the given argument is a LexicalEditor instance from this build of Lexical
*/
export declare function isLexicalEditor(editor: unknown): editor is LexicalEditor;
export declare function getNearestEditorFromDOMNode(node: Node | null): LexicalEditor | null;
/** @internal */
export declare function getEditorPropertyFromDOMNode(node: Node | null): unknown;
export declare function getTextDirection(text: string): 'ltr' | 'rtl' | null;
/**
* Return true if the TextNode is a TabNode or is in token mode.
*/
export declare function $isTokenOrTab(node: TextNode): boolean;
/**
* Return true if the TextNode is a TabNode, or is in token or segmented mode.
*/
export declare function $isTokenOrSegmented(node: TextNode): boolean;
/**
* @param node - The element being tested
* @returns Returns true if node is an DOM Text node, false otherwise.
*/
export declare function isDOMTextNode(node: unknown): node is Text;
/**
* @param node - The element being tested
* @returns Returns true if node is an DOM Document node, false otherwise.
*/
export declare function isDOMDocumentNode(node: unknown): node is Document;
export declare function getDOMTextNode(element: Node | null): Text | null;
export declare function toggleTextFormatType(format: number, type: TextFormatType, alignWithFormat: null | number): number;
export declare function $isLeafNode(node: LexicalNode | null | undefined): node is TextNode | LineBreakNode | DecoratorNode<unknown>;
export declare function $setNodeKey(node: LexicalNode, existingKey: NodeKey | null | undefined): void;
/**
* Removes a node from its parent, updating all necessary pointers and links.
* @internal
*
* This function is for internal use of the library.
* Please do not use it as it may change in the future.
*/
export declare function removeFromParent(node: LexicalNode): void;
export declare function internalMarkNodeAsDirty(node: LexicalNode): void;
export declare function internalMarkSiblingsAsDirty(node: LexicalNode): void;
export declare function $setCompositionKey(compositionKey: null | NodeKey): void;
export declare function $getCompositionKey(): null | NodeKey;
export declare function $getNodeByKey<T extends LexicalNode>(key: NodeKey, _editorState?: EditorState): T | null;
export declare function $getNodeFromDOMNode(dom: Node, editorState?: EditorState): LexicalNode | null;
export declare function setNodeKeyOnDOMNode(dom: Node, editor: LexicalEditor, key: NodeKey): void;
export declare function getNodeKeyFromDOMNode(dom: Node, editor: LexicalEditor): NodeKey | undefined;
export declare function $getNearestNodeFromDOMNode(startingDOM: Node, editorState?: EditorState): LexicalNode | null;
export declare function cloneDecorators(editor: LexicalEditor): Record<NodeKey, unknown>;
export declare function getEditorStateTextContent(editorState: EditorState): string;
export declare function markNodesWithTypesAsDirty(editor: LexicalEditor, types: string[]): void;
export declare function $getRoot(): RootNode;
export declare function internalGetRoot(editorState: EditorState): RootNode;
export declare function $setSelection(selection: null | BaseSelection): void;
export declare function $flushMutations(): void;
export declare function $getNodeFromDOM(dom: Node): null | LexicalNode;
/**
* Return true if `str` contains any valid surrogate pair.
*
* See also $updateCaretSelectionForUnicodeCharacter for
* a discussion on when and why this is useful.
*/
export declare function doesContainSurrogatePair(str: string): boolean;
export declare function getEditorsToPropagate(editor: LexicalEditor): Array<LexicalEditor>;
export declare function createUID(): string;
export declare function getAnchorTextFromDOM(anchorNode: Node): null | string;
export declare function $updateSelectedTextFromDOM(isCompositionEnd: boolean, editor: LexicalEditor, data?: string): void;
export declare function $updateTextNodeFromDOMContent(textNode: TextNode, textContent: string, anchorOffset: null | number, focusOffset: null | number, compositionEnd: boolean): void;
export declare function $shouldInsertTextAfterOrBeforeTextNode(selection: RangeSelection, node: TextNode): boolean;
/**
* A KeyboardEvent or structurally similar object with a string `key` as well
* as `altKey`, `ctrlKey`, `metaKey`, and `shiftKey` boolean properties.
*/
export type KeyboardEventModifiers = Pick<KeyboardEvent, 'key' | 'metaKey' | 'ctrlKey' | 'shiftKey' | 'altKey'>;
/**
* A record of keyboard modifiers that must be enabled.
* If the value is `'any'` then the modifier key's state is ignored.
* If the value is `true` then the modifier key must be pressed.
* If the value is `false` or the property is omitted then the modifier key must
* not be pressed.
*/
export type KeyboardEventModifierMask = {
[K in Exclude<keyof KeyboardEventModifiers, 'key'>]?: boolean | undefined | 'any';
};
/**
* Match a KeyboardEvent with its expected modifier state
*
* @param event A KeyboardEvent, or structurally similar object
* @param mask An object specifying the expected state of the modifiers
* @returns true if the event matches
*/
export declare function isModifierMatch(event: KeyboardEventModifiers, mask: KeyboardEventModifierMask): boolean;
/**
* Match a KeyboardEvent with its expected state
*
* @param event A KeyboardEvent, or structurally similar object
* @param expectedKey The string to compare with event.key (case insensitive)
* @param mask An object specifying the expected state of the modifiers
* @returns true if the event matches
*/
export declare function isExactShortcutMatch(event: KeyboardEventModifiers, expectedKey: string, mask: KeyboardEventModifierMask): boolean;
export declare function isTab(event: KeyboardEventModifiers): boolean;
export declare function isBold(event: KeyboardEventModifiers): boolean;
export declare function isItalic(event: KeyboardEventModifiers): boolean;
export declare function isUnderline(event: KeyboardEventModifiers): boolean;
export declare function isParagraph(event: KeyboardEventModifiers): boolean;
export declare function isLineBreak(event: KeyboardEventModifiers): boolean;
export declare function isOpenLineBreak(event: KeyboardEventModifiers): boolean;
export declare function isDeleteWordBackward(event: KeyboardEventModifiers): boolean;
export declare function isDeleteWordForward(event: KeyboardEventModifiers): boolean;
export declare function isDeleteLineBackward(event: KeyboardEventModifiers): boolean;
export declare function isDeleteLineForward(event: KeyboardEventModifiers): boolean;
export declare function isDeleteBackward(event: KeyboardEventModifiers): boolean;
export declare function isDeleteForward(event: KeyboardEventModifiers): boolean;
export declare function isUndo(event: KeyboardEventModifiers): boolean;
export declare function isRedo(event: KeyboardEventModifiers): boolean;
export declare function isCopy(event: KeyboardEventModifiers): boolean;
export declare function isCut(event: KeyboardEventModifiers): boolean;
export declare function isMoveBackward(event: KeyboardEventModifiers): boolean;
export declare function isMoveToStart(event: KeyboardEventModifiers): boolean;
export declare function isMoveForward(event: KeyboardEventModifiers): boolean;
export declare function isMoveToEnd(event: KeyboardEventModifiers): boolean;
export declare function isMoveUp(event: KeyboardEventModifiers): boolean;
export declare function isMoveDown(event: KeyboardEventModifiers): boolean;
export declare function isModifier(event: KeyboardEventModifiers): boolean;
export declare function isSpace(event: KeyboardEventModifiers): boolean;
export declare function controlOrMeta(metaKey: boolean, ctrlKey: boolean): boolean;
export declare function isBackspace(event: KeyboardEventModifiers): boolean;
export declare function isEscape(event: KeyboardEventModifiers): boolean;
export declare function isDelete(event: KeyboardEventModifiers): boolean;
export declare function isSelectAll(event: KeyboardEventModifiers): boolean;
export declare function $selectAll(selection?: RangeSelection | null): RangeSelection;
export declare function getCachedClassNameArray(classNamesTheme: EditorThemeClasses, classNameThemeType: string): Array<string>;
export declare function setMutatedNode(mutatedNodes: MutatedNodes, registeredNodes: RegisteredNodes, mutationListeners: MutationListeners, node: LexicalNode, mutation: NodeMutation): void;
/**
* @deprecated Use {@link LexicalEditor.registerMutationListener} with `skipInitialization: false` instead.
*/
export declare function $nodesOfType<T extends LexicalNode>(klass: Klass<T>): Array<T>;
export declare function $getAdjacentNode(focus: PointType, isBackward: boolean): null | LexicalNode;
export declare function isFirefoxClipboardEvents(editor: LexicalEditor): boolean;
export declare function dispatchCommand<TCommand extends LexicalCommand<unknown>>(editor: LexicalEditor, command: TCommand, payload: CommandPayloadType<TCommand>): boolean;
export declare function $textContentRequiresDoubleLinebreakAtEnd(node: ElementNode): boolean;
export declare function getElementByKeyOrThrow(editor: LexicalEditor, key: NodeKey): HTMLElement;
export declare function getParentElement(node: Node): HTMLElement | null;
export declare function getDOMOwnerDocument(target: EventTarget | null): Document | null;
export declare function scrollIntoViewIfNeeded(editor: LexicalEditor, selectionRect: DOMRect, rootElement: HTMLElement): void;
export declare function $hasUpdateTag(tag: UpdateTag): boolean;
export declare function $addUpdateTag(tag: UpdateTag): void;
/**
* Add a function to run after the current update. This will run after any
* `onUpdate` function already supplied to `editor.update()`, as well as any
* functions added with previous calls to `$onUpdate`.
*
* @param updateFn The function to run after the current update.
*/
export declare function $onUpdate(updateFn: () => void): void;
export declare function $maybeMoveChildrenSelectionToParent(parentNode: LexicalNode): BaseSelection | null;
export declare function $hasAncestor(child: LexicalNode, targetNode: LexicalNode): boolean;
export declare function getDefaultView(domElem: EventTarget | null): Window | null;
export declare function getWindow(editor: LexicalEditor): Window;
export declare function $isInlineElementOrDecoratorNode(node: LexicalNode): boolean;
export declare function $getNearestRootOrShadowRoot(node: LexicalNode): RootNode | ElementNode;
declare const ShadowRootNodeBrand: unique symbol;
type ShadowRootNode = Spread<{
isShadowRoot(): true;
[ShadowRootNodeBrand]: never;
}, ElementNode>;
export declare function $isRootOrShadowRoot(node: null | LexicalNode): node is RootNode | ShadowRootNode;
/**
* Returns a shallow clone of node with a new key. All properties of the node
* will be copied to the new node (by `clone` and then `afterCloneFrom`),
* except those related to parent/sibling/child
* relationships in the `EditorState`. This means that the copy must be
* separately added to the document, and it will not have any children.
*
* @param node - The node to be copied.
* @returns The copy of the node.
*/
export declare function $copyNode<T extends LexicalNode>(node: T): T;
export declare function $applyNodeReplacement<N extends LexicalNode>(node: N): N;
export declare function errorOnInsertTextNodeOnRoot(node: LexicalNode, insertNode: LexicalNode): void;
export declare function $getNodeByKeyOrThrow<N extends LexicalNode>(key: NodeKey): N;
export declare function removeDOMBlockCursorElement(blockCursorElement: HTMLElement, editor: LexicalEditor, rootElement: HTMLElement): void;
export declare function updateDOMBlockCursorElement(editor: LexicalEditor, rootElement: HTMLElement, nextSelection: null | BaseSelection): void;
/**
* Returns the selection for the given window, or the global window if null.
* Will return null if {@link CAN_USE_DOM} is false.
*
* @param targetWindow The window to get the selection from
* @returns a Selection or null
*/
export declare function getDOMSelection(targetWindow: null | Window): null | Selection;
/**
* Returns the selection for the defaultView of the ownerDocument of given EventTarget.
*
* @param eventTarget The node to get the selection from
* @returns a Selection or null
*/
export declare function getDOMSelectionFromTarget(eventTarget: null | EventTarget): null | Selection;
export declare function $splitNode(node: ElementNode, offset: number): [ElementNode | null, ElementNode];
export declare function $findMatchingParent(startingNode: LexicalNode, findFn: (node: LexicalNode) => boolean): LexicalNode | null;
/**
* @param x - The element being tested
* @returns Returns true if x is an HTML anchor tag, false otherwise
*/
export declare function isHTMLAnchorElement(x: unknown): x is HTMLAnchorElement;
/**
* @param x - The element being tested
* @returns Returns true if x is an HTML element, false otherwise.
*/
export declare function isHTMLElement(x: unknown): x is HTMLElement;
/**
* @param x - The element being tested
* @returns Returns true if x is a DOM Node, false otherwise.
*/
export declare function isDOMNode(x: unknown): x is Node;
/**
* @param x - The element being testing
* @returns Returns true if x is a document fragment, false otherwise.
*/
export declare function isDocumentFragment(x: unknown): x is DocumentFragment;
/**
*
* @param node - the Dom Node to check
* @returns if the Dom Node is an inline node
*/
export declare function isInlineDomNode(node: Node): boolean;
/**
*
* @param node - the Dom Node to check
* @returns if the Dom Node is a block node
*/
export declare function isBlockDomNode(node: Node): boolean;
/**
* @internal
*
* This function is for internal use of the library.
* Please do not use it as it may change in the future.
*
* This function returns true for a DecoratorNode that is not inline OR
* an ElementNode that is:
* - not a root or shadow root
* - not inline
* - can't be empty
* - has no children or an inline first child
*/
export declare function INTERNAL_$isBlock(node: LexicalNode): node is ElementNode | DecoratorNode<unknown>;
export declare function $getAncestor<NodeType extends LexicalNode = LexicalNode>(node: LexicalNode, predicate: (ancestor: LexicalNode) => ancestor is NodeType): NodeType | null;
/**
* Utility function for accessing current active editor instance.
* @returns Current active editor
*/
export declare function $getEditor(): LexicalEditor;
/** @internal */
export type TypeToNodeMap = Map<string, NodeMap>;
export declare function getCachedTypeToNodeMap(editorState: EditorState): TypeToNodeMap;
/**
* Returns a clone of a node using `node.constructor.clone()` followed by
* `clone.afterCloneFrom(node)`. The resulting clone must have the same key,
* parent/next/prev pointers, and other properties that are not set by
* `node.constructor.clone` (format, style, etc.). This is primarily used by
* {@link LexicalNode.getWritable} to create a writable version of an
* existing node. The clone is the same logical node as the original node,
* do not try and use this function to duplicate or copy an existing node.
*
* Does not mutate the EditorState.
* @param latestNode - The node to be cloned.
* @returns The clone of the node.
*/
export declare function $cloneWithProperties<T extends LexicalNode>(latestNode: T): T;
export declare function setNodeIndentFromDOM(elementDom: HTMLElement, elementNode: ElementNode): void;
/**
* @internal
*
* Mark this node as unmanaged by lexical's mutation observer like
* decorator nodes
*/
export declare function setDOMUnmanaged(elementDom: HTMLElement): void;
/**
* @internal
*
* True if this DOM node was marked with {@link setDOMUnmanaged}
*/
export declare function isDOMUnmanaged(elementDom: Node): boolean;
/**
* @internal
*/
export declare function hasOwnStaticMethod(klass: Klass<LexicalNode>, k: keyof Klass<LexicalNode>): boolean;
/**
* @internal
*/
export declare function hasOwnExportDOM(klass: Klass<LexicalNode>): boolean;
/** @internal */
export declare function getStaticNodeConfig(klass: Klass<LexicalNode>): {
ownNodeType: undefined | string;
ownNodeConfig: undefined | StaticNodeConfigValue<LexicalNode, string>;
};
/**
* Create an node from its class.
*
* Note that this will directly construct the final `withKlass` node type,
* and will ignore the deprecated `with` functions. This allows `$create` to
* skip any intermediate steps where the replaced node would be created and
* then immediately discarded (once per configured replacement of that node).
*
* This does not support any arguments to the constructor.
* Setters can be used to initialize your node, and they can
* be chained. You can of course write your own mutliple-argument functions
* to wrap that.
*
* @example
* ```ts
* function $createTokenText(text: string): TextNode {
* return $create(TextNode).setTextContent(text).setMode('token');
* }
* ```
*/
export declare function $create<T extends LexicalNode>(klass: Klass<T>): T;
export {};

View File

@@ -0,0 +1 @@
{"version":3,"file":"parse-args.js","sourceRoot":"","sources":["../../src/parse-args.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAE5B,MAAM,EAAE,GACN,CACE,OAAO,OAAO,KAAK,QAAQ;IAC3B,CAAC,CAAC,OAAO;IACT,OAAO,OAAO,CAAC,OAAO,KAAK,QAAQ,CACpC,CAAC,CAAC;IACD,OAAO,CAAC,OAAO;IACjB,CAAC,CAAC,QAAQ,CAAA;AACZ,MAAM,GAAG,GAAG,EAAE;KACX,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;KACjB,KAAK,CAAC,GAAG,CAAC;KACV,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;AAE5B,qBAAqB;AACrB,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,GAAG,GAAG,CAAA;AAClC,oBAAoB;AAEpB,IAAI,EACF,SAAS,EAAE,EAAE,GACd,GAA8D,IAAI,CAAA;AAEnE,wCAAwC;AACxC,IACE,CAAC,EAAE;IACH,KAAK,GAAG,EAAE;IACV,CAAC,KAAK,KAAK,EAAE,IAAI,KAAK,GAAG,EAAE,CAAC;IAC5B,CAAC,KAAK,KAAK,EAAE,IAAI,KAAK,GAAG,EAAE,CAAC,EAC5B,CAAC;IACD,iDAAiD;IACjD,YAAY;IACZ,EAAE,GAAG,CAAC,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,CAAA;AACnD,CAAC;AACD,oBAAoB;AAEpB,MAAM,CAAC,MAAM,SAAS,GAAG,EAA0C,CAAA","sourcesContent":["import * as util from 'util'\n\nconst pv =\n (\n typeof process === 'object' &&\n !!process &&\n typeof process.version === 'string'\n ) ?\n process.version\n : 'v0.0.0'\nconst pvs = pv\n .replace(/^v/, '')\n .split('.')\n .map(s => parseInt(s, 10))\n\n/* c8 ignore start */\nconst [major = 0, minor = 0] = pvs\n/* c8 ignore stop */\n\nlet {\n parseArgs: pa,\n}: typeof import('util') | typeof import('@pkgjs/parseargs') = util\n\n/* c8 ignore start - version specific */\nif (\n !pa ||\n major < 16 ||\n (major === 18 && minor < 11) ||\n (major === 16 && minor < 19)\n) {\n // Ignore because we will clobber it for commonjs\n //@ts-ignore\n pa = (await import('@pkgjs/parseargs')).parseArgs\n}\n/* c8 ignore stop */\n\nexport const parseArgs = pa as (typeof import('util'))['parseArgs']\n"]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/Login/LoginForm/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAqBzB,OAAO,cAAc,CAAA;AAErB,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,YAAY,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAA;KAAE,CAAA;CAC/D,CA6FA,CAAA"}

View File

@@ -0,0 +1,147 @@
var LazyWrapper = require('./_LazyWrapper'),
LodashWrapper = require('./_LodashWrapper'),
baseLodash = require('./_baseLodash'),
isArray = require('./isArray'),
isObjectLike = require('./isObjectLike'),
wrapperClone = require('./_wrapperClone');
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Creates a `lodash` object which wraps `value` to enable implicit method
* chain sequences. Methods that operate on and return arrays, collections,
* and functions can be chained together. Methods that retrieve a single value
* or may return a primitive value will automatically end the chain sequence
* and return the unwrapped value. Otherwise, the value must be unwrapped
* with `_#value`.
*
* Explicit chain sequences, which must be unwrapped with `_#value`, may be
* enabled using `_.chain`.
*
* The execution of chained methods is lazy, that is, it's deferred until
* `_#value` is implicitly or explicitly called.
*
* Lazy evaluation allows several methods to support shortcut fusion.
* Shortcut fusion is an optimization to merge iteratee calls; this avoids
* the creation of intermediate arrays and can greatly reduce the number of
* iteratee executions. Sections of a chain sequence qualify for shortcut
* fusion if the section is applied to an array and iteratees accept only
* one argument. The heuristic for whether a section qualifies for shortcut
* fusion is subject to change.
*
* Chaining is supported in custom builds as long as the `_#value` method is
* directly or indirectly included in the build.
*
* In addition to lodash methods, wrappers have `Array` and `String` methods.
*
* The wrapper `Array` methods are:
* `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
*
* The wrapper `String` methods are:
* `replace` and `split`
*
* The wrapper methods that support shortcut fusion are:
* `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
* `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
* `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
*
* The chainable wrapper methods are:
* `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
* `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
* `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
* `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
* `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
* `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
* `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
* `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
* `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
* `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
* `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
* `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
* `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
* `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
* `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
* `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
* `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
* `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
* `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
* `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
* `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
* `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
* `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
* `zipObject`, `zipObjectDeep`, and `zipWith`
*
* The wrapper methods that are **not** chainable by default are:
* `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
* `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
* `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
* `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
* `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
* `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
* `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
* `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
* `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
* `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
* `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
* `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
* `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
* `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
* `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
* `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
* `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
* `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
* `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
* `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
* `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
* `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
* `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
* `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
* `upperFirst`, `value`, and `words`
*
* @name _
* @constructor
* @category Seq
* @param {*} value The value to wrap in a `lodash` instance.
* @returns {Object} Returns the new `lodash` wrapper instance.
* @example
*
* function square(n) {
* return n * n;
* }
*
* var wrapped = _([1, 2, 3]);
*
* // Returns an unwrapped value.
* wrapped.reduce(_.add);
* // => 6
*
* // Returns a wrapped value.
* var squares = wrapped.map(square);
*
* _.isArray(squares);
* // => false
*
* _.isArray(squares.value());
* // => true
*/
function lodash(value) {
if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
if (value instanceof LodashWrapper) {
return value;
}
if (hasOwnProperty.call(value, '__wrapped__')) {
return wrapperClone(value);
}
}
return new LodashWrapper(value);
}
// Ensure wrappers are instances of `baseLodash`.
lodash.prototype = baseLodash.prototype;
lodash.prototype.constructor = lodash;
module.exports = lodash;

View File

@@ -0,0 +1,154 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.js";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.js";
const matchOrdinalNumberPattern = /^(\d+)/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(tcn|scn)/i,
abbreviated: /^(trước CN|sau CN)/i,
wide: /^(trước Công Nguyên|sau Công Nguyên)/i,
};
const parseEraPatterns = {
any: [/^t/i, /^s/i],
};
const matchQuarterPatterns = {
narrow: /^([1234]|i{1,3}v?)/i,
abbreviated: /^q([1234]|i{1,3}v?)/i,
wide: /^quý ([1234]|i{1,3}v?)/i,
};
const parseQuarterPatterns = {
any: [/(1|i)$/i, /(2|ii)$/i, /(3|iii)$/i, /(4|iv)$/i],
};
const matchMonthPatterns = {
// month number may contain leading 0, 'thg' prefix may have space, underscore or empty before number
// note the order of '1' since it is a sub-string of '10', so must be lower priority
narrow: /^(0?[2-9]|10|11|12|0?1)/i,
// note the order of 'thg 1' since it is sub-string of 'thg 10', so must be lower priority
abbreviated: /^thg[ _]?(0?[1-9](?!\d)|10|11|12)/i,
// note the order of 'Mười' since it is sub-string of Mười Một, so must be lower priority
wide: /^tháng ?(Một|Hai|Ba|Tư|Năm|Sáu|Bảy|Tám|Chín|Mười|Mười ?Một|Mười ?Hai|0?[1-9](?!\d)|10|11|12)/i,
};
const parseMonthPatterns = {
narrow: [
/0?1$/i,
/0?2/i,
/3/,
/4/,
/5/,
/6/,
/7/,
/8/,
/9/,
/10/,
/11/,
/12/,
],
abbreviated: [
/^thg[ _]?0?1(?!\d)/i,
/^thg[ _]?0?2/i,
/^thg[ _]?0?3/i,
/^thg[ _]?0?4/i,
/^thg[ _]?0?5/i,
/^thg[ _]?0?6/i,
/^thg[ _]?0?7/i,
/^thg[ _]?0?8/i,
/^thg[ _]?0?9/i,
/^thg[ _]?10/i,
/^thg[ _]?11/i,
/^thg[ _]?12/i,
],
wide: [
/^tháng ?(Một|0?1(?!\d))/i,
/^tháng ?(Hai|0?2)/i,
/^tháng ?(Ba|0?3)/i,
/^tháng ?(Tư|0?4)/i,
/^tháng ?(Năm|0?5)/i,
/^tháng ?(Sáu|0?6)/i,
/^tháng ?(Bảy|0?7)/i,
/^tháng ?(Tám|0?8)/i,
/^tháng ?(Chín|0?9)/i,
/^tháng ?(Mười|10)/i,
/^tháng ?(Mười ?Một|11)/i,
/^tháng ?(Mười ?Hai|12)/i,
],
};
const matchDayPatterns = {
narrow: /^(CN|T2|T3|T4|T5|T6|T7)/i,
short: /^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,
abbreviated: /^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,
wide: /^(Chủ ?Nhật|Chúa ?Nhật|thứ ?Hai|thứ ?Ba|thứ ?Tư|thứ ?Năm|thứ ?Sáu|thứ ?Bảy)/i,
};
const parseDayPatterns = {
narrow: [/CN/i, /2/i, /3/i, /4/i, /5/i, /6/i, /7/i],
short: [/CN/i, /2/i, /3/i, /4/i, /5/i, /6/i, /7/i],
abbreviated: [/CN/i, /2/i, /3/i, /4/i, /5/i, /6/i, /7/i],
wide: [/(Chủ|Chúa) ?Nhật/i, /Hai/i, /Ba/i, /Tư/i, /Năm/i, /Sáu/i, /Bảy/i],
};
const matchDayPeriodPatterns = {
narrow: /^(a|p|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,
abbreviated: /^(am|pm|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,
wide: /^(ch[^i]*|sa|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^(a|sa)/i,
pm: /^(p|ch[^i]*)/i,
midnight: /nửa đêm/i,
noon: /trưa/i,
morning: /sáng/i,
afternoon: /chiều/i,
evening: /tối/i,
night: /^đêm/i,
},
};
export const match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "wide",
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "wide",
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
};

View File

@@ -0,0 +1,31 @@
"use strict";
function _ts_generator(thisArg, body) {
var f, y, t, _ = { label: 0, sent: function () { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
return d(g, "next", { value: verb(0) }), d(g, "throw", { value: verb(1) }), d(g, "return", { value: verb(2) }), typeof Symbol === "function" && d(g, Symbol.iterator, { value: function () { return this; } }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
}
exports._ = _ts_generator;

View File

@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const node_crypto_1 = require("node:crypto");
const parse = (key) => {
if (key.d) {
return (0, node_crypto_1.createPrivateKey)({ format: 'jwk', key });
}
return (0, node_crypto_1.createPublicKey)({ format: 'jwk', key });
};
exports.default = parse;

View File

@@ -0,0 +1,133 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.mjs";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.mjs";
const matchOrdinalNumberPattern = /^(\d+)(º)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(aC|dC)/i,
abbreviated: /^(a\.?\s?C\.?|a\.?\s?e\.?\s?v\.?|d\.?\s?C\.?|e\.?\s?v\.?)/i,
wide: /^(avanti Cristo|avanti Era Volgare|dopo Cristo|Era Volgare)/i,
};
const parseEraPatterns = {
any: [/^a/i, /^(d|e)/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^t[1234]/i,
wide: /^[1234](º)? trimestre/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[gfmalsond]/i,
abbreviated: /^(gen|feb|mar|apr|mag|giu|lug|ago|set|ott|nov|dic)/i,
wide: /^(gennaio|febbraio|marzo|aprile|maggio|giugno|luglio|agosto|settembre|ottobre|novembre|dicembre)/i,
};
const parseMonthPatterns = {
narrow: [
/^g/i,
/^f/i,
/^m/i,
/^a/i,
/^m/i,
/^g/i,
/^l/i,
/^a/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
any: [
/^ge/i,
/^f/i,
/^mar/i,
/^ap/i,
/^mag/i,
/^gi/i,
/^l/i,
/^ag/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
};
const matchDayPatterns = {
narrow: /^[dlmgvs]/i,
short: /^(do|lu|ma|me|gi|ve|sa)/i,
abbreviated: /^(dom|lun|mar|mer|gio|ven|sab)/i,
wide: /^(domenica|luned[i|ì]|marted[i|ì]|mercoled[i|ì]|gioved[i|ì]|venerd[i|ì]|sabato)/i,
};
const parseDayPatterns = {
narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^g/i, /^v/i, /^s/i],
any: [/^d/i, /^l/i, /^ma/i, /^me/i, /^g/i, /^v/i, /^s/i],
};
const matchDayPeriodPatterns = {
narrow:
/^(a|m\.|p|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i,
any: /^([ap]\.?\s?m\.?|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^mezza/i,
noon: /^mezzo/i,
morning: /mattina/i,
afternoon: /pomeriggio/i,
evening: /sera/i,
night: /notte/i,
},
};
export const match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
};

View File

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

View File

@@ -0,0 +1,169 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.js");
const eraValues = {
narrow: ["M.A", "M."],
abbreviated: ["M.A", "M."],
wide: ["Miloddan Avvalgi", "Milodiy"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["CH.1", "CH.2", "CH.3", "CH.4"],
wide: ["1-chi chorak", "2-chi chorak", "3-chi chorak", "4-chi chorak"],
};
// Note: in English, the names of days of the week and months are capitalized.
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
// Generally, formatted dates should look like they are in the middle of a sentence,
// e.g. in Spanish language the weekdays and months should be in the lowercase.
const monthValues = {
narrow: ["Y", "F", "M", "A", "M", "I", "I", "A", "S", "O", "N", "D"],
abbreviated: [
"Yan",
"Fev",
"Mar",
"Apr",
"May",
"Iyun",
"Iyul",
"Avg",
"Sen",
"Okt",
"Noy",
"Dek",
],
wide: [
"Yanvar",
"Fevral",
"Mart",
"Aprel",
"May",
"Iyun",
"Iyul",
"Avgust",
"Sentabr",
"Oktabr",
"Noyabr",
"Dekabr",
],
};
const dayValues = {
narrow: ["Y", "D", "S", "CH", "P", "J", "SH"],
short: ["Ya", "Du", "Se", "Cho", "Pa", "Ju", "Sha"],
abbreviated: ["Yak", "Dush", "Sesh", "Chor", "Pay", "Jum", "Shan"],
wide: [
"Yakshanba",
"Dushanba",
"Seshanba",
"Chorshanba",
"Payshanba",
"Juma",
"Shanba",
],
};
const dayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "y.t",
noon: "p.",
morning: "ertalab",
afternoon: "tushdan keyin",
evening: "kechqurun",
night: "tun",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "yarim tun",
noon: "peshin",
morning: "ertalab",
afternoon: "tushdan keyin",
evening: "kechqurun",
night: "tun",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "yarim tun",
noon: "peshin",
morning: "ertalab",
afternoon: "tushdan keyin",
evening: "kechqurun",
night: "tun",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "y.t",
noon: "p.",
morning: "ertalab",
afternoon: "tushdan keyin",
evening: "kechqurun",
night: "tun",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "yarim tun",
noon: "peshin",
morning: "ertalab",
afternoon: "tushdan keyin",
evening: "kechqurun",
night: "tun",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "yarim tun",
noon: "peshin",
morning: "ertalab",
afternoon: "tushdan keyin",
evening: "kechqurun",
night: "tun",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
return String(dirtyNumber);
};
const localize = (exports.localize = {
ordinalNumber,
era: (0, _index.buildLocalizeFn)({
values: eraValues,
defaultWidth: "wide",
}),
quarter: (0, _index.buildLocalizeFn)({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: (0, _index.buildLocalizeFn)({
values: monthValues,
defaultWidth: "wide",
}),
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
});

View File

@@ -0,0 +1 @@
{"version":3,"file":"lt.d.ts","sourceRoot":"","sources":["../../src/languages/lt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtE,eAAO,MAAM,cAAc,EAAE,yBA+nB5B,CAAA;AAED,eAAO,MAAM,EAAE,EAAE,QAGhB,CAAA"}

View File

@@ -0,0 +1,157 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const debugBuild = require('../debug-build.js');
const debugLogger = require('../utils/debug-logger.js');
const envelope = require('../utils/envelope.js');
const ratelimit = require('../utils/ratelimit.js');
const timer = require('../utils/timer.js');
const MIN_DELAY = 100; // 100 ms
const START_DELAY = 5000; // 5 seconds
const MAX_DELAY = 3.6e6; // 1 hour
/**
* Wraps a transport and stores and retries events when they fail to send.
*
* @param createTransport The transport to wrap.
*/
function makeOfflineTransport(
createTransport,
) {
function log(...args) {
debugBuild.DEBUG_BUILD && debugLogger.debug.log('[Offline]:', ...args);
}
return options => {
const transport = createTransport(options);
if (!options.createStore) {
throw new Error('No `createStore` function was provided');
}
const store = options.createStore(options);
let retryDelay = START_DELAY;
let flushTimer;
function shouldQueue(env, error, retryDelay) {
// We want to drop client reports because they can be generated when we retry sending events while offline.
if (envelope.envelopeContainsItemType(env, ['client_report'])) {
return false;
}
if (options.shouldStore) {
return options.shouldStore(env, error, retryDelay);
}
return true;
}
function flushIn(delay) {
if (flushTimer) {
clearTimeout(flushTimer );
}
// We need to unref the timer in node.js, otherwise the node process never exit.
flushTimer = timer.safeUnref(
setTimeout(async () => {
flushTimer = undefined;
const found = await store.shift();
if (found) {
log('Attempting to send previously queued event');
// We should to update the sent_at timestamp to the current time.
found[0].sent_at = new Date().toISOString();
void send(found, true).catch(e => {
log('Failed to retry sending', e);
});
}
}, delay),
) ;
}
function flushWithBackOff() {
if (flushTimer) {
return;
}
flushIn(retryDelay);
retryDelay = Math.min(retryDelay * 2, MAX_DELAY);
}
async function send(envelope$1, isRetry = false) {
// We queue all replay envelopes to avoid multiple replay envelopes being sent at the same time. If one fails, we
// need to retry them in order.
if (!isRetry && envelope.envelopeContainsItemType(envelope$1, ['replay_event', 'replay_recording'])) {
await store.push(envelope$1);
flushIn(MIN_DELAY);
return {};
}
try {
if (options.shouldSend && (await options.shouldSend(envelope$1)) === false) {
throw new Error('Envelope not sent because `shouldSend` callback returned false');
}
const result = await transport.send(envelope$1);
let delay = MIN_DELAY;
if (result) {
// If there's a retry-after header, use that as the next delay.
if (result.headers?.['retry-after']) {
delay = ratelimit.parseRetryAfterHeader(result.headers['retry-after']);
} else if (result.headers?.['x-sentry-rate-limits']) {
delay = 60000; // 60 seconds
} // If we have a server error, return now so we don't flush the queue.
else if ((result.statusCode || 0) >= 400) {
return result;
}
}
flushIn(delay);
retryDelay = START_DELAY;
return result;
} catch (e) {
if (await shouldQueue(envelope$1, e , retryDelay)) {
// If this envelope was a retry, we want to add it to the front of the queue so it's retried again first.
if (isRetry) {
await store.unshift(envelope$1);
} else {
await store.push(envelope$1);
}
flushWithBackOff();
log('Error sending. Event queued.', e );
return {};
} else {
throw e;
}
}
}
if (options.flushAtStartup) {
flushWithBackOff();
}
return {
send,
flush: timeout => {
// If there's no timeout, we should attempt to flush the offline queue.
if (timeout === undefined) {
retryDelay = START_DELAY;
flushIn(MIN_DELAY);
}
return transport.flush(timeout);
},
};
};
}
exports.MIN_DELAY = MIN_DELAY;
exports.START_DELAY = START_DELAY;
exports.makeOfflineTransport = makeOfflineTransport;
//# sourceMappingURL=offline.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"iterateFields.d.ts","sourceRoot":"","sources":["../../../src/forms/fieldSchemasToFormState/iterateFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,oBAAoB,EACpB,IAAI,EACJ,mBAAmB,EACnB,KAAK,EACL,cAAc,EACd,SAAS,EACT,0BAA0B,EAC1B,cAAc,EACd,0BAA0B,EAC1B,UAAU,EACV,UAAU,EACV,UAAU,EACX,MAAM,SAAS,CAAA;AAKhB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAInD,KAAK,IAAI,GAAG;IACV,oBAAoB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;IACjD;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B;;OAEG;IACH,SAAS,EAAE,IAAI,GAAG,SAAS,CAAA;IAC3B,oBAAoB,CAAC,EAAE,oBAAoB,CAAA;IAC3C,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,IAAI,EAAE,IAAI,CAAA;IACV,MAAM,EAAE,CAAC,KAAK,GAAG,UAAU,CAAC,EAAE,CAAA;IAC9B,cAAc,EAAE,cAAc,CAAA;IAC9B,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,wBAAwB,KAAK,OAAO,CAAA;IACpD;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,QAAQ,EAAE,IAAI,CAAA;IACd,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAA;IACzC;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;OAEG;IACH,SAAS,EAAE,QAAQ,GAAG,QAAQ,CAAA;IAC9B,eAAe,EAAE,MAAM,CAAA;IACvB,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,UAAU,EAAE,MAAM,CAAA;IAClB,gBAAgB,EAAE,MAAM,CAAA;IACxB,WAAW,EAAE,0BAA0B,CAAA;IACvC,WAAW,CAAC,EAAE,mBAAmB,CAAA;IACjC,iBAAiB,EAAE,SAAS,CAAA;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,eAAe,EAAE,OAAO,CAAA;IACxB,aAAa,EAAE,iBAAiB,CAAA;IAChC,GAAG,EAAE,cAAc,CAAA;IACnB,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,0BAA0B,CAAA;CACnC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,keAiCvB,IAAI,KAAG,OAAO,CAAC,IAAI,CAgGrB,CAAA"}

View File

@@ -0,0 +1,6 @@
import type { FieldAffectingData } from '../fields/config/types.js';
import { APIError } from './APIError.js';
export declare class InvalidFieldName extends APIError {
constructor(field: FieldAffectingData, fieldName: string);
}
//# sourceMappingURL=InvalidFieldName.d.ts.map

View File

@@ -0,0 +1,301 @@
# Acorn
A tiny, fast JavaScript parser written in JavaScript.
## Community
Acorn is open source software released under an
[MIT license](https://github.com/acornjs/acorn/blob/master/acorn/LICENSE).
You are welcome to
[report bugs](https://github.com/acornjs/acorn/issues) or create pull
requests on [github](https://github.com/acornjs/acorn).
## Installation
The easiest way to install acorn is from [`npm`](https://www.npmjs.com/):
```sh
npm install acorn
```
Alternately, you can download the source and build acorn yourself:
```sh
git clone https://github.com/acornjs/acorn.git
cd acorn
npm install
```
## Importing acorn
ESM as well as CommonJS is supported for all 3: `acorn`, `acorn-walk` and `acorn-loose`.
ESM example for `acorn`:
```js
import * as acorn from "acorn"
```
CommonJS example for `acorn`:
```js
let acorn = require("acorn")
```
ESM is preferred, as it allows better editor auto-completions by offering TypeScript support.
For this reason, following examples will use ESM imports.
## Interface
**parse**`(input, options)` is the main interface to the library. The
`input` parameter is a string, `options` must be an object setting
some of the options listed below. The return value will be an abstract
syntax tree object as specified by the [ESTree
spec](https://github.com/estree/estree).
```javascript
import * as acorn from "acorn"
console.log(acorn.parse("1 + 1", {ecmaVersion: 2020}))
```
When encountering a syntax error, the parser will raise a
`SyntaxError` object with a meaningful message. The error object will
have a `pos` property that indicates the string offset at which the
error occurred, and a `loc` object that contains a `{line, column}`
object referring to that same position.
Options are provided by in a second argument, which should be an
object containing any of these fields (only `ecmaVersion` is
required):
- **ecmaVersion**: Indicates the ECMAScript version to parse. Can be a
number, either in year (`2022`) or plain version number (`6`) form,
or `"latest"` (the latest the library supports). This influences
support for strict mode, the set of reserved words, and support for
new syntax features.
**NOTE**: Only 'stage 4' (finalized) ECMAScript features are being
implemented by Acorn. Other proposed new features must be
implemented through plugins.
- **sourceType**: Indicate the mode the code should be parsed in. Can be
either `"script"`, `"module"` or `"commonjs"`. This influences global strict mode
and parsing of `import` and `export` declarations.
**NOTE**: If set to `"module"`, then static `import` / `export` syntax
will be valid, even if `ecmaVersion` is less than 6. If set to `"commonjs"`,
it is the same as `"script"` except that the top-level scope behaves like a function.
- **onInsertedSemicolon**: If given a callback, that callback will be
called whenever a missing semicolon is inserted by the parser. The
callback will be given the character offset of the point where the
semicolon is inserted as argument, and if `locations` is on, also a
`{line, column}` object representing this position.
- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing
commas.
- **allowReserved**: If `false`, using a reserved word will generate
an error. Defaults to `true` for `ecmaVersion` 3, `false` for higher
versions. When given the value `"never"`, reserved words and
keywords can also not be used as property names (as in Internet
Explorer's old parser).
- **allowReturnOutsideFunction**: By default, a return statement at
the top level raises an error. Set this to `true` to accept such
code.
- **allowImportExportEverywhere**: By default, `import` and `export`
declarations can only appear at a program's top level. Setting this
option to `true` allows them anywhere where a statement is allowed,
and also allows `import.meta` expressions to appear in scripts
(when `sourceType` is not `"module"`).
- **allowAwaitOutsideFunction**: If `false`, `await` expressions can
only appear inside `async` functions. Defaults to `true` in modules
for `ecmaVersion` 2022 and later, `false` for lower versions.
Setting this option to `true` allows to have top-level `await`
expressions. They are still not allowed in non-`async` functions,
though. Setting this option to `true` is not allowed when `sourceType: "commonjs"`.
- **allowSuperOutsideMethod**: By default, `super` outside a method
raises an error. Set this to `true` to accept such code.
- **allowHashBang**: When this is enabled, if the code starts with the
characters `#!` (as in a shellscript), the first line will be
treated as a comment. Defaults to true when `ecmaVersion` >= 2023.
- **checkPrivateFields**: By default, the parser will verify that
private properties are only used in places where they are valid and
have been declared. Set this to false to turn such checks off.
- **locations**: When `true`, each node has a `loc` object attached
with `start` and `end` subobjects, each of which contains the
one-based line and zero-based column numbers in `{line, column}`
form. Default is `false`.
- **onToken**: If a function is passed for this option, each found
token will be passed in same format as tokens returned from
`tokenizer().getToken()`.
If array is passed, each found token is pushed to it.
Note that you are not allowed to call the parser from the
callback—that will corrupt its internal state.
- **onComment**: If a function is passed for this option, whenever a
comment is encountered the function will be called with the
following parameters:
- `block`: `true` if the comment is a block comment, false if it
is a line comment.
- `text`: The content of the comment.
- `start`: Character offset of the start of the comment.
- `end`: Character offset of the end of the comment.
When the `locations` options is on, the `{line, column}` locations
of the comments start and end are passed as two additional
parameters.
If array is passed for this option, each found comment is pushed
to it as object in Esprima format:
```javascript
{
"type": "Line" | "Block",
"value": "comment text",
"start": Number,
"end": Number,
// If `locations` option is on:
"loc": {
"start": {line: Number, column: Number}
"end": {line: Number, column: Number}
},
// If `ranges` option is on:
"range": [Number, Number]
}
```
Note that you are not allowed to call the parser from the
callback—that will corrupt its internal state.
- **ranges**: Nodes have their start and end characters offsets
recorded in `start` and `end` properties (directly on the node,
rather than the `loc` object, which holds line/column data. To also
add a
[semi-standardized](https://bugzilla.mozilla.org/show_bug.cgi?id=745678)
`range` property holding a `[start, end]` array with the same
numbers, set the `ranges` option to `true`.
- **program**: It is possible to parse multiple files into a single
AST by passing the tree produced by parsing the first file as the
`program` option in subsequent parses. This will add the toplevel
forms of the parsed file to the "Program" (top) node of an existing
parse tree.
- **sourceFile**: When the `locations` option is `true`, you can pass
this option to add a `source` attribute in every nodes `loc`
object. Note that the contents of this option are not examined or
processed in any way; you are free to use whatever format you
choose.
- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property
will be added (regardless of the `location` option) directly to the
nodes, rather than the `loc` object.
- **preserveParens**: If this option is `true`, parenthesized expressions
are represented by (non-standard) `ParenthesizedExpression` nodes
that have a single `expression` property containing the expression
inside parentheses.
**parseExpressionAt**`(input, offset, options)` will parse a single
expression in a string, and return its AST. It will not complain if
there is more of the string left after the expression.
**tokenizer**`(input, options)` returns an object with a `getToken`
method that can be called repeatedly to get the next token, a `{start,
end, type, value}` object (with added `loc` property when the
`locations` option is enabled and `range` property when the `ranges`
option is enabled). When the token's type is `tokTypes.eof`, you
should stop calling the method, since it will keep returning that same
token forever.
Note that tokenizing JavaScript without parsing it is, in modern
versions of the language, not really possible due to the way syntax is
overloaded in ways that can only be disambiguated by the parse
context. This package applies a bunch of heuristics to try and do a
reasonable job, but you are advised to use `parse` with the `onToken`
option instead of this.
In ES6 environment, returned result can be used as any other
protocol-compliant iterable:
```javascript
for (let token of acorn.tokenizer(str)) {
// iterate over the tokens
}
// transform code to array of tokens:
var tokens = [...acorn.tokenizer(str)]
```
**tokTypes** holds an object mapping names to the token type objects
that end up in the `type` properties of tokens.
**getLineInfo**`(input, offset)` can be used to get a `{line,
column}` object for a given program string and offset.
### The `Parser` class
Instances of the **`Parser`** class contain all the state and logic
that drives a parse. It has static methods `parse`,
`parseExpressionAt`, and `tokenizer` that match the top-level
functions by the same name.
When extending the parser with plugins, you need to call these methods
on the extended version of the class. To extend a parser with plugins,
you can use its static `extend` method.
```javascript
var acorn = require("acorn")
var jsx = require("acorn-jsx")
var JSXParser = acorn.Parser.extend(jsx())
JSXParser.parse("foo(<bar/>)", {ecmaVersion: 2020})
```
The `extend` method takes any number of plugin values, and returns a
new `Parser` class that includes the extra parser logic provided by
the plugins.
## Command line interface
The `bin/acorn` utility can be used to parse a file from the command
line. It accepts as arguments its input file and the following
options:
- `--ecma3|--ecma5|--ecma6|--ecma7|--ecma8|--ecma9|--ecma10`: Sets the ECMAScript version
to parse. Default is version 9.
- `--module`: Sets the parsing mode to `"module"`. Is set to `"script"` otherwise.
- `--locations`: Attaches a "loc" object to each node with "start" and
"end" subobjects, each of which contains the one-based line and
zero-based column numbers in `{line, column}` form.
- `--allow-hash-bang`: If the code starts with the characters #! (as
in a shellscript), the first line will be treated as a comment.
- `--allow-await-outside-function`: Allows top-level `await` expressions.
See the `allowAwaitOutsideFunction` option for more information.
- `--compact`: No whitespace is used in the AST output.
- `--silent`: Do not output the AST, just return the exit status.
- `--help`: Print the usage information and quit.
The utility spits out the syntax tree as JSON data.
## Existing plugins
- [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx)

View File

@@ -0,0 +1,20 @@
/**
* A specialized version of `matchesProperty` for source values suitable
* for strict equality comparisons, i.e. `===`.
*
* @private
* @param {string} key The key of the property to get.
* @param {*} srcValue The value to match.
* @returns {Function} Returns the new spec function.
*/
function matchesStrictComparable(key, srcValue) {
return function(object) {
if (object == null) {
return false;
}
return object[key] === srcValue &&
(srcValue !== undefined || (key in Object(object)));
};
}
module.exports = matchesStrictComparable;

View File

@@ -0,0 +1,2 @@
export declare function getMachineId(): Promise<string | undefined>;
//# sourceMappingURL=getMachineId.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"folder-tree.js","sources":["../../../src/icons/folder-tree.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FolderTree\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjAgMTBhMSAxIDAgMCAwIDEtMVY2YTEgMSAwIDAgMC0xLTFoLTIuNWExIDEgMCAwIDEtLjgtLjRsLS45LTEuMkExIDEgMCAwIDAgMTUgM2gtMmExIDEgMCAwIDAtMSAxdjVhMSAxIDAgMCAwIDEgMVoiIC8+CiAgPHBhdGggZD0iTTIwIDIxYTEgMSAwIDAgMCAxLTF2LTNhMSAxIDAgMCAwLTEtMWgtMi45YTEgMSAwIDAgMS0uODgtLjU1bC0uNDItLjg1YTEgMSAwIDAgMC0uOTItLjZIMTNhMSAxIDAgMCAwLTEgMXY1YTEgMSAwIDAgMCAxIDFaIiAvPgogIDxwYXRoIGQ9Ik0zIDVhMiAyIDAgMCAwIDIgMmgzIiAvPgogIDxwYXRoIGQ9Ik0zIDN2MTNhMiAyIDAgMCAwIDIgMmgzIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/folder-tree\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 FolderTree = createLucideIcon('FolderTree', [\n [\n 'path',\n {\n d: 'M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z',\n key: 'hod4my',\n },\n ],\n [\n 'path',\n {\n d: 'M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z',\n key: 'w4yl2u',\n },\n ],\n ['path', { d: 'M3 5a2 2 0 0 0 2 2h3', key: 'f2jnh7' }],\n ['path', { d: 'M3 3v13a2 2 0 0 0 2 2h3', key: 'k8epm1' }],\n]);\n\nexport default FolderTree;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAChD,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,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,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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,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,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,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;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAwB,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,CACrD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,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;AAC1D,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,29 @@
import type { ContextOptions } from "./types.js";
/**
* The {@link startOfTomorrow} function options.
*/
export interface StartOfTomorrowOptions<DateType extends Date = Date>
extends ContextOptions<DateType> {}
/**
* @name startOfTomorrow
* @category Day Helpers
* @summary Return the start of tomorrow.
* @pure false
*
* @typeParam ContextDate - The `Date` type of the context function.
*
* @param options - An object with options
*
* @returns The start of tomorrow
*
* @description
* Return the start of tomorrow.
*
* @example
* // If today is 6 October 2014:
* const result = startOfTomorrow()
* //=> Tue Oct 7 2014 00:00:00
*/
export declare function startOfTomorrow<ContextDate extends Date>(
options?: StartOfTomorrowOptions<ContextDate> | undefined,
): ContextDate;

View File

@@ -0,0 +1,29 @@
"use strict";
exports.hr = void 0;
var _index = require("./hr/_lib/formatDistance.cjs");
var _index2 = require("./hr/_lib/formatLong.cjs");
var _index3 = require("./hr/_lib/formatRelative.cjs");
var _index4 = require("./hr/_lib/localize.cjs");
var _index5 = require("./hr/_lib/match.cjs");
/**
* @category Locales
* @summary Croatian locale.
* @language Croatian
* @iso-639-2 hrv
* @author Matija Marohnić [@silvenon](https://github.com/silvenon)
* @author Manico [@manico](https://github.com/manico)
* @author Ivan Jeržabek [@jerzabek](https://github.com/jerzabek)
*/
const hr = (exports.hr = {
code: "hr",
formatDistance: _index.formatDistance,
formatLong: _index2.formatLong,
formatRelative: _index3.formatRelative,
localize: _index4.localize,
match: _index5.match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 1,
},
});

View File

@@ -0,0 +1,37 @@
import { entityKind } from "../../entity.js";
import { getColumnNameAndConfig } from "../../utils.js";
import { MySqlColumn, MySqlColumnBuilder } from "./common.js";
class MySqlVarCharBuilder extends MySqlColumnBuilder {
static [entityKind] = "MySqlVarCharBuilder";
/** @internal */
constructor(name, config) {
super(name, "string", "MySqlVarChar");
this.config.length = config.length;
this.config.enum = config.enum;
}
/** @internal */
build(table) {
return new MySqlVarChar(
table,
this.config
);
}
}
class MySqlVarChar extends MySqlColumn {
static [entityKind] = "MySqlVarChar";
length = this.config.length;
enumValues = this.config.enum;
getSQLType() {
return this.length === void 0 ? `varchar` : `varchar(${this.length})`;
}
}
function varchar(a, b) {
const { name, config } = getColumnNameAndConfig(a, b);
return new MySqlVarCharBuilder(name, config);
}
export {
MySqlVarChar,
MySqlVarCharBuilder,
varchar
};
//# sourceMappingURL=varchar.js.map

View File

@@ -0,0 +1,47 @@
{
"name": "@emotion/sheet",
"version": "1.4.0",
"description": "emotion's stylesheet",
"main": "dist/emotion-sheet.cjs.js",
"module": "dist/emotion-sheet.esm.js",
"types": "dist/emotion-sheet.cjs.d.ts",
"exports": {
".": {
"types": {
"import": "./dist/emotion-sheet.cjs.mjs",
"default": "./dist/emotion-sheet.cjs.js"
},
"development": {
"module": "./dist/emotion-sheet.development.esm.js",
"import": "./dist/emotion-sheet.development.cjs.mjs",
"default": "./dist/emotion-sheet.development.cjs.js"
},
"module": "./dist/emotion-sheet.esm.js",
"import": "./dist/emotion-sheet.cjs.mjs",
"default": "./dist/emotion-sheet.cjs.js"
},
"./package.json": "./package.json"
},
"imports": {
"#is-development": {
"development": "./src/conditions/true.ts",
"default": "./src/conditions/false.ts"
}
},
"license": "MIT",
"scripts": {
"test:typescript": "dtslint types"
},
"repository": "https://github.com/emotion-js/emotion/tree/main/packages/sheet",
"publishConfig": {
"access": "public"
},
"files": [
"src",
"dist"
],
"devDependencies": {
"@definitelytyped/dtslint": "0.0.112",
"typescript": "^5.4.5"
}
}

View File

@@ -0,0 +1,4 @@
import type { BuildAliasTable } from "./query-builders/select.types.cjs";
import type { SQLiteTable } from "./table.cjs";
import type { SQLiteViewBase } from "./view-base.cjs";
export declare function alias<TTable extends SQLiteTable | SQLiteViewBase, TAlias extends string>(table: TTable, alias: TAlias): BuildAliasTable<TTable, TAlias>;

View File

@@ -0,0 +1,116 @@
"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 utils_exports = {};
__export(utils_exports, {
extractUsedTable: () => extractUsedTable,
getMaterializedViewConfig: () => getMaterializedViewConfig,
getTableConfig: () => getTableConfig,
getViewConfig: () => getViewConfig
});
module.exports = __toCommonJS(utils_exports);
var import_entity = require("../entity.cjs");
var import_sql = require("../sql/sql.cjs");
var import_subquery = require("../subquery.cjs");
var import_table = require("../table.cjs");
var import_view_common = require("../view-common.cjs");
var import_checks = require("./checks.cjs");
var import_foreign_keys = require("./foreign-keys.cjs");
var import_indexes = require("./indexes.cjs");
var import_policies = require("./policies.cjs");
var import_primary_keys = require("./primary-keys.cjs");
var import_table2 = require("./table.cjs");
var import_unique_constraint = require("./unique-constraint.cjs");
var import_view_common2 = require("./view-common.cjs");
var import_view = require("./view.cjs");
function getTableConfig(table) {
const columns = Object.values(table[import_table.Table.Symbol.Columns]);
const indexes = [];
const checks = [];
const primaryKeys = [];
const foreignKeys = Object.values(table[import_table2.GelTable.Symbol.InlineForeignKeys]);
const uniqueConstraints = [];
const name = table[import_table.Table.Symbol.Name];
const schema = table[import_table.Table.Symbol.Schema];
const policies = [];
const enableRLS = table[import_table2.GelTable.Symbol.EnableRLS];
const extraConfigBuilder = table[import_table2.GelTable.Symbol.ExtraConfigBuilder];
if (extraConfigBuilder !== void 0) {
const extraConfig = extraConfigBuilder(table[import_table.Table.Symbol.ExtraConfigColumns]);
const extraValues = Array.isArray(extraConfig) ? extraConfig.flat(1) : Object.values(extraConfig);
for (const builder of extraValues) {
if ((0, import_entity.is)(builder, import_indexes.IndexBuilder)) {
indexes.push(builder.build(table));
} else if ((0, import_entity.is)(builder, import_checks.CheckBuilder)) {
checks.push(builder.build(table));
} else if ((0, import_entity.is)(builder, import_unique_constraint.UniqueConstraintBuilder)) {
uniqueConstraints.push(builder.build(table));
} else if ((0, import_entity.is)(builder, import_primary_keys.PrimaryKeyBuilder)) {
primaryKeys.push(builder.build(table));
} else if ((0, import_entity.is)(builder, import_foreign_keys.ForeignKeyBuilder)) {
foreignKeys.push(builder.build(table));
} else if ((0, import_entity.is)(builder, import_policies.GelPolicy)) {
policies.push(builder);
}
}
}
return {
columns,
indexes,
foreignKeys,
checks,
primaryKeys,
uniqueConstraints,
name,
schema,
policies,
enableRLS
};
}
function extractUsedTable(table) {
if ((0, import_entity.is)(table, import_table2.GelTable)) {
return [`${table[import_table.Table.Symbol.BaseName]}`];
}
if ((0, import_entity.is)(table, import_subquery.Subquery)) {
return table._.usedTables ?? [];
}
if ((0, import_entity.is)(table, import_sql.SQL)) {
return table.usedTables ?? [];
}
return [];
}
function getViewConfig(view) {
return {
...view[import_view_common.ViewBaseConfig],
...view[import_view_common2.GelViewConfig]
};
}
function getMaterializedViewConfig(view) {
return {
...view[import_view_common.ViewBaseConfig],
...view[import_view.GelMaterializedViewConfig]
};
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
extractUsedTable,
getMaterializedViewConfig,
getTableConfig,
getViewConfig
});
//# sourceMappingURL=utils.cjs.map

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/primary-key.ts"],"sourcesContent":["import { entityKind } from '~/entity.ts';\nimport type { AnyColumn } from './column.ts';\nimport type { Table } from './table.ts';\n\nexport abstract class PrimaryKey {\n\tstatic readonly [entityKind]: string = 'PrimaryKey';\n\n\tdeclare protected $brand: 'PrimaryKey';\n\n\tconstructor(readonly table: Table, readonly columns: AnyColumn[]) {}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA2B;AAIpB,MAAe,WAAW;AAAA,EAKhC,YAAqB,OAAuB,SAAsB;AAA7C;AAAuB;AAAA,EAAuB;AAAA,EAJnE,QAAiB,wBAAU,IAAY;AAKxC;","names":[]}

View File

@@ -0,0 +1,64 @@
/**
* 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.
*
* @flow strict
*/
import type {LexicalNode, MutationListener} from 'lexical';
import {MenuOption} from '@lexical/react/LexicalTypeaheadMenuPlugin';
import type {LexicalCommand, LexicalEditor, NodeKey, TextNode} from 'lexical';
import * as React from 'react';
import {createCommand} from 'lexical';
import type {MenuRenderFn} from './LexicalTypeaheadMenuPlugin';
export type EmbedMatchResult = {
url: string,
id: string,
};
export interface EmbedConfig {
// Used to identify this config e.g. youtube, tweet, google-maps.
type: string;
// Determine if a given URL is a match and return url data.
parseUrl: (text: string) => EmbedMatchResult | null;
// Create the Lexical embed node from the url data.
insertNode: (editor: LexicalEditor, result: EmbedMatchResult) => void;
}
export const URL_MATCHER: RegExp =
/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/;
export const INSERT_EMBED_COMMAND: LexicalCommand<EmbedConfig['type']> =
createCommand('INSERT_EMBED_COMMAND');
type LexicalAutoEmbedPluginProps<TEmbedConfig> = {
embedConfigs: Array<TEmbedConfig>,
onOpenEmbedModalForConfig: (embedConfig: TEmbedConfig) => void,
getMenuOptions: (
activeEmbedConfig: TEmbedConfig,
embedFn: () => void,
dismissFn: () => void,
) => Array<AutoEmbedOption>,
menuRenderFn: MenuRenderFn<AutoEmbedOption>,
};
declare export class AutoEmbedOption extends MenuOption {
title: string;
icon: React.MixedElement;
onSelect: (targetNode: LexicalNode | null) => void;
constructor(
title: string,
options: {
icon: React.MixedElement,
onSelect: (targetNode: LexicalNode | null) => void,
},
): void;
}
declare export function LexicalAutoEmbedPlugin<TEmbedConfig>(
LexicalAutoEmbedPluginProps<TEmbedConfig>,
): React.MixedElement | null;

View File

@@ -0,0 +1,21 @@
"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._globalThis = void 0;
var globalThis_1 = require("./globalThis");
Object.defineProperty(exports, "_globalThis", { enumerable: true, get: function () { return globalThis_1._globalThis; } });
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,11 @@
import { type Formats as IntlFormats } from 'intl-messageformat';
import type Formats from './Formats.js';
import type TimeZone from './TimeZone.js';
/**
* `intl-messageformat` uses separate keys for `date` and `time`, but there's
* only one native API: `Intl.DateTimeFormat`. Additionally you might want to
* include both a time and a date in a value, therefore the separation doesn't
* seem so useful. We offer a single `dateTime` namespace instead, but we have
* to convert the format before `intl-messageformat` can be used.
*/
export default function convertFormatsToIntlMessageFormat(globalFormats?: Formats, inlineFormats?: Formats, timeZone?: TimeZone): Partial<IntlFormats>;

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"context.js","names":[],"sources":["../../../src/providers/DocumentTitle/context.ts"],"sourcesContent":[null],"mappings":"","ignoreList":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"worldwide.js","sources":["../../../src/utils/worldwide.ts"],"sourcesContent":["/**\n * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,\n * you must either a) use `console.log` rather than the `debug` singleton, or b) put your function elsewhere.\n *\n * Note: This file was originally called `global.ts`, but was changed to unblock users which might be doing\n * string replaces with bundlers like Vite for `global` (would break imports that rely on importing from utils/src/global).\n *\n * Why worldwide?\n *\n * Why not?\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { Carrier } from '../carrier';\nimport type { SdkSource } from './env';\n\n/** Internal global with common properties and Sentry extensions */\nexport type InternalGlobal = {\n navigator?: { userAgent?: string; maxTouchPoints?: number };\n console: Console;\n PerformanceObserver?: any;\n Sentry?: any;\n onerror?: {\n (event: object | string, source?: string, lineno?: number, colno?: number, error?: Error): any;\n __SENTRY_INSTRUMENTED__?: true;\n };\n onunhandledrejection?: {\n (event: unknown): boolean;\n __SENTRY_INSTRUMENTED__?: true;\n };\n SENTRY_ENVIRONMENT?: string;\n SENTRY_DSN?: string;\n SENTRY_RELEASE?: {\n id?: string;\n };\n SENTRY_SDK_SOURCE?: SdkSource;\n /**\n * Debug IDs are indirectly injected by Sentry CLI or bundler plugins to directly reference a particular source map\n * for resolving of a source file. The injected code will place an entry into the record for each loaded bundle/JS\n * file.\n */\n _sentryDebugIds?: Record<string, string>;\n /**\n * Native debug IDs implementation (e.g., from Vercel).\n * This uses the same format as _sentryDebugIds but with a different global name.\n * Keys are `error.stack` strings, values are debug IDs.\n */\n _debugIds?: Record<string, string>;\n /**\n * Raw module metadata that is injected by bundler plugins.\n *\n * Keys are `error.stack` strings, values are the metadata.\n */\n _sentryModuleMetadata?: Record<string, any>;\n _sentryEsmLoaderHookRegistered?: boolean;\n _sentryInjectLoaderHookRegister?: () => void;\n _sentryInjectLoaderHookRegistered?: boolean;\n} & Carrier;\n\n/** Get's the global object for the current JavaScript runtime */\nexport const GLOBAL_OBJ = globalThis as unknown as InternalGlobal;\n"],"names":[],"mappings":"AAiBA;;AA2CA;AACO,MAAM,UAAA,GAAa,UAAA;;;;"}

View File

@@ -0,0 +1,10 @@
export function groupItemIDsByRelation(items) {
return items.reduce((acc, item) => {
if (!acc[item.relationTo]) {
acc[item.relationTo] = [];
}
acc[item.relationTo].push(item.value.id);
return acc;
}, {});
}
//# sourceMappingURL=groupItemIDsByRelation.js.map

View File

@@ -0,0 +1,4 @@
type Resolve = (source: string | null) => string;
export default function resolver(mapUrl: string | null | undefined, sourceRoot: string | undefined): Resolve;
export {};
//# sourceMappingURL=resolve.d.ts.map

View File

@@ -0,0 +1,196 @@
# gensync
This module allows for developers to write common code that can share
implementation details, hiding whether an underlying request happens
synchronously or asynchronously. This is in contrast with many current Node
APIs which explicitly implement the same API twice, once with calls to
synchronous functions, and once with asynchronous functions.
Take for example `fs.readFile` and `fs.readFileSync`, if you're writing an API
that loads a file and then performs a synchronous operation on the data, it
can be frustrating to maintain two parallel functions.
## Example
```js
const fs = require("fs");
const gensync = require("gensync");
const readFile = gensync({
sync: fs.readFileSync,
errback: fs.readFile,
});
const myOperation = gensync(function* (filename) {
const code = yield* readFile(filename, "utf8");
return "// some custom prefix\n" + code;
});
// Load and add the prefix synchronously:
const result = myOperation.sync("./some-file.js");
// Load and add the prefix asynchronously with promises:
myOperation.async("./some-file.js").then(result => {
});
// Load and add the prefix asynchronously with promises:
myOperation.errback("./some-file.js", (err, result) => {
});
```
This could even be exposed as your official API by doing
```js
// Using the common 'Sync' suffix for sync functions, and 'Async' suffix for
// promise-returning versions.
exports.myOperationSync = myOperation.sync;
exports.myOperationAsync = myOperation.async;
exports.myOperation = myOperation.errback;
```
or potentially expose one of the async versions as the default, with a
`.sync` property on the function to expose the synchronous version.
```js
module.exports = myOperation.errback;
module.exports.sync = myOperation.sync;
````
## API
### gensync(generatorFnOrOptions)
Returns a function that can be "await"-ed in another `gensync` generator
function, or executed via
* `.sync(...args)` - Returns the computed value, or throws.
* `.async(...args)` - Returns a promise for the computed value.
* `.errback(...args, (err, result) => {})` - Calls the callback with the computed value, or error.
#### Passed a generator
Wraps the generator to populate the `.sync`/`.async`/`.errback` helpers above to
allow for evaluation of the generator for the final value.
##### Example
```js
const readFile = function* () {
return 42;
};
const readFileAndMore = gensync(function* (){
const val = yield* readFile();
return 42 + val;
});
// In general cases
const code = readFileAndMore.sync("./file.js", "utf8");
readFileAndMore.async("./file.js", "utf8").then(code => {})
readFileAndMore.errback("./file.js", "utf8", (err, code) => {});
// In a generator being called indirectly with .sync/.async/.errback
const code = yield* readFileAndMore("./file.js", "utf8");
```
#### Passed an options object
* `opts.sync`
Example: `(...args) => 4`
A function that will be called when `.sync()` is called on the `gensync()`
result, or when the result is passed to `yield*` in another generator that
is being run synchronously.
Also called for `.async()` calls if no async handlers are provided.
* `opts.async`
Example: `async (...args) => 4`
A function that will be called when `.async()` or `.errback()` is called on
the `gensync()` result, or when the result is passed to `yield*` in another
generator that is being run asynchronously.
* `opts.errback`
Example: `(...args, cb) => cb(null, 4)`
A function that will be called when `.async()` or `.errback()` is called on
the `gensync()` result, or when the result is passed to `yield*` in another
generator that is being run asynchronously.
This option allows for simpler compatibility with many existing Node APIs,
and also avoids introducing the extra even loop turns that promises introduce
to access the result value.
* `opts.name`
Example: `"readFile"`
A string name to apply to the returned function. If no value is provided,
the name of `errback`/`async`/`sync` functions will be used, with any
`Sync` or `Async` suffix stripped off. If the callback is simply named
with ES6 inference (same name as the options property), the name is ignored.
* `opts.arity`
Example: `4`
A number for the length to set on the returned function. If no value
is provided, the length will be carried over from the `sync` function's
`length` value.
##### Example
```js
const readFile = gensync({
sync: fs.readFileSync,
errback: fs.readFile,
});
const code = readFile.sync("./file.js", "utf8");
readFile.async("./file.js", "utf8").then(code => {})
readFile.errback("./file.js", "utf8", (err, code) => {});
```
### gensync.all(iterable)
`Promise.all`-like combinator that works with an iterable of generator objects
that could be passed to `yield*` within a gensync generator.
#### Example
```js
const loadFiles = gensync(function* () {
return yield* gensync.all([
readFile("./one.js"),
readFile("./two.js"),
readFile("./three.js"),
]);
});
```
### gensync.race(iterable)
`Promise.race`-like combinator that works with an iterable of generator objects
that could be passed to `yield*` within a gensync generator.
#### Example
```js
const loadFiles = gensync(function* () {
return yield* gensync.race([
readFile("./one.js"),
readFile("./two.js"),
readFile("./three.js"),
]);
});
```

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/Logout/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAEnD,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,cAAc,CAAA;AAIrB,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAC/B;IACE,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,GAAG,oBAAoB,CAqBzB,CAAA;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,oBAAoB,qBAE3D"}

View File

@@ -0,0 +1,133 @@
{
"name": "@sentry/node",
"version": "10.39.0",
"description": "Sentry Node SDK using OpenTelemetry for performance instrumentation",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/node",
"author": "Sentry",
"license": "MIT",
"engines": {
"node": ">=18"
},
"files": [
"/build"
],
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "build/types/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./build/types/index.d.ts",
"default": "./build/esm/index.js"
},
"require": {
"types": "./build/types/index.d.ts",
"default": "./build/cjs/index.js"
}
},
"./import": {
"import": {
"default": "./build/import-hook.mjs"
}
},
"./loader": {
"import": {
"default": "./build/loader-hook.mjs"
}
},
"./init": {
"import": {
"default": "./build/esm/init.js"
},
"require": {
"default": "./build/cjs/init.js"
}
},
"./preload": {
"import": {
"default": "./build/esm/preload.js"
},
"require": {
"default": "./build/cjs/preload.js"
}
}
},
"typesVersions": {
"<5.0": {
"build/types/index.d.ts": [
"build/types-ts3.8/index.d.ts"
]
}
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/context-async-hooks": "^2.5.0",
"@opentelemetry/core": "^2.5.0",
"@opentelemetry/instrumentation": "^0.211.0",
"@opentelemetry/instrumentation-amqplib": "0.58.0",
"@opentelemetry/instrumentation-connect": "0.54.0",
"@opentelemetry/instrumentation-dataloader": "0.28.0",
"@opentelemetry/instrumentation-express": "0.59.0",
"@opentelemetry/instrumentation-fs": "0.30.0",
"@opentelemetry/instrumentation-generic-pool": "0.54.0",
"@opentelemetry/instrumentation-graphql": "0.58.0",
"@opentelemetry/instrumentation-hapi": "0.57.0",
"@opentelemetry/instrumentation-http": "0.211.0",
"@opentelemetry/instrumentation-ioredis": "0.59.0",
"@opentelemetry/instrumentation-kafkajs": "0.20.0",
"@opentelemetry/instrumentation-knex": "0.55.0",
"@opentelemetry/instrumentation-koa": "0.59.0",
"@opentelemetry/instrumentation-lru-memoizer": "0.55.0",
"@opentelemetry/instrumentation-mongodb": "0.64.0",
"@opentelemetry/instrumentation-mongoose": "0.57.0",
"@opentelemetry/instrumentation-mysql": "0.57.0",
"@opentelemetry/instrumentation-mysql2": "0.57.0",
"@opentelemetry/instrumentation-pg": "0.63.0",
"@opentelemetry/instrumentation-redis": "0.59.0",
"@opentelemetry/instrumentation-tedious": "0.30.0",
"@opentelemetry/instrumentation-undici": "0.21.0",
"@opentelemetry/resources": "^2.5.0",
"@opentelemetry/sdk-trace-base": "^2.5.0",
"@opentelemetry/semantic-conventions": "^1.39.0",
"@prisma/instrumentation": "7.2.0",
"@sentry/core": "10.39.0",
"@sentry/node-core": "10.39.0",
"@sentry/opentelemetry": "10.39.0",
"import-in-the-middle": "^2.0.6",
"minimatch": "^9.0.0"
},
"devDependencies": {
"@types/node": "^18.19.1"
},
"scripts": {
"build": "run-p build:transpile build:types",
"build:dev": "yarn build",
"build:transpile": "rollup -c rollup.npm.config.mjs",
"build:types": "run-s build:types:core build:types:downlevel",
"build:types:core": "tsc -p tsconfig.types.json",
"build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8",
"build:watch": "run-p build:transpile:watch build:types:watch",
"build:dev:watch": "yarn build:watch",
"build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch",
"build:types:watch": "tsc -p tsconfig.types.json --watch",
"build:tarball": "npm pack",
"circularDepCheck": "madge --circular src/index.ts",
"clean": "rimraf build coverage sentry-node-*.tgz",
"fix": "eslint . --format stylish --fix",
"lint": "eslint . --format stylish",
"lint:es-compatibility": "es-check es2022 ./build/cjs/*.js && es-check es2022 ./build/esm/*.js --module",
"test": "yarn test:unit",
"test:unit": "vitest run",
"test:watch": "vitest --watch",
"yalc:publish": "yalc publish --push --sig"
},
"volta": {
"extends": "../../package.json"
},
"sideEffects": false
}

View File

@@ -0,0 +1,24 @@
var isStrictComparable = require('./_isStrictComparable'),
keys = require('./keys');
/**
* Gets the property names, values, and compare flags of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the match data of `object`.
*/
function getMatchData(object) {
var result = keys(object),
length = result.length;
while (length--) {
var key = result[length],
value = object[key];
result[length] = [key, value, isStrictComparable(value)];
}
return result;
}
module.exports = getMatchData;

View File

@@ -0,0 +1,55 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const { getEntryRuntime, mergeRuntimeOwned } = require("./util/runtime");
/** @typedef {import("./Compiler")} Compiler */
/** @typedef {import("./Module").FactoryMeta} FactoryMeta */
/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */
const PLUGIN_NAME = "FlagAllModulesAsUsedPlugin";
class FlagAllModulesAsUsedPlugin {
/**
* @param {string} explanation explanation
*/
constructor(explanation) {
this.explanation = explanation;
}
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply(compiler) {
compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => {
const moduleGraph = compilation.moduleGraph;
compilation.hooks.optimizeDependencies.tap(PLUGIN_NAME, (modules) => {
/** @type {RuntimeSpec} */
let runtime;
for (const [name, { options }] of compilation.entries) {
runtime = mergeRuntimeOwned(
runtime,
getEntryRuntime(compilation, name, options)
);
}
for (const module of modules) {
const exportsInfo = moduleGraph.getExportsInfo(module);
exportsInfo.setUsedInUnknownWay(runtime);
moduleGraph.addExtraReason(module, this.explanation);
if (module.factoryMeta === undefined) {
module.factoryMeta = {};
}
/** @type {FactoryMeta} */
(module.factoryMeta).sideEffectFree = false;
}
});
});
}
}
module.exports = FlagAllModulesAsUsedPlugin;

View File

@@ -0,0 +1,27 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const NoModeWarning = require("./NoModeWarning");
/** @typedef {import("./Compiler")} Compiler */
const PLUGIN_NAME = "WarnNoModeSetPlugin";
class WarnNoModeSetPlugin {
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply(compiler) {
compiler.hooks.thisCompilation.tap(PLUGIN_NAME, (compilation) => {
compilation.warnings.push(new NoModeWarning());
});
}
}
module.exports = WarnNoModeSetPlugin;

View File

@@ -0,0 +1,10 @@
import type { Locale } from "./types.js";
/**
* @category Locales
* @summary Bengali locale.
* @language Bengali
* @iso-639-2 ben
* @author Touhidur Rahman [@touhidrahman](https://github.com/touhidrahman)
* @author Farhad Yasir [@nutboltu](https://github.com/nutboltu)
*/
export declare const bn: Locale;

View File

@@ -0,0 +1,2 @@
import{throwIfEmpty as e}from"../../utils/throw-if-empty.js";const t=t=>()=>(e(t,`Keys cannot be empty`),{path:`/translations`,body:JSON.stringify(t),method:`DELETE`}),n=t=>()=>(e(String(t),`Key cannot be empty`),{path:`/translations/${t}`,method:`DELETE`});export{n as deleteTranslation,t as deleteTranslations};
//# sourceMappingURL=translations.js.map

View File

@@ -0,0 +1,10 @@
"use strict";
function _define_property(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });
} else obj[key] = value;
return obj;
}
exports._ = _define_property;

View File

@@ -0,0 +1 @@
{"version":3,"file":"cigarette-off.js","sources":["../../../src/icons/cigarette-off.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CigaretteOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMTJIM2ExIDEgMCAwIDAtMSAxdjJhMSAxIDAgMCAwIDEgMWgxMyIgLz4KICA8cGF0aCBkPSJNMTggOGMwLTIuNS0yLTIuNS0yLTUiIC8+CiAgPHBhdGggZD0ibTIgMiAyMCAyMCIgLz4KICA8cGF0aCBkPSJNMjEgMTJhMSAxIDAgMCAxIDEgMXYyYTEgMSAwIDAgMS0uNS44NjYiIC8+CiAgPHBhdGggZD0iTTIyIDhjMC0yLjUtMi0yLjUtMi01IiAvPgogIDxwYXRoIGQ9Ik03IDEydjQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/cigarette-off\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 CigaretteOff = createLucideIcon('CigaretteOff', [\n ['path', { d: 'M12 12H3a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h13', key: '1gdiyg' }],\n ['path', { d: 'M18 8c0-2.5-2-2.5-2-5', key: '1il607' }],\n ['path', { d: 'm2 2 20 20', key: '1ooewy' }],\n ['path', { d: 'M21 12a1 1 0 0 1 1 1v2a1 1 0 0 1-.5.866', key: '166zjj' }],\n ['path', { d: 'M22 8c0-2.5-2-2.5-2-5', key: '1gah44' }],\n ['path', { d: 'M7 12v4', key: 'jqww69' }],\n]);\n\nexport default CigaretteOff;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6C,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,CAAA;AAAA,CAAA,CAC1E,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,CAAA;AAAA,CAAA,CACtD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,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,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,CAAA;AAAA,CAAA,CACtD,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;AAC1C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/createGlobalVersion.ts"],"sourcesContent":["import type { CreateGlobalVersionArgs, JsonObject, TypeWithVersion } from 'payload'\n\nimport { sql } from 'drizzle-orm'\nimport { buildVersionGlobalFields } from 'payload'\nimport { hasDraftsEnabled } from 'payload/shared'\nimport toSnakeCase from 'to-snake-case'\n\nimport type { DrizzleAdapter } from './types.js'\n\nimport { upsertRow } from './upsertRow/index.js'\nimport { getTransaction } from './utilities/getTransaction.js'\n\nexport async function createGlobalVersion<T extends JsonObject = JsonObject>(\n this: DrizzleAdapter,\n {\n autosave,\n createdAt,\n globalSlug,\n publishedLocale,\n req,\n returning,\n select,\n snapshot,\n updatedAt,\n versionData,\n }: CreateGlobalVersionArgs,\n): Promise<TypeWithVersion<T>> {\n const global = this.payload.globals.config.find(({ slug }) => slug === globalSlug)\n\n const tableName = this.tableNameMap.get(`_${toSnakeCase(global.slug)}${this.versionsSuffix}`)\n\n const db = await getTransaction(this, req)\n\n const result = await upsertRow<TypeWithVersion<T>>({\n adapter: this,\n data: {\n autosave,\n createdAt,\n latest: true,\n publishedLocale,\n snapshot,\n updatedAt,\n version: versionData,\n },\n db,\n fields: buildVersionGlobalFields(this.payload.config, global, true),\n globalSlug,\n ignoreResult: returning === false ? 'idOnly' : false,\n operation: 'create',\n req,\n select,\n tableName,\n })\n\n const table = this.tables[tableName]\n if (hasDraftsEnabled(global)) {\n await this.execute({\n db,\n sql: sql`\n UPDATE ${table}\n SET latest = false\n WHERE ${table.id} != ${result.id};\n `,\n })\n }\n\n if (returning === false) {\n return null\n }\n\n return result\n}\n"],"names":["sql","buildVersionGlobalFields","hasDraftsEnabled","toSnakeCase","upsertRow","getTransaction","createGlobalVersion","autosave","createdAt","globalSlug","publishedLocale","req","returning","select","snapshot","updatedAt","versionData","global","payload","globals","config","find","slug","tableName","tableNameMap","get","versionsSuffix","db","result","adapter","data","latest","version","fields","ignoreResult","operation","table","tables","execute","id"],"mappings":"AAEA,SAASA,GAAG,QAAQ,cAAa;AACjC,SAASC,wBAAwB,QAAQ,UAAS;AAClD,SAASC,gBAAgB,QAAQ,iBAAgB;AACjD,OAAOC,iBAAiB,gBAAe;AAIvC,SAASC,SAAS,QAAQ,uBAAsB;AAChD,SAASC,cAAc,QAAQ,gCAA+B;AAE9D,OAAO,eAAeC,oBAEpB,EACEC,QAAQ,EACRC,SAAS,EACTC,UAAU,EACVC,eAAe,EACfC,GAAG,EACHC,SAAS,EACTC,MAAM,EACNC,QAAQ,EACRC,SAAS,EACTC,WAAW,EACa;IAE1B,MAAMC,SAAS,IAAI,CAACC,OAAO,CAACC,OAAO,CAACC,MAAM,CAACC,IAAI,CAAC,CAAC,EAAEC,IAAI,EAAE,GAAKA,SAASb;IAEvE,MAAMc,YAAY,IAAI,CAACC,YAAY,CAACC,GAAG,CAAC,CAAC,CAAC,EAAEtB,YAAYc,OAAOK,IAAI,IAAI,IAAI,CAACI,cAAc,EAAE;IAE5F,MAAMC,KAAK,MAAMtB,eAAe,IAAI,EAAEM;IAEtC,MAAMiB,SAAS,MAAMxB,UAA8B;QACjDyB,SAAS,IAAI;QACbC,MAAM;YACJvB;YACAC;YACAuB,QAAQ;YACRrB;YACAI;YACAC;YACAiB,SAAShB;QACX;QACAW;QACAM,QAAQhC,yBAAyB,IAAI,CAACiB,OAAO,CAACE,MAAM,EAAEH,QAAQ;QAC9DR;QACAyB,cAActB,cAAc,QAAQ,WAAW;QAC/CuB,WAAW;QACXxB;QACAE;QACAU;IACF;IAEA,MAAMa,QAAQ,IAAI,CAACC,MAAM,CAACd,UAAU;IACpC,IAAIrB,iBAAiBe,SAAS;QAC5B,MAAM,IAAI,CAACqB,OAAO,CAAC;YACjBX;YACA3B,KAAKA,GAAG,CAAC;iBACE,EAAEoC,MAAM;;gBAET,EAAEA,MAAMG,EAAE,CAAC,IAAI,EAAEX,OAAOW,EAAE,CAAC;QACnC,CAAC;QACL;IACF;IAEA,IAAI3B,cAAc,OAAO;QACvB,OAAO;IACT;IAEA,OAAOgB;AACT"}

View File

@@ -0,0 +1,16 @@
/**
* Removes all child nodes from a given node.
*
* @param node the node to clear
*/
export default function clear(node) {
if (node) {
while (node.firstChild) {
node.removeChild(node.firstChild);
}
return node;
}
return null;
}

View File

@@ -0,0 +1,10 @@
/**
* 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.
*
*/
const mod = await (process.env.NODE_ENV !== 'production' ? import('./LexicalErrorBoundary.dev.mjs') : import('./LexicalErrorBoundary.prod.mjs'));
export const LexicalErrorBoundary = mod.LexicalErrorBoundary;

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