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,8 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { addISOWeekYears as fn } from "../addISOWeekYears.mjs";
import { convertToFP } from "./_lib/convertToFP.mjs";
export const addISOWeekYears = convertToFP(fn, 2);
// Fallback for modularized imports:
export default addISOWeekYears;

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 Code = createLucideIcon("Code", [
["polyline", { points: "16 18 22 12 16 6", key: "z7tu5w" }],
["polyline", { points: "8 6 2 12 8 18", key: "1eg1df" }]
]);
export { Code as default };
//# sourceMappingURL=code.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"grid-2x2-plus.js","sources":["../../../src/icons/grid-2x2-plus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Grid2x2Plus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgM3YxN2ExIDEgMCAwIDEtMSAxSDVhMiAyIDAgMCAxLTItMlY1YTIgMiAwIDAgMSAyLTJoMTRhMiAyIDAgMCAxIDIgMnY2YTEgMSAwIDAgMS0xIDFIMyIgLz4KICA8cGF0aCBkPSJNMTYgMTloNiIgLz4KICA8cGF0aCBkPSJNMTkgMjJ2LTYiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/grid-2x2-plus\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 Grid2x2Plus = createLucideIcon('Grid2x2Plus', [\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 19h6', key: 'xwg31i' }],\n ['path', { d: 'M19 22v-6', key: 'qhmiwi' }],\n]);\n\nexport default Grid2x2Plus;\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,CAClD,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,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,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,154 @@
import type { AttachmentType } from './attachment';
import type { SerializedCheckIn } from './checkin';
import type { ClientReport } from './clientreport';
import type { LegacyCSPReport } from './csp';
import type { DsnComponents } from './dsn';
import type { Event } from './event';
import type { FeedbackEvent, UserFeedback } from './feedback';
import type { SerializedLogContainer } from './log';
import type { SerializedMetricContainer } from './metric';
import type { Profile, ProfileChunk } from './profiling';
import type { ReplayEvent, ReplayRecordingData } from './replay';
import type { SdkInfo } from './sdkinfo';
import type { SerializedSession, SessionAggregates } from './session';
import type { SpanJSON } from './span';
export type DynamicSamplingContext = {
trace_id: string;
public_key: DsnComponents['publicKey'];
sample_rate?: string;
release?: string;
environment?: string;
transaction?: string;
replay_id?: string;
sampled?: string;
sample_rand?: string;
org_id?: string;
};
export type EnvelopeItemType = 'client_report' | 'user_report' | 'feedback' | 'session' | 'sessions' | 'transaction' | 'attachment' | 'event' | 'profile' | 'profile_chunk' | 'replay_event' | 'replay_recording' | 'check_in' | 'span' | 'log' | 'metric' | 'trace_metric' | 'raw_security';
export type BaseEnvelopeHeaders = {
[key: string]: unknown;
dsn?: string;
sdk?: SdkInfo;
};
export type BaseEnvelopeItemHeaders = {
[key: string]: unknown;
type: EnvelopeItemType;
length?: number;
};
type BaseEnvelopeItem<ItemHeader, P> = [ItemHeader & BaseEnvelopeItemHeaders, P];
type BaseEnvelope<EnvelopeHeader, Item> = [
EnvelopeHeader & BaseEnvelopeHeaders,
Array<Item & BaseEnvelopeItem<BaseEnvelopeItemHeaders, unknown>>
];
type EventItemHeaders = {
type: 'event' | 'transaction' | 'profile' | 'feedback';
};
type AttachmentItemHeaders = {
type: 'attachment';
length: number;
filename: string;
content_type?: string;
attachment_type?: AttachmentType;
};
type UserFeedbackItemHeaders = {
type: 'user_report';
};
type FeedbackItemHeaders = {
type: 'feedback';
};
type SessionItemHeaders = {
type: 'session';
};
type SessionAggregatesItemHeaders = {
type: 'sessions';
};
type ClientReportItemHeaders = {
type: 'client_report';
};
type ReplayEventItemHeaders = {
type: 'replay_event';
};
type ReplayRecordingItemHeaders = {
type: 'replay_recording';
length: number;
};
type CheckInItemHeaders = {
type: 'check_in';
};
type ProfileItemHeaders = {
type: 'profile';
};
type ProfileChunkItemHeaders = {
type: 'profile_chunk';
};
type SpanItemHeaders = {
type: 'span';
};
type LogContainerItemHeaders = {
type: 'log';
/**
* The number of log items in the container. This must be the same as the number of log items in the payload.
*/
item_count: number;
/**
* The content type of the log items. This must be `application/vnd.sentry.items.log+json`.
*/
content_type: 'application/vnd.sentry.items.log+json';
};
type MetricContainerItemHeaders = {
type: 'trace_metric';
item_count: number;
content_type: 'application/vnd.sentry.items.trace-metric+json';
};
type RawSecurityHeaders = {
type: 'raw_security';
sentry_release?: string;
sentry_environment?: string;
};
export type EventItem = BaseEnvelopeItem<EventItemHeaders, Event>;
export type AttachmentItem = BaseEnvelopeItem<AttachmentItemHeaders, string | Uint8Array>;
export type UserFeedbackItem = BaseEnvelopeItem<UserFeedbackItemHeaders, UserFeedback>;
export type SessionItem = BaseEnvelopeItem<SessionItemHeaders, SerializedSession> | BaseEnvelopeItem<SessionAggregatesItemHeaders, SessionAggregates>;
export type ClientReportItem = BaseEnvelopeItem<ClientReportItemHeaders, ClientReport>;
export type CheckInItem = BaseEnvelopeItem<CheckInItemHeaders, SerializedCheckIn>;
type ReplayEventItem = BaseEnvelopeItem<ReplayEventItemHeaders, ReplayEvent>;
type ReplayRecordingItem = BaseEnvelopeItem<ReplayRecordingItemHeaders, ReplayRecordingData>;
export type FeedbackItem = BaseEnvelopeItem<FeedbackItemHeaders, FeedbackEvent>;
export type ProfileItem = BaseEnvelopeItem<ProfileItemHeaders, Profile>;
export type ProfileChunkItem = BaseEnvelopeItem<ProfileChunkItemHeaders, ProfileChunk>;
export type SpanItem = BaseEnvelopeItem<SpanItemHeaders, Partial<SpanJSON>>;
export type LogContainerItem = BaseEnvelopeItem<LogContainerItemHeaders, SerializedLogContainer>;
export type MetricContainerItem = BaseEnvelopeItem<MetricContainerItemHeaders, SerializedMetricContainer>;
export type RawSecurityItem = BaseEnvelopeItem<RawSecurityHeaders, LegacyCSPReport>;
export type EventEnvelopeHeaders = {
event_id: string;
sent_at: string;
trace?: Partial<DynamicSamplingContext>;
};
type SessionEnvelopeHeaders = {
sent_at: string;
};
type CheckInEnvelopeHeaders = {
trace?: DynamicSamplingContext;
};
type ClientReportEnvelopeHeaders = BaseEnvelopeHeaders;
type ReplayEnvelopeHeaders = BaseEnvelopeHeaders;
type SpanEnvelopeHeaders = BaseEnvelopeHeaders & {
trace?: DynamicSamplingContext;
};
type LogEnvelopeHeaders = BaseEnvelopeHeaders;
type MetricEnvelopeHeaders = BaseEnvelopeHeaders;
export type EventEnvelope = BaseEnvelope<EventEnvelopeHeaders, EventItem | AttachmentItem | UserFeedbackItem | FeedbackItem | ProfileItem>;
export type SessionEnvelope = BaseEnvelope<SessionEnvelopeHeaders, SessionItem>;
export type ClientReportEnvelope = BaseEnvelope<ClientReportEnvelopeHeaders, ClientReportItem>;
export type ReplayEnvelope = [ReplayEnvelopeHeaders, [ReplayEventItem, ReplayRecordingItem]];
export type CheckInEnvelope = BaseEnvelope<CheckInEnvelopeHeaders, CheckInItem>;
export type SpanEnvelope = BaseEnvelope<SpanEnvelopeHeaders, SpanItem>;
export type ProfileChunkEnvelope = BaseEnvelope<BaseEnvelopeHeaders, ProfileChunkItem>;
export type RawSecurityEnvelope = BaseEnvelope<BaseEnvelopeHeaders, RawSecurityItem>;
export type LogEnvelope = BaseEnvelope<LogEnvelopeHeaders, LogContainerItem>;
export type MetricEnvelope = BaseEnvelope<MetricEnvelopeHeaders, MetricContainerItem>;
export type Envelope = EventEnvelope | SessionEnvelope | ClientReportEnvelope | ProfileChunkEnvelope | ReplayEnvelope | CheckInEnvelope | SpanEnvelope | RawSecurityEnvelope | LogEnvelope | MetricEnvelope;
export type EnvelopeItem = Envelope[1][number];
export {};
//# sourceMappingURL=envelope.d.ts.map

View File

@@ -0,0 +1,21 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
*/
import type {Doc} from 'yjs';
type CollaborationContextType = {
clientID: number,
color: string,
isCollabActive: boolean,
name: string,
yjsDocMap: Map<string, Doc>,
};
declare export var CollaborationContext: React.Context<CollaborationContextType>;
declare export function useCollaborationContext(): CollaborationContextType;

View File

@@ -0,0 +1,20 @@
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
import { GraphQLInstrumentationConfig, GraphQLInstrumentationParsedConfig } from './types';
export declare class GraphQLInstrumentation extends InstrumentationBase<GraphQLInstrumentationParsedConfig> {
constructor(config?: GraphQLInstrumentationConfig);
setConfig(config?: GraphQLInstrumentationConfig): void;
protected init(): InstrumentationNodeModuleDefinition;
private _addPatchingExecute;
private _addPatchingParser;
private _addPatchingValidate;
private _patchExecute;
private _handleExecutionResult;
private _executeResponseHook;
private _patchParse;
private _patchValidate;
private _parse;
private _validate;
private _createExecuteSpan;
private _wrapExecuteArgs;
}
//# sourceMappingURL=instrumentation.d.ts.map

View File

@@ -0,0 +1,79 @@
'use strict';
// do not edit .js files directly - edit src/index.jst
var envHasBigInt64Array = typeof BigInt64Array !== 'undefined';
module.exports = function equal(a, b) {
if (a === b) return true;
if (a && b && typeof a == 'object' && typeof b == 'object') {
if (a.constructor !== b.constructor) return false;
var length, i, keys;
if (Array.isArray(a)) {
length = a.length;
if (length != b.length) return false;
for (i = length; i-- !== 0;)
if (!equal(a[i], b[i])) return false;
return true;
}
if ((a instanceof Map) && (b instanceof Map)) {
if (a.size !== b.size) return false;
for (i of a.entries())
if (!b.has(i[0])) return false;
for (i of a.entries())
if (!equal(i[1], b.get(i[0]))) return false;
return true;
}
if ((a instanceof Set) && (b instanceof Set)) {
if (a.size !== b.size) return false;
for (i of a.entries())
if (!b.has(i[0])) return false;
return true;
}
if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
length = a.length;
if (length != b.length) return false;
for (i = length; i-- !== 0;)
if (a[i] !== b[i]) return false;
return true;
}
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
keys = Object.keys(a);
length = keys.length;
if (length !== Object.keys(b).length) return false;
for (i = length; i-- !== 0;)
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
for (i = length; i-- !== 0;) {
var key = keys[i];
if (key === '_owner' && a.$$typeof) {
// React-specific: avoid traversing React elements' _owner.
// _owner contains circular references
// and is not needed when comparing the actual elements (and not their owners)
continue;
}
if (!equal(a[key], b[key])) return false;
}
return true;
}
// true if both NaN, false otherwise
return a!==a && b!==b;
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"fieldErrors.js","names":["c","_c","React","groupSimilarErrors","items","result","item","parts","split","inserted","i","length","startsWith","splice","push","createErrorsFromMessage","message","intro","errorsString","errors","map","error","replaceAll","trim","FieldErrorsToast","t0","$","errorMessage","t1","t2","useState","t3","_jsxs","children","Array","isArray","_jsx","_temp","index"],"sources":["../../../src/elements/Toasts/fieldErrors.tsx"],"sourcesContent":["'use client'\n\nimport React from 'react'\n\nfunction groupSimilarErrors(items: string[]): string[] {\n const result: string[] = []\n\n for (const item of items) {\n if (item) {\n const parts = item.split(' → ')\n let inserted = false\n\n // Find a place where a similar path exists\n for (let i = 0; i < result.length; i++) {\n if (result[i].startsWith(parts[0])) {\n result.splice(i + 1, 0, item)\n inserted = true\n break\n }\n }\n\n // If no similar path was found, add to the end\n if (!inserted) {\n result.push(item)\n }\n }\n }\n\n return result\n}\n\nfunction createErrorsFromMessage(message: string): {\n errors?: string[]\n message: string\n} {\n const [intro, errorsString] = message.split(':')\n\n if (!errorsString) {\n return {\n message: intro,\n }\n }\n\n const errors = errorsString.split(',').map((error) => error.replaceAll(' > ', ' → ').trim())\n\n if (errors.length === 1) {\n return {\n errors,\n message: `${intro}: `,\n }\n }\n\n return {\n errors: groupSimilarErrors(errors),\n message: `${intro} (${errors.length}):`,\n }\n}\n\nexport function FieldErrorsToast({ errorMessage }) {\n const [{ errors, message }] = React.useState(() => createErrorsFromMessage(errorMessage))\n\n return (\n <div>\n {message}\n {Array.isArray(errors) && errors.length > 0 ? (\n errors.length === 1 ? (\n <span data-testid=\"field-error\">{errors[0]}</span>\n ) : (\n <ul data-testid=\"field-errors\">\n {errors.map((error, index) => {\n return <li key={index}>{error}</li>\n })}\n </ul>\n )\n ) : null}\n </div>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAEA,OAAOC,KAAA,MAAW;AAElB,SAASC,mBAAmBC,KAAe;EACzC,MAAMC,MAAA,GAAmB,EAAE;EAE3B,KAAK,MAAMC,IAAA,IAAQF,KAAA,EAAO;IACxB,IAAIE,IAAA,EAAM;MACR,MAAMC,KAAA,GAAQD,IAAA,CAAKE,KAAK,CAAC;MACzB,IAAIC,QAAA,GAAW;MAEf;MACA,KAAK,IAAIC,CAAA,GAAI,GAAGA,CAAA,GAAIL,MAAA,CAAOM,MAAM,EAAED,CAAA,IAAK;QACtC,IAAIL,MAAM,CAACK,CAAA,CAAE,CAACE,UAAU,CAACL,KAAK,CAAC,EAAE,GAAG;UAClCF,MAAA,CAAOQ,MAAM,CAACH,CAAA,GAAI,GAAG,GAAGJ,IAAA;UACxBG,QAAA,GAAW;UACX;QACF;MACF;MAEA;MACA,IAAI,CAACA,QAAA,EAAU;QACbJ,MAAA,CAAOS,IAAI,CAACR,IAAA;MACd;IACF;EACF;EAEA,OAAOD,MAAA;AACT;AAEA,SAASU,wBAAwBC,OAAe;EAI9C,MAAM,CAACC,KAAA,EAAOC,YAAA,CAAa,GAAGF,OAAA,CAAQR,KAAK,CAAC;EAE5C,IAAI,CAACU,YAAA,EAAc;IACjB,OAAO;MACLF,OAAA,EAASC;IACX;EACF;EAEA,MAAME,MAAA,GAASD,YAAA,CAAaV,KAAK,CAAC,KAAKY,GAAG,CAAEC,KAAA,IAAUA,KAAA,CAAMC,UAAU,CAAC,OAAO,OAAOC,IAAI;EAEzF,IAAIJ,MAAA,CAAOR,MAAM,KAAK,GAAG;IACvB,OAAO;MACLQ,MAAA;MACAH,OAAA,EAAS,GAAGC,KAAA;IACd;EACF;EAEA,OAAO;IACLE,MAAA,EAAQhB,kBAAA,CAAmBgB,MAAA;IAC3BH,OAAA,EAAS,GAAGC,KAAA,KAAUE,MAAA,CAAOR,MAAM;EACrC;AACF;AAEA,OAAO,SAAAa,iBAAAC,EAAA;EAAA,MAAAC,CAAA,GAAAzB,EAAA;EAA0B;IAAA0B;EAAA,IAAAF,EAAgB;EAAA,IAAAG,EAAA;EAAA,IAAAF,CAAA,QAAAC,YAAA;IACFC,EAAA,GAAAA,CAAA,KAAMb,uBAAA,CAAwBY,YAAA;IAAAD,CAAA,MAAAC,YAAA;IAAAD,CAAA,MAAAE,EAAA;EAAA;IAAAA,EAAA,GAAAF,CAAA;EAAA;EAA3E,OAAAG,EAAA,IAA8B3B,KAAA,CAAA4B,QAAA,CAAeF,EAA8B;EAApE;IAAAT,MAAA;IAAAH;EAAA,IAAAa,EAAmB;EAAA,IAAAE,EAAA;EAAA,IAAAL,CAAA,QAAAP,MAAA,IAAAO,CAAA,QAAAV,OAAA;IAGxBe,EAAA,GAAAC,KAAA,CAAC;MAAAC,QAAA,GACEjB,OAAA,EACAkB,KAAA,CAAAC,OAAA,CAAchB,MAAA,KAAWA,MAAA,CAAAR,MAAA,IAAgB,GACxCQ,MAAA,CAAAR,MAAA,MAAkB,GAChByB,IAAA,CAAC;QAAA,eAAiB;QAAAH,QAAA,EAAed,MAAM;MAAA,C,IAEvCiB,IAAA,CAAC;QAAA,eAAe;QAAAH,QAAA,EACbd,MAAA,CAAAC,GAAA,CAAAiB,KAED;MAAA,C,QAGF;IAAA,C;;;;;;;SAZNN,E;;AAJG,SAAAM,MAAAhB,KAAA,EAAAiB,KAAA;EAAA,OAYcF,IAAA,CAAC;IAAAH,QAAA,EAAgBZ;EAAA,GAARiB,KAAA;AAAA","ignoreList":[]}

View File

@@ -0,0 +1,13 @@
{
"$id": "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",
"description": "Meta-schema for $data reference (JSON AnySchema extension proposal)",
"type": "object",
"required": ["$data"],
"properties": {
"$data": {
"type": "string",
"anyOf": [{"format": "relative-json-pointer"}, {"format": "json-pointer"}]
}
},
"additionalProperties": false
}

View File

@@ -0,0 +1,106 @@
import { entityKind } from "../entity.js";
import { SelectionProxyHandler } from "../selection-proxy.js";
import { getTableColumns } from "../utils.js";
import { QueryBuilder } from "./query-builders/query-builder.js";
import { sqliteTable } from "./table.js";
import { SQLiteViewBase } from "./view-base.js";
class ViewBuilderCore {
constructor(name) {
this.name = name;
}
static [entityKind] = "SQLiteViewBuilderCore";
config = {};
}
class ViewBuilder extends ViewBuilderCore {
static [entityKind] = "SQLiteViewBuilder";
as(qb) {
if (typeof qb === "function") {
qb = qb(new QueryBuilder());
}
const selectionProxy = new SelectionProxyHandler({
alias: this.name,
sqlBehavior: "error",
sqlAliasedBehavior: "alias",
replaceOriginalName: true
});
const aliasedSelectedFields = qb.getSelectedFields();
return new Proxy(
new SQLiteView({
// sqliteConfig: this.config,
config: {
name: this.name,
schema: void 0,
selectedFields: aliasedSelectedFields,
query: qb.getSQL().inlineParams()
}
}),
selectionProxy
);
}
}
class ManualViewBuilder extends ViewBuilderCore {
static [entityKind] = "SQLiteManualViewBuilder";
columns;
constructor(name, columns) {
super(name);
this.columns = getTableColumns(sqliteTable(name, columns));
}
existing() {
return new Proxy(
new SQLiteView({
config: {
name: this.name,
schema: void 0,
selectedFields: this.columns,
query: void 0
}
}),
new SelectionProxyHandler({
alias: this.name,
sqlBehavior: "error",
sqlAliasedBehavior: "alias",
replaceOriginalName: true
})
);
}
as(query) {
return new Proxy(
new SQLiteView({
config: {
name: this.name,
schema: void 0,
selectedFields: this.columns,
query: query.inlineParams()
}
}),
new SelectionProxyHandler({
alias: this.name,
sqlBehavior: "error",
sqlAliasedBehavior: "alias",
replaceOriginalName: true
})
);
}
}
class SQLiteView extends SQLiteViewBase {
static [entityKind] = "SQLiteView";
constructor({ config }) {
super(config);
}
}
function sqliteView(name, selection) {
if (selection) {
return new ManualViewBuilder(name, selection);
}
return new ViewBuilder(name);
}
const view = sqliteView;
export {
ManualViewBuilder,
SQLiteView,
ViewBuilder,
ViewBuilderCore,
sqliteView,
view
};
//# sourceMappingURL=view.js.map

View File

@@ -0,0 +1,419 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const Source = require("./Source");
const streamAndGetSourceAndMap = require("./helpers/streamAndGetSourceAndMap");
const streamChunksOfRawSource = require("./helpers/streamChunksOfRawSource");
const streamChunksOfSourceMap = require("./helpers/streamChunksOfSourceMap");
const {
isDualStringBufferCachingEnabled,
} = require("./helpers/stringBufferUtils");
/** @typedef {import("./Source").HashLike} HashLike */
/** @typedef {import("./Source").MapOptions} MapOptions */
/** @typedef {import("./Source").RawSourceMap} RawSourceMap */
/** @typedef {import("./Source").SourceAndMap} SourceAndMap */
/** @typedef {import("./Source").SourceValue} SourceValue */
/** @typedef {import("./helpers/getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
/** @typedef {import("./helpers/streamChunks").OnChunk} OnChunk */
/** @typedef {import("./helpers/streamChunks").OnName} OnName */
/** @typedef {import("./helpers/streamChunks").OnSource} OnSource */
/** @typedef {import("./helpers/streamChunks").Options} Options */
/**
* @typedef {object} BufferedMap
* @property {number} version version
* @property {string[]} sources sources
* @property {string[]} names name
* @property {string=} sourceRoot source root
* @property {(Buffer | "")[]=} sourcesContent sources content
* @property {Buffer=} mappings mappings
* @property {string} file file
*/
/**
* @param {null | RawSourceMap} map map
* @returns {null | BufferedMap} buffered map
*/
const mapToBufferedMap = (map) => {
if (typeof map !== "object" || !map) return map;
const bufferedMap =
/** @type {BufferedMap} */
(/** @type {unknown} */ ({ ...map }));
if (map.mappings) {
bufferedMap.mappings = Buffer.from(map.mappings, "utf8");
}
if (map.sourcesContent) {
bufferedMap.sourcesContent = map.sourcesContent.map(
(str) => str && Buffer.from(str, "utf8"),
);
}
return bufferedMap;
};
/**
* @param {null | BufferedMap} bufferedMap buffered map
* @returns {null | RawSourceMap} map
*/
const bufferedMapToMap = (bufferedMap) => {
if (typeof bufferedMap !== "object" || !bufferedMap) return bufferedMap;
const map =
/** @type {RawSourceMap} */
(/** @type {unknown} */ ({ ...bufferedMap }));
if (bufferedMap.mappings) {
map.mappings = bufferedMap.mappings.toString("utf8");
}
if (bufferedMap.sourcesContent) {
map.sourcesContent = bufferedMap.sourcesContent.map(
(buffer) => buffer && buffer.toString("utf8"),
);
}
return map;
};
/** @typedef {{ map?: null | RawSourceMap, bufferedMap?: null | BufferedMap }} BufferEntry */
/** @typedef {Map<string, BufferEntry>} BufferedMaps */
/**
* @typedef {object} CachedData
* @property {boolean=} source source
* @property {Buffer} buffer buffer
* @property {number=} size size
* @property {BufferedMaps} maps maps
* @property {(string | Buffer)[]=} hash hash
*/
class CachedSource extends Source {
/**
* @param {Source | (() => Source)} source source
* @param {CachedData=} cachedData cached data
*/
constructor(source, cachedData) {
super();
/**
* @private
* @type {Source | (() => Source)}
*/
this._source = source;
/**
* @private
* @type {boolean | undefined}
*/
this._cachedSourceType = cachedData ? cachedData.source : undefined;
/**
* @private
* @type {undefined | string}
*/
this._cachedSource = undefined;
/**
* @private
* @type {Buffer | undefined}
*/
this._cachedBuffer = cachedData ? cachedData.buffer : undefined;
/**
* @private
* @type {number | undefined}
*/
this._cachedSize = cachedData ? cachedData.size : undefined;
/**
* @private
* @type {BufferedMaps}
*/
this._cachedMaps = cachedData ? cachedData.maps : new Map();
/**
* @private
* @type {(string | Buffer)[] | undefined}
*/
this._cachedHashUpdate = cachedData ? cachedData.hash : undefined;
}
/**
* @returns {CachedData} cached data
*/
getCachedData() {
/** @type {BufferedMaps} */
const bufferedMaps = new Map();
for (const pair of this._cachedMaps) {
const [, cacheEntry] = pair;
if (cacheEntry.bufferedMap === undefined) {
cacheEntry.bufferedMap = mapToBufferedMap(
this._getMapFromCacheEntry(cacheEntry),
);
}
bufferedMaps.set(pair[0], {
map: undefined,
bufferedMap: cacheEntry.bufferedMap,
});
}
return {
// We don't want to cache strings
// So if we have a caches sources
// create a buffer from it and only store
// if it was a Buffer or string
buffer: this._cachedSource
? this.buffer()
: /** @type {Buffer} */ (this._cachedBuffer),
source:
this._cachedSourceType !== undefined
? this._cachedSourceType
: typeof this._cachedSource === "string"
? true
: Buffer.isBuffer(this._cachedSource)
? false
: undefined,
size: this._cachedSize,
maps: bufferedMaps,
hash: this._cachedHashUpdate,
};
}
originalLazy() {
return this._source;
}
original() {
if (typeof this._source === "function") this._source = this._source();
return this._source;
}
/**
* @returns {SourceValue} source
*/
source() {
const source = this._getCachedSource();
if (source !== undefined) return source;
return (this._cachedSource =
/** @type {string} */
(this.original().source()));
}
/**
* @private
* @param {BufferEntry} cacheEntry cache entry
* @returns {null | RawSourceMap} raw source map
*/
_getMapFromCacheEntry(cacheEntry) {
if (cacheEntry.map !== undefined) {
return cacheEntry.map;
} else if (cacheEntry.bufferedMap !== undefined) {
return (cacheEntry.map = bufferedMapToMap(cacheEntry.bufferedMap));
}
return null;
}
/**
* @private
* @returns {undefined | string} cached source
*/
_getCachedSource() {
if (this._cachedSource !== undefined) return this._cachedSource;
if (this._cachedBuffer && this._cachedSourceType !== undefined) {
const value = this._cachedSourceType
? this._cachedBuffer.toString("utf8")
: this._cachedBuffer;
if (isDualStringBufferCachingEnabled()) {
this._cachedSource = /** @type {string} */ (value);
}
return /** @type {string} */ (value);
}
}
/**
* @returns {Buffer} buffer
*/
buffer() {
if (this._cachedBuffer !== undefined) return this._cachedBuffer;
if (this._cachedSource !== undefined) {
const value = Buffer.isBuffer(this._cachedSource)
? this._cachedSource
: Buffer.from(this._cachedSource, "utf8");
if (isDualStringBufferCachingEnabled()) {
this._cachedBuffer = value;
}
return value;
}
if (typeof this.original().buffer === "function") {
return (this._cachedBuffer = this.original().buffer());
}
const bufferOrString = this.source();
if (Buffer.isBuffer(bufferOrString)) {
return (this._cachedBuffer = bufferOrString);
}
const value = Buffer.from(bufferOrString, "utf8");
if (isDualStringBufferCachingEnabled()) {
this._cachedBuffer = value;
}
return value;
}
/**
* @returns {number} size
*/
size() {
if (this._cachedSize !== undefined) return this._cachedSize;
if (this._cachedBuffer !== undefined) {
return (this._cachedSize = this._cachedBuffer.length);
}
const source = this._getCachedSource();
if (source !== undefined) {
return (this._cachedSize = Buffer.byteLength(source));
}
return (this._cachedSize = this.original().size());
}
/**
* @param {MapOptions=} options map options
* @returns {SourceAndMap} source and map
*/
sourceAndMap(options) {
const key = options ? JSON.stringify(options) : "{}";
const cacheEntry = this._cachedMaps.get(key);
// Look for a cached map
if (cacheEntry !== undefined) {
// We have a cached map in some representation
const map = this._getMapFromCacheEntry(cacheEntry);
// Either get the cached source or compute it
return { source: this.source(), map };
}
// Look for a cached source
let source = this._getCachedSource();
// Compute the map
let map;
if (source !== undefined) {
map = this.original().map(options);
} else {
// Compute the source and map together.
const sourceAndMap = this.original().sourceAndMap(options);
source = /** @type {string} */ (sourceAndMap.source);
map = sourceAndMap.map;
this._cachedSource = source;
}
this._cachedMaps.set(key, {
map,
bufferedMap: undefined,
});
return { source, map };
}
/**
* @param {Options} options options
* @param {OnChunk} onChunk called for each chunk of code
* @param {OnSource} onSource called for each source
* @param {OnName} onName called for each name
* @returns {GeneratedSourceInfo} generated source info
*/
streamChunks(options, onChunk, onSource, onName) {
const key = options ? JSON.stringify(options) : "{}";
if (
this._cachedMaps.has(key) &&
(this._cachedBuffer !== undefined || this._cachedSource !== undefined)
) {
const { source, map } = this.sourceAndMap(options);
if (map) {
return streamChunksOfSourceMap(
/** @type {string} */
(source),
map,
onChunk,
onSource,
onName,
Boolean(options && options.finalSource),
true,
);
}
return streamChunksOfRawSource(
/** @type {string} */
(source),
onChunk,
onSource,
onName,
Boolean(options && options.finalSource),
);
}
const sourceAndMap = streamAndGetSourceAndMap(
this.original(),
options,
onChunk,
onSource,
onName,
);
this._cachedSource = sourceAndMap.source;
this._cachedMaps.set(key, {
map: /** @type {RawSourceMap} */ (sourceAndMap.map),
bufferedMap: undefined,
});
return sourceAndMap.result;
}
/**
* @param {MapOptions=} options map options
* @returns {RawSourceMap | null} map
*/
map(options) {
const key = options ? JSON.stringify(options) : "{}";
const cacheEntry = this._cachedMaps.get(key);
if (cacheEntry !== undefined) {
return this._getMapFromCacheEntry(cacheEntry);
}
const map = this.original().map(options);
this._cachedMaps.set(key, {
map,
bufferedMap: undefined,
});
return map;
}
/**
* @param {HashLike} hash hash
* @returns {void}
*/
updateHash(hash) {
if (this._cachedHashUpdate !== undefined) {
for (const item of this._cachedHashUpdate) hash.update(item);
return;
}
/** @type {(string | Buffer)[]} */
const update = [];
/** @type {string | undefined} */
let currentString;
const tracker = {
/**
* @param {string | Buffer} item item
* @returns {void}
*/
update: (item) => {
if (typeof item === "string" && item.length < 10240) {
if (currentString === undefined) {
currentString = item;
} else {
currentString += item;
if (currentString.length > 102400) {
update.push(Buffer.from(currentString));
currentString = undefined;
}
}
} else {
if (currentString !== undefined) {
update.push(Buffer.from(currentString));
currentString = undefined;
}
update.push(item);
}
},
};
this.original().updateHash(/** @type {HashLike} */ (tracker));
if (currentString !== undefined) {
update.push(Buffer.from(currentString));
}
for (const item of update) hash.update(item);
this._cachedHashUpdate = update;
}
}
module.exports = CachedSource;

View File

@@ -0,0 +1,344 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.estreeWalker = {}));
}(this, (function (exports) { 'use strict';
// @ts-check
/** @typedef { import('estree').BaseNode} BaseNode */
/** @typedef {{
skip: () => void;
remove: () => void;
replace: (node: BaseNode) => void;
}} WalkerContext */
class WalkerBase {
constructor() {
/** @type {boolean} */
this.should_skip = false;
/** @type {boolean} */
this.should_remove = false;
/** @type {BaseNode | null} */
this.replacement = null;
/** @type {WalkerContext} */
this.context = {
skip: () => (this.should_skip = true),
remove: () => (this.should_remove = true),
replace: (node) => (this.replacement = node)
};
}
/**
*
* @param {any} parent
* @param {string} prop
* @param {number} index
* @param {BaseNode} node
*/
replace(parent, prop, index, node) {
if (parent) {
if (index !== null) {
parent[prop][index] = node;
} else {
parent[prop] = node;
}
}
}
/**
*
* @param {any} parent
* @param {string} prop
* @param {number} index
*/
remove(parent, prop, index) {
if (parent) {
if (index !== null) {
parent[prop].splice(index, 1);
} else {
delete parent[prop];
}
}
}
}
// @ts-check
/** @typedef { import('estree').BaseNode} BaseNode */
/** @typedef { import('./walker.js').WalkerContext} WalkerContext */
/** @typedef {(
* this: WalkerContext,
* node: BaseNode,
* parent: BaseNode,
* key: string,
* index: number
* ) => void} SyncHandler */
class SyncWalker extends WalkerBase {
/**
*
* @param {SyncHandler} enter
* @param {SyncHandler} leave
*/
constructor(enter, leave) {
super();
/** @type {SyncHandler} */
this.enter = enter;
/** @type {SyncHandler} */
this.leave = leave;
}
/**
*
* @param {BaseNode} node
* @param {BaseNode} parent
* @param {string} [prop]
* @param {number} [index]
* @returns {BaseNode}
*/
visit(node, parent, prop, index) {
if (node) {
if (this.enter) {
const _should_skip = this.should_skip;
const _should_remove = this.should_remove;
const _replacement = this.replacement;
this.should_skip = false;
this.should_remove = false;
this.replacement = null;
this.enter.call(this.context, node, parent, prop, index);
if (this.replacement) {
node = this.replacement;
this.replace(parent, prop, index, node);
}
if (this.should_remove) {
this.remove(parent, prop, index);
}
const skipped = this.should_skip;
const removed = this.should_remove;
this.should_skip = _should_skip;
this.should_remove = _should_remove;
this.replacement = _replacement;
if (skipped) return node;
if (removed) return null;
}
for (const key in node) {
const value = node[key];
if (typeof value !== "object") {
continue;
} else if (Array.isArray(value)) {
for (let i = 0; i < value.length; i += 1) {
if (value[i] !== null && typeof value[i].type === 'string') {
if (!this.visit(value[i], node, key, i)) {
// removed
i--;
}
}
}
} else if (value !== null && typeof value.type === "string") {
this.visit(value, node, key, null);
}
}
if (this.leave) {
const _replacement = this.replacement;
const _should_remove = this.should_remove;
this.replacement = null;
this.should_remove = false;
this.leave.call(this.context, node, parent, prop, index);
if (this.replacement) {
node = this.replacement;
this.replace(parent, prop, index, node);
}
if (this.should_remove) {
this.remove(parent, prop, index);
}
const removed = this.should_remove;
this.replacement = _replacement;
this.should_remove = _should_remove;
if (removed) return null;
}
}
return node;
}
}
// @ts-check
/** @typedef { import('estree').BaseNode} BaseNode */
/** @typedef { import('./walker').WalkerContext} WalkerContext */
/** @typedef {(
* this: WalkerContext,
* node: BaseNode,
* parent: BaseNode,
* key: string,
* index: number
* ) => Promise<void>} AsyncHandler */
class AsyncWalker extends WalkerBase {
/**
*
* @param {AsyncHandler} enter
* @param {AsyncHandler} leave
*/
constructor(enter, leave) {
super();
/** @type {AsyncHandler} */
this.enter = enter;
/** @type {AsyncHandler} */
this.leave = leave;
}
/**
*
* @param {BaseNode} node
* @param {BaseNode} parent
* @param {string} [prop]
* @param {number} [index]
* @returns {Promise<BaseNode>}
*/
async visit(node, parent, prop, index) {
if (node) {
if (this.enter) {
const _should_skip = this.should_skip;
const _should_remove = this.should_remove;
const _replacement = this.replacement;
this.should_skip = false;
this.should_remove = false;
this.replacement = null;
await this.enter.call(this.context, node, parent, prop, index);
if (this.replacement) {
node = this.replacement;
this.replace(parent, prop, index, node);
}
if (this.should_remove) {
this.remove(parent, prop, index);
}
const skipped = this.should_skip;
const removed = this.should_remove;
this.should_skip = _should_skip;
this.should_remove = _should_remove;
this.replacement = _replacement;
if (skipped) return node;
if (removed) return null;
}
for (const key in node) {
const value = node[key];
if (typeof value !== "object") {
continue;
} else if (Array.isArray(value)) {
for (let i = 0; i < value.length; i += 1) {
if (value[i] !== null && typeof value[i].type === 'string') {
if (!(await this.visit(value[i], node, key, i))) {
// removed
i--;
}
}
}
} else if (value !== null && typeof value.type === "string") {
await this.visit(value, node, key, null);
}
}
if (this.leave) {
const _replacement = this.replacement;
const _should_remove = this.should_remove;
this.replacement = null;
this.should_remove = false;
await this.leave.call(this.context, node, parent, prop, index);
if (this.replacement) {
node = this.replacement;
this.replace(parent, prop, index, node);
}
if (this.should_remove) {
this.remove(parent, prop, index);
}
const removed = this.should_remove;
this.replacement = _replacement;
this.should_remove = _should_remove;
if (removed) return null;
}
}
return node;
}
}
// @ts-check
/** @typedef { import('estree').BaseNode} BaseNode */
/** @typedef { import('./sync.js').SyncHandler} SyncHandler */
/** @typedef { import('./async.js').AsyncHandler} AsyncHandler */
/**
*
* @param {BaseNode} ast
* @param {{
* enter?: SyncHandler
* leave?: SyncHandler
* }} walker
* @returns {BaseNode}
*/
function walk(ast, { enter, leave }) {
const instance = new SyncWalker(enter, leave);
return instance.visit(ast, null);
}
/**
*
* @param {BaseNode} ast
* @param {{
* enter?: AsyncHandler
* leave?: AsyncHandler
* }} walker
* @returns {Promise<BaseNode>}
*/
async function asyncWalk(ast, { enter, leave }) {
const instance = new AsyncWalker(enter, leave);
return await instance.visit(ast, null);
}
exports.asyncWalk = asyncWalk;
exports.walk = walk;
Object.defineProperty(exports, '__esModule', { value: true });
})));

View File

@@ -0,0 +1,64 @@
// The main type definitions. Packages that do not want to pollute the global
// scope with Trusted Types (e.g. libraries whose users may not be using Trusted
// Types) can import the types directly from 'trusted-types/lib'.
export type FnNames = keyof TrustedTypePolicyOptions;
export type Args<Options extends TrustedTypePolicyOptions, K extends FnNames> = Parameters<NonNullable<Options[K]>>;
export class TrustedHTML {
private constructor(); // To prevent instantiting with 'new'.
private brand: true; // To prevent structural typing.
}
export class TrustedScript {
private constructor(); // To prevent instantiting with 'new'.
private brand: true; // To prevent structural typing.
}
export class TrustedScriptURL {
private constructor(); // To prevent instantiting with 'new'.
private brand: true; // To prevent structural typing.
}
export abstract class TrustedTypePolicyFactory {
createPolicy<Options extends TrustedTypePolicyOptions>(
policyName: string,
policyOptions?: Options,
): Pick<TrustedTypePolicy<Options>, "name" | Extract<keyof Options, FnNames>>;
isHTML(value: unknown): value is TrustedHTML;
isScript(value: unknown): value is TrustedScript;
isScriptURL(value: unknown): value is TrustedScriptURL;
readonly emptyHTML: TrustedHTML;
readonly emptyScript: TrustedScript;
getAttributeType(tagName: string, attribute: string, elementNs?: string, attrNs?: string): string | null;
getPropertyType(tagName: string, property: string, elementNs?: string): string | null;
readonly defaultPolicy: TrustedTypePolicy | null;
}
export abstract class TrustedTypePolicy<Options extends TrustedTypePolicyOptions = TrustedTypePolicyOptions> {
readonly name: string;
createHTML(...args: Args<Options, "createHTML">): TrustedHTML;
createScript(...args: Args<Options, "createScript">): TrustedScript;
createScriptURL(...args: Args<Options, "createScriptURL">): TrustedScriptURL;
}
export interface TrustedTypePolicyOptions {
createHTML?: ((input: string, ...arguments: any[]) => string) | undefined;
createScript?: ((input: string, ...arguments: any[]) => string) | undefined;
createScriptURL?: ((input: string, ...arguments: any[]) => string) | undefined;
}
// The Window object is augmented with the following properties in browsers that
// support Trusted Types. Users of the 'trusted-types/lib' entrypoint can cast
// window as TrustedTypesWindow to access these properties.
export interface TrustedTypesWindow {
// `trustedTypes` is left intentionally optional to make sure that
// people handle the case when their code is running in a browser not
// supporting trustedTypes.
trustedTypes?: TrustedTypePolicyFactory | undefined;
TrustedHTML: typeof TrustedHTML;
TrustedScript: typeof TrustedScript;
TrustedScriptURL: typeof TrustedScriptURL;
TrustedTypePolicyFactory: typeof TrustedTypePolicyFactory;
TrustedTypePolicy: typeof TrustedTypePolicy;
}

View File

@@ -0,0 +1,30 @@
"use strict";
exports.isThisMinute = isThisMinute;
var _index = require("./constructNow.js");
var _index2 = require("./isSameMinute.js");
/**
* @name isThisMinute
* @category Minute Helpers
* @summary Is the given date in the same minute as the current date?
* @pure false
*
* @description
* Is the given date in the same minute as the current date?
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The date to check
*
* @returns The date is in this minute
*
* @example
* // If now is 25 September 2014 18:30:15.500,
* // is 25 September 2014 18:30:00 in this minute?
* const result = isThisMinute(new Date(2014, 8, 25, 18, 30))
* //=> true
*/
function isThisMinute(date) {
return (0, _index2.isSameMinute)(date, (0, _index.constructNow)(date));
}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"combineFieldLabel.js","names":["Fragment","RenderCustomComponent","FieldLabel","combineFieldLabel","CustomLabel","field","prefix","_jsxs","_jsx","style","display","CustomComponent","Fallback","label"],"sources":["../../src/utilities/combineFieldLabel.tsx"],"sourcesContent":["import type { ClientField } from 'payload'\n\nimport { Fragment } from 'react'\n\nimport { RenderCustomComponent } from '../elements/RenderCustomComponent/index.js'\nimport { FieldLabel } from '../fields/FieldLabel/index.js'\n\nexport const combineFieldLabel = ({\n CustomLabel,\n field,\n prefix,\n}: {\n CustomLabel?: React.ReactNode\n field?: ClientField\n prefix?: React.ReactNode\n}): React.ReactNode => {\n return (\n <Fragment>\n {prefix ? (\n <Fragment>\n <span style={{ display: 'inline-block' }}>{prefix}</span>\n {' > '}\n </Fragment>\n ) : null}\n <span style={{ display: 'inline-block' }}>\n <RenderCustomComponent\n CustomComponent={CustomLabel}\n Fallback={<FieldLabel label={'label' in field && field.label} />}\n />\n </span>\n </Fragment>\n )\n}\n"],"mappings":";AAEA,SAASA,QAAQ,QAAQ;AAEzB,SAASC,qBAAqB,QAAQ;AACtC,SAASC,UAAU,QAAQ;AAE3B,OAAO,MAAMC,iBAAA,GAAoBA,CAAC;EAChCC,WAAW;EACXC,KAAK;EACLC;AAAM,CAKP;EACC,oBACEC,KAAA,CAACP,QAAA;eACEM,MAAA,gBACCC,KAAA,CAACP,QAAA;8BACCQ,IAAA,CAAC;QAAKC,KAAA,EAAO;UAAEC,OAAA,EAAS;QAAe;kBAAIJ;UAC1C;SAED,M,aACJE,IAAA,CAAC;MAAKC,KAAA,EAAO;QAAEC,OAAA,EAAS;MAAe;gBACrC,aAAAF,IAAA,CAACP,qBAAA;QACCU,eAAA,EAAiBP,WAAA;QACjBQ,QAAA,eAAUJ,IAAA,CAACN,UAAA;UAAWW,KAAA,EAAO,WAAWR,KAAA,IAASA,KAAA,CAAMQ;;;;;AAKjE","ignoreList":[]}

View File

@@ -0,0 +1,259 @@
'use strict'
const { iteratorMixin } = require('./util')
const { kEnumerableProperty } = require('../../core/util')
const { webidl } = require('../webidl')
const nodeUtil = require('node:util')
// https://xhr.spec.whatwg.org/#formdata
class FormData {
#state = []
constructor (form = undefined) {
webidl.util.markAsUncloneable(this)
if (form !== undefined) {
throw webidl.errors.conversionFailed({
prefix: 'FormData constructor',
argument: 'Argument 1',
types: ['undefined']
})
}
}
append (name, value, filename = undefined) {
webidl.brandCheck(this, FormData)
const prefix = 'FormData.append'
webidl.argumentLengthCheck(arguments, 2, prefix)
name = webidl.converters.USVString(name)
if (arguments.length === 3 || webidl.is.Blob(value)) {
value = webidl.converters.Blob(value, prefix, 'value')
if (filename !== undefined) {
filename = webidl.converters.USVString(filename)
}
} else {
value = webidl.converters.USVString(value)
}
// 1. Let value be value if given; otherwise blobValue.
// 2. Let entry be the result of creating an entry with
// name, value, and filename if given.
const entry = makeEntry(name, value, filename)
// 3. Append entry to thiss entry list.
this.#state.push(entry)
}
delete (name) {
webidl.brandCheck(this, FormData)
const prefix = 'FormData.delete'
webidl.argumentLengthCheck(arguments, 1, prefix)
name = webidl.converters.USVString(name)
// The delete(name) method steps are to remove all entries whose name
// is name from thiss entry list.
this.#state = this.#state.filter(entry => entry.name !== name)
}
get (name) {
webidl.brandCheck(this, FormData)
const prefix = 'FormData.get'
webidl.argumentLengthCheck(arguments, 1, prefix)
name = webidl.converters.USVString(name)
// 1. If there is no entry whose name is name in thiss entry list,
// then return null.
const idx = this.#state.findIndex((entry) => entry.name === name)
if (idx === -1) {
return null
}
// 2. Return the value of the first entry whose name is name from
// thiss entry list.
return this.#state[idx].value
}
getAll (name) {
webidl.brandCheck(this, FormData)
const prefix = 'FormData.getAll'
webidl.argumentLengthCheck(arguments, 1, prefix)
name = webidl.converters.USVString(name)
// 1. If there is no entry whose name is name in thiss entry list,
// then return the empty list.
// 2. Return the values of all entries whose name is name, in order,
// from thiss entry list.
return this.#state
.filter((entry) => entry.name === name)
.map((entry) => entry.value)
}
has (name) {
webidl.brandCheck(this, FormData)
const prefix = 'FormData.has'
webidl.argumentLengthCheck(arguments, 1, prefix)
name = webidl.converters.USVString(name)
// The has(name) method steps are to return true if there is an entry
// whose name is name in thiss entry list; otherwise false.
return this.#state.findIndex((entry) => entry.name === name) !== -1
}
set (name, value, filename = undefined) {
webidl.brandCheck(this, FormData)
const prefix = 'FormData.set'
webidl.argumentLengthCheck(arguments, 2, prefix)
name = webidl.converters.USVString(name)
if (arguments.length === 3 || webidl.is.Blob(value)) {
value = webidl.converters.Blob(value, prefix, 'value')
if (filename !== undefined) {
filename = webidl.converters.USVString(filename)
}
} else {
value = webidl.converters.USVString(value)
}
// The set(name, value) and set(name, blobValue, filename) method steps
// are:
// 1. Let value be value if given; otherwise blobValue.
// 2. Let entry be the result of creating an entry with name, value, and
// filename if given.
const entry = makeEntry(name, value, filename)
// 3. If there are entries in thiss entry list whose name is name, then
// replace the first such entry with entry and remove the others.
const idx = this.#state.findIndex((entry) => entry.name === name)
if (idx !== -1) {
this.#state = [
...this.#state.slice(0, idx),
entry,
...this.#state.slice(idx + 1).filter((entry) => entry.name !== name)
]
} else {
// 4. Otherwise, append entry to thiss entry list.
this.#state.push(entry)
}
}
[nodeUtil.inspect.custom] (depth, options) {
const state = this.#state.reduce((a, b) => {
if (a[b.name]) {
if (Array.isArray(a[b.name])) {
a[b.name].push(b.value)
} else {
a[b.name] = [a[b.name], b.value]
}
} else {
a[b.name] = b.value
}
return a
}, { __proto__: null })
options.depth ??= depth
options.colors ??= true
const output = nodeUtil.formatWithOptions(options, state)
// remove [Object null prototype]
return `FormData ${output.slice(output.indexOf(']') + 2)}`
}
/**
* @param {FormData} formData
*/
static getFormDataState (formData) {
return formData.#state
}
/**
* @param {FormData} formData
* @param {any[]} newState
*/
static setFormDataState (formData, newState) {
formData.#state = newState
}
}
const { getFormDataState, setFormDataState } = FormData
Reflect.deleteProperty(FormData, 'getFormDataState')
Reflect.deleteProperty(FormData, 'setFormDataState')
iteratorMixin('FormData', FormData, getFormDataState, 'name', 'value')
Object.defineProperties(FormData.prototype, {
append: kEnumerableProperty,
delete: kEnumerableProperty,
get: kEnumerableProperty,
getAll: kEnumerableProperty,
has: kEnumerableProperty,
set: kEnumerableProperty,
[Symbol.toStringTag]: {
value: 'FormData',
configurable: true
}
})
/**
* @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry
* @param {string} name
* @param {string|Blob} value
* @param {?string} filename
* @returns
*/
function makeEntry (name, value, filename) {
// 1. Set name to the result of converting name into a scalar value string.
// Note: This operation was done by the webidl converter USVString.
// 2. If value is a string, then set value to the result of converting
// value into a scalar value string.
if (typeof value === 'string') {
// Note: This operation was done by the webidl converter USVString.
} else {
// 3. Otherwise:
// 1. If value is not a File object, then set value to a new File object,
// representing the same bytes, whose name attribute value is "blob"
if (!webidl.is.File(value)) {
value = new File([value], 'blob', { type: value.type })
}
// 2. If filename is given, then set value to a new File object,
// representing the same bytes, whose name attribute is filename.
if (filename !== undefined) {
/** @type {FilePropertyBag} */
const options = {
type: value.type,
lastModified: value.lastModified
}
value = new File([value], filename, options)
}
}
// 4. Return an entry whose name is name and whose value is value.
return { name, value }
}
webidl.is.FormData = webidl.util.MakeTypeAssertion(FormData)
module.exports = { FormData, makeEntry, setFormDataState }

View File

@@ -0,0 +1 @@
!function(e){e.languages.erb={delimiter:{pattern:/^(\s*)<%=?|%>(?=\s*$)/,lookbehind:!0,alias:"punctuation"},ruby:{pattern:/\s*\S[\s\S]*/,alias:"language-ruby",inside:e.languages.ruby}},e.hooks.add("before-tokenize",(function(n){e.languages["markup-templating"].buildPlaceholders(n,"erb",/<%=?(?:[^\r\n]|[\r\n](?!=begin)|[\r\n]=begin\s(?:[^\r\n]|[\r\n](?!=end))*[\r\n]=end)+?%>/g)})),e.hooks.add("after-tokenize",(function(n){e.languages["markup-templating"].tokenizePlaceholders(n,"erb")}))}(Prism);

View File

@@ -0,0 +1,27 @@
"use strict";
exports.isFuture = isFuture;
var _index = require("./toDate.js");
/**
* @name isFuture
* @category Common Helpers
* @summary Is the given date in the future?
* @pure false
*
* @description
* Is the given date in the future?
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The date to check
*
* @returns The date is in the future
*
* @example
* // If today is 6 October 2014, is 31 December 2014 in the future?
* const result = isFuture(new Date(2014, 11, 31))
* //=> true
*/
function isFuture(date) {
return +(0, _index.toDate)(date) > Date.now();
}

View File

@@ -0,0 +1,5 @@
declare module 'emoji-regex/es2015' {
function emojiRegex(): RegExp;
export = emojiRegex;
}

View File

@@ -0,0 +1,20 @@
/**
* @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 ScanSearch = createLucideIcon("ScanSearch", [
["path", { d: "M3 7V5a2 2 0 0 1 2-2h2", key: "aa7l1z" }],
["path", { d: "M17 3h2a2 2 0 0 1 2 2v2", key: "4qcy5o" }],
["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2", key: "6vwrx8" }],
["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2", key: "ioqczr" }],
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }],
["path", { d: "m16 16-1.9-1.9", key: "1dq9hf" }]
]);
export { ScanSearch as default };
//# sourceMappingURL=scan-search.js.map

View File

@@ -0,0 +1,316 @@
'use strict';
var React = require('react');
var createCache = require('@emotion/cache');
var _extends = require('@babel/runtime/helpers/extends');
var weakMemoize = require('@emotion/weak-memoize');
var _isolatedHnrs_dist_emotionReact_isolatedHnrs = require('../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.cjs.js');
var utils = require('@emotion/utils');
var serialize = require('@emotion/serialize');
var useInsertionEffectWithFallbacks = require('@emotion/use-insertion-effect-with-fallbacks');
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var React__namespace = /*#__PURE__*/_interopNamespace(React);
var createCache__default = /*#__PURE__*/_interopDefault(createCache);
var weakMemoize__default = /*#__PURE__*/_interopDefault(weakMemoize);
var isBrowser = typeof document !== 'undefined';
var EmotionCacheContext = /* #__PURE__ */React__namespace.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
// because this module is primarily intended for the browser and node
// but it's also required in react native and similar environments sometimes
// and we could have a special build just for that
// but this is much easier and the native packages
// might use a different theme context in the future anyway
typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache__default["default"]({
key: 'css'
}) : null);
{
EmotionCacheContext.displayName = 'EmotionCacheContext';
}
var CacheProvider = EmotionCacheContext.Provider;
var __unsafe_useEmotionCache = function useEmotionCache() {
return React.useContext(EmotionCacheContext);
};
exports.withEmotionCache = function withEmotionCache(func) {
return /*#__PURE__*/React.forwardRef(function (props, ref) {
// the cache will never be null in the browser
var cache = React.useContext(EmotionCacheContext);
return func(props, cache, ref);
});
};
if (!isBrowser) {
exports.withEmotionCache = function withEmotionCache(func) {
return function (props) {
var cache = React.useContext(EmotionCacheContext);
if (cache === null) {
// yes, we're potentially creating this on every render
// it doesn't actually matter though since it's only on the server
// so there will only every be a single render
// that could change in the future because of suspense and etc. but for now,
// this works and i don't want to optimise for a future thing that we aren't sure about
cache = createCache__default["default"]({
key: 'css'
});
return /*#__PURE__*/React__namespace.createElement(EmotionCacheContext.Provider, {
value: cache
}, func(props, cache));
} else {
return func(props, cache);
}
};
};
}
var ThemeContext = /* #__PURE__ */React__namespace.createContext({});
{
ThemeContext.displayName = 'EmotionThemeContext';
}
var useTheme = function useTheme() {
return React__namespace.useContext(ThemeContext);
};
var getTheme = function getTheme(outerTheme, theme) {
if (typeof theme === 'function') {
var mergedTheme = theme(outerTheme);
if ((mergedTheme == null || typeof mergedTheme !== 'object' || Array.isArray(mergedTheme))) {
throw new Error('[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!');
}
return mergedTheme;
}
if ((theme == null || typeof theme !== 'object' || Array.isArray(theme))) {
throw new Error('[ThemeProvider] Please make your theme prop a plain object');
}
return _extends({}, outerTheme, theme);
};
var createCacheWithTheme = /* #__PURE__ */weakMemoize__default["default"](function (outerTheme) {
return weakMemoize__default["default"](function (theme) {
return getTheme(outerTheme, theme);
});
});
var ThemeProvider = function ThemeProvider(props) {
var theme = React__namespace.useContext(ThemeContext);
if (props.theme !== theme) {
theme = createCacheWithTheme(theme)(props.theme);
}
return /*#__PURE__*/React__namespace.createElement(ThemeContext.Provider, {
value: theme
}, props.children);
};
function withTheme(Component) {
var componentName = Component.displayName || Component.name || 'Component';
var WithTheme = /*#__PURE__*/React__namespace.forwardRef(function render(props, ref) {
var theme = React__namespace.useContext(ThemeContext);
return /*#__PURE__*/React__namespace.createElement(Component, _extends({
theme: theme,
ref: ref
}, props));
});
WithTheme.displayName = "WithTheme(" + componentName + ")";
return _isolatedHnrs_dist_emotionReact_isolatedHnrs["default"](WithTheme, Component);
}
var hasOwn = {}.hasOwnProperty;
var getLastPart = function getLastPart(functionName) {
// The match may be something like 'Object.createEmotionProps' or
// 'Loader.prototype.render'
var parts = functionName.split('.');
return parts[parts.length - 1];
};
var getFunctionNameFromStackTraceLine = function getFunctionNameFromStackTraceLine(line) {
// V8
var match = /^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(line);
if (match) return getLastPart(match[1]); // Safari / Firefox
match = /^([A-Za-z0-9$.]+)@/.exec(line);
if (match) return getLastPart(match[1]);
return undefined;
};
var internalReactFunctionNames = /* #__PURE__ */new Set(['renderWithHooks', 'processChild', 'finishClassComponent', 'renderToString']); // These identifiers come from error stacks, so they have to be valid JS
// identifiers, thus we only need to replace what is a valid character for JS,
// but not for CSS.
var sanitizeIdentifier = function sanitizeIdentifier(identifier) {
return identifier.replace(/\$/g, '-');
};
var getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) {
if (!stackTrace) return undefined;
var lines = stackTrace.split('\n');
for (var i = 0; i < lines.length; i++) {
var functionName = getFunctionNameFromStackTraceLine(lines[i]); // The first line of V8 stack traces is just "Error"
if (!functionName) continue; // If we reach one of these, we have gone too far and should quit
if (internalReactFunctionNames.has(functionName)) break; // The component name is the first function in the stack that starts with an
// uppercase letter
if (/^[A-Z]/.test(functionName)) return sanitizeIdentifier(functionName);
}
return undefined;
};
var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
var createEmotionProps = function createEmotionProps(type, props) {
if (typeof props.css === 'string' && // check if there is a css declaration
props.css.indexOf(':') !== -1) {
throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`" + props.css + "`");
}
var newProps = {};
for (var _key in props) {
if (hasOwn.call(props, _key)) {
newProps[_key] = props[_key];
}
}
newProps[typePropName] = type; // Runtime labeling is an opt-in feature because:
// - It causes hydration warnings when using Safari and SSR
// - It can degrade performance if there are a huge number of elements
//
// Even if the flag is set, we still don't compute the label if it has already
// been determined by the Babel plugin.
if (typeof globalThis !== 'undefined' && !!globalThis.EMOTION_RUNTIME_AUTO_LABEL && !!props.css && (typeof props.css !== 'object' || !('name' in props.css) || typeof props.css.name !== 'string' || props.css.name.indexOf('-') === -1)) {
var label = getLabelFromStackTrace(new Error().stack);
if (label) newProps[labelPropName] = label;
}
return newProps;
};
var Insertion = function Insertion(_ref) {
var cache = _ref.cache,
serialized = _ref.serialized,
isStringTag = _ref.isStringTag;
utils.registerStyles(cache, serialized, isStringTag);
var rules = useInsertionEffectWithFallbacks.useInsertionEffectAlwaysWithSyncFallback(function () {
return utils.insertStyles(cache, serialized, isStringTag);
});
if (!isBrowser && rules !== undefined) {
var _ref2;
var serializedNames = serialized.name;
var next = serialized.next;
while (next !== undefined) {
serializedNames += ' ' + next.name;
next = next.next;
}
return /*#__PURE__*/React__namespace.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
__html: rules
}, _ref2.nonce = cache.sheet.nonce, _ref2));
}
return null;
};
var Emotion = /* #__PURE__ */exports.withEmotionCache(function (props, cache, ref) {
var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works
// not passing the registered cache to serializeStyles because it would
// make certain babel optimisations not possible
if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {
cssProp = cache.registered[cssProp];
}
var WrappedComponent = props[typePropName];
var registeredStyles = [cssProp];
var className = '';
if (typeof props.className === 'string') {
className = utils.getRegisteredStyles(cache.registered, registeredStyles, props.className);
} else if (props.className != null) {
className = props.className + " ";
}
var serialized = serialize.serializeStyles(registeredStyles, undefined, React__namespace.useContext(ThemeContext));
if (serialized.name.indexOf('-') === -1) {
var labelFromStack = props[labelPropName];
if (labelFromStack) {
serialized = serialize.serializeStyles([serialized, 'label:' + labelFromStack + ';']);
}
}
className += cache.key + "-" + serialized.name;
var newProps = {};
for (var _key2 in props) {
if (hasOwn.call(props, _key2) && _key2 !== 'css' && _key2 !== typePropName && (_key2 !== labelPropName)) {
newProps[_key2] = props[_key2];
}
}
newProps.className = className;
if (ref) {
newProps.ref = ref;
}
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(Insertion, {
cache: cache,
serialized: serialized,
isStringTag: typeof WrappedComponent === 'string'
}), /*#__PURE__*/React__namespace.createElement(WrappedComponent, newProps));
});
{
Emotion.displayName = 'EmotionCssPropInternal';
}
var Emotion$1 = Emotion;
exports.CacheProvider = CacheProvider;
exports.Emotion = Emotion$1;
exports.ThemeContext = ThemeContext;
exports.ThemeProvider = ThemeProvider;
exports.__unsafe_useEmotionCache = __unsafe_useEmotionCache;
exports.createEmotionProps = createEmotionProps;
exports.hasOwn = hasOwn;
exports.isBrowser = isBrowser;
exports.useTheme = useTheme;
exports.withTheme = withTheme;

View File

@@ -0,0 +1,188 @@
(function (Prism) {
// TODO:
// - Add CSS highlighting inside <style> tags
// - Add support for multi-line code blocks
// - Add support for interpolation #{} and !{}
// - Add support for tag interpolation #[]
// - Add explicit support for plain text using |
// - Add support for markup embedded in plain text
Prism.languages.pug = {
// Multiline stuff should appear before the rest
// This handles both single-line and multi-line comments
'comment': {
pattern: /(^([\t ]*))\/\/.*(?:(?:\r?\n|\r)\2[\t ].+)*/m,
lookbehind: true
},
// All the tag-related part is in lookbehind
// so that it can be highlighted by the "tag" pattern
'multiline-script': {
pattern: /(^([\t ]*)script\b.*\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,
lookbehind: true,
inside: Prism.languages.javascript
},
// See at the end of the file for known filters
'filter': {
pattern: /(^([\t ]*)):.+(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,
lookbehind: true,
inside: {
'filter-name': {
pattern: /^:[\w-]+/,
alias: 'variable'
},
'text': /\S[\s\S]*/,
}
},
'multiline-plain-text': {
pattern: /(^([\t ]*)[\w\-#.]+\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,
lookbehind: true
},
'markup': {
pattern: /(^[\t ]*)<.+/m,
lookbehind: true,
inside: Prism.languages.markup
},
'doctype': {
pattern: /((?:^|\n)[\t ]*)doctype(?: .+)?/,
lookbehind: true
},
// This handle all conditional and loop keywords
'flow-control': {
pattern: /(^[\t ]*)(?:case|default|each|else|if|unless|when|while)\b(?: .+)?/m,
lookbehind: true,
inside: {
'each': {
pattern: /^each .+? in\b/,
inside: {
'keyword': /\b(?:each|in)\b/,
'punctuation': /,/
}
},
'branch': {
pattern: /^(?:case|default|else|if|unless|when|while)\b/,
alias: 'keyword'
},
rest: Prism.languages.javascript
}
},
'keyword': {
pattern: /(^[\t ]*)(?:append|block|extends|include|prepend)\b.+/m,
lookbehind: true
},
'mixin': [
// Declaration
{
pattern: /(^[\t ]*)mixin .+/m,
lookbehind: true,
inside: {
'keyword': /^mixin/,
'function': /\w+(?=\s*\(|\s*$)/,
'punctuation': /[(),.]/
}
},
// Usage
{
pattern: /(^[\t ]*)\+.+/m,
lookbehind: true,
inside: {
'name': {
pattern: /^\+\w+/,
alias: 'function'
},
rest: Prism.languages.javascript
}
}
],
'script': {
pattern: /(^[\t ]*script(?:(?:&[^(]+)?\([^)]+\))*[\t ]).+/m,
lookbehind: true,
inside: Prism.languages.javascript
},
'plain-text': {
pattern: /(^[\t ]*(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?[\t ]).+/m,
lookbehind: true
},
'tag': {
pattern: /(^[\t ]*)(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?:?/m,
lookbehind: true,
inside: {
'attributes': [
{
pattern: /&[^(]+\([^)]+\)/,
inside: Prism.languages.javascript
},
{
pattern: /\([^)]+\)/,
inside: {
'attr-value': {
pattern: /(=\s*(?!\s))(?:\{[^}]*\}|[^,)\r\n]+)/,
lookbehind: true,
inside: Prism.languages.javascript
},
'attr-name': /[\w-]+(?=\s*!?=|\s*[,)])/,
'punctuation': /[!=(),]+/
}
}
],
'punctuation': /:/,
'attr-id': /#[\w\-]+/,
'attr-class': /\.[\w\-]+/
}
},
'code': [
{
pattern: /(^[\t ]*(?:-|!?=)).+/m,
lookbehind: true,
inside: Prism.languages.javascript
}
],
'punctuation': /[.\-!=|]+/
};
var filter_pattern = /(^([\t ]*)):<filter_name>(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/.source;
// Non exhaustive list of available filters and associated languages
var filters = [
{ filter: 'atpl', language: 'twig' },
{ filter: 'coffee', language: 'coffeescript' },
'ejs',
'handlebars',
'less',
'livescript',
'markdown',
{ filter: 'sass', language: 'scss' },
'stylus'
];
var all_filters = {};
for (var i = 0, l = filters.length; i < l; i++) {
var filter = filters[i];
filter = typeof filter === 'string' ? { filter: filter, language: filter } : filter;
if (Prism.languages[filter.language]) {
all_filters['filter-' + filter.filter] = {
pattern: RegExp(filter_pattern.replace('<filter_name>', function () { return filter.filter; }), 'm'),
lookbehind: true,
inside: {
'filter-name': {
pattern: /^:[\w-]+/,
alias: 'variable'
},
'text': {
pattern: /\S[\s\S]*/,
alias: [filter.language, 'language-' + filter.language],
inside: Prism.languages[filter.language]
}
}
};
}
}
Prism.languages.insertBefore('pug', 'filter', all_filters);
}(Prism));

View File

@@ -0,0 +1 @@
{"version":3,"file":"checkFileRestrictions.d.ts","sourceRoot":"","sources":["../../src/uploads/checkFileRestrictions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,2BAA2B,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAS5E;;GAEG;AACH,eAAO,MAAM,6BAA6B,EAAE,aAgC3C,CAAA;AAED,eAAO,MAAM,qBAAqB,+BAI/B,2BAA2B,KAAG,OAAO,CAAC,IAAI,CAuH5C,CAAA"}

View File

@@ -0,0 +1,5 @@
declare const getLoadingMarkup: () => {
script: string;
container: string;
};
export default getLoadingMarkup;

View File

@@ -0,0 +1,31 @@
import { formatDistance } from "./nl-BE/_lib/formatDistance.js";
import { formatLong } from "./nl-BE/_lib/formatLong.js";
import { formatRelative } from "./nl-BE/_lib/formatRelative.js";
import { localize } from "./nl-BE/_lib/localize.js";
import { match } from "./nl-BE/_lib/match.js";
/**
* @category Locales
* @summary Dutch locale.
* @language Dutch
* @iso-639-2 nld
* @author Jorik Tangelder [@jtangelder](https://github.com/jtangelder)
* @author Ruben Stolk [@rubenstolk](https://github.com/rubenstolk)
* @author Lode Vanhove [@bitcrumb](https://github.com/bitcrumb)
* @author Alex Hoeing [@dcbn](https://github.com/dcbn)
*/
export const nlBE = {
code: "nl-BE",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 4,
},
};
// Fallback for modularized imports:
export default nlBE;

View File

@@ -0,0 +1,160 @@
import DataLoader from 'dataloader';
import { isValidID } from '../utilities/isValidID.js';
// Payload uses `dataloader` to solve the classic GraphQL N+1 problem.
// We keep a list of all documents requested to be populated for any given request
// and then batch together documents within the same collection,
// making only 1 find per each collection, rather than `findByID` per each requested doc.
// This dramatically improves performance for REST and Local API `depth` populations,
// and also ensures complex GraphQL queries perform lightning-fast.
const batchAndLoadDocs = (req)=>async (keys)=>{
const { payload } = req;
// Create docs array of same length as keys, using null as value
// We will replace nulls with injected docs as they are retrieved
const docs = keys.map(()=>null);
/**
* Batch IDs by their `find` args
* so we can make one find query per combination of collection, depth, locale, and fallbackLocale.
*
* Resulting shape will be as follows:
{
// key is stringified set of find args
'[null,"pages",2,0,"es","en",false,false]': [
// value is array of IDs to find with these args
'q34tl23462346234524',
'435523540194324280',
'2346245j35l3j5234532li',
],
// etc
};
*
**/ const batchByFindArgs = {};
for (const key of keys){
const [transactionID, collection, id, depth, currentDepth, locale, fallbackLocale, overrideAccess, showHiddenFields, draft, select, populate] = JSON.parse(key);
const batchKeyArray = [
transactionID,
collection,
depth,
currentDepth,
locale,
fallbackLocale,
overrideAccess,
showHiddenFields,
draft,
select,
populate
];
const batchKey = JSON.stringify(batchKeyArray);
const idType = payload.collections?.[collection]?.customIDType || payload.db.defaultIDType;
const sanitizedID = idType === 'number' ? parseFloat(id) : id;
if (isValidID(sanitizedID, idType)) {
batchByFindArgs[batchKey] = [
...batchByFindArgs[batchKey] || [],
sanitizedID
];
}
}
// Run find requests one after another, so as to not hang transactions
for (const [batchKey, ids] of Object.entries(batchByFindArgs)){
const [transactionID, collection, depth, currentDepth, locale, fallbackLocale, overrideAccess, showHiddenFields, draft, select, populate] = JSON.parse(batchKey);
req.transactionID = transactionID;
const result = await payload.find({
collection,
currentDepth,
depth,
disableErrors: true,
draft,
fallbackLocale,
locale,
overrideAccess: Boolean(overrideAccess),
pagination: false,
populate,
req,
select,
showHiddenFields: Boolean(showHiddenFields),
where: {
id: {
in: ids
}
}
});
// For each returned doc, find index in original keys
// Inject doc within docs array if index exists
for (const doc of result.docs){
const docKey = createDataloaderCacheKey({
collectionSlug: collection,
currentDepth,
depth,
docID: doc.id,
draft,
fallbackLocale,
locale,
overrideAccess,
populate,
select,
showHiddenFields,
transactionID: req.transactionID
});
const docsIndex = keys.findIndex((key)=>key === docKey);
if (docsIndex > -1) {
docs[docsIndex] = doc;
}
}
}
// Return docs array,
// which has now been injected with all fetched docs
// and should match the length of the incoming keys arg
return docs;
};
export const getDataLoader = (req)=>{
const findQueries = new Map();
const dataLoader = new DataLoader(batchAndLoadDocs(req));
dataLoader.find = (args)=>{
const key = createFindDataloaderCacheKey(args);
const cached = findQueries.get(key);
if (cached) {
return cached;
}
const request = req.payload.find(args);
findQueries.set(key, request);
return request;
};
return dataLoader;
};
const createFindDataloaderCacheKey = ({ collection, currentDepth, depth, disableErrors, draft, includeLockStatus, joins, limit, overrideAccess, page, pagination, populate, req, select, showHiddenFields, sort, where })=>JSON.stringify([
collection,
currentDepth,
depth,
disableErrors,
draft,
includeLockStatus,
joins,
limit,
overrideAccess,
page,
pagination,
populate,
req?.locale,
req?.fallbackLocale,
req?.user?.id,
req?.transactionID,
select,
showHiddenFields,
sort,
where
]);
export const createDataloaderCacheKey = ({ collectionSlug, currentDepth, depth, docID, draft, fallbackLocale, locale, overrideAccess, populate, select, showHiddenFields, transactionID })=>JSON.stringify([
transactionID,
collectionSlug,
docID,
depth,
currentDepth,
locale,
fallbackLocale,
overrideAccess,
showHiddenFields,
draft,
select,
populate
]);
//# sourceMappingURL=dataloader.js.map

View File

@@ -0,0 +1,55 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ROOT_CONTEXT = exports.createContextKey = void 0;
/** Get a key to uniquely identify a context value */
function createContextKey(description) {
// The specification states that for the same input, multiple calls should
// return different keys. Due to the nature of the JS dependency management
// system, this creates problems where multiple versions of some package
// could hold different keys for the same property.
//
// Therefore, we use Symbol.for which returns the same key for the same input.
return Symbol.for(description);
}
exports.createContextKey = createContextKey;
class BaseContext {
/**
* Construct a new context which inherits values from an optional parent context.
*
* @param parentContext a context from which to inherit values
*/
constructor(parentContext) {
// for minification
const self = this;
self._currentContext = parentContext ? new Map(parentContext) : new Map();
self.getValue = (key) => self._currentContext.get(key);
self.setValue = (key, value) => {
const context = new BaseContext(self._currentContext);
context._currentContext.set(key, value);
return context;
};
self.deleteValue = (key) => {
const context = new BaseContext(self._currentContext);
context._currentContext.delete(key);
return context;
};
}
}
/** The root context is used as the default parent context when there is no active context */
exports.ROOT_CONTEXT = new BaseContext();
//# sourceMappingURL=context.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/Version/RenderFieldsToDiff/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAGzF,eAAO,MAAM,UAAU,SAAU,sBAAsB,KAAG,KAAK,CAAC,SAI/D,CAAA"}

View File

@@ -0,0 +1,105 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.traverse = traverse;
var _nodePath = require("./node-path");
var _nodes = require("./nodes");
// recursively walks the AST starting at the given node. The callback is invoked for
// and object that has a 'type' property.
function walk(context, callback) {
var stop = false;
function innerWalk(context, callback) {
if (stop) {
return;
}
var node = context.node;
if (node === undefined) {
console.warn("traversing with an empty context");
return;
}
if (node._deleted === true) {
return;
}
var path = (0, _nodePath.createPath)(context);
callback(node.type, path);
if (path.shouldStop) {
stop = true;
return;
}
Object.keys(node).forEach(function (prop) {
var value = node[prop];
if (value === null || value === undefined) {
return;
}
var valueAsArray = Array.isArray(value) ? value : [value];
valueAsArray.forEach(function (childNode) {
if (typeof childNode.type === "string") {
var childContext = {
node: childNode,
parentKey: prop,
parentPath: path,
shouldStop: false,
inList: Array.isArray(value)
};
innerWalk(childContext, callback);
}
});
});
}
innerWalk(context, callback);
}
var noop = function noop() {};
function traverse(node, visitors) {
var before = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noop;
var after = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : noop;
Object.keys(visitors).forEach(function (visitor) {
if (!_nodes.nodeAndUnionTypes.includes(visitor)) {
throw new Error("Unexpected visitor ".concat(visitor));
}
});
var context = {
node: node,
inList: false,
shouldStop: false,
parentPath: null,
parentKey: null
};
walk(context, function (type, path) {
if (typeof visitors[type] === "function") {
before(type, path);
visitors[type](path);
after(type, path);
}
var unionTypes = _nodes.unionTypesMap[type];
if (!unionTypes) {
throw new Error("Unexpected node type ".concat(type));
}
unionTypes.forEach(function (unionType) {
if (typeof visitors[unionType] === "function") {
before(unionType, path);
visitors[unionType](path);
after(unionType, path);
}
});
});
}

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 CloudFog = createLucideIcon("CloudFog", [
["path", { d: "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242", key: "1pljnt" }],
["path", { d: "M16 17H7", key: "pygtm1" }],
["path", { d: "M17 21H9", key: "1u2q02" }]
]);
export { CloudFog as default };
//# sourceMappingURL=cloud-fog.js.map

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/ShimmerEffect/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,cAAc,CAAA;AAErB,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAA;IAChC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAA;IACtC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACjC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACjC,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAuBtD,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC9B,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA6B9D,CAAA"}

View File

@@ -0,0 +1,82 @@
{
"name": "minipass",
"version": "7.1.2",
"description": "minimal implementation of a PassThrough stream",
"main": "./dist/commonjs/index.js",
"types": "./dist/commonjs/index.d.ts",
"type": "module",
"tshy": {
"selfLink": false,
"main": true,
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
}
},
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./dist/commonjs/index.d.ts",
"default": "./dist/commonjs/index.js"
}
}
},
"files": [
"dist"
],
"scripts": {
"preversion": "npm test",
"postversion": "npm publish",
"prepublishOnly": "git push origin --follow-tags",
"prepare": "tshy",
"pretest": "npm run prepare",
"presnap": "npm run prepare",
"test": "tap",
"snap": "tap",
"format": "prettier --write . --loglevel warn",
"typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts"
},
"prettier": {
"semi": false,
"printWidth": 75,
"tabWidth": 2,
"useTabs": false,
"singleQuote": true,
"jsxSingleQuote": false,
"bracketSameLine": true,
"arrowParens": "avoid",
"endOfLine": "lf"
},
"devDependencies": {
"@types/end-of-stream": "^1.4.2",
"@types/node": "^20.1.2",
"end-of-stream": "^1.4.0",
"node-abort-controller": "^3.1.1",
"prettier": "^2.6.2",
"tap": "^19.0.0",
"through2": "^2.0.3",
"tshy": "^1.14.0",
"typedoc": "^0.25.1"
},
"repository": "https://github.com/isaacs/minipass",
"keywords": [
"passthrough",
"stream"
],
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
"license": "ISC",
"engines": {
"node": ">=16 || 14 >=14.17"
},
"tap": {
"typecheck": true,
"include": [
"test/*.ts"
]
}
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"dependencyChecker.d.ts","sourceRoot":"","sources":["../../../src/utilities/dependencies/dependencyChecker.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK;IAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,CAAA;CAAE,CAAA;AAEjG,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,gBAAgB,CAAC,EAAE;QACjB,YAAY,EAAE,MAAM,EAAE,CAAA;QACtB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAA;QACZ,aAAa,CAAC,EAAE,MAAM,CAAA;QACtB,uBAAuB,CAAC,EAAE,MAAM,CAAA;KACjC,EAAE,CAAA;IACH;;OAEG;IACH,kBAAkB,CAAC,EAAE;QACnB,CAAC,UAAU,EAAE,MAAM,GAAG;YACpB,mBAAmB,CAAC,EAAE,mBAAmB,CAAA;YACzC,QAAQ,CAAC,EAAE,OAAO,CAAA;YAClB,OAAO,CAAC,EAAE,MAAM,CAAA;SACjB,CAAA;KACF,CAAA;CACF,CAAA;AAED,wBAAsB,iBAAiB,CAAC,EACtC,gBAAgB,EAChB,kBAAkB,GACnB,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CA0EvC"}

View File

@@ -0,0 +1,22 @@
MIT
Copyright Joyent, Inc. and other Node contributors.
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 @@
exports._default = require("./emotion-cache.development.cjs.js").default;

View File

@@ -0,0 +1,6 @@
export declare const subSecondsWithOptions: import("./types.js").FPFn3<
Date,
import("../subSeconds.js").SubSecondsOptions<Date> | undefined,
number,
import("../fp.js").DateArg<Date>
>;

View File

@@ -0,0 +1,236 @@
/*!
* node-progress
* Copyright(c) 2011 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
/**
* Expose `ProgressBar`.
*/
exports = module.exports = ProgressBar;
/**
* Initialize a `ProgressBar` with the given `fmt` string and `options` or
* `total`.
*
* Options:
*
* - `curr` current completed index
* - `total` total number of ticks to complete
* - `width` the displayed width of the progress bar defaulting to total
* - `stream` the output stream defaulting to stderr
* - `head` head character defaulting to complete character
* - `complete` completion character defaulting to "="
* - `incomplete` incomplete character defaulting to "-"
* - `renderThrottle` minimum time between updates in milliseconds defaulting to 16
* - `callback` optional function to call when the progress bar completes
* - `clear` will clear the progress bar upon termination
*
* Tokens:
*
* - `:bar` the progress bar itself
* - `:current` current tick number
* - `:total` total ticks
* - `:elapsed` time elapsed in seconds
* - `:percent` completion percentage
* - `:eta` eta in seconds
* - `:rate` rate of ticks per second
*
* @param {string} fmt
* @param {object|number} options or total
* @api public
*/
function ProgressBar(fmt, options) {
this.stream = options.stream || process.stderr;
if (typeof(options) == 'number') {
var total = options;
options = {};
options.total = total;
} else {
options = options || {};
if ('string' != typeof fmt) throw new Error('format required');
if ('number' != typeof options.total) throw new Error('total required');
}
this.fmt = fmt;
this.curr = options.curr || 0;
this.total = options.total;
this.width = options.width || this.total;
this.clear = options.clear
this.chars = {
complete : options.complete || '=',
incomplete : options.incomplete || '-',
head : options.head || (options.complete || '=')
};
this.renderThrottle = options.renderThrottle !== 0 ? (options.renderThrottle || 16) : 0;
this.lastRender = -Infinity;
this.callback = options.callback || function () {};
this.tokens = {};
this.lastDraw = '';
}
/**
* "tick" the progress bar with optional `len` and optional `tokens`.
*
* @param {number|object} len or tokens
* @param {object} tokens
* @api public
*/
ProgressBar.prototype.tick = function(len, tokens){
if (len !== 0)
len = len || 1;
// swap tokens
if ('object' == typeof len) tokens = len, len = 1;
if (tokens) this.tokens = tokens;
// start time for eta
if (0 == this.curr) this.start = new Date;
this.curr += len
// try to render
this.render();
// progress complete
if (this.curr >= this.total) {
this.render(undefined, true);
this.complete = true;
this.terminate();
this.callback(this);
return;
}
};
/**
* Method to render the progress bar with optional `tokens` to place in the
* progress bar's `fmt` field.
*
* @param {object} tokens
* @api public
*/
ProgressBar.prototype.render = function (tokens, force) {
force = force !== undefined ? force : false;
if (tokens) this.tokens = tokens;
if (!this.stream.isTTY) return;
var now = Date.now();
var delta = now - this.lastRender;
if (!force && (delta < this.renderThrottle)) {
return;
} else {
this.lastRender = now;
}
var ratio = this.curr / this.total;
ratio = Math.min(Math.max(ratio, 0), 1);
var percent = Math.floor(ratio * 100);
var incomplete, complete, completeLength;
var elapsed = new Date - this.start;
var eta = (percent == 100) ? 0 : elapsed * (this.total / this.curr - 1);
var rate = this.curr / (elapsed / 1000);
/* populate the bar template with percentages and timestamps */
var str = this.fmt
.replace(':current', this.curr)
.replace(':total', this.total)
.replace(':elapsed', isNaN(elapsed) ? '0.0' : (elapsed / 1000).toFixed(1))
.replace(':eta', (isNaN(eta) || !isFinite(eta)) ? '0.0' : (eta / 1000)
.toFixed(1))
.replace(':percent', percent.toFixed(0) + '%')
.replace(':rate', Math.round(rate));
/* compute the available space (non-zero) for the bar */
var availableSpace = Math.max(0, this.stream.columns - str.replace(':bar', '').length);
if(availableSpace && process.platform === 'win32'){
availableSpace = availableSpace - 1;
}
var width = Math.min(this.width, availableSpace);
/* TODO: the following assumes the user has one ':bar' token */
completeLength = Math.round(width * ratio);
complete = Array(Math.max(0, completeLength + 1)).join(this.chars.complete);
incomplete = Array(Math.max(0, width - completeLength + 1)).join(this.chars.incomplete);
/* add head to the complete string */
if(completeLength > 0)
complete = complete.slice(0, -1) + this.chars.head;
/* fill in the actual progress bar */
str = str.replace(':bar', complete + incomplete);
/* replace the extra tokens */
if (this.tokens) for (var key in this.tokens) str = str.replace(':' + key, this.tokens[key]);
if (this.lastDraw !== str) {
this.stream.cursorTo(0);
this.stream.write(str);
this.stream.clearLine(1);
this.lastDraw = str;
}
};
/**
* "update" the progress bar to represent an exact percentage.
* The ratio (between 0 and 1) specified will be multiplied by `total` and
* floored, representing the closest available "tick." For example, if a
* progress bar has a length of 3 and `update(0.5)` is called, the progress
* will be set to 1.
*
* A ratio of 0.5 will attempt to set the progress to halfway.
*
* @param {number} ratio The ratio (between 0 and 1 inclusive) to set the
* overall completion to.
* @api public
*/
ProgressBar.prototype.update = function (ratio, tokens) {
var goal = Math.floor(ratio * this.total);
var delta = goal - this.curr;
this.tick(delta, tokens);
};
/**
* "interrupt" the progress bar and write a message above it.
* @param {string} message The message to write.
* @api public
*/
ProgressBar.prototype.interrupt = function (message) {
// clear the current line
this.stream.clearLine();
// move the cursor to the start of the line
this.stream.cursorTo(0);
// write the message text
this.stream.write(message);
// terminate the line after writing the message
this.stream.write('\n');
// re-display the progress bar with its lastDraw
this.stream.write(this.lastDraw);
};
/**
* Terminates a progress bar.
*
* @api public
*/
ProgressBar.prototype.terminate = function () {
if (this.clear) {
if (this.stream.clearLine) {
this.stream.clearLine();
this.stream.cursorTo(0);
}
} else {
this.stream.write('\n');
}
};

View File

@@ -0,0 +1 @@
export { default as _default } from "../../dist/declarations/src/animated/index.js"

View File

@@ -0,0 +1,7 @@
import type { Event, EventHint } from './types-hoist/event';
import type { EventProcessor } from './types-hoist/eventprocessor';
/**
* Process an array of event processors, returning the processed event (or `null` if the event was dropped).
*/
export declare function notifyEventProcessors(processors: EventProcessor[], event: Event | null, hint: EventHint, index?: number): PromiseLike<Event | null>;
//# sourceMappingURL=eventProcessors.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ticket.js","sources":["../../../src/icons/ticket.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Ticket\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMiA5YTMgMyAwIDAgMSAwIDZ2MmEyIDIgMCAwIDAgMiAyaDE2YTIgMiAwIDAgMCAyLTJ2LTJhMyAzIDAgMCAxIDAtNlY3YTIgMiAwIDAgMC0yLTJINGEyIDIgMCAwIDAtMiAyWiIgLz4KICA8cGF0aCBkPSJNMTMgNXYyIiAvPgogIDxwYXRoIGQ9Ik0xMyAxN3YyIiAvPgogIDxwYXRoIGQ9Ik0xMyAxMXYyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/ticket\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 Ticket = createLucideIcon('Ticket', [\n [\n 'path',\n {\n d: 'M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z',\n key: 'qn84l0',\n },\n ],\n ['path', { d: 'M13 5v2', key: 'dyzc3o' }],\n ['path', { d: 'M13 17v2', key: '1ont0d' }],\n ['path', { d: 'M13 11v2', key: '1wjjxi' }],\n]);\n\nexport default Ticket;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CACxC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;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,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,87 @@
// @ts-ignore TS6133
import { test } from "vitest";
import * as z from "zod/v3";
import { util } from "../helpers/util.js";
test("first party switch", () => {
const myType = z.string() as z.ZodFirstPartySchemaTypes;
const def = myType._def;
switch (def.typeName) {
case z.ZodFirstPartyTypeKind.ZodString:
break;
case z.ZodFirstPartyTypeKind.ZodNumber:
break;
case z.ZodFirstPartyTypeKind.ZodNaN:
break;
case z.ZodFirstPartyTypeKind.ZodBigInt:
break;
case z.ZodFirstPartyTypeKind.ZodBoolean:
break;
case z.ZodFirstPartyTypeKind.ZodDate:
break;
case z.ZodFirstPartyTypeKind.ZodUndefined:
break;
case z.ZodFirstPartyTypeKind.ZodNull:
break;
case z.ZodFirstPartyTypeKind.ZodAny:
break;
case z.ZodFirstPartyTypeKind.ZodUnknown:
break;
case z.ZodFirstPartyTypeKind.ZodNever:
break;
case z.ZodFirstPartyTypeKind.ZodVoid:
break;
case z.ZodFirstPartyTypeKind.ZodArray:
break;
case z.ZodFirstPartyTypeKind.ZodObject:
break;
case z.ZodFirstPartyTypeKind.ZodUnion:
break;
case z.ZodFirstPartyTypeKind.ZodDiscriminatedUnion:
break;
case z.ZodFirstPartyTypeKind.ZodIntersection:
break;
case z.ZodFirstPartyTypeKind.ZodTuple:
break;
case z.ZodFirstPartyTypeKind.ZodRecord:
break;
case z.ZodFirstPartyTypeKind.ZodMap:
break;
case z.ZodFirstPartyTypeKind.ZodSet:
break;
case z.ZodFirstPartyTypeKind.ZodFunction:
break;
case z.ZodFirstPartyTypeKind.ZodLazy:
break;
case z.ZodFirstPartyTypeKind.ZodLiteral:
break;
case z.ZodFirstPartyTypeKind.ZodEnum:
break;
case z.ZodFirstPartyTypeKind.ZodEffects:
break;
case z.ZodFirstPartyTypeKind.ZodNativeEnum:
break;
case z.ZodFirstPartyTypeKind.ZodOptional:
break;
case z.ZodFirstPartyTypeKind.ZodNullable:
break;
case z.ZodFirstPartyTypeKind.ZodDefault:
break;
case z.ZodFirstPartyTypeKind.ZodCatch:
break;
case z.ZodFirstPartyTypeKind.ZodPromise:
break;
case z.ZodFirstPartyTypeKind.ZodBranded:
break;
case z.ZodFirstPartyTypeKind.ZodPipeline:
break;
case z.ZodFirstPartyTypeKind.ZodSymbol:
break;
case z.ZodFirstPartyTypeKind.ZodReadonly:
break;
default:
util.assertNever(def);
}
});

View File

@@ -0,0 +1,3 @@
export { };
//# sourceMappingURL=workflowJSONTypes.js.map

View File

@@ -0,0 +1,18 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import type { QueueChildMessage, TaskQueue } from './types';
/**
* First-in, First-out task queue that manages a dedicated pool
* for each worker as well as a shared queue. The FIFO ordering is guaranteed
* across the worker specific and shared queue.
*/
export default class FifoQueue implements TaskQueue {
private _workerQueues;
private _sharedQueue;
enqueue(task: QueueChildMessage, workerId?: number): void;
dequeue(workerId: number): QueueChildMessage | null;
}

View File

@@ -0,0 +1,34 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BestFitMatcher = BestFitMatcher;
var utils_1 = require("./utils");
/**
* https://tc39.es/ecma402/#sec-bestfitmatcher
* @param availableLocales
* @param requestedLocales
* @param getDefaultLocale
*/
function BestFitMatcher(availableLocales, requestedLocales, getDefaultLocale) {
var foundLocale;
var extension;
var noExtensionLocales = [];
var noExtensionLocaleMap = requestedLocales.reduce(function (all, l) {
var noExtensionLocale = l.replace(utils_1.UNICODE_EXTENSION_SEQUENCE_REGEX, '');
noExtensionLocales.push(noExtensionLocale);
all[noExtensionLocale] = l;
return all;
}, {});
var result = (0, utils_1.findBestMatch)(noExtensionLocales, availableLocales);
if (result.matchedSupportedLocale && result.matchedDesiredLocale) {
foundLocale = result.matchedSupportedLocale;
extension =
noExtensionLocaleMap[result.matchedDesiredLocale].slice(result.matchedDesiredLocale.length) || undefined;
}
if (!foundLocale) {
return { locale: getDefaultLocale() };
}
return {
locale: foundLocale,
extension: extension,
};
}

View File

@@ -0,0 +1,6 @@
import getPrototypeOf from "./getPrototypeOf.js";
function _superPropBase(t, o) {
for (; !{}.hasOwnProperty.call(t, o) && null !== (t = getPrototypeOf(t)););
return t;
}
export { _superPropBase as default };

View File

@@ -0,0 +1,167 @@
"use strict";
exports.formatDistance = void 0;
function buildLocalizeTokenFn(schema) {
return (count, options) => {
if (count === 1) {
if (options?.addSuffix) {
return schema.one[0].replace("{{time}}", schema.one[2]);
} else {
return schema.one[0].replace("{{time}}", schema.one[1]);
}
} else {
const rem = count % 10 === 1 && count % 100 !== 11;
if (options?.addSuffix) {
return schema.other[0]
.replace("{{time}}", rem ? schema.other[3] : schema.other[4])
.replace("{{count}}", String(count));
} else {
return schema.other[0]
.replace("{{time}}", rem ? schema.other[1] : schema.other[2])
.replace("{{count}}", String(count));
}
}
};
}
const formatDistanceLocale = {
lessThanXSeconds: buildLocalizeTokenFn({
one: ["mazāk par {{time}}", "sekundi", "sekundi"],
other: [
"mazāk nekā {{count}} {{time}}",
"sekunde",
"sekundes",
"sekundes",
"sekundēm",
],
}),
xSeconds: buildLocalizeTokenFn({
one: ["1 {{time}}", "sekunde", "sekundes"],
other: [
"{{count}} {{time}}",
"sekunde",
"sekundes",
"sekundes",
"sekundēm",
],
}),
halfAMinute: (_count, options) => {
if (options?.addSuffix) {
return "pusminūtes";
} else {
return "pusminūte";
}
},
lessThanXMinutes: buildLocalizeTokenFn({
one: ["mazāk par {{time}}", "minūti", "minūti"],
other: [
"mazāk nekā {{count}} {{time}}",
"minūte",
"minūtes",
"minūtes",
"minūtēm",
],
}),
xMinutes: buildLocalizeTokenFn({
one: ["1 {{time}}", "minūte", "minūtes"],
other: ["{{count}} {{time}}", "minūte", "minūtes", "minūtes", "minūtēm"],
}),
aboutXHours: buildLocalizeTokenFn({
one: ["apmēram 1 {{time}}", "stunda", "stundas"],
other: [
"apmēram {{count}} {{time}}",
"stunda",
"stundas",
"stundas",
"stundām",
],
}),
xHours: buildLocalizeTokenFn({
one: ["1 {{time}}", "stunda", "stundas"],
other: ["{{count}} {{time}}", "stunda", "stundas", "stundas", "stundām"],
}),
xDays: buildLocalizeTokenFn({
one: ["1 {{time}}", "diena", "dienas"],
other: ["{{count}} {{time}}", "diena", "dienas", "dienas", "dienām"],
}),
aboutXWeeks: buildLocalizeTokenFn({
one: ["apmēram 1 {{time}}", "nedēļa", "nedēļas"],
other: [
"apmēram {{count}} {{time}}",
"nedēļa",
"nedēļu",
"nedēļas",
"nedēļām",
],
}),
xWeeks: buildLocalizeTokenFn({
one: ["1 {{time}}", "nedēļa", "nedēļas"],
other: [
"{{count}} {{time}}", // TODO
"nedēļa",
"nedēļu",
"nedēļas",
"nedēļām",
],
}),
aboutXMonths: buildLocalizeTokenFn({
one: ["apmēram 1 {{time}}", "mēnesis", "mēneša"],
other: [
"apmēram {{count}} {{time}}",
"mēnesis",
"mēneši",
"mēneša",
"mēnešiem",
],
}),
xMonths: buildLocalizeTokenFn({
one: ["1 {{time}}", "mēnesis", "mēneša"],
other: ["{{count}} {{time}}", "mēnesis", "mēneši", "mēneša", "mēnešiem"],
}),
aboutXYears: buildLocalizeTokenFn({
one: ["apmēram 1 {{time}}", "gads", "gada"],
other: ["apmēram {{count}} {{time}}", "gads", "gadi", "gada", "gadiem"],
}),
xYears: buildLocalizeTokenFn({
one: ["1 {{time}}", "gads", "gada"],
other: ["{{count}} {{time}}", "gads", "gadi", "gada", "gadiem"],
}),
overXYears: buildLocalizeTokenFn({
one: ["ilgāk par 1 {{time}}", "gadu", "gadu"],
other: ["vairāk nekā {{count}} {{time}}", "gads", "gadi", "gada", "gadiem"],
}),
almostXYears: buildLocalizeTokenFn({
one: ["gandrīz 1 {{time}}", "gads", "gada"],
other: ["vairāk nekā {{count}} {{time}}", "gads", "gadi", "gada", "gadiem"],
}),
};
const formatDistance = (token, count, options) => {
const result = formatDistanceLocale[token](count, options);
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "pēc " + result;
} else {
return "pirms " + result;
}
}
return result;
};
exports.formatDistance = formatDistance;

View File

@@ -0,0 +1,95 @@
import type { BuildColumns, BuildExtraConfigColumns } from "../column-builder.js";
import { entityKind } from "../entity.js";
import { Table, type TableConfig as TableConfigBase, type UpdateTableConfig } from "../table.js";
import type { CheckBuilder } from "./checks.js";
import { type GelColumnsBuilders } from "./columns/all.js";
import type { GelColumn, GelColumnBuilderBase } from "./columns/common.js";
import type { ForeignKeyBuilder } from "./foreign-keys.js";
import type { AnyIndexBuilder } from "./indexes.js";
import type { GelPolicy } from "./policies.js";
import type { PrimaryKeyBuilder } from "./primary-keys.js";
import type { UniqueConstraintBuilder } from "./unique-constraint.js";
export type GelTableExtraConfigValue = AnyIndexBuilder | CheckBuilder | ForeignKeyBuilder | PrimaryKeyBuilder | UniqueConstraintBuilder | GelPolicy;
export type GelTableExtraConfig = Record<string, GelTableExtraConfigValue>;
export type TableConfig = TableConfigBase<GelColumn>;
export declare class GelTable<T extends TableConfig = TableConfig> extends Table<T> {
static readonly [entityKind]: string;
}
export type AnyGelTable<TPartial extends Partial<TableConfig> = {}> = GelTable<UpdateTableConfig<TableConfig, TPartial>>;
export type GelTableWithColumns<T extends TableConfig> = GelTable<T> & {
[Key in keyof T['columns']]: T['columns'][Key];
} & {
enableRLS: () => Omit<GelTableWithColumns<T>, 'enableRLS'>;
};
export interface GelTableFn<TSchema extends string | undefined = undefined> {
/**
* @deprecated The third parameter of GelTable is changing and will only accept an array instead of an object
*
* @example
* Deprecated version:
* ```ts
* export const users = gelTable("users", {
* id: integer(),
* }, (t) => ({
* idx: index('custom_name').on(t.id)
* }));
* ```
*
* New API:
* ```ts
* export const users = gelTable("users", {
* id: integer(),
* }, (t) => [
* index('custom_name').on(t.id)
* ]);
* ```
*/
<TTableName extends string, TColumnsMap extends Record<string, GelColumnBuilderBase>>(name: TTableName, columns: TColumnsMap, extraConfig: (self: BuildExtraConfigColumns<TTableName, TColumnsMap, 'gel'>) => GelTableExtraConfig): GelTableWithColumns<{
name: TTableName;
schema: TSchema;
columns: BuildColumns<TTableName, TColumnsMap, 'gel'>;
dialect: 'gel';
}>;
/**
* @deprecated The third parameter of gelTable is changing and will only accept an array instead of an object
*
* @example
* Deprecated version:
* ```ts
* export const users = gelTable("users", {
* id: integer(),
* }, (t) => ({
* idx: index('custom_name').on(t.id)
* }));
* ```
*
* New API:
* ```ts
* export const users = gelTable("users", {
* id: integer(),
* }, (t) => [
* index('custom_name').on(t.id)
* ]);
* ```
*/
<TTableName extends string, TColumnsMap extends Record<string, GelColumnBuilderBase>>(name: TTableName, columns: (columnTypes: GelColumnsBuilders) => TColumnsMap, extraConfig: (self: BuildExtraConfigColumns<TTableName, TColumnsMap, 'gel'>) => GelTableExtraConfig): GelTableWithColumns<{
name: TTableName;
schema: TSchema;
columns: BuildColumns<TTableName, TColumnsMap, 'gel'>;
dialect: 'gel';
}>;
<TTableName extends string, TColumnsMap extends Record<string, GelColumnBuilderBase>>(name: TTableName, columns: TColumnsMap, extraConfig?: (self: BuildExtraConfigColumns<TTableName, TColumnsMap, 'gel'>) => GelTableExtraConfigValue[]): GelTableWithColumns<{
name: TTableName;
schema: TSchema;
columns: BuildColumns<TTableName, TColumnsMap, 'gel'>;
dialect: 'gel';
}>;
<TTableName extends string, TColumnsMap extends Record<string, GelColumnBuilderBase>>(name: TTableName, columns: (columnTypes: GelColumnsBuilders) => TColumnsMap, extraConfig?: (self: BuildExtraConfigColumns<TTableName, TColumnsMap, 'gel'>) => GelTableExtraConfigValue[]): GelTableWithColumns<{
name: TTableName;
schema: TSchema;
columns: BuildColumns<TTableName, TColumnsMap, 'gel'>;
dialect: 'gel';
}>;
}
export declare const gelTable: GelTableFn;
export declare function gelTableCreator(customizeTableName: (name: string) => string): GelTableFn;

View File

@@ -0,0 +1,27 @@
var baseIsArrayBuffer = require('./_baseIsArrayBuffer'),
baseUnary = require('./_baseUnary'),
nodeUtil = require('./_nodeUtil');
/* Node.js helper references. */
var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer;
/**
* Checks if `value` is classified as an `ArrayBuffer` object.
*
* @static
* @memberOf _
* @since 4.3.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
* @example
*
* _.isArrayBuffer(new ArrayBuffer(2));
* // => true
*
* _.isArrayBuffer(new Array(2));
* // => false
*/
var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
module.exports = isArrayBuffer;

View File

@@ -0,0 +1 @@
{"version":3,"file":"pin.js","sources":["../../../src/icons/pin.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Pin\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMTd2NSIgLz4KICA8cGF0aCBkPSJNOSAxMC43NmEyIDIgMCAwIDEtMS4xMSAxLjc5bC0xLjc4LjlBMiAyIDAgMCAwIDUgMTUuMjRWMTZhMSAxIDAgMCAwIDEgMWgxMmExIDEgMCAwIDAgMS0xdi0uNzZhMiAyIDAgMCAwLTEuMTEtMS43OWwtMS43OC0uOUEyIDIgMCAwIDEgMTUgMTAuNzZWN2ExIDEgMCAwIDEgMS0xIDIgMiAwIDAgMCAwLTRIOGEyIDIgMCAwIDAgMCA0IDEgMSAwIDAgMSAxIDF6IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/pin\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 Pin = createLucideIcon('Pin', [\n ['path', { d: 'M12 17v5', key: 'bb1du9' }],\n [\n 'path',\n {\n d: 'M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z',\n key: '1nkz8b',\n },\n ],\n]);\n\nexport default Pin;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,iBAAiB,KAAO,CAAA,CAAA,CAAA;AAAA,CAAA,CAClC,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,CACzC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AACF,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"createFormData.d.ts","sourceRoot":"","sources":["../../../../src/elements/BulkUpload/FormsManager/createFormData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAKxD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAA;AAEvF,wBAAsB,cAAc,CAClC,SAAS,EAAE,SAAc,EACzB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EACnC,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,UAAU,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,CAAC,qBAuCrE"}

View File

@@ -0,0 +1,279 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var emotionElement = require('./emotion-element-25f9958c.browser.cjs.js');
var React = require('react');
var utils = require('@emotion/utils');
var useInsertionEffectWithFallbacks = require('@emotion/use-insertion-effect-with-fallbacks');
var serialize = require('@emotion/serialize');
require('@emotion/cache');
require('@babel/runtime/helpers/extends');
require('@emotion/weak-memoize');
require('../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.cjs.js');
require('hoist-non-react-statics');
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var React__namespace = /*#__PURE__*/_interopNamespace(React);
exports.jsx = function jsx(type, props) {
// eslint-disable-next-line prefer-rest-params
var args = arguments;
if (props == null || !emotionElement.hasOwn.call(props, 'css')) {
return React__namespace.createElement.apply(undefined, args);
}
var argsLength = args.length;
var createElementArgArray = new Array(argsLength);
createElementArgArray[0] = emotionElement.Emotion;
createElementArgArray[1] = emotionElement.createEmotionProps(type, props);
for (var i = 2; i < argsLength; i++) {
createElementArgArray[i] = args[i];
}
return React__namespace.createElement.apply(null, createElementArgArray);
};
(function (_jsx) {
var JSX;
(function (_JSX) {})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
})(exports.jsx || (exports.jsx = {}));
// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild
// initial client-side render from SSR, use place of hydrating tag
var Global = /* #__PURE__ */emotionElement.withEmotionCache(function (props, cache) {
var styles = props.styles;
var serialized = serialize.serializeStyles([styles], undefined, React__namespace.useContext(emotionElement.ThemeContext));
// but it is based on a constant that will never change at runtime
// it's effectively like having two implementations and switching them out
// so it's not actually breaking anything
var sheetRef = React__namespace.useRef();
useInsertionEffectWithFallbacks.useInsertionEffectWithLayoutFallback(function () {
var key = cache.key + "-global"; // use case of https://github.com/emotion-js/emotion/issues/2675
var sheet = new cache.sheet.constructor({
key: key,
nonce: cache.sheet.nonce,
container: cache.sheet.container,
speedy: cache.sheet.isSpeedy
});
var rehydrating = false;
var node = document.querySelector("style[data-emotion=\"" + key + " " + serialized.name + "\"]");
if (cache.sheet.tags.length) {
sheet.before = cache.sheet.tags[0];
}
if (node !== null) {
rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other <Global/>s
node.setAttribute('data-emotion', key);
sheet.hydrate([node]);
}
sheetRef.current = [sheet, rehydrating];
return function () {
sheet.flush();
};
}, [cache]);
useInsertionEffectWithFallbacks.useInsertionEffectWithLayoutFallback(function () {
var sheetRefCurrent = sheetRef.current;
var sheet = sheetRefCurrent[0],
rehydrating = sheetRefCurrent[1];
if (rehydrating) {
sheetRefCurrent[1] = false;
return;
}
if (serialized.next !== undefined) {
// insert keyframes
utils.insertStyles(cache, serialized.next, true);
}
if (sheet.tags.length) {
// if this doesn't exist then it will be null so the style element will be appended
var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;
sheet.before = element;
sheet.flush();
}
cache.insert("", serialized, sheet, false);
}, [cache, serialized.name]);
return null;
});
function css() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return serialize.serializeStyles(args);
}
function keyframes() {
var insertable = css.apply(void 0, arguments);
var name = "animation-" + insertable.name;
return {
name: name,
styles: "@keyframes " + name + "{" + insertable.styles + "}",
anim: 1,
toString: function toString() {
return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
}
};
}
var classnames = function classnames(args) {
var len = args.length;
var i = 0;
var cls = '';
for (; i < len; i++) {
var arg = args[i];
if (arg == null) continue;
var toAdd = void 0;
switch (typeof arg) {
case 'boolean':
break;
case 'object':
{
if (Array.isArray(arg)) {
toAdd = classnames(arg);
} else {
toAdd = '';
for (var k in arg) {
if (arg[k] && k) {
toAdd && (toAdd += ' ');
toAdd += k;
}
}
}
break;
}
default:
{
toAdd = arg;
}
}
if (toAdd) {
cls && (cls += ' ');
cls += toAdd;
}
}
return cls;
};
function merge(registered, css, className) {
var registeredStyles = [];
var rawClassName = utils.getRegisteredStyles(registered, registeredStyles, className);
if (registeredStyles.length < 2) {
return className;
}
return rawClassName + css(registeredStyles);
}
var Insertion = function Insertion(_ref) {
var cache = _ref.cache,
serializedArr = _ref.serializedArr;
useInsertionEffectWithFallbacks.useInsertionEffectAlwaysWithSyncFallback(function () {
for (var i = 0; i < serializedArr.length; i++) {
utils.insertStyles(cache, serializedArr[i], false);
}
});
return null;
};
var ClassNames = /* #__PURE__ */emotionElement.withEmotionCache(function (props, cache) {
var hasRendered = false;
var serializedArr = [];
var css = function css() {
if (hasRendered && emotionElement.isDevelopment) {
throw new Error('css can only be used during render');
}
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var serialized = serialize.serializeStyles(args, cache.registered);
serializedArr.push(serialized); // registration has to happen here as the result of this might get consumed by `cx`
utils.registerStyles(cache, serialized, false);
return cache.key + "-" + serialized.name;
};
var cx = function cx() {
if (hasRendered && emotionElement.isDevelopment) {
throw new Error('cx can only be used during render');
}
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
return merge(cache.registered, css, classnames(args));
};
var content = {
css: css,
cx: cx,
theme: React__namespace.useContext(emotionElement.ThemeContext)
};
var ele = props.children(content);
hasRendered = true;
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(Insertion, {
cache: cache,
serializedArr: serializedArr
}), ele);
});
exports.CacheProvider = emotionElement.CacheProvider;
exports.ThemeContext = emotionElement.ThemeContext;
exports.ThemeProvider = emotionElement.ThemeProvider;
exports.__unsafe_useEmotionCache = emotionElement.__unsafe_useEmotionCache;
exports.useTheme = emotionElement.useTheme;
exports.withEmotionCache = emotionElement.withEmotionCache;
exports.withTheme = emotionElement.withTheme;
exports.ClassNames = ClassNames;
exports.Global = Global;
exports.createElement = exports.jsx;
exports.css = css;
exports.keyframes = keyframes;

View File

@@ -0,0 +1,2 @@
import { KeyboardCoordinateGetter } from '@dnd-kit/core';
export declare const sortableKeyboardCoordinates: KeyboardCoordinateGetter;

View File

@@ -0,0 +1,18 @@
/**
* A `removeEventListener` ponyfill
*
* @param node the element
* @param eventName the event name
* @param handle the handler
* @param options event options
*/
function removeEventListener(node, eventName, handler, options) {
var capture = options && typeof options !== 'boolean' ? options.capture : options;
node.removeEventListener(eventName, handler, capture);
if (handler.__once) {
node.removeEventListener(eventName, handler.__once, capture);
}
}
export default removeEventListener;

View File

@@ -0,0 +1,7 @@
import type { DrizzleAdapter } from '../types.js';
export declare const buildForeignKeyName: ({ name, adapter, number, }: {
adapter: DrizzleAdapter;
name: string;
number?: number;
}) => string;
//# sourceMappingURL=buildForeignKeyName.d.ts.map

View File

@@ -0,0 +1,54 @@
/// <reference types="node" />
import { Blob } from 'buffer'
import { DOMException, EventInit } from './patch'
export declare class FileReader {
__proto__: EventTarget & FileReader
constructor ()
readAsArrayBuffer (blob: Blob): void
readAsBinaryString (blob: Blob): void
readAsText (blob: Blob, encoding?: string): void
readAsDataURL (blob: Blob): void
abort (): void
static readonly EMPTY = 0
static readonly LOADING = 1
static readonly DONE = 2
readonly EMPTY = 0
readonly LOADING = 1
readonly DONE = 2
readonly readyState: number
readonly result: string | ArrayBuffer | null
readonly error: DOMException | null
onloadstart: null | ((this: FileReader, event: ProgressEvent) => void)
onprogress: null | ((this: FileReader, event: ProgressEvent) => void)
onload: null | ((this: FileReader, event: ProgressEvent) => void)
onabort: null | ((this: FileReader, event: ProgressEvent) => void)
onerror: null | ((this: FileReader, event: ProgressEvent) => void)
onloadend: null | ((this: FileReader, event: ProgressEvent) => void)
}
export interface ProgressEventInit extends EventInit {
lengthComputable?: boolean
loaded?: number
total?: number
}
export declare class ProgressEvent {
__proto__: Event & ProgressEvent
constructor (type: string, eventInitDict?: ProgressEventInit)
readonly lengthComputable: boolean
readonly loaded: number
readonly total: number
}

View File

@@ -0,0 +1,5 @@
const file3 = require("./file3.js")
module.exports = function () {
file3()
}

View File

@@ -0,0 +1,168 @@
import { NextResponse } from 'next/server';
import { receiveRoutingConfig } from '../routing/config.js';
import { HEADER_LOCALE_NAME } from '../shared/constants.js';
import { matchesPathname, normalizeTrailingSlash, getLocalePrefix, getLocalizedTemplate } from '../shared/utils.js';
import getAlternateLinksHeaderValue from './getAlternateLinksHeaderValue.js';
import resolveLocale from './resolveLocale.js';
import syncCookie from './syncCookie.js';
import { sanitizePathname, isLocaleSupportedOnDomain, getNormalizedPathname, getPathnameMatch, getInternalTemplate, formatTemplatePathname, formatPathname, getBestMatchingDomain, applyBasePath, getLocaleAsPrefix } from './utils.js';
function createMiddleware(routing) {
const resolvedRouting = receiveRoutingConfig(routing);
return function middleware(request) {
let unsafeExternalPathname;
try {
// Resolve potential foreign symbols (e.g. /ja/%E7%B4%84 → /ja/約))
unsafeExternalPathname = decodeURI(request.nextUrl.pathname);
} catch {
// In case an invalid pathname is encountered, forward
// it to Next.js which in turn responds with a 400
return NextResponse.next();
}
// Sanitize malicious URIs to prevent open redirect attacks due to
// decodeURI doesn't escape encoded backslashes ('%5C' & '%5c')
const externalPathname = sanitizePathname(unsafeExternalPathname);
const {
domain,
locale
} = resolveLocale(resolvedRouting, request.headers, request.cookies, externalPathname);
const hasMatchedDefaultLocale = domain ? domain.defaultLocale === locale : locale === resolvedRouting.defaultLocale;
const domainsConfig = resolvedRouting.domains?.filter(curDomain => isLocaleSupportedOnDomain(locale, curDomain)) || [];
const hasUnknownHost = resolvedRouting.domains != null && !domain;
function next(url) {
const urlObj = new URL(url, request.url);
if (request.nextUrl.basePath) {
urlObj.pathname = applyBasePath(urlObj.pathname, request.nextUrl.basePath);
}
const headers = new Headers(request.headers);
headers.set(HEADER_LOCALE_NAME, locale);
const isRewriteNecessary = normalizeTrailingSlash(request.nextUrl.pathname) !== normalizeTrailingSlash(urlObj.pathname);
if (isRewriteNecessary) {
return NextResponse.rewrite(urlObj, {
request: {
headers
}
});
} else {
return NextResponse.next({
request: {
headers
}
});
}
}
function redirect(url, redirectDomain) {
const urlObj = new URL(url, request.url);
urlObj.pathname = normalizeTrailingSlash(urlObj.pathname);
if (domainsConfig.length > 0 && !redirectDomain && domain) {
const bestMatchingDomain = getBestMatchingDomain(domain, locale, domainsConfig);
if (bestMatchingDomain) {
redirectDomain = bestMatchingDomain.domain;
if (bestMatchingDomain.defaultLocale === locale && resolvedRouting.localePrefix.mode === 'as-needed') {
urlObj.pathname = getNormalizedPathname(urlObj.pathname, resolvedRouting.locales, resolvedRouting.localePrefix);
}
}
}
if (redirectDomain) {
urlObj.host = redirectDomain;
if (request.headers.get('x-forwarded-host')) {
urlObj.protocol = request.headers.get('x-forwarded-proto') ?? request.nextUrl.protocol;
const redirectDomainPort = redirectDomain.split(':')[1];
urlObj.port = redirectDomainPort ?? request.headers.get('x-forwarded-port') ?? '';
}
}
if (request.nextUrl.basePath) {
urlObj.pathname = applyBasePath(urlObj.pathname, request.nextUrl.basePath);
}
hasRedirected = true;
return NextResponse.redirect(urlObj.toString());
}
const unprefixedExternalPathname = getNormalizedPathname(externalPathname, resolvedRouting.locales, resolvedRouting.localePrefix);
const pathnameMatch = getPathnameMatch(externalPathname, resolvedRouting.locales, resolvedRouting.localePrefix, domain);
const hasLocalePrefix = pathnameMatch != null;
const isUnprefixedRouting = resolvedRouting.localePrefix.mode === 'never' || hasMatchedDefaultLocale && resolvedRouting.localePrefix.mode === 'as-needed';
let response;
let internalTemplateName;
let hasRedirected;
let unprefixedInternalPathname = unprefixedExternalPathname;
const pathnames = resolvedRouting.pathnames;
if (pathnames) {
let resolvedTemplateLocale;
[resolvedTemplateLocale, internalTemplateName] = getInternalTemplate(pathnames, unprefixedExternalPathname, locale);
if (internalTemplateName) {
const pathnameConfig = pathnames[internalTemplateName];
const localeTemplate = getLocalizedTemplate(pathnameConfig, locale, internalTemplateName);
if (matchesPathname(localeTemplate, unprefixedExternalPathname)) {
unprefixedInternalPathname = formatTemplatePathname(unprefixedExternalPathname, localeTemplate, internalTemplateName);
} else {
let sourceTemplate;
if (resolvedTemplateLocale) {
// A localized pathname from another locale has matched
sourceTemplate = getLocalizedTemplate(pathnameConfig, resolvedTemplateLocale, internalTemplateName);
} else {
// An internal pathname has matched that
// doesn't have a localized pathname
sourceTemplate = internalTemplateName;
}
const localePrefix = isUnprefixedRouting ? undefined : getLocalePrefix(locale, resolvedRouting.localePrefix);
const template = formatTemplatePathname(unprefixedExternalPathname, sourceTemplate, localeTemplate);
response = redirect(formatPathname(template, localePrefix, request.nextUrl.search));
}
}
}
if (!response) {
if (unprefixedInternalPathname === '/' && !hasLocalePrefix) {
if (isUnprefixedRouting) {
response = next(formatPathname(unprefixedInternalPathname, getLocaleAsPrefix(locale), request.nextUrl.search));
} else {
response = redirect(formatPathname(unprefixedExternalPathname, getLocalePrefix(locale, resolvedRouting.localePrefix), request.nextUrl.search));
}
} else {
const internalHref = formatPathname(unprefixedInternalPathname, getLocaleAsPrefix(locale), request.nextUrl.search);
if (hasLocalePrefix) {
const externalHref = formatPathname(unprefixedExternalPathname, pathnameMatch.prefix, request.nextUrl.search);
if (resolvedRouting.localePrefix.mode === 'never') {
response = redirect(formatPathname(unprefixedExternalPathname, undefined, request.nextUrl.search));
} else if (pathnameMatch.exact) {
if (hasMatchedDefaultLocale && isUnprefixedRouting) {
response = redirect(formatPathname(unprefixedExternalPathname, undefined, request.nextUrl.search));
} else {
if (resolvedRouting.domains) {
const pathDomain = getBestMatchingDomain(domain, pathnameMatch.locale, domainsConfig);
if (domain?.domain !== pathDomain?.domain && !hasUnknownHost) {
response = redirect(externalHref, pathDomain?.domain);
} else {
response = next(internalHref);
}
} else {
response = next(internalHref);
}
}
} else {
response = redirect(externalHref);
}
} else {
if (isUnprefixedRouting) {
response = next(internalHref);
} else {
response = redirect(formatPathname(unprefixedExternalPathname, getLocalePrefix(locale, resolvedRouting.localePrefix), request.nextUrl.search));
}
}
}
}
syncCookie(request, response, locale, resolvedRouting, domain);
if (!hasRedirected && resolvedRouting.localePrefix.mode !== 'never' && resolvedRouting.alternateLinks && resolvedRouting.locales.length > 1) {
response.headers.set('Link', getAlternateLinksHeaderValue({
routing: resolvedRouting,
internalTemplateName,
localizedPathnames: internalTemplateName != null && pathnames ? pathnames[internalTemplateName] : undefined,
request,
resolvedLocale: locale
}));
}
return response;
};
}
export { createMiddleware as default };

View File

@@ -0,0 +1,19 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.default = void 0;
var _getScrollAccessor = _interopRequireDefault(require("./getScrollAccessor"));
/**
* Gets or sets the scroll left position of a given element.
*
* @param node the element
* @param val the position to set
*/
var _default = (0, _getScrollAccessor.default)('pageXOffset');
exports.default = _default;
module.exports = exports["default"];

View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2016-2025 Matteo Collina, David Mark Clements and the Pino contributors listed at <https://github.com/pinojs/pino#the-team> and in the README file.
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,30 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import type { EditorConfig, LexicalNode, SerializedTextNode } from 'lexical';
import { TextNode } from 'lexical';
/** @noInheritDoc */
export declare class HashtagNode extends TextNode {
static getType(): string;
static clone(node: HashtagNode): HashtagNode;
createDOM(config: EditorConfig): HTMLElement;
static importJSON(serializedNode: SerializedTextNode): HashtagNode;
canInsertTextBefore(): boolean;
isTextEntity(): true;
}
/**
* Generates a HashtagNode, which is a string following the format of a # followed by some text, eg. #lexical.
* @param text - The text used inside the HashtagNode.
* @returns - The HashtagNode with the embedded text.
*/
export declare function $createHashtagNode(text?: string): HashtagNode;
/**
* Determines if node is a HashtagNode.
* @param node - The node to be checked.
* @returns true if node is a HashtagNode, false otherwise.
*/
export declare function $isHashtagNode(node: LexicalNode | null | undefined): node is HashtagNode;

View File

@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "defaultLocale", {
enumerable: true,
get: function () {
return _index.enUS;
},
});
var _index = require("../locale/en-US.js");

View File

@@ -0,0 +1,600 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var sheet = require('@emotion/sheet');
var stylis = require('stylis');
require('@emotion/weak-memoize');
require('@emotion/memoize');
var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
var previous = 0;
var character = 0;
while (true) {
previous = character;
character = stylis.peek(); // &\f
if (previous === 38 && character === 12) {
points[index] = 1;
}
if (stylis.token(character)) {
break;
}
stylis.next();
}
return stylis.slice(begin, stylis.position);
};
var toRules = function toRules(parsed, points) {
// pretend we've started with a comma
var index = -1;
var character = 44;
do {
switch (stylis.token(character)) {
case 0:
// &\f
if (character === 38 && stylis.peek() === 12) {
// this is not 100% correct, we don't account for literal sequences here - like for example quoted strings
// stylis inserts \f after & to know when & where it should replace this sequence with the context selector
// and when it should just concatenate the outer and inner selectors
// it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here
points[index] = 1;
}
parsed[index] += identifierWithPointTracking(stylis.position - 1, points, index);
break;
case 2:
parsed[index] += stylis.delimit(character);
break;
case 4:
// comma
if (character === 44) {
// colon
parsed[++index] = stylis.peek() === 58 ? '&\f' : '';
points[index] = parsed[index].length;
break;
}
// fallthrough
default:
parsed[index] += stylis.from(character);
}
} while (character = stylis.next());
return parsed;
};
var getRules = function getRules(value, points) {
return stylis.dealloc(toRules(stylis.alloc(value), points));
}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11
var fixedElements = /* #__PURE__ */new WeakMap();
var compat = function compat(element) {
if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo
// negative .length indicates that this rule has been already prefixed
element.length < 1) {
return;
}
var value = element.value;
var parent = element.parent;
var isImplicitRule = element.column === parent.column && element.line === parent.line;
while (parent.type !== 'rule') {
parent = parent.parent;
if (!parent) return;
} // short-circuit for the simplest case
if (element.props.length === 1 && value.charCodeAt(0) !== 58
/* colon */
&& !fixedElements.get(parent)) {
return;
} // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)
// then the props has already been manipulated beforehand as they that array is shared between it and its "rule parent"
if (isImplicitRule) {
return;
}
fixedElements.set(element, true);
var points = [];
var rules = getRules(value, points);
var parentRules = parent.props;
for (var i = 0, k = 0; i < rules.length; i++) {
for (var j = 0; j < parentRules.length; j++, k++) {
element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i];
}
}
};
var removeLabel = function removeLabel(element) {
if (element.type === 'decl') {
var value = element.value;
if ( // charcode for l
value.charCodeAt(0) === 108 && // charcode for b
value.charCodeAt(2) === 98) {
// this ignores label
element["return"] = '';
element.value = '';
}
}
};
var ignoreFlag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';
var isIgnoringComment = function isIgnoringComment(element) {
return element.type === 'comm' && element.children.indexOf(ignoreFlag) > -1;
};
var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm(cache) {
return function (element, index, children) {
if (element.type !== 'rule' || cache.compat) return;
var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);
if (unsafePseudoClasses) {
var isNested = !!element.parent; // in nested rules comments become children of the "auto-inserted" rule and that's always the `element.parent`
//
// considering this input:
// .a {
// .b /* comm */ {}
// color: hotpink;
// }
// we get output corresponding to this:
// .a {
// & {
// /* comm */
// color: hotpink;
// }
// .b {}
// }
var commentContainer = isNested ? element.parent.children : // global rule at the root level
children;
for (var i = commentContainer.length - 1; i >= 0; i--) {
var node = commentContainer[i];
if (node.line < element.line) {
break;
} // it is quite weird but comments are *usually* put at `column: element.column - 1`
// so we seek *from the end* for the node that is earlier than the rule's `element` and check that
// this will also match inputs like this:
// .a {
// /* comm */
// .b {}
// }
//
// but that is fine
//
// it would be the easiest to change the placement of the comment to be the first child of the rule:
// .a {
// .b { /* comm */ }
// }
// with such inputs we wouldn't have to search for the comment at all
// TODO: consider changing this comment placement in the next major version
if (node.column < element.column) {
if (isIgnoringComment(node)) {
return;
}
break;
}
}
unsafePseudoClasses.forEach(function (unsafePseudoClass) {
console.error("The pseudo class \"" + unsafePseudoClass + "\" is potentially unsafe when doing server-side rendering. Try changing it to \"" + unsafePseudoClass.split('-child')[0] + "-of-type\".");
});
}
};
};
var isImportRule = function isImportRule(element) {
return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64;
};
var isPrependedWithRegularRules = function isPrependedWithRegularRules(index, children) {
for (var i = index - 1; i >= 0; i--) {
if (!isImportRule(children[i])) {
return true;
}
}
return false;
}; // use this to remove incorrect elements from further processing
// so they don't get handed to the `sheet` (or anything else)
// as that could potentially lead to additional logs which in turn could be overhelming to the user
var nullifyElement = function nullifyElement(element) {
element.type = '';
element.value = '';
element["return"] = '';
element.children = '';
element.props = '';
};
var incorrectImportAlarm = function incorrectImportAlarm(element, index, children) {
if (!isImportRule(element)) {
return;
}
if (element.parent) {
console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles.");
nullifyElement(element);
} else if (isPrependedWithRegularRules(index, children)) {
console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules.");
nullifyElement(element);
}
};
/* eslint-disable no-fallthrough */
function prefix(value, length) {
switch (stylis.hash(value, length)) {
// color-adjust
case 5103:
return stylis.WEBKIT + 'print-' + value + value;
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
case 5737:
case 4201:
case 3177:
case 3433:
case 1641:
case 4457:
case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
case 5572:
case 6356:
case 5844:
case 3191:
case 6645:
case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
case 6391:
case 5879:
case 5623:
case 6135:
case 4599:
case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
case 4215:
case 6389:
case 5109:
case 5365:
case 5621:
case 3829:
return stylis.WEBKIT + value + value;
// appearance, user-select, transform, hyphens, text-size-adjust
case 5349:
case 4246:
case 4810:
case 6968:
case 2756:
return stylis.WEBKIT + value + stylis.MOZ + value + stylis.MS + value + value;
// flex, flex-direction
case 6828:
case 4268:
return stylis.WEBKIT + value + stylis.MS + value + value;
// order
case 6165:
return stylis.WEBKIT + value + stylis.MS + 'flex-' + value + value;
// align-items
case 5187:
return stylis.WEBKIT + value + stylis.replace(value, /(\w+).+(:[^]+)/, stylis.WEBKIT + 'box-$1$2' + stylis.MS + 'flex-$1$2') + value;
// align-self
case 5443:
return stylis.WEBKIT + value + stylis.MS + 'flex-item-' + stylis.replace(value, /flex-|-self/, '') + value;
// align-content
case 4675:
return stylis.WEBKIT + value + stylis.MS + 'flex-line-pack' + stylis.replace(value, /align-content|flex-|-self/, '') + value;
// flex-shrink
case 5548:
return stylis.WEBKIT + value + stylis.MS + stylis.replace(value, 'shrink', 'negative') + value;
// flex-basis
case 5292:
return stylis.WEBKIT + value + stylis.MS + stylis.replace(value, 'basis', 'preferred-size') + value;
// flex-grow
case 6060:
return stylis.WEBKIT + 'box-' + stylis.replace(value, '-grow', '') + stylis.WEBKIT + value + stylis.MS + stylis.replace(value, 'grow', 'positive') + value;
// transition
case 4554:
return stylis.WEBKIT + stylis.replace(value, /([^-])(transform)/g, '$1' + stylis.WEBKIT + '$2') + value;
// cursor
case 6187:
return stylis.replace(stylis.replace(stylis.replace(value, /(zoom-|grab)/, stylis.WEBKIT + '$1'), /(image-set)/, stylis.WEBKIT + '$1'), value, '') + value;
// background, background-image
case 5495:
case 3959:
return stylis.replace(value, /(image-set\([^]*)/, stylis.WEBKIT + '$1' + '$`$1');
// justify-content
case 4968:
return stylis.replace(stylis.replace(value, /(.+:)(flex-)?(.*)/, stylis.WEBKIT + 'box-pack:$3' + stylis.MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + stylis.WEBKIT + value + value;
// (margin|padding)-inline-(start|end)
case 4095:
case 3583:
case 4068:
case 2532:
return stylis.replace(value, /(.+)-inline(.+)/, stylis.WEBKIT + '$1$2') + value;
// (min|max)?(width|height|inline-size|block-size)
case 8116:
case 7059:
case 5753:
case 5535:
case 5445:
case 5701:
case 4933:
case 4677:
case 5533:
case 5789:
case 5021:
case 4765:
// stretch, max-content, min-content, fill-available
if (stylis.strlen(value) - 1 - length > 6) switch (stylis.charat(value, length + 1)) {
// (m)ax-content, (m)in-content
case 109:
// -
if (stylis.charat(value, length + 4) !== 45) break;
// (f)ill-available, (f)it-content
case 102:
return stylis.replace(value, /(.+:)(.+)-([^]+)/, '$1' + stylis.WEBKIT + '$2-$3' + '$1' + stylis.MOZ + (stylis.charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;
// (s)tretch
case 115:
return ~stylis.indexof(value, 'stretch') ? prefix(stylis.replace(value, 'stretch', 'fill-available'), length) + value : value;
}
break;
// position: sticky
case 4949:
// (s)ticky?
if (stylis.charat(value, length + 1) !== 115) break;
// display: (flex|inline-flex)
case 6444:
switch (stylis.charat(value, stylis.strlen(value) - 3 - (~stylis.indexof(value, '!important') && 10))) {
// stic(k)y
case 107:
return stylis.replace(value, ':', ':' + stylis.WEBKIT) + value;
// (inline-)?fl(e)x
case 101:
return stylis.replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + stylis.WEBKIT + (stylis.charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + stylis.WEBKIT + '$2$3' + '$1' + stylis.MS + '$2box$3') + value;
}
break;
// writing-mode
case 5936:
switch (stylis.charat(value, length + 11)) {
// vertical-l(r)
case 114:
return stylis.WEBKIT + value + stylis.MS + stylis.replace(value, /[svh]\w+-[tblr]{2}/, 'tb') + value;
// vertical-r(l)
case 108:
return stylis.WEBKIT + value + stylis.MS + stylis.replace(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value;
// horizontal(-)tb
case 45:
return stylis.WEBKIT + value + stylis.MS + stylis.replace(value, /[svh]\w+-[tblr]{2}/, 'lr') + value;
}
return stylis.WEBKIT + value + stylis.MS + value + value;
}
return value;
}
var prefixer = function prefixer(element, index, children, callback) {
if (element.length > -1) if (!element["return"]) switch (element.type) {
case stylis.DECLARATION:
element["return"] = prefix(element.value, element.length);
break;
case stylis.KEYFRAMES:
return stylis.serialize([stylis.copy(element, {
value: stylis.replace(element.value, '@', '@' + stylis.WEBKIT)
})], callback);
case stylis.RULESET:
if (element.length) return stylis.combine(element.props, function (value) {
switch (stylis.match(value, /(::plac\w+|:read-\w+)/)) {
// :read-(only|write)
case ':read-only':
case ':read-write':
return stylis.serialize([stylis.copy(element, {
props: [stylis.replace(value, /:(read-\w+)/, ':' + stylis.MOZ + '$1')]
})], callback);
// :placeholder
case '::placeholder':
return stylis.serialize([stylis.copy(element, {
props: [stylis.replace(value, /:(plac\w+)/, ':' + stylis.WEBKIT + 'input-$1')]
}), stylis.copy(element, {
props: [stylis.replace(value, /:(plac\w+)/, ':' + stylis.MOZ + '$1')]
}), stylis.copy(element, {
props: [stylis.replace(value, /:(plac\w+)/, stylis.MS + 'input-$1')]
})], callback);
}
return '';
});
}
};
var defaultStylisPlugins = [prefixer];
var getSourceMap;
{
var sourceMapPattern = /\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;
getSourceMap = function getSourceMap(styles) {
var matches = styles.match(sourceMapPattern);
if (!matches) return;
return matches[matches.length - 1];
};
}
var createCache = function createCache(options) {
var key = options.key;
if (!key) {
throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\n" + "If multiple caches share the same key they might \"fight\" for each other's style elements.");
}
if (key === 'css') {
var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); // get SSRed styles out of the way of React's hydration
// document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)
// note this very very intentionally targets all style elements regardless of the key to ensure
// that creating a cache works inside of render of a React component
Array.prototype.forEach.call(ssrStyles, function (node) {
// we want to only move elements which have a space in the data-emotion attribute value
// because that indicates that it is an Emotion 11 server-side rendered style elements
// while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector
// Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)
// so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles
// will not result in the Emotion 10 styles being destroyed
var dataEmotionAttribute = node.getAttribute('data-emotion');
if (dataEmotionAttribute.indexOf(' ') === -1) {
return;
}
document.head.appendChild(node);
node.setAttribute('data-s', '');
});
}
var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;
{
if (/[^a-z-]/.test(key)) {
throw new Error("Emotion key must only contain lower case alphabetical characters and - but \"" + key + "\" was passed");
}
}
var inserted = {};
var container;
var nodesToHydrate = [];
{
container = options.container || document.head;
Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
document.querySelectorAll("style[data-emotion^=\"" + key + " \"]"), function (node) {
var attrib = node.getAttribute("data-emotion").split(' ');
for (var i = 1; i < attrib.length; i++) {
inserted[attrib[i]] = true;
}
nodesToHydrate.push(node);
});
}
var _insert;
var omnipresentPlugins = [compat, removeLabel];
{
omnipresentPlugins.push(createUnsafeSelectorsAlarm({
get compat() {
return cache.compat;
}
}), incorrectImportAlarm);
}
{
var currentSheet;
var finalizingPlugins = [stylis.stringify, function (element) {
if (!element.root) {
if (element["return"]) {
currentSheet.insert(element["return"]);
} else if (element.value && element.type !== stylis.COMMENT) {
// insert empty rule in non-production environments
// so @emotion/jest can grab `key` from the (JS)DOM for caches without any rules inserted yet
currentSheet.insert(element.value + "{}");
}
}
} ];
var serializer = stylis.middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
var stylis$1 = function stylis$1(styles) {
return stylis.serialize(stylis.compile(styles), serializer);
};
_insert = function insert(selector, serialized, sheet, shouldCache) {
currentSheet = sheet;
if (getSourceMap) {
var sourceMap = getSourceMap(serialized.styles);
if (sourceMap) {
currentSheet = {
insert: function insert(rule) {
sheet.insert(rule + sourceMap);
}
};
}
}
stylis$1(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
if (shouldCache) {
cache.inserted[serialized.name] = true;
}
};
}
var cache = {
key: key,
sheet: new sheet.StyleSheet({
key: key,
container: container,
nonce: options.nonce,
speedy: options.speedy,
prepend: options.prepend,
insertionPoint: options.insertionPoint
}),
nonce: options.nonce,
inserted: inserted,
registered: {},
insert: _insert
};
cache.sheet.hydrate(nodesToHydrate);
return cache;
};
exports["default"] = createCache;

View File

@@ -0,0 +1,223 @@
#!/usr/bin/env node
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
// lib/npm/node-platform.ts
var fs = require("fs");
var os = require("os");
var path = require("path");
var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH;
var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild";
var packageDarwin_arm64 = "@esbuild/darwin-arm64";
var packageDarwin_x64 = "@esbuild/darwin-x64";
var knownWindowsPackages = {
"win32 arm64 LE": "@esbuild/win32-arm64",
"win32 ia32 LE": "@esbuild/win32-ia32",
"win32 x64 LE": "@esbuild/win32-x64"
};
var knownUnixlikePackages = {
"aix ppc64 BE": "@esbuild/aix-ppc64",
"android arm64 LE": "@esbuild/android-arm64",
"darwin arm64 LE": "@esbuild/darwin-arm64",
"darwin x64 LE": "@esbuild/darwin-x64",
"freebsd arm64 LE": "@esbuild/freebsd-arm64",
"freebsd x64 LE": "@esbuild/freebsd-x64",
"linux arm LE": "@esbuild/linux-arm",
"linux arm64 LE": "@esbuild/linux-arm64",
"linux ia32 LE": "@esbuild/linux-ia32",
"linux mips64el LE": "@esbuild/linux-mips64el",
"linux ppc64 LE": "@esbuild/linux-ppc64",
"linux riscv64 LE": "@esbuild/linux-riscv64",
"linux s390x BE": "@esbuild/linux-s390x",
"linux x64 LE": "@esbuild/linux-x64",
"linux loong64 LE": "@esbuild/linux-loong64",
"netbsd arm64 LE": "@esbuild/netbsd-arm64",
"netbsd x64 LE": "@esbuild/netbsd-x64",
"openbsd arm64 LE": "@esbuild/openbsd-arm64",
"openbsd x64 LE": "@esbuild/openbsd-x64",
"sunos x64 LE": "@esbuild/sunos-x64"
};
var knownWebAssemblyFallbackPackages = {
"android arm LE": "@esbuild/android-arm",
"android x64 LE": "@esbuild/android-x64",
"openharmony arm64 LE": "@esbuild/openharmony-arm64"
};
function pkgAndSubpathForCurrentPlatform() {
let pkg;
let subpath;
let isWASM2 = false;
let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`;
if (platformKey in knownWindowsPackages) {
pkg = knownWindowsPackages[platformKey];
subpath = "esbuild.exe";
} else if (platformKey in knownUnixlikePackages) {
pkg = knownUnixlikePackages[platformKey];
subpath = "bin/esbuild";
} else if (platformKey in knownWebAssemblyFallbackPackages) {
pkg = knownWebAssemblyFallbackPackages[platformKey];
subpath = "bin/esbuild";
isWASM2 = true;
} else {
throw new Error(`Unsupported platform: ${platformKey}`);
}
return { pkg, subpath, isWASM: isWASM2 };
}
function pkgForSomeOtherPlatform() {
const libMainJS = require.resolve("esbuild");
const nodeModulesDirectory = path.dirname(path.dirname(path.dirname(libMainJS)));
if (path.basename(nodeModulesDirectory) === "node_modules") {
for (const unixKey in knownUnixlikePackages) {
try {
const pkg = knownUnixlikePackages[unixKey];
if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) return pkg;
} catch {
}
}
for (const windowsKey in knownWindowsPackages) {
try {
const pkg = knownWindowsPackages[windowsKey];
if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) return pkg;
} catch {
}
}
}
return null;
}
function downloadedBinPath(pkg, subpath) {
const esbuildLibDir = path.dirname(require.resolve("esbuild"));
return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`);
}
function generateBinPath() {
if (isValidBinaryPath(ESBUILD_BINARY_PATH)) {
if (!fs.existsSync(ESBUILD_BINARY_PATH)) {
console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`);
} else {
return { binPath: ESBUILD_BINARY_PATH, isWASM: false };
}
}
const { pkg, subpath, isWASM: isWASM2 } = pkgAndSubpathForCurrentPlatform();
let binPath2;
try {
binPath2 = require.resolve(`${pkg}/${subpath}`);
} catch (e) {
binPath2 = downloadedBinPath(pkg, subpath);
if (!fs.existsSync(binPath2)) {
try {
require.resolve(pkg);
} catch {
const otherPkg = pkgForSomeOtherPlatform();
if (otherPkg) {
let suggestions = `
Specifically the "${otherPkg}" package is present but this platform
needs the "${pkg}" package instead. People often get into this
situation by installing esbuild on Windows or macOS and copying "node_modules"
into a Docker image that runs Linux, or by copying "node_modules" between
Windows and WSL environments.
If you are installing with npm, you can try not copying the "node_modules"
directory when you copy the files over, and running "npm ci" or "npm install"
on the destination platform after the copy. Or you could consider using yarn
instead of npm which has built-in support for installing a package on multiple
platforms simultaneously.
If you are installing with yarn, you can try listing both this platform and the
other platform in your ".yarnrc.yml" file using the "supportedArchitectures"
feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
Keep in mind that this means multiple copies of esbuild will be present.
`;
if (pkg === packageDarwin_x64 && otherPkg === packageDarwin_arm64 || pkg === packageDarwin_arm64 && otherPkg === packageDarwin_x64) {
suggestions = `
Specifically the "${otherPkg}" package is present but this platform
needs the "${pkg}" package instead. People often get into this
situation by installing esbuild with npm running inside of Rosetta 2 and then
trying to use it with node running outside of Rosetta 2, or vice versa (Rosetta
2 is Apple's on-the-fly x86_64-to-arm64 translation service).
If you are installing with npm, you can try ensuring that both npm and node are
not running under Rosetta 2 and then reinstalling esbuild. This likely involves
changing how you installed npm and/or node. For example, installing node with
the universal installer here should work: https://nodejs.org/en/download/. Or
you could consider using yarn instead of npm which has built-in support for
installing a package on multiple platforms simultaneously.
If you are installing with yarn, you can try listing both "arm64" and "x64"
in your ".yarnrc.yml" file using the "supportedArchitectures" feature:
https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
Keep in mind that this means multiple copies of esbuild will be present.
`;
}
throw new Error(`
You installed esbuild for another platform than the one you're currently using.
This won't work because esbuild is written with native code and needs to
install a platform-specific binary executable.
${suggestions}
Another alternative is to use the "esbuild-wasm" package instead, which works
the same way on all platforms. But it comes with a heavy performance cost and
can sometimes be 10x slower than the "esbuild" package, so you may also not
want to do that.
`);
}
throw new Error(`The package "${pkg}" could not be found, and is needed by esbuild.
If you are installing esbuild with npm, make sure that you don't specify the
"--no-optional" or "--omit=optional" flags. The "optionalDependencies" feature
of "package.json" is used by esbuild to install the correct binary executable
for your current platform.`);
}
throw e;
}
}
if (/\.zip\//.test(binPath2)) {
let pnpapi;
try {
pnpapi = require("pnpapi");
} catch (e) {
}
if (pnpapi) {
const root = pnpapi.getPackageInformation(pnpapi.topLevel).packageLocation;
const binTargetPath = path.join(
root,
"node_modules",
".cache",
"esbuild",
`pnpapi-${pkg.replace("/", "-")}-${"0.25.12"}-${path.basename(subpath)}`
);
if (!fs.existsSync(binTargetPath)) {
fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
fs.copyFileSync(binPath2, binTargetPath);
fs.chmodSync(binTargetPath, 493);
}
return { binPath: binTargetPath, isWASM: isWASM2 };
}
}
return { binPath: binPath2, isWASM: isWASM2 };
}
// lib/npm/node-shim.ts
var { binPath, isWASM } = generateBinPath();
if (isWASM) {
require("child_process").execFileSync("node", [binPath].concat(process.argv.slice(2)), { stdio: "inherit" });
} else {
require("child_process").execFileSync(binPath, process.argv.slice(2), { stdio: "inherit" });
}

View File

@@ -0,0 +1,19 @@
import type { PayloadRequest } from 'payload';
import type { DrizzleAdapter } from '../types.js';
type HandleUpsertErrorArgs = {
adapter: DrizzleAdapter;
collectionSlug?: string;
error: unknown;
globalSlug?: string;
id?: number | string;
req?: Partial<PayloadRequest>;
tableName: string;
};
/**
* Handles unique constraint violation errors from PostgreSQL and SQLite,
* converting them to Payload ValidationErrors.
* Re-throws non-constraint errors unchanged.
*/
export declare const handleUpsertError: ({ id, adapter, collectionSlug, error: caughtError, globalSlug, req, tableName, }: HandleUpsertErrorArgs) => never;
export {};
//# sourceMappingURL=handleUpsertError.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"killTransaction.d.ts","sourceRoot":"","sources":["../../src/utilities/killTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEvD;;GAEG;AACH,wBAAsB,eAAe,CACnC,GAAG,EAAE,YAAY,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,SAAS,CAAC,GACpD,OAAO,CAAC,IAAI,CAAC,CAUf"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"dice-3.js","sources":["../../../src/icons/dice-3.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Dice3\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiByeT0iMiIgLz4KICA8cGF0aCBkPSJNMTYgOGguMDEiIC8+CiAgPHBhdGggZD0iTTEyIDEyaC4wMSIgLz4KICA8cGF0aCBkPSJNOCAxNmguMDEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/dice-3\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 Dice3 = createLucideIcon('Dice3', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', ry: '2', key: '1m3agn' }],\n ['path', { d: 'M16 8h.01', key: 'cr5u4v' }],\n ['path', { d: 'M12 12h.01', key: '1mp3jc' }],\n ['path', { d: 'M8 16h.01', key: '18s6g9' }],\n]);\n\nexport default Dice3;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CAAA,CACtC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,KAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAQ,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,EAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,KAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAA,EAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAU,CAAA,CAAA;AAAA,CAAA,CACvF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5C,CAAC,CAAA,CAAA;;"}

View File

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

View File

@@ -0,0 +1,39 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.js";
const dateFormats = {
full: "EEEE, do MMMM y",
long: "do MMMM y",
medium: "do MMM y",
short: "dd.MM.y",
};
const timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm",
};
const dateTimeFormats = {
full: "{{date}} {{time}}",
long: "{{date}} {{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,126 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const api = require('@opentelemetry/api');
const instrumentationGraphql = require('@opentelemetry/instrumentation-graphql');
const core = require('@sentry/core');
const nodeCore = require('@sentry/node-core');
const opentelemetry = require('@sentry/opentelemetry');
const INTEGRATION_NAME = 'Graphql';
const instrumentGraphql = nodeCore.generateInstrumentOnce(
INTEGRATION_NAME,
instrumentationGraphql.GraphQLInstrumentation,
(_options) => {
const options = getOptionsWithDefaults(_options);
return {
...options,
responseHook(span, result) {
nodeCore.addOriginToSpan(span, 'auto.graphql.otel.graphql');
// We want to ensure spans are marked as errored if there are errors in the result
// We only do that if the span is not already marked with a status
const resultWithMaybeError = result ;
if (resultWithMaybeError.errors?.length && !core.spanToJSON(span).status) {
span.setStatus({ code: api.SpanStatusCode.ERROR });
}
const attributes = core.spanToJSON(span).data;
// If operation.name is not set, we fall back to use operation.type only
const operationType = attributes['graphql.operation.type'];
const operationName = attributes['graphql.operation.name'];
if (options.useOperationNameForRootSpan && operationType) {
const rootSpan = core.getRootSpan(span);
const rootSpanAttributes = core.spanToJSON(rootSpan).data;
const existingOperations = rootSpanAttributes[opentelemetry.SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION] || [];
const newOperation = operationName ? `${operationType} ${operationName}` : `${operationType}`;
// We keep track of each operation on the root span
// This can either be a string, or an array of strings (if there are multiple operations)
if (Array.isArray(existingOperations)) {
(existingOperations ).push(newOperation);
rootSpan.setAttribute(opentelemetry.SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION, existingOperations);
} else if (typeof existingOperations === 'string') {
rootSpan.setAttribute(opentelemetry.SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION, [existingOperations, newOperation]);
} else {
rootSpan.setAttribute(opentelemetry.SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION, newOperation);
}
if (!core.spanToJSON(rootSpan).data['original-description']) {
rootSpan.setAttribute('original-description', core.spanToJSON(rootSpan).description);
}
// Important for e.g. @sentry/aws-serverless because this would otherwise overwrite the name again
rootSpan.updateName(
`${core.spanToJSON(rootSpan).data['original-description']} (${getGraphqlOperationNamesFromAttribute(
existingOperations,
)})`,
);
}
},
};
},
);
const _graphqlIntegration = ((options = {}) => {
return {
name: INTEGRATION_NAME,
setupOnce() {
// We set defaults here, too, because otherwise we'd update the instrumentation config
// to the config without defaults, as `generateInstrumentOnce` automatically calls `setConfig(options)`
// when being called the second time
instrumentGraphql(getOptionsWithDefaults(options));
},
};
}) ;
/**
* Adds Sentry tracing instrumentation for the [graphql](https://www.npmjs.com/package/graphql) library.
*
* For more information, see the [`graphqlIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/graphql/).
*
* @param {GraphqlOptions} options Configuration options for the GraphQL integration.
*
* @example
* ```javascript
* const Sentry = require('@sentry/node');
*
* Sentry.init({
* integrations: [Sentry.graphqlIntegration()],
* });
*/
const graphqlIntegration = core.defineIntegration(_graphqlIntegration);
function getOptionsWithDefaults(options) {
return {
ignoreResolveSpans: true,
ignoreTrivialResolveSpans: true,
useOperationNameForRootSpan: true,
...options,
};
}
// copy from packages/opentelemetry/utils
function getGraphqlOperationNamesFromAttribute(attr) {
if (Array.isArray(attr)) {
const sorted = attr.slice().sort();
// Up to 5 items, we just add all of them
if (sorted.length <= 5) {
return sorted.join(', ');
} else {
// Else, we add the first 5 and the diff of other operations
return `${sorted.slice(0, 5).join(', ')}, +${sorted.length - 5}`;
}
}
return `${attr}`;
}
exports.graphqlIntegration = graphqlIntegration;
exports.instrumentGraphql = instrumentGraphql;
//# sourceMappingURL=graphql.js.map

View File

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

View File

@@ -0,0 +1,2 @@
import { Coordinates } from '@dnd-kit/utilities';
export declare function useScrollOffsetsDelta(scrollOffsets: Coordinates, dependencies?: any[]): Coordinates;

View File

@@ -0,0 +1,111 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const integration = require('../integration.js');
const path = require('../utils/path.js');
const worldwide = require('../utils/worldwide.js');
const INTEGRATION_NAME = 'RewriteFrames';
/**
* Rewrite event frames paths.
*/
const rewriteFramesIntegration = integration.defineIntegration((options = {}) => {
const root = options.root;
const prefix = options.prefix || 'app:///';
const isBrowser = 'window' in worldwide.GLOBAL_OBJ && !!worldwide.GLOBAL_OBJ.window;
const iteratee = options.iteratee || generateIteratee({ isBrowser, root, prefix });
/** Process an exception event. */
function _processExceptionsEvent(event) {
try {
return {
...event,
exception: {
...event.exception,
// The check for this is performed inside `process` call itself, safe to skip here
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
values: event.exception.values.map(value => ({
...value,
...(value.stacktrace && { stacktrace: _processStacktrace(value.stacktrace) }),
})),
},
};
} catch {
return event;
}
}
/** Process a stack trace. */
function _processStacktrace(stacktrace) {
return {
...stacktrace,
frames: stacktrace?.frames?.map(f => iteratee(f)),
};
}
return {
name: INTEGRATION_NAME,
processEvent(originalEvent) {
let processedEvent = originalEvent;
if (originalEvent.exception && Array.isArray(originalEvent.exception.values)) {
processedEvent = _processExceptionsEvent(processedEvent);
}
return processedEvent;
},
};
});
/**
* Exported only for tests.
*/
function generateIteratee({
isBrowser,
root,
prefix,
}
) {
return (frame) => {
if (!frame.filename) {
return frame;
}
// Determine if this is a Windows frame by checking for a Windows-style prefix such as `C:\`
const isWindowsFrame =
/^[a-zA-Z]:\\/.test(frame.filename) ||
// or the presence of a backslash without a forward slash (which are not allowed on Windows)
(frame.filename.includes('\\') && !frame.filename.includes('/'));
// Check if the frame filename begins with `/`
const startsWithSlash = /^\//.test(frame.filename);
if (isBrowser) {
if (root) {
const oldFilename = frame.filename;
if (oldFilename.indexOf(root) === 0) {
frame.filename = oldFilename.replace(root, prefix);
}
}
} else {
if (isWindowsFrame || startsWithSlash) {
const filename = isWindowsFrame
? frame.filename
.replace(/^[a-zA-Z]:/, '') // remove Windows-style prefix
.replace(/\\/g, '/') // replace all `\\` instances with `/`
: frame.filename;
const base = root ? path.relative(root, filename) : path.basename(filename);
frame.filename = `${prefix}${base}`;
}
}
return frame;
};
}
exports.generateIteratee = generateIteratee;
exports.rewriteFramesIntegration = rewriteFramesIntegration;
//# sourceMappingURL=rewriteframes.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../../../src/logs/public-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,KAAK,EAAE,GAAG,EAAoB,MAAM,oBAAoB,CAAC;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAsBvE;;GAEG;AACH,UAAU,kBAAkB;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,KAAK,CACnB,OAAO,EAAE,mBAAmB,EAC5B,UAAU,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,EAC9B,EAAE,KAAK,EAAE,GAAE,kBAAuB,GACjC,IAAI,CAEN;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,KAAK,CACnB,OAAO,EAAE,mBAAmB,EAC5B,UAAU,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,EAC9B,EAAE,KAAK,EAAE,GAAE,kBAAuB,GACjC,IAAI,CAEN;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,IAAI,CAClB,OAAO,EAAE,mBAAmB,EAC5B,UAAU,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,EAC9B,EAAE,KAAK,EAAE,GAAE,kBAAuB,GACjC,IAAI,CAEN;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,IAAI,CAClB,OAAO,EAAE,mBAAmB,EAC5B,UAAU,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,EAC9B,EAAE,KAAK,EAAE,GAAE,kBAAuB,GACjC,IAAI,CAEN;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,KAAK,CACnB,OAAO,EAAE,mBAAmB,EAC5B,UAAU,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,EAC9B,EAAE,KAAK,EAAE,GAAE,kBAAuB,GACjC,IAAI,CAEN;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,KAAK,CACnB,OAAO,EAAE,mBAAmB,EAC5B,UAAU,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,EAC9B,EAAE,KAAK,EAAE,GAAE,kBAAuB,GACjC,IAAI,CAEN;AAED,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"useQueue.js","names":["useCallback","useRef","useQueue","queue","isProcessing","queueTask","fn","options","current","push","processQueue","beforeProcess","shouldContinue","length","latestTask","pop","err","console","error","afterProcess"],"sources":["../../src/hooks/useQueue.ts"],"sourcesContent":["import { useCallback, useRef } from 'react'\n\ntype QueuedFunction = () => Promise<void>\n\ntype QueuedTaskOptions = {\n /**\n * A function that is called after the queue has processed a function\n * Used to perform side effects after processing the queue\n * @returns {void}\n */\n afterProcess?: () => void\n /**\n * A function that can be used to prevent the queue from processing under certain conditions\n * Can also be used to perform side effects before processing the queue\n * @returns {boolean} If `false`, the queue will not process\n */\n beforeProcess?: () => boolean | void\n}\n\ntype QueueTask = (fn: QueuedFunction, options?: QueuedTaskOptions) => void\n\n/**\n * A React hook that allows you to queue up functions to be executed in order.\n * This is useful when you need to ensure long running networks requests are processed sequentially.\n * Builds up a \"queue\" of functions to be executed in order, only ever processing the last function in the queue.\n * This ensures that a long queue of tasks doesn't cause a backlog of tasks to be processed.\n * E.g. if you queue a task and it begins running, then you queue 9 more tasks:\n * 1. The currently task will finish\n * 2. The next task in the queue will run\n * 3. All remaining tasks will be discarded\n * @returns {queueTask} A function used to queue a function.\n * @example\n * const { queueTask } = useQueue()\n * queueTask(async () => {\n * await fetch('https://api.example.com')\n * })\n */\nexport function useQueue(): {\n queueTask: QueueTask\n} {\n const queue = useRef<QueuedFunction[]>([])\n\n const isProcessing = useRef(false)\n\n const queueTask = useCallback<QueueTask>((fn, options) => {\n queue.current.push(fn)\n\n async function processQueue() {\n if (isProcessing.current) {\n return\n }\n\n // Allow the consumer to prevent the queue from processing under certain conditions\n if (typeof options?.beforeProcess === 'function') {\n const shouldContinue = options.beforeProcess()\n\n if (shouldContinue === false) {\n return\n }\n }\n\n while (queue.current.length > 0) {\n const latestTask = queue.current.pop() // Only process the last task in the queue\n queue.current = [] // Discard all other tasks\n\n isProcessing.current = true\n\n try {\n await latestTask()\n } catch (err) {\n console.error('Error in queued function:', err) // eslint-disable-line no-console\n } finally {\n isProcessing.current = false\n\n if (typeof options?.afterProcess === 'function') {\n options.afterProcess()\n }\n }\n }\n }\n\n void processQueue()\n }, [])\n\n return { queueTask }\n}\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,MAAM,QAAQ;AAqBpC;;;;;;;;;;;;;;;;AAgBA,OAAO,SAASC,SAAA;EAGd,MAAMC,KAAA,GAAQF,MAAA,CAAyB,EAAE;EAEzC,MAAMG,YAAA,GAAeH,MAAA,CAAO;EAE5B,MAAMI,SAAA,GAAYL,WAAA,CAAuB,CAACM,EAAA,EAAIC,OAAA;IAC5CJ,KAAA,CAAMK,OAAO,CAACC,IAAI,CAACH,EAAA;IAEnB,eAAeI,aAAA;MACb,IAAIN,YAAA,CAAaI,OAAO,EAAE;QACxB;MACF;MAEA;MACA,IAAI,OAAOD,OAAA,EAASI,aAAA,KAAkB,YAAY;QAChD,MAAMC,cAAA,GAAiBL,OAAA,CAAQI,aAAa;QAE5C,IAAIC,cAAA,KAAmB,OAAO;UAC5B;QACF;MACF;MAEA,OAAOT,KAAA,CAAMK,OAAO,CAACK,MAAM,GAAG,GAAG;QAC/B,MAAMC,UAAA,GAAaX,KAAA,CAAMK,OAAO,CAACO,GAAG,GAAG;AAAA;QACvCZ,KAAA,CAAMK,OAAO,GAAG,EAAE,EAAC;QAEnBJ,YAAA,CAAaI,OAAO,GAAG;QAEvB,IAAI;UACF,MAAMM,UAAA;QACR,EAAE,OAAOE,GAAA,EAAK;UACZC,OAAA,CAAQC,KAAK,CAAC,6BAA6BF,GAAA,GAAK;QAClD,UAAU;UACRZ,YAAA,CAAaI,OAAO,GAAG;UAEvB,IAAI,OAAOD,OAAA,EAASY,YAAA,KAAiB,YAAY;YAC/CZ,OAAA,CAAQY,YAAY;UACtB;QACF;MACF;IACF;IAEA,KAAKT,YAAA;EACP,GAAG,EAAE;EAEL,OAAO;IAAEL;EAAU;AACrB","ignoreList":[]}

View File

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

View File

@@ -0,0 +1,48 @@
name: CI
on:
push:
branches:
- main
- 'v*'
paths-ignore:
- 'docs/**'
- '*.md'
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true
jobs:
test:
name: ${{ matrix.node-version }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
fail-fast: false
matrix:
os: [macOS-latest, windows-latest, ubuntu-latest]
node-version: [18, 20, 22, 24]
steps:
- name: Check out repo
uses: actions/checkout@v5.0.0
with:
persist-credentials: false
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm i --ignore-scripts
- name: Run tests
run: npm run test

View File

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

View File

@@ -0,0 +1,180 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.js");
const eraValues = {
narrow: ["Ք", "Մ"],
abbreviated: ["ՔԱ", "ՄԹ"],
wide: ["Քրիստոսից առաջ", "Մեր թվարկության"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["Ք1", "Ք2", "Ք3", "Ք4"],
wide: ["1֊ին քառորդ", "2֊րդ քառորդ", "3֊րդ քառորդ", "4֊րդ քառորդ"],
};
const monthValues = {
narrow: ["Հ", "Փ", "Մ", "Ա", "Մ", "Հ", "Հ", "Օ", "Ս", "Հ", "Ն", "Դ"],
abbreviated: [
"հուն",
"փետ",
"մար",
"ապր",
"մայ",
"հուն",
"հուլ",
"օգս",
"սեպ",
"հոկ",
"նոյ",
"դեկ",
],
wide: [
"հունվար",
"փետրվար",
"մարտ",
"ապրիլ",
"մայիս",
"հունիս",
"հուլիս",
"օգոստոս",
"սեպտեմբեր",
"հոկտեմբեր",
"նոյեմբեր",
"դեկտեմբեր",
],
};
const dayValues = {
narrow: ["Կ", "Ե", "Ե", "Չ", "Հ", "Ո", "Շ"],
short: ["կր", "եր", "եք", "չք", "հգ", "ուր", "շբ"],
abbreviated: ["կիր", "երկ", "երք", "չոր", "հնգ", "ուրբ", "շաբ"],
wide: [
"կիրակի",
"երկուշաբթի",
"երեքշաբթի",
"չորեքշաբթի",
"հինգշաբթի",
"ուրբաթ",
"շաբաթ",
],
};
const dayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "կեսգշ",
noon: "կեսօր",
morning: "առավոտ",
afternoon: "ցերեկ",
evening: "երեկո",
night: "գիշեր",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "կեսգիշեր",
noon: "կեսօր",
morning: "առավոտ",
afternoon: "ցերեկ",
evening: "երեկո",
night: "գիշեր",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "կեսգիշեր",
noon: "կեսօր",
morning: "առավոտ",
afternoon: "ցերեկ",
evening: "երեկո",
night: "գիշեր",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "կեսգշ",
noon: "կեսօր",
morning: "առավոտը",
afternoon: "ցերեկը",
evening: "երեկոյան",
night: "գիշերը",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "կեսգիշերին",
noon: "կեսօրին",
morning: "առավոտը",
afternoon: "ցերեկը",
evening: "երեկոյան",
night: "գիշերը",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "կեսգիշերին",
noon: "կեսօրին",
morning: "առավոտը",
afternoon: "ցերեկը",
evening: "երեկոյան",
night: "գիշերը",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
const number = Number(dirtyNumber);
// If ordinal numbers depend on context, for example,
// if they are different for different grammatical genders,
// use `options.unit`.
//
// `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
// 'day', 'hour', 'minute', 'second'.
const rem100 = number % 100;
if (rem100 < 10) {
if (rem100 % 10 === 1) {
return number + "֊ին";
}
}
return number + "֊րդ";
};
const localize = (exports.localize = {
ordinalNumber,
era: (0, _index.buildLocalizeFn)({
values: eraValues,
defaultWidth: "wide",
}),
quarter: (0, _index.buildLocalizeFn)({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: (0, _index.buildLocalizeFn)({
values: monthValues,
defaultWidth: "wide",
}),
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
});

View File

@@ -0,0 +1,21 @@
import { formatName } from './formatName.js';
export const formatOptions = (field)=>{
return field.options.reduce((values, option)=>{
if (typeof option === 'object') {
return {
...values,
[formatName(option.value)]: {
value: option.value
}
};
}
return {
...values,
[formatName(option)]: {
value: option
}
};
}, {});
};
//# sourceMappingURL=formatOptions.js.map

View File

@@ -0,0 +1,2 @@
export declare function hasStableTurboConfig(): boolean;
export declare function isNextJs16OrHigher(): boolean;

View File

@@ -0,0 +1,8 @@
import { ElementContainer } from '../element-container';
import { Context } from '../../core/context';
export declare class ImageElementContainer extends ElementContainer {
src: string;
intrinsicWidth: number;
intrinsicHeight: number;
constructor(context: Context, img: HTMLImageElement);
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"isEditing.js","names":["isEditing","id","collectionSlug","globalSlug","Boolean"],"sources":["../../src/utilities/isEditing.ts"],"sourcesContent":["export const isEditing = ({\n id,\n collectionSlug,\n globalSlug,\n}: {\n collectionSlug?: string\n globalSlug?: string\n id?: number | string\n}): boolean => Boolean(globalSlug || (collectionSlug && !!id))\n"],"mappings":"AAAA,OAAO,MAAMA,SAAA,GAAYA,CAAC;EACxBC,EAAE;EACFC,cAAc;EACdC;AAAU,CAKX,KAAcC,OAAA,CAAQD,UAAA,IAAeD,cAAA,IAAkB,CAAC,CAACD,EAAA","ignoreList":[]}

View File

@@ -0,0 +1 @@
"use strict";require("../../get-pipe-path-BoR10qr8.cjs");var r=require("../../register-D46fvsV_.cjs"),e=require("../../require-D4F1Lv60.cjs");require("module"),require("node:path"),require("../../temporary-directory-B83uKxJF.cjs"),require("node:os"),require("node:module"),require("node:url"),require("get-tsconfig"),require("node:fs"),require("../../index-gckBtVBf.cjs"),require("esbuild"),require("node:crypto"),require("../../client-D6NvIMSC.cjs"),require("node:net"),require("node:util"),require("../../index-BWFBUo6r.cjs"),exports.register=r.register,exports.require=e.tsxRequire;

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