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,3 @@
export { POST as GRAPHQL_POST } from './handler.js';
export { GET as GRAPHQL_PLAYGROUND_GET } from './playground.js';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,72 @@
import { Client, Span, SpanAttributes, SpanTimeInput, StartSpanOptions } from '@sentry/core';
export type WebVitalReportEvent = 'pagehide' | 'navigation';
/**
* Checks if a given value is a valid measurement value.
*/
export declare function isMeasurementValue(value: unknown): value is number;
/**
* Helper function to start child on transactions. This function will make sure that the transaction will
* use the start timestamp of the created child span if it is earlier than the transactions actual
* start timestamp.
*/
export declare function startAndEndSpan(parentSpan: Span, startTimeInSeconds: number, endTime: SpanTimeInput, { ...ctx }: StartSpanOptions): Span | undefined;
interface StandaloneWebVitalSpanOptions {
name: string;
transaction?: string;
attributes: SpanAttributes;
startTime: number;
}
/**
* Starts an inactive, standalone span used to send web vital values to Sentry.
* DO NOT use this for arbitrary spans, as these spans require special handling
* during ingestion to extract metrics.
*
* This function adds a bunch of attributes and data to the span that's shared
* by all web vital standalone spans. However, you need to take care of adding
* the actual web vital value as an event to the span. Also, you need to assign
* a transaction name and some other values that are specific to the web vital.
*
* Ultimately, you also need to take care of ending the span to send it off.
*
* @param options
*
* @returns an inactive, standalone and NOT YET ended span
*/
export declare function startStandaloneWebVitalSpan(options: StandaloneWebVitalSpanOptions): Span | undefined;
/** Get the browser performance API. */
export declare function getBrowserPerformanceAPI(): Performance | undefined;
/**
* Converts from milliseconds to seconds
* @param time time in ms
*/
export declare function msToSec(time: number): number;
/**
* Converts ALPN protocol ids to name and version.
*
* (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids)
* @param nextHopProtocol PerformanceResourceTiming.nextHopProtocol
*/
export declare function extractNetworkProtocol(nextHopProtocol: string): {
name: string;
version: string;
};
/**
* Generic support check for web vitals
*/
export declare function supportsWebVital(entryType: 'layout-shift' | 'largest-contentful-paint'): boolean;
/**
* Listens for events on which we want to collect a previously accumulated web vital value.
* Currently, this includes:
*
* - pagehide (i.e. user minimizes browser window, hides tab, etc)
* - soft navigation (we only care about the vital of the initially loaded route)
*
* As a "side-effect", this function will also collect the span id of the pageload span.
*
* @param collectorCallback the callback to be called when the first of these events is triggered. Parameters:
* - event: the event that triggered the reporting of the web vital value.
* - pageloadSpanId: the span id of the pageload span. This is used to link the web vital span to the pageload span.
*/
export declare function listenForWebVitalReportEvents(client: Client, collectorCallback: (event: WebVitalReportEvent, pageloadSpanId: string) => void): void;
export {};
//# sourceMappingURL=utils.d.ts.map

View File

@@ -0,0 +1,60 @@
// Django/Jinja2 syntax definition for Prism.js <http://prismjs.com> syntax highlighter.
// Mostly it works OK but can paint code incorrectly on complex html/template tag combinations.
(function (Prism) {
Prism.languages.django = {
'comment': /^\{#[\s\S]*?#\}$/,
'tag': {
pattern: /(^\{%[+-]?\s*)\w+/,
lookbehind: true,
alias: 'keyword'
},
'delimiter': {
pattern: /^\{[{%][+-]?|[+-]?[}%]\}$/,
alias: 'punctuation'
},
'string': {
pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
greedy: true
},
'filter': {
pattern: /(\|)\w+/,
lookbehind: true,
alias: 'function'
},
'test': {
pattern: /(\bis\s+(?:not\s+)?)(?!not\b)\w+/,
lookbehind: true,
alias: 'function'
},
'function': /\b[a-z_]\w+(?=\s*\()/i,
'keyword': /\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,
'operator': /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
'number': /\b\d+(?:\.\d+)?\b/,
'boolean': /[Ff]alse|[Nn]one|[Tt]rue/,
'variable': /\b\w+\b/,
'punctuation': /[{}[\](),.:;]/
};
var pattern = /\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g;
var markupTemplating = Prism.languages['markup-templating'];
Prism.hooks.add('before-tokenize', function (env) {
markupTemplating.buildPlaceholders(env, 'django', pattern);
});
Prism.hooks.add('after-tokenize', function (env) {
markupTemplating.tokenizePlaceholders(env, 'django');
});
// Add an Jinja2 alias
Prism.languages.jinja2 = Prism.languages.django;
Prism.hooks.add('before-tokenize', function (env) {
markupTemplating.buildPlaceholders(env, 'jinja2', pattern);
});
Prism.hooks.add('after-tokenize', function (env) {
markupTemplating.tokenizePlaceholders(env, 'jinja2');
});
}(Prism));

View File

@@ -0,0 +1,21 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Radical = createLucideIcon("Radical", [
[
"path",
{
d: "M3 12h3.28a1 1 0 0 1 .948.684l2.298 7.934a.5.5 0 0 0 .96-.044L13.82 4.771A1 1 0 0 1 14.792 4H21",
key: "1mqj8i"
}
]
]);
export { Radical as default };
//# sourceMappingURL=radical.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"compass.js","sources":["../../../src/icons/compass.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Compass\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTYuMjQgNy43Ni0xLjgwNCA1LjQxMWEyIDIgMCAwIDEtMS4yNjUgMS4yNjVMNy43NiAxNi4yNGwxLjgwNC01LjQxMWEyIDIgMCAwIDEgMS4yNjUtMS4yNjV6IiAvPgogIDxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjEwIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/compass\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 Compass = createLucideIcon('Compass', [\n [\n 'path',\n {\n d: 'm16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z',\n key: '9ktpf1',\n },\n ],\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n]);\n\nexport default Compass;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAC1C,CAAA,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;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AAC3D,CAAC,CAAA,CAAA;;"}

View File

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

View File

@@ -0,0 +1,39 @@
"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.registerInstrumentations = void 0;
const api_1 = require("@opentelemetry/api");
const api_logs_1 = require("@opentelemetry/api-logs");
const autoLoaderUtils_1 = require("./autoLoaderUtils");
/**
* It will register instrumentations and plugins
* @param options
* @return returns function to unload instrumentation and plugins that were
* registered
*/
function registerInstrumentations(options) {
const tracerProvider = options.tracerProvider || api_1.trace.getTracerProvider();
const meterProvider = options.meterProvider || api_1.metrics.getMeterProvider();
const loggerProvider = options.loggerProvider || api_logs_1.logs.getLoggerProvider();
const instrumentations = options.instrumentations?.flat() ?? [];
(0, autoLoaderUtils_1.enableInstrumentations)(instrumentations, tracerProvider, meterProvider, loggerProvider);
return () => {
(0, autoLoaderUtils_1.disableInstrumentations)(instrumentations);
};
}
exports.registerInstrumentations = registerInstrumentations;
//# sourceMappingURL=autoLoader.js.map

View File

@@ -0,0 +1,14 @@
/**
* 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 { LexicalEditor } from './LexicalEditor';
import type { EditorState } from './LexicalEditorState';
import type { NodeKey } from './LexicalNode';
export declare function $garbageCollectDetachedDecorators(editor: LexicalEditor, pendingEditorState: EditorState): void;
type IntentionallyMarkedAsDirtyElement = boolean;
export declare function $garbageCollectDetachedNodes(prevEditorState: EditorState, editorState: EditorState, dirtyLeaves: Set<NodeKey>, dirtyElements: Map<NodeKey, IntentionallyMarkedAsDirtyElement>): void;
export {};

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/config/loaders/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC"}

View File

@@ -0,0 +1,60 @@
var baseGetTag = require('./_baseGetTag'),
isLength = require('./isLength'),
isObjectLike = require('./isObjectLike');
/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
funcTag = '[object Function]',
mapTag = '[object Map]',
numberTag = '[object Number]',
objectTag = '[object Object]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
weakMapTag = '[object WeakMap]';
var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]',
float32Tag = '[object Float32Array]',
float64Tag = '[object Float64Array]',
int8Tag = '[object Int8Array]',
int16Tag = '[object Int16Array]',
int32Tag = '[object Int32Array]',
uint8Tag = '[object Uint8Array]',
uint8ClampedTag = '[object Uint8ClampedArray]',
uint16Tag = '[object Uint16Array]',
uint32Tag = '[object Uint32Array]';
/** Used to identify `toStringTag` values of typed arrays. */
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
typedArrayTags[errorTag] = typedArrayTags[funcTag] =
typedArrayTags[mapTag] = typedArrayTags[numberTag] =
typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
typedArrayTags[setTag] = typedArrayTags[stringTag] =
typedArrayTags[weakMapTag] = false;
/**
* The base implementation of `_.isTypedArray` without Node.js optimizations.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
*/
function baseIsTypedArray(value) {
return isObjectLike(value) &&
isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
}
module.exports = baseIsTypedArray;

View File

@@ -0,0 +1,27 @@
"use strict";
exports.eu = void 0;
var _index = require("./eu/_lib/formatDistance.cjs");
var _index2 = require("./eu/_lib/formatLong.cjs");
var _index3 = require("./eu/_lib/formatRelative.cjs");
var _index4 = require("./eu/_lib/localize.cjs");
var _index5 = require("./eu/_lib/match.cjs");
/**
* @category Locales
* @summary Basque locale.
* @language Basque
* @iso-639-2 eus
* @author Jacob Söderblom [@JacobSoderblom](https://github.com/JacobSoderblom)
*/
const eu = (exports.eu = {
code: "eu",
formatDistance: _index.formatDistance,
formatLong: _index2.formatLong,
formatRelative: _index3.formatRelative,
localize: _index4.localize,
match: _index5.match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 1,
},
});

View File

@@ -0,0 +1,15 @@
"use strict";
exports.formatRelative = void 0;
const formatRelativeLocale = {
lastWeek: "'sonuncu' eeee p -'də'",
yesterday: "'dünən' p -'də'",
today: "'bugün' p -'də'",
tomorrow: "'sabah' p -'də'",
nextWeek: "eeee p -'də'",
other: "P",
};
const formatRelative = (token, _date, _baseDate, _options) =>
formatRelativeLocale[token];
exports.formatRelative = formatRelative;

View File

@@ -0,0 +1,4 @@
export declare const eachMinuteOfInterval: import("./types.js").FPFn1<
Date[],
import("../fp.js").Interval<Date>
>;

View File

@@ -0,0 +1,9 @@
function _initializerDefineProperty(e, i, r, l) {
r && Object.defineProperty(e, i, {
enumerable: r.enumerable,
configurable: r.configurable,
writable: r.writable,
value: r.initializer ? r.initializer.call(l) : void 0
});
}
export { _initializerDefineProperty as default };

View File

@@ -0,0 +1,57 @@
{
"name": "md-to-react-email",
"version": "5.0.5",
"description": "A simple Markdown to jsx parser for email templates written in typescript.",
"keywords": [
"markdown",
"react-email",
"jsx-email",
"md",
"email",
"jsx"
],
"repository": {
"type": "git",
"url": "https://github.com/codeskills-dev/md-to-react-email.git"
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"author": {
"name": "Paul Ehikhuemen",
"url": "https://github.com/lordelogos",
"email": "paulehiks@gmail.com"
},
"license": "MIT",
"devDependencies": {
"@changesets/cli": "^2.26.2",
"@react-email/render": "1.0.3",
"@types/react": "19.0.0",
"@vitest/coverage-v8": "2.1.8",
"happy-dom": "^15.11.7",
"react": "18.2.0",
"ts-node": "10.9.1",
"tsup": "6.7.0",
"typescript": "5.1.3",
"vitest": "2.1.8"
},
"peerDependencies": {
"react": "^18.0 || ^19.0"
},
"dependencies": {
"marked": "7.0.4"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "tsup",
"lint": "tsc",
"release": "pnpm run build && changeset publish",
"test": "vitest run --coverage",
"test:watch": "vitest"
}
}

View File

@@ -0,0 +1,45 @@
export const PAYLOAD_PACKAGE_LIST = [
'payload',
'@payloadcms/bundler-vite',
'@payloadcms/bundler-webpack',
'@payloadcms/db-d1-sqlite',
'@payloadcms/db-mongodb',
'@payloadcms/db-postgres',
'@payloadcms/db-sqlite',
'@payloadcms/db-vercel-postgres',
'@payloadcms/drizzle',
'@payloadcms/ecommerce',
'@payloadcms/email-nodemailer',
'@payloadcms/email-resend',
'@payloadcms/graphql',
'@payloadcms/live-preview',
'@payloadcms/live-preview-react',
'@payloadcms/live-preview-vue',
'@payloadcms/kv-redis',
'@payloadcms/next/utilities',
'@payloadcms/payload-cloud',
'@payloadcms/plugin-cloud-storage',
'@payloadcms/plugin-form-builder',
'@payloadcms/plugin-import-export',
'@payloadcms/plugin-mcp',
'@payloadcms/plugin-multi-tenant',
'@payloadcms/plugin-nested-docs',
'@payloadcms/plugin-redirects',
'@payloadcms/plugin-search',
'@payloadcms/plugin-seo',
'@payloadcms/plugin-stripe',
'@payloadcms/plugin-zapier',
'@payloadcms/richtext-lexical',
'@payloadcms/richtext-slate',
'@payloadcms/sdk',
'@payloadcms/storage-azure',
'@payloadcms/storage-gcs',
'@payloadcms/storage-r2',
'@payloadcms/storage-s3',
'@payloadcms/storage-uploadthing',
'@payloadcms/storage-vercel-blob',
'@payloadcms/translations',
'@payloadcms/ui/shared'
];
//# sourceMappingURL=payloadPackageList.js.map

View File

@@ -0,0 +1,21 @@
'use strict';
/**
* Determine what entries should be displayed on the screen, based on the
* currently selected index and the maximum visible. Used in list-based
* prompts like `select` and `multiselect`.
*
* @param {number} cursor the currently selected entry
* @param {number} total the total entries available to display
* @param {number} [maxVisible] the number of entries that can be displayed
*/
module.exports = (cursor, total, maxVisible) => {
maxVisible = maxVisible || total;
let startIndex = Math.min(total - maxVisible, cursor - Math.floor(maxVisible / 2));
if (startIndex < 0) startIndex = 0;
let endIndex = Math.min(startIndex + maxVisible, total);
return {
startIndex,
endIndex
};
};

View File

@@ -0,0 +1,7 @@
import React from 'react';
type Props = {
className?: string;
};
export declare function CurrentFolderActions({ className }: Props): React.JSX.Element;
export {};
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["min","Math","levenshtein","a","b","t","u","i","j","m","length","n","findSuggestion","str","arr","distances","map","el","indexOf"],"sources":["../src/find-suggestion.ts"],"sourcesContent":["const { min } = Math;\n\n// a minimal leven distance implementation\n// balanced maintainability with code size\n// It is not blazingly fast but should be okay for Babel user case\n// where it will be run for at most tens of time on strings\n// that have less than 20 ASCII characters\n\n// https://rosettacode.org/wiki/Levenshtein_distance#ES5\nfunction levenshtein(a: string, b: string): number {\n let t = [],\n u: number[] = [],\n i,\n j;\n const m = a.length,\n n = b.length;\n if (!m) {\n return n;\n }\n if (!n) {\n return m;\n }\n for (j = 0; j <= n; j++) {\n t[j] = j;\n }\n for (i = 1; i <= m; i++) {\n for (u = [i], j = 1; j <= n; j++) {\n u[j] =\n a[i - 1] === b[j - 1] ? t[j - 1] : min(t[j - 1], t[j], u[j - 1]) + 1;\n }\n t = u;\n }\n return u[n];\n}\n\n/**\n * Given a string `str` and an array of candidates `arr`,\n * return the first of elements in candidates that has minimal\n * Levenshtein distance with `str`.\n * @export\n * @param {string} str\n * @param {string[]} arr\n * @returns {string}\n */\nexport function findSuggestion(str: string, arr: readonly string[]): string {\n const distances = arr.map<number>(el => levenshtein(el, str));\n return arr[distances.indexOf(min(...distances))];\n}\n"],"mappings":";;;;;;AAAA,MAAM;EAAEA;AAAI,CAAC,GAAGC,IAAI;AASpB,SAASC,WAAWA,CAACC,CAAS,EAAEC,CAAS,EAAU;EACjD,IAAIC,CAAC,GAAG,EAAE;IACRC,CAAW,GAAG,EAAE;IAChBC,CAAC;IACDC,CAAC;EACH,MAAMC,CAAC,GAAGN,CAAC,CAACO,MAAM;IAChBC,CAAC,GAAGP,CAAC,CAACM,MAAM;EACd,IAAI,CAACD,CAAC,EAAE;IACN,OAAOE,CAAC;EACV;EACA,IAAI,CAACA,CAAC,EAAE;IACN,OAAOF,CAAC;EACV;EACA,KAAKD,CAAC,GAAG,CAAC,EAAEA,CAAC,IAAIG,CAAC,EAAEH,CAAC,EAAE,EAAE;IACvBH,CAAC,CAACG,CAAC,CAAC,GAAGA,CAAC;EACV;EACA,KAAKD,CAAC,GAAG,CAAC,EAAEA,CAAC,IAAIE,CAAC,EAAEF,CAAC,EAAE,EAAE;IACvB,KAAKD,CAAC,GAAG,CAACC,CAAC,CAAC,EAAEC,CAAC,GAAG,CAAC,EAAEA,CAAC,IAAIG,CAAC,EAAEH,CAAC,EAAE,EAAE;MAChCF,CAAC,CAACE,CAAC,CAAC,GACFL,CAAC,CAACI,CAAC,GAAG,CAAC,CAAC,KAAKH,CAAC,CAACI,CAAC,GAAG,CAAC,CAAC,GAAGH,CAAC,CAACG,CAAC,GAAG,CAAC,CAAC,GAAGR,GAAG,CAACK,CAAC,CAACG,CAAC,GAAG,CAAC,CAAC,EAAEH,CAAC,CAACG,CAAC,CAAC,EAAEF,CAAC,CAACE,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;IACxE;IACAH,CAAC,GAAGC,CAAC;EACP;EACA,OAAOA,CAAC,CAACK,CAAC,CAAC;AACb;AAWO,SAASC,cAAcA,CAACC,GAAW,EAAEC,GAAsB,EAAU;EAC1E,MAAMC,SAAS,GAAGD,GAAG,CAACE,GAAG,CAASC,EAAE,IAAIf,WAAW,CAACe,EAAE,EAAEJ,GAAG,CAAC,CAAC;EAC7D,OAAOC,GAAG,CAACC,SAAS,CAACG,OAAO,CAAClB,GAAG,CAAC,GAAGe,SAAS,CAAC,CAAC,CAAC;AAClD","ignoreList":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"club.js","sources":["../../../src/icons/club.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Club\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTcuMjggOS4wNWE1LjUgNS41IDAgMSAwLTEwLjU2IDBBNS41IDUuNSAwIDEgMCAxMiAxNy42NmE1LjUgNS41IDAgMSAwIDUuMjgtOC42WiIgLz4KICA8cGF0aCBkPSJNMTIgMTcuNjZMMTIgMjIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/club\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 Club = createLucideIcon('Club', [\n [\n 'path',\n {\n d: 'M17.28 9.05a5.5 5.5 0 1 0-10.56 0A5.5 5.5 0 1 0 12 17.66a5.5 5.5 0 1 0 5.28-8.6Z',\n key: '27yuqz',\n },\n ],\n ['path', { d: 'M12 17.66L12 22', key: 'ogfahf' }],\n]);\n\nexport default Club;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,iBAAiB,MAAQ,CAAA,CAAA,CAAA;AAAA,CACpC,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;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,CAAmB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAClD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,243 @@
"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.DataloaderInstrumentation = void 0;
const instrumentation_1 = require("@opentelemetry/instrumentation");
const api_1 = require("@opentelemetry/api");
/** @knipignore */
const version_1 = require("./version");
const MODULE_NAME = 'dataloader';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function extractModuleExports(module) {
return module[Symbol.toStringTag] === 'Module'
? module.default // ESM
: module; // CommonJS
}
class DataloaderInstrumentation extends instrumentation_1.InstrumentationBase {
constructor(config = {}) {
super(version_1.PACKAGE_NAME, version_1.PACKAGE_VERSION, config);
}
init() {
return [
new instrumentation_1.InstrumentationNodeModuleDefinition(MODULE_NAME, ['>=2.0.0 <3'], module => {
const dataloader = extractModuleExports(module);
this._patchLoad(dataloader.prototype);
this._patchLoadMany(dataloader.prototype);
this._patchPrime(dataloader.prototype);
this._patchClear(dataloader.prototype);
this._patchClearAll(dataloader.prototype);
return this._getPatchedConstructor(dataloader);
}, module => {
const dataloader = extractModuleExports(module);
['load', 'loadMany', 'prime', 'clear', 'clearAll'].forEach(method => {
if ((0, instrumentation_1.isWrapped)(dataloader.prototype[method])) {
this._unwrap(dataloader.prototype, method);
}
});
}),
];
}
shouldCreateSpans() {
const config = this.getConfig();
const hasParentSpan = api_1.trace.getSpan(api_1.context.active()) !== undefined;
return hasParentSpan || !config.requireParentSpan;
}
getSpanName(dataloader, operation) {
const dataloaderName = dataloader.name;
if (dataloaderName === undefined || dataloaderName === null) {
return `${MODULE_NAME}.${operation}`;
}
return `${MODULE_NAME}.${operation} ${dataloaderName}`;
}
_wrapBatchLoadFn(batchLoadFn) {
const instrumentation = this;
return function patchedBatchLoadFn(...args) {
if (!instrumentation.isEnabled() ||
!instrumentation.shouldCreateSpans()) {
return batchLoadFn.call(this, ...args);
}
const parent = api_1.context.active();
const span = instrumentation.tracer.startSpan(instrumentation.getSpanName(this, 'batch'), { links: this._batch?.spanLinks }, parent);
return api_1.context.with(api_1.trace.setSpan(parent, span), () => {
return batchLoadFn.apply(this, args)
.then(value => {
span.end();
return value;
})
.catch(err => {
span.recordException(err);
span.setStatus({
code: api_1.SpanStatusCode.ERROR,
message: err.message,
});
span.end();
throw err;
});
});
};
}
_getPatchedConstructor(constructor) {
const instrumentation = this;
const prototype = constructor.prototype;
if (!instrumentation.isEnabled()) {
return constructor;
}
function PatchedDataloader(...args) {
// BatchLoadFn is the first constructor argument
// https://github.com/graphql/dataloader/blob/77c2cd7ca97e8795242018ebc212ce2487e729d2/src/index.js#L47
if (typeof args[0] === 'function') {
if ((0, instrumentation_1.isWrapped)(args[0])) {
instrumentation._unwrap(args, 0);
}
args[0] = instrumentation._wrapBatchLoadFn(args[0]);
}
return constructor.apply(this, args);
}
PatchedDataloader.prototype = prototype;
return PatchedDataloader;
}
_patchLoad(proto) {
if ((0, instrumentation_1.isWrapped)(proto.load)) {
this._unwrap(proto, 'load');
}
this._wrap(proto, 'load', this._getPatchedLoad.bind(this));
}
_getPatchedLoad(original) {
const instrumentation = this;
return function patchedLoad(...args) {
if (!instrumentation.shouldCreateSpans()) {
return original.call(this, ...args);
}
const parent = api_1.context.active();
const span = instrumentation.tracer.startSpan(instrumentation.getSpanName(this, 'load'), { kind: api_1.SpanKind.CLIENT }, parent);
return api_1.context.with(api_1.trace.setSpan(parent, span), () => {
const result = original
.call(this, ...args)
.then(value => {
span.end();
return value;
})
.catch(err => {
span.recordException(err);
span.setStatus({
code: api_1.SpanStatusCode.ERROR,
message: err.message,
});
span.end();
throw err;
});
const loader = this;
if (loader._batch) {
if (!loader._batch.spanLinks) {
loader._batch.spanLinks = [];
}
loader._batch.spanLinks.push({ context: span.spanContext() });
}
return result;
});
};
}
_patchLoadMany(proto) {
if ((0, instrumentation_1.isWrapped)(proto.loadMany)) {
this._unwrap(proto, 'loadMany');
}
this._wrap(proto, 'loadMany', this._getPatchedLoadMany.bind(this));
}
_getPatchedLoadMany(original) {
const instrumentation = this;
return function patchedLoadMany(...args) {
if (!instrumentation.shouldCreateSpans()) {
return original.call(this, ...args);
}
const parent = api_1.context.active();
const span = instrumentation.tracer.startSpan(instrumentation.getSpanName(this, 'loadMany'), { kind: api_1.SpanKind.CLIENT }, parent);
return api_1.context.with(api_1.trace.setSpan(parent, span), () => {
// .loadMany never rejects, as errors from internal .load
// calls are caught by dataloader lib
return original.call(this, ...args).then(value => {
span.end();
return value;
});
});
};
}
_patchPrime(proto) {
if ((0, instrumentation_1.isWrapped)(proto.prime)) {
this._unwrap(proto, 'prime');
}
this._wrap(proto, 'prime', this._getPatchedPrime.bind(this));
}
_getPatchedPrime(original) {
const instrumentation = this;
return function patchedPrime(...args) {
if (!instrumentation.shouldCreateSpans()) {
return original.call(this, ...args);
}
const parent = api_1.context.active();
const span = instrumentation.tracer.startSpan(instrumentation.getSpanName(this, 'prime'), { kind: api_1.SpanKind.CLIENT }, parent);
const ret = api_1.context.with(api_1.trace.setSpan(parent, span), () => {
return original.call(this, ...args);
});
span.end();
return ret;
};
}
_patchClear(proto) {
if ((0, instrumentation_1.isWrapped)(proto.clear)) {
this._unwrap(proto, 'clear');
}
this._wrap(proto, 'clear', this._getPatchedClear.bind(this));
}
_getPatchedClear(original) {
const instrumentation = this;
return function patchedClear(...args) {
if (!instrumentation.shouldCreateSpans()) {
return original.call(this, ...args);
}
const parent = api_1.context.active();
const span = instrumentation.tracer.startSpan(instrumentation.getSpanName(this, 'clear'), { kind: api_1.SpanKind.CLIENT }, parent);
const ret = api_1.context.with(api_1.trace.setSpan(parent, span), () => {
return original.call(this, ...args);
});
span.end();
return ret;
};
}
_patchClearAll(proto) {
if ((0, instrumentation_1.isWrapped)(proto.clearAll)) {
this._unwrap(proto, 'clearAll');
}
this._wrap(proto, 'clearAll', this._getPatchedClearAll.bind(this));
}
_getPatchedClearAll(original) {
const instrumentation = this;
return function patchedClearAll(...args) {
if (!instrumentation.shouldCreateSpans()) {
return original.call(this, ...args);
}
const parent = api_1.context.active();
const span = instrumentation.tracer.startSpan(instrumentation.getSpanName(this, 'clearAll'), { kind: api_1.SpanKind.CLIENT }, parent);
const ret = api_1.context.with(api_1.trace.setSpan(parent, span), () => {
return original.call(this, ...args);
});
span.end();
return ret;
};
}
}
exports.DataloaderInstrumentation = DataloaderInstrumentation;
//# sourceMappingURL=instrumentation.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"formatFields.d.ts","sourceRoot":"","sources":["../../src/utilities/formatFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAIpC,eAAO,MAAM,YAAY,WAAY,KAAK,EAAE,cAAc,OAAO,KAAG,KAAK,EACqB,CAAA"}

View File

@@ -0,0 +1,48 @@
# webpack
## Removing unused languages from dynamic import
If a locale is imported dynamically, then all locales from date-fns are loaded by webpack into a bundle (~160kb) or split across the chunks. This prolongs the build process and increases the amount of space taken. However, it is possible to use webpack to trim down languages using [ContextReplacementPlugin].
Let's assume that we have a single point in which supported locales are present:
`config.js`:
```js
// `see date-fns/src/locale` for available locales
export const supportedLocales = ["en-US", "de", "pl", "it"];
```
We could also have a function that formats the date:
```js
const getLocale = (locale) => import(`date-fns/locale/${locale}/index.js`); // or require() if using CommonJS
const formatDate = (date, formatStyle, locale) => {
return format(date, formatStyle, {
locale: getLocale(locale),
});
};
```
In order to exclude unused languages we can use webpacks [ContextReplacementPlugin].
`webpack.config.js`:
```js
import webpack from 'webpack'
import { supportedLocales } from './config.js'
export default const config = {
plugins: [
new webpack.ContextReplacementPlugin(
/^date-fns[/\\]locale$/,
new RegExp(`\\.[/\\\\](${supportedLocales.join('|')})[/\\\\]index\\.js$`)
)
]
}
```
This results in a language bundle of ~23kb .
[contextreplacementplugin]: https://webpack.js.org/plugins/context-replacement-plugin/

View File

@@ -0,0 +1,159 @@
"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.KoaInstrumentation = void 0;
const api = require("@opentelemetry/api");
const instrumentation_1 = require("@opentelemetry/instrumentation");
const types_1 = require("./types");
/** @knipignore */
const version_1 = require("./version");
const utils_1 = require("./utils");
const core_1 = require("@opentelemetry/core");
const internal_types_1 = require("./internal-types");
/** Koa instrumentation for OpenTelemetry */
class KoaInstrumentation extends instrumentation_1.InstrumentationBase {
constructor(config = {}) {
super(version_1.PACKAGE_NAME, version_1.PACKAGE_VERSION, config);
}
init() {
return new instrumentation_1.InstrumentationNodeModuleDefinition('koa', ['>=2.0.0 <4'], (module) => {
const moduleExports = module[Symbol.toStringTag] === 'Module'
? module.default // ESM
: module; // CommonJS
if (moduleExports == null) {
return moduleExports;
}
if ((0, instrumentation_1.isWrapped)(moduleExports.prototype.use)) {
this._unwrap(moduleExports.prototype, 'use');
}
this._wrap(moduleExports.prototype, 'use', this._getKoaUsePatch.bind(this));
return module;
}, (module) => {
const moduleExports = module[Symbol.toStringTag] === 'Module'
? module.default // ESM
: module; // CommonJS
if ((0, instrumentation_1.isWrapped)(moduleExports.prototype.use)) {
this._unwrap(moduleExports.prototype, 'use');
}
});
}
/**
* Patches the Koa.use function in order to instrument each original
* middleware layer which is introduced
* @param {KoaMiddleware} middleware - the original middleware function
*/
_getKoaUsePatch(original) {
const plugin = this;
return function use(middlewareFunction) {
let patchedFunction;
if (middlewareFunction.router) {
patchedFunction = plugin._patchRouterDispatch(middlewareFunction);
}
else {
patchedFunction = plugin._patchLayer(middlewareFunction, false);
}
return original.apply(this, [patchedFunction]);
};
}
/**
* Patches the dispatch function used by @koa/router. This function
* goes through each routed middleware and adds instrumentation via a call
* to the @function _patchLayer function.
* @param {KoaMiddleware} dispatchLayer - the original dispatch function which dispatches
* routed middleware
*/
_patchRouterDispatch(dispatchLayer) {
api.diag.debug('Patching @koa/router dispatch');
const router = dispatchLayer.router;
const routesStack = router?.stack ?? [];
for (const pathLayer of routesStack) {
const path = pathLayer.path;
// Type cast needed: router.stack comes from @types/koa@2.x but we use @types/koa@3.x
// See internal-types.ts for full explanation
const pathStack = pathLayer.stack;
for (let j = 0; j < pathStack.length; j++) {
const routedMiddleware = pathStack[j];
pathStack[j] = this._patchLayer(routedMiddleware, true, path);
}
}
return dispatchLayer;
}
/**
* Patches each individual @param middlewareLayer function in order to create the
* span and propagate context. It does not create spans when there is no parent span.
* @param {KoaMiddleware} middlewareLayer - the original middleware function.
* @param {boolean} isRouter - tracks whether the original middleware function
* was dispatched by the router originally
* @param {string?} layerPath - if present, provides additional data from the
* router about the routed path which the middleware is attached to
*/
_patchLayer(middlewareLayer, isRouter, layerPath) {
const layerType = isRouter ? types_1.KoaLayerType.ROUTER : types_1.KoaLayerType.MIDDLEWARE;
// Skip patching layer if its ignored in the config
if (middlewareLayer[internal_types_1.kLayerPatched] === true ||
(0, utils_1.isLayerIgnored)(layerType, this.getConfig()))
return middlewareLayer;
if (middlewareLayer.constructor.name === 'GeneratorFunction' ||
middlewareLayer.constructor.name === 'AsyncGeneratorFunction') {
api.diag.debug('ignoring generator-based Koa middleware layer');
return middlewareLayer;
}
middlewareLayer[internal_types_1.kLayerPatched] = true;
api.diag.debug('patching Koa middleware layer');
return async (context, next) => {
const parent = api.trace.getSpan(api.context.active());
if (parent === undefined) {
return middlewareLayer(context, next);
}
const metadata = (0, utils_1.getMiddlewareMetadata)(context, middlewareLayer, isRouter, layerPath);
const span = this.tracer.startSpan(metadata.name, {
attributes: metadata.attributes,
});
const rpcMetadata = (0, core_1.getRPCMetadata)(api.context.active());
if (rpcMetadata?.type === core_1.RPCType.HTTP && context._matchedRoute) {
rpcMetadata.route = context._matchedRoute.toString();
}
const { requestHook } = this.getConfig();
if (requestHook) {
(0, instrumentation_1.safeExecuteInTheMiddle)(() => requestHook(span, {
context,
middlewareLayer,
layerType,
}), e => {
if (e) {
api.diag.error('koa instrumentation: request hook failed', e);
}
}, true);
}
const newContext = api.trace.setSpan(api.context.active(), span);
return api.context.with(newContext, async () => {
try {
return await middlewareLayer(context, next);
}
catch (err) {
span.recordException(err);
throw err;
}
finally {
span.end();
}
});
};
}
}
exports.KoaInstrumentation = KoaInstrumentation;
//# sourceMappingURL=instrumentation.js.map

View File

@@ -0,0 +1,184 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const InitFragment = require("../InitFragment");
const makeSerializable = require("../util/makeSerializable");
const propertyAccess = require("../util/propertyAccess");
const { handleDependencyBase } = require("./CommonJsDependencyHelpers");
const NullDependency = require("./NullDependency");
/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */
/** @typedef {import("../Dependency")} Dependency */
/** @typedef {import("../Dependency").ExportsSpec} ExportsSpec */
/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */
/** @typedef {import("../ModuleGraph")} ModuleGraph */
/** @typedef {import("../ExportsInfo").ExportInfoName} ExportInfoName */
/** @typedef {import("../javascript/JavascriptParser").Range} Range */
/** @typedef {import("../serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */
/** @typedef {import("../serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */
/** @typedef {import("./CommonJsDependencyHelpers").CommonJSDependencyBaseKeywords} CommonJSDependencyBaseKeywords */
const EMPTY_OBJECT = {};
class CommonJsExportsDependency extends NullDependency {
/**
* @param {Range} range range
* @param {Range | null} valueRange value range
* @param {CommonJSDependencyBaseKeywords} base base
* @param {ExportInfoName[]} names names
*/
constructor(range, valueRange, base, names) {
super();
this.range = range;
this.valueRange = valueRange;
this.base = base;
this.names = names;
}
get type() {
return "cjs exports";
}
/**
* Returns the exported names
* @param {ModuleGraph} moduleGraph module graph
* @returns {ExportsSpec | undefined} export names
*/
getExports(moduleGraph) {
const name = this.names[0];
return {
exports: [
{
name,
// we can't mangle names that are in an empty object
// because one could access the prototype property
// when export isn't set yet
canMangle: !(name in EMPTY_OBJECT)
}
],
dependencies: undefined
};
}
/**
* @param {ObjectSerializerContext} context context
*/
serialize(context) {
const { write } = context;
write(this.range);
write(this.valueRange);
write(this.base);
write(this.names);
super.serialize(context);
}
/**
* @param {ObjectDeserializerContext} context context
*/
deserialize(context) {
const { read } = context;
this.range = read();
this.valueRange = read();
this.base = read();
this.names = read();
super.deserialize(context);
}
}
makeSerializable(
CommonJsExportsDependency,
"webpack/lib/dependencies/CommonJsExportsDependency"
);
CommonJsExportsDependency.Template = class CommonJsExportsDependencyTemplate extends (
NullDependency.Template
) {
/**
* @param {Dependency} dependency the dependency for which the template should be applied
* @param {ReplaceSource} source the current replace source which can be modified
* @param {DependencyTemplateContext} templateContext the context object
* @returns {void}
*/
apply(
dependency,
source,
{ module, moduleGraph, initFragments, runtimeRequirements, runtime }
) {
const dep = /** @type {CommonJsExportsDependency} */ (dependency);
const used = moduleGraph
.getExportsInfo(module)
.getUsedName(dep.names, runtime);
const [type, base] = handleDependencyBase(
dep.base,
module,
runtimeRequirements
);
switch (type) {
case "expression":
if (!used) {
initFragments.push(
new InitFragment(
"var __webpack_unused_export__;\n",
InitFragment.STAGE_CONSTANTS,
0,
"__webpack_unused_export__"
)
);
source.replace(
dep.range[0],
dep.range[1] - 1,
"__webpack_unused_export__"
);
return;
}
source.replace(
dep.range[0],
dep.range[1] - 1,
`${base}${propertyAccess(used)}`
);
return;
case "Object.defineProperty":
if (!used) {
initFragments.push(
new InitFragment(
"var __webpack_unused_export__;\n",
InitFragment.STAGE_CONSTANTS,
0,
"__webpack_unused_export__"
)
);
source.replace(
dep.range[0],
/** @type {Range} */ (dep.valueRange)[0] - 1,
"__webpack_unused_export__ = ("
);
source.replace(
/** @type {Range} */ (dep.valueRange)[1],
dep.range[1] - 1,
")"
);
return;
}
source.replace(
dep.range[0],
/** @type {Range} */ (dep.valueRange)[0] - 1,
`Object.defineProperty(${base}${propertyAccess(
used.slice(0, -1)
)}, ${JSON.stringify(used[used.length - 1])}, (`
);
source.replace(
/** @type {Range} */ (dep.valueRange)[1],
dep.range[1] - 1,
"))"
);
}
}
};
module.exports = CommonJsExportsDependency;

View File

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

View File

@@ -0,0 +1,44 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import { PgColumn } from "./common.js";
import { PgIntColumnBaseBuilder } from "./int.common.js";
export type PgBigInt53BuilderInitial<TName extends string> = PgBigInt53Builder<{
name: TName;
dataType: 'number';
columnType: 'PgBigInt53';
data: number;
driverParam: number | string;
enumValues: undefined;
}>;
export declare class PgBigInt53Builder<T extends ColumnBuilderBaseConfig<'number', 'PgBigInt53'>> extends PgIntColumnBaseBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class PgBigInt53<T extends ColumnBaseConfig<'number', 'PgBigInt53'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: number | string): number;
}
export type PgBigInt64BuilderInitial<TName extends string> = PgBigInt64Builder<{
name: TName;
dataType: 'bigint';
columnType: 'PgBigInt64';
data: bigint;
driverParam: string;
enumValues: undefined;
}>;
export declare class PgBigInt64Builder<T extends ColumnBuilderBaseConfig<'bigint', 'PgBigInt64'>> extends PgIntColumnBaseBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class PgBigInt64<T extends ColumnBaseConfig<'bigint', 'PgBigInt64'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: string): bigint;
}
export interface PgBigIntConfig<T extends 'number' | 'bigint' = 'number' | 'bigint'> {
mode: T;
}
export declare function bigint<TMode extends PgBigIntConfig['mode']>(config: PgBigIntConfig<TMode>): TMode extends 'number' ? PgBigInt53BuilderInitial<''> : PgBigInt64BuilderInitial<''>;
export declare function bigint<TName extends string, TMode extends PgBigIntConfig['mode']>(name: TName, config: PgBigIntConfig<TMode>): TMode extends 'number' ? PgBigInt53BuilderInitial<TName> : PgBigInt64BuilderInitial<TName>;

View File

@@ -0,0 +1 @@
{"version":3,"file":"chevron-last.js","sources":["../../../src/icons/chevron-last.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ChevronLast\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtNyAxOCA2LTYtNi02IiAvPgogIDxwYXRoIGQ9Ik0xNyA2djEyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/chevron-last\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 ChevronLast = createLucideIcon('ChevronLast', [\n ['path', { d: 'm7 18 6-6-6-6', key: 'lwmzdw' }],\n ['path', { d: 'M17 6v12', key: '1o0aio' }],\n]);\n\nexport default ChevronLast;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAAA,CAClD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/node`
# Summary
This package contains type definitions for node (https://nodejs.org/).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v22.
### Additional Details
* Last updated: Sun, 08 Feb 2026 00:09:19 GMT
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
# Credits
These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [David Junger](https://github.com/touffy), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Sebastian Silbermann](https://github.com/eps1lon), [Wilco Bakker](https://github.com/WilcoBakker), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), [Dmitry Semigradsky](https://github.com/Semigradsky), and [René](https://github.com/Renegade334).

View File

@@ -0,0 +1,2 @@
export * from "../../dist/declarations/src/jsx-runtime";
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1vdGlvbi1yZWFjdC1qc3gtcnVudGltZS5janMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL2Rpc3QvZGVjbGFyYXRpb25zL3NyYy9qc3gtcnVudGltZS5kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBIn0=

View File

@@ -0,0 +1 @@
Prism.languages.arduino=Prism.languages.extend("cpp",{keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}),Prism.languages.ino=Prism.languages.arduino;

View File

@@ -0,0 +1,92 @@
"use strict";
exports.formatRelative = void 0;
var _index = require("../../../isSameWeek.cjs");
var _index2 = require("../../../toDate.cjs");
const accusativeWeekdays = [
"нядзелю",
"панядзелак",
"аўторак",
"сераду",
"чацвер",
"пятніцу",
"суботу",
];
function lastWeek(day) {
const weekday = accusativeWeekdays[day];
switch (day) {
case 0:
case 3:
case 5:
case 6:
return "'у мінулую " + weekday + " а' p";
case 1:
case 2:
case 4:
return "'у мінулы " + weekday + " а' p";
}
}
function thisWeek(day) {
const weekday = accusativeWeekdays[day];
return "'у " + weekday + " а' p";
}
function nextWeek(day) {
const weekday = accusativeWeekdays[day];
switch (day) {
case 0:
case 3:
case 5:
case 6:
return "'у наступную " + weekday + " а' p";
case 1:
case 2:
case 4:
return "'у наступны " + weekday + " а' p";
}
}
const lastWeekFormat = (dirtyDate, baseDate, options) => {
const date = (0, _index2.toDate)(dirtyDate);
const day = date.getDay();
if ((0, _index.isSameWeek)(date, baseDate, options)) {
return thisWeek(day);
} else {
return lastWeek(day);
}
};
const nextWeekFormat = (dirtyDate, baseDate, options) => {
const date = (0, _index2.toDate)(dirtyDate);
const day = date.getDay();
if ((0, _index.isSameWeek)(date, baseDate, options)) {
return thisWeek(day);
} else {
return nextWeek(day);
}
};
const formatRelativeLocale = {
lastWeek: lastWeekFormat,
yesterday: "'учора а' p",
today: "'сёння а' p",
tomorrow: "'заўтра а' p",
nextWeek: nextWeekFormat,
other: "P",
};
const formatRelative = (token, date, baseDate, options) => {
const format = formatRelativeLocale[token];
if (typeof format === "function") {
return format(date, baseDate, options);
}
return format;
};
exports.formatRelative = formatRelative;

View File

@@ -0,0 +1,141 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchFn.js");
var _index2 = require("../../_lib/buildMatchPatternFn.js");
const matchOrdinalNumberPattern =
/^(\d+|(ראשון|שני|שלישי|רביעי|חמישי|שישי|שביעי|שמיני|תשיעי|עשירי|ראשונה|שנייה|שלישית|רביעית|חמישית|שישית|שביעית|שמינית|תשיעית|עשירית))/i;
const parseOrdinalNumberPattern = /^(\d+|רא|שנ|של|רב|ח|שי|שב|שמ|ת|ע)/i;
const matchEraPatterns = {
narrow: /^ל(ספירה|פנה״ס)/i,
abbreviated: /^ל(ספירה|פנה״ס)/i,
wide: /^ל(פני ה)?ספירה/i,
};
const parseEraPatterns = {
any: [/^לפ/i, /^לס/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^q[1234]/i,
wide: /^רבעון [1234]/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^\d+/i,
abbreviated: /^(ינו|פבר|מרץ|אפר|מאי|יוני|יולי|אוג|ספט|אוק|נוב|דצמ)׳?/i,
wide: /^(ינואר|פברואר|מרץ|אפריל|מאי|יוני|יולי|אוגוסט|ספטמבר|אוקטובר|נובמבר|דצמבר)/i,
};
const parseMonthPatterns = {
narrow: [
/^1$/i,
/^2/i,
/^3/i,
/^4/i,
/^5/i,
/^6/i,
/^7/i,
/^8/i,
/^9/i,
/^10/i,
/^11/i,
/^12/i,
],
any: [
/^ינ/i,
/^פ/i,
/^מר/i,
/^אפ/i,
/^מא/i,
/^יונ/i,
/^יול/i,
/^אוג/i,
/^ס/i,
/^אוק/i,
/^נ/i,
/^ד/i,
],
};
const matchDayPatterns = {
narrow: /^[אבגדהוש]׳/i,
short: /^[אבגדהוש]׳/i,
abbreviated: /^(שבת|יום (א|ב|ג|ד|ה|ו)׳)/i,
wide: /^יום (ראשון|שני|שלישי|רביעי|חמישי|שישי|שבת)/i,
};
const parseDayPatterns = {
abbreviated: [/א׳$/i, /ב׳$/i, /ג׳$/i, /ד׳$/i, /ה׳$/i, /ו׳$/i, /^ש/i],
wide: [/ן$/i, /ני$/i, /לישי$/i, /עי$/i, /מישי$/i, /שישי$/i, /ת$/i],
any: [/^א/i, /^ב/i, /^ג/i, /^ד/i, /^ה/i, /^ו/i, /^ש/i],
};
const matchDayPeriodPatterns = {
any: /^(אחר ה|ב)?(חצות|צהריים|בוקר|ערב|לילה|אחה״צ|לפנה״צ)/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^לפ/i,
pm: /^אחה/i,
midnight: /^ח/i,
noon: /^צ/i,
morning: /בוקר/i,
afternoon: /בצ|אחר/i,
evening: /ערב/i,
night: /לילה/i,
},
};
const ordinalName = ["רא", "שנ", "של", "רב", "ח", "שי", "שב", "שמ", "ת", "ע"];
const match = (exports.match = {
ordinalNumber: (0, _index2.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => {
const number = parseInt(value, 10);
return isNaN(number) ? ordinalName.indexOf(value) + 1 : number;
},
}),
era: (0, _index.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: (0, _index.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: (0, _index.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: (0, _index.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: (0, _index.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});

View File

@@ -0,0 +1,12 @@
'use strict'
const Range = require('../classes/range')
const satisfies = (version, range, options) => {
try {
range = new Range(range, options)
} catch (er) {
return false
}
return range.test(version)
}
module.exports = satisfies

View File

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

View File

@@ -0,0 +1,48 @@
import { GraphQLInstrumentation } from '@opentelemetry/instrumentation-graphql';
interface GraphqlOptions {
/**
* Do not create spans for resolvers.
*
* Defaults to true.
*/
ignoreResolveSpans?: boolean;
/**
* Don't create spans for the execution of the default resolver on object properties.
*
* When a resolver function is not defined on the schema for a field, graphql will
* use the default resolver which just looks for a property with that name on the object.
* If the property is not a function, it's not very interesting to trace.
* This option can reduce noise and number of spans created.
*
* Defaults to true.
*/
ignoreTrivialResolveSpans?: boolean;
/**
* If this is enabled, a http.server root span containing this span will automatically be renamed to include the operation name.
* Set this to `false` if you do not want this behavior, and want to keep the default http.server span name.
*
* Defaults to true.
*/
useOperationNameForRootSpan?: boolean;
}
export declare const instrumentGraphql: ((options: GraphqlOptions) => GraphQLInstrumentation) & {
id: string;
};
/**
* 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()],
* });
*/
export declare const graphqlIntegration: (options?: GraphqlOptions | undefined) => import("@sentry/core").Integration;
export {};
//# sourceMappingURL=graphql.d.ts.map

View File

@@ -0,0 +1,6 @@
import type { ArrayFieldClient, DefaultCellComponentProps } from 'payload';
import React from 'react';
export interface ArrayCellProps extends DefaultCellComponentProps<ArrayFieldClient> {
}
export declare const ArrayCell: React.FC<ArrayCellProps>;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,22 @@
import { DirectusPanel } from "../../../schema/panel.js";
import { RestCommand } from "../../types.js";
//#region src/rest/commands/delete/panels.d.ts
/**
* Delete multiple existing panels.
* @param keys
* @returns
* @throws Will throw if keys is empty
*/
declare const deletePanels: <Schema>(keys: DirectusPanel<Schema>["id"][]) => RestCommand<void, Schema>;
/**
* Delete an existing panel.
* @param key
* @returns
* @throws Will throw if key is empty
*/
declare const deletePanel: <Schema>(key: DirectusPanel<Schema>["id"]) => RestCommand<void, Schema>;
//#endregion
export { deletePanel, deletePanels };
//# sourceMappingURL=panels.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"book-heart.js","sources":["../../../src/icons/book-heart.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BookHeart\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTYgOC4yQTIuMjIgMi4yMiAwIDAgMCAxMy44IDZjLS44IDAtMS40LjMtMS44LjktLjQtLjYtMS0uOS0xLjgtLjlBMi4yMiAyLjIyIDAgMCAwIDggOC4yYzAgLjYuMyAxLjIuNyAxLjZBMjI2LjY1MiAyMjYuNjUyIDAgMCAwIDEyIDEzYTQwNCA0MDQgMCAwIDAgMy4zLTMuMSAyLjQxMyAyLjQxMyAwIDAgMCAuNy0xLjciIC8+CiAgPHBhdGggZD0iTTQgMTkuNXYtMTVBMi41IDIuNSAwIDAgMSA2LjUgMkgxOWExIDEgMCAwIDEgMSAxdjE4YTEgMSAwIDAgMS0xIDFINi41YTEgMSAwIDAgMSAwLTVIMjAiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/book-heart\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 BookHeart = createLucideIcon('BookHeart', [\n [\n 'path',\n {\n d: 'M16 8.2A2.22 2.22 0 0 0 13.8 6c-.8 0-1.4.3-1.8.9-.4-.6-1-.9-1.8-.9A2.22 2.22 0 0 0 8 8.2c0 .6.3 1.2.7 1.6A226.652 226.652 0 0 0 12 13a404 404 0 0 0 3.3-3.1 2.413 2.413 0 0 0 .7-1.7',\n key: '1t75a8',\n },\n ],\n [\n 'path',\n {\n d: 'M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20',\n key: 'k3hazp',\n },\n ],\n]);\n\nexport default BookHeart;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAC9C,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;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;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,41 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.js");
const dateFormats = {
full: "EEEE, MMMM do, y",
long: "MMMM do, y",
medium: "MMM d, y",
short: "MM/dd/yyyy",
};
const timeFormats = {
full: "h:mm:ss a zzzz",
long: "h:mm:ss a z",
medium: "h:mm:ss a",
short: "h:mm a",
};
const dateTimeFormats = {
full: "{{date}} 'aig' {{time}}",
long: "{{date}} 'aig' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}",
};
const formatLong = (exports.formatLong = {
date: (0, _index.buildFormatLongFn)({
formats: dateFormats,
defaultWidth: "full",
}),
time: (0, _index.buildFormatLongFn)({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: (0, _index.buildFormatLongFn)({
formats: dateTimeFormats,
defaultWidth: "full",
}),
});

View File

@@ -0,0 +1,10 @@
import type { IncomingMessage } from 'node:http';
import type { Scope } from '@sentry/core';
/**
* This method patches the request object to capture the body.
* Instead of actually consuming the streamed body ourselves, which has potential side effects,
* we monkey patch `req.on('data')` to intercept the body chunks.
* This way, we only read the body if the user also consumes the body, ensuring we do not change any behavior in unexpected ways.
*/
export declare function patchRequestToCaptureBody(req: IncomingMessage, isolationScope: Scope, maxIncomingRequestBodySize: 'small' | 'medium' | 'always', integrationName: string): void;
//# sourceMappingURL=captureRequestBody.d.ts.map

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"wrapGetInitialPropsWithSentry.js","sources":["../../../../src/common/pages-router-instrumentation/wrapGetInitialPropsWithSentry.ts"],"sourcesContent":["import type { NextPage } from 'next';\nimport { isBuild } from '../utils/isBuild';\nimport { withErrorInstrumentation, withTracedServerSideDataFetcher } from '../utils/wrapperUtils';\n\ntype GetInitialProps = Required<NextPage>['getInitialProps'];\n\n/**\n * Create a wrapped version of the user's exported `getInitialProps` function\n *\n * @param origGetInitialProps The user's `getInitialProps` function\n * @param parameterizedRoute The page's parameterized route\n * @returns A wrapped version of the function\n */\nexport function wrapGetInitialPropsWithSentry(origGetInitialProps: GetInitialProps): GetInitialProps {\n return new Proxy(origGetInitialProps, {\n apply: async (wrappingTarget, thisArg, args: Parameters<GetInitialProps>) => {\n if (isBuild()) {\n return wrappingTarget.apply(thisArg, args);\n }\n\n const [context] = args;\n const { req, res } = context;\n\n const errorWrappedGetInitialProps = withErrorInstrumentation(wrappingTarget);\n // Generally we can assume that `req` and `res` are always defined on the server:\n // https://nextjs.org/docs/api-reference/data-fetching/get-initial-props#context-object\n // This does not seem to be the case in dev mode. Because we have no clean way of associating the the data fetcher\n // span with each other when there are no req or res objects, we simply do not trace them at all here.\n if (req && res) {\n const tracedGetInitialProps = withTracedServerSideDataFetcher(errorWrappedGetInitialProps, req, res, {\n dataFetcherRouteName: context.pathname,\n requestedRouteName: context.pathname,\n dataFetchingMethodName: 'getInitialProps',\n });\n\n const {\n data: initialProps,\n baggage,\n sentryTrace,\n }: {\n data?: unknown;\n baggage?: string;\n sentryTrace?: string;\n } = (await tracedGetInitialProps.apply(thisArg, args)) ?? {}; // Next.js allows undefined to be returned from a getInitialPropsFunction.\n\n if (typeof initialProps === 'object' && initialProps !== null) {\n // The Next.js serializer throws on undefined values so we need to guard for it (#12102)\n if (sentryTrace) {\n (initialProps as Record<string, unknown>)._sentryTraceData = sentryTrace;\n }\n\n // The Next.js serializer throws on undefined values so we need to guard for it (#12102)\n if (baggage) {\n (initialProps as Record<string, unknown>)._sentryBaggage = baggage;\n }\n }\n\n return initialProps;\n } else {\n return errorWrappedGetInitialProps.apply(thisArg, args);\n }\n },\n });\n}\n"],"names":[],"mappings":";;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,6BAA6B,CAAC,mBAAmB,EAAoC;AACrG,EAAE,OAAO,IAAI,KAAK,CAAC,mBAAmB,EAAE;AACxC,IAAI,KAAK,EAAE,OAAO,cAAc,EAAE,OAAO,EAAE,IAAI,KAAkC;AACjF,MAAM,IAAI,OAAO,EAAE,EAAE;AACrB,QAAQ,OAAO,cAAc,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC;AAClD,MAAM;;AAEN,MAAM,MAAM,CAAC,OAAO,CAAA,GAAI,IAAI;AAC5B,MAAM,MAAM,EAAE,GAAG,EAAE,GAAA,EAAI,GAAI,OAAO;;AAElC,MAAM,MAAM,2BAAA,GAA8B,wBAAwB,CAAC,cAAc,CAAC;AAClF;AACA;AACA;AACA;AACA,MAAM,IAAI,GAAA,IAAO,GAAG,EAAE;AACtB,QAAQ,MAAM,qBAAA,GAAwB,+BAA+B,CAAC,2BAA2B,EAAE,GAAG,EAAE,GAAG,EAAE;AAC7G,UAAU,oBAAoB,EAAE,OAAO,CAAC,QAAQ;AAChD,UAAU,kBAAkB,EAAE,OAAO,CAAC,QAAQ;AAC9C,UAAU,sBAAsB,EAAE,iBAAiB;AACnD,SAAS,CAAC;;AAEV,QAAQ,MAAM;AACd,UAAU,IAAI,EAAE,YAAY;AAC5B,UAAU,OAAO;AACjB,UAAU,WAAW;AACrB;;AAIQ,GAAI,CAAC,MAAM,qBAAqB,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,EAAE,CAAA;;AAEpE,QAAQ,IAAI,OAAO,YAAA,KAAiB,YAAY,YAAA,KAAiB,IAAI,EAAE;AACvE;AACA,UAAU,IAAI,WAAW,EAAE;AAC3B,YAAY,CAAC,YAAA,GAAyC,gBAAA,GAAmB,WAAW;AACpF,UAAU;;AAEV;AACA,UAAU,IAAI,OAAO,EAAE;AACvB,YAAY,CAAC,YAAA,GAAyC,cAAA,GAAiB,OAAO;AAC9E,UAAU;AACV,QAAQ;;AAER,QAAQ,OAAO,YAAY;AAC3B,MAAM,OAAO;AACb,QAAQ,OAAO,2BAA2B,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC;AAC/D,MAAM;AACN,IAAI,CAAC;AACL,GAAG,CAAC;AACJ;;;;"}

View File

@@ -0,0 +1,27 @@
"use strict";
exports.__esModule = true;
exports.default = attribute;
/**
* Gets or sets an attribute of a given element.
*
* @param node the element
* @param attr the attribute to get or set
* @param val the attribute value
*/
function attribute(node, attr, val) {
if (node) {
if (typeof val === 'undefined') {
return node.getAttribute(attr);
}
if (!val && val !== '') {
node.removeAttribute(attr);
} else {
node.setAttribute(attr, String(val));
}
}
}
module.exports = exports["default"];

View File

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

View File

@@ -0,0 +1,87 @@
import { WrappedFunction } from '../types-hoist/wrappedfunction';
/**
* Replace a method in an object with a wrapped version of itself.
*
* If the method on the passed object is not a function, the wrapper will not be applied.
*
* @param source An object that contains a method to be wrapped.
* @param name The name of the method to be wrapped.
* @param replacementFactory A higher-order function that takes the original version of the given method and returns a
* wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to
* preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, <other
* args>)` or `origMethod.apply(this, [<other args>])` (rather than being called directly), again to preserve `this`.
* @returns void
*/
export declare function fill(source: {
[key: string]: any;
}, name: string, replacementFactory: (...args: any[]) => any): void;
/**
* Defines a non-enumerable property on the given object.
*
* @param obj The object on which to set the property
* @param name The name of the property to be set
* @param value The value to which to set the property
*/
export declare function addNonEnumerableProperty(obj: object, name: string, value: unknown): void;
/**
* Remembers the original function on the wrapped function and
* patches up the prototype.
*
* @param wrapped the wrapper function
* @param original the original function that gets wrapped
*/
export declare function markFunctionWrapped(wrapped: WrappedFunction, original: WrappedFunction): void;
/**
* This extracts the original function if available. See
* `markFunctionWrapped` for more information.
*
* @param func the function to unwrap
* @returns the unwrapped version of the function if available.
*/
export declare function getOriginalFunction<T extends Function>(func: WrappedFunction<T>): T | undefined;
/**
* Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their
* non-enumerable properties attached.
*
* @param value Initial source that we have to transform in order for it to be usable by the serializer
* @returns An Event or Error turned into an object - or the value argument itself, when value is neither an Event nor
* an Error.
*/
export declare function convertToPlainObject<V>(value: V): {
[ownProps: string]: unknown;
type: string;
target: string;
currentTarget: string;
detail?: unknown;
} | {
[ownProps: string]: unknown;
message: string;
name: string;
stack?: string;
} | V;
/**
* Given any captured exception, extract its keys and create a sorted
* and truncated list that will be used inside the event message.
* eg. `Non-error exception captured with keys: foo, bar, baz`
*/
export declare function extractExceptionKeysForMessage(exception: Record<string, unknown>): string;
/**
* Given any object, return a new object having removed all fields whose value was `undefined`.
* Works recursively on objects and arrays.
*
* Attention: This function keeps circular references in the returned object.
*
* @deprecated This function is no longer used by the SDK and will be removed in a future major version.
*/
export declare function dropUndefinedKeys<T>(inputValue: T): T;
/**
* Ensure that something is an object.
*
* Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper
* classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.
*
* @param wat The subject of the objectification
* @returns A version of `wat` which can safely be used with `Object` class methods
*/
export declare function objectify(wat: unknown): typeof Object;
//# sourceMappingURL=object.d.ts.map

View File

@@ -0,0 +1,53 @@
# WebIDL Type Conversions on JavaScript Values
This package implements, in JavaScript, the algorithms to convert a given JavaScript value according to a given [WebIDL](http://heycam.github.io/webidl/) [type](http://heycam.github.io/webidl/#idl-types).
The goal is that you should be able to write code like
```js
const conversions = require("webidl-conversions");
function doStuff(x, y) {
x = conversions["boolean"](x);
y = conversions["unsigned long"](y);
// actual algorithm code here
}
```
and your function `doStuff` will behave the same as a WebIDL operation declared as
```webidl
void doStuff(boolean x, unsigned long y);
```
## API
This package's main module's default export is an object with a variety of methods, each corresponding to a different WebIDL type. Each method, when invoked on a JavaScript value, will give back the new JavaScript value that results after passing through the WebIDL conversion rules. (See below for more details on what that means.) Alternately, the method could throw an error, if the WebIDL algorithm is specified to do so: for example `conversions["float"](NaN)` [will throw a `TypeError`](http://heycam.github.io/webidl/#es-float).
## Status
All of the numeric types are implemented (float being implemented as double) and some others are as well - check the source for all of them. This list will grow over time in service of the [HTML as Custom Elements](https://github.com/dglazkov/html-as-custom-elements) project, but in the meantime, pull requests welcome!
I'm not sure yet what the strategy will be for modifiers, e.g. [`[Clamp]`](http://heycam.github.io/webidl/#Clamp). Maybe something like `conversions["unsigned long"](x, { clamp: true })`? We'll see.
We might also want to extend the API to give better error messages, e.g. "Argument 1 of HTMLMediaElement.fastSeek is not a finite floating-point value" instead of "Argument is not a finite floating-point value." This would require passing in more information to the conversion functions than we currently do.
## Background
What's actually going on here, conceptually, is pretty weird. Let's try to explain.
WebIDL, as part of its madness-inducing design, has its own type system. When people write algorithms in web platform specs, they usually operate on WebIDL values, i.e. instances of WebIDL types. For example, if they were specifying the algorithm for our `doStuff` operation above, they would treat `x` as a WebIDL value of [WebIDL type `boolean`](http://heycam.github.io/webidl/#idl-boolean). Crucially, they would _not_ treat `x` as a JavaScript variable whose value is either the JavaScript `true` or `false`. They're instead working in a different type system altogether, with its own rules.
Separately from its type system, WebIDL defines a ["binding"](http://heycam.github.io/webidl/#ecmascript-binding) of the type system into JavaScript. This contains rules like: when you pass a JavaScript value to the JavaScript method that manifests a given WebIDL operation, how does that get converted into a WebIDL value? For example, a JavaScript `true` passed in the position of a WebIDL `boolean` argument becomes a WebIDL `true`. But, a JavaScript `true` passed in the position of a [WebIDL `unsigned long`](http://heycam.github.io/webidl/#idl-unsigned-long) becomes a WebIDL `1`. And so on.
Finally, we have the actual implementation code. This is usually C++, although these days [some smart people are using Rust](https://github.com/servo/servo). The implementation, of course, has its own type system. So when they implement the WebIDL algorithms, they don't actually use WebIDL values, since those aren't "real" outside of specs. Instead, implementations apply the WebIDL binding rules in such a way as to convert incoming JavaScript values into C++ values. For example, if code in the browser called `doStuff(true, true)`, then the implementation code would eventually receive a C++ `bool` containing `true` and a C++ `uint32_t` containing `1`.
The upside of all this is that implementations can abstract all the conversion logic away, letting WebIDL handle it, and focus on implementing the relevant methods in C++ with values of the correct type already provided. That is payoff of WebIDL, in a nutshell.
And getting to that payoff is the goal of _this_ project—but for JavaScript implementations, instead of C++ ones. That is, this library is designed to make it easier for JavaScript developers to write functions that behave like a given WebIDL operation. So conceptually, the conversion pipeline, which in its general form is JavaScript values ↦ WebIDL values ↦ implementation-language values, in this case becomes JavaScript values ↦ WebIDL values ↦ JavaScript values. And that intermediate step is where all the logic is performed: a JavaScript `true` becomes a WebIDL `1` in an unsigned long context, which then becomes a JavaScript `1`.
## Don't Use This
Seriously, why would you ever use this? You really shouldn't. WebIDL is … not great, and you shouldn't be emulating its semantics. If you're looking for a generic argument-processing library, you should find one with better rules than those from WebIDL. In general, your JavaScript should not be trying to become more like WebIDL; if anything, we should fix WebIDL to make it more like JavaScript.
The _only_ people who should use this are those trying to create faithful implementations (or polyfills) of web platform interfaces defined in WebIDL.

View File

@@ -0,0 +1 @@
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/integrations/local-variables/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEhD,MAAM,MAAM,kBAAkB,GAAG,MAAM,IAAI,CAAC;AAE5C;;GAEG;AACH,eAAO,MAAM,mBAAmB,qCAAqC,CAAC;AAEtE;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,IAAI,EAClB,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GACjC,kBAAkB,CA+BpB;AAGD,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC,mBAAmB,GAAG;IAChE,IAAI,EAAE;QAEJ,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;CACH,CAAC;AAEF,2CAA2C;AAC3C,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAE7D;AAED,6CAA6C;AAC7C,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAExF;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,gCAAgC;IAC/C;;;;;;;;;;;;;;OAcG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,MAAM,WAAW,wBAAyB,SAAQ,gCAAgC;IAChF;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}

View File

@@ -0,0 +1,66 @@
"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.reconfigureLimits = exports.mergeConfig = exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = void 0;
const config_1 = require("./config");
const core_1 = require("@opentelemetry/core");
exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128;
exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity;
/**
* Function to merge Default configuration (as specified in './config') with
* user provided configurations.
*/
function mergeConfig(userConfig) {
const perInstanceDefaults = {
sampler: (0, config_1.buildSamplerFromEnv)(),
};
const DEFAULT_CONFIG = (0, config_1.loadDefaultConfig)();
const target = Object.assign({}, DEFAULT_CONFIG, perInstanceDefaults, userConfig);
target.generalLimits = Object.assign({}, DEFAULT_CONFIG.generalLimits, userConfig.generalLimits || {});
target.spanLimits = Object.assign({}, DEFAULT_CONFIG.spanLimits, userConfig.spanLimits || {});
return target;
}
exports.mergeConfig = mergeConfig;
/**
* When general limits are provided and model specific limits are not,
* configures the model specific limits by using the values from the general ones.
* @param userConfig User provided tracer configuration
*/
function reconfigureLimits(userConfig) {
const spanLimits = Object.assign({}, userConfig.spanLimits);
/**
* Reassign span attribute count limit to use first non null value defined by user or use default value
*/
spanLimits.attributeCountLimit =
userConfig.spanLimits?.attributeCountLimit ??
userConfig.generalLimits?.attributeCountLimit ??
(0, core_1.getNumberFromEnv)('OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT') ??
(0, core_1.getNumberFromEnv)('OTEL_ATTRIBUTE_COUNT_LIMIT') ??
exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT;
/**
* Reassign span attribute value length limit to use first non null value defined by user or use default value
*/
spanLimits.attributeValueLengthLimit =
userConfig.spanLimits?.attributeValueLengthLimit ??
userConfig.generalLimits?.attributeValueLengthLimit ??
(0, core_1.getNumberFromEnv)('OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT') ??
(0, core_1.getNumberFromEnv)('OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT') ??
exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT;
return Object.assign({}, userConfig, { spanLimits });
}
exports.reconfigureLimits = reconfigureLimits;
//# sourceMappingURL=utility.js.map

View File

@@ -0,0 +1,17 @@
import type { HTMLAttributes } from 'react';
export type Props = {
readonly children: React.ReactNode;
readonly className?: string;
readonly gutter?: boolean;
readonly Header?: React.ReactNode;
readonly hoverTitle?: boolean;
readonly slug: string;
readonly title?: string;
};
export type TogglerProps = {
children: React.ReactNode;
className?: string;
disabled?: boolean;
slug: string;
} & HTMLAttributes<HTMLButtonElement>;
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1,19 @@
import { cache } from 'react';
import getConfig from './getConfig.js';
function getMessagesFromConfig(config) {
if (!config.messages) {
throw new Error('No messages found. Have you configured them correctly? See https://next-intl.dev/docs/configuration#messages');
}
return config.messages;
}
async function getMessagesCachedImpl(locale) {
const config = await getConfig(locale);
return getMessagesFromConfig(config);
}
const getMessagesCached = cache(getMessagesCachedImpl);
async function getMessages(opts) {
return getMessagesCached(opts?.locale);
}
export { getMessages as default, getMessagesFromConfig };

View File

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

View File

@@ -0,0 +1,50 @@
import { GraphQLError } from '../../error/GraphQLError.mjs';
/**
* No unused variables
*
* A GraphQL operation is only valid if all variables defined by an operation
* are used, either directly or within a spread fragment.
*
* See https://spec.graphql.org/draft/#sec-All-Variables-Used
*/
export function NoUnusedVariablesRule(context) {
let variableDefs = [];
return {
OperationDefinition: {
enter() {
variableDefs = [];
},
leave(operation) {
const variableNameUsed = Object.create(null);
const usages = context.getRecursiveVariableUsages(operation);
for (const { node } of usages) {
variableNameUsed[node.name.value] = true;
}
for (const variableDef of variableDefs) {
const variableName = variableDef.variable.name.value;
if (variableNameUsed[variableName] !== true) {
context.reportError(
new GraphQLError(
operation.name
? `Variable "$${variableName}" is never used in operation "${operation.name.value}".`
: `Variable "$${variableName}" is never used.`,
{
nodes: variableDef,
},
),
);
}
}
},
},
VariableDefinition(def) {
variableDefs.push(def);
},
};
}

View File

@@ -0,0 +1 @@
Prism.languages.lolcode={comment:[/\bOBTW\s[\s\S]*?\sTLDR\b/,/\bBTW.+/],string:{pattern:/"(?::.|[^":])*"/,inside:{variable:/:\{[^}]+\}/,symbol:[/:\([a-f\d]+\)/i,/:\[[^\]]+\]/,/:[)>o":]/]},greedy:!0},number:/(?:\B-)?(?:\b\d+(?:\.\d*)?|\B\.\d+)/,symbol:{pattern:/(^|\s)(?:A )?(?:BUKKIT|NOOB|NUMBAR|NUMBR|TROOF|YARN)(?=\s|,|$)/,lookbehind:!0,inside:{keyword:/A(?=\s)/}},label:{pattern:/((?:^|\s)(?:IM IN YR|IM OUTTA YR) )[a-zA-Z]\w*/,lookbehind:!0,alias:"string"},function:{pattern:/((?:^|\s)(?:HOW IZ I|I IZ|IZ) )[a-zA-Z]\w*/,lookbehind:!0},keyword:[{pattern:/(^|\s)(?:AN|FOUND YR|GIMMEH|GTFO|HAI|HAS A|HOW IZ I|I HAS A|I IZ|IF U SAY SO|IM IN YR|IM OUTTA YR|IS NOW(?: A)?|ITZ(?: A)?|IZ|KTHX|KTHXBYE|LIEK(?: A)?|MAEK|MEBBE|MKAY|NERFIN|NO WAI|O HAI IM|O RLY\?|OIC|OMG|OMGWTF|R|SMOOSH|SRS|TIL|UPPIN|VISIBLE|WILE|WTF\?|YA RLY|YR)(?=\s|,|$)/,lookbehind:!0},/'Z(?=\s|,|$)/],boolean:{pattern:/(^|\s)(?:FAIL|WIN)(?=\s|,|$)/,lookbehind:!0},variable:{pattern:/(^|\s)IT(?=\s|,|$)/,lookbehind:!0},operator:{pattern:/(^|\s)(?:NOT|BOTH SAEM|DIFFRINT|(?:ALL|ANY|BIGGR|BOTH|DIFF|EITHER|MOD|PRODUKT|QUOSHUNT|SMALLR|SUM|WON) OF)(?=\s|,|$)/,lookbehind:!0},punctuation:/\.{3}|…|,|!/};

View File

@@ -0,0 +1,24 @@
/**
* @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 Newspaper = createLucideIcon("Newspaper", [
[
"path",
{
d: "M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",
key: "7pis2x"
}
],
["path", { d: "M18 14h-8", key: "sponae" }],
["path", { d: "M15 18h-5", key: "95g1m2" }],
["path", { d: "M10 6h8v4h-8V6Z", key: "smlsk5" }]
]);
export { Newspaper as default };
//# sourceMappingURL=newspaper.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["_index","require","_default","exports","default","toExpression","node","isExpressionStatement","expression","isExpression","isClass","type","abstract","isFunction","Error"],"sources":["../../src/converters/toExpression.ts"],"sourcesContent":["import {\n isExpression,\n isFunction,\n isClass,\n isExpressionStatement,\n} from \"../validators/generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default toExpression as {\n (node: t.Function): t.FunctionExpression;\n (node: t.Class): t.ClassExpression;\n (\n node: t.ExpressionStatement | t.Expression | t.Class | t.Function,\n ): t.Expression;\n};\n\nfunction toExpression(\n node: t.ExpressionStatement | t.Expression | t.Class | t.Function,\n): t.Expression {\n if (isExpressionStatement(node)) {\n node = node.expression;\n }\n\n // return unmodified node\n // important for things like ArrowFunctions where\n // type change from ArrowFunction to FunctionExpression\n // produces bugs like -> `()=>a` to `function () a`\n // without generating a BlockStatement for it\n // ref: https://github.com/babel/babili/issues/130\n if (isExpression(node)) {\n return node;\n }\n\n // convert all classes and functions\n // ClassDeclaration -> ClassExpression\n // FunctionDeclaration, ObjectMethod, ClassMethod -> FunctionExpression\n if (isClass(node)) {\n // @ts-expect-error todo(flow->ts): avoid type unsafe mutations\n node.type = \"ClassExpression\";\n // abstract modifiers are only allowed on class declarations\n node.abstract = false;\n } else if (isFunction(node)) {\n // @ts-expect-error todo(flow->ts): avoid type unsafe mutations\n node.type = \"FunctionExpression\";\n }\n\n // if it's still not an expression\n if (!isExpression(node)) {\n throw new Error(`cannot turn ${node.type} to an expression`);\n }\n\n return node;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAK0C,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAG3BC,YAAY;AAQ3B,SAASA,YAAYA,CACnBC,IAAiE,EACnD;EACd,IAAI,IAAAC,4BAAqB,EAACD,IAAI,CAAC,EAAE;IAC/BA,IAAI,GAAGA,IAAI,CAACE,UAAU;EACxB;EAQA,IAAI,IAAAC,mBAAY,EAACH,IAAI,CAAC,EAAE;IACtB,OAAOA,IAAI;EACb;EAKA,IAAI,IAAAI,cAAO,EAACJ,IAAI,CAAC,EAAE;IAEjBA,IAAI,CAACK,IAAI,GAAG,iBAAiB;IAE7BL,IAAI,CAACM,QAAQ,GAAG,KAAK;EACvB,CAAC,MAAM,IAAI,IAAAC,iBAAU,EAACP,IAAI,CAAC,EAAE;IAE3BA,IAAI,CAACK,IAAI,GAAG,oBAAoB;EAClC;EAGA,IAAI,CAAC,IAAAF,mBAAY,EAACH,IAAI,CAAC,EAAE;IACvB,MAAM,IAAIQ,KAAK,CAAC,eAAeR,IAAI,CAACK,IAAI,mBAAmB,CAAC;EAC9D;EAEA,OAAOL,IAAI;AACb","ignoreList":[]}

View File

@@ -0,0 +1,59 @@
/**
* 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 {
DOMConversionMap,
EditorConfig,
EditorState,
LexicalNode,
NodeKey,
ParagraphNode,
LexicalEditor,
LexicalCommand,
RangeSelection,
} from 'lexical';
import {ElementNode} from 'lexical';
declare export var DRAG_DROP_PASTE: LexicalCommand<Array<File>>;
declare export class QuoteNode extends ElementNode {
static getType(): string;
static clone(node: QuoteNode): QuoteNode;
constructor(key?: NodeKey): void;
createDOM(config: EditorConfig): HTMLElement;
insertNewAfter(
selection: RangeSelection,
restoreSelection?: boolean,
): ParagraphNode;
collapseAtStart(): true;
}
declare export function $createQuoteNode(): QuoteNode;
declare export function $isQuoteNode(
node: ?LexicalNode,
): node is QuoteNode;
export type HeadingTagType = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
declare export class HeadingNode extends ElementNode {
__tag: HeadingTagType;
static getType(): string;
static clone(node: HeadingNode): HeadingNode;
constructor(tag: HeadingTagType, key?: NodeKey): void;
getTag(): HeadingTagType;
createDOM(config: EditorConfig): HTMLElement;
static importDOM(): DOMConversionMap | null;
insertNewAfter(
selection: RangeSelection,
restoreSelection?: boolean,
): ParagraphNode;
collapseAtStart(): true;
}
declare export function $createHeadingNode(
headingTag: HeadingTagType,
): HeadingNode;
declare export function $isHeadingNode(
node: ?LexicalNode,
): node is HeadingNode;
declare export function registerRichText(editor: LexicalEditor): () => void;

View File

@@ -0,0 +1,56 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var json_exports = {};
__export(json_exports, {
MySqlJson: () => MySqlJson,
MySqlJsonBuilder: () => MySqlJsonBuilder,
json: () => json
});
module.exports = __toCommonJS(json_exports);
var import_entity = require("../../entity.cjs");
var import_common = require("./common.cjs");
class MySqlJsonBuilder extends import_common.MySqlColumnBuilder {
static [import_entity.entityKind] = "MySqlJsonBuilder";
constructor(name) {
super(name, "json", "MySqlJson");
}
/** @internal */
build(table) {
return new MySqlJson(table, this.config);
}
}
class MySqlJson extends import_common.MySqlColumn {
static [import_entity.entityKind] = "MySqlJson";
getSQLType() {
return "json";
}
mapToDriverValue(value) {
return JSON.stringify(value);
}
}
function json(name) {
return new MySqlJsonBuilder(name ?? "");
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
MySqlJson,
MySqlJsonBuilder,
json
});
//# sourceMappingURL=json.cjs.map

View File

@@ -0,0 +1,12 @@
'use strict';
var Type = require('../type');
function resolveYamlMerge(data) {
return data === '<<' || data === null;
}
module.exports = new Type('tag:yaml.org,2002:merge', {
kind: 'scalar',
resolve: resolveYamlMerge
});

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.js","names":[],"sources":["../../../../../src/elements/WhereBuilder/Condition/Number/types.ts"],"sourcesContent":["import type { NumberFieldClient } from 'payload'\n\nimport type { DefaultFilterProps } from '../types.js'\n\nexport type NumberFilterProps = {\n readonly field: NumberFieldClient\n readonly onChange: (e: string) => void\n readonly value: number | number[]\n} & DefaultFilterProps\n"],"mappings":"AAIA","ignoreList":[]}

View File

@@ -0,0 +1,55 @@
import { Parser } from "../Parser.js";
import { dayPeriodEnumToHours } from "../utils.js";
// in the morning, in the afternoon, in the evening, at night
export class DayPeriodParser extends Parser {
priority = 80;
parse(dateString, token, match) {
switch (token) {
case "B":
case "BB":
case "BBB":
return (
match.dayPeriod(dateString, {
width: "abbreviated",
context: "formatting",
}) ||
match.dayPeriod(dateString, {
width: "narrow",
context: "formatting",
})
);
case "BBBBB":
return match.dayPeriod(dateString, {
width: "narrow",
context: "formatting",
});
case "BBBB":
default:
return (
match.dayPeriod(dateString, {
width: "wide",
context: "formatting",
}) ||
match.dayPeriod(dateString, {
width: "abbreviated",
context: "formatting",
}) ||
match.dayPeriod(dateString, {
width: "narrow",
context: "formatting",
})
);
}
}
set(date, _flags, value) {
date.setHours(dayPeriodEnumToHours(value), 0, 0, 0);
return date;
}
incompatibleTokens = ["a", "b", "t", "T"];
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"firebase.js","sources":["../../../../../src/integrations/tracing/firebase/firebase.ts"],"sourcesContent":["import type { IntegrationFn } from '@sentry/core';\nimport { captureException, defineIntegration, flush, SEMANTIC_ATTRIBUTE_SENTRY_OP } from '@sentry/core';\nimport { addOriginToSpan, generateInstrumentOnce } from '@sentry/node-core';\nimport { FirebaseInstrumentation, type FirebaseInstrumentationConfig } from './otel';\n\nconst INTEGRATION_NAME = 'Firebase';\n\nconst config: FirebaseInstrumentationConfig = {\n firestoreSpanCreationHook: span => {\n addOriginToSpan(span, 'auto.firebase.otel.firestore');\n\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, 'db.query');\n },\n functions: {\n requestHook: span => {\n addOriginToSpan(span, 'auto.firebase.otel.functions');\n\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, 'http.request');\n },\n errorHook: async (_, error) => {\n if (error) {\n captureException(error, {\n mechanism: {\n type: 'auto.firebase.otel.functions',\n handled: false,\n },\n });\n await flush(2000);\n }\n },\n },\n};\n\nexport const instrumentFirebase = generateInstrumentOnce(INTEGRATION_NAME, () => new FirebaseInstrumentation(config));\n\nconst _firebaseIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentFirebase();\n },\n };\n}) satisfies IntegrationFn;\n\nexport const firebaseIntegration = defineIntegration(_firebaseIntegration);\n"],"names":[],"mappings":";;;;AAKA,MAAM,gBAAA,GAAmB,UAAU;;AAEnC,MAAM,MAAM,GAAkC;AAC9C,EAAE,yBAAyB,EAAE,IAAA,IAAQ;AACrC,IAAI,eAAe,CAAC,IAAI,EAAE,8BAA8B,CAAC;;AAEzD,IAAI,IAAI,CAAC,YAAY,CAAC,4BAA4B,EAAE,UAAU,CAAC;AAC/D,EAAE,CAAC;AACH,EAAE,SAAS,EAAE;AACb,IAAI,WAAW,EAAE,IAAA,IAAQ;AACzB,MAAM,eAAe,CAAC,IAAI,EAAE,8BAA8B,CAAC;;AAE3D,MAAM,IAAI,CAAC,YAAY,CAAC,4BAA4B,EAAE,cAAc,CAAC;AACrE,IAAI,CAAC;AACL,IAAI,SAAS,EAAE,OAAO,CAAC,EAAE,KAAK,KAAK;AACnC,MAAM,IAAI,KAAK,EAAE;AACjB,QAAQ,gBAAgB,CAAC,KAAK,EAAE;AAChC,UAAU,SAAS,EAAE;AACrB,YAAY,IAAI,EAAE,8BAA8B;AAChD,YAAY,OAAO,EAAE,KAAK;AAC1B,WAAW;AACX,SAAS,CAAC;AACV,QAAQ,MAAM,KAAK,CAAC,IAAI,CAAC;AACzB,MAAM;AACN,IAAI,CAAC;AACL,GAAG;AACH,CAAC;;AAEM,MAAM,kBAAA,GAAqB,sBAAsB,CAAC,gBAAgB,EAAE,MAAM,IAAI,uBAAuB,CAAC,MAAM,CAAC;;AAEpH,MAAM,oBAAA,IAAwB,MAAM;AACpC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,gBAAgB;AAC1B,IAAI,SAAS,GAAG;AAChB,MAAM,kBAAkB,EAAE;AAC1B,IAAI,CAAC;AACL,GAAG;AACH,CAAC,CAAA;;MAEY,mBAAA,GAAsB,iBAAiB,CAAC,oBAAoB;;;;"}

View File

@@ -0,0 +1,36 @@
import { getISOWeekYear } from "./getISOWeekYear.js";
import { setISOWeekYear } from "./setISOWeekYear.js";
/**
* The {@link addISOWeekYears} function options.
*/
/**
* @name addISOWeekYears
* @category ISO Week-Numbering Year Helpers
* @summary Add the specified number of ISO week-numbering years to the given date.
*
* @description
* Add the specified number of ISO week-numbering years to the given date.
*
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_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 be changed
* @param amount - The amount of ISO week-numbering years to be added.
* @param options - An object with options
*
* @returns The new date with the ISO week-numbering years added
*
* @example
* // Add 5 ISO week-numbering years to 2 July 2010:
* const result = addISOWeekYears(new Date(2010, 6, 2), 5)
* //=> Fri Jun 26 2015 00:00:00
*/
export function addISOWeekYears(date, amount, options) {
return setISOWeekYear(date, getISOWeekYear(date, options) + amount, options);
}
// Fallback for modularized imports:
export default addISOWeekYears;

View File

@@ -0,0 +1,20 @@
export const docWithFilenameExists = async ({ collectionSlug, filename, prefix, req })=>{
const where = {
filename: {
equals: filename
}
};
if (prefix) {
where.prefix = {
equals: prefix
};
}
const doc = await req.payload.db.findOne({
collection: collectionSlug,
req,
where
});
return !!doc;
};
//# sourceMappingURL=docWithFilenameExists.js.map

View File

@@ -0,0 +1 @@
Prism.languages.gettext={comment:[{pattern:/# .*/,greedy:!0,alias:"translator-comment"},{pattern:/#\..*/,greedy:!0,alias:"extracted-comment"},{pattern:/#:.*/,greedy:!0,alias:"reference-comment"},{pattern:/#,.*/,greedy:!0,alias:"flag-comment"},{pattern:/#\|.*/,greedy:!0,alias:"previously-untranslated-comment"},{pattern:/#.*/,greedy:!0}],string:{pattern:/(^|[^\\])"(?:[^"\\]|\\.)*"/,lookbehind:!0,greedy:!0},keyword:/^msg(?:ctxt|id|id_plural|str)\b/m,number:/\b\d+\b/,punctuation:/[\[\]]/},Prism.languages.po=Prism.languages.gettext;

View File

@@ -0,0 +1,14 @@
import React from 'react';
/**
* Utility to render a widget on-demand on the client.
*/
export declare const RenderWidget: React.FC<{
/**
* Instance-specific data for this widget
*/
/**
* Unique ID for this widget instance (format: "slug-timestamp")
*/
widgetId: string;
}>;
//# sourceMappingURL=RenderWidget.d.ts.map

View File

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

View File

@@ -0,0 +1,22 @@
import { entityKind } from "../entity.js";
import { SQL, type SQLWrapper } from "../sql/sql.js";
import type { NonArray, Writable } from "../utils.js";
import { type PgEnum, type PgEnumObject } from "./columns/enum.js";
import { type pgSequence } from "./sequence.js";
import { type PgTableFn } from "./table.js";
import { type pgMaterializedView, type pgView } from "./view.js";
export declare class PgSchema<TName extends string = string> implements SQLWrapper {
readonly schemaName: TName;
static readonly [entityKind]: string;
constructor(schemaName: TName);
table: PgTableFn<TName>;
view: typeof pgView;
materializedView: typeof pgMaterializedView;
enum<U extends string, T extends Readonly<[U, ...U[]]>>(enumName: string, values: T | Writable<T>): PgEnum<Writable<T>>;
enum<E extends Record<string, string>>(enumName: string, enumObj: NonArray<E>): PgEnumObject<E>;
sequence: typeof pgSequence;
getSQL(): SQL;
shouldOmitSQLParens(): boolean;
}
export declare function isPgSchema(obj: unknown): obj is PgSchema;
export declare function pgSchema<T extends string>(name: T): PgSchema<T>;

View File

@@ -0,0 +1,21 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Heart = createLucideIcon("Heart", [
[
"path",
{
d: "M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",
key: "c3ymky"
}
]
]);
export { Heart as default };
//# sourceMappingURL=heart.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/text.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '~/pg-core/table.ts';\nimport { getColumnNameAndConfig, type Writable } from '~/utils.ts';\nimport { PgColumn, PgColumnBuilder } from './common.ts';\n\nexport type PgTextBuilderInitial<TName extends string, TEnum extends [string, ...string[]]> = PgTextBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'PgText';\n\tdata: TEnum[number];\n\tenumValues: TEnum;\n\tdriverParam: string;\n}>;\n\nexport class PgTextBuilder<\n\tT extends ColumnBuilderBaseConfig<'string', 'PgText'>,\n> extends PgColumnBuilder<T, { enumValues: T['enumValues'] }> {\n\tstatic override readonly [entityKind]: string = 'PgTextBuilder';\n\n\tconstructor(\n\t\tname: T['name'],\n\t\tconfig: PgTextConfig<T['enumValues']>,\n\t) {\n\t\tsuper(name, 'string', 'PgText');\n\t\tthis.config.enumValues = config.enum;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgText<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgText<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class PgText<T extends ColumnBaseConfig<'string', 'PgText'>>\n\textends PgColumn<T, { enumValues: T['enumValues'] }>\n{\n\tstatic override readonly [entityKind]: string = 'PgText';\n\n\toverride readonly enumValues = this.config.enumValues;\n\n\tgetSQLType(): string {\n\t\treturn 'text';\n\t}\n}\n\nexport interface PgTextConfig<\n\tTEnum extends readonly string[] | string[] | undefined = readonly string[] | string[] | undefined,\n> {\n\tenum?: TEnum;\n}\n\nexport function text(): PgTextBuilderInitial<'', [string, ...string[]]>;\nexport function text<U extends string, T extends Readonly<[U, ...U[]]>>(\n\tconfig?: PgTextConfig<T | Writable<T>>,\n): PgTextBuilderInitial<'', Writable<T>>;\nexport function text<TName extends string, U extends string, T extends Readonly<[U, ...U[]]>>(\n\tname: TName,\n\tconfig?: PgTextConfig<T | Writable<T>>,\n): PgTextBuilderInitial<TName, Writable<T>>;\nexport function text(a?: string | PgTextConfig, b: PgTextConfig = {}): any {\n\tconst { name, config } = getColumnNameAndConfig<PgTextConfig>(a, b);\n\treturn new PgTextBuilder(name, config as any);\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,8BAA6C;AACtD,SAAS,UAAU,uBAAuB;AAWnC,MAAM,sBAEH,gBAAoD;AAAA,EAC7D,QAA0B,UAAU,IAAY;AAAA,EAEhD,YACC,MACA,QACC;AACD,UAAM,MAAM,UAAU,QAAQ;AAC9B,SAAK,OAAO,aAAa,OAAO;AAAA,EACjC;AAAA;AAAA,EAGS,MACR,OAC0C;AAC1C,WAAO,IAAI,OAAwC,OAAO,KAAK,MAA8C;AAAA,EAC9G;AACD;AAEO,MAAM,eACJ,SACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAE9B,aAAa,KAAK,OAAO;AAAA,EAE3C,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAgBO,SAAS,KAAK,GAA2B,IAAkB,CAAC,GAAQ;AAC1E,QAAM,EAAE,MAAM,OAAO,IAAI,uBAAqC,GAAG,CAAC;AAClE,SAAO,IAAI,cAAc,MAAM,MAAa;AAC7C;","names":[]}

View File

@@ -0,0 +1,40 @@
@import '../../scss/styles';
@layer payload-default {
[dir='rtl'] .search-filter {
svg {
right: base(0.5);
left: 0;
}
&__input {
padding-right: base(2);
padding-left: 0;
}
}
.search-filter {
position: relative;
svg {
position: absolute;
top: 50%;
transform: translateY(-50%);
left: base(0.5);
}
&__input {
@include formInput;
height: auto;
padding: 0;
box-shadow: none;
background-color: var(--theme-elevation-50);
border: none;
&:not(:disabled) {
&:hover,
&:focus {
box-shadow: none;
}
}
}
}
}

View File

@@ -0,0 +1,29 @@
"use strict";
exports.it = void 0;
var _index = require("./it/_lib/formatDistance.cjs");
var _index2 = require("./it/_lib/formatLong.cjs");
var _index3 = require("./it/_lib/formatRelative.cjs");
var _index4 = require("./it/_lib/localize.cjs");
var _index5 = require("./it/_lib/match.cjs");
/**
* @category Locales
* @summary Italian locale.
* @language Italian
* @iso-639-2 ita
* @author Alberto Restifo [@albertorestifo](https://github.com/albertorestifo)
* @author Giovanni Polimeni [@giofilo](https://github.com/giofilo)
* @author Vincenzo Carrese [@vin-car](https://github.com/vin-car)
*/
const it = (exports.it = {
code: "it",
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,38 @@
/**
* @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 Fish = createLucideIcon("Fish", [
[
"path",
{
d: "M6.5 12c.94-3.46 4.94-6 8.5-6 3.56 0 6.06 2.54 7 6-.94 3.47-3.44 6-7 6s-7.56-2.53-8.5-6Z",
key: "15baut"
}
],
["path", { d: "M18 12v.5", key: "18hhni" }],
["path", { d: "M16 17.93a9.77 9.77 0 0 1 0-11.86", key: "16dt7o" }],
[
"path",
{
d: "M7 10.67C7 8 5.58 5.97 2.73 5.5c-1 1.5-1 5 .23 6.5-1.24 1.5-1.24 5-.23 6.5C5.58 18.03 7 16 7 13.33",
key: "l9di03"
}
],
[
"path",
{ d: "M10.46 7.26C10.2 5.88 9.17 4.24 8 3h5.8a2 2 0 0 1 1.98 1.67l.23 1.4", key: "1kjonw" }
],
[
"path",
{ d: "m16.01 17.93-.23 1.4A2 2 0 0 1 13.8 21H9.5a5.96 5.96 0 0 0 1.49-3.98", key: "1zlm23" }
]
]);
export { Fish as default };
//# sourceMappingURL=fish.js.map

View File

@@ -0,0 +1,6 @@
var WeakMap = require('./_WeakMap');
/** Used to store function metadata. */
var metaMap = WeakMap && new WeakMap;
module.exports = metaMap;

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/elements/DatePicker/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE3E,MAAM,MAAM,KAAK,GAAG;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,IAAI,CAAA;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,CAAA;CACtB,GAAG,cAAc,GAChB,WAAW,GACX,eAAe,CAAA"}

View File

@@ -0,0 +1,419 @@
// @ts-nocheck
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
var $interceptModuleExecution$ = undefined;
var $moduleCache$ = undefined;
var $hmrModuleData$ = undefined;
/** @type {() => Promise} */
var $hmrDownloadManifest$ = undefined;
var $hmrDownloadUpdateHandlers$ = undefined;
var $hmrInvalidateModuleHandlers$ = undefined;
var __webpack_require__ = undefined;
module.exports = function () {
var currentModuleData = {};
var installedModules = $moduleCache$;
// module and require creation
var currentChildModule;
var currentParents = [];
// status
var registeredStatusHandlers = [];
var currentStatus = "idle";
// while downloading
var blockingPromises = 0;
var blockingPromisesWaiting = [];
// The update info
var currentUpdateApplyHandlers;
var queuedInvalidatedModules;
$hmrModuleData$ = currentModuleData;
$interceptModuleExecution$.push(function (options) {
var module = options.module;
var require = createRequire(options.require, options.id);
module.hot = createModuleHotObject(options.id, module);
module.parents = currentParents;
module.children = [];
currentParents = [];
options.require = require;
});
$hmrDownloadUpdateHandlers$ = {};
$hmrInvalidateModuleHandlers$ = {};
function createRequire(require, moduleId) {
var me = installedModules[moduleId];
if (!me) return require;
var fn = function (request) {
if (me.hot.active) {
if (installedModules[request]) {
var parents = installedModules[request].parents;
if (parents.indexOf(moduleId) === -1) {
parents.push(moduleId);
}
} else {
currentParents = [moduleId];
currentChildModule = request;
}
if (me.children.indexOf(request) === -1) {
me.children.push(request);
}
} else {
console.warn(
"[HMR] unexpected require(" +
request +
") from disposed module " +
moduleId
);
currentParents = [];
}
return require(request);
};
var createPropertyDescriptor = function (name) {
return {
configurable: true,
enumerable: true,
get: function () {
return require[name];
},
set: function (value) {
require[name] = value;
}
};
};
for (var name in require) {
if (Object.prototype.hasOwnProperty.call(require, name) && name !== "e") {
Object.defineProperty(fn, name, createPropertyDescriptor(name));
}
}
fn.e = function (chunkId, fetchPriority) {
return trackBlockingPromise(require.e(chunkId, fetchPriority));
};
return fn;
}
function createModuleHotObject(moduleId, me) {
var _main = currentChildModule !== moduleId;
var hot = {
// private stuff
_acceptedDependencies: {},
_acceptedErrorHandlers: {},
_declinedDependencies: {},
_selfAccepted: false,
_selfDeclined: false,
_selfInvalidated: false,
_disposeHandlers: [],
_main: _main,
_requireSelf: function () {
currentParents = me.parents.slice();
currentChildModule = _main ? undefined : moduleId;
__webpack_require__(moduleId);
},
// Module API
active: true,
accept: function (dep, callback, errorHandler) {
if (dep === undefined) hot._selfAccepted = true;
else if (typeof dep === "function") hot._selfAccepted = dep;
else if (typeof dep === "object" && dep !== null) {
for (var i = 0; i < dep.length; i++) {
hot._acceptedDependencies[dep[i]] = callback || function () {};
hot._acceptedErrorHandlers[dep[i]] = errorHandler;
}
} else {
hot._acceptedDependencies[dep] = callback || function () {};
hot._acceptedErrorHandlers[dep] = errorHandler;
}
},
decline: function (dep) {
if (dep === undefined) hot._selfDeclined = true;
else if (typeof dep === "object" && dep !== null)
for (var i = 0; i < dep.length; i++)
hot._declinedDependencies[dep[i]] = true;
else hot._declinedDependencies[dep] = true;
},
dispose: function (callback) {
hot._disposeHandlers.push(callback);
},
addDisposeHandler: function (callback) {
hot._disposeHandlers.push(callback);
},
removeDisposeHandler: function (callback) {
var idx = hot._disposeHandlers.indexOf(callback);
if (idx >= 0) hot._disposeHandlers.splice(idx, 1);
},
invalidate: function () {
this._selfInvalidated = true;
switch (currentStatus) {
case "idle":
currentUpdateApplyHandlers = [];
Object.keys($hmrInvalidateModuleHandlers$).forEach(function (key) {
$hmrInvalidateModuleHandlers$[key](
moduleId,
currentUpdateApplyHandlers
);
});
setStatus("ready");
break;
case "ready":
Object.keys($hmrInvalidateModuleHandlers$).forEach(function (key) {
$hmrInvalidateModuleHandlers$[key](
moduleId,
currentUpdateApplyHandlers
);
});
break;
case "prepare":
case "check":
case "dispose":
case "apply":
(queuedInvalidatedModules = queuedInvalidatedModules || []).push(
moduleId
);
break;
default:
// ignore requests in error states
break;
}
},
// Management API
check: hotCheck,
apply: hotApply,
status: function (l) {
if (!l) return currentStatus;
registeredStatusHandlers.push(l);
},
addStatusHandler: function (l) {
registeredStatusHandlers.push(l);
},
removeStatusHandler: function (l) {
var idx = registeredStatusHandlers.indexOf(l);
if (idx >= 0) registeredStatusHandlers.splice(idx, 1);
},
// inherit from previous dispose call
data: currentModuleData[moduleId]
};
currentChildModule = undefined;
return hot;
}
function setStatus(newStatus) {
currentStatus = newStatus;
var results = [];
for (var i = 0; i < registeredStatusHandlers.length; i++)
results[i] = registeredStatusHandlers[i].call(null, newStatus);
return Promise.all(results).then(function () {});
}
function unblock() {
if (--blockingPromises === 0) {
setStatus("ready").then(function () {
if (blockingPromises === 0) {
var list = blockingPromisesWaiting;
blockingPromisesWaiting = [];
for (var i = 0; i < list.length; i++) {
list[i]();
}
}
});
}
}
function trackBlockingPromise(promise) {
switch (currentStatus) {
case "ready":
setStatus("prepare");
/* fallthrough */
case "prepare":
blockingPromises++;
promise.then(unblock, unblock);
return promise;
default:
return promise;
}
}
function waitForBlockingPromises(fn) {
if (blockingPromises === 0) return fn();
return new Promise(function (resolve) {
blockingPromisesWaiting.push(function () {
resolve(fn());
});
});
}
function hotCheck(applyOnUpdate) {
if (currentStatus !== "idle") {
throw new Error("check() is only allowed in idle status");
}
return setStatus("check")
.then($hmrDownloadManifest$)
.then(function (update) {
if (!update) {
return setStatus(applyInvalidatedModules() ? "ready" : "idle").then(
function () {
return null;
}
);
}
return setStatus("prepare").then(function () {
var updatedModules = [];
currentUpdateApplyHandlers = [];
return Promise.all(
Object.keys($hmrDownloadUpdateHandlers$).reduce(function (
promises,
key
) {
$hmrDownloadUpdateHandlers$[key](
update.c,
update.r,
update.m,
promises,
currentUpdateApplyHandlers,
updatedModules,
update.css
);
return promises;
}, [])
).then(function () {
return waitForBlockingPromises(function () {
if (applyOnUpdate) {
return internalApply(applyOnUpdate);
}
return setStatus("ready").then(function () {
return updatedModules;
});
});
});
});
});
}
function hotApply(options) {
if (currentStatus !== "ready") {
return Promise.resolve().then(function () {
throw new Error(
"apply() is only allowed in ready status (state: " +
currentStatus +
")"
);
});
}
return internalApply(options);
}
function internalApply(options) {
options = options || {};
applyInvalidatedModules();
var results = currentUpdateApplyHandlers.map(function (handler) {
return handler(options);
});
currentUpdateApplyHandlers = undefined;
var errors = results
.map(function (r) {
return r.error;
})
.filter(Boolean);
if (errors.length > 0) {
return setStatus("abort").then(function () {
throw errors[0];
});
}
// Now in "dispose" phase
var disposePromise = setStatus("dispose");
results.forEach(function (result) {
if (result.dispose) result.dispose();
});
// Now in "apply" phase
var applyPromise = setStatus("apply");
var error;
var reportError = function (err) {
if (!error) error = err;
};
var outdatedModules = [];
var onAccepted = function () {
return Promise.all([disposePromise, applyPromise]).then(function () {
// handle errors in accept handlers and self accepted module load
if (error) {
return setStatus("fail").then(function () {
throw error;
});
}
if (queuedInvalidatedModules) {
return internalApply(options).then(function (list) {
outdatedModules.forEach(function (moduleId) {
if (list.indexOf(moduleId) < 0) list.push(moduleId);
});
return list;
});
}
return setStatus("idle").then(function () {
return outdatedModules;
});
});
};
return Promise.all(
results
.filter(function (result) {
return result.apply;
})
.map(function (result) {
return result.apply(reportError);
})
)
.then(function (applyResults) {
applyResults.forEach(function (modules) {
if (modules) {
for (var i = 0; i < modules.length; i++) {
outdatedModules.push(modules[i]);
}
}
});
})
.then(onAccepted);
}
function applyInvalidatedModules() {
if (queuedInvalidatedModules) {
if (!currentUpdateApplyHandlers) currentUpdateApplyHandlers = [];
Object.keys($hmrInvalidateModuleHandlers$).forEach(function (key) {
queuedInvalidatedModules.forEach(function (moduleId) {
$hmrInvalidateModuleHandlers$[key](
moduleId,
currentUpdateApplyHandlers
);
});
});
queuedInvalidatedModules = undefined;
return true;
}
}
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"arrow-big-up-dash.js","sources":["../../../src/icons/arrow-big-up-dash.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ArrowBigUpDash\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNOSAxOWg2IiAvPgogIDxwYXRoIGQ9Ik05IDE1di0zSDVsNy03IDcgN2gtNHYzSDl6IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/arrow-big-up-dash\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 ArrowBigUpDash = createLucideIcon('ArrowBigUpDash', [\n ['path', { d: 'M9 19h6', key: '456am0' }],\n ['path', { d: 'M9 15v-3H5l7-7 7 7h-4v3H9z', key: '1r2uve' }],\n]);\n\nexport default ArrowBigUpDash;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,iBAAiB,gBAAkB,CAAA,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,CAA8B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7D,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 { millisecondsToMinutes as fn } from "../millisecondsToMinutes.js";
import { convertToFP } from "./_lib/convertToFP.js";
export const millisecondsToMinutes = convertToFP(fn, 1);
// Fallback for modularized imports:
export default millisecondsToMinutes;

View File

@@ -0,0 +1,857 @@
import { ErrorKind } from "./error.js";
import { SKELETON_TYPE, TYPE } from "./types.js";
import { SPACE_SEPARATOR_REGEX } from "./regex.generated.js";
import { parseNumberSkeleton, parseNumberSkeletonFromString, parseDateTimeSkeleton } from "@formatjs/icu-skeleton-parser";
import { getBestPattern } from "./date-time-pattern-generator.js";
const SPACE_SEPARATOR_START_REGEX = new RegExp(`^${SPACE_SEPARATOR_REGEX.source}*`);
const SPACE_SEPARATOR_END_REGEX = new RegExp(`${SPACE_SEPARATOR_REGEX.source}*$`);
function createLocation(start, end) {
return {
start,
end
};
}
// #region Ponyfills
// Consolidate these variables up top for easier toggling during debugging
const hasNativeFromEntries = !!Object.fromEntries;
const hasTrimStart = !!String.prototype.trimStart;
const hasTrimEnd = !!String.prototype.trimEnd;
const fromEntries = hasNativeFromEntries ? Object.fromEntries : function fromEntries(entries) {
const obj = {};
for (const [k, v] of entries) {
obj[k] = v;
}
return obj;
};
const trimStart = hasTrimStart ? function trimStart(s) {
return s.trimStart();
} : function trimStart(s) {
return s.replace(SPACE_SEPARATOR_START_REGEX, "");
};
const trimEnd = hasTrimEnd ? function trimEnd(s) {
return s.trimEnd();
} : function trimEnd(s) {
return s.replace(SPACE_SEPARATOR_END_REGEX, "");
};
// #endregion
const IDENTIFIER_PREFIX_RE = new RegExp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
function matchIdentifierAtIndex(s, index) {
IDENTIFIER_PREFIX_RE.lastIndex = index;
const match = IDENTIFIER_PREFIX_RE.exec(s);
return match[1] ?? "";
}
export class Parser {
message;
position;
locale;
ignoreTag;
requiresOtherClause;
shouldParseSkeletons;
constructor(message, options = {}) {
this.message = message;
this.position = {
offset: 0,
line: 1,
column: 1
};
this.ignoreTag = !!options.ignoreTag;
this.locale = options.locale;
this.requiresOtherClause = !!options.requiresOtherClause;
this.shouldParseSkeletons = !!options.shouldParseSkeletons;
}
parse() {
if (this.offset() !== 0) {
throw Error("parser can only be used once");
}
return this.parseMessage(0, "", false);
}
parseMessage(nestingLevel, parentArgType, expectingCloseTag) {
let elements = [];
while (!this.isEOF()) {
const char = this.char();
if (char === 123) {
const result = this.parseArgument(nestingLevel, expectingCloseTag);
if (result.err) {
return result;
}
elements.push(result.val);
} else if (char === 125 && nestingLevel > 0) {
break;
} else if (char === 35 && (parentArgType === "plural" || parentArgType === "selectordinal")) {
const position = this.clonePosition();
this.bump();
elements.push({
type: TYPE.pound,
location: createLocation(position, this.clonePosition())
});
} else if (char === 60 && !this.ignoreTag && this.peek() === 47) {
if (expectingCloseTag) {
break;
} else {
return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(this.clonePosition(), this.clonePosition()));
}
} else if (char === 60 && !this.ignoreTag && _isAlpha(this.peek() || 0)) {
const result = this.parseTag(nestingLevel, parentArgType);
if (result.err) {
return result;
}
elements.push(result.val);
} else {
const result = this.parseLiteral(nestingLevel, parentArgType);
if (result.err) {
return result;
}
elements.push(result.val);
}
}
return {
val: elements,
err: null
};
}
/**
* A tag name must start with an ASCII lower/upper case letter. The grammar is based on the
* [custom element name][] except that a dash is NOT always mandatory and uppercase letters
* are accepted:
*
* ```
* tag ::= "<" tagName (whitespace)* "/>" | "<" tagName (whitespace)* ">" message "</" tagName (whitespace)* ">"
* tagName ::= [a-z] (PENChar)*
* PENChar ::=
* "-" | "." | [0-9] | "_" | [a-z] | [A-Z] | #xB7 | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x37D] |
* [#x37F-#x1FFF] | [#x200C-#x200D] | [#x203F-#x2040] | [#x2070-#x218F] | [#x2C00-#x2FEF] |
* [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
* ```
*
* [custom element name]: https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name
* NOTE: We're a bit more lax here since HTML technically does not allow uppercase HTML element but we do
* since other tag-based engines like React allow it
*/
parseTag(nestingLevel, parentArgType) {
const startPosition = this.clonePosition();
this.bump();
const tagName = this.parseTagName();
this.bumpSpace();
if (this.bumpIf("/>")) {
// Self closing tag
return {
val: {
type: TYPE.literal,
value: `<${tagName}/>`,
location: createLocation(startPosition, this.clonePosition())
},
err: null
};
} else if (this.bumpIf(">")) {
const childrenResult = this.parseMessage(nestingLevel + 1, parentArgType, true);
if (childrenResult.err) {
return childrenResult;
}
const children = childrenResult.val;
// Expecting a close tag
const endTagStartPosition = this.clonePosition();
if (this.bumpIf("</")) {
if (this.isEOF() || !_isAlpha(this.char())) {
return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));
}
const closingTagNameStartPosition = this.clonePosition();
const closingTagName = this.parseTagName();
if (tagName !== closingTagName) {
return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(closingTagNameStartPosition, this.clonePosition()));
}
this.bumpSpace();
if (!this.bumpIf(">")) {
return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));
}
return {
val: {
type: TYPE.tag,
value: tagName,
children,
location: createLocation(startPosition, this.clonePosition())
},
err: null
};
} else {
return this.error(ErrorKind.UNCLOSED_TAG, createLocation(startPosition, this.clonePosition()));
}
} else {
return this.error(ErrorKind.INVALID_TAG, createLocation(startPosition, this.clonePosition()));
}
}
/**
* This method assumes that the caller has peeked ahead for the first tag character.
*/
parseTagName() {
const startOffset = this.offset();
this.bump();
while (!this.isEOF() && _isPotentialElementNameChar(this.char())) {
this.bump();
}
return this.message.slice(startOffset, this.offset());
}
parseLiteral(nestingLevel, parentArgType) {
const start = this.clonePosition();
let value = "";
while (true) {
const parseQuoteResult = this.tryParseQuote(parentArgType);
if (parseQuoteResult) {
value += parseQuoteResult;
continue;
}
const parseUnquotedResult = this.tryParseUnquoted(nestingLevel, parentArgType);
if (parseUnquotedResult) {
value += parseUnquotedResult;
continue;
}
const parseLeftAngleResult = this.tryParseLeftAngleBracket();
if (parseLeftAngleResult) {
value += parseLeftAngleResult;
continue;
}
break;
}
const location = createLocation(start, this.clonePosition());
return {
val: {
type: TYPE.literal,
value,
location
},
err: null
};
}
tryParseLeftAngleBracket() {
if (!this.isEOF() && this.char() === 60 && (this.ignoreTag || !_isAlphaOrSlash(this.peek() || 0))) {
this.bump();
return "<";
}
return null;
}
/**
* Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes
* a character that requires quoting (that is, "only where needed"), and works the same in
* nested messages as on the top level of the pattern. The new behavior is otherwise compatible.
*/
tryParseQuote(parentArgType) {
if (this.isEOF() || this.char() !== 39) {
return null;
}
// Parse escaped char following the apostrophe, or early return if there is no escaped char.
// Check if is valid escaped character
switch (this.peek()) {
case 39:
// double quote, should return as a single quote.
this.bump();
this.bump();
return "'";
case 123:
case 60:
case 62:
case 125: break;
case 35:
if (parentArgType === "plural" || parentArgType === "selectordinal") {
break;
}
return null;
default: return null;
}
this.bump();
const codePoints = [this.char()];
this.bump();
// read chars until the optional closing apostrophe is found
while (!this.isEOF()) {
const ch = this.char();
if (ch === 39) {
if (this.peek() === 39) {
codePoints.push(39);
// Bump one more time because we need to skip 2 characters.
this.bump();
} else {
// Optional closing apostrophe.
this.bump();
break;
}
} else {
codePoints.push(ch);
}
this.bump();
}
return String.fromCodePoint(...codePoints);
}
tryParseUnquoted(nestingLevel, parentArgType) {
if (this.isEOF()) {
return null;
}
const ch = this.char();
if (ch === 60 || ch === 123 || ch === 35 && (parentArgType === "plural" || parentArgType === "selectordinal") || ch === 125 && nestingLevel > 0) {
return null;
} else {
this.bump();
return String.fromCodePoint(ch);
}
}
parseArgument(nestingLevel, expectingCloseTag) {
const openingBracePosition = this.clonePosition();
this.bump();
this.bumpSpace();
if (this.isEOF()) {
return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
}
if (this.char() === 125) {
this.bump();
return this.error(ErrorKind.EMPTY_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
}
// argument name
let value = this.parseIdentifierIfPossible().value;
if (!value) {
return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
}
this.bumpSpace();
if (this.isEOF()) {
return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
}
switch (this.char()) {
case 125: {
this.bump();
return {
val: {
type: TYPE.argument,
value,
location: createLocation(openingBracePosition, this.clonePosition())
},
err: null
};
}
case 44: {
this.bump();
this.bumpSpace();
if (this.isEOF()) {
return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
}
return this.parseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition);
}
default: return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
}
}
/**
* Advance the parser until the end of the identifier, if it is currently on
* an identifier character. Return an empty string otherwise.
*/
parseIdentifierIfPossible() {
const startingPosition = this.clonePosition();
const startOffset = this.offset();
const value = matchIdentifierAtIndex(this.message, startOffset);
const endOffset = startOffset + value.length;
this.bumpTo(endOffset);
const endPosition = this.clonePosition();
const location = createLocation(startingPosition, endPosition);
return {
value,
location
};
}
parseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition) {
// Parse this range:
// {name, type, style}
// ^---^
let typeStartPosition = this.clonePosition();
let argType = this.parseIdentifierIfPossible().value;
let typeEndPosition = this.clonePosition();
switch (argType) {
case "":
// Expecting a style string number, date, time, plural, selectordinal, or select.
return this.error(ErrorKind.EXPECT_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));
case "number":
case "date":
case "time": {
// Parse this range:
// {name, number, style}
// ^-------^
this.bumpSpace();
let styleAndLocation = null;
if (this.bumpIf(",")) {
this.bumpSpace();
const styleStartPosition = this.clonePosition();
const result = this.parseSimpleArgStyleIfPossible();
if (result.err) {
return result;
}
const style = trimEnd(result.val);
if (style.length === 0) {
return this.error(ErrorKind.EXPECT_ARGUMENT_STYLE, createLocation(this.clonePosition(), this.clonePosition()));
}
const styleLocation = createLocation(styleStartPosition, this.clonePosition());
styleAndLocation = {
style,
styleLocation
};
}
const argCloseResult = this.tryParseArgumentClose(openingBracePosition);
if (argCloseResult.err) {
return argCloseResult;
}
const location = createLocation(openingBracePosition, this.clonePosition());
// Extract style or skeleton
if (styleAndLocation && styleAndLocation.style.startsWith("::")) {
// Skeleton starts with `::`.
let skeleton = trimStart(styleAndLocation.style.slice(2));
if (argType === "number") {
const result = this.parseNumberSkeletonFromString(skeleton, styleAndLocation.styleLocation);
if (result.err) {
return result;
}
return {
val: {
type: TYPE.number,
value,
location,
style: result.val
},
err: null
};
} else {
if (skeleton.length === 0) {
return this.error(ErrorKind.EXPECT_DATE_TIME_SKELETON, location);
}
let dateTimePattern = skeleton;
// Get "best match" pattern only if locale is passed, if not, let it
// pass as-is where `parseDateTimeSkeleton()` will throw an error
// for unsupported patterns.
if (this.locale) {
dateTimePattern = getBestPattern(skeleton, this.locale);
}
const style = {
type: SKELETON_TYPE.dateTime,
pattern: dateTimePattern,
location: styleAndLocation.styleLocation,
parsedOptions: this.shouldParseSkeletons ? parseDateTimeSkeleton(dateTimePattern) : {}
};
const type = argType === "date" ? TYPE.date : TYPE.time;
return {
val: {
type,
value,
location,
style
},
err: null
};
}
}
// Regular style or no style.
return {
val: {
type: argType === "number" ? TYPE.number : argType === "date" ? TYPE.date : TYPE.time,
value,
location,
style: styleAndLocation?.style ?? null
},
err: null
};
}
case "plural":
case "selectordinal":
case "select": {
// Parse this range:
// {name, plural, options}
// ^---------^
const typeEndPosition = this.clonePosition();
this.bumpSpace();
if (!this.bumpIf(",")) {
return this.error(ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, createLocation(typeEndPosition, { ...typeEndPosition }));
}
this.bumpSpace();
// Parse offset:
// {name, plural, offset:1, options}
// ^-----^
//
// or the first option:
//
// {name, plural, one {...} other {...}}
// ^--^
let identifierAndLocation = this.parseIdentifierIfPossible();
let pluralOffset = 0;
if (argType !== "select" && identifierAndLocation.value === "offset") {
if (!this.bumpIf(":")) {
return this.error(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, createLocation(this.clonePosition(), this.clonePosition()));
}
this.bumpSpace();
const result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
if (result.err) {
return result;
}
// Parse another identifier for option parsing
this.bumpSpace();
identifierAndLocation = this.parseIdentifierIfPossible();
pluralOffset = result.val;
}
const optionsResult = this.tryParsePluralOrSelectOptions(nestingLevel, argType, expectingCloseTag, identifierAndLocation);
if (optionsResult.err) {
return optionsResult;
}
const argCloseResult = this.tryParseArgumentClose(openingBracePosition);
if (argCloseResult.err) {
return argCloseResult;
}
const location = createLocation(openingBracePosition, this.clonePosition());
if (argType === "select") {
return {
val: {
type: TYPE.select,
value,
options: fromEntries(optionsResult.val),
location
},
err: null
};
} else {
return {
val: {
type: TYPE.plural,
value,
options: fromEntries(optionsResult.val),
offset: pluralOffset,
pluralType: argType === "plural" ? "cardinal" : "ordinal",
location
},
err: null
};
}
}
default: return this.error(ErrorKind.INVALID_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));
}
}
tryParseArgumentClose(openingBracePosition) {
// Parse: {value, number, ::currency/GBP }
//
if (this.isEOF() || this.char() !== 125) {
return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
}
this.bump();
return {
val: true,
err: null
};
}
/**
* See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659
*/
parseSimpleArgStyleIfPossible() {
let nestedBraces = 0;
const startPosition = this.clonePosition();
while (!this.isEOF()) {
const ch = this.char();
switch (ch) {
case 39: {
// Treat apostrophe as quoting but include it in the style part.
// Find the end of the quoted literal text.
this.bump();
let apostrophePosition = this.clonePosition();
if (!this.bumpUntil("'")) {
return this.error(ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, createLocation(apostrophePosition, this.clonePosition()));
}
this.bump();
break;
}
case 123: {
nestedBraces += 1;
this.bump();
break;
}
case 125: {
if (nestedBraces > 0) {
nestedBraces -= 1;
} else {
return {
val: this.message.slice(startPosition.offset, this.offset()),
err: null
};
}
break;
}
default:
this.bump();
break;
}
}
return {
val: this.message.slice(startPosition.offset, this.offset()),
err: null
};
}
parseNumberSkeletonFromString(skeleton, location) {
let tokens = [];
try {
tokens = parseNumberSkeletonFromString(skeleton);
} catch {
return this.error(ErrorKind.INVALID_NUMBER_SKELETON, location);
}
return {
val: {
type: SKELETON_TYPE.number,
tokens,
location,
parsedOptions: this.shouldParseSkeletons ? parseNumberSkeleton(tokens) : {}
},
err: null
};
}
/**
* @param nesting_level The current nesting level of messages.
* This can be positive when parsing message fragment in select or plural argument options.
* @param parent_arg_type The parent argument's type.
* @param parsed_first_identifier If provided, this is the first identifier-like selector of
* the argument. It is a by-product of a previous parsing attempt.
* @param expecting_close_tag If true, this message is directly or indirectly nested inside
* between a pair of opening and closing tags. The nested message will not parse beyond
* the closing tag boundary.
*/
tryParsePluralOrSelectOptions(nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) {
let hasOtherClause = false;
const options = [];
const parsedSelectors = new Set();
let { value: selector, location: selectorLocation } = parsedFirstIdentifier;
// Parse:
// one {one apple}
// ^--^
while (true) {
if (selector.length === 0) {
const startPosition = this.clonePosition();
if (parentArgType !== "select" && this.bumpIf("=")) {
// Try parse `={number}` selector
const result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR);
if (result.err) {
return result;
}
selectorLocation = createLocation(startPosition, this.clonePosition());
selector = this.message.slice(startPosition.offset, this.offset());
} else {
break;
}
}
// Duplicate selector clauses
if (parsedSelectors.has(selector)) {
return this.error(parentArgType === "select" ? ErrorKind.DUPLICATE_SELECT_ARGUMENT_SELECTOR : ErrorKind.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, selectorLocation);
}
if (selector === "other") {
hasOtherClause = true;
}
// Parse:
// one {one apple}
// ^----------^
this.bumpSpace();
const openingBracePosition = this.clonePosition();
if (!this.bumpIf("{")) {
return this.error(parentArgType === "select" ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, createLocation(this.clonePosition(), this.clonePosition()));
}
const fragmentResult = this.parseMessage(nestingLevel + 1, parentArgType, expectCloseTag);
if (fragmentResult.err) {
return fragmentResult;
}
const argCloseResult = this.tryParseArgumentClose(openingBracePosition);
if (argCloseResult.err) {
return argCloseResult;
}
options.push([selector, {
value: fragmentResult.val,
location: createLocation(openingBracePosition, this.clonePosition())
}]);
// Keep track of the existing selectors
parsedSelectors.add(selector);
// Prep next selector clause.
this.bumpSpace();
({value: selector, location: selectorLocation} = this.parseIdentifierIfPossible());
}
if (options.length === 0) {
return this.error(parentArgType === "select" ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, createLocation(this.clonePosition(), this.clonePosition()));
}
if (this.requiresOtherClause && !hasOtherClause) {
return this.error(ErrorKind.MISSING_OTHER_CLAUSE, createLocation(this.clonePosition(), this.clonePosition()));
}
return {
val: options,
err: null
};
}
tryParseDecimalInteger(expectNumberError, invalidNumberError) {
let sign = 1;
const startingPosition = this.clonePosition();
if (this.bumpIf("+")) {} else if (this.bumpIf("-")) {
sign = -1;
}
let hasDigits = false;
let decimal = 0;
while (!this.isEOF()) {
const ch = this.char();
if (ch >= 48 && ch <= 57) {
hasDigits = true;
decimal = decimal * 10 + (ch - 48);
this.bump();
} else {
break;
}
}
const location = createLocation(startingPosition, this.clonePosition());
if (!hasDigits) {
return this.error(expectNumberError, location);
}
decimal *= sign;
if (!Number.isSafeInteger(decimal)) {
return this.error(invalidNumberError, location);
}
return {
val: decimal,
err: null
};
}
offset() {
return this.position.offset;
}
isEOF() {
return this.offset() === this.message.length;
}
clonePosition() {
// This is much faster than `Object.assign` or spread.
return {
offset: this.position.offset,
line: this.position.line,
column: this.position.column
};
}
/**
* Return the code point at the current position of the parser.
* Throws if the index is out of bound.
*/
char() {
const offset = this.position.offset;
if (offset >= this.message.length) {
throw Error("out of bound");
}
const code = this.message.codePointAt(offset);
if (code === undefined) {
throw Error(`Offset ${offset} is at invalid UTF-16 code unit boundary`);
}
return code;
}
error(kind, location) {
return {
val: null,
err: {
kind,
message: this.message,
location
}
};
}
/** Bump the parser to the next UTF-16 code unit. */
bump() {
if (this.isEOF()) {
return;
}
const code = this.char();
if (code === 10) {
this.position.line += 1;
this.position.column = 1;
this.position.offset += 1;
} else {
this.position.column += 1;
// 0 ~ 0x10000 -> unicode BMP, otherwise skip the surrogate pair.
this.position.offset += code < 65536 ? 1 : 2;
}
}
/**
* If the substring starting at the current position of the parser has
* the given prefix, then bump the parser to the character immediately
* following the prefix and return true. Otherwise, don't bump the parser
* and return false.
*/
bumpIf(prefix) {
if (this.message.startsWith(prefix, this.offset())) {
for (let i = 0; i < prefix.length; i++) {
this.bump();
}
return true;
}
return false;
}
/**
* Bump the parser until the pattern character is found and return `true`.
* Otherwise bump to the end of the file and return `false`.
*/
bumpUntil(pattern) {
const currentOffset = this.offset();
const index = this.message.indexOf(pattern, currentOffset);
if (index >= 0) {
this.bumpTo(index);
return true;
} else {
this.bumpTo(this.message.length);
return false;
}
}
/**
* Bump the parser to the target offset.
* If target offset is beyond the end of the input, bump the parser to the end of the input.
*/
bumpTo(targetOffset) {
if (this.offset() > targetOffset) {
throw Error(`targetOffset ${targetOffset} must be greater than or equal to the current offset ${this.offset()}`);
}
targetOffset = Math.min(targetOffset, this.message.length);
while (true) {
const offset = this.offset();
if (offset === targetOffset) {
break;
}
if (offset > targetOffset) {
throw Error(`targetOffset ${targetOffset} is at invalid UTF-16 code unit boundary`);
}
this.bump();
if (this.isEOF()) {
break;
}
}
}
/** advance the parser through all whitespace to the next non-whitespace code unit. */
bumpSpace() {
while (!this.isEOF() && _isWhiteSpace(this.char())) {
this.bump();
}
}
/**
* Peek at the *next* Unicode codepoint in the input without advancing the parser.
* If the input has been exhausted, then this returns null.
*/
peek() {
if (this.isEOF()) {
return null;
}
const code = this.char();
const offset = this.offset();
const nextCode = this.message.charCodeAt(offset + (code >= 65536 ? 2 : 1));
return nextCode ?? null;
}
}
/**
* This check if codepoint is alphabet (lower & uppercase)
* @param codepoint
* @returns
*/
function _isAlpha(codepoint) {
return codepoint >= 97 && codepoint <= 122 || codepoint >= 65 && codepoint <= 90;
}
function _isAlphaOrSlash(codepoint) {
return _isAlpha(codepoint) || codepoint === 47;
}
/** See `parseTag` function docs. */
function _isPotentialElementNameChar(c) {
return c === 45 || c === 46 || c >= 48 && c <= 57 || c === 95 || c >= 97 && c <= 122 || c >= 65 && c <= 90 || c == 183 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 893 || c >= 895 && c <= 8191 || c >= 8204 && c <= 8205 || c >= 8255 && c <= 8256 || c >= 8304 && c <= 8591 || c >= 11264 && c <= 12271 || c >= 12289 && c <= 55295 || c >= 63744 && c <= 64975 || c >= 65008 && c <= 65533 || c >= 65536 && c <= 983039;
}
/**
* Code point equivalent of regex `\p{White_Space}`.
* From: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
*/
function _isWhiteSpace(c) {
return c >= 9 && c <= 13 || c === 32 || c === 133 || c >= 8206 && c <= 8207 || c === 8232 || c === 8233;
}

View File

@@ -0,0 +1,287 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const debugBuild = require('../debug-build.js');
const browser = require('./browser.js');
const debugLogger = require('./debug-logger.js');
const is = require('./is.js');
/* eslint-disable @typescript-eslint/no-explicit-any */
/**
* Replace a method in an object with a wrapped version of itself.
*
* If the method on the passed object is not a function, the wrapper will not be applied.
*
* @param source An object that contains a method to be wrapped.
* @param name The name of the method to be wrapped.
* @param replacementFactory A higher-order function that takes the original version of the given method and returns a
* wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to
* preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, <other
* args>)` or `origMethod.apply(this, [<other args>])` (rather than being called directly), again to preserve `this`.
* @returns void
*/
function fill(source, name, replacementFactory) {
if (!(name in source)) {
return;
}
// explicitly casting to unknown because we don't know the type of the method initially at all
const original = source[name] ;
if (typeof original !== 'function') {
return;
}
const wrapped = replacementFactory(original) ;
// Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work
// otherwise it'll throw "TypeError: Object.defineProperties called on non-object"
if (typeof wrapped === 'function') {
markFunctionWrapped(wrapped, original);
}
try {
source[name] = wrapped;
} catch {
debugBuild.DEBUG_BUILD && debugLogger.debug.log(`Failed to replace method "${name}" in object`, source);
}
}
/**
* Defines a non-enumerable property on the given object.
*
* @param obj The object on which to set the property
* @param name The name of the property to be set
* @param value The value to which to set the property
*/
function addNonEnumerableProperty(obj, name, value) {
try {
Object.defineProperty(obj, name, {
// enumerable: false, // the default, so we can save on bundle size by not explicitly setting it
value: value,
writable: true,
configurable: true,
});
} catch {
debugBuild.DEBUG_BUILD && debugLogger.debug.log(`Failed to add non-enumerable property "${name}" to object`, obj);
}
}
/**
* Remembers the original function on the wrapped function and
* patches up the prototype.
*
* @param wrapped the wrapper function
* @param original the original function that gets wrapped
*/
function markFunctionWrapped(wrapped, original) {
try {
const proto = original.prototype || {};
wrapped.prototype = original.prototype = proto;
addNonEnumerableProperty(wrapped, '__sentry_original__', original);
} catch {} // eslint-disable-line no-empty
}
/**
* This extracts the original function if available. See
* `markFunctionWrapped` for more information.
*
* @param func the function to unwrap
* @returns the unwrapped version of the function if available.
*/
// eslint-disable-next-line @typescript-eslint/ban-types
function getOriginalFunction(func) {
return func.__sentry_original__;
}
/**
* Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their
* non-enumerable properties attached.
*
* @param value Initial source that we have to transform in order for it to be usable by the serializer
* @returns An Event or Error turned into an object - or the value argument itself, when value is neither an Event nor
* an Error.
*/
function convertToPlainObject(value)
{
if (is.isError(value)) {
return {
message: value.message,
name: value.name,
stack: value.stack,
...getOwnProperties(value),
};
} else if (is.isEvent(value)) {
const newObj
= {
type: value.type,
target: serializeEventTarget(value.target),
currentTarget: serializeEventTarget(value.currentTarget),
...getOwnProperties(value),
};
if (typeof CustomEvent !== 'undefined' && is.isInstanceOf(value, CustomEvent)) {
newObj.detail = value.detail;
}
return newObj;
} else {
return value;
}
}
/** Creates a string representation of the target of an `Event` object */
function serializeEventTarget(target) {
try {
return is.isElement(target) ? browser.htmlTreeAsString(target) : Object.prototype.toString.call(target);
} catch {
return '<unknown>';
}
}
/** Filters out all but an object's own properties */
function getOwnProperties(obj) {
if (typeof obj === 'object' && obj !== null) {
const extractedProps = {};
for (const property in obj) {
if (Object.prototype.hasOwnProperty.call(obj, property)) {
extractedProps[property] = (obj )[property];
}
}
return extractedProps;
} else {
return {};
}
}
/**
* Given any captured exception, extract its keys and create a sorted
* and truncated list that will be used inside the event message.
* eg. `Non-error exception captured with keys: foo, bar, baz`
*/
function extractExceptionKeysForMessage(exception) {
const keys = Object.keys(convertToPlainObject(exception));
keys.sort();
return !keys[0] ? '[object has no keys]' : keys.join(', ');
}
/**
* Given any object, return a new object having removed all fields whose value was `undefined`.
* Works recursively on objects and arrays.
*
* Attention: This function keeps circular references in the returned object.
*
* @deprecated This function is no longer used by the SDK and will be removed in a future major version.
*/
function dropUndefinedKeys(inputValue) {
// This map keeps track of what already visited nodes map to.
// Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular
// references as the input object.
const memoizationMap = new Map();
// This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API
return _dropUndefinedKeys(inputValue, memoizationMap);
}
function _dropUndefinedKeys(inputValue, memoizationMap) {
// Early return for primitive values
if (inputValue === null || typeof inputValue !== 'object') {
return inputValue;
}
// Check memo map first for all object types
const memoVal = memoizationMap.get(inputValue);
if (memoVal !== undefined) {
return memoVal ;
}
// handle arrays
if (Array.isArray(inputValue)) {
const returnValue = [];
// Store mapping to handle circular references
memoizationMap.set(inputValue, returnValue);
inputValue.forEach(value => {
returnValue.push(_dropUndefinedKeys(value, memoizationMap));
});
return returnValue ;
}
if (isPojo(inputValue)) {
const returnValue = {};
// Store mapping to handle circular references
memoizationMap.set(inputValue, returnValue);
const keys = Object.keys(inputValue);
keys.forEach(key => {
const val = inputValue[key];
if (val !== undefined) {
returnValue[key] = _dropUndefinedKeys(val, memoizationMap);
}
});
return returnValue ;
}
// For other object types, return as is
return inputValue;
}
function isPojo(input) {
// Plain objects have Object as constructor or no constructor
const constructor = (input ).constructor;
return constructor === Object || constructor === undefined;
}
/**
* Ensure that something is an object.
*
* Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper
* classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.
*
* @param wat The subject of the objectification
* @returns A version of `wat` which can safely be used with `Object` class methods
*/
function objectify(wat) {
let objectified;
switch (true) {
// this will catch both undefined and null
case wat == undefined:
objectified = new String(wat);
break;
// Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason
// those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as
// an object in order to wrap it.
case typeof wat === 'symbol' || typeof wat === 'bigint':
objectified = Object(wat);
break;
// this will catch the remaining primitives: `String`, `Number`, and `Boolean`
case is.isPrimitive(wat):
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
objectified = new (wat ).constructor(wat);
break;
// by process of elimination, at this point we know that `wat` must already be an object
default:
objectified = wat;
break;
}
return objectified;
}
exports.addNonEnumerableProperty = addNonEnumerableProperty;
exports.convertToPlainObject = convertToPlainObject;
exports.dropUndefinedKeys = dropUndefinedKeys;
exports.extractExceptionKeysForMessage = extractExceptionKeysForMessage;
exports.fill = fill;
exports.getOriginalFunction = getOriginalFunction;
exports.markFunctionWrapped = markFunctionWrapped;
exports.objectify = objectify;
//# sourceMappingURL=object.js.map

View File

@@ -0,0 +1,8 @@
"use strict";
function _type_of(obj) {
"@swc/helpers - typeof";
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
}
exports._ = _type_of;

View File

@@ -0,0 +1,5 @@
# `@lexical/text`
[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_text)
This package contains utilities and helpers for handling Lexical text.

View File

@@ -0,0 +1,99 @@
import {Deprecation} from '../deprecations';
import {SourceSpan} from './source_span';
export {SourceLocation} from './source_location';
export {SourceSpan} from './source_span';
/**
* An object that can be passed to {@link LegacySharedOptions.logger} to control
* how Sass emits warnings and debug messages.
*
* @example
*
* ```js
* const fs = require('fs');
* const sass = require('sass');
*
* let log = "";
* sass.renderSync({
* file: 'input.scss',
* logger: {
* warn(message, options) {
* if (options.span) {
* log += `${span.url}:${span.start.line}:${span.start.column}: ` +
* `${message}\n`;
* } else {
* log += `::: ${message}\n`;
* }
* }
* }
* });
*
* fs.writeFileSync('log.txt', log);
* ```
*
* @category Logger
*/
export interface Logger {
/**
* This method is called when Sass emits a warning, whether due to a [`@warn`
* rule](https://sass-lang.com/documentation/at-rules/warn) or a warning
* generated by the Sass compiler.
*
* If this is `undefined`, Sass will print warnings to standard error.
*
* @param message - The warning message.
* @param options.deprecation - Whether this is a deprecation warning.
* @param options.deprecationType - The type of deprecation this warning is
* for, if any.
* @param options.span - The location in the Sass source code that generated this
* warning.
* @param options.stack - The Sass stack trace at the point the warning was issued.
*/
warn?(
message: string,
options: (
| {
deprecation: true;
deprecationType: Deprecation;
}
| {deprecation: false}
) & {span?: SourceSpan; stack?: string}
): void;
/**
* This method is called when Sass emits a debug message due to a [`@debug`
* rule](https://sass-lang.com/documentation/at-rules/debug).
*
* If this is `undefined`, Sass will print debug messages to standard error.
*
* @param message - The debug message.
* @param options.span - The location in the Sass source code that generated this
* debug message.
*/
debug?(message: string, options: {span: SourceSpan}): void;
}
/**
* A namespace for built-in {@link Logger}s.
*
* @category Logger
* @compatibility dart: "1.43.0", node: false
*/
export namespace Logger {
/**
* A {@link Logger} that silently ignores all warnings and debug messages.
*
* @example
*
* ```js
* const sass = require('sass');
*
* const result = sass.renderSync({
* file: 'input.scss',
* logger: sass.Logger.silent,
* });
* ```
*/
export const silent: Logger;
}

View File

@@ -0,0 +1,33 @@
import type { Client } from './client';
import type { SentrySpan } from './tracing/sentrySpan';
import type { LegacyCSPReport } from './types-hoist/csp';
import type { DsnComponents } from './types-hoist/dsn';
import type { EventEnvelope, RawSecurityEnvelope, SessionEnvelope, SpanEnvelope } from './types-hoist/envelope';
import type { Event } from './types-hoist/event';
import type { SdkInfo } from './types-hoist/sdkinfo';
import type { SdkMetadata } from './types-hoist/sdkmetadata';
import type { Session, SessionAggregates } from './types-hoist/session';
/**
* Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.
* Merge with existing data if any.
*
* @internal, exported only for testing
**/
export declare function _enhanceEventWithSdkInfo(event: Event, newSdkInfo?: SdkInfo): Event;
/** Creates an envelope from a Session */
export declare function createSessionEnvelope(session: Session | SessionAggregates, dsn?: DsnComponents, metadata?: SdkMetadata, tunnel?: string): SessionEnvelope;
/**
* Create an Envelope from an event.
*/
export declare function createEventEnvelope(event: Event, dsn?: DsnComponents, metadata?: SdkMetadata, tunnel?: string): EventEnvelope;
/**
* Create envelope from Span item.
*
* Takes an optional client and runs spans through `beforeSendSpan` if available.
*/
export declare function createSpanEnvelope(spans: [SentrySpan, ...SentrySpan[]], client?: Client): SpanEnvelope;
/**
* Create an Envelope from a CSP report.
*/
export declare function createRawSecurityEnvelope(report: LegacyCSPReport, dsn: DsnComponents, tunnel?: string, release?: string, environment?: string): RawSecurityEnvelope;
//# sourceMappingURL=envelope.d.ts.map

View File

@@ -0,0 +1,2 @@
/* eslint-ignore */
module.exports = require('../dist/lib/style-transform')

View File

@@ -0,0 +1,41 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.js");
const dateFormats = {
full: "EEEE, y'ko' MMMM'ren' d'a' y'ren'",
long: "y'ko' MMMM'ren' d'a'",
medium: "y MMM d",
short: "yy/MM/dd",
};
const timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm",
};
const dateTimeFormats = {
full: "{{date}} 'tan' {{time}}",
long: "{{date}} 'tan' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}",
};
const formatLong = (exports.formatLong = {
date: (0, _index.buildFormatLongFn)({
formats: dateFormats,
defaultWidth: "full",
}),
time: (0, _index.buildFormatLongFn)({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: (0, _index.buildFormatLongFn)({
formats: dateTimeFormats,
defaultWidth: "full",
}),
});

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