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 @@
function _classApplyDescriptorSet(e, t, l) {
if (t.set) t.set.call(e, l);else {
if (!t.writable) throw new TypeError("attempted to set read only private field");
t.value = l;
}
}
module.exports = _classApplyDescriptorSet, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -0,0 +1,77 @@
import { GraphQLError } from '../../error/GraphQLError.mjs';
import { Kind } from '../../language/kinds.mjs';
import { collectFields } from '../../execution/collectFields.mjs';
/**
* Subscriptions must only include a non-introspection field.
*
* A GraphQL subscription is valid only if it contains a single root field and
* that root field is not an introspection field.
*
* See https://spec.graphql.org/draft/#sec-Single-root-field
*/
export function SingleFieldSubscriptionsRule(context) {
return {
OperationDefinition(node) {
if (node.operation === 'subscription') {
const schema = context.getSchema();
const subscriptionType = schema.getSubscriptionType();
if (subscriptionType) {
const operationName = node.name ? node.name.value : null;
const variableValues = Object.create(null);
const document = context.getDocument();
const fragments = Object.create(null);
for (const definition of document.definitions) {
if (definition.kind === Kind.FRAGMENT_DEFINITION) {
fragments[definition.name.value] = definition;
}
}
const fields = collectFields(
schema,
fragments,
variableValues,
subscriptionType,
node.selectionSet,
);
if (fields.size > 1) {
const fieldSelectionLists = [...fields.values()];
const extraFieldSelectionLists = fieldSelectionLists.slice(1);
const extraFieldSelections = extraFieldSelectionLists.flat();
context.reportError(
new GraphQLError(
operationName != null
? `Subscription "${operationName}" must select only one top level field.`
: 'Anonymous Subscription must select only one top level field.',
{
nodes: extraFieldSelections,
},
),
);
}
for (const fieldNodes of fields.values()) {
const field = fieldNodes[0];
const fieldName = field.name.value;
if (fieldName.startsWith('__')) {
context.reportError(
new GraphQLError(
operationName != null
? `Subscription "${operationName}" must not select an introspection top level field.`
: 'Anonymous Subscription must not select an introspection top level field.',
{
nodes: fieldNodes,
},
),
);
}
}
}
}
},
};
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"calendar-x-2.js","sources":["../../../src/icons/calendar-x-2.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CalendarX2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNOCAydjQiIC8+CiAgPHBhdGggZD0iTTE2IDJ2NCIgLz4KICA8cGF0aCBkPSJNMjEgMTNWNmEyIDIgMCAwIDAtMi0ySDVhMiAyIDAgMCAwLTIgMnYxNGEyIDIgMCAwIDAgMiAyaDgiIC8+CiAgPHBhdGggZD0iTTMgMTBoMTgiIC8+CiAgPHBhdGggZD0ibTE3IDIyIDUtNSIgLz4KICA8cGF0aCBkPSJtMTcgMTcgNSA1IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/calendar-x-2\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 CalendarX2 = createLucideIcon('CalendarX2', [\n ['path', { d: 'M8 2v4', key: '1cmpym' }],\n ['path', { d: 'M16 2v4', key: '4m81vk' }],\n ['path', { d: 'M21 13V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8', key: '3spt84' }],\n ['path', { d: 'M3 10h18', key: '8toen8' }],\n ['path', { d: 'm17 22 5-5', key: '1k6ppv' }],\n ['path', { d: 'm17 17 5 5', key: 'p7ous7' }],\n]);\n\nexport default CalendarX2;\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,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC1F,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"prepareEvent.d.ts","sourceRoot":"","sources":["../../../src/utils/prepareEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAA2B,YAAY,EAAE,MAAM,cAAc,CAAC;AAGrG;;;;GAIG;AACH,MAAM,MAAM,kCAAkC,GAC1C,CAAC,cAAc,GAAG,OAAO,CAAC;KAAG,GAAG,IAAI,MAAM,SAAS,GAAG,KAAK;CAAE,CAAC,CAAC,GAC/D,CAAC,SAAS,GAAG,OAAO,CAAC;KAAG,GAAG,IAAI,MAAM,YAAY,GAAG,KAAK;CAAE,CAAC,CAAC,CAAC;AAElE;;;GAGG;AACH,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,kCAAkC,GAAG,SAAS,GACnD,SAAS,GAAG,SAAS,CAiBvB"}

View File

@@ -0,0 +1,144 @@
{
"name": "@sentry/node-core",
"version": "10.39.0",
"description": "Sentry Node-Core SDK",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/node-core",
"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"
}
},
"./light": {
"import": {
"types": "./build/types/light/index.d.ts",
"default": "./build/esm/light/index.js"
},
"require": {
"types": "./build/types/light/index.d.ts",
"default": "./build/cjs/light/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"
}
}
},
"typesVersions": {
"<5.0": {
"build/types/index.d.ts": [
"build/types-ts3.8/index.d.ts"
]
}
},
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/context-async-hooks": "^1.30.1 || ^2.1.0",
"@opentelemetry/core": "^1.30.1 || ^2.1.0",
"@opentelemetry/instrumentation": ">=0.57.1 <1",
"@opentelemetry/resources": "^1.30.1 || ^2.1.0",
"@opentelemetry/sdk-trace-base": "^1.30.1 || ^2.1.0",
"@opentelemetry/semantic-conventions": "^1.39.0"
},
"peerDependenciesMeta": {
"@opentelemetry/api": {
"optional": true
},
"@opentelemetry/context-async-hooks": {
"optional": true
},
"@opentelemetry/core": {
"optional": true
},
"@opentelemetry/instrumentation": {
"optional": true
},
"@opentelemetry/resources": {
"optional": true
},
"@opentelemetry/sdk-trace-base": {
"optional": true
},
"@opentelemetry/semantic-conventions": {
"optional": true
}
},
"dependencies": {
"@apm-js-collab/tracing-hooks": "^0.3.1",
"@sentry/core": "10.39.0",
"@sentry/opentelemetry": "10.39.0",
"import-in-the-middle": "^2.0.6"
},
"devDependencies": {
"@apm-js-collab/code-transformer": "^0.8.2",
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/context-async-hooks": "^2.5.0",
"@opentelemetry/core": "^2.5.0",
"@opentelemetry/instrumentation": "^0.211.0",
"@opentelemetry/resources": "^2.5.0",
"@opentelemetry/sdk-trace-base": "^2.5.0",
"@opentelemetry/semantic-conventions": "^1.39.0",
"@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,27 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import { MySqlColumn, MySqlColumnBuilder } from "./common.js";
export type MySqlTimeBuilderInitial<TName extends string> = MySqlTimeBuilder<{
name: TName;
dataType: 'string';
columnType: 'MySqlTime';
data: string;
driverParam: string | number;
enumValues: undefined;
}>;
export declare class MySqlTimeBuilder<T extends ColumnBuilderBaseConfig<'string', 'MySqlTime'>> extends MySqlColumnBuilder<T, TimeConfig> {
static readonly [entityKind]: string;
constructor(name: T['name'], config: TimeConfig | undefined);
}
export declare class MySqlTime<T extends ColumnBaseConfig<'string', 'MySqlTime'>> extends MySqlColumn<T, TimeConfig> {
static readonly [entityKind]: string;
readonly fsp: number | undefined;
getSQLType(): string;
}
export type TimeConfig = {
fsp?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
};
export declare function time(): MySqlTimeBuilderInitial<''>;
export declare function time(config?: TimeConfig): MySqlTimeBuilderInitial<''>;
export declare function time<TName extends string>(name: TName, config?: TimeConfig): MySqlTimeBuilderInitial<TName>;

View File

@@ -0,0 +1 @@
{"version":3,"file":"spotlight.js","sources":["../../../../../src/integrations/spotlight.ts"],"sourcesContent":["import type { Client, Envelope, Event, IntegrationFn } from '@sentry/core';\nimport { debug, defineIntegration, serializeEnvelope } from '@sentry/core';\nimport { getNativeImplementation } from '@sentry-internal/browser-utils';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { WINDOW } from '../helpers';\n\nexport type SpotlightConnectionOptions = {\n /**\n * Set this if the Spotlight Sidecar is not running on localhost:8969\n * By default, the Url is set to http://localhost:8969/stream\n */\n sidecarUrl?: string;\n};\n\nexport const INTEGRATION_NAME = 'SpotlightBrowser';\n\nconst _spotlightIntegration = ((options: Partial<SpotlightConnectionOptions> = {}) => {\n const sidecarUrl = options.sidecarUrl || 'http://localhost:8969/stream';\n\n return {\n name: INTEGRATION_NAME,\n setup: () => {\n DEBUG_BUILD && debug.log('Using Sidecar URL', sidecarUrl);\n },\n // We don't want to send interaction transactions/root spans created from\n // clicks within Spotlight to Sentry. Neither do we want them to be sent to\n // spotlight.\n processEvent: event => (isSpotlightInteraction(event) ? null : event),\n afterAllSetup: (client: Client) => {\n setupSidecarForwarding(client, sidecarUrl);\n },\n };\n}) satisfies IntegrationFn;\n\nfunction setupSidecarForwarding(client: Client, sidecarUrl: string): void {\n const makeFetch: typeof WINDOW.fetch | undefined = getNativeImplementation('fetch');\n let failCount = 0;\n\n client.on('beforeEnvelope', (envelope: Envelope) => {\n if (failCount > 3) {\n debug.warn('[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:', failCount);\n return;\n }\n\n makeFetch(sidecarUrl, {\n method: 'POST',\n body: serializeEnvelope(envelope),\n headers: {\n 'Content-Type': 'application/x-sentry-envelope',\n },\n mode: 'cors',\n }).then(\n res => {\n if (res.status >= 200 && res.status < 400) {\n // Reset failed requests counter on success\n failCount = 0;\n }\n },\n err => {\n failCount++;\n debug.error(\n \"Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/\",\n err,\n );\n },\n );\n });\n}\n\n/**\n * Use this integration to send errors and transactions to Spotlight.\n *\n * Learn more about spotlight at https://spotlightjs.com\n */\nexport const spotlightBrowserIntegration = defineIntegration(_spotlightIntegration);\n\n/**\n * Flags if the event is a transaction created from an interaction with the spotlight UI.\n */\nexport function isSpotlightInteraction(event: Event): boolean {\n return Boolean(\n event.type === 'transaction' &&\n event.spans &&\n event.contexts?.trace &&\n event.contexts.trace.op === 'ui.action.click' &&\n event.spans.some(({ description }) => description?.includes('#sentry-spotlight')),\n );\n}\n"],"names":[],"mappings":";;;;AAcO,MAAM,gBAAA,GAAmB;;AAEhC,MAAM,qBAAA,IAAyB,CAAC,OAAO,GAAwC,EAAE,KAAK;AACtF,EAAE,MAAM,UAAA,GAAa,OAAO,CAAC,UAAA,IAAc,8BAA8B;;AAEzE,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,gBAAgB;AAC1B,IAAI,KAAK,EAAE,MAAM;AACjB,MAAM,WAAA,IAAe,KAAK,CAAC,GAAG,CAAC,mBAAmB,EAAE,UAAU,CAAC;AAC/D,IAAI,CAAC;AACL;AACA;AACA;AACA,IAAI,YAAY,EAAE,KAAA,KAAU,sBAAsB,CAAC,KAAK,CAAA,GAAI,IAAA,GAAO,KAAK,CAAC;AACzE,IAAI,aAAa,EAAE,CAAC,MAAM,KAAa;AACvC,MAAM,sBAAsB,CAAC,MAAM,EAAE,UAAU,CAAC;AAChD,IAAI,CAAC;AACL,GAAG;AACH,CAAC,CAAA;;AAED,SAAS,sBAAsB,CAAC,MAAM,EAAU,UAAU,EAAgB;AAC1E,EAAE,MAAM,SAAS,GAAoC,uBAAuB,CAAC,OAAO,CAAC;AACrF,EAAE,IAAI,SAAA,GAAY,CAAC;;AAEnB,EAAE,MAAM,CAAC,EAAE,CAAC,gBAAgB,EAAE,CAAC,QAAQ,KAAe;AACtD,IAAI,IAAI,SAAA,GAAY,CAAC,EAAE;AACvB,MAAM,KAAK,CAAC,IAAI,CAAC,uFAAuF,EAAE,SAAS,CAAC;AACpH,MAAM;AACN,IAAI;;AAEJ,IAAI,SAAS,CAAC,UAAU,EAAE;AAC1B,MAAM,MAAM,EAAE,MAAM;AACpB,MAAM,IAAI,EAAE,iBAAiB,CAAC,QAAQ,CAAC;AACvC,MAAM,OAAO,EAAE;AACf,QAAQ,cAAc,EAAE,+BAA+B;AACvD,OAAO;AACP,MAAM,IAAI,EAAE,MAAM;AAClB,KAAK,CAAC,CAAC,IAAI;AACX,MAAM,OAAO;AACb,QAAQ,IAAI,GAAG,CAAC,MAAA,IAAU,GAAA,IAAO,GAAG,CAAC,MAAA,GAAS,GAAG,EAAE;AACnD;AACA,UAAU,SAAA,GAAY,CAAC;AACvB,QAAQ;AACR,MAAM,CAAC;AACP,MAAM,OAAO;AACb,QAAQ,SAAS,EAAE;AACnB,QAAQ,KAAK,CAAC,KAAK;AACnB,UAAU,8FAA8F;AACxG,UAAU,GAAG;AACb,SAAS;AACT,MAAM,CAAC;AACP,KAAK;AACL,EAAE,CAAC,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA;MACa,2BAAA,GAA8B,iBAAiB,CAAC,qBAAqB;;AAElF;AACA;AACA;AACO,SAAS,sBAAsB,CAAC,KAAK,EAAkB;AAC9D,EAAE,OAAO,OAAO;AAChB,IAAI,KAAK,CAAC,IAAA,KAAS,aAAA;AACnB,IAAI,KAAK,CAAC,KAAA;AACV,IAAI,KAAK,CAAC,QAAQ,EAAE,KAAA;AACpB,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAA,KAAO,iBAAA;AAChC,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,WAAA,EAAa,KAAK,WAAW,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAC;AACrF,GAAG;AACH;;;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"duplicate.d.ts","sourceRoot":"","sources":["../../../src/collections/operations/duplicate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAA;AACzE,OAAO,KAAK,EAAE,8BAA8B,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAElG,OAAO,EAAE,KAAK,SAAS,IAAI,eAAe,EAAmB,MAAM,aAAa,CAAA;AAEhF,MAAM,MAAM,SAAS,CAAC,KAAK,SAAS,cAAc,IAAI;IACpD,IAAI,CAAC,EAAE,WAAW,CAAC,8BAA8B,CAAC,KAAK,CAAC,CAAC,CAAA;IACzD,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CACpB,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,iBAAiB,CAAC,CAAA;AAE5D,eAAO,MAAM,kBAAkB,GAC7B,KAAK,SAAS,cAAc,EAC5B,OAAO,SAAS,wBAAwB,CAAC,KAAK,CAAC,gBAEjC,SAAS,CAAC,KAAK,CAAC,KAC7B,OAAO,CAAC,6BAA6B,CAAC,KAAK,EAAE,OAAO,CAAC,CAOvD,CAAA"}

View File

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

View File

@@ -0,0 +1,57 @@
"use strict";
exports.isWithinInterval = isWithinInterval;
var _index = require("./toDate.cjs");
/**
* The {@link isWithinInterval} function options.
*/
/**
* @name isWithinInterval
* @category Interval Helpers
* @summary Is the given date within the interval?
*
* @description
* Is the given date within the interval? (Including start and end.)
*
* @param date - The date to check
* @param interval - The interval to check
* @param options - An object with options
*
* @returns The date is within the interval
*
* @example
* // For the date within the interval:
* isWithinInterval(new Date(2014, 0, 3), {
* start: new Date(2014, 0, 1),
* end: new Date(2014, 0, 7)
* })
* // => true
*
* @example
* // For the date outside of the interval:
* isWithinInterval(new Date(2014, 0, 10), {
* start: new Date(2014, 0, 1),
* end: new Date(2014, 0, 7)
* })
* // => false
*
* @example
* // For date equal to the interval start:
* isWithinInterval(date, { start, end: date })
* // => true
*
* @example
* // For date equal to the interval end:
* isWithinInterval(date, { start: date, end })
* // => true
*/
function isWithinInterval(date, interval, options) {
const time = +(0, _index.toDate)(date, options?.in);
const [startTime, endTime] = [
+(0, _index.toDate)(interval.start, options?.in),
+(0, _index.toDate)(interval.end, options?.in),
].sort((a, b) => a - b);
return time >= startTime && time <= endTime;
}

View File

@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var render_playground_page_1 = require("./render-playground-page");
exports.renderPlaygroundPage = render_playground_page_1.renderPlaygroundPage;
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/exports/utilities.ts"],"sourcesContent":["export { generateSchema } from '../bin/generateSchema.js'\nexport { buildObjectType } from '../schema/buildObjectType.js'\n"],"names":["generateSchema","buildObjectType"],"mappings":"AAAA,SAASA,cAAc,QAAQ,2BAA0B;AACzD,SAASC,eAAe,QAAQ,+BAA8B"}

View File

@@ -0,0 +1,41 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.cjs");
const dateFormats = {
full: "eeee d. MMMM y",
long: "d. MMMM y",
medium: "d. MMM y",
short: "d.M.y",
};
const timeFormats = {
full: "HH.mm.ss zzzz",
long: "HH.mm.ss z",
medium: "HH.mm.ss",
short: "HH.mm",
};
const dateTimeFormats = {
full: "{{date}} 'klo' {{time}}",
long: "{{date}} 'klo' {{time}}",
medium: "{{date}} {{time}}",
short: "{{date}} {{time}}",
};
const formatLong = (exports.formatLong = {
date: (0, _index.buildFormatLongFn)({
formats: dateFormats,
defaultWidth: "full",
}),
time: (0, _index.buildFormatLongFn)({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: (0, _index.buildFormatLongFn)({
formats: dateTimeFormats,
defaultWidth: "full",
}),
});

View File

@@ -0,0 +1,39 @@
var assert = require('assert')
var snake = require('..')
/**
* Cases.
*/
var strings = {
camel: 'thisIsAString',
constant: 'THIS_IS_A_STRING',
dot: 'this.is.a.string',
pascal: 'ThisIsAString',
sentence: 'This is a string.',
snake: 'this_is_a_string',
space: 'this is a string',
title: 'This Is a String',
junk: '-this__is$%a-string...'
}
/**
* Tests.
*/
describe('to-snake-case', function () {
for (var key in strings) test(key)
})
/**
* Create a test for a given case `key`.
*
* @param {String} key
*/
function test(key) {
it('should convert ' + key + ' case', function () {
assert.equal(snake(strings[key]), 'this_is_a_string')
})
}

View File

@@ -0,0 +1,35 @@
{
"name": "kleur",
"version": "3.0.3",
"repository": "lukeed/kleur",
"description": "The fastest Node.js library for formatting terminal text with ANSI colors~!",
"license": "MIT",
"files": [
"*.js",
"*.d.ts"
],
"author": {
"name": "Luke Edwards",
"email": "luke.edwards05@gmail.com",
"url": "lukeed.com"
},
"scripts": {
"test": "tape test/*.js | tap-spec"
},
"engines": {
"node": ">=6"
},
"keywords": [
"ansi",
"cli",
"color",
"colors",
"console",
"terminal"
],
"types": "kleur.d.ts",
"devDependencies": {
"tap-spec": "^5.0.0",
"tape": "^4.9.1"
}
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"spanstatus.js","sources":["../../../src/tracing/spanstatus.ts"],"sourcesContent":["import type { Span } from '../types-hoist/span';\nimport type { SpanStatus } from '../types-hoist/spanStatus';\n\nexport const SPAN_STATUS_UNSET = 0;\nexport const SPAN_STATUS_OK = 1;\nexport const SPAN_STATUS_ERROR = 2;\n\n/**\n * Converts a HTTP status code into a sentry status with a message.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or internal_error.\n */\n// https://develop.sentry.dev/sdk/event-payloads/span/\nexport function getSpanStatusFromHttpCode(httpStatus: number): SpanStatus {\n if (httpStatus < 400 && httpStatus >= 100) {\n return { code: SPAN_STATUS_OK };\n }\n\n if (httpStatus >= 400 && httpStatus < 500) {\n switch (httpStatus) {\n case 401:\n return { code: SPAN_STATUS_ERROR, message: 'unauthenticated' };\n case 403:\n return { code: SPAN_STATUS_ERROR, message: 'permission_denied' };\n case 404:\n return { code: SPAN_STATUS_ERROR, message: 'not_found' };\n case 409:\n return { code: SPAN_STATUS_ERROR, message: 'already_exists' };\n case 413:\n return { code: SPAN_STATUS_ERROR, message: 'failed_precondition' };\n case 429:\n return { code: SPAN_STATUS_ERROR, message: 'resource_exhausted' };\n case 499:\n return { code: SPAN_STATUS_ERROR, message: 'cancelled' };\n default:\n return { code: SPAN_STATUS_ERROR, message: 'invalid_argument' };\n }\n }\n\n if (httpStatus >= 500 && httpStatus < 600) {\n switch (httpStatus) {\n case 501:\n return { code: SPAN_STATUS_ERROR, message: 'unimplemented' };\n case 503:\n return { code: SPAN_STATUS_ERROR, message: 'unavailable' };\n case 504:\n return { code: SPAN_STATUS_ERROR, message: 'deadline_exceeded' };\n default:\n return { code: SPAN_STATUS_ERROR, message: 'internal_error' };\n }\n }\n\n return { code: SPAN_STATUS_ERROR, message: 'internal_error' };\n}\n\n/**\n * Sets the Http status attributes on the current span based on the http code.\n * Additionally, the span's status is updated, depending on the http code.\n */\nexport function setHttpStatus(span: Span, httpStatus: number): void {\n span.setAttribute('http.response.status_code', httpStatus);\n\n const spanStatus = getSpanStatusFromHttpCode(httpStatus);\n if (spanStatus.message !== 'unknown_error') {\n span.setStatus(spanStatus);\n }\n}\n"],"names":[],"mappings":";;AAGO,MAAM,iBAAA,GAAoB;AAC1B,MAAM,cAAA,GAAiB;AACvB,MAAM,iBAAA,GAAoB;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,yBAAyB,CAAC,UAAU,EAAsB;AAC1E,EAAE,IAAI,UAAA,GAAa,OAAO,UAAA,IAAc,GAAG,EAAE;AAC7C,IAAI,OAAO,EAAE,IAAI,EAAE,gBAAgB;AACnC,EAAE;;AAEF,EAAE,IAAI,UAAA,IAAc,OAAO,UAAA,GAAa,GAAG,EAAE;AAC7C,IAAI,QAAQ,UAAU;AACtB,MAAM,KAAK,GAAG;AACd,QAAQ,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,iBAAA,EAAmB;AACtE,MAAM,KAAK,GAAG;AACd,QAAQ,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,mBAAA,EAAqB;AACxE,MAAM,KAAK,GAAG;AACd,QAAQ,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,WAAA,EAAa;AAChE,MAAM,KAAK,GAAG;AACd,QAAQ,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,gBAAA,EAAkB;AACrE,MAAM,KAAK,GAAG;AACd,QAAQ,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,qBAAA,EAAuB;AAC1E,MAAM,KAAK,GAAG;AACd,QAAQ,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,oBAAA,EAAsB;AACzE,MAAM,KAAK,GAAG;AACd,QAAQ,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,WAAA,EAAa;AAChE,MAAM;AACN,QAAQ,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,kBAAA,EAAoB;AACvE;AACA,EAAE;;AAEF,EAAE,IAAI,UAAA,IAAc,OAAO,UAAA,GAAa,GAAG,EAAE;AAC7C,IAAI,QAAQ,UAAU;AACtB,MAAM,KAAK,GAAG;AACd,QAAQ,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,eAAA,EAAiB;AACpE,MAAM,KAAK,GAAG;AACd,QAAQ,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,aAAA,EAAe;AAClE,MAAM,KAAK,GAAG;AACd,QAAQ,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,mBAAA,EAAqB;AACxE,MAAM;AACN,QAAQ,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,gBAAA,EAAkB;AACrE;AACA,EAAE;;AAEF,EAAE,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,gBAAA,EAAkB;AAC/D;;AAEA;AACA;AACA;AACA;AACO,SAAS,aAAa,CAAC,IAAI,EAAQ,UAAU,EAAgB;AACpE,EAAE,IAAI,CAAC,YAAY,CAAC,2BAA2B,EAAE,UAAU,CAAC;;AAE5D,EAAE,MAAM,UAAA,GAAa,yBAAyB,CAAC,UAAU,CAAC;AAC1D,EAAE,IAAI,UAAU,CAAC,OAAA,KAAY,eAAe,EAAE;AAC9C,IAAI,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC;AAC9B,EAAE;AACF;;;;;;;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"wrappedfunction.d.ts","sourceRoot":"","sources":["../../../src/types-hoist/wrappedfunction.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,QAAQ,GAAG,QAAQ,IAAI,CAAC,GAAG;IAC/D,kBAAkB,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IACxC,mBAAmB,CAAC,EAAE,CAAC,CAAC;CACzB,CAAC"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"quote.js","sourceRoot":"","sources":["../../lib/runtime/quote.ts"],"names":[],"mappings":";;AAAA,MAAM,WAAW;AACf,2EAA2E;AAC3E,iIAAiI,CAAA;AAEnI,MAAM,OAAO,GAA6B;IACxC,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK;IACX,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;CACb,CAAA;AAED,SAAwB,KAAK,CAAC,CAAS;IACrC,WAAW,CAAC,SAAS,GAAG,CAAC,CAAA;IACzB,OAAO,CACL,GAAG;QACH,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;YAClB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE;gBAC3B,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;gBACpB,OAAO,OAAO,CAAC,KAAK,QAAQ;oBAC1B,CAAC,CAAC,CAAC;oBACH,CAAC,CAAC,KAAK,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;YAC/D,CAAC,CAAC;YACJ,CAAC,CAAC,CAAC,CAAC;QACN,GAAG,CACJ,CAAA;AACH,CAAC;AAdD,wBAcC;AAED,KAAK,CAAC,IAAI,GAAG,2CAA2C,CAAA"}

View File

@@ -0,0 +1,37 @@
var baseClamp = require('./_baseClamp'),
toInteger = require('./toInteger');
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
/**
* Converts `value` to a safe integer. A safe integer can be compared and
* represented correctly.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted integer.
* @example
*
* _.toSafeInteger(3.2);
* // => 3
*
* _.toSafeInteger(Number.MIN_VALUE);
* // => 0
*
* _.toSafeInteger(Infinity);
* // => 9007199254740991
*
* _.toSafeInteger('3.2');
* // => 3
*/
function toSafeInteger(value) {
return value
? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
: (value === 0 ? value : 0);
}
module.exports = toSafeInteger;

View File

@@ -0,0 +1 @@
module.exports={C:{"5":0.12989,"115":0.13917,"131":0.00928,"140":0.04639,"143":0.00928,"144":0.0232,"145":0.23195,"146":0.4871,_:"2 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 132 133 134 135 136 137 138 139 141 142 147 148 149 3.5 3.6"},D:{"65":0.00464,"69":0.09742,"79":0.01856,"87":0.06031,"97":0.18092,"103":0.52885,"106":0.00464,"107":0.00464,"109":0.10206,"111":0.13453,"112":0.09742,"114":0.02783,"116":0.04639,"119":0.00464,"122":0.01392,"124":0.00464,"125":0.63554,"126":0.04175,"128":0.19484,"131":0.03711,"132":0.12989,"133":0.01392,"134":0.00464,"135":0.00464,"136":0.00928,"137":0.03247,"138":0.08814,"139":0.16237,"140":0.09742,"141":0.75616,"142":6.98633,"143":15.37829,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 66 67 68 70 71 72 73 74 75 76 77 78 80 81 83 84 85 86 88 89 90 91 92 93 94 95 96 98 99 100 101 102 104 105 108 110 113 115 117 118 120 121 123 127 129 130 144 145 146"},F:{"93":0.01392,"124":0.27834,"125":0.01392,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"18":0.00464,"109":0.00928,"129":0.00928,"134":0.00464,"138":0.05103,"139":0.02783,"141":0.49173,"142":1.42881,"143":4.22613,_:"12 13 14 15 16 17 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 130 131 132 133 135 136 137 140"},E:{"14":0.00928,_:"0 4 5 6 7 8 9 10 11 12 13 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 14.1 15.1 15.2-15.3 15.5 16.0 16.1 16.2 16.3 16.4 17.0 18.0 18.2 26.3","13.1":0.02783,"15.4":0.01392,"15.6":0.07422,"16.5":0.00928,"16.6":0.10206,"17.1":0.00928,"17.2":0.02783,"17.3":0.00464,"17.4":0.08814,"17.5":0.00928,"17.6":0.09742,"18.1":0.00464,"18.3":0.61235,"18.4":0.00928,"18.5-18.6":0.2969,"26.0":0.04175,"26.1":0.33865,"26.2":0.12525},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00271,"5.0-5.1":0,"6.0-6.1":0.00541,"7.0-7.1":0.00406,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.01083,"10.0-10.2":0.00135,"10.3":0.01895,"11.0-11.2":0.23283,"11.3-11.4":0.00677,"12.0-12.1":0.00541,"12.2-12.5":0.06091,"13.0-13.1":0.00135,"13.2":0.00948,"13.3":0.00271,"13.4-13.7":0.00948,"14.0-14.4":0.01895,"14.5-14.8":0.0203,"15.0-15.1":0.02166,"15.2-15.3":0.01624,"15.4":0.0176,"15.5":0.01895,"15.6-15.8":0.29374,"16.0":0.03384,"16.1":0.06498,"16.2":0.03384,"16.3":0.06091,"16.4":0.01489,"16.5":0.02572,"16.6-16.7":0.38173,"17.0":0.02166,"17.1":0.03519,"17.2":0.02572,"17.3":0.03926,"17.4":0.06633,"17.5":0.12995,"17.6-17.7":0.30051,"18.0":0.06768,"18.1":0.14078,"18.2":0.07445,"18.3":0.2423,"18.4":0.12454,"18.5-18.7":8.94223,"26.0":0.17462,"26.1":1.45247,"26.2":0.27615,"26.3":0.01218},P:{"22":0.02115,"24":0.03172,"25":0.01057,"26":0.02115,"27":0.04229,"28":0.17974,"29":1.57539,_:"4 20 21 23 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","7.2-7.4":0.02115},I:{"0":0.02676,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00001,"4.4":0,"4.4.3-4.4.4":0.00002},A:{_:"6 7 8 9 10 11 5.5"},K:{"0":0.7559,_:"10 11 12 11.1 11.5 12.1"},N:{_:"10 11"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},Q:{_:"14.9"},O:{"0":0.06969},H:{"0":0},L:{"0":40.40427},R:{_:"0"},M:{"0":0.193}};

View File

@@ -0,0 +1,9 @@
/**
* 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{useLexicalComposerContext as o}from"@lexical/react/LexicalComposerContext";import{selectionAlwaysOnDisplay as r}from"@lexical/utils";import{useEffect as t}from"react";function e(){const[e]=o();return t((()=>r(e)),[e]),null}export{e as SelectionAlwaysOnDisplay};

View File

@@ -0,0 +1,3 @@
import type { BaseDatabaseAdapter } from '../types.js';
export declare const migrate: BaseDatabaseAdapter['migrate'];
//# sourceMappingURL=migrate.d.ts.map

View File

@@ -0,0 +1,24 @@
name: package-manager-ci
on:
push:
branches:
- main
- next
- 'v*'
paths-ignore:
- 'docs/**'
- '*.md'
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'
permissions:
contents: read
jobs:
test:
permissions:
contents: read
uses: fastify/workflows/.github/workflows/plugins-ci-package-manager.yml@v5

View File

@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('assignIn', require('../assignIn'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -0,0 +1,23 @@
'use strict';
var resolveSeq = require('./resolveSeq-d03cb037.js');
var Schema = require('./Schema-88e323a7.js');
require('./PlainValue-ec8e588e.js');
require('./warnings-1000a372.js');
exports.Alias = resolveSeq.Alias;
exports.Collection = resolveSeq.Collection;
exports.Merge = resolveSeq.Merge;
exports.Node = resolveSeq.Node;
exports.Pair = resolveSeq.Pair;
exports.Scalar = resolveSeq.Scalar;
exports.YAMLMap = resolveSeq.YAMLMap;
exports.YAMLSeq = resolveSeq.YAMLSeq;
exports.binaryOptions = resolveSeq.binaryOptions;
exports.boolOptions = resolveSeq.boolOptions;
exports.intOptions = resolveSeq.intOptions;
exports.nullOptions = resolveSeq.nullOptions;
exports.strOptions = resolveSeq.strOptions;
exports.Schema = Schema.Schema;

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/prisma/pg/index.ts"],"sourcesContent":["export * from './driver.ts';\nexport * from './session.ts';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;","names":[]}

View File

@@ -0,0 +1,22 @@
/**
Regular expression for matching a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) line.
@example
```
import shebangRegex = require('shebang-regex');
const string = '#!/usr/bin/env node\nconsole.log("unicorns");';
shebangRegex.test(string);
//=> true
shebangRegex.exec(string)[0];
//=> '#!/usr/bin/env node'
shebangRegex.exec(string)[1];
//=> '/usr/bin/env node'
```
*/
declare const shebangRegex: RegExp;
export = shebangRegex;

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/elements/DraggableSortable/DraggableSortableItem/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAA;AAC9E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAA;AAElF,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,EAAE,qBAAqB,CAAC,YAAY,CAAC,CAAA;IAC/C,SAAS,EAAE,oBAAoB,CAAA;CAChC,GAAG,qBAAqB,CAAA;AAEzB,MAAM,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,0BAA0B,KAAK,KAAK,CAAC,SAAS,CAAA;AAEjF,MAAM,MAAM,KAAK,GAAG;IAClB,QAAQ,EAAE,aAAa,CAAA;CACxB,GAAG,qBAAqB,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}

View File

@@ -0,0 +1,94 @@
# brace-expansion
[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
as known from sh/bash, in JavaScript.
[![CI](https://github.com/juliangruber/brace-expansion/actions/workflows/ci.yml/badge.svg)](https://github.com/juliangruber/brace-expansion/actions/workflows/ci.yml)
[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion)
## Example
```js
import { expand } from 'brace-expansion'
expand('file-{a,b,c}.jpg')
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
expand('-v{,,}')
// => ['-v', '-v', '-v']
expand('file{0..2}.jpg')
// => ['file0.jpg', 'file1.jpg', 'file2.jpg']
expand('file-{a..c}.jpg')
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
expand('file{2..0}.jpg')
// => ['file2.jpg', 'file1.jpg', 'file0.jpg']
expand('file{0..4..2}.jpg')
// => ['file0.jpg', 'file2.jpg', 'file4.jpg']
expand('file-{a..e..2}.jpg')
// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg']
expand('file{00..10..5}.jpg')
// => ['file00.jpg', 'file05.jpg', 'file10.jpg']
expand('{{A..C},{a..c}}')
// => ['A', 'B', 'C', 'a', 'b', 'c']
expand('ppp{,config,oe{,conf}}')
// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf']
```
## API
```js
import { expand } from '@isaacs/brace-expansion'
```
### const expanded = expand(str, [options])
Return an array of all possible and valid expansions of `str`. If
none are found, `[str]` is returned.
The `options` object can provide a `max` value to cap the number
of expansions allowed. This is limited to `100_000` by default,
to prevent DoS attacks.
```js
const expansions = expand('{1..100}'.repeat(5), {
max: 100,
})
// expansions.length will be 100, not 100^5
```
Valid expansions are:
```js
;/^(.*,)+(.+)?$/
// {a,b,...}
```
A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
```js
;/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
// {x..y[..incr]}
```
A numeric sequence from `x` to `y` inclusive, with optional increment.
If `x` or `y` start with a leading `0`, all the numbers will be padded
to have equal length. Negative numbers and backwards iteration work too.
```js
;/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
// {x..y[..incr]}
```
An alphabetic sequence from `x` to `y` inclusive, with optional increment.
`x` and `y` must be exactly one character, and if given, `incr` must be a
number.
For compatibility reasons, the string `${` is not eligible for brace expansion.

View File

@@ -0,0 +1,9 @@
/**
* 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.
*
*/
"use strict";var t=require("@lexical/utils"),e=require("lexical");const n=0,r=1,o=2,i=0,s=1,c=2,a=3,u=4;function d(t,n,r,o,d){if(null===t||0===r.size&&0===o.size&&!d)return i;const _=n._selection,l=t._selection;if(d)return s;if(!(e.$isRangeSelection(_)&&e.$isRangeSelection(l)&&l.isCollapsed()&&_.isCollapsed()))return i;const f=function(t,n,r){const o=t._nodeMap,i=[];for(const t of n){const e=o.get(t);void 0!==e&&i.push(e)}for(const[t,n]of r){if(!n)continue;const r=o.get(t);void 0===r||e.$isRootNode(r)||i.push(r)}return i}(n,r,o);if(0===f.length)return i;if(f.length>1){const r=n._nodeMap,o=r.get(_.anchor.key),s=r.get(l.anchor.key);return o&&s&&!t._nodeMap.has(o.__key)&&e.$isTextNode(o)&&1===o.__text.length&&1===_.anchor.offset?c:i}const O=f[0],C=t._nodeMap.get(O.__key);if(!e.$isTextNode(C)||!e.$isTextNode(O)||C.__mode!==O.__mode)return i;const p=C.__text,M=O.__text;if(p===M)return i;const N=_.anchor,g=l.anchor;if(N.key!==g.key||"text"!==N.type)return i;const S=N.offset,h=g.offset,m=M.length-p.length;return 1===m&&h===S-1?c:-1===m&&h===S+1?a:-1===m&&h===S?u:i}function _(t,s){let c=Date.now(),a=i;return(u,_,l,f,O,C)=>{const p=Date.now();if(C.has(e.HISTORIC_TAG))return a=i,c=p,o;const M=d(u,_,f,O,t.isComposing()),N=(()=>{const d=null===l||l.editor===t,N=C.has(e.HISTORY_PUSH_TAG);if(!N&&d&&C.has(e.HISTORY_MERGE_TAG))return n;if(null===u)return r;const g=_._selection;if(!(f.size>0||O.size>0))return null!==g?n:o;if(!1===N&&M!==i&&M===a&&p<c+s&&d)return n;if(1===f.size){if(function(t,n,r){const o=n._nodeMap.get(t),i=r._nodeMap.get(t),s=n._selection,c=r._selection;return!(e.$isRangeSelection(s)&&e.$isRangeSelection(c)&&"element"===s.anchor.type&&"element"===s.focus.type&&"text"===c.anchor.type&&"text"===c.focus.type||!e.$isTextNode(o)||!e.$isTextNode(i)||o.__parent!==i.__parent)&&JSON.stringify(n.read((()=>o.exportJSON())))===JSON.stringify(r.read((()=>i.exportJSON())))}(Array.from(f)[0],u,_))return n}return r})();return c=p,a=M,N}}function l(t){t.undoStack=[],t.redoStack=[],t.current=null}exports.createEmptyHistoryState=function(){return{current:null,redoStack:[],undoStack:[]}},exports.registerHistory=function(n,i,s){const c=_(n,s);return t.mergeRegister(n.registerCommand(e.UNDO_COMMAND,(()=>(function(t,n){const r=n.redoStack,o=n.undoStack;if(0!==o.length){const i=n.current,s=o.pop();null!==i&&(r.push(i),t.dispatchCommand(e.CAN_REDO_COMMAND,!0)),0===o.length&&t.dispatchCommand(e.CAN_UNDO_COMMAND,!1),n.current=s||null,s&&s.editor.setEditorState(s.editorState,{tag:e.HISTORIC_TAG})}}(n,i),!0)),e.COMMAND_PRIORITY_EDITOR),n.registerCommand(e.REDO_COMMAND,(()=>(function(t,n){const r=n.redoStack,o=n.undoStack;if(0!==r.length){const i=n.current;null!==i&&(o.push(i),t.dispatchCommand(e.CAN_UNDO_COMMAND,!0));const s=r.pop();0===r.length&&t.dispatchCommand(e.CAN_REDO_COMMAND,!1),n.current=s||null,s&&s.editor.setEditorState(s.editorState,{tag:e.HISTORIC_TAG})}}(n,i),!0)),e.COMMAND_PRIORITY_EDITOR),n.registerCommand(e.CLEAR_EDITOR_COMMAND,(()=>(l(i),!1)),e.COMMAND_PRIORITY_EDITOR),n.registerCommand(e.CLEAR_HISTORY_COMMAND,(()=>(l(i),n.dispatchCommand(e.CAN_REDO_COMMAND,!1),n.dispatchCommand(e.CAN_UNDO_COMMAND,!1),!0)),e.COMMAND_PRIORITY_EDITOR),n.registerUpdateListener((({editorState:t,prevEditorState:s,dirtyLeaves:a,dirtyElements:u,tags:d})=>{const _=i.current,l=i.redoStack,f=i.undoStack,O=null===_?null:_.editorState;if(null!==_&&t===O)return;const C=c(s,t,_,a,u,d);if(C===r)0!==l.length&&(i.redoStack=[],n.dispatchCommand(e.CAN_REDO_COMMAND,!1)),null!==_&&(f.push({..._}),n.dispatchCommand(e.CAN_UNDO_COMMAND,!0));else if(C===o)return;i.current={editor:n,editorState:t}})))};

View File

@@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) 2020 David Mark Clements
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,42 @@
var baseSortedIndexBy = require('./_baseSortedIndexBy'),
identity = require('./identity'),
isSymbol = require('./isSymbol');
/** Used as references for the maximum length and index of an array. */
var MAX_ARRAY_LENGTH = 4294967295,
HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
/**
* The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
* performs a binary search of `array` to determine the index at which `value`
* should be inserted into `array` in order to maintain its sort order.
*
* @private
* @param {Array} array The sorted array to inspect.
* @param {*} value The value to evaluate.
* @param {boolean} [retHighest] Specify returning the highest qualified index.
* @returns {number} Returns the index at which `value` should be inserted
* into `array`.
*/
function baseSortedIndex(array, value, retHighest) {
var low = 0,
high = array == null ? low : array.length;
if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
while (low < high) {
var mid = (low + high) >>> 1,
computed = array[mid];
if (computed !== null && !isSymbol(computed) &&
(retHighest ? (computed <= value) : (computed < value))) {
low = mid + 1;
} else {
high = mid;
}
}
return high;
}
return baseSortedIndexBy(array, value, identity, retHighest);
}
module.exports = baseSortedIndex;

View File

@@ -0,0 +1,56 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ContextAPI } from '../api/context';
import { createContextKey } from '../context/context';
/**
* Baggage key
*/
const BAGGAGE_KEY = createContextKey('OpenTelemetry Baggage Key');
/**
* Retrieve the current baggage from the given context
*
* @param {Context} Context that manage all context values
* @returns {Baggage} Extracted baggage from the context
*/
export function getBaggage(context) {
return context.getValue(BAGGAGE_KEY) || undefined;
}
/**
* Retrieve the current baggage from the active/current context
*
* @returns {Baggage} Extracted baggage from the context
*/
export function getActiveBaggage() {
return getBaggage(ContextAPI.getInstance().active());
}
/**
* Store a baggage in the given context
*
* @param {Context} Context that manage all context values
* @param {Baggage} baggage that will be set in the actual context
*/
export function setBaggage(context, baggage) {
return context.setValue(BAGGAGE_KEY, baggage);
}
/**
* Delete the baggage stored in the given context
*
* @param {Context} Context that manage all context values
*/
export function deleteBaggage(context) {
return context.deleteValue(BAGGAGE_KEY);
}
//# sourceMappingURL=context-helpers.js.map

View File

@@ -0,0 +1,3 @@
import type { PayloadHandler } from '../../config/types.js';
export declare const deleteHandler: PayloadHandler;
//# sourceMappingURL=delete.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"grid-2x2-x.js","sources":["../../../src/icons/grid-2x2-x.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Grid2x2X\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgM3YxN2ExIDEgMCAwIDEtMSAxSDVhMiAyIDAgMCAxLTItMlY1YTIgMiAwIDAgMSAyLTJoMTRhMiAyIDAgMCAxIDIgMnY2YTEgMSAwIDAgMS0xIDFIMyIgLz4KICA8cGF0aCBkPSJtMTYgMTYgNSA1IiAvPgogIDxwYXRoIGQ9Im0xNiAyMSA1LTUiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/grid-2x2-x\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 Grid2x2X = createLucideIcon('Grid2x2X', [\n [\n 'path',\n {\n d: 'M12 3v17a1 1 0 0 1-1 1H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6a1 1 0 0 1-1 1H3',\n key: '11za1p',\n },\n ],\n ['path', { d: 'm16 16 5 5', key: '8tpb07' }],\n ['path', { d: 'm16 21 5-5', key: '193jll' }],\n]);\n\nexport default Grid2x2X;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAC5C,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;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,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,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"caravan.js","sources":["../../../src/icons/caravan.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Caravan\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTggMTlWOWE0IDQgMCAwIDAtNC00SDZhNCA0IDAgMCAwLTQgNHY4YTIgMiAwIDAgMCAyIDJoMiIgLz4KICA8cGF0aCBkPSJNMiA5aDNhMSAxIDAgMCAxIDEgMXYyYTEgMSAwIDAgMS0xIDFIMiIgLz4KICA8cGF0aCBkPSJNMjIgMTd2MWExIDEgMCAwIDEtMSAxSDEwdi05YTEgMSAwIDAgMSAxLTFoMmExIDEgMCAwIDEgMSAxdjkiIC8+CiAgPGNpcmNsZSBjeD0iOCIgY3k9IjE5IiByPSIyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/caravan\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 Caravan = createLucideIcon('Caravan', [\n ['path', { d: 'M18 19V9a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v8a2 2 0 0 0 2 2h2', key: '19jm3t' }],\n ['path', { d: 'M2 9h3a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H2', key: '13hakp' }],\n ['path', { d: 'M22 17v1a1 1 0 0 1-1 1H10v-9a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v9', key: '1crci8' }],\n ['circle', { cx: '8', cy: '19', r: '2', key: 't8fc5s' }],\n]);\n\nexport default Caravan;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACzF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACvE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC7F,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AACzD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"move-up-right.js","sources":["../../../src/icons/move-up-right.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name MoveUpRight\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTMgNUgxOVYxMSIgLz4KICA8cGF0aCBkPSJNMTkgNUw1IDE5IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/move-up-right\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 MoveUpRight = createLucideIcon('MoveUpRight', [\n ['path', { d: 'M13 5H19V11', key: '1n1gyv' }],\n ['path', { d: 'M19 5L5 19', key: '72u4yj' }],\n]);\n\nexport default MoveUpRight;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAAA,CAClD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAe,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC5C,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;AAC7C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,81 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = void 0;
const codegen_1 = require("../codegen");
const util_1 = require("../util");
function getSubschema(it, { keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }) {
if (keyword !== undefined && schema !== undefined) {
throw new Error('both "keyword" and "schema" passed, only one allowed');
}
if (keyword !== undefined) {
const sch = it.schema[keyword];
return schemaProp === undefined
? {
schema: sch,
schemaPath: (0, codegen_1._) `${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}`,
errSchemaPath: `${it.errSchemaPath}/${keyword}`,
}
: {
schema: sch[schemaProp],
schemaPath: (0, codegen_1._) `${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}${(0, codegen_1.getProperty)(schemaProp)}`,
errSchemaPath: `${it.errSchemaPath}/${keyword}/${(0, util_1.escapeFragment)(schemaProp)}`,
};
}
if (schema !== undefined) {
if (schemaPath === undefined || errSchemaPath === undefined || topSchemaRef === undefined) {
throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');
}
return {
schema,
schemaPath,
topSchemaRef,
errSchemaPath,
};
}
throw new Error('either "keyword" or "schema" must be passed');
}
exports.getSubschema = getSubschema;
function extendSubschemaData(subschema, it, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) {
if (data !== undefined && dataProp !== undefined) {
throw new Error('both "data" and "dataProp" passed, only one allowed');
}
const { gen } = it;
if (dataProp !== undefined) {
const { errorPath, dataPathArr, opts } = it;
const nextData = gen.let("data", (0, codegen_1._) `${it.data}${(0, codegen_1.getProperty)(dataProp)}`, true);
dataContextProps(nextData);
subschema.errorPath = (0, codegen_1.str) `${errorPath}${(0, util_1.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`;
subschema.parentDataProperty = (0, codegen_1._) `${dataProp}`;
subschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty];
}
if (data !== undefined) {
const nextData = data instanceof codegen_1.Name ? data : gen.let("data", data, true); // replaceable if used once?
dataContextProps(nextData);
if (propertyName !== undefined)
subschema.propertyName = propertyName;
// TODO something is possibly wrong here with not changing parentDataProperty and not appending dataPathArr
}
if (dataTypes)
subschema.dataTypes = dataTypes;
function dataContextProps(_nextData) {
subschema.data = _nextData;
subschema.dataLevel = it.dataLevel + 1;
subschema.dataTypes = [];
it.definedProperties = new Set();
subschema.parentData = it.data;
subschema.dataNames = [...it.dataNames, _nextData];
}
}
exports.extendSubschemaData = extendSubschemaData;
function extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) {
if (compositeRule !== undefined)
subschema.compositeRule = compositeRule;
if (createErrors !== undefined)
subschema.createErrors = createErrors;
if (allErrors !== undefined)
subschema.allErrors = allErrors;
subschema.jtdDiscriminator = jtdDiscriminator; // not inherited
subschema.jtdMetadata = jtdMetadata; // not inherited
}
exports.extendSubschemaMode = extendSubschemaMode;
//# sourceMappingURL=subschema.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"moon.js","sources":["../../../src/icons/moon.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Moon\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgM2E2IDYgMCAwIDAgOSA5IDkgOSAwIDEgMS05LTlaIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/moon\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Moon = createLucideIcon('Moon', [\n ['path', { d: 'M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z', key: 'a7tn18' }],\n]);\n\nexport default Moon;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,iBAAiB,MAAQ,CAAA,CAAA,CAAA;AAAA,CAAA,CACpC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAsC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AACrE,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,53 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isSupportedImage = exports.image = exports.isRadialGradient = exports.isLinearGradient = void 0;
var linear_gradient_1 = require("./functions/linear-gradient");
var _prefix_linear_gradient_1 = require("./functions/-prefix-linear-gradient");
var _webkit_gradient_1 = require("./functions/-webkit-gradient");
var radial_gradient_1 = require("./functions/radial-gradient");
var _prefix_radial_gradient_1 = require("./functions/-prefix-radial-gradient");
var isLinearGradient = function (background) {
return background.type === 1 /* LINEAR_GRADIENT */;
};
exports.isLinearGradient = isLinearGradient;
var isRadialGradient = function (background) {
return background.type === 2 /* RADIAL_GRADIENT */;
};
exports.isRadialGradient = isRadialGradient;
exports.image = {
name: 'image',
parse: function (context, value) {
if (value.type === 22 /* URL_TOKEN */) {
var image_1 = { url: value.value, type: 0 /* URL */ };
context.cache.addImage(value.value);
return image_1;
}
if (value.type === 18 /* FUNCTION */) {
var imageFunction = SUPPORTED_IMAGE_FUNCTIONS[value.name];
if (typeof imageFunction === 'undefined') {
throw new Error("Attempting to parse an unsupported image function \"" + value.name + "\"");
}
return imageFunction(context, value.values);
}
throw new Error("Unsupported image type " + value.type);
}
};
function isSupportedImage(value) {
return (!(value.type === 20 /* IDENT_TOKEN */ && value.value === 'none') &&
(value.type !== 18 /* FUNCTION */ || !!SUPPORTED_IMAGE_FUNCTIONS[value.name]));
}
exports.isSupportedImage = isSupportedImage;
var SUPPORTED_IMAGE_FUNCTIONS = {
'linear-gradient': linear_gradient_1.linearGradient,
'-moz-linear-gradient': _prefix_linear_gradient_1.prefixLinearGradient,
'-ms-linear-gradient': _prefix_linear_gradient_1.prefixLinearGradient,
'-o-linear-gradient': _prefix_linear_gradient_1.prefixLinearGradient,
'-webkit-linear-gradient': _prefix_linear_gradient_1.prefixLinearGradient,
'radial-gradient': radial_gradient_1.radialGradient,
'-moz-radial-gradient': _prefix_radial_gradient_1.prefixRadialGradient,
'-ms-radial-gradient': _prefix_radial_gradient_1.prefixRadialGradient,
'-o-radial-gradient': _prefix_radial_gradient_1.prefixRadialGradient,
'-webkit-radial-gradient': _prefix_radial_gradient_1.prefixRadialGradient,
'-webkit-gradient': _webkit_gradient_1.webkitGradient
};
//# sourceMappingURL=image.js.map

View File

@@ -0,0 +1,40 @@
import { Event, EventHint, Exception, ParameterizedString, SeverityLevel, StackParser } from '@sentry/core';
/**
* This function creates an exception from a JavaScript Error
*/
export declare function exceptionFromError(stackParser: StackParser, ex: Error): Exception;
/**
* Extracts from errors what we use as the exception `type` in error events.
*
* Usually, this is the `name` property on Error objects but WASM errors need to be treated differently.
*/
export declare function extractType(ex: Error & {
message: {
error?: Error;
};
}): string | undefined;
/**
* There are cases where stacktrace.message is an Event object
* https://github.com/getsentry/sentry-javascript/issues/1949
* In this specific case we try to extract stacktrace.message.error.message
*/
export declare function extractMessage(ex: Error & {
message: {
error?: Error;
};
}): string;
/**
* Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.
* @hidden
*/
export declare function eventFromException(stackParser: StackParser, exception: unknown, hint?: EventHint, attachStacktrace?: boolean): PromiseLike<Event>;
/**
* Builds and Event from a Message
* @hidden
*/
export declare function eventFromMessage(stackParser: StackParser, message: ParameterizedString, level?: SeverityLevel, hint?: EventHint, attachStacktrace?: boolean): PromiseLike<Event>;
/**
* @hidden
*/
export declare function eventFromUnknownInput(stackParser: StackParser, exception: unknown, syntheticException?: Error, attachStacktrace?: boolean, isUnhandledRejection?: boolean): Event;
//# sourceMappingURL=eventbuilder.d.ts.map

View File

@@ -0,0 +1,12 @@
import contains from './contains';
import qsa from './querySelectorAll';
export default function filterEvents(selector, handler) {
return function filterHandler(e) {
var top = e.currentTarget;
var target = e.target;
var matches = qsa(top, selector);
if (matches.some(function (match) {
return contains(match, target);
})) handler.call(this, e);
};
}

View File

@@ -0,0 +1,118 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { VERSION } from '../version';
const re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
/**
* Create a function to test an API version to see if it is compatible with the provided ownVersion.
*
* The returned function has the following semantics:
* - Exact match is always compatible
* - Major versions must match exactly
* - 1.x package cannot use global 2.x package
* - 2.x package cannot use global 1.x package
* - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API
* - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects
* - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3
* - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor
* - Patch and build tag differences are not considered at this time
*
* @param ownVersion version which should be checked against
*/
export function _makeCompatibilityCheck(ownVersion) {
const acceptedVersions = new Set([ownVersion]);
const rejectedVersions = new Set();
const myVersionMatch = ownVersion.match(re);
if (!myVersionMatch) {
// we cannot guarantee compatibility so we always return noop
return () => false;
}
const ownVersionParsed = {
major: +myVersionMatch[1],
minor: +myVersionMatch[2],
patch: +myVersionMatch[3],
prerelease: myVersionMatch[4],
};
// if ownVersion has a prerelease tag, versions must match exactly
if (ownVersionParsed.prerelease != null) {
return function isExactmatch(globalVersion) {
return globalVersion === ownVersion;
};
}
function _reject(v) {
rejectedVersions.add(v);
return false;
}
function _accept(v) {
acceptedVersions.add(v);
return true;
}
return function isCompatible(globalVersion) {
if (acceptedVersions.has(globalVersion)) {
return true;
}
if (rejectedVersions.has(globalVersion)) {
return false;
}
const globalVersionMatch = globalVersion.match(re);
if (!globalVersionMatch) {
// cannot parse other version
// we cannot guarantee compatibility so we always noop
return _reject(globalVersion);
}
const globalVersionParsed = {
major: +globalVersionMatch[1],
minor: +globalVersionMatch[2],
patch: +globalVersionMatch[3],
prerelease: globalVersionMatch[4],
};
// if globalVersion has a prerelease tag, versions must match exactly
if (globalVersionParsed.prerelease != null) {
return _reject(globalVersion);
}
// major versions must match
if (ownVersionParsed.major !== globalVersionParsed.major) {
return _reject(globalVersion);
}
if (ownVersionParsed.major === 0) {
if (ownVersionParsed.minor === globalVersionParsed.minor &&
ownVersionParsed.patch <= globalVersionParsed.patch) {
return _accept(globalVersion);
}
return _reject(globalVersion);
}
if (ownVersionParsed.minor <= globalVersionParsed.minor) {
return _accept(globalVersion);
}
return _reject(globalVersion);
};
}
/**
* Test an API version to see if it is compatible with this API.
*
* - Exact match is always compatible
* - Major versions must match exactly
* - 1.x package cannot use global 2.x package
* - 2.x package cannot use global 1.x package
* - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API
* - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects
* - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3
* - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor
* - Patch and build tag differences are not considered at this time
*
* @param version version of the API requesting an instance of the global API
*/
export const isCompatible = _makeCompatibilityCheck(VERSION);
//# sourceMappingURL=semver.js.map

View File

@@ -0,0 +1,39 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.mjs";
const dateFormats = {
full: "EEEE, do MMMM y",
long: "do MMMM y",
medium: "do MMM y",
short: "d.MM.y",
};
const timeFormats = {
full: "'kl'. HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm",
};
const dateTimeFormats = {
full: "{{date}} 'kl.' {{time}}",
long: "{{date}} 'kl.' {{time}}",
medium: "{{date}} {{time}}",
short: "{{date}} {{time}}",
};
export const formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full",
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full",
}),
};

View File

@@ -0,0 +1,144 @@
import { serializeStyles } from '@emotion/serialize'
import minify from './minify'
import { getLabelFromPath } from './label'
import { getSourceMap } from './source-maps'
import { simplifyObject } from './object-to-string'
import {
appendStringReturningExpressionToArguments,
joinStringLiterals
} from './strings'
import createNodeEnvConditional from './create-node-env-conditional'
const CSS_OBJECT_STRINGIFIED_ERROR =
"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."
export let transformExpressionWithStyles = (
{ babel, state, path, shouldLabel, sourceMap = '' } /*: {
babel,
state,
path,
shouldLabel: boolean,
sourceMap?: string
} */
) => {
const autoLabel = state.opts.autoLabel || 'dev-only'
let t = babel.types
if (t.isTaggedTemplateExpression(path)) {
if (
!sourceMap &&
state.emotionSourceMap &&
path.node.quasi.loc !== undefined
) {
sourceMap = getSourceMap(path.node.quasi.loc.start, state)
}
minify(path, t)
}
if (t.isCallExpression(path)) {
const canAppendStrings = path.node.arguments.every(
arg => arg.type !== 'SpreadElement'
)
path.get('arguments').forEach(node => {
if (t.isObjectExpression(node)) {
node.replaceWith(simplifyObject(node.node, t))
}
})
path.node.arguments = joinStringLiterals(path.node.arguments, t)
if (
!sourceMap &&
canAppendStrings &&
state.emotionSourceMap &&
path.node.loc !== undefined
) {
sourceMap = getSourceMap(path.node.loc.start, state)
}
const label =
shouldLabel && autoLabel !== 'never'
? getLabelFromPath(path, state, t)
: null
if (
path.node.arguments.length === 1 &&
t.isStringLiteral(path.node.arguments[0])
) {
let cssString = path.node.arguments[0].value.replace(/;$/, '')
let res = serializeStyles([
`${cssString}${
label && autoLabel === 'always' ? `;label:${label};` : ''
}`
])
let prodNode = t.objectExpression([
t.objectProperty(t.identifier('name'), t.stringLiteral(res.name)),
t.objectProperty(t.identifier('styles'), t.stringLiteral(res.styles))
])
if (!state.emotionStringifiedCssId) {
const uid = state.file.scope.generateUidIdentifier(
'__EMOTION_STRINGIFIED_CSS_ERROR__'
)
state.emotionStringifiedCssId = uid
const cssObjectToString = t.functionDeclaration(
uid,
[],
t.blockStatement([
t.returnStatement(t.stringLiteral(CSS_OBJECT_STRINGIFIED_ERROR))
])
)
cssObjectToString._compact = true
state.file.path.unshiftContainer('body', [cssObjectToString])
}
if (label && autoLabel === 'dev-only') {
res = serializeStyles([`${cssString};label:${label};`])
}
let devNode = t.objectExpression(
[
t.objectProperty(t.identifier('name'), t.stringLiteral(res.name)),
t.objectProperty(
t.identifier('styles'),
t.stringLiteral(res.styles + sourceMap)
),
t.objectProperty(
t.identifier('toString'),
t.cloneNode(state.emotionStringifiedCssId)
)
].filter(Boolean)
)
return createNodeEnvConditional(t, prodNode, devNode)
}
if (canAppendStrings && label) {
const labelString = `;label:${label};`
switch (autoLabel) {
case 'dev-only': {
const labelConditional = createNodeEnvConditional(
t,
t.stringLiteral(''),
t.stringLiteral(labelString)
)
appendStringReturningExpressionToArguments(t, path, labelConditional)
break
}
case 'always':
appendStringReturningExpressionToArguments(t, path, labelString)
break
}
}
if (sourceMap) {
let sourceMapConditional = createNodeEnvConditional(
t,
t.stringLiteral(''),
t.stringLiteral(sourceMap)
)
appendStringReturningExpressionToArguments(t, path, sourceMapConditional)
}
}
}

View File

@@ -0,0 +1,3 @@
import type { BaseDatabaseAdapter } from '../types.js';
export declare function migrateReset(this: BaseDatabaseAdapter): Promise<void>;
//# sourceMappingURL=migrateReset.d.ts.map

View File

@@ -0,0 +1,209 @@
// based on https://github.com/Ethan-Arrowood/undici-fetch/blob/249269714db874351589d2d364a0645d5160ae71/index.d.ts (MIT license)
// and https://github.com/node-fetch/node-fetch/blob/914ce6be5ec67a8bab63d68510aabf07cb818b6d/index.d.ts (MIT license)
/// <reference types="node" />
import { Blob } from 'buffer'
import { URL, URLSearchParams } from 'url'
import { ReadableStream } from 'stream/web'
import { FormData } from './formdata'
import Dispatcher from './dispatcher'
export type RequestInfo = string | URL | Request
export declare function fetch (
input: RequestInfo,
init?: RequestInit
): Promise<Response>
export type BodyInit =
| ArrayBuffer
| AsyncIterable<Uint8Array>
| Blob
| FormData
| Iterable<Uint8Array>
| NodeJS.ArrayBufferView
| URLSearchParams
| null
| string
export class BodyMixin {
readonly body: ReadableStream | null
readonly bodyUsed: boolean
readonly arrayBuffer: () => Promise<ArrayBuffer>
readonly blob: () => Promise<Blob>
/**
* @deprecated This method is not recommended for parsing multipart/form-data bodies in server environments.
* It is recommended to use a library such as [@fastify/busboy](https://www.npmjs.com/package/@fastify/busboy) as follows:
*
* @example
* ```js
* import { Busboy } from '@fastify/busboy'
* import { Readable } from 'node:stream'
*
* const response = await fetch('...')
* const busboy = new Busboy({ headers: { 'content-type': response.headers.get('content-type') } })
*
* // handle events emitted from `busboy`
*
* Readable.fromWeb(response.body).pipe(busboy)
* ```
*/
readonly formData: () => Promise<FormData>
readonly json: () => Promise<unknown>
readonly text: () => Promise<string>
}
export interface SpecIterator<T, TReturn = any, TNext = undefined> {
next(...args: [] | [TNext]): IteratorResult<T, TReturn>;
}
export interface SpecIterableIterator<T> extends SpecIterator<T> {
[Symbol.iterator](): SpecIterableIterator<T>;
}
export interface SpecIterable<T> {
[Symbol.iterator](): SpecIterator<T>;
}
export type HeadersInit = string[][] | Record<string, string | ReadonlyArray<string>> | Headers
export declare class Headers implements SpecIterable<[string, string]> {
constructor (init?: HeadersInit)
readonly append: (name: string, value: string) => void
readonly delete: (name: string) => void
readonly get: (name: string) => string | null
readonly has: (name: string) => boolean
readonly set: (name: string, value: string) => void
readonly getSetCookie: () => string[]
readonly forEach: (
callbackfn: (value: string, key: string, iterable: Headers) => void,
thisArg?: unknown
) => void
readonly keys: () => SpecIterableIterator<string>
readonly values: () => SpecIterableIterator<string>
readonly entries: () => SpecIterableIterator<[string, string]>
readonly [Symbol.iterator]: () => SpecIterableIterator<[string, string]>
}
export type RequestCache =
| 'default'
| 'force-cache'
| 'no-cache'
| 'no-store'
| 'only-if-cached'
| 'reload'
export type RequestCredentials = 'omit' | 'include' | 'same-origin'
type RequestDestination =
| ''
| 'audio'
| 'audioworklet'
| 'document'
| 'embed'
| 'font'
| 'image'
| 'manifest'
| 'object'
| 'paintworklet'
| 'report'
| 'script'
| 'sharedworker'
| 'style'
| 'track'
| 'video'
| 'worker'
| 'xslt'
export interface RequestInit {
method?: string
keepalive?: boolean
headers?: HeadersInit
body?: BodyInit | null
redirect?: RequestRedirect
integrity?: string
signal?: AbortSignal | null
credentials?: RequestCredentials
mode?: RequestMode
referrer?: string
referrerPolicy?: ReferrerPolicy
window?: null
dispatcher?: Dispatcher
duplex?: RequestDuplex
}
export type ReferrerPolicy =
| ''
| 'no-referrer'
| 'no-referrer-when-downgrade'
| 'origin'
| 'origin-when-cross-origin'
| 'same-origin'
| 'strict-origin'
| 'strict-origin-when-cross-origin'
| 'unsafe-url';
export type RequestMode = 'cors' | 'navigate' | 'no-cors' | 'same-origin'
export type RequestRedirect = 'error' | 'follow' | 'manual'
export type RequestDuplex = 'half'
export declare class Request extends BodyMixin {
constructor (input: RequestInfo, init?: RequestInit)
readonly cache: RequestCache
readonly credentials: RequestCredentials
readonly destination: RequestDestination
readonly headers: Headers
readonly integrity: string
readonly method: string
readonly mode: RequestMode
readonly redirect: RequestRedirect
readonly referrer: string
readonly referrerPolicy: ReferrerPolicy
readonly url: string
readonly keepalive: boolean
readonly signal: AbortSignal
readonly duplex: RequestDuplex
readonly clone: () => Request
}
export interface ResponseInit {
readonly status?: number
readonly statusText?: string
readonly headers?: HeadersInit
}
export type ResponseType =
| 'basic'
| 'cors'
| 'default'
| 'error'
| 'opaque'
| 'opaqueredirect'
export type ResponseRedirectStatus = 301 | 302 | 303 | 307 | 308
export declare class Response extends BodyMixin {
constructor (body?: BodyInit, init?: ResponseInit)
readonly headers: Headers
readonly ok: boolean
readonly status: number
readonly statusText: string
readonly type: ResponseType
readonly url: string
readonly redirected: boolean
readonly clone: () => Response
static error (): Response
static json(data: any, init?: ResponseInit): Response
static redirect (url: string | URL, status: ResponseRedirectStatus): Response
}

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 LayoutPanelTop = createLucideIcon("LayoutPanelTop", [
["rect", { width: "18", height: "7", x: "3", y: "3", rx: "1", key: "f1a2em" }],
["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }],
["rect", { width: "7", height: "7", x: "14", y: "14", rx: "1", key: "nxv5o0" }]
]);
export { LayoutPanelTop as default };
//# sourceMappingURL=layout-panel-top.js.map

View File

@@ -0,0 +1,16 @@
/**
* @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 Power = createLucideIcon("Power", [
["path", { d: "M12 2v10", key: "mnfbl" }],
["path", { d: "M18.4 6.6a9 9 0 1 1-12.77.04", key: "obofu9" }]
]);
export { Power as default };
//# sourceMappingURL=power.js.map

View File

@@ -0,0 +1,27 @@
import type { NodeClient, NodeOptions } from '@sentry/node';
export * from '@sentry/node';
export { captureUnderscoreErrorException } from '../common/pages-router-instrumentation/_error';
export { startSpan, startSpanManual, startInactiveSpan } from '../common/utils/nextSpan';
/**
* A passthrough error boundary for the server that doesn't depend on any react. Error boundaries don't catch SSR errors
* so they should simply be a passthrough.
*/
export declare const ErrorBoundary: (props: React.PropsWithChildren<unknown>) => React.ReactNode;
/**
* A passthrough redux enhancer for the server that doesn't depend on anything from the `@sentry/react` package.
*/
export declare function createReduxEnhancer(): (createStore: unknown) => unknown;
/**
* A passthrough error boundary wrapper for the server that doesn't depend on any react. Error boundaries don't catch
* SSR errors so they should simply be a passthrough.
*/
export declare function withErrorBoundary<P extends Record<string, any>>(WrappedComponent: React.ComponentType<P>): React.FC<P>;
/**
* Just a passthrough since we're on the server and showing the report dialog on the server doesn't make any sense.
*/
export declare function showReportDialog(): void;
/** Inits the Sentry NextJS SDK on node. */
export declare function init(options: NodeOptions): NodeClient | undefined;
export * from '../common';
export { wrapApiHandlerWithSentry } from '../common/pages-router-instrumentation/wrapApiHandlerWithSentry';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,595 @@
/*!
* tabbable 6.4.0
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
*/
'use strict';
// NOTE: separate `:not()` selectors has broader browser support than the newer
// `:not([inert], [inert] *)` (Feb 2023)
var candidateSelectors = ['input:not([inert]):not([inert] *)', 'select:not([inert]):not([inert] *)', 'textarea:not([inert]):not([inert] *)', 'a[href]:not([inert]):not([inert] *)', 'button:not([inert]):not([inert] *)', '[tabindex]:not(slot):not([inert]):not([inert] *)', 'audio[controls]:not([inert]):not([inert] *)', 'video[controls]:not([inert]):not([inert] *)', '[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)', 'details>summary:first-of-type:not([inert]):not([inert] *)', 'details:not([inert]):not([inert] *)'];
var candidateSelector = /* #__PURE__ */candidateSelectors.join(',');
var NoElement = typeof Element === 'undefined';
var matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
var getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {
var _element$getRootNode;
return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);
} : function (element) {
return element === null || element === void 0 ? void 0 : element.ownerDocument;
};
/**
* Determines if a node is inert or in an inert ancestor.
* @param {Node} [node]
* @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to
* see if any of them are inert. If false, only `node` itself is considered.
* @returns {boolean} True if inert itself or by way of being in an inert ancestor.
* False if `node` is falsy.
*/
var _isInert = function isInert(node, lookUp) {
var _node$getAttribute;
if (lookUp === void 0) {
lookUp = true;
}
// CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`
// JS API property; we have to check the attribute, which can either be empty or 'true';
// if it's `null` (not specified) or 'false', it's an active element
var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');
var inert = inertAtt === '' || inertAtt === 'true';
// NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`
// if it weren't for `matches()` not being a function on shadow roots; the following
// code works for any kind of node
var result = inert || lookUp && node && (
// closest does not exist on shadow roots, so we fall back to a manual
// lookup upward, in case it is not defined.
typeof node.closest === 'function' ? node.closest('[inert]') : _isInert(node.parentNode));
return result;
};
/**
* Determines if a node's content is editable.
* @param {Element} [node]
* @returns True if it's content-editable; false if it's not or `node` is falsy.
*/
var isContentEditable = function isContentEditable(node) {
var _node$getAttribute2;
// CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have
// to use the attribute directly to check for this, which can either be empty or 'true';
// if it's `null` (not specified) or 'false', it's a non-editable element
var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');
return attValue === '' || attValue === 'true';
};
/**
* @param {Element} el container to check in
* @param {boolean} includeContainer add container to check
* @param {(node: Element) => boolean} filter filter candidates
* @returns {Element[]}
*/
var getCandidates = function getCandidates(el, includeContainer, filter) {
// even if `includeContainer=false`, we still have to check it for inertness because
// if it's inert (either by itself or via its parent), then all its children are inert
if (_isInert(el)) {
return [];
}
var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));
if (includeContainer && matches.call(el, candidateSelector)) {
candidates.unshift(el);
}
candidates = candidates.filter(filter);
return candidates;
};
/**
* @callback GetShadowRoot
* @param {Element} element to check for shadow root
* @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.
*/
/**
* @callback ShadowRootFilter
* @param {Element} shadowHostNode the element which contains shadow content
* @returns {boolean} true if a shadow root could potentially contain valid candidates.
*/
/**
* @typedef {Object} CandidateScope
* @property {Element} scopeParent contains inner candidates
* @property {Element[]} candidates list of candidates found in the scope parent
*/
/**
* @typedef {Object} IterativeOptions
* @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;
* if a function, implies shadow support is enabled and either returns the shadow root of an element
* or a boolean stating if it has an undisclosed shadow root
* @property {(node: Element) => boolean} filter filter candidates
* @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list
* @property {ShadowRootFilter} shadowRootFilter filter shadow roots;
*/
/**
* @param {Element[]} elements list of element containers to match candidates from
* @param {boolean} includeContainer add container list to check
* @param {IterativeOptions} options
* @returns {Array.<Element|CandidateScope>}
*/
var _getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {
var candidates = [];
var elementsToCheck = Array.from(elements);
while (elementsToCheck.length) {
var element = elementsToCheck.shift();
if (_isInert(element, false)) {
// no need to look up since we're drilling down
// anything inside this container will also be inert
continue;
}
if (element.tagName === 'SLOT') {
// add shadow dom slot scope (slot itself cannot be focusable)
var assigned = element.assignedElements();
var content = assigned.length ? assigned : element.children;
var nestedCandidates = _getCandidatesIteratively(content, true, options);
if (options.flatten) {
candidates.push.apply(candidates, nestedCandidates);
} else {
candidates.push({
scopeParent: element,
candidates: nestedCandidates
});
}
} else {
// check candidate element
var validCandidate = matches.call(element, candidateSelector);
if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {
candidates.push(element);
}
// iterate over shadow content if possible
var shadowRoot = element.shadowRoot ||
// check for an undisclosed shadow
typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);
// no inert look up because we're already drilling down and checking for inertness
// on the way down, so all containers to this root node should have already been
// vetted as non-inert
var validShadowRoot = !_isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));
if (shadowRoot && validShadowRoot) {
// add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed
// shadow exists, so look at light dom children as fallback BUT create a scope for any
// child candidates found because they're likely slotted elements (elements that are
// children of the web component element (which has the shadow), in the light dom, but
// slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,
// _after_ we return from this recursive call
var _nestedCandidates = _getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);
if (options.flatten) {
candidates.push.apply(candidates, _nestedCandidates);
} else {
candidates.push({
scopeParent: element,
candidates: _nestedCandidates
});
}
} else {
// there's not shadow so just dig into the element's (light dom) children
// __without__ giving the element special scope treatment
elementsToCheck.unshift.apply(elementsToCheck, element.children);
}
}
}
return candidates;
};
/**
* @private
* Determines if the node has an explicitly specified `tabindex` attribute.
* @param {HTMLElement} node
* @returns {boolean} True if so; false if not.
*/
var hasTabIndex = function hasTabIndex(node) {
return !isNaN(parseInt(node.getAttribute('tabindex'), 10));
};
/**
* Determine the tab index of a given node.
* @param {HTMLElement} node
* @returns {number} Tab order (negative, 0, or positive number).
* @throws {Error} If `node` is falsy.
*/
var getTabIndex = function getTabIndex(node) {
if (!node) {
throw new Error('No node provided');
}
if (node.tabIndex < 0) {
// in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
// `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
// yet they are still part of the regular tab order; in FF, they get a default
// `tabIndex` of 0; since Chrome still puts those elements in the regular tab
// order, consider their tab index to be 0.
// Also browsers do not return `tabIndex` correctly for contentEditable nodes;
// so if they don't have a tabindex attribute specifically set, assume it's 0.
if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {
return 0;
}
}
return node.tabIndex;
};
/**
* Determine the tab index of a given node __for sort order purposes__.
* @param {HTMLElement} node
* @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,
* has tabIndex -1, but needs to be sorted by document order in order for its content to be
* inserted into the correct sort position.
* @returns {number} Tab order (negative, 0, or positive number).
*/
var getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {
var tabIndex = getTabIndex(node);
if (tabIndex < 0 && isScope && !hasTabIndex(node)) {
return 0;
}
return tabIndex;
};
var sortOrderedTabbables = function sortOrderedTabbables(a, b) {
return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;
};
var isInput = function isInput(node) {
return node.tagName === 'INPUT';
};
var isHiddenInput = function isHiddenInput(node) {
return isInput(node) && node.type === 'hidden';
};
var isDetailsWithSummary = function isDetailsWithSummary(node) {
var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {
return child.tagName === 'SUMMARY';
});
return r;
};
var getCheckedRadio = function getCheckedRadio(nodes, form) {
for (var i = 0; i < nodes.length; i++) {
if (nodes[i].checked && nodes[i].form === form) {
return nodes[i];
}
}
};
var isTabbableRadio = function isTabbableRadio(node) {
if (!node.name) {
return true;
}
var radioScope = node.form || getRootNode(node);
var queryRadios = function queryRadios(name) {
return radioScope.querySelectorAll('input[type="radio"][name="' + name + '"]');
};
var radioSet;
if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {
radioSet = queryRadios(window.CSS.escape(node.name));
} else {
try {
radioSet = queryRadios(node.name);
} catch (err) {
// eslint-disable-next-line no-console
console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);
return false;
}
}
var checked = getCheckedRadio(radioSet, node.form);
return !checked || checked === node;
};
var isRadio = function isRadio(node) {
return isInput(node) && node.type === 'radio';
};
var isNonTabbableRadio = function isNonTabbableRadio(node) {
return isRadio(node) && !isTabbableRadio(node);
};
// determines if a node is ultimately attached to the window's document
var isNodeAttached = function isNodeAttached(node) {
var _nodeRoot;
// The root node is the shadow root if the node is in a shadow DOM; some document otherwise
// (but NOT _the_ document; see second 'If' comment below for more).
// If rootNode is shadow root, it'll have a host, which is the element to which the shadow
// is attached, and the one we need to check if it's in the document or not (because the
// shadow, and all nodes it contains, is never considered in the document since shadows
// behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,
// is hidden, or is not in the document itself but is detached, it will affect the shadow's
// visibility, including all the nodes it contains). The host could be any normal node,
// or a custom element (i.e. web component). Either way, that's the one that is considered
// part of the document, not the shadow root, nor any of its children (i.e. the node being
// tested).
// To further complicate things, we have to look all the way up until we find a shadow HOST
// that is attached (or find none) because the node might be in nested shadows...
// If rootNode is not a shadow root, it won't have a host, and so rootNode should be the
// document (per the docs) and while it's a Document-type object, that document does not
// appear to be the same as the node's `ownerDocument` for some reason, so it's safer
// to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,
// using `rootNode.contains(node)` will _always_ be true we'll get false-positives when
// node is actually detached.
// NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible
// if a tabbable/focusable node was quickly added to the DOM, focused, and then removed
// from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then
// `ownerDocument` will be `null`, hence the optional chaining on it.
var nodeRoot = node && getRootNode(node);
var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;
// in some cases, a detached node will return itself as the root instead of a document or
// shadow root object, in which case, we shouldn't try to look further up the host chain
var attached = false;
if (nodeRoot && nodeRoot !== node) {
var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;
attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));
while (!attached && nodeRootHost) {
var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;
// since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,
// which means we need to get the host's host and check if that parent host is contained
// in (i.e. attached to) the document
nodeRoot = getRootNode(nodeRootHost);
nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;
attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));
}
}
return attached;
};
var isZeroArea = function isZeroArea(node) {
var _node$getBoundingClie = node.getBoundingClientRect(),
width = _node$getBoundingClie.width,
height = _node$getBoundingClie.height;
return width === 0 && height === 0;
};
var isHidden = function isHidden(node, _ref) {
var displayCheck = _ref.displayCheck,
getShadowRoot = _ref.getShadowRoot;
if (displayCheck === 'full-native') {
if ('checkVisibility' in node) {
// Chrome >= 105, Edge >= 105, Firefox >= 106, Safari >= 17.4
// @see https://developer.mozilla.org/en-US/docs/Web/API/Element/checkVisibility#browser_compatibility
var visible = node.checkVisibility({
// Checking opacity might be desirable for some use cases, but natively,
// opacity zero elements _are_ focusable and tabbable.
checkOpacity: false,
opacityProperty: false,
contentVisibilityAuto: true,
visibilityProperty: true,
// This is an alias for `visibilityProperty`. Contemporary browsers
// support both. However, this alias has wider browser support (Chrome
// >= 105 and Firefox >= 106, vs. Chrome >= 121 and Firefox >= 122), so
// we include it anyway.
checkVisibilityCSS: true
});
return !visible;
}
// Fall through to manual visibility checks
}
// NOTE: visibility will be `undefined` if node is detached from the document
// (see notes about this further down), which means we will consider it visible
// (this is legacy behavior from a very long way back)
// NOTE: we check this regardless of `displayCheck="none"` because this is a
// _visibility_ check, not a _display_ check
if (getComputedStyle(node).visibility === 'hidden') {
return true;
}
var isDirectSummary = matches.call(node, 'details>summary:first-of-type');
var nodeUnderDetails = isDirectSummary ? node.parentElement : node;
if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {
return true;
}
if (!displayCheck || displayCheck === 'full' ||
// full-native can run this branch when it falls through in case
// Element#checkVisibility is unsupported
displayCheck === 'full-native' || displayCheck === 'legacy-full') {
if (typeof getShadowRoot === 'function') {
// figure out if we should consider the node to be in an undisclosed shadow and use the
// 'non-zero-area' fallback
var originalNode = node;
while (node) {
var parentElement = node.parentElement;
var rootNode = getRootNode(node);
if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow
) {
// node has an undisclosed shadow which means we can only treat it as a black box, so we
// fall back to a non-zero-area test
return isZeroArea(node);
} else if (node.assignedSlot) {
// iterate up slot
node = node.assignedSlot;
} else if (!parentElement && rootNode !== node.ownerDocument) {
// cross shadow boundary
node = rootNode.host;
} else {
// iterate up normal dom
node = parentElement;
}
}
node = originalNode;
}
// else, `getShadowRoot` might be true, but all that does is enable shadow DOM support
// (i.e. it does not also presume that all nodes might have undisclosed shadows); or
// it might be a falsy value, which means shadow DOM support is disabled
// Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)
// now we can just test to see if it would normally be visible or not, provided it's
// attached to the main document.
// NOTE: We must consider case where node is inside a shadow DOM and given directly to
// `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.
if (isNodeAttached(node)) {
// this works wherever the node is: if there's at least one client rect, it's
// somehow displayed; it also covers the CSS 'display: contents' case where the
// node itself is hidden in place of its contents; and there's no need to search
// up the hierarchy either
return !node.getClientRects().length;
}
// Else, the node isn't attached to the document, which means the `getClientRects()`
// API will __always__ return zero rects (this can happen, for example, if React
// is used to render nodes onto a detached tree, as confirmed in this thread:
// https://github.com/facebook/react/issues/9117#issuecomment-284228870)
//
// It also means that even window.getComputedStyle(node).display will return `undefined`
// because styles are only computed for nodes that are in the document.
//
// NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable
// somehow. Though it was never stated officially, anyone who has ever used tabbable
// APIs on nodes in detached containers has actually implicitly used tabbable in what
// was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck="none"` mode -- essentially
// considering __everything__ to be visible because of the innability to determine styles.
//
// v6.0.0: As of this major release, the default 'full' option __no longer treats detached
// nodes as visible with the 'none' fallback.__
if (displayCheck !== 'legacy-full') {
return true; // hidden
}
// else, fallback to 'none' mode and consider the node visible
} else if (displayCheck === 'non-zero-area') {
// NOTE: Even though this tests that the node's client rect is non-zero to determine
// whether it's displayed, and that a detached node will __always__ have a zero-area
// client rect, we don't special-case for whether the node is attached or not. In
// this mode, we do want to consider nodes that have a zero area to be hidden at all
// times, and that includes attached or not.
return isZeroArea(node);
}
// visible, as far as we can tell, or per current `displayCheck=none` mode, we assume
// it's visible
return false;
};
// form fields (nested) inside a disabled fieldset are not focusable/tabbable
// unless they are in the _first_ <legend> element of the top-most disabled
// fieldset
var isDisabledFromFieldset = function isDisabledFromFieldset(node) {
if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {
var parentNode = node.parentElement;
// check if `node` is contained in a disabled <fieldset>
while (parentNode) {
if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {
// look for the first <legend> among the children of the disabled <fieldset>
for (var i = 0; i < parentNode.children.length; i++) {
var child = parentNode.children.item(i);
// when the first <legend> (in document order) is found
if (child.tagName === 'LEGEND') {
// if its parent <fieldset> is not nested in another disabled <fieldset>,
// return whether `node` is a descendant of its first <legend>
return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);
}
}
// the disabled <fieldset> containing `node` has no <legend>
return true;
}
parentNode = parentNode.parentElement;
}
}
// else, node's tabbable/focusable state should not be affected by a fieldset's
// enabled/disabled state
return false;
};
var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {
if (node.disabled || isHiddenInput(node) || isHidden(node, options) ||
// For a details element with a summary, the summary element gets the focus
isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
return false;
}
return true;
};
var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
return false;
}
return true;
};
var isShadowRootTabbable = function isShadowRootTabbable(shadowHostNode) {
var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);
if (isNaN(tabIndex) || tabIndex >= 0) {
return true;
}
// If a custom element has an explicit negative tabindex,
// browsers will not allow tab targeting said element's children.
return false;
};
/**
* @param {Array.<Element|CandidateScope>} candidates
* @returns Element[]
*/
var _sortByOrder = function sortByOrder(candidates) {
var regularTabbables = [];
var orderedTabbables = [];
candidates.forEach(function (item, i) {
var isScope = !!item.scopeParent;
var element = isScope ? item.scopeParent : item;
var candidateTabindex = getSortOrderTabIndex(element, isScope);
var elements = isScope ? _sortByOrder(item.candidates) : element;
if (candidateTabindex === 0) {
isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);
} else {
orderedTabbables.push({
documentOrder: i,
tabIndex: candidateTabindex,
item: item,
isScope: isScope,
content: elements
});
}
});
return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {
sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);
return acc;
}, []).concat(regularTabbables);
};
var tabbable = function tabbable(container, options) {
options = options || {};
var candidates;
if (options.getShadowRoot) {
candidates = _getCandidatesIteratively([container], options.includeContainer, {
filter: isNodeMatchingSelectorTabbable.bind(null, options),
flatten: false,
getShadowRoot: options.getShadowRoot,
shadowRootFilter: isShadowRootTabbable
});
} else {
candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
}
return _sortByOrder(candidates);
};
var focusable = function focusable(container, options) {
options = options || {};
var candidates;
if (options.getShadowRoot) {
candidates = _getCandidatesIteratively([container], options.includeContainer, {
filter: isNodeMatchingSelectorFocusable.bind(null, options),
flatten: true,
getShadowRoot: options.getShadowRoot
});
} else {
candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));
}
return candidates;
};
var isTabbable = function isTabbable(node, options) {
options = options || {};
if (!node) {
throw new Error('No node provided');
}
if (matches.call(node, candidateSelector) === false) {
return false;
}
return isNodeMatchingSelectorTabbable(options, node);
};
var focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe:not([inert]):not([inert] *)').join(',');
var isFocusable = function isFocusable(node, options) {
options = options || {};
if (!node) {
throw new Error('No node provided');
}
if (matches.call(node, focusableCandidateSelector) === false) {
return false;
}
return isNodeMatchingSelectorFocusable(options, node);
};
exports.focusable = focusable;
exports.getTabIndex = getTabIndex;
exports.isFocusable = isFocusable;
exports.isTabbable = isTabbable;
exports.tabbable = tabbable;
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,32 @@
import { MessagePort } from 'node:worker_threads';
import { UrlAndMap } from 'source-map-support';
import { TransformOptions } from 'esbuild';
type Transformed = {
code: string;
map: RawSourceMap;
warnings?: unknown[];
};
type RawSourceMap = UrlAndMap['map'];
declare function installSourceMapSupport(
/**
* To support Node v20 where loaders are executed in its own thread
* https://nodejs.org/docs/latest-v20.x/api/esm.html#globalpreload
*/
loaderPort?: MessagePort): ({ code, map }: Transformed, filePath: string, mainThreadPort?: MessagePort) => string;
declare function transformDynamicImport(filePath: string, code: string): {
code: string;
map: any;
} | undefined;
declare function transformSync(code: string, filePath: string, extendOptions?: TransformOptions): Transformed;
declare function transform(code: string, filePath: string, extendOptions?: TransformOptions): Promise<Transformed>;
declare const resolveTsPath: (filePath: string) => string | undefined;
type Version = [number, number, number];
declare const compareNodeVersion: (version: Version) => number;
export { RawSourceMap, compareNodeVersion, installSourceMapSupport, resolveTsPath, transform, transformDynamicImport, transformSync };

View File

@@ -0,0 +1 @@
{"version":3,"file":"list-filter.js","sources":["../../../src/icons/list-filter.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ListFilter\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMyA2aDE4IiAvPgogIDxwYXRoIGQ9Ik03IDEyaDEwIiAvPgogIDxwYXRoIGQ9Ik0xMCAxOGg0IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/list-filter\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 ListFilter = createLucideIcon('ListFilter', [\n ['path', { d: 'M3 6h18', key: 'd0wm0j' }],\n ['path', { d: 'M7 12h10', key: 'b7w52i' }],\n ['path', { d: 'M10 18h4', key: '1ulq68' }],\n]);\n\nexport default ListFilter;\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,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,15 @@
export * from "./core.cjs";
export * from "./parse.cjs";
export * from "./errors.cjs";
export * from "./schemas.cjs";
export * from "./checks.cjs";
export * from "./versions.cjs";
export * as util from "./util.cjs";
export * as regexes from "./regexes.cjs";
export * as locales from "../locales/index.cjs";
export * from "./registries.cjs";
export * from "./doc.cjs";
export * from "./function.cjs";
export * from "./api.cjs";
export * from "./to-json-schema.cjs";
export * as JSONSchema from "./json-schema.cjs";

View File

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

View File

@@ -0,0 +1,38 @@
import { serialize } from 'object-to-formdata';
import { reduceFieldsToValues } from 'payload/shared';
export async function createFormData(formState = {}, overrides = {}, collectionSlug, uploadHandler) {
const data = reduceFieldsToValues(formState, true);
let file = data?.file;
if (file) {
delete data.file;
}
if (file && typeof uploadHandler === 'function') {
let filename = file.name;
const clientUploadContext = await uploadHandler({
file,
updateFilename: value => {
filename = value;
}
});
file = JSON.stringify({
clientUploadContext,
collectionSlug,
filename,
mimeType: file.type,
size: file.size
});
}
const dataWithOverrides = {
...data,
...overrides
};
const dataToSerialize = {
_payload: JSON.stringify(dataWithOverrides),
file
};
return serialize(dataToSerialize, {
indices: true,
nullsAsUndefineds: false
});
}
//# sourceMappingURL=createFormData.js.map

View File

@@ -0,0 +1,80 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React, { useState } from 'react';
import { CopyIcon } from '../../icons/Copy/index.js';
import { useTranslation } from '../../providers/Translation/index.js';
import { Tooltip } from '../Tooltip/index.js';
import './index.scss';
const baseClass = 'copy-to-clipboard';
export const CopyToClipboard = t0 => {
const $ = _c(11);
const {
defaultMessage,
successMessage,
value
} = t0;
const [copied, setCopied] = useState(false);
const [hovered, setHovered] = useState(false);
const {
t
} = useTranslation();
if (value) {
let t1;
if ($[0] !== value) {
t1 = async () => {
await navigator.clipboard.writeText(value);
setCopied(true);
};
$[0] = value;
$[1] = t1;
} else {
t1 = $[1];
}
let t2;
let t3;
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
t2 = () => {
setHovered(true);
setCopied(false);
};
t3 = () => {
setHovered(false);
setCopied(false);
};
$[2] = t2;
$[3] = t3;
} else {
t2 = $[2];
t3 = $[3];
}
let t4;
if ($[4] !== copied || $[5] !== defaultMessage || $[6] !== hovered || $[7] !== successMessage || $[8] !== t || $[9] !== t1) {
t4 = _jsxs("button", {
className: baseClass,
onClick: t1,
onMouseEnter: t2,
onMouseLeave: t3,
type: "button",
children: [_jsx(CopyIcon, {}), _jsxs(Tooltip, {
delay: copied ? 0 : undefined,
show: hovered || copied,
children: [copied && (successMessage ?? t("general:copied")), !copied && (defaultMessage ?? t("general:copy"))]
})]
});
$[4] = copied;
$[5] = defaultMessage;
$[6] = hovered;
$[7] = successMessage;
$[8] = t;
$[9] = t1;
$[10] = t4;
} else {
t4 = $[10];
}
return t4;
}
return null;
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/tracing/fastify/v3/utils.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,IAAI,EAAkB,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE7F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D;;;;;;GAMG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,kBAAkB,EACzB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,cAAc,GAAE,UAAe,QAchC;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,kBAAkB,EAAE,GAAG,CAAC,EAAE,GAAG,QAkB3D;AAKD;;;;;;;;GAQG;AACH,wBAAgB,kCAAkC,CAAC,CAAC,EAClD,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACzB,QAAQ,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC,KAAK,IAAI,EAC1C,oBAAoB,CAAC,EAAE,OAAO,GAC7B,OAAO,CAAC,CAAC,CAAC,CAAC;AACd,wBAAgB,kCAAkC,CAAC,CAAC,EAClD,OAAO,EAAE,MAAM,CAAC,EAChB,QAAQ,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC,KAAK,IAAI,EAC1C,oBAAoB,CAAC,EAAE,OAAO,GAC7B,CAAC,CAAC"}

View File

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

View File

@@ -0,0 +1,8 @@
import React from 'react';
import './index.scss';
export type ConfirmPasswordFieldProps = {
readonly disabled?: boolean;
readonly path?: string;
};
export declare const ConfirmPasswordField: React.FC<ConfirmPasswordFieldProps>;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,16 @@
/**
* @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 MoveDownLeft = createLucideIcon("MoveDownLeft", [
["path", { d: "M11 19H5V13", key: "1akmht" }],
["path", { d: "M19 5L5 19", key: "72u4yj" }]
]);
export { MoveDownLeft as default };
//# sourceMappingURL=move-down-left.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"hasLocalesTable.d.ts","sourceRoot":"","sources":["../../src/utilities/hasLocalesTable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAIpC,eAAO,MAAM,eAAe,mCAGzB;IACD,MAAM,EAAE,KAAK,EAAE,CAAA;IACf;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC5B,KAAG,OAyBH,CAAA"}

View File

@@ -0,0 +1,9 @@
import type { Locale } from "./types.js";
/**
* @category Locales
* @summary Luxembourgish locale.
* @language Luxembourgish
* @iso-639-2 ltz
* @author Daniel Waxweiler [@dwaxweiler](https://github.com/dwaxweiler)
*/
export declare const lb: Locale;

View File

@@ -0,0 +1,3 @@
import { GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql';
export declare const GraphQLBigIntConfig: GraphQLScalarTypeConfig<bigint | number, bigint | string | number>;
export declare const GraphQLBigInt: GraphQLScalarType<number | bigint, string | number | bigint>;

View File

@@ -0,0 +1,3 @@
'use strict';
module.exports = require('./async').applyEach;

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/durable-sqlite/driver.ts"],"sourcesContent":["/// <reference types=\"@cloudflare/workers-types\" />\nimport { entityKind } from '~/entity.ts';\nimport { DefaultLogger } from '~/logger.ts';\nimport {\n\tcreateTableRelationsHelpers,\n\textractTablesRelationalConfig,\n\ttype ExtractTablesWithRelations,\n\ttype RelationalSchemaConfig,\n\ttype TablesRelationalConfig,\n} from '~/relations.ts';\nimport { BaseSQLiteDatabase } from '~/sqlite-core/db.ts';\nimport { SQLiteSyncDialect } from '~/sqlite-core/dialect.ts';\nimport type { DrizzleConfig } from '~/utils.ts';\nimport { SQLiteDOSession } from './session.ts';\n\nexport class DrizzleSqliteDODatabase<\n\tTSchema extends Record<string, unknown> = Record<string, never>,\n> extends BaseSQLiteDatabase<'sync', SqlStorageCursor<Record<string, SqlStorageValue>>, TSchema> {\n\tstatic override readonly [entityKind]: string = 'DrizzleSqliteDODatabase';\n\n\t/** @internal */\n\tdeclare readonly session: SQLiteDOSession<TSchema, ExtractTablesWithRelations<TSchema>>;\n}\n\nexport function drizzle<\n\tTSchema extends Record<string, unknown> = Record<string, never>,\n\tTClient extends DurableObjectStorage = DurableObjectStorage,\n>(\n\tclient: TClient,\n\tconfig: DrizzleConfig<TSchema> = {},\n): DrizzleSqliteDODatabase<TSchema> & {\n\t$client: TClient;\n} {\n\tconst dialect = new SQLiteSyncDialect({ casing: config.casing });\n\tlet logger;\n\tif (config.logger === true) {\n\t\tlogger = new DefaultLogger();\n\t} else if (config.logger !== false) {\n\t\tlogger = config.logger;\n\t}\n\n\tlet schema: RelationalSchemaConfig<TablesRelationalConfig> | undefined;\n\tif (config.schema) {\n\t\tconst tablesConfig = extractTablesRelationalConfig(\n\t\t\tconfig.schema,\n\t\t\tcreateTableRelationsHelpers,\n\t\t);\n\t\tschema = {\n\t\t\tfullSchema: config.schema,\n\t\t\tschema: tablesConfig.tables,\n\t\t\ttableNamesMap: tablesConfig.tableNamesMap,\n\t\t};\n\t}\n\n\tconst session = new SQLiteDOSession(client as DurableObjectStorage, dialect, schema, { logger });\n\tconst db = new DrizzleSqliteDODatabase('sync', dialect, session, schema) as DrizzleSqliteDODatabase<TSchema>;\n\t(<any> db).$client = client;\n\n\treturn db as any;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAA2B;AAC3B,oBAA8B;AAC9B,uBAMO;AACP,gBAAmC;AACnC,qBAAkC;AAElC,qBAAgC;AAEzB,MAAM,gCAEH,6BAAuF;AAAA,EAChG,QAA0B,wBAAU,IAAY;AAIjD;AAEO,SAAS,QAIf,QACA,SAAiC,CAAC,GAGjC;AACD,QAAM,UAAU,IAAI,iCAAkB,EAAE,QAAQ,OAAO,OAAO,CAAC;AAC/D,MAAI;AACJ,MAAI,OAAO,WAAW,MAAM;AAC3B,aAAS,IAAI,4BAAc;AAAA,EAC5B,WAAW,OAAO,WAAW,OAAO;AACnC,aAAS,OAAO;AAAA,EACjB;AAEA,MAAI;AACJ,MAAI,OAAO,QAAQ;AAClB,UAAM,mBAAe;AAAA,MACpB,OAAO;AAAA,MACP;AAAA,IACD;AACA,aAAS;AAAA,MACR,YAAY,OAAO;AAAA,MACnB,QAAQ,aAAa;AAAA,MACrB,eAAe,aAAa;AAAA,IAC7B;AAAA,EACD;AAEA,QAAM,UAAU,IAAI,+BAAgB,QAAgC,SAAS,QAAQ,EAAE,OAAO,CAAC;AAC/F,QAAM,KAAK,IAAI,wBAAwB,QAAQ,SAAS,SAAS,MAAM;AACvE,EAAO,GAAI,UAAU;AAErB,SAAO;AACR;","names":[]}

View File

@@ -0,0 +1,425 @@
'use strict'
/**
* This module offers an optimized timer implementation designed for scenarios
* where high precision is not critical.
*
* The timer achieves faster performance by using a low-resolution approach,
* with an accuracy target of within 500ms. This makes it particularly useful
* for timers with delays of 1 second or more, where exact timing is less
* crucial.
*
* It's important to note that Node.js timers are inherently imprecise, as
* delays can occur due to the event loop being blocked by other operations.
* Consequently, timers may trigger later than their scheduled time.
*/
/**
* The fastNow variable contains the internal fast timer clock value.
*
* @type {number}
*/
let fastNow = 0
/**
* RESOLUTION_MS represents the target resolution time in milliseconds.
*
* @type {number}
* @default 1000
*/
const RESOLUTION_MS = 1e3
/**
* TICK_MS defines the desired interval in milliseconds between each tick.
* The target value is set to half the resolution time, minus 1 ms, to account
* for potential event loop overhead.
*
* @type {number}
* @default 499
*/
const TICK_MS = (RESOLUTION_MS >> 1) - 1
/**
* fastNowTimeout is a Node.js timer used to manage and process
* the FastTimers stored in the `fastTimers` array.
*
* @type {NodeJS.Timeout}
*/
let fastNowTimeout
/**
* The kFastTimer symbol is used to identify FastTimer instances.
*
* @type {Symbol}
*/
const kFastTimer = Symbol('kFastTimer')
/**
* The fastTimers array contains all active FastTimers.
*
* @type {FastTimer[]}
*/
const fastTimers = []
/**
* These constants represent the various states of a FastTimer.
*/
/**
* The `NOT_IN_LIST` constant indicates that the FastTimer is not included
* in the `fastTimers` array. Timers with this status will not be processed
* during the next tick by the `onTick` function.
*
* A FastTimer can be re-added to the `fastTimers` array by invoking the
* `refresh` method on the FastTimer instance.
*
* @type {-2}
*/
const NOT_IN_LIST = -2
/**
* The `TO_BE_CLEARED` constant indicates that the FastTimer is scheduled
* for removal from the `fastTimers` array. A FastTimer in this state will
* be removed in the next tick by the `onTick` function and will no longer
* be processed.
*
* This status is also set when the `clear` method is called on the FastTimer instance.
*
* @type {-1}
*/
const TO_BE_CLEARED = -1
/**
* The `PENDING` constant signifies that the FastTimer is awaiting processing
* in the next tick by the `onTick` function. Timers with this status will have
* their `_idleStart` value set and their status updated to `ACTIVE` in the next tick.
*
* @type {0}
*/
const PENDING = 0
/**
* The `ACTIVE` constant indicates that the FastTimer is active and waiting
* for its timer to expire. During the next tick, the `onTick` function will
* check if the timer has expired, and if so, it will execute the associated callback.
*
* @type {1}
*/
const ACTIVE = 1
/**
* The onTick function processes the fastTimers array.
*
* @returns {void}
*/
function onTick () {
/**
* Increment the fastNow value by the TICK_MS value, despite the actual time
* that has passed since the last tick. This approach ensures independence
* from the system clock and delays caused by a blocked event loop.
*
* @type {number}
*/
fastNow += TICK_MS
/**
* The `idx` variable is used to iterate over the `fastTimers` array.
* Expired timers are removed by replacing them with the last element in the array.
* Consequently, `idx` is only incremented when the current element is not removed.
*
* @type {number}
*/
let idx = 0
/**
* The len variable will contain the length of the fastTimers array
* and will be decremented when a FastTimer should be removed from the
* fastTimers array.
*
* @type {number}
*/
let len = fastTimers.length
while (idx < len) {
/**
* @type {FastTimer}
*/
const timer = fastTimers[idx]
// If the timer is in the ACTIVE state and the timer has expired, it will
// be processed in the next tick.
if (timer._state === PENDING) {
// Set the _idleStart value to the fastNow value minus the TICK_MS value
// to account for the time the timer was in the PENDING state.
timer._idleStart = fastNow - TICK_MS
timer._state = ACTIVE
} else if (
timer._state === ACTIVE &&
fastNow >= timer._idleStart + timer._idleTimeout
) {
timer._state = TO_BE_CLEARED
timer._idleStart = -1
timer._onTimeout(timer._timerArg)
}
if (timer._state === TO_BE_CLEARED) {
timer._state = NOT_IN_LIST
// Move the last element to the current index and decrement len if it is
// not the only element in the array.
if (--len !== 0) {
fastTimers[idx] = fastTimers[len]
}
} else {
++idx
}
}
// Set the length of the fastTimers array to the new length and thus
// removing the excess FastTimers elements from the array.
fastTimers.length = len
// If there are still active FastTimers in the array, refresh the Timer.
// If there are no active FastTimers, the timer will be refreshed again
// when a new FastTimer is instantiated.
if (fastTimers.length !== 0) {
refreshTimeout()
}
}
function refreshTimeout () {
// If the fastNowTimeout is already set and the Timer has the refresh()-
// method available, call it to refresh the timer.
// Some timer objects returned by setTimeout may not have a .refresh()
// method (e.g. mocked timers in tests).
if (fastNowTimeout?.refresh) {
fastNowTimeout.refresh()
// fastNowTimeout is not instantiated yet or refresh is not availabe,
// create a new Timer.
} else {
clearTimeout(fastNowTimeout)
fastNowTimeout = setTimeout(onTick, TICK_MS)
// If the Timer has an unref method, call it to allow the process to exit,
// if there are no other active handles. When using fake timers or mocked
// environments (like Jest), .unref() may not be defined,
fastNowTimeout?.unref()
}
}
/**
* The `FastTimer` class is a data structure designed to store and manage
* timer information.
*/
class FastTimer {
[kFastTimer] = true
/**
* The state of the timer, which can be one of the following:
* - NOT_IN_LIST (-2)
* - TO_BE_CLEARED (-1)
* - PENDING (0)
* - ACTIVE (1)
*
* @type {-2|-1|0|1}
* @private
*/
_state = NOT_IN_LIST
/**
* The number of milliseconds to wait before calling the callback.
*
* @type {number}
* @private
*/
_idleTimeout = -1
/**
* The time in milliseconds when the timer was started. This value is used to
* calculate when the timer should expire.
*
* @type {number}
* @default -1
* @private
*/
_idleStart = -1
/**
* The function to be executed when the timer expires.
* @type {Function}
* @private
*/
_onTimeout
/**
* The argument to be passed to the callback when the timer expires.
*
* @type {*}
* @private
*/
_timerArg
/**
* @constructor
* @param {Function} callback A function to be executed after the timer
* expires.
* @param {number} delay The time, in milliseconds that the timer should wait
* before the specified function or code is executed.
* @param {*} arg
*/
constructor (callback, delay, arg) {
this._onTimeout = callback
this._idleTimeout = delay
this._timerArg = arg
this.refresh()
}
/**
* Sets the timer's start time to the current time, and reschedules the timer
* to call its callback at the previously specified duration adjusted to the
* current time.
* Using this on a timer that has already called its callback will reactivate
* the timer.
*
* @returns {void}
*/
refresh () {
// In the special case that the timer is not in the list of active timers,
// add it back to the array to be processed in the next tick by the onTick
// function.
if (this._state === NOT_IN_LIST) {
fastTimers.push(this)
}
// If the timer is the only active timer, refresh the fastNowTimeout for
// better resolution.
if (!fastNowTimeout || fastTimers.length === 1) {
refreshTimeout()
}
// Setting the state to PENDING will cause the timer to be reset in the
// next tick by the onTick function.
this._state = PENDING
}
/**
* The `clear` method cancels the timer, preventing it from executing.
*
* @returns {void}
* @private
*/
clear () {
// Set the state to TO_BE_CLEARED to mark the timer for removal in the next
// tick by the onTick function.
this._state = TO_BE_CLEARED
// Reset the _idleStart value to -1 to indicate that the timer is no longer
// active.
this._idleStart = -1
}
}
/**
* This module exports a setTimeout and clearTimeout function that can be
* used as a drop-in replacement for the native functions.
*/
module.exports = {
/**
* The setTimeout() method sets a timer which executes a function once the
* timer expires.
* @param {Function} callback A function to be executed after the timer
* expires.
* @param {number} delay The time, in milliseconds that the timer should
* wait before the specified function or code is executed.
* @param {*} [arg] An optional argument to be passed to the callback function
* when the timer expires.
* @returns {NodeJS.Timeout|FastTimer}
*/
setTimeout (callback, delay, arg) {
// If the delay is less than or equal to the RESOLUTION_MS value return a
// native Node.js Timer instance.
return delay <= RESOLUTION_MS
? setTimeout(callback, delay, arg)
: new FastTimer(callback, delay, arg)
},
/**
* The clearTimeout method cancels an instantiated Timer previously created
* by calling setTimeout.
*
* @param {NodeJS.Timeout|FastTimer} timeout
*/
clearTimeout (timeout) {
// If the timeout is a FastTimer, call its own clear method.
if (timeout[kFastTimer]) {
/**
* @type {FastTimer}
*/
timeout.clear()
// Otherwise it is an instance of a native NodeJS.Timeout, so call the
// Node.js native clearTimeout function.
} else {
clearTimeout(timeout)
}
},
/**
* The setFastTimeout() method sets a fastTimer which executes a function once
* the timer expires.
* @param {Function} callback A function to be executed after the timer
* expires.
* @param {number} delay The time, in milliseconds that the timer should
* wait before the specified function or code is executed.
* @param {*} [arg] An optional argument to be passed to the callback function
* when the timer expires.
* @returns {FastTimer}
*/
setFastTimeout (callback, delay, arg) {
return new FastTimer(callback, delay, arg)
},
/**
* The clearTimeout method cancels an instantiated FastTimer previously
* created by calling setFastTimeout.
*
* @param {FastTimer} timeout
*/
clearFastTimeout (timeout) {
timeout.clear()
},
/**
* The now method returns the value of the internal fast timer clock.
*
* @returns {number}
*/
now () {
return fastNow
},
/**
* Trigger the onTick function to process the fastTimers array.
* Exported for testing purposes only.
* Marking as deprecated to discourage any use outside of testing.
* @deprecated
* @param {number} [delay=0] The delay in milliseconds to add to the now value.
*/
tick (delay = 0) {
fastNow += delay - RESOLUTION_MS + 1
onTick()
onTick()
},
/**
* Reset FastTimers.
* Exported for testing purposes only.
* Marking as deprecated to discourage any use outside of testing.
* @deprecated
*/
reset () {
fastNow = 0
fastTimers.length = 0
clearTimeout(fastNowTimeout)
fastNowTimeout = null
},
/**
* Exporting for testing purposes only.
* Marking as deprecated to discourage any use outside of testing.
* @deprecated
*/
kFastTimer
}

View File

@@ -0,0 +1 @@
import o from"../../extractor/ExtractionCompiler.js";import{isDevelopment as e,isNextBuild as t}from"../config.js";import{once as s}from"../utils.js";let r;const c=s("_NEXT_INTL_EXTRACT");function n(s){const n=s.experimental;if(!n?.extract)return;(e||t)&&c((()=>{const t={srcPath:n.srcPath,sourceLocale:n.extract.sourceLocale,messages:n.messages};function s(){r&&(r[Symbol.dispose](),r=void 0)}r=new o(t,{isDevelopment:e,projectRoot:process.cwd()}),r.extractAll(),process.on("exit",s),process.on("SIGINT",s),process.on("SIGTERM",s)}))}export{n as default};

View File

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

View File

@@ -0,0 +1,178 @@
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Gutter, ListQueryProvider, SetDocumentStepNav } from '@payloadcms/ui';
import { notFound } from 'next/navigation.js';
import { formatAdminURL, hasDraftsEnabled, isNumber } from 'payload/shared';
import React from 'react';
import { fetchLatestVersion, fetchVersions } from '../Version/fetchVersions.js';
import { VersionDrawerCreatedAtCell } from '../Version/SelectComparison/VersionDrawer/CreatedAtCell.js';
import { buildVersionColumns } from './buildColumns.js';
import { VersionsViewClient } from './index.client.js';
const baseClass = 'versions';
export async function VersionsView(props) {
const {
hasPublishedDoc,
initPageResult: {
collectionConfig,
docID: id,
globalConfig,
req,
req: {
i18n,
payload: {
config
},
t,
user
}
},
routeSegments: segments,
searchParams: {
limit,
page,
sort
},
versions: {
disableGutter = false,
useVersionDrawerCreatedAtCell = false
} = {}
} = props;
const draftsEnabled = hasDraftsEnabled(collectionConfig || globalConfig);
const collectionSlug = collectionConfig?.slug;
const globalSlug = globalConfig?.slug;
const isTrashed = segments[2] === 'trash';
const {
localization,
routes: {
api: apiRoute
},
serverURL
} = config;
const whereQuery = {
and: []
};
if (localization && draftsEnabled) {
whereQuery.and.push({
snapshot: {
not_equals: true
}
});
}
const defaultLimit = collectionSlug ? collectionConfig?.admin?.pagination?.defaultLimit : 10;
const limitToUse = isNumber(limit) ? Number(limit) : defaultLimit;
const versionsData = await fetchVersions({
collectionSlug,
depth: 0,
globalSlug,
limit: limitToUse,
locale: req.locale,
overrideAccess: false,
page: page ? parseInt(page.toString(), 10) : undefined,
parentID: id,
req,
sort: sort,
user,
where: whereQuery
});
if (!versionsData) {
return notFound();
}
const [currentlyPublishedVersion, latestDraftVersion] = await Promise.all([hasPublishedDoc ? fetchLatestVersion({
collectionSlug,
depth: 0,
globalSlug,
locale: req.locale,
overrideAccess: false,
parentID: id,
req,
select: {
id: true,
updatedAt: true,
version: {
_status: true,
updatedAt: true
}
},
status: 'published',
user,
where: {
snapshot: {
not_equals: true
}
}
}) : Promise.resolve(null), draftsEnabled ? fetchLatestVersion({
collectionSlug,
depth: 0,
globalSlug,
locale: req.locale,
overrideAccess: false,
parentID: id,
req,
select: {
id: true,
updatedAt: true,
version: {
_status: true,
updatedAt: true
}
},
status: 'draft',
user,
where: {
snapshot: {
not_equals: true
}
}
}) : Promise.resolve(null)]);
const fetchURL = formatAdminURL({
apiRoute,
path: collectionSlug ? `/${collectionSlug}/versions` : `/${globalSlug}/versions`
});
const columns = buildVersionColumns({
collectionConfig,
CreatedAtCellOverride: useVersionDrawerCreatedAtCell ? VersionDrawerCreatedAtCell : undefined,
currentlyPublishedVersion,
docID: id,
docs: versionsData?.docs,
globalConfig,
i18n,
isTrashed,
latestDraftVersion
});
const pluralLabel = typeof collectionConfig?.labels?.plural === 'function' ? collectionConfig.labels.plural({
i18n,
t
}) : collectionConfig?.labels?.plural ?? globalConfig?.label;
const GutterComponent = disableGutter ? React.Fragment : Gutter;
return /*#__PURE__*/_jsxs(React.Fragment, {
children: [/*#__PURE__*/_jsx(SetDocumentStepNav, {
collectionSlug: collectionSlug,
globalSlug: globalSlug,
id: id,
isTrashed: isTrashed,
pluralLabel: pluralLabel,
useAsTitle: collectionConfig?.admin?.useAsTitle || globalSlug,
view: i18n.t('version:versions')
}), /*#__PURE__*/_jsx("main", {
className: baseClass,
children: /*#__PURE__*/_jsx(GutterComponent, {
className: `${baseClass}__wrap`,
children: /*#__PURE__*/_jsx(ListQueryProvider, {
data: versionsData,
modifySearchParams: true,
orderableFieldName: collectionConfig?.orderable === true ? '_order' : undefined,
query: {
limit: limitToUse,
sort: sort
},
children: /*#__PURE__*/_jsx(VersionsViewClient, {
baseClass: baseClass,
columns: columns,
fetchURL: fetchURL,
paginationLimits: collectionConfig?.admin?.pagination?.limits
})
})
})
})]
});
}
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,203 @@
'use strict'
const metadata = Symbol.for('pino.metadata')
const { DEFAULT_LEVELS } = require('./constants')
const DEFAULT_INFO_LEVEL = DEFAULT_LEVELS.info
function multistream (streamsArray, opts) {
streamsArray = streamsArray || []
opts = opts || { dedupe: false }
const streamLevels = Object.create(DEFAULT_LEVELS)
streamLevels.silent = Infinity
if (opts.levels && typeof opts.levels === 'object') {
Object.keys(opts.levels).forEach(i => {
streamLevels[i] = opts.levels[i]
})
}
const res = {
write,
add,
remove,
emit,
flushSync,
end,
minLevel: 0,
lastId: 0,
streams: [],
clone,
[metadata]: true,
streamLevels
}
if (Array.isArray(streamsArray)) {
streamsArray.forEach(add, res)
} else {
add.call(res, streamsArray)
}
// clean this object up
// or it will stay allocated forever
// as it is closed on the following closures
streamsArray = null
return res
// we can exit early because the streams are ordered by level
function write (data) {
let dest
const level = this.lastLevel
const { streams } = this
// for handling situation when several streams has the same level
let recordedLevel = 0
let stream
// if dedupe set to true we send logs to the stream with the highest level
// therefore, we have to change sorting order
for (let i = initLoopVar(streams.length, opts.dedupe); checkLoopVar(i, streams.length, opts.dedupe); i = adjustLoopVar(i, opts.dedupe)) {
dest = streams[i]
if (dest.level <= level) {
if (recordedLevel !== 0 && recordedLevel !== dest.level) {
break
}
stream = dest.stream
if (stream[metadata]) {
const { lastTime, lastMsg, lastObj, lastLogger } = this
stream.lastLevel = level
stream.lastTime = lastTime
stream.lastMsg = lastMsg
stream.lastObj = lastObj
stream.lastLogger = lastLogger
}
stream.write(data)
if (opts.dedupe) {
recordedLevel = dest.level
}
} else if (!opts.dedupe) {
break
}
}
}
function emit (...args) {
for (const { stream } of this.streams) {
if (typeof stream.emit === 'function') {
stream.emit(...args)
}
}
}
function flushSync () {
for (const { stream } of this.streams) {
if (typeof stream.flushSync === 'function') {
stream.flushSync()
}
}
}
function add (dest) {
if (!dest) {
return res
}
// Check that dest implements either StreamEntry or DestinationStream
const isStream = typeof dest.write === 'function' || dest.stream
const stream_ = dest.write ? dest : dest.stream
// This is necessary to provide a meaningful error message, otherwise it throws somewhere inside write()
if (!isStream) {
throw Error('stream object needs to implement either StreamEntry or DestinationStream interface')
}
const { streams, streamLevels } = this
let level
if (typeof dest.levelVal === 'number') {
level = dest.levelVal
} else if (typeof dest.level === 'string') {
level = streamLevels[dest.level]
} else if (typeof dest.level === 'number') {
level = dest.level
} else {
level = DEFAULT_INFO_LEVEL
}
const dest_ = {
stream: stream_,
level,
levelVal: undefined,
id: ++res.lastId
}
streams.unshift(dest_)
streams.sort(compareByLevel)
this.minLevel = streams[0].level
return res
}
function remove (id) {
const { streams } = this
const index = streams.findIndex(s => s.id === id)
if (index >= 0) {
streams.splice(index, 1)
streams.sort(compareByLevel)
this.minLevel = streams.length > 0 ? streams[0].level : -1
}
return res
}
function end () {
for (const { stream } of this.streams) {
if (typeof stream.flushSync === 'function') {
stream.flushSync()
}
stream.end()
}
}
function clone (level) {
const streams = new Array(this.streams.length)
for (let i = 0; i < streams.length; i++) {
streams[i] = {
level,
stream: this.streams[i].stream
}
}
return {
write,
add,
remove,
minLevel: level,
streams,
clone,
emit,
flushSync,
[metadata]: true
}
}
}
function compareByLevel (a, b) {
return a.level - b.level
}
function initLoopVar (length, dedupe) {
return dedupe ? length - 1 : 0
}
function adjustLoopVar (i, dedupe) {
return dedupe ? i - 1 : i + 1
}
function checkLoopVar (i, length, dedupe) {
return dedupe ? i >= 0 : i < length
}
module.exports = multistream

View File

@@ -0,0 +1,16 @@
/**
* @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 DollarSign = createLucideIcon("DollarSign", [
["line", { x1: "12", x2: "12", y1: "2", y2: "22", key: "7eqyqh" }],
["path", { d: "M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6", key: "1b0p4s" }]
]);
export { DollarSign as default };
//# sourceMappingURL=dollar-sign.js.map

View File

@@ -0,0 +1,29 @@
/* eslint-disable no-cond-assign, no-continue */
import css from './css';
import height from './height';
import isDocument from './isDocument';
/**
* Find the first scrollable parent of an element.
*
* @param element Starting element
* @param firstPossible Stop at the first scrollable parent, even if it's not currently scrollable
*/
export default function scrollParent(element, firstPossible) {
var position = css(element, 'position');
var excludeStatic = position === 'absolute';
var ownerDoc = element.ownerDocument;
if (position === 'fixed') return ownerDoc || document; // @ts-ignore
while ((element = element.parentNode) && !isDocument(element)) {
var isStatic = excludeStatic && css(element, 'position') === 'static';
var style = (css(element, 'overflow') || '') + (css(element, 'overflow-y') || '') + css(element, 'overflow-x');
if (isStatic) continue;
if (/(auto|scroll)/.test(style) && (firstPossible || height(element) < element.scrollHeight)) {
return element;
}
}
return ownerDoc || document;
}

View File

@@ -0,0 +1,38 @@
'use strict';
module.exports = (key, isSelect) => {
if (key.meta && key.name !== 'escape') return;
if (key.ctrl) {
if (key.name === 'a') return 'first';
if (key.name === 'c') return 'abort';
if (key.name === 'd') return 'abort';
if (key.name === 'e') return 'last';
if (key.name === 'g') return 'reset';
}
if (isSelect) {
if (key.name === 'j') return 'down';
if (key.name === 'k') return 'up';
}
if (key.name === 'return') return 'submit';
if (key.name === 'enter') return 'submit'; // ctrl + J
if (key.name === 'backspace') return 'delete';
if (key.name === 'delete') return 'deleteForward';
if (key.name === 'abort') return 'abort';
if (key.name === 'escape') return 'exit';
if (key.name === 'tab') return 'next';
if (key.name === 'pagedown') return 'nextPage';
if (key.name === 'pageup') return 'prevPage'; // TODO create home() in prompt types (e.g. TextPrompt)
if (key.name === 'home') return 'home'; // TODO create end() in prompt types (e.g. TextPrompt)
if (key.name === 'end') return 'end';
if (key.name === 'up') return 'up';
if (key.name === 'down') return 'down';
if (key.name === 'right') return 'right';
if (key.name === 'left') return 'left';
return false;
};

View File

@@ -0,0 +1,2 @@
export { launchDarklyIntegration, buildLaunchDarklyFlagUsedHandler } from './integration';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["React","useWatchForm","RowLabel","createContext","data","path","rowNumber","undefined","RowLabelProvider","children","getDataByPath","getSiblingData","collapsibleData","arrayData","contextValue","useMemo","_jsx","value","useRowLabel","use"],"sources":["../../../../src/forms/RowLabel/Context/index.tsx"],"sourcesContent":["'use client'\n\nimport React from 'react'\n\nimport { useWatchForm } from '../../Form/context.js'\n\ntype RowLabelType<T = unknown> = {\n readonly data: T\n readonly path: string\n readonly rowNumber?: number\n}\n\nconst RowLabel = React.createContext<RowLabelType>({\n data: {},\n path: '',\n rowNumber: undefined,\n})\n\ntype Props<T> = {\n readonly children: React.ReactNode\n} & Omit<RowLabelType<T>, 'data'>\n\nexport const RowLabelProvider: React.FC<Props<unknown>> = ({ children, path, rowNumber }) => {\n const { getDataByPath, getSiblingData } = useWatchForm()\n const collapsibleData = getSiblingData(path)\n const arrayData = getDataByPath(path)\n\n const data = arrayData || collapsibleData\n\n const contextValue = React.useMemo(() => ({ data, path, rowNumber }), [data, path, rowNumber])\n\n return <RowLabel value={contextValue}>{children}</RowLabel>\n}\n\nexport const useRowLabel = <T,>() => {\n return React.use(RowLabel) as RowLabelType<T>\n}\n"],"mappings":"AAAA;;;AAEA,OAAOA,KAAA,MAAW;AAElB,SAASC,YAAY,QAAQ;AAQ7B,MAAMC,QAAA,gBAAWF,KAAA,CAAMG,aAAa,CAAe;EACjDC,IAAA,EAAM,CAAC;EACPC,IAAA,EAAM;EACNC,SAAA,EAAWC;AACb;AAMA,OAAO,MAAMC,gBAAA,GAA6CA,CAAC;EAAEC,QAAQ;EAAEJ,IAAI;EAAEC;AAAS,CAAE;EACtF,MAAM;IAAEI,aAAa;IAAEC;EAAc,CAAE,GAAGV,YAAA;EAC1C,MAAMW,eAAA,GAAkBD,cAAA,CAAeN,IAAA;EACvC,MAAMQ,SAAA,GAAYH,aAAA,CAAcL,IAAA;EAEhC,MAAMD,IAAA,GAAOS,SAAA,IAAaD,eAAA;EAE1B,MAAME,YAAA,GAAed,KAAA,CAAMe,OAAO,CAAC,OAAO;IAAEX,IAAA;IAAMC,IAAA;IAAMC;EAAU,IAAI,CAACF,IAAA,EAAMC,IAAA,EAAMC,SAAA,CAAU;EAE7F,oBAAOU,IAAA,CAACd,QAAA;IAASe,KAAA,EAAOH,YAAA;cAAeL;;AACzC;AAEA,OAAO,MAAMS,WAAA,GAAcA,CAAA;EACzB,OAAOlB,KAAA,CAAMmB,GAAG,CAACjB,QAAA;AACnB","ignoreList":[]}

View File

@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _classPrivateFieldGet2;
var _assertClassBrand = require("./assertClassBrand.js");
function _classPrivateFieldGet2(privateMap, receiver) {
return privateMap.get((0, _assertClassBrand.default)(privateMap, receiver));
}
//# sourceMappingURL=classPrivateFieldGet2.js.map

View File

@@ -0,0 +1,42 @@
/*
* 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.
*/
export const normalizeArch = (nodeArchString) => {
// Maps from https://nodejs.org/api/os.html#osarch to arch values in spec:
// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/host.md
switch (nodeArchString) {
case 'arm':
return 'arm32';
case 'ppc':
return 'ppc32';
case 'x64':
return 'amd64';
default:
return nodeArchString;
}
};
export const normalizeType = (nodePlatform) => {
// Maps from https://nodejs.org/api/os.html#osplatform to arch values in spec:
// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/os.md
switch (nodePlatform) {
case 'sunos':
return 'solaris';
case 'win32':
return 'windows';
default:
return nodePlatform;
}
};
//# sourceMappingURL=utils.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"addOriginToSpan.d.ts","sourceRoot":"","sources":["../../../src/utils/addOriginToSpan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,sCAAsC;AACtC,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI,CAEpE"}

View File

@@ -0,0 +1,2 @@
const e=()=>()=>({method:`GET`,path:`/schema/snapshot`});export{e as schemaSnapshot};
//# sourceMappingURL=snapshot.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["_index","require","_index2","toBlock","node","parent","isBlockStatement","blockNodes","isEmptyStatement","isStatement","isFunction","returnStatement","expressionStatement","blockStatement"],"sources":["../../src/converters/toBlock.ts"],"sourcesContent":["import {\n isBlockStatement,\n isFunction,\n isEmptyStatement,\n isStatement,\n} from \"../validators/generated/index.ts\";\nimport {\n returnStatement,\n expressionStatement,\n blockStatement,\n} from \"../builders/generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function toBlock(\n node: t.Statement | t.Expression,\n parent?: t.Node,\n): t.BlockStatement {\n if (isBlockStatement(node)) {\n return node;\n }\n\n let blockNodes: t.Statement[] = [];\n\n if (isEmptyStatement(node)) {\n blockNodes = [];\n } else {\n if (!isStatement(node)) {\n if (isFunction(parent)) {\n node = returnStatement(node);\n } else {\n node = expressionStatement(node);\n }\n }\n\n blockNodes = [node];\n }\n\n return blockStatement(blockNodes);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAMA,IAAAC,OAAA,GAAAD,OAAA;AAOe,SAASE,OAAOA,CAC7BC,IAAgC,EAChCC,MAAe,EACG;EAClB,IAAI,IAAAC,uBAAgB,EAACF,IAAI,CAAC,EAAE;IAC1B,OAAOA,IAAI;EACb;EAEA,IAAIG,UAAyB,GAAG,EAAE;EAElC,IAAI,IAAAC,uBAAgB,EAACJ,IAAI,CAAC,EAAE;IAC1BG,UAAU,GAAG,EAAE;EACjB,CAAC,MAAM;IACL,IAAI,CAAC,IAAAE,kBAAW,EAACL,IAAI,CAAC,EAAE;MACtB,IAAI,IAAAM,iBAAU,EAACL,MAAM,CAAC,EAAE;QACtBD,IAAI,GAAG,IAAAO,uBAAe,EAACP,IAAI,CAAC;MAC9B,CAAC,MAAM;QACLA,IAAI,GAAG,IAAAQ,2BAAmB,EAACR,IAAI,CAAC;MAClC;IACF;IAEAG,UAAU,GAAG,CAACH,IAAI,CAAC;EACrB;EAEA,OAAO,IAAAS,sBAAc,EAACN,UAAU,CAAC;AACnC","ignoreList":[]}

View File

@@ -0,0 +1,274 @@
import { Writer } from './buffer-writer'
const enum code {
startup = 0x70,
query = 0x51,
parse = 0x50,
bind = 0x42,
execute = 0x45,
flush = 0x48,
sync = 0x53,
end = 0x58,
close = 0x43,
describe = 0x44,
copyFromChunk = 0x64,
copyDone = 0x63,
copyFail = 0x66,
}
const writer = new Writer()
const startup = (opts: Record<string, string>): Buffer => {
// protocol version
writer.addInt16(3).addInt16(0)
for (const key of Object.keys(opts)) {
writer.addCString(key).addCString(opts[key])
}
writer.addCString('client_encoding').addCString('UTF8')
const bodyBuffer = writer.addCString('').flush()
// this message is sent without a code
const length = bodyBuffer.length + 4
return new Writer().addInt32(length).add(bodyBuffer).flush()
}
const requestSsl = (): Buffer => {
const response = Buffer.allocUnsafe(8)
response.writeInt32BE(8, 0)
response.writeInt32BE(80877103, 4)
return response
}
const password = (password: string): Buffer => {
return writer.addCString(password).flush(code.startup)
}
const sendSASLInitialResponseMessage = function (mechanism: string, initialResponse: string): Buffer {
// 0x70 = 'p'
writer.addCString(mechanism).addInt32(Buffer.byteLength(initialResponse)).addString(initialResponse)
return writer.flush(code.startup)
}
const sendSCRAMClientFinalMessage = function (additionalData: string): Buffer {
return writer.addString(additionalData).flush(code.startup)
}
const query = (text: string): Buffer => {
return writer.addCString(text).flush(code.query)
}
type ParseOpts = {
name?: string
types?: number[]
text: string
}
const emptyArray: any[] = []
const parse = (query: ParseOpts): Buffer => {
// expect something like this:
// { name: 'queryName',
// text: 'select * from blah',
// types: ['int8', 'bool'] }
// normalize missing query names to allow for null
const name = query.name || ''
if (name.length > 63) {
console.error('Warning! Postgres only supports 63 characters for query names.')
console.error('You supplied %s (%s)', name, name.length)
console.error('This can cause conflicts and silent errors executing queries')
}
const types = query.types || emptyArray
const len = types.length
const buffer = writer
.addCString(name) // name of query
.addCString(query.text) // actual query text
.addInt16(len)
for (let i = 0; i < len; i++) {
buffer.addInt32(types[i])
}
return writer.flush(code.parse)
}
type ValueMapper = (param: any, index: number) => any
type BindOpts = {
portal?: string
binary?: boolean
statement?: string
values?: any[]
// optional map from JS value to postgres value per parameter
valueMapper?: ValueMapper
}
const paramWriter = new Writer()
// make this a const enum so typescript will inline the value
const enum ParamType {
STRING = 0,
BINARY = 1,
}
const writeValues = function (values: any[], valueMapper?: ValueMapper): void {
for (let i = 0; i < values.length; i++) {
const mappedVal = valueMapper ? valueMapper(values[i], i) : values[i]
if (mappedVal == null) {
// add the param type (string) to the writer
writer.addInt16(ParamType.STRING)
// write -1 to the param writer to indicate null
paramWriter.addInt32(-1)
} else if (mappedVal instanceof Buffer) {
// add the param type (binary) to the writer
writer.addInt16(ParamType.BINARY)
// add the buffer to the param writer
paramWriter.addInt32(mappedVal.length)
paramWriter.add(mappedVal)
} else {
// add the param type (string) to the writer
writer.addInt16(ParamType.STRING)
paramWriter.addInt32(Buffer.byteLength(mappedVal))
paramWriter.addString(mappedVal)
}
}
}
const bind = (config: BindOpts = {}): Buffer => {
// normalize config
const portal = config.portal || ''
const statement = config.statement || ''
const binary = config.binary || false
const values = config.values || emptyArray
const len = values.length
writer.addCString(portal).addCString(statement)
writer.addInt16(len)
writeValues(values, config.valueMapper)
writer.addInt16(len)
writer.add(paramWriter.flush())
// all results use the same format code
writer.addInt16(1)
// format code
writer.addInt16(binary ? ParamType.BINARY : ParamType.STRING)
return writer.flush(code.bind)
}
type ExecOpts = {
portal?: string
rows?: number
}
const emptyExecute = Buffer.from([code.execute, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00])
const execute = (config?: ExecOpts): Buffer => {
// this is the happy path for most queries
if (!config || (!config.portal && !config.rows)) {
return emptyExecute
}
const portal = config.portal || ''
const rows = config.rows || 0
const portalLength = Buffer.byteLength(portal)
const len = 4 + portalLength + 1 + 4
// one extra bit for code
const buff = Buffer.allocUnsafe(1 + len)
buff[0] = code.execute
buff.writeInt32BE(len, 1)
buff.write(portal, 5, 'utf-8')
buff[portalLength + 5] = 0 // null terminate portal cString
buff.writeUInt32BE(rows, buff.length - 4)
return buff
}
const cancel = (processID: number, secretKey: number): Buffer => {
const buffer = Buffer.allocUnsafe(16)
buffer.writeInt32BE(16, 0)
buffer.writeInt16BE(1234, 4)
buffer.writeInt16BE(5678, 6)
buffer.writeInt32BE(processID, 8)
buffer.writeInt32BE(secretKey, 12)
return buffer
}
type PortalOpts = {
type: 'S' | 'P'
name?: string
}
const cstringMessage = (code: code, string: string): Buffer => {
const stringLen = Buffer.byteLength(string)
const len = 4 + stringLen + 1
// one extra bit for code
const buffer = Buffer.allocUnsafe(1 + len)
buffer[0] = code
buffer.writeInt32BE(len, 1)
buffer.write(string, 5, 'utf-8')
buffer[len] = 0 // null terminate cString
return buffer
}
const emptyDescribePortal = writer.addCString('P').flush(code.describe)
const emptyDescribeStatement = writer.addCString('S').flush(code.describe)
const describe = (msg: PortalOpts): Buffer => {
return msg.name
? cstringMessage(code.describe, `${msg.type}${msg.name || ''}`)
: msg.type === 'P'
? emptyDescribePortal
: emptyDescribeStatement
}
const close = (msg: PortalOpts): Buffer => {
const text = `${msg.type}${msg.name || ''}`
return cstringMessage(code.close, text)
}
const copyData = (chunk: Buffer): Buffer => {
return writer.add(chunk).flush(code.copyFromChunk)
}
const copyFail = (message: string): Buffer => {
return cstringMessage(code.copyFail, message)
}
const codeOnlyBuffer = (code: code): Buffer => Buffer.from([code, 0x00, 0x00, 0x00, 0x04])
const flushBuffer = codeOnlyBuffer(code.flush)
const syncBuffer = codeOnlyBuffer(code.sync)
const endBuffer = codeOnlyBuffer(code.end)
const copyDoneBuffer = codeOnlyBuffer(code.copyDone)
const serialize = {
startup,
password,
requestSsl,
sendSASLInitialResponseMessage,
sendSCRAMClientFinalMessage,
query,
parse,
bind,
execute,
describe,
close,
flush: () => flushBuffer,
sync: () => syncBuffer,
end: () => endBuffer,
copyData,
copyDone: () => copyDoneBuffer,
copyFail,
cancel,
}
export { serialize }

View File

@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _newArrowCheck;
function _newArrowCheck(innerThis, boundThis) {
if (innerThis !== boundThis) {
throw new TypeError("Cannot instantiate an arrow function");
}
}
//# sourceMappingURL=newArrowCheck.js.map

View File

@@ -0,0 +1,41 @@
import { addDomEvent } from '../events/add-dom-event.mjs';
import { Feature } from '../motion/features/Feature.mjs';
import { pipe } from '../utils/pipe.mjs';
class FocusGesture extends Feature {
constructor() {
super(...arguments);
this.isActive = false;
}
onFocus() {
let isFocusVisible = false;
/**
* If this element doesn't match focus-visible then don't
* apply whileHover. But, if matches throws that focus-visible
* is not a valid selector then in that browser outline styles will be applied
* to the element by default and we want to match that behaviour with whileFocus.
*/
try {
isFocusVisible = this.node.current.matches(":focus-visible");
}
catch (e) {
isFocusVisible = true;
}
if (!isFocusVisible || !this.node.animationState)
return;
this.node.animationState.setActive("whileFocus", true);
this.isActive = true;
}
onBlur() {
if (!this.isActive || !this.node.animationState)
return;
this.node.animationState.setActive("whileFocus", false);
this.isActive = false;
}
mount() {
this.unmount = pipe(addDomEvent(this.node.current, "focus", () => this.onFocus()), addDomEvent(this.node.current, "blur", () => this.onBlur()));
}
unmount() { }
}
export { FocusGesture };

View File

@@ -0,0 +1,39 @@
@import '../../../scss/styles.scss';
@layer payload-default {
.multi-value {
&.rs__multi-value {
display: flex;
padding: 0;
border: 1px solid var(--theme-border-color);
border-radius: var(--style-radius-s);
line-height: calc(#{$baseline} - 2px);
margin: base(0.25) base(0.5) base(0.25) 0;
transition: border 0.2s cubic-bezier(0.2, 0, 0, 1);
&:hover {
border: 1px solid var(--theme-elevation-250);
}
}
&--is-dragging {
z-index: 2;
}
}
html[data-theme='light'] {
.multi-value {
&.rs__multi-value {
background: var(--theme-elevation-50);
}
}
}
html[data-theme='dark'] {
.multi-value {
&.rs__multi-value {
background: var(--theme-elevation-50);
}
}
}
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"refresh.js","names":["headers","nextHeaders","createLocalReq","getPayload","refreshOperation","getExistingAuthToken","setPayloadAuthCookie","refresh","config","payload","cron","result","auth","user","Error","existingCookie","cookiePrefix","message","success","collection","collectionConfig","collections","req","refreshResult","authConfig","token","refreshedToken"],"sources":["../../src/auth/refresh.ts"],"sourcesContent":["'use server'\n\nimport type { CollectionSlug, MaybePromise, SanitizedConfig } from 'payload'\n\nimport { headers as nextHeaders } from 'next/headers.js'\nimport { createLocalReq, getPayload, refreshOperation } from 'payload'\n\nimport { getExistingAuthToken } from '../utilities/getExistingAuthToken.js'\nimport { setPayloadAuthCookie } from '../utilities/setPayloadAuthCookie.js'\n\nexport async function refresh({ config }: { config: MaybePromise<SanitizedConfig> }) {\n const payload = await getPayload({ config, cron: true })\n const headers = await nextHeaders()\n const result = await payload.auth({ headers })\n\n if (!result.user) {\n throw new Error('Cannot refresh token: user not authenticated')\n }\n\n const existingCookie = await getExistingAuthToken(payload.config.cookiePrefix)\n if (!existingCookie) {\n return { message: 'No valid token found to refresh', success: false }\n }\n\n const collection: CollectionSlug | undefined = result.user.collection\n const collectionConfig = payload.collections[collection]\n\n if (!collectionConfig?.config.auth) {\n throw new Error(`No auth config found for collection: ${collection}`)\n }\n\n const req = await createLocalReq({ user: result.user }, payload)\n\n const refreshResult = await refreshOperation({\n collection: collectionConfig,\n req,\n })\n\n if (!refreshResult) {\n return { message: 'Token refresh failed', success: false }\n }\n\n await setPayloadAuthCookie({\n authConfig: collectionConfig.config.auth,\n cookiePrefix: payload.config.cookiePrefix,\n token: refreshResult.refreshedToken,\n })\n\n return { message: 'Token refreshed successfully', success: true }\n}\n"],"mappings":"AAAA;;AAIA,SAASA,OAAA,IAAWC,WAAW,QAAQ;AACvC,SAASC,cAAc,EAAEC,UAAU,EAAEC,gBAAgB,QAAQ;AAE7D,SAASC,oBAAoB,QAAQ;AACrC,SAASC,oBAAoB,QAAQ;AAErC,OAAO,eAAeC,QAAQ;EAAEC;AAAM,CAA6C;EACjF,MAAMC,OAAA,GAAU,MAAMN,UAAA,CAAW;IAAEK,MAAA;IAAQE,IAAA,EAAM;EAAK;EACtD,MAAMV,OAAA,GAAU,MAAMC,WAAA;EACtB,MAAMU,MAAA,GAAS,MAAMF,OAAA,CAAQG,IAAI,CAAC;IAAEZ;EAAQ;EAE5C,IAAI,CAACW,MAAA,CAAOE,IAAI,EAAE;IAChB,MAAM,IAAIC,KAAA,CAAM;EAClB;EAEA,MAAMC,cAAA,GAAiB,MAAMV,oBAAA,CAAqBI,OAAA,CAAQD,MAAM,CAACQ,YAAY;EAC7E,IAAI,CAACD,cAAA,EAAgB;IACnB,OAAO;MAAEE,OAAA,EAAS;MAAmCC,OAAA,EAAS;IAAM;EACtE;EAEA,MAAMC,UAAA,GAAyCR,MAAA,CAAOE,IAAI,CAACM,UAAU;EACrE,MAAMC,gBAAA,GAAmBX,OAAA,CAAQY,WAAW,CAACF,UAAA,CAAW;EAExD,IAAI,CAACC,gBAAA,EAAkBZ,MAAA,CAAOI,IAAA,EAAM;IAClC,MAAM,IAAIE,KAAA,CAAM,wCAAwCK,UAAA,EAAY;EACtE;EAEA,MAAMG,GAAA,GAAM,MAAMpB,cAAA,CAAe;IAAEW,IAAA,EAAMF,MAAA,CAAOE;EAAK,GAAGJ,OAAA;EAExD,MAAMc,aAAA,GAAgB,MAAMnB,gBAAA,CAAiB;IAC3Ce,UAAA,EAAYC,gBAAA;IACZE;EACF;EAEA,IAAI,CAACC,aAAA,EAAe;IAClB,OAAO;MAAEN,OAAA,EAAS;MAAwBC,OAAA,EAAS;IAAM;EAC3D;EAEA,MAAMZ,oBAAA,CAAqB;IACzBkB,UAAA,EAAYJ,gBAAA,CAAiBZ,MAAM,CAACI,IAAI;IACxCI,YAAA,EAAcP,OAAA,CAAQD,MAAM,CAACQ,YAAY;IACzCS,KAAA,EAAOF,aAAA,CAAcG;EACvB;EAEA,OAAO;IAAET,OAAA,EAAS;IAAgCC,OAAA,EAAS;EAAK;AAClE","ignoreList":[]}

View File

@@ -0,0 +1,16 @@
import React from 'react';
import type { OnCancel } from '../ConfirmationModal/index.js';
type LeaveWithoutSavingProps = {
disablePreventLeave?: boolean;
modalSlug?: string;
onConfirm?: () => Promise<void> | void;
onPrevent?: (nextHref: null | string) => void;
};
export declare const LeaveWithoutSaving: React.FC<LeaveWithoutSavingProps>;
export declare const LeaveWithoutSavingModal: ({ modalSlug, onCancel, onConfirm, }: {
modalSlug: string;
onCancel?: OnCancel;
onConfirm: () => Promise<void> | void;
}) => React.JSX.Element;
export {};
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,412 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const Dependency = require("../Dependency");
const { UsageState } = require("../ExportsInfo");
const Template = require("../Template");
const { equals } = require("../util/ArrayHelpers");
const makeSerializable = require("../util/makeSerializable");
const propertyAccess = require("../util/propertyAccess");
const { handleDependencyBase } = require("./CommonJsDependencyHelpers");
const ModuleDependency = require("./ModuleDependency");
const processExportInfo = require("./processExportInfo");
/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */
/** @typedef {import("../Dependency").ExportsSpec} ExportsSpec */
/** @typedef {import("../Dependency").RawReferencedExports} RawReferencedExports */
/** @typedef {import("../Dependency").ReferencedExports} ReferencedExports */
/** @typedef {import("../Dependency").TRANSITIVE} TRANSITIVE */
/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */
/** @typedef {import("../ExportsInfo")} ExportsInfo */
/** @typedef {import("../ExportsInfo").ExportInfo} ExportInfo */
/** @typedef {import("../ExportsInfo").ExportInfoName} ExportInfoName */
/** @typedef {import("../Module")} Module */
/** @typedef {import("../ModuleGraph")} ModuleGraph */
/** @typedef {import("../javascript/JavascriptParser").Range} Range */
/** @typedef {import("../serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */
/** @typedef {import("../serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */
/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */
/** @typedef {import("./CommonJsDependencyHelpers").CommonJSDependencyBaseKeywords} CommonJSDependencyBaseKeywords */
const idsSymbol = Symbol("CommonJsExportRequireDependency.ids");
const EMPTY_OBJECT = {};
/** @typedef {Set<string>} Exports */
/** @typedef {Set<string>} Checked */
class CommonJsExportRequireDependency extends ModuleDependency {
/**
* @param {Range} range range
* @param {Range | null} valueRange value range
* @param {CommonJSDependencyBaseKeywords} base base
* @param {ExportInfoName[]} names names
* @param {string} request request
* @param {ExportInfoName[]} ids ids
* @param {boolean} resultUsed true, when the result is used
*/
constructor(range, valueRange, base, names, request, ids, resultUsed) {
super(request);
this.range = range;
this.valueRange = valueRange;
this.base = base;
this.names = names;
this.ids = ids;
this.resultUsed = resultUsed;
/** @type {undefined | boolean} */
this.asiSafe = undefined;
}
get type() {
return "cjs export require";
}
/**
* @returns {boolean | TRANSITIVE} true, when changes to the referenced module could affect the referencing module; TRANSITIVE, when changes to the referenced module could affect referencing modules of the referencing module
*/
couldAffectReferencingModule() {
return Dependency.TRANSITIVE;
}
/**
* @param {ModuleGraph} moduleGraph the module graph
* @returns {ExportInfoName[]} the imported id
*/
getIds(moduleGraph) {
return moduleGraph.getMeta(this)[idsSymbol] || this.ids;
}
/**
* @param {ModuleGraph} moduleGraph the module graph
* @param {ExportInfoName[]} ids the imported ids
* @returns {void}
*/
setIds(moduleGraph, ids) {
moduleGraph.getMeta(this)[idsSymbol] = ids;
}
/**
* Returns list of exports referenced by this dependency
* @param {ModuleGraph} moduleGraph module graph
* @param {RuntimeSpec} runtime the runtime for which the module is analysed
* @returns {ReferencedExports} referenced exports
*/
getReferencedExports(moduleGraph, runtime) {
const ids = this.getIds(moduleGraph);
const getFullResult = () => {
if (ids.length === 0) {
return Dependency.EXPORTS_OBJECT_REFERENCED;
}
return [
{
name: ids,
canMangle: false
}
];
};
if (this.resultUsed) return getFullResult();
/** @type {ExportsInfo | undefined} */
let exportsInfo = moduleGraph.getExportsInfo(
/** @type {Module} */ (moduleGraph.getParentModule(this))
);
for (const name of this.names) {
const exportInfo =
/** @type {ExportInfo} */
(exportsInfo.getReadOnlyExportInfo(name));
const used = exportInfo.getUsed(runtime);
if (used === UsageState.Unused) return Dependency.NO_EXPORTS_REFERENCED;
if (used !== UsageState.OnlyPropertiesUsed) return getFullResult();
exportsInfo = exportInfo.exportsInfo;
if (!exportsInfo) return getFullResult();
}
if (exportsInfo.otherExportsInfo.getUsed(runtime) !== UsageState.Unused) {
return getFullResult();
}
/** @type {RawReferencedExports} */
const referencedExports = [];
for (const exportInfo of exportsInfo.orderedExports) {
processExportInfo(
runtime,
referencedExports,
[...ids, exportInfo.name],
exportInfo,
false
);
}
return referencedExports.map((name) => ({
name,
canMangle: false
}));
}
/**
* Returns the exported names
* @param {ModuleGraph} moduleGraph module graph
* @returns {ExportsSpec | undefined} export names
*/
getExports(moduleGraph) {
if (this.names.length === 1) {
const ids = this.getIds(moduleGraph);
const name = this.names[0];
const from = moduleGraph.getConnection(this);
if (!from) return;
return {
exports: [
{
name,
from,
export: ids.length === 0 ? null : ids,
// we can't mangle names that are in an empty object
// because one could access the prototype property
// when export isn't set yet
canMangle: !(name in EMPTY_OBJECT) && false
}
],
dependencies: [from.module]
};
} else if (this.names.length > 0) {
const name = this.names[0];
return {
exports: [
{
name,
// we can't mangle names that are in an empty object
// because one could access the prototype property
// when export isn't set yet
canMangle: !(name in EMPTY_OBJECT) && false
}
],
dependencies: undefined
};
}
const from = moduleGraph.getConnection(this);
if (!from) return;
const reexportInfo = this.getStarReexports(
moduleGraph,
undefined,
from.module
);
const ids = this.getIds(moduleGraph);
if (reexportInfo) {
return {
exports: Array.from(
/** @type {Exports} */
(reexportInfo.exports),
(name) => ({
name,
from,
export: [...ids, name],
canMangle: !(name in EMPTY_OBJECT) && false
})
),
// TODO handle deep reexports
dependencies: [from.module]
};
}
return {
exports: true,
from: ids.length === 0 ? from : undefined,
canMangle: false,
dependencies: [from.module]
};
}
/**
* @param {ModuleGraph} moduleGraph the module graph
* @param {RuntimeSpec} runtime the runtime
* @param {Module} importedModule the imported module (optional)
* @returns {{ exports?: Exports, checked?: Checked } | undefined} information
*/
getStarReexports(
moduleGraph,
runtime,
importedModule = /** @type {Module} */ (moduleGraph.getModule(this))
) {
/** @type {ExportsInfo | undefined} */
let importedExportsInfo = moduleGraph.getExportsInfo(importedModule);
const ids = this.getIds(moduleGraph);
if (ids.length > 0) {
importedExportsInfo = importedExportsInfo.getNestedExportsInfo(ids);
}
/** @type {ExportsInfo | undefined} */
let exportsInfo = moduleGraph.getExportsInfo(
/** @type {Module} */ (moduleGraph.getParentModule(this))
);
if (this.names.length > 0) {
exportsInfo = exportsInfo.getNestedExportsInfo(this.names);
}
const noExtraExports =
importedExportsInfo &&
importedExportsInfo.otherExportsInfo.provided === false;
const noExtraImports =
exportsInfo &&
exportsInfo.otherExportsInfo.getUsed(runtime) === UsageState.Unused;
if (!noExtraExports && !noExtraImports) {
return;
}
const isNamespaceImport =
importedModule.getExportsType(moduleGraph, false) === "namespace";
/** @type {Exports} */
const exports = new Set();
/** @type {Checked} */
const checked = new Set();
if (noExtraImports) {
for (const exportInfo of /** @type {ExportsInfo} */ (exportsInfo)
.orderedExports) {
const name = exportInfo.name;
if (exportInfo.getUsed(runtime) === UsageState.Unused) continue;
if (name === "__esModule" && isNamespaceImport) {
exports.add(name);
} else if (importedExportsInfo) {
const importedExportInfo =
importedExportsInfo.getReadOnlyExportInfo(name);
if (importedExportInfo.provided === false) continue;
exports.add(name);
if (importedExportInfo.provided === true) continue;
checked.add(name);
} else {
exports.add(name);
checked.add(name);
}
}
} else if (noExtraExports) {
for (const importedExportInfo of /** @type {ExportsInfo} */ (
importedExportsInfo
).orderedExports) {
const name = importedExportInfo.name;
if (importedExportInfo.provided === false) continue;
if (exportsInfo) {
const exportInfo = exportsInfo.getReadOnlyExportInfo(name);
if (exportInfo.getUsed(runtime) === UsageState.Unused) continue;
}
exports.add(name);
if (importedExportInfo.provided === true) continue;
checked.add(name);
}
if (isNamespaceImport) {
exports.add("__esModule");
checked.delete("__esModule");
}
}
return { exports, checked };
}
/**
* @param {ObjectSerializerContext} context context
*/
serialize(context) {
const { write } = context;
write(this.asiSafe);
write(this.range);
write(this.valueRange);
write(this.base);
write(this.names);
write(this.ids);
write(this.resultUsed);
super.serialize(context);
}
/**
* @param {ObjectDeserializerContext} context context
*/
deserialize(context) {
const { read } = context;
this.asiSafe = read();
this.range = read();
this.valueRange = read();
this.base = read();
this.names = read();
this.ids = read();
this.resultUsed = read();
super.deserialize(context);
}
}
makeSerializable(
CommonJsExportRequireDependency,
"webpack/lib/dependencies/CommonJsExportRequireDependency"
);
CommonJsExportRequireDependency.Template = class CommonJsExportRequireDependencyTemplate extends (
ModuleDependency.Template
) {
/**
* @param {Dependency} dependency the dependency for which the template should be applied
* @param {ReplaceSource} source the current replace source which can be modified
* @param {DependencyTemplateContext} templateContext the context object
* @returns {void}
*/
apply(
dependency,
source,
{
module,
runtimeTemplate,
chunkGraph,
moduleGraph,
runtimeRequirements,
runtime
}
) {
const dep = /** @type {CommonJsExportRequireDependency} */ (dependency);
const used = moduleGraph
.getExportsInfo(module)
.getUsedName(dep.names, runtime);
const [type, base] = handleDependencyBase(
dep.base,
module,
runtimeRequirements
);
const importedModule = moduleGraph.getModule(dep);
let requireExpr = runtimeTemplate.moduleExports({
module: importedModule,
chunkGraph,
request: dep.request,
weak: dep.weak,
runtimeRequirements
});
if (importedModule) {
const ids = dep.getIds(moduleGraph);
const usedImported = moduleGraph
.getExportsInfo(importedModule)
.getUsedName(ids, runtime);
if (usedImported) {
const comment = equals(usedImported, ids)
? ""
: `${Template.toNormalComment(propertyAccess(ids))} `;
requireExpr += `${comment}${propertyAccess(usedImported)}`;
}
}
switch (type) {
case "expression":
source.replace(
dep.range[0],
dep.range[1] - 1,
used
? `${base}${propertyAccess(used)} = ${requireExpr}`
: `/* unused reexport */ ${requireExpr}`
);
return;
case "Object.defineProperty":
throw new Error("TODO");
default:
throw new Error("Unexpected type");
}
}
};
module.exports = CommonJsExportRequireDependency;
module.exports.idsSymbol = idsSymbol;

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