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,59 @@
{
"name": "@opentelemetry/instrumentation-generic-pool",
"version": "0.54.0",
"description": "OpenTelemetry instrumentation for `generic-pool` resource pool for managing expensive resources",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/open-telemetry/opentelemetry-js-contrib.git",
"directory": "packages/instrumentation-generic-pool"
},
"scripts": {
"clean": "rimraf build/*",
"compile": "tsc -p .",
"compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-generic-pool",
"lint:readme": "node ../../scripts/lint-readme.js",
"prepublishOnly": "npm run compile",
"tdd": "yarn test -- --watch-extensions ts --watch",
"test": "nyc --no-clean mocha 'test/**/*.ts'",
"version:update": "node ../../scripts/version-update.js",
"watch": "tsc -w"
},
"keywords": [
"generic-pool",
"instrumentation",
"nodejs",
"opentelemetry",
"tracing"
],
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/src/**/*.js",
"build/src/**/*.js.map",
"build/src/**/*.d.ts"
],
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"@opentelemetry/api": "^1.3.0"
},
"devDependencies": {
"@opentelemetry/api": "^1.3.0",
"@opentelemetry/context-async-hooks": "^2.0.0",
"@opentelemetry/sdk-trace-base": "^2.0.0",
"@opentelemetry/sdk-trace-node": "^2.0.0",
"@types/generic-pool": "^3.1.9",
"generic-pool": "3.8.2"
},
"dependencies": {
"@opentelemetry/instrumentation": "^0.211.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-generic-pool#readme",
"gitHead": "7a5f3c0a09b6a2d32c712b2962b95137c906a016"
}

View File

@@ -0,0 +1,117 @@
{
"name": "react-dom",
"version": "19.2.4",
"description": "React package for working with the DOM.",
"main": "index.js",
"repository": {
"type": "git",
"url": "https://github.com/facebook/react.git",
"directory": "packages/react-dom"
},
"keywords": [
"react"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/facebook/react/issues"
},
"homepage": "https://react.dev/",
"dependencies": {
"scheduler": "^0.27.0"
},
"peerDependencies": {
"react": "^19.2.4"
},
"files": [
"LICENSE",
"README.md",
"client.js",
"client.react-server.js",
"index.js",
"profiling.js",
"profiling.react-server.js",
"react-dom.react-server.js",
"server.browser.js",
"server.bun.js",
"server.edge.js",
"server.js",
"server.node.js",
"server.react-server.js",
"static.browser.js",
"static.edge.js",
"static.js",
"static.node.js",
"static.react-server.js",
"test-utils.js",
"cjs/"
],
"exports": {
".": {
"react-server": "./react-dom.react-server.js",
"default": "./index.js"
},
"./client": {
"react-server": "./client.react-server.js",
"default": "./client.js"
},
"./server": {
"react-server": "./server.react-server.js",
"workerd": "./server.edge.js",
"bun": "./server.bun.js",
"deno": "./server.browser.js",
"worker": "./server.browser.js",
"node": "./server.node.js",
"edge-light": "./server.edge.js",
"browser": "./server.browser.js",
"default": "./server.node.js"
},
"./server.browser": {
"react-server": "./server.react-server.js",
"default": "./server.browser.js"
},
"./server.bun": {
"react-server": "./server.react-server.js",
"default": "./server.bun.js"
},
"./server.edge": {
"react-server": "./server.react-server.js",
"default": "./server.edge.js"
},
"./server.node": {
"react-server": "./server.react-server.js",
"default": "./server.node.js"
},
"./static": {
"react-server": "./static.react-server.js",
"workerd": "./static.edge.js",
"deno": "./static.browser.js",
"worker": "./static.browser.js",
"node": "./static.node.js",
"edge-light": "./static.edge.js",
"browser": "./static.browser.js",
"default": "./static.node.js"
},
"./static.browser": {
"react-server": "./static.react-server.js",
"default": "./static.browser.js"
},
"./static.edge": {
"react-server": "./static.react-server.js",
"default": "./static.edge.js"
},
"./static.node": {
"react-server": "./static.react-server.js",
"default": "./static.node.js"
},
"./profiling": {
"react-server": "./profiling.react-server.js",
"default": "./profiling.js"
},
"./test-utils": "./test-utils.js",
"./package.json": "./package.json"
},
"browser": {
"./server.js": "./server.browser.js",
"./static.js": "./static.browser.js"
}
}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/collections/operations/duplicate.ts"],"sourcesContent":["import type { DeepPartial } from 'ts-essentials'\n\nimport type { CollectionSlug } from '../../index.js'\nimport type { TransformCollectionWithSelect } from '../../types/index.js'\nimport type { RequiredDataFromCollectionSlug, SelectFromCollectionSlug } from '../config/types.js'\n\nimport { type Arguments as CreateArguments, createOperation } from './create.js'\n\nexport type Arguments<TSlug extends CollectionSlug> = {\n data?: DeepPartial<RequiredDataFromCollectionSlug<TSlug>>\n id: number | string\n} & Omit<CreateArguments<TSlug>, 'data' | 'duplicateFromID'>\n\nexport const duplicateOperation = async <\n TSlug extends CollectionSlug,\n TSelect extends SelectFromCollectionSlug<TSlug>,\n>(\n incomingArgs: Arguments<TSlug>,\n): Promise<TransformCollectionWithSelect<TSlug, TSelect>> => {\n const { id, ...args } = incomingArgs\n return createOperation({\n ...args,\n data: incomingArgs?.data || {},\n duplicateFromID: id,\n })\n}\n"],"names":["createOperation","duplicateOperation","incomingArgs","id","args","data","duplicateFromID"],"mappings":"AAMA,SAA4CA,eAAe,QAAQ,cAAa;AAOhF,OAAO,MAAMC,qBAAqB,OAIhCC;IAEA,MAAM,EAAEC,EAAE,EAAE,GAAGC,MAAM,GAAGF;IACxB,OAAOF,gBAAgB;QACrB,GAAGI,IAAI;QACPC,MAAMH,cAAcG,QAAQ,CAAC;QAC7BC,iBAAiBH;IACnB;AACF,EAAC"}

View File

@@ -0,0 +1,2 @@
const e=(e={})=>()=>{let t={mode:e.mode??`cookie`};return t.mode===`json`&&e.refresh_token&&(t.refresh_token=e.refresh_token),{path:`/auth/logout`,method:`POST`,body:JSON.stringify(t)}};export{e as logout};
//# sourceMappingURL=logout.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"stamp.js","sources":["../../../src/icons/stamp.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Stamp\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNSAyMmgxNCIgLz4KICA8cGF0aCBkPSJNMTkuMjcgMTMuNzNBMi41IDIuNSAwIDAgMCAxNy41IDEzaC0xMUEyLjUgMi41IDAgMCAwIDQgMTUuNVYxN2ExIDEgMCAwIDAgMSAxaDE0YTEgMSAwIDAgMCAxLTF2LTEuNWMwLS42Ni0uMjYtMS4zLS43My0xLjc3WiIgLz4KICA8cGF0aCBkPSJNMTQgMTNWOC41QzE0IDcgMTUgNyAxNSA1YTMgMyAwIDAgMC0zLTNjLTEuNjYgMC0zIDEtMyAzczEgMiAxIDMuNVYxMyIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/stamp\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 Stamp = createLucideIcon('Stamp', [\n ['path', { d: 'M5 22h14', key: 'ehvnwv' }],\n [\n 'path',\n {\n d: 'M19.27 13.73A2.5 2.5 0 0 0 17.5 13h-11A2.5 2.5 0 0 0 4 15.5V17a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-1.5c0-.66-.26-1.3-.73-1.77Z',\n key: '1sy9ra',\n },\n ],\n [\n 'path',\n { d: 'M14 13V8.5C14 7 15 7 15 5a3 3 0 0 0-3-3c-1.66 0-3 1-3 3s1 2 1 3.5V13', key: 'cnxgux' },\n ],\n]);\n\nexport default Stamp;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CAAA,CACtC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACzC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;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,CAAE,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAwE,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAS,CAAA,CAAA;AAAA,CAC7F,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/exports/i18n/rs.ts"],"sourcesContent":["export { rs } from '@payloadcms/translations/languages/rs'\n"],"names":["rs"],"mappings":"AAAA,SAASA,EAAE,QAAQ,wCAAuC"}

View File

@@ -0,0 +1,99 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
/** @typedef {import("../Dependency")} Dependency */
/** @typedef {import("../Module")} Module */
/** @typedef {import("../ModuleGraph")} ModuleGraph */
/** @typedef {import("../javascript/JavascriptParser").Range} Range */
/** @typedef {Range[]} IdRanges */
/**
* @summary Get the subset of ids and their corresponding range in an id chain that should be re-rendered by webpack.
* Only those in the chain that are actually referring to namespaces or imports should be re-rendered.
* Deeper member accessors on the imported object should not be re-rendered. If deeper member accessors are re-rendered,
* there is a potential loss of meaning with rendering a quoted accessor as an unquoted accessor, or vice versa,
* because minifiers treat quoted accessors differently. e.g. import { a } from "./module"; a["b"] vs a.b
* @param {string[]} untrimmedIds chained ids
* @param {Range} untrimmedRange range encompassing allIds
* @param {IdRanges | undefined} ranges cumulative range of ids for each of allIds
* @param {ModuleGraph} moduleGraph moduleGraph
* @param {Dependency} dependency dependency
* @returns {{ trimmedIds: string[], trimmedRange: Range }} computed trimmed ids and cumulative range of those ids
*/
module.exports.getTrimmedIdsAndRange = (
untrimmedIds,
untrimmedRange,
ranges,
moduleGraph,
dependency
) => {
let trimmedIds = trimIdsToThoseImported(
untrimmedIds,
moduleGraph,
dependency
);
let trimmedRange = untrimmedRange;
if (trimmedIds.length !== untrimmedIds.length) {
// The array returned from dep.idRanges is right-aligned with the array returned from dep.names.
// Meaning, the two arrays may not always have the same number of elements, but the last element of
// dep.idRanges corresponds to [the expression fragment to the left of] the last element of dep.names.
// Use this to find the correct replacement range based on the number of ids that were trimmed.
const idx =
ranges === undefined
? -1 /* trigger failure case below */
: ranges.length + (trimmedIds.length - untrimmedIds.length);
if (idx < 0 || idx >= /** @type {Range[]} */ (ranges).length) {
// cspell:ignore minifiers
// Should not happen but we can't throw an error here because of backward compatibility with
// external plugins in wp5. Instead, we just disable trimming for now. This may break some minifiers.
trimmedIds = untrimmedIds;
// TODO webpack 6 remove the "trimmedIds = ids" above and uncomment the following line instead.
// throw new Error("Missing range starts data for id replacement trimming.");
} else {
trimmedRange = /** @type {Range[]} */ (ranges)[idx];
}
}
return { trimmedIds, trimmedRange };
};
/**
* @summary Determine which IDs in the id chain are actually referring to namespaces or imports,
* and which are deeper member accessors on the imported object.
* @param {string[]} ids untrimmed ids
* @param {ModuleGraph} moduleGraph moduleGraph
* @param {Dependency} dependency dependency
* @returns {string[]} trimmed ids
*/
function trimIdsToThoseImported(ids, moduleGraph, dependency) {
/** @type {string[]} */
let trimmedIds = [];
let currentExportsInfo = moduleGraph.getExportsInfo(
/** @type {Module} */ (moduleGraph.getModule(dependency))
);
for (let i = 0; i < ids.length; i++) {
if (i === 0 && ids[i] === "default") {
continue; // ExportInfo for the next level under default is still at the root ExportsInfo, so don't advance currentExportsInfo
}
const exportInfo = currentExportsInfo.getExportInfo(ids[i]);
if (exportInfo.provided === false) {
// json imports have nested ExportInfo for elements that things that are not actually exported, so check .provided
trimmedIds = ids.slice(0, i);
break;
}
const nestedInfo = exportInfo.getNestedExportsInfo();
if (!nestedInfo) {
// once all nested exports are traversed, the next item is the actual import so stop there
trimmedIds = ids.slice(0, i + 1);
break;
}
currentExportsInfo = nestedInfo;
}
// Never trim to nothing. This can happen for invalid imports (e.g. import { notThere } from "./module", or import { anything } from "./missingModule")
return trimmedIds.length ? trimmedIds : ids;
}

View File

@@ -0,0 +1 @@
!function(e){var n="(?:"+"\"\"\"(?:[^\\\\\"]|\"(?!\"\"\\2)|<esc>)*\"\"\"|'''(?:[^\\\\']|'(?!''\\2)|<esc>)*'''|\"(?:[^\\\\\r\n\"]|\"(?!\\2)|<esc>)*\"|'(?:[^\\\\\r\n']|'(?!\\2)|<esc>)*'".replace(/<esc>/g,"\\\\(?:(?!\\2)|\\2(?:[^()\r\n]|\\([^()]*\\)))")+")";e.languages.cue={comment:{pattern:/\/\/.*/,greedy:!0},"string-literal":{pattern:RegExp("(^|[^#\"'\\\\])(#*)"+n+"(?![\"'])\\2"),lookbehind:!0,greedy:!0,inside:{escape:{pattern:/(?=[\s\S]*["'](#*)$)\\\1(?:U[a-fA-F0-9]{1,8}|u[a-fA-F0-9]{1,4}|x[a-fA-F0-9]{1,2}|\d{2,3}|[^(])/,greedy:!0,alias:"string"},interpolation:{pattern:/(?=[\s\S]*["'](#*)$)\\\1\([^()]*\)/,greedy:!0,inside:{punctuation:/^\\#*\(|\)$/,expression:{pattern:/[\s\S]+/,inside:null}}},string:/[\s\S]+/}},keyword:{pattern:/(^|[^\w$])(?:for|if|import|in|let|null|package)(?![\w$])/,lookbehind:!0},boolean:{pattern:/(^|[^\w$])(?:false|true)(?![\w$])/,lookbehind:!0},builtin:{pattern:/(^|[^\w$])(?:bool|bytes|float|float(?:32|64)|u?int(?:8|16|32|64|128)?|number|rune|string)(?![\w$])/,lookbehind:!0},attribute:{pattern:/@[\w$]+(?=\s*\()/,alias:"function"},function:{pattern:/(^|[^\w$])[a-z_$][\w$]*(?=\s*\()/i,lookbehind:!0},number:{pattern:/(^|[^\w$.])(?:0b[01]+(?:_[01]+)*|0o[0-7]+(?:_[0-7]+)*|0[xX][0-9A-Fa-f]+(?:_[0-9A-Fa-f]+)*|(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[eE][+-]?\d+(?:_\d+)*)?(?:[KMGTP]i?)?)(?![\w$])/,lookbehind:!0},operator:/\.{3}|_\|_|&&?|\|\|?|[=!]~|[<>=!]=?|[+\-*/?]/,punctuation:/[()[\]{},.:]/},e.languages.cue["string-literal"].inside.interpolation.inside.expression.inside=e.languages.cue}(Prism);

View File

@@ -0,0 +1,10 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import type { HistoryState } from '@lexical/history';
import type { LexicalEditor } from 'lexical';
export declare function useHistory(editor: LexicalEditor, externalHistoryState?: HistoryState, delay?: number): void;

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/char.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 PgCharBuilderInitial<\n\tTName extends string,\n\tTEnum extends [string, ...string[]],\n\tTLength extends number | undefined,\n> = PgCharBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'PgChar';\n\tdata: TEnum[number];\n\tenumValues: TEnum;\n\tdriverParam: string;\n\tlength: TLength;\n}>;\n\nexport class PgCharBuilder<T extends ColumnBuilderBaseConfig<'string', 'PgChar'> & { length?: number | undefined }>\n\textends PgColumnBuilder<\n\t\tT,\n\t\t{ length: T['length']; enumValues: T['enumValues'] },\n\t\t{ length: T['length'] }\n\t>\n{\n\tstatic override readonly [entityKind]: string = 'PgCharBuilder';\n\n\tconstructor(name: T['name'], config: PgCharConfig<T['enumValues'], T['length']>) {\n\t\tsuper(name, 'string', 'PgChar');\n\t\tthis.config.length = config.length;\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): PgChar<MakeColumnConfig<T, TTableName> & { length: T['length'] }> {\n\t\treturn new PgChar<MakeColumnConfig<T, TTableName> & { length: T['length'] }>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class PgChar<T extends ColumnBaseConfig<'string', 'PgChar'> & { length?: number | undefined }>\n\textends PgColumn<T, { length: T['length']; enumValues: T['enumValues'] }, { length: T['length'] }>\n{\n\tstatic override readonly [entityKind]: string = 'PgChar';\n\n\treadonly length = this.config.length;\n\toverride readonly enumValues = this.config.enumValues;\n\n\tgetSQLType(): string {\n\t\treturn this.length === undefined ? `char` : `char(${this.length})`;\n\t}\n}\n\nexport interface PgCharConfig<\n\tTEnum extends readonly string[] | string[] | undefined = readonly string[] | string[] | undefined,\n\tTLength extends number | undefined = number | undefined,\n> {\n\tenum?: TEnum;\n\tlength?: TLength;\n}\n\nexport function char(): PgCharBuilderInitial<'', [string, ...string[]], undefined>;\nexport function char<U extends string, T extends Readonly<[U, ...U[]]>, L extends number | undefined>(\n\tconfig?: PgCharConfig<T | Writable<T>, L>,\n): PgCharBuilderInitial<'', Writable<T>, L>;\nexport function char<\n\tTName extends string,\n\tU extends string,\n\tT extends Readonly<[U, ...U[]]>,\n\tL extends number | undefined,\n>(\n\tname: TName,\n\tconfig?: PgCharConfig<T | Writable<T>, L>,\n): PgCharBuilderInitial<TName, Writable<T>, L>;\nexport function char(a?: string | PgCharConfig, b: PgCharConfig = {}): any {\n\tconst { name, config } = getColumnNameAndConfig<PgCharConfig>(a, b);\n\treturn new PgCharBuilder(name, config as any);\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,8BAA6C;AACtD,SAAS,UAAU,uBAAuB;AAgBnC,MAAM,sBACJ,gBAKT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB,QAAoD;AAChF,UAAM,MAAM,UAAU,QAAQ;AAC9B,SAAK,OAAO,SAAS,OAAO;AAC5B,SAAK,OAAO,aAAa,OAAO;AAAA,EACjC;AAAA;AAAA,EAGS,MACR,OACoE;AACpE,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,eACJ,SACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEvC,SAAS,KAAK,OAAO;AAAA,EACZ,aAAa,KAAK,OAAO;AAAA,EAE3C,aAAqB;AACpB,WAAO,KAAK,WAAW,SAAY,SAAS,QAAQ,KAAK,MAAM;AAAA,EAChE;AACD;AAuBO,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,8 @@
import type { Client } from '../client';
/**
* Checks whether given url points to Sentry server
*
* @param url url to verify
*/
export declare function isSentryRequestUrl(url: string, client: Client | undefined): boolean;
//# sourceMappingURL=isSentryRequestUrl.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"names.js","sourceRoot":"","sources":["../../lib/compile/names.ts"],"names":[],"mappings":";;AAAA,uCAA8B;AAE9B,MAAM,KAAK,GAAG;IACZ,gCAAgC;IAChC,IAAI,EAAE,IAAI,cAAI,CAAC,MAAM,CAAC,EAAE,qCAAqC;IAC7D,sCAAsC;IACtC,MAAM,EAAE,IAAI,cAAI,CAAC,QAAQ,CAAC,EAAE,+FAA+F;IAC3H,YAAY,EAAE,IAAI,cAAI,CAAC,cAAc,CAAC;IACtC,UAAU,EAAE,IAAI,cAAI,CAAC,YAAY,CAAC;IAClC,kBAAkB,EAAE,IAAI,cAAI,CAAC,oBAAoB,CAAC;IAClD,QAAQ,EAAE,IAAI,cAAI,CAAC,UAAU,CAAC,EAAE,2EAA2E;IAC3G,cAAc,EAAE,IAAI,cAAI,CAAC,gBAAgB,CAAC,EAAE,8CAA8C;IAC1F,4BAA4B;IAC5B,OAAO,EAAE,IAAI,cAAI,CAAC,SAAS,CAAC,EAAE,qCAAqC;IACnE,MAAM,EAAE,IAAI,cAAI,CAAC,QAAQ,CAAC,EAAE,+BAA+B;IAC3D,IAAI,EAAE,IAAI,cAAI,CAAC,MAAM,CAAC;IACtB,YAAY;IACZ,IAAI,EAAE,IAAI,cAAI,CAAC,MAAM,CAAC;IACtB,KAAK,EAAE,IAAI,cAAI,CAAC,OAAO,CAAC;IACxB,wDAAwD;IACxD,IAAI,EAAE,IAAI,cAAI,CAAC,MAAM,CAAC;IACtB,OAAO,EAAE,IAAI,cAAI,CAAC,SAAS,CAAC;IAC5B,OAAO,EAAE,IAAI,cAAI,CAAC,SAAS,CAAC;IAC5B,QAAQ,EAAE,IAAI,cAAI,CAAC,UAAU,CAAC;CAC/B,CAAA;AAED,kBAAe,KAAK,CAAA"}

View File

@@ -0,0 +1,65 @@
{
"name": "@opentelemetry/instrumentation-mysql2",
"version": "0.57.0",
"description": "OpenTelemetry instrumentation for `mysql2` database client for MySQL",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/open-telemetry/opentelemetry-js-contrib.git",
"directory": "packages/instrumentation-mysql2"
},
"scripts": {
"clean": "rimraf build/*",
"compile": "tsc -p .",
"compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-mysql2",
"prepublishOnly": "npm run compile",
"tdd": "npm run test -- --watch-extensions ts --watch",
"test": "nyc --no-clean mocha 'test/**/*.test.ts'",
"test:with-services-env": "cross-env NODE_OPTIONS='-r dotenv/config' DOTENV_CONFIG_PATH=../../test/test-services.env npm test",
"test-all-versions": "tav",
"test-all-versions:with-services-env": "cross-env NODE_OPTIONS='-r dotenv/config' DOTENV_CONFIG_PATH=../../test/test-services.env npm run test-all-versions",
"test-services:start": "cd ../.. && npm run test-services:start mysql",
"test-services:stop": "cd ../.. && npm run test-services:stop mysql",
"version:update": "node ../../scripts/version-update.js"
},
"keywords": [
"instrumentation",
"mysql",
"mysql2",
"nodejs",
"opentelemetry",
"profiling",
"tracing"
],
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/src/**/*.js",
"build/src/**/*.js.map",
"build/src/**/*.d.ts"
],
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"@opentelemetry/api": "^1.3.0"
},
"devDependencies": {
"@opentelemetry/api": "^1.3.0",
"@opentelemetry/context-async-hooks": "^2.0.0",
"@opentelemetry/contrib-test-utils": "^0.58.0",
"@opentelemetry/sdk-trace-base": "^2.0.0",
"mysql2": "3.11.5"
},
"dependencies": {
"@opentelemetry/instrumentation": "^0.211.0",
"@opentelemetry/semantic-conventions": "^1.33.0",
"@opentelemetry/sql-common": "^0.41.2"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-mysql2#readme",
"gitHead": "7a5f3c0a09b6a2d32c712b2962b95137c906a016"
}

View File

@@ -0,0 +1 @@
export { _ as default } from "../esm/_class_apply_descriptor_destructure.js";

View File

@@ -0,0 +1,440 @@
// Partial port of python's argparse module, version 3.9.0 (only wrap and fill functions):
// https://github.com/python/cpython/blob/v3.9.0b4/Lib/textwrap.py
'use strict'
/*
* Text wrapping and filling.
*/
// Copyright (C) 1999-2001 Gregory P. Ward.
// Copyright (C) 2002, 2003 Python Software Foundation.
// Copyright (C) 2020 argparse.js authors
// Originally written by Greg Ward <gward@python.net>
// Hardcode the recognized whitespace characters to the US-ASCII
// whitespace characters. The main reason for doing this is that
// some Unicode spaces (like \u00a0) are non-breaking whitespaces.
//
// This less funky little regex just split on recognized spaces. E.g.
// "Hello there -- you goof-ball, use the -b option!"
// splits into
// Hello/ /there/ /--/ /you/ /goof-ball,/ /use/ /the/ /-b/ /option!/
const wordsep_simple_re = /([\t\n\x0b\x0c\r ]+)/
class TextWrapper {
/*
* Object for wrapping/filling text. The public interface consists of
* the wrap() and fill() methods; the other methods are just there for
* subclasses to override in order to tweak the default behaviour.
* If you want to completely replace the main wrapping algorithm,
* you'll probably have to override _wrap_chunks().
*
* Several instance attributes control various aspects of wrapping:
* width (default: 70)
* the maximum width of wrapped lines (unless break_long_words
* is false)
* initial_indent (default: "")
* string that will be prepended to the first line of wrapped
* output. Counts towards the line's width.
* subsequent_indent (default: "")
* string that will be prepended to all lines save the first
* of wrapped output; also counts towards each line's width.
* expand_tabs (default: true)
* Expand tabs in input text to spaces before further processing.
* Each tab will become 0 .. 'tabsize' spaces, depending on its position
* in its line. If false, each tab is treated as a single character.
* tabsize (default: 8)
* Expand tabs in input text to 0 .. 'tabsize' spaces, unless
* 'expand_tabs' is false.
* replace_whitespace (default: true)
* Replace all whitespace characters in the input text by spaces
* after tab expansion. Note that if expand_tabs is false and
* replace_whitespace is true, every tab will be converted to a
* single space!
* fix_sentence_endings (default: false)
* Ensure that sentence-ending punctuation is always followed
* by two spaces. Off by default because the algorithm is
* (unavoidably) imperfect.
* break_long_words (default: true)
* Break words longer than 'width'. If false, those words will not
* be broken, and some lines might be longer than 'width'.
* break_on_hyphens (default: true)
* Allow breaking hyphenated words. If true, wrapping will occur
* preferably on whitespaces and right after hyphens part of
* compound words.
* drop_whitespace (default: true)
* Drop leading and trailing whitespace from lines.
* max_lines (default: None)
* Truncate wrapped lines.
* placeholder (default: ' [...]')
* Append to the last line of truncated text.
*/
constructor(options = {}) {
let {
width = 70,
initial_indent = '',
subsequent_indent = '',
expand_tabs = true,
replace_whitespace = true,
fix_sentence_endings = false,
break_long_words = true,
drop_whitespace = true,
break_on_hyphens = true,
tabsize = 8,
max_lines = undefined,
placeholder=' [...]'
} = options
this.width = width
this.initial_indent = initial_indent
this.subsequent_indent = subsequent_indent
this.expand_tabs = expand_tabs
this.replace_whitespace = replace_whitespace
this.fix_sentence_endings = fix_sentence_endings
this.break_long_words = break_long_words
this.drop_whitespace = drop_whitespace
this.break_on_hyphens = break_on_hyphens
this.tabsize = tabsize
this.max_lines = max_lines
this.placeholder = placeholder
}
// -- Private methods -----------------------------------------------
// (possibly useful for subclasses to override)
_munge_whitespace(text) {
/*
* _munge_whitespace(text : string) -> string
*
* Munge whitespace in text: expand tabs and convert all other
* whitespace characters to spaces. Eg. " foo\\tbar\\n\\nbaz"
* becomes " foo bar baz".
*/
if (this.expand_tabs) {
text = text.replace(/\t/g, ' '.repeat(this.tabsize)) // not strictly correct in js
}
if (this.replace_whitespace) {
text = text.replace(/[\t\n\x0b\x0c\r]/g, ' ')
}
return text
}
_split(text) {
/*
* _split(text : string) -> [string]
*
* Split the text to wrap into indivisible chunks. Chunks are
* not quite the same as words; see _wrap_chunks() for full
* details. As an example, the text
* Look, goof-ball -- use the -b option!
* breaks into the following chunks:
* 'Look,', ' ', 'goof-', 'ball', ' ', '--', ' ',
* 'use', ' ', 'the', ' ', '-b', ' ', 'option!'
* if break_on_hyphens is True, or in:
* 'Look,', ' ', 'goof-ball', ' ', '--', ' ',
* 'use', ' ', 'the', ' ', '-b', ' ', option!'
* otherwise.
*/
let chunks = text.split(wordsep_simple_re)
chunks = chunks.filter(Boolean)
return chunks
}
_handle_long_word(reversed_chunks, cur_line, cur_len, width) {
/*
* _handle_long_word(chunks : [string],
* cur_line : [string],
* cur_len : int, width : int)
*
* Handle a chunk of text (most likely a word, not whitespace) that
* is too long to fit in any line.
*/
// Figure out when indent is larger than the specified width, and make
// sure at least one character is stripped off on every pass
let space_left
if (width < 1) {
space_left = 1
} else {
space_left = width - cur_len
}
// If we're allowed to break long words, then do so: put as much
// of the next chunk onto the current line as will fit.
if (this.break_long_words) {
cur_line.push(reversed_chunks[reversed_chunks.length - 1].slice(0, space_left))
reversed_chunks[reversed_chunks.length - 1] = reversed_chunks[reversed_chunks.length - 1].slice(space_left)
// Otherwise, we have to preserve the long word intact. Only add
// it to the current line if there's nothing already there --
// that minimizes how much we violate the width constraint.
} else if (!cur_line) {
cur_line.push(...reversed_chunks.pop())
}
// If we're not allowed to break long words, and there's already
// text on the current line, do nothing. Next time through the
// main loop of _wrap_chunks(), we'll wind up here again, but
// cur_len will be zero, so the next line will be entirely
// devoted to the long word that we can't handle right now.
}
_wrap_chunks(chunks) {
/*
* _wrap_chunks(chunks : [string]) -> [string]
*
* Wrap a sequence of text chunks and return a list of lines of
* length 'self.width' or less. (If 'break_long_words' is false,
* some lines may be longer than this.) Chunks correspond roughly
* to words and the whitespace between them: each chunk is
* indivisible (modulo 'break_long_words'), but a line break can
* come between any two chunks. Chunks should not have internal
* whitespace; ie. a chunk is either all whitespace or a "word".
* Whitespace chunks will be removed from the beginning and end of
* lines, but apart from that whitespace is preserved.
*/
let lines = []
let indent
if (this.width <= 0) {
throw Error(`invalid width ${this.width} (must be > 0)`)
}
if (this.max_lines !== undefined) {
if (this.max_lines > 1) {
indent = this.subsequent_indent
} else {
indent = this.initial_indent
}
if (indent.length + this.placeholder.trimStart().length > this.width) {
throw Error('placeholder too large for max width')
}
}
// Arrange in reverse order so items can be efficiently popped
// from a stack of chucks.
chunks = chunks.reverse()
while (chunks.length > 0) {
// Start the list of chunks that will make up the current line.
// cur_len is just the length of all the chunks in cur_line.
let cur_line = []
let cur_len = 0
// Figure out which static string will prefix this line.
let indent
if (lines) {
indent = this.subsequent_indent
} else {
indent = this.initial_indent
}
// Maximum width for this line.
let width = this.width - indent.length
// First chunk on line is whitespace -- drop it, unless this
// is the very beginning of the text (ie. no lines started yet).
if (this.drop_whitespace && chunks[chunks.length - 1].trim() === '' && lines.length > 0) {
chunks.pop()
}
while (chunks.length > 0) {
let l = chunks[chunks.length - 1].length
// Can at least squeeze this chunk onto the current line.
if (cur_len + l <= width) {
cur_line.push(chunks.pop())
cur_len += l
// Nope, this line is full.
} else {
break
}
}
// The current line is full, and the next chunk is too big to
// fit on *any* line (not just this one).
if (chunks.length && chunks[chunks.length - 1].length > width) {
this._handle_long_word(chunks, cur_line, cur_len, width)
cur_len = cur_line.map(l => l.length).reduce((a, b) => a + b, 0)
}
// If the last chunk on this line is all whitespace, drop it.
if (this.drop_whitespace && cur_line.length > 0 && cur_line[cur_line.length - 1].trim() === '') {
cur_len -= cur_line[cur_line.length - 1].length
cur_line.pop()
}
if (cur_line) {
if (this.max_lines === undefined ||
lines.length + 1 < this.max_lines ||
(chunks.length === 0 ||
this.drop_whitespace &&
chunks.length === 1 &&
!chunks[0].trim()) && cur_len <= width) {
// Convert current line back to a string and store it in
// list of all lines (return value).
lines.push(indent + cur_line.join(''))
} else {
let had_break = false
while (cur_line) {
if (cur_line[cur_line.length - 1].trim() &&
cur_len + this.placeholder.length <= width) {
cur_line.push(this.placeholder)
lines.push(indent + cur_line.join(''))
had_break = true
break
}
cur_len -= cur_line[-1].length
cur_line.pop()
}
if (!had_break) {
if (lines) {
let prev_line = lines[lines.length - 1].trimEnd()
if (prev_line.length + this.placeholder.length <=
this.width) {
lines[lines.length - 1] = prev_line + this.placeholder
break
}
}
lines.push(indent + this.placeholder.lstrip())
}
break
}
}
}
return lines
}
_split_chunks(text) {
text = this._munge_whitespace(text)
return this._split(text)
}
// -- Public interface ----------------------------------------------
wrap(text) {
/*
* wrap(text : string) -> [string]
*
* Reformat the single paragraph in 'text' so it fits in lines of
* no more than 'self.width' columns, and return a list of wrapped
* lines. Tabs in 'text' are expanded with string.expandtabs(),
* and all other whitespace characters (including newline) are
* converted to space.
*/
let chunks = this._split_chunks(text)
// not implemented in js
//if (this.fix_sentence_endings) {
// this._fix_sentence_endings(chunks)
//}
return this._wrap_chunks(chunks)
}
fill(text) {
/*
* fill(text : string) -> string
*
* Reformat the single paragraph in 'text' to fit in lines of no
* more than 'self.width' columns, and return a new string
* containing the entire wrapped paragraph.
*/
return this.wrap(text).join('\n')
}
}
// -- Convenience interface ---------------------------------------------
function wrap(text, options = {}) {
/*
* Wrap a single paragraph of text, returning a list of wrapped lines.
*
* Reformat the single paragraph in 'text' so it fits in lines of no
* more than 'width' columns, and return a list of wrapped lines. By
* default, tabs in 'text' are expanded with string.expandtabs(), and
* all other whitespace characters (including newline) are converted to
* space. See TextWrapper class for available keyword args to customize
* wrapping behaviour.
*/
let { width = 70, ...kwargs } = options
let w = new TextWrapper(Object.assign({ width }, kwargs))
return w.wrap(text)
}
function fill(text, options = {}) {
/*
* Fill a single paragraph of text, returning a new string.
*
* Reformat the single paragraph in 'text' to fit in lines of no more
* than 'width' columns, and return a new string containing the entire
* wrapped paragraph. As with wrap(), tabs are expanded and other
* whitespace characters converted to space. See TextWrapper class for
* available keyword args to customize wrapping behaviour.
*/
let { width = 70, ...kwargs } = options
let w = new TextWrapper(Object.assign({ width }, kwargs))
return w.fill(text)
}
// -- Loosely related functionality -------------------------------------
let _whitespace_only_re = /^[ \t]+$/mg
let _leading_whitespace_re = /(^[ \t]*)(?:[^ \t\n])/mg
function dedent(text) {
/*
* Remove any common leading whitespace from every line in `text`.
*
* This can be used to make triple-quoted strings line up with the left
* edge of the display, while still presenting them in the source code
* in indented form.
*
* Note that tabs and spaces are both treated as whitespace, but they
* are not equal: the lines " hello" and "\\thello" are
* considered to have no common leading whitespace.
*
* Entirely blank lines are normalized to a newline character.
*/
// Look for the longest leading string of spaces and tabs common to
// all lines.
let margin = undefined
text = text.replace(_whitespace_only_re, '')
let indents = text.match(_leading_whitespace_re) || []
for (let indent of indents) {
indent = indent.slice(0, -1)
if (margin === undefined) {
margin = indent
// Current line more deeply indented than previous winner:
// no change (previous winner is still on top).
} else if (indent.startsWith(margin)) {
// pass
// Current line consistent with and no deeper than previous winner:
// it's the new winner.
} else if (margin.startsWith(indent)) {
margin = indent
// Find the largest common whitespace between current line and previous
// winner.
} else {
for (let i = 0; i < margin.length && i < indent.length; i++) {
if (margin[i] !== indent[i]) {
margin = margin.slice(0, i)
break
}
}
}
}
if (margin) {
text = text.replace(new RegExp('^' + margin, 'mg'), '')
}
return text
}
module.exports = { wrap, fill, dedent }

View File

@@ -0,0 +1,222 @@
var _typeof = require("./typeof.js")["default"];
var checkInRHS = require("./checkInRHS.js");
var setFunctionName = require("./setFunctionName.js");
var toPropertyKey = require("./toPropertyKey.js");
function applyDecs2301Factory() {
function createAddInitializerMethod(e, t) {
return function (r) {
!function (e) {
if (e.v) throw Error("attempted to call addInitializer after decoration was finished");
}(t), assertCallable(r, "An initializer"), e.push(r);
};
}
function assertInstanceIfPrivate(e, t) {
if (!e(t)) throw new TypeError("Attempted to access private element on non-instance");
}
function memberDec(e, t, r, n, a, i, s, o, c) {
var u;
switch (a) {
case 1:
u = "accessor";
break;
case 2:
u = "method";
break;
case 3:
u = "getter";
break;
case 4:
u = "setter";
break;
default:
u = "field";
}
var l,
f,
p = {
kind: u,
name: s ? "#" + t : toPropertyKey(t),
"static": i,
"private": s
},
d = {
v: !1
};
if (0 !== a && (p.addInitializer = createAddInitializerMethod(n, d)), s || 0 !== a && 2 !== a) {
if (2 === a) l = function l(e) {
return assertInstanceIfPrivate(c, e), r.value;
};else {
var h = 0 === a || 1 === a;
(h || 3 === a) && (l = s ? function (e) {
return assertInstanceIfPrivate(c, e), r.get.call(e);
} : function (e) {
return r.get.call(e);
}), (h || 4 === a) && (f = s ? function (e, t) {
assertInstanceIfPrivate(c, e), r.set.call(e, t);
} : function (e, t) {
r.set.call(e, t);
});
}
} else l = function l(e) {
return e[t];
}, 0 === a && (f = function f(e, r) {
e[t] = r;
});
var v = s ? c.bind() : function (e) {
return t in e;
};
p.access = l && f ? {
get: l,
set: f,
has: v
} : l ? {
get: l,
has: v
} : {
set: f,
has: v
};
try {
return e(o, p);
} finally {
d.v = !0;
}
}
function assertCallable(e, t) {
if ("function" != typeof e) throw new TypeError(t + " must be a function");
}
function assertValidReturnValue(e, t) {
var r = _typeof(t);
if (1 === e) {
if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init");
} else if ("function" !== r) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0");
}
function curryThis2(e) {
return function (t) {
e(this, t);
};
}
function applyMemberDec(e, t, r, n, a, i, s, o, c) {
var u,
l,
f,
p,
d,
h,
v,
y,
g = r[0];
if (s ? (0 === a || 1 === a ? (u = {
get: (d = r[3], function () {
return d(this);
}),
set: curryThis2(r[4])
}, f = "get") : 3 === a ? (u = {
get: r[3]
}, f = "get") : 4 === a ? (u = {
set: r[3]
}, f = "set") : u = {
value: r[3]
}, 0 !== a && (1 === a && setFunctionName(u.set, "#" + n, "set"), setFunctionName(u[f || "value"], "#" + n, f))) : 0 !== a && (u = Object.getOwnPropertyDescriptor(t, n)), 1 === a ? p = {
get: u.get,
set: u.set
} : 2 === a ? p = u.value : 3 === a ? p = u.get : 4 === a && (p = u.set), "function" == typeof g) void 0 !== (h = memberDec(g, n, u, o, a, i, s, p, c)) && (assertValidReturnValue(a, h), 0 === a ? l = h : 1 === a ? (l = h.init, v = h.get || p.get, y = h.set || p.set, p = {
get: v,
set: y
}) : p = h);else for (var m = g.length - 1; m >= 0; m--) {
var b;
void 0 !== (h = memberDec(g[m], n, u, o, a, i, s, p, c)) && (assertValidReturnValue(a, h), 0 === a ? b = h : 1 === a ? (b = h.init, v = h.get || p.get, y = h.set || p.set, p = {
get: v,
set: y
}) : p = h, void 0 !== b && (void 0 === l ? l = b : "function" == typeof l ? l = [l, b] : l.push(b)));
}
if (0 === a || 1 === a) {
if (void 0 === l) l = function l(e, t) {
return t;
};else if ("function" != typeof l) {
var I = l;
l = function l(e, t) {
for (var r = t, n = 0; n < I.length; n++) r = I[n].call(e, r);
return r;
};
} else {
var w = l;
l = function l(e, t) {
return w.call(e, t);
};
}
e.push(l);
}
0 !== a && (1 === a ? (u.get = p.get, u.set = p.set) : 2 === a ? u.value = p : 3 === a ? u.get = p : 4 === a && (u.set = p), s ? 1 === a ? (e.push(function (e, t) {
return p.get.call(e, t);
}), e.push(function (e, t) {
return p.set.call(e, t);
})) : 2 === a ? e.push(p) : e.push(function (e, t) {
return p.call(e, t);
}) : Object.defineProperty(t, n, u));
}
function applyMemberDecs(e, t, r) {
for (var n, a, i, s = [], o = new Map(), c = new Map(), u = 0; u < t.length; u++) {
var l = t[u];
if (Array.isArray(l)) {
var f,
p,
d = l[1],
h = l[2],
v = l.length > 3,
y = d >= 5,
g = r;
if (y ? (f = e, 0 != (d -= 5) && (p = a = a || []), v && !i && (i = function i(t) {
return checkInRHS(t) === e;
}), g = i) : (f = e.prototype, 0 !== d && (p = n = n || [])), 0 !== d && !v) {
var m = y ? c : o,
b = m.get(h) || 0;
if (!0 === b || 3 === b && 4 !== d || 4 === b && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h);
!b && d > 2 ? m.set(h, d) : m.set(h, !0);
}
applyMemberDec(s, f, l, h, d, y, v, p, g);
}
}
return pushInitializers(s, n), pushInitializers(s, a), s;
}
function pushInitializers(e, t) {
t && e.push(function (e) {
for (var r = 0; r < t.length; r++) t[r].call(e);
return e;
});
}
return function (e, t, r, n) {
return {
e: applyMemberDecs(e, t, n),
get c() {
return function (e, t) {
if (t.length > 0) {
for (var r = [], n = e, a = e.name, i = t.length - 1; i >= 0; i--) {
var s = {
v: !1
};
try {
var o = t[i](n, {
kind: "class",
name: a,
addInitializer: createAddInitializerMethod(r, s)
});
} finally {
s.v = !0;
}
void 0 !== o && (assertValidReturnValue(10, o), n = o);
}
return [n, function () {
for (var e = 0; e < r.length; e++) r[e].call(n);
}];
}
}(e, r);
}
};
};
}
function applyDecs2301(e, t, r, n) {
return (module.exports = applyDecs2301 = applyDecs2301Factory(), module.exports.__esModule = true, module.exports["default"] = module.exports)(e, t, r, n);
}
module.exports = applyDecs2301, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -0,0 +1,46 @@
export declare const UNICODE_EXTENSION_SEQUENCE_REGEX: RegExp;
/**
* Asserts that a condition is true, throwing an error if it is not.
* Used for runtime validation and type narrowing.
*
* @param condition - The condition to check
* @param message - Error message if condition is false
* @param Err - Error constructor to use (defaults to Error)
* @throws {Error} When condition is false
*
* @example
* ```ts
* invariant(locale !== undefined, 'Locale must be defined')
* // locale is now narrowed to non-undefined type
* ```
*/
export declare function invariant(condition: boolean, message: string, Err?: any): asserts condition;
/**
* Calculates the matching distance between two locales using the CLDR Enhanced Language Matching algorithm.
* This function is memoized for performance, as distance calculations are expensive.
*
* The distance represents how "far apart" two locales are, with 0 being identical (after maximization).
* Distances are calculated based on Language-Script-Region (LSR) differences using CLDR data.
*
* @param desired - The desired locale (e.g., "en-US")
* @param supported - The supported locale to compare against (e.g., "en-GB")
* @returns The calculated distance between the locales
*
* @example
* ```ts
* findMatchingDistance('en-US', 'en-US') // 0 - identical
* findMatchingDistance('en-US', 'en-GB') // 40 - same language/script, different region
* findMatchingDistance('es-CO', 'es-419') // 39 - regional variant
* findMatchingDistance('en', 'fr') // 840 - completely different languages
* ```
*
* @see https://unicode.org/reports/tr35/#EnhancedLanguageMatching
*/
export declare const findMatchingDistance: (desired: string, supported: string) => number;
interface LocaleMatchingResult {
distances: Record<string, Record<string, number>>;
matchedSupportedLocale?: string;
matchedDesiredLocale?: string;
}
export declare function findBestMatch(requestedLocales: readonly string[], supportedLocales: readonly string[], threshold?: number): LocaleMatchingResult;
export {};

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["index.ts"],"names":[],"mappings":"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"}

View File

@@ -0,0 +1,15 @@
import type { UploadEdits } from 'payload';
import React from 'react';
export type UploadEditsProviderProps = {
children: React.ReactNode;
initialUploadEdits?: UploadEdits;
};
export type UploadEditsContext = {
getUploadEdits: () => UploadEdits;
resetUploadEdits: () => void;
updateUploadEdits: (edits: UploadEdits) => void;
uploadEdits: UploadEdits;
};
export declare const UploadEditsProvider: ({ children, initialUploadEdits }: UploadEditsProviderProps) => React.JSX.Element;
export declare const useUploadEdits: () => UploadEditsContext;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,10 @@
import { cache } from 'react';
import getConfig from './getConfig.js';
async function getFormatsCachedImpl() {
const config = await getConfig();
return config.formats;
}
const getFormats = cache(getFormatsCachedImpl);
export { getFormats as default };

View File

@@ -0,0 +1,10 @@
/**
* Disable sampling mousemove events on iOS browsers as this can cause blocking the main thread
* https://github.com/getsentry/sentry-javascript/issues/14534
*/
export declare function getRecordingSamplingOptions(): Partial<{
sampling: {
mousemove: boolean;
};
}>;
//# sourceMappingURL=getRecordingSamplingOptions.d.ts.map

View File

@@ -0,0 +1 @@
code[class*=language-],pre[class*=language-]{color:#657b83;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{background:#073642}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{background:#073642}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em}:not(pre)>code[class*=language-],pre[class*=language-]{background-color:#fdf6e3}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#93a1a1}.token.punctuation{color:#586e75}.token.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#268bd2}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string,.token.url{color:#2aa198}.token.entity{color:#657b83;background:#eee8d5}.token.atrule,.token.attr-value,.token.keyword{color:#859900}.token.class-name,.token.function{color:#b58900}.token.important,.token.regex,.token.variable{color:#cb4b16}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}

View File

@@ -0,0 +1,5 @@
export {
Fragment,
jsx,
jsxs
} from "./emotion-react-jsx-runtime.development.edge-light.cjs.js";

View File

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

View File

@@ -0,0 +1,25 @@
type DelayedRenderProps = {
/** Time in ms to wait before "mounting" the component. */
delayBeforeShow: number;
/** Time in ms for the "enter" phase of the transition, after delay completes. */
inTimeout: number;
/** Min time in ms for the "entered" phase of the transition. */
minShowTime: number;
/** Time in ms for the exit phase of the transition. */
outTimeout: number;
/** `true` starts the mount process.
* `false` starts the unmount process.
* */
show: boolean;
};
type useDelayedRenderT = (props: DelayedRenderProps) => {
/** `true` if the component has mounted after the timeout. */
isMounted: boolean;
/** `true` if the component is unmounting. */
isUnmounting: boolean;
/** Call this function to trigger the timeout delay before rendering. */
triggerDelayedRender: () => void;
};
export declare const useDelayedRender: useDelayedRenderT;
export {};
//# sourceMappingURL=useDelayedRender.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["hooks","exports","self","parent","removeParent","key","isWhile","isSwitchCase","isExportDeclaration","isLabeledStatement","listKey","isVariableDeclaration","node","declarations","length","isExpressionStatement","remove","isSequenceExpression","expressions","replaceWith","isBinary","right","left","isIfStatement","isLoop","isArrowFunctionExpression","type","directives","body"],"sources":["../../../src/path/lib/removal-hooks.ts"],"sourcesContent":["// this file contains hooks that handle ancestry cleanup of parent nodes when removing children\n\nimport type NodePath from \"../index.ts\";\nimport type * as t from \"@babel/types\";\n/**\n * Pre hooks should be used for either rejecting removal or delegating removal\n */\n\nexport const hooks = [\n function (self: NodePath, parent: NodePath) {\n const removeParent =\n // while (NODE);\n // removing the test of a while/switch, we can either just remove it entirely *or* turn the\n // `test` into `true` unlikely that the latter will ever be what's wanted so we just remove\n // the loop to avoid infinite recursion\n (self.key === \"test\" && (parent.isWhile() || parent.isSwitchCase())) ||\n // export NODE;\n // just remove a declaration for an export as this is no longer valid\n (self.key === \"declaration\" && parent.isExportDeclaration()) ||\n // label: NODE\n // stray labeled statement with no body\n (self.key === \"body\" && parent.isLabeledStatement()) ||\n // let NODE;\n // remove an entire declaration if there are no declarators left\n (self.listKey === \"declarations\" &&\n parent.isVariableDeclaration() &&\n parent.node.declarations.length === 1) ||\n // NODE;\n // remove the entire expression statement if there's no expression\n (self.key === \"expression\" && parent.isExpressionStatement());\n\n if (removeParent) {\n parent.remove();\n return true;\n }\n },\n\n function (self: NodePath, parent: NodePath) {\n if (parent.isSequenceExpression() && parent.node.expressions.length === 1) {\n // (node, NODE);\n // we've just removed the second element of a sequence expression so let's turn that sequence\n // expression into a regular expression\n parent.replaceWith(parent.node.expressions[0]);\n return true;\n }\n },\n\n function (self: NodePath, parent: NodePath) {\n if (parent.isBinary()) {\n // left + NODE;\n // NODE + right;\n // we're in a binary expression, better remove it and replace it with the last expression\n if (self.key === \"left\") {\n parent.replaceWith(parent.node.right);\n } else {\n // key === \"right\"\n parent.replaceWith(parent.node.left);\n }\n return true;\n }\n },\n\n function (self: NodePath, parent: NodePath) {\n if (\n (parent.isIfStatement() && self.key === \"consequent\") ||\n (self.key === \"body\" &&\n (parent.isLoop() || parent.isArrowFunctionExpression()))\n ) {\n self.replaceWith({\n type: \"BlockStatement\",\n directives: [],\n body: [],\n } satisfies t.BlockStatement);\n return true;\n }\n },\n];\n"],"mappings":";;;;;;AAQO,MAAMA,KAAK,GAAAC,OAAA,CAAAD,KAAA,GAAG,CACnB,UAAUE,IAAc,EAAEC,MAAgB,EAAE;EAC1C,MAAMC,YAAY,GAKfF,IAAI,CAACG,GAAG,KAAK,MAAM,KAAKF,MAAM,CAACG,OAAO,CAAC,CAAC,IAAIH,MAAM,CAACI,YAAY,CAAC,CAAC,CAAC,IAGlEL,IAAI,CAACG,GAAG,KAAK,aAAa,IAAIF,MAAM,CAACK,mBAAmB,CAAC,CAAE,IAG3DN,IAAI,CAACG,GAAG,KAAK,MAAM,IAAIF,MAAM,CAACM,kBAAkB,CAAC,CAAE,IAGnDP,IAAI,CAACQ,OAAO,KAAK,cAAc,IAC9BP,MAAM,CAACQ,qBAAqB,CAAC,CAAC,IAC9BR,MAAM,CAACS,IAAI,CAACC,YAAY,CAACC,MAAM,KAAK,CAAE,IAGvCZ,IAAI,CAACG,GAAG,KAAK,YAAY,IAAIF,MAAM,CAACY,qBAAqB,CAAC,CAAE;EAE/D,IAAIX,YAAY,EAAE;IAChBD,MAAM,CAACa,MAAM,CAAC,CAAC;IACf,OAAO,IAAI;EACb;AACF,CAAC,EAED,UAAUd,IAAc,EAAEC,MAAgB,EAAE;EAC1C,IAAIA,MAAM,CAACc,oBAAoB,CAAC,CAAC,IAAId,MAAM,CAACS,IAAI,CAACM,WAAW,CAACJ,MAAM,KAAK,CAAC,EAAE;IAIzEX,MAAM,CAACgB,WAAW,CAAChB,MAAM,CAACS,IAAI,CAACM,WAAW,CAAC,CAAC,CAAC,CAAC;IAC9C,OAAO,IAAI;EACb;AACF,CAAC,EAED,UAAUhB,IAAc,EAAEC,MAAgB,EAAE;EAC1C,IAAIA,MAAM,CAACiB,QAAQ,CAAC,CAAC,EAAE;IAIrB,IAAIlB,IAAI,CAACG,GAAG,KAAK,MAAM,EAAE;MACvBF,MAAM,CAACgB,WAAW,CAAChB,MAAM,CAACS,IAAI,CAACS,KAAK,CAAC;IACvC,CAAC,MAAM;MAELlB,MAAM,CAACgB,WAAW,CAAChB,MAAM,CAACS,IAAI,CAACU,IAAI,CAAC;IACtC;IACA,OAAO,IAAI;EACb;AACF,CAAC,EAED,UAAUpB,IAAc,EAAEC,MAAgB,EAAE;EAC1C,IACGA,MAAM,CAACoB,aAAa,CAAC,CAAC,IAAIrB,IAAI,CAACG,GAAG,KAAK,YAAY,IACnDH,IAAI,CAACG,GAAG,KAAK,MAAM,KACjBF,MAAM,CAACqB,MAAM,CAAC,CAAC,IAAIrB,MAAM,CAACsB,yBAAyB,CAAC,CAAC,CAAE,EAC1D;IACAvB,IAAI,CAACiB,WAAW,CAAC;MACfO,IAAI,EAAE,gBAAgB;MACtBC,UAAU,EAAE,EAAE;MACdC,IAAI,EAAE;IACR,CAA4B,CAAC;IAC7B,OAAO,IAAI;EACb;AACF,CAAC,CACF","ignoreList":[]}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/auth/ensureUsernameOrEmail.ts"],"sourcesContent":["import type { RequiredDataFromCollectionSlug } from '../collections/config/types.js'\nimport type { AuthCollection, CollectionSlug, PayloadRequest } from '../index.js'\n\nimport { ValidationError } from '../errors/index.js'\n\ntype ValidateUsernameOrEmailArgs<TSlug extends CollectionSlug> = {\n authOptions: AuthCollection['config']['auth']\n collectionSlug: string\n data: RequiredDataFromCollectionSlug<TSlug>\n req: PayloadRequest\n} & (\n | {\n operation: 'create'\n originalDoc?: never\n }\n | {\n operation: 'update'\n originalDoc: RequiredDataFromCollectionSlug<TSlug>\n }\n)\nexport const ensureUsernameOrEmail = <TSlug extends CollectionSlug>({\n authOptions: { disableLocalStrategy, loginWithUsername },\n collectionSlug,\n data,\n operation,\n originalDoc,\n req,\n}: ValidateUsernameOrEmailArgs<TSlug>) => {\n // neither username or email are required\n // and neither are provided\n // so we need to manually validate\n if (\n !disableLocalStrategy &&\n loginWithUsername &&\n !loginWithUsername.requireEmail &&\n !loginWithUsername.requireUsername\n ) {\n let missingFields = false\n if (operation === 'create' && !data.email && !data.username) {\n missingFields = true\n } else if (operation === 'update') {\n // prevent clearing both email and username\n if ('email' in data && !data.email && 'username' in data && !data.username) {\n missingFields = true\n }\n // prevent clearing email if no username\n if ('email' in data && !data.email && !originalDoc.username && !data?.username) {\n missingFields = true\n }\n // prevent clearing username if no email\n if ('username' in data && !data.username && !originalDoc.email && !data?.email) {\n missingFields = true\n }\n }\n\n if (missingFields) {\n throw new ValidationError(\n {\n collection: collectionSlug,\n errors: [\n {\n message: 'Username or email is required',\n path: 'username',\n },\n {\n message: 'Username or email is required',\n path: 'email',\n },\n ],\n },\n req.t,\n )\n }\n }\n\n return\n}\n"],"names":["ValidationError","ensureUsernameOrEmail","authOptions","disableLocalStrategy","loginWithUsername","collectionSlug","data","operation","originalDoc","req","requireEmail","requireUsername","missingFields","email","username","collection","errors","message","path","t"],"mappings":"AAGA,SAASA,eAAe,QAAQ,qBAAoB;AAiBpD,OAAO,MAAMC,wBAAwB,CAA+B,EAClEC,aAAa,EAAEC,oBAAoB,EAAEC,iBAAiB,EAAE,EACxDC,cAAc,EACdC,IAAI,EACJC,SAAS,EACTC,WAAW,EACXC,GAAG,EACgC;IACnC,yCAAyC;IACzC,2BAA2B;IAC3B,kCAAkC;IAClC,IACE,CAACN,wBACDC,qBACA,CAACA,kBAAkBM,YAAY,IAC/B,CAACN,kBAAkBO,eAAe,EAClC;QACA,IAAIC,gBAAgB;QACpB,IAAIL,cAAc,YAAY,CAACD,KAAKO,KAAK,IAAI,CAACP,KAAKQ,QAAQ,EAAE;YAC3DF,gBAAgB;QAClB,OAAO,IAAIL,cAAc,UAAU;YACjC,2CAA2C;YAC3C,IAAI,WAAWD,QAAQ,CAACA,KAAKO,KAAK,IAAI,cAAcP,QAAQ,CAACA,KAAKQ,QAAQ,EAAE;gBAC1EF,gBAAgB;YAClB;YACA,wCAAwC;YACxC,IAAI,WAAWN,QAAQ,CAACA,KAAKO,KAAK,IAAI,CAACL,YAAYM,QAAQ,IAAI,CAACR,MAAMQ,UAAU;gBAC9EF,gBAAgB;YAClB;YACA,wCAAwC;YACxC,IAAI,cAAcN,QAAQ,CAACA,KAAKQ,QAAQ,IAAI,CAACN,YAAYK,KAAK,IAAI,CAACP,MAAMO,OAAO;gBAC9ED,gBAAgB;YAClB;QACF;QAEA,IAAIA,eAAe;YACjB,MAAM,IAAIZ,gBACR;gBACEe,YAAYV;gBACZW,QAAQ;oBACN;wBACEC,SAAS;wBACTC,MAAM;oBACR;oBACA;wBACED,SAAS;wBACTC,MAAM;oBACR;iBACD;YACH,GACAT,IAAIU,CAAC;QAET;IACF;IAEA;AACF,EAAC"}

View File

@@ -0,0 +1,42 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getQuote = exports.quotes = void 0;
var parser_1 = require("../syntax/parser");
exports.quotes = {
name: 'quotes',
initialValue: 'none',
prefix: true,
type: 1 /* LIST */,
parse: function (_context, tokens) {
if (tokens.length === 0) {
return null;
}
var first = tokens[0];
if (first.type === 20 /* IDENT_TOKEN */ && first.value === 'none') {
return null;
}
var quotes = [];
var filtered = tokens.filter(parser_1.isStringToken);
if (filtered.length % 2 !== 0) {
return null;
}
for (var i = 0; i < filtered.length; i += 2) {
var open_1 = filtered[i].value;
var close_1 = filtered[i + 1].value;
quotes.push({ open: open_1, close: close_1 });
}
return quotes;
}
};
var getQuote = function (quotes, depth, open) {
if (!quotes) {
return '';
}
var quote = quotes[Math.min(depth, quotes.length - 1)];
if (!quote) {
return '';
}
return open ? quote.open : quote.close;
};
exports.getQuote = getQuote;
//# sourceMappingURL=quotes.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/mysql-core/expressions.ts"],"sourcesContent":["import { bindIfParam } from '~/sql/expressions/index.ts';\nimport type { Placeholder, SQL, SQLChunk, SQLWrapper } from '~/sql/sql.ts';\nimport { sql } from '~/sql/sql.ts';\nimport type { MySqlColumn } from './columns/index.ts';\n\nexport * from '~/sql/expressions/index.ts';\n\nexport function concat(column: MySqlColumn | SQL.Aliased, value: string | Placeholder | SQLWrapper): SQL {\n\treturn sql`${column} || ${bindIfParam(value, column)}`;\n}\n\nexport function substring(\n\tcolumn: MySqlColumn | SQL.Aliased,\n\t{ from, for: _for }: { from?: number | Placeholder | SQLWrapper; for?: number | Placeholder | SQLWrapper },\n): SQL {\n\tconst chunks: SQLChunk[] = [sql`substring(`, column];\n\tif (from !== undefined) {\n\t\tchunks.push(sql` from `, bindIfParam(from, column));\n\t}\n\tif (_for !== undefined) {\n\t\tchunks.push(sql` for `, bindIfParam(_for, column));\n\t}\n\tchunks.push(sql`)`);\n\treturn sql.join(chunks);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAA4B;AAE5B,iBAAoB;AAGpB,gCAAc,uCALd;AAOO,SAAS,OAAO,QAAmC,OAA+C;AACxG,SAAO,iBAAM,MAAM,WAAO,gCAAY,OAAO,MAAM,CAAC;AACrD;AAEO,SAAS,UACf,QACA,EAAE,MAAM,KAAK,KAAK,GACZ;AACN,QAAM,SAAqB,CAAC,4BAAiB,MAAM;AACnD,MAAI,SAAS,QAAW;AACvB,WAAO,KAAK,4BAAa,gCAAY,MAAM,MAAM,CAAC;AAAA,EACnD;AACA,MAAI,SAAS,QAAW;AACvB,WAAO,KAAK,2BAAY,gCAAY,MAAM,MAAM,CAAC;AAAA,EAClD;AACA,SAAO,KAAK,iBAAM;AAClB,SAAO,eAAI,KAAK,MAAM;AACvB;","names":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/elements/LivePreview/ToolbarArea/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,cAAc,CAAA;AAIrB,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC;IACjC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CAYA,CAAA"}

View File

@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ArrowDownToDot = createLucideIcon("ArrowDownToDot", [
["path", { d: "M12 2v14", key: "jyx4ut" }],
["path", { d: "m19 9-7 7-7-7", key: "1oe3oy" }],
["circle", { cx: "12", cy: "21", r: "1", key: "o0uj5v" }]
]);
export { ArrowDownToDot as default };
//# sourceMappingURL=arrow-down-to-dot.js.map

View File

@@ -0,0 +1,183 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ArgumentPlaceholder = ArgumentPlaceholder;
exports.ArrayPattern = exports.ArrayExpression = ArrayExpression;
exports.BigIntLiteral = BigIntLiteral;
exports.BooleanLiteral = BooleanLiteral;
exports.Identifier = Identifier;
exports.NullLiteral = NullLiteral;
exports.NumericLiteral = NumericLiteral;
exports.ObjectPattern = exports.ObjectExpression = ObjectExpression;
exports.ObjectMethod = ObjectMethod;
exports.ObjectProperty = ObjectProperty;
exports.PipelineBareFunction = PipelineBareFunction;
exports.PipelinePrimaryTopicReference = PipelinePrimaryTopicReference;
exports.PipelineTopicExpression = PipelineTopicExpression;
exports.RegExpLiteral = RegExpLiteral;
exports.SpreadElement = exports.RestElement = RestElement;
exports.StringLiteral = StringLiteral;
exports.TopicReference = TopicReference;
exports.VoidPattern = VoidPattern;
exports._getRawIdentifier = _getRawIdentifier;
var _t = require("@babel/types");
var _jsesc = require("jsesc");
var _methods = require("./methods.js");
const {
isAssignmentPattern,
isIdentifier
} = _t;
let lastRawIdentResult = "";
function _getRawIdentifier(node) {
const {
name
} = node;
const token = this.tokenMap.find(node, tok => tok.value === name);
if (token) {
lastRawIdentResult = this._originalCode.slice(token.start, token.end);
return lastRawIdentResult;
}
return lastRawIdentResult = node.name;
}
function Identifier(node) {
if (this._buf._map) {
var _node$loc;
this.sourceIdentifierName(((_node$loc = node.loc) == null ? void 0 : _node$loc.identifierName) || node.name);
}
this.word(this.tokenMap ? lastRawIdentResult : node.name);
}
function ArgumentPlaceholder() {
this.tokenChar(63);
}
function RestElement(node) {
this.token("...");
this.print(node.argument);
}
function ObjectExpression(node) {
const props = node.properties;
this.tokenChar(123);
if (props.length) {
const oldNoLineTerminatorAfterNode = this.enterDelimited();
this.space();
this.printList(props, this.shouldPrintTrailingComma("}"), true, true, undefined, true);
this.space();
this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;
}
this.rightBrace(node);
}
function ObjectMethod(node) {
this.printJoin(node.decorators);
_methods._methodHead.call(this, node);
this.space();
this.print(node.body);
}
function ObjectProperty(node) {
this.printJoin(node.decorators);
if (node.computed) {
this.tokenChar(91);
this.print(node.key);
this.tokenChar(93);
} else {
if (isAssignmentPattern(node.value) && isIdentifier(node.key) && node.key.name === node.value.left.name) {
this.print(node.value);
return;
}
this.print(node.key);
if (node.shorthand && isIdentifier(node.key) && isIdentifier(node.value) && node.key.name === node.value.name) {
return;
}
}
this.tokenChar(58);
this.space();
this.print(node.value);
}
function ArrayExpression(node) {
const elems = node.elements;
const len = elems.length;
this.tokenChar(91);
const oldNoLineTerminatorAfterNode = this.enterDelimited();
for (let i = 0; i < elems.length; i++) {
const elem = elems[i];
if (elem) {
if (i > 0) this.space();
this.print(elem, undefined, true);
if (i < len - 1 || this.shouldPrintTrailingComma("]")) {
this.tokenChar(44, i);
}
} else {
this.tokenChar(44, i);
}
}
this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;
this.tokenChar(93);
}
function RegExpLiteral(node) {
this.word(`/${node.pattern}/${node.flags}`, false);
}
function BooleanLiteral(node) {
this.word(node.value ? "true" : "false");
}
function NullLiteral() {
this.word("null");
}
function NumericLiteral(node) {
const raw = this.getPossibleRaw(node);
const opts = this.format.jsescOption;
const value = node.value;
const str = value + "";
if (opts.numbers) {
this.number(_jsesc(value, opts), value);
} else if (raw == null) {
this.number(str, value);
} else if (this.format.minified) {
this.number(raw.length < str.length ? raw : str, value);
} else {
this.number(raw, value);
}
}
function StringLiteral(node) {
const raw = this.getPossibleRaw(node);
if (!this.format.minified && raw !== undefined) {
this.token(raw);
return;
}
const val = _jsesc(node.value, this.format.jsescOption);
this.token(val);
}
function BigIntLiteral(node) {
const raw = this.getPossibleRaw(node);
if (!this.format.minified && raw !== undefined) {
this.word(raw);
return;
}
this.word(node.value + "n");
}
const validTopicTokenSet = new Set(["^^", "@@", "^", "%", "#"]);
function TopicReference() {
const {
topicToken
} = this.format;
if (validTopicTokenSet.has(topicToken)) {
this.token(topicToken);
} else {
const givenTopicTokenJSON = JSON.stringify(topicToken);
const validTopics = Array.from(validTopicTokenSet, v => JSON.stringify(v));
throw new Error(`The "topicToken" generator option must be one of ` + `${validTopics.join(", ")} (${givenTopicTokenJSON} received instead).`);
}
}
function PipelineTopicExpression(node) {
this.print(node.expression);
}
function PipelineBareFunction(node) {
this.print(node.callee);
}
function PipelinePrimaryTopicReference() {
this.tokenChar(35);
}
function VoidPattern() {
this.word("void");
}
//# sourceMappingURL=types.js.map

View File

@@ -0,0 +1,27 @@
var createFlow = require('./_createFlow');
/**
* Creates a function that returns the result of invoking the given functions
* with the `this` binding of the created function, where each successive
* invocation is supplied the return value of the previous.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Util
* @param {...(Function|Function[])} [funcs] The functions to invoke.
* @returns {Function} Returns the new composite function.
* @see _.flowRight
* @example
*
* function square(n) {
* return n * n;
* }
*
* var addSquare = _.flow([_.add, square]);
* addSquare(1, 2);
* // => 9
*/
var flow = createFlow();
module.exports = flow;

View File

@@ -0,0 +1 @@
{"version":3,"file":"useControllableState.js","names":["c","_c","useEffect","useRef","useState","useControllableState","propValue","fallbackValue","$","localValue","setLocalValue","initialRenderRef","t0","t1","current","t2","t3"],"sources":["../../src/hooks/useControllableState.ts"],"sourcesContent":["'use client'\nimport { useEffect, useRef, useState } from 'react'\n\n/**\n * A hook for managing state that can be controlled by props but also overridden locally.\n * Props always take precedence if they change, but local state can override them temporarily.\n *\n * @param propValue - The controlled value from props\n * @param fallbackValue - Value to use when propValue is null or undefined\n *\n * @internal - may change or be removed without a major version bump\n */\nexport function useControllableState<T, D>(\n propValue: T,\n fallbackValue: D,\n): [T extends NonNullable<T> ? T : D | NonNullable<T>, (value: ((prev: T) => T) | T) => void]\n\nexport function useControllableState<T>(propValue: T): [T, (value: ((prev: T) => T) | T) => void]\n\nexport function useControllableState<T, D>(\n propValue: T,\n fallbackValue?: D,\n): [T extends NonNullable<T> ? T : D | NonNullable<T>, (value: ((prev: T) => T) | T) => void] {\n const [localValue, setLocalValue] = useState<T>(propValue)\n const initialRenderRef = useRef(true)\n\n useEffect(() => {\n if (initialRenderRef.current) {\n initialRenderRef.current = false\n return\n }\n\n setLocalValue(propValue)\n }, [propValue])\n\n return [localValue ?? fallbackValue, setLocalValue] as [\n T extends NonNullable<T> ? T : D | NonNullable<T>,\n (value: ((prev: T) => T) | T) => void,\n ]\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;AACA,SAASC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ;AAkB5C,OAAO,SAAAC,qBAAAC,SAAA,EAAAC,aAAA;EAAA,MAAAC,CAAA,GAAAP,EAAA;EAIL,OAAAQ,UAAA,EAAAC,aAAA,IAAoCN,QAAA,CAAYE,SAAA;EAChD,MAAAK,gBAAA,GAAyBR,MAAA,KAAO;EAAA,IAAAS,EAAA;EAAA,IAAAC,EAAA;EAAA,IAAAL,CAAA,QAAAF,SAAA;IAEtBM,EAAA,GAAAA,CAAA;MAAA,IACJD,gBAAA,CAAAG,OAAA;QACFH,gBAAA,CAAAG,OAAA;QAAA;MAAA;MAIFJ,aAAA,CAAcJ,SAAA;IAAA;IACbO,EAAA,IAACP,SAAA;IAAUE,CAAA,MAAAF,SAAA;IAAAE,CAAA,MAAAI,EAAA;IAAAJ,CAAA,MAAAK,EAAA;EAAA;IAAAD,EAAA,GAAAJ,CAAA;IAAAK,EAAA,GAAAL,CAAA;EAAA;EAPdN,SAAA,CAAUU,EAOV,EAAGC,EAAW;EAEN,MAAAE,EAAA,GAAAN,UAAA,IAAcF,aAAA;EAAA,IAAAS,EAAA;EAAA,IAAAR,CAAA,QAAAO,EAAA;IAAfC,EAAA,IAACD,EAAc,EAAeL,aAAA;IAAcF,CAAA,MAAAO,EAAA;IAAAP,CAAA,MAAAQ,EAAA;EAAA;IAAAA,EAAA,GAAAR,CAAA;EAAA;EAAA,OAA5CQ,EAA4C;AAAA","ignoreList":[]}

View File

@@ -0,0 +1,76 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const makeSerializable = require("../util/makeSerializable");
const ImportDependency = require("./ImportDependency");
/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */
/** @typedef {import("../Dependency")} Dependency */
/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */
/** @typedef {import("../Module")} Module */
/** @typedef {import("../Module").BuildMeta} BuildMeta */
/** @typedef {import("../javascript/JavascriptParser").ImportAttributes} ImportAttributes */
/** @typedef {import("../javascript/JavascriptParser").Range} Range */
/** @typedef {ImportDependency.RawReferencedExports} RawReferencedExports */
/** @typedef {import("./ImportPhase").ImportPhaseType} ImportPhaseType */
class ImportEagerDependency extends ImportDependency {
/**
* @param {string} request the request
* @param {Range} range expression range
* @param {RawReferencedExports | null} referencedExports list of referenced exports
* @param {ImportPhaseType} phase import phase
* @param {ImportAttributes=} attributes import attributes
*/
constructor(request, range, referencedExports, phase, attributes) {
super(request, range, referencedExports, phase, attributes);
}
get type() {
return "import() eager";
}
get category() {
return "esm";
}
}
makeSerializable(
ImportEagerDependency,
"webpack/lib/dependencies/ImportEagerDependency"
);
ImportEagerDependency.Template = class ImportEagerDependencyTemplate extends (
ImportDependency.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,
{ runtimeTemplate, module, moduleGraph, chunkGraph, runtimeRequirements }
) {
const dep = /** @type {ImportEagerDependency} */ (dependency);
const content = runtimeTemplate.moduleNamespacePromise({
chunkGraph,
module: /** @type {Module} */ (moduleGraph.getModule(dep)),
request: dep.request,
strict: /** @type {BuildMeta} */ (module.buildMeta).strictHarmonyModule,
message: "import() eager",
dependency: dep,
runtimeRequirements
});
source.replace(dep.range[0], dep.range[1] - 1, content);
}
};
module.exports = ImportEagerDependency;

View File

@@ -0,0 +1,11 @@
import type { JWSHeaderParameters, JWEHeaderParameters } from '../types';
export type ProtectedHeaderParameters = JWSHeaderParameters & JWEHeaderParameters;
/**
* Decodes the Protected Header of a JWE/JWS/JWT token utilizing any JOSE serialization.
*
* This function is exported (as a named export) from the main `'jose'` module entry point as well
* as from its subpath export `'jose/decode/protected_header'`.
*
* @param token JWE/JWS/JWT token in any JOSE serialization.
*/
export declare function decodeProtectedHeader(token: string | object): ProtectedHeaderParameters;

View File

@@ -0,0 +1,15 @@
/**
* Ono supports custom formatters for error messages. In Node.js, it defaults
* to the `util.format()` function. In browsers, it defaults to `Array.join()`.
*
* The Node.js functionality can be used in a web browser via a polyfill,
* such as "format-util".
*
* @see https://github.com/tmpfs/format-util
*/
export declare const format = false;
/**
* The `util.inspect()` functionality only applies to Node.js.
* We return the constant `false` here so that the Node-specific code gets removed by tree-shaking.
*/
export declare const addInspectMethod = false;

View File

@@ -0,0 +1,71 @@
"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 driver_core_exports = {};
__export(driver_core_exports, {
LibSQLDatabase: () => LibSQLDatabase,
construct: () => construct
});
module.exports = __toCommonJS(driver_core_exports);
var import_entity = require("../entity.cjs");
var import_logger = require("../logger.cjs");
var import_relations = require("../relations.cjs");
var import_db = require("../sqlite-core/db.cjs");
var import_dialect = require("../sqlite-core/dialect.cjs");
var import_session = require("./session.cjs");
class LibSQLDatabase extends import_db.BaseSQLiteDatabase {
static [import_entity.entityKind] = "LibSQLDatabase";
async batch(batch) {
return this.session.batch(batch);
}
}
function construct(client, config = {}) {
const dialect = new import_dialect.SQLiteAsyncDialect({ casing: config.casing });
let logger;
if (config.logger === true) {
logger = new import_logger.DefaultLogger();
} else if (config.logger !== false) {
logger = config.logger;
}
let schema;
if (config.schema) {
const tablesConfig = (0, import_relations.extractTablesRelationalConfig)(
config.schema,
import_relations.createTableRelationsHelpers
);
schema = {
fullSchema: config.schema,
schema: tablesConfig.tables,
tableNamesMap: tablesConfig.tableNamesMap
};
}
const session = new import_session.LibSQLSession(client, dialect, schema, { logger, cache: config.cache }, void 0);
const db = new LibSQLDatabase("async", dialect, session, schema);
db.$client = client;
db.$cache = config.cache;
if (db.$cache) {
db.$cache["invalidate"] = config.cache?.onMutate;
}
return db;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
LibSQLDatabase,
construct
});
//# sourceMappingURL=driver-core.cjs.map

View File

@@ -0,0 +1,10 @@
function _classApplyDescriptorDestructureSet(e, t) {
if (t.set) return "__destrObj" in t || (t.__destrObj = {
set value(r) {
t.set.call(e, r);
}
}), t.__destrObj;
if (!t.writable) throw new TypeError("attempted to set read only private field");
return t;
}
export { _classApplyDescriptorDestructureSet as default };

View File

@@ -0,0 +1,408 @@
/*!
Copyright 2013 Lovell Fuller and others.
SPDX-License-Identifier: Apache-2.0
*/
#ifndef SRC_PIPELINE_H_
#define SRC_PIPELINE_H_
#include <memory>
#include <string>
#include <unordered_map>
#include <vector>
#include <napi.h>
#include <vips/vips8>
#include "./common.h"
Napi::Value pipeline(const Napi::CallbackInfo& info);
struct Composite {
sharp::InputDescriptor *input;
VipsBlendMode mode;
int gravity;
int left;
int top;
bool hasOffset;
bool tile;
bool premultiplied;
Composite():
input(nullptr),
mode(VIPS_BLEND_MODE_OVER),
gravity(0),
left(0),
top(0),
hasOffset(false),
tile(false),
premultiplied(false) {}
};
struct PipelineBaton {
sharp::InputDescriptor *input;
std::vector<sharp::InputDescriptor *> join;
std::string formatOut;
std::string fileOut;
void *bufferOut;
size_t bufferOutLength;
int pageHeightOut;
int pagesOut;
std::vector<Composite *> composite;
std::vector<sharp::InputDescriptor *> joinChannelIn;
int topOffsetPre;
int leftOffsetPre;
int widthPre;
int heightPre;
int topOffsetPost;
int leftOffsetPost;
int widthPost;
int heightPost;
int width;
int height;
int channels;
VipsKernel kernel;
sharp::Canvas canvas;
int position;
std::vector<double> resizeBackground;
bool hasCropOffset;
int cropOffsetLeft;
int cropOffsetTop;
bool hasAttentionCenter;
int attentionX;
int attentionY;
bool premultiplied;
bool tileCentre;
bool fastShrinkOnLoad;
std::vector<double> tint;
bool flatten;
std::vector<double> flattenBackground;
bool unflatten;
bool negate;
bool negateAlpha;
double blurSigma;
VipsPrecision precision;
double minAmpl;
double brightness;
double saturation;
int hue;
double lightness;
int medianSize;
double sharpenSigma;
double sharpenM1;
double sharpenM2;
double sharpenX1;
double sharpenY2;
double sharpenY3;
int threshold;
bool thresholdGrayscale;
std::vector<double> trimBackground;
double trimThreshold;
bool trimLineArt;
int trimOffsetLeft;
int trimOffsetTop;
std::vector<double> linearA;
std::vector<double> linearB;
int dilateWidth;
int erodeWidth;
double gamma;
double gammaOut;
bool greyscale;
bool normalise;
int normaliseLower;
int normaliseUpper;
int claheWidth;
int claheHeight;
int claheMaxSlope;
int angle;
double rotationAngle;
std::vector<double> rotationBackground;
bool rotateBefore;
bool orientBefore;
bool flip;
bool flop;
int extendTop;
int extendBottom;
int extendLeft;
int extendRight;
std::vector<double> extendBackground;
VipsExtend extendWith;
bool withoutEnlargement;
bool withoutReduction;
std::vector<double> affineMatrix;
std::vector<double> affineBackground;
double affineIdx;
double affineIdy;
double affineOdx;
double affineOdy;
std::string affineInterpolator;
int jpegQuality;
bool jpegProgressive;
std::string jpegChromaSubsampling;
bool jpegTrellisQuantisation;
int jpegQuantisationTable;
bool jpegOvershootDeringing;
bool jpegOptimiseScans;
bool jpegOptimiseCoding;
bool pngProgressive;
int pngCompressionLevel;
bool pngAdaptiveFiltering;
bool pngPalette;
int pngQuality;
int pngEffort;
int pngBitdepth;
double pngDither;
int jp2Quality;
bool jp2Lossless;
int jp2TileHeight;
int jp2TileWidth;
std::string jp2ChromaSubsampling;
int webpQuality;
int webpAlphaQuality;
bool webpNearLossless;
bool webpLossless;
bool webpSmartSubsample;
bool webpSmartDeblock;
VipsForeignWebpPreset webpPreset;
int webpEffort;
bool webpMinSize;
bool webpMixed;
int gifBitdepth;
int gifEffort;
double gifDither;
double gifInterFrameMaxError;
double gifInterPaletteMaxError;
bool gifKeepDuplicateFrames;
bool gifReuse;
bool gifProgressive;
int tiffQuality;
VipsForeignTiffCompression tiffCompression;
bool tiffBigtiff;
VipsForeignTiffPredictor tiffPredictor;
bool tiffPyramid;
int tiffBitdepth;
bool tiffMiniswhite;
bool tiffTile;
int tiffTileHeight;
int tiffTileWidth;
double tiffXres;
double tiffYres;
VipsForeignTiffResunit tiffResolutionUnit;
int heifQuality;
VipsForeignHeifCompression heifCompression;
int heifEffort;
std::string heifChromaSubsampling;
bool heifLossless;
int heifBitdepth;
double jxlDistance;
int jxlDecodingTier;
int jxlEffort;
bool jxlLossless;
VipsBandFormat rawDepth;
std::string err;
bool errUseWarning;
int keepMetadata;
int withMetadataOrientation;
double withMetadataDensity;
std::string withIccProfile;
std::unordered_map<std::string, std::string> withExif;
bool withExifMerge;
std::string withXmp;
int timeoutSeconds;
std::vector<double> convKernel;
int convKernelWidth;
int convKernelHeight;
double convKernelScale;
double convKernelOffset;
sharp::InputDescriptor *boolean;
VipsOperationBoolean booleanOp;
VipsOperationBoolean bandBoolOp;
int extractChannel;
bool removeAlpha;
double ensureAlpha;
VipsInterpretation colourspacePipeline;
VipsInterpretation colourspace;
std::vector<int> delay;
int loop;
int tileSize;
int tileOverlap;
VipsForeignDzContainer tileContainer;
VipsForeignDzLayout tileLayout;
std::string tileFormat;
int tileAngle;
std::vector<double> tileBackground;
int tileSkipBlanks;
VipsForeignDzDepth tileDepth;
std::string tileId;
std::string tileBasename;
std::vector<double> recombMatrix;
PipelineBaton():
input(nullptr),
bufferOutLength(0),
pageHeightOut(0),
pagesOut(0),
topOffsetPre(-1),
topOffsetPost(-1),
channels(0),
kernel(VIPS_KERNEL_LANCZOS3),
canvas(sharp::Canvas::CROP),
position(0),
resizeBackground{ 0.0, 0.0, 0.0, 255.0 },
hasCropOffset(false),
cropOffsetLeft(0),
cropOffsetTop(0),
hasAttentionCenter(false),
attentionX(0),
attentionY(0),
premultiplied(false),
tint{ -1.0, 0.0, 0.0, 0.0 },
flatten(false),
flattenBackground{ 0.0, 0.0, 0.0 },
unflatten(false),
negate(false),
negateAlpha(true),
blurSigma(0.0),
brightness(1.0),
saturation(1.0),
hue(0),
lightness(0),
medianSize(0),
sharpenSigma(0.0),
sharpenM1(1.0),
sharpenM2(2.0),
sharpenX1(2.0),
sharpenY2(10.0),
sharpenY3(20.0),
threshold(0),
thresholdGrayscale(true),
trimBackground{},
trimThreshold(-1.0),
trimLineArt(false),
trimOffsetLeft(0),
trimOffsetTop(0),
linearA{},
linearB{},
dilateWidth(0),
erodeWidth(0),
gamma(0.0),
greyscale(false),
normalise(false),
normaliseLower(1),
normaliseUpper(99),
claheWidth(0),
claheHeight(0),
claheMaxSlope(3),
angle(0),
rotationAngle(0.0),
rotationBackground{ 0.0, 0.0, 0.0, 255.0 },
flip(false),
flop(false),
extendTop(0),
extendBottom(0),
extendLeft(0),
extendRight(0),
extendBackground{ 0.0, 0.0, 0.0, 255.0 },
extendWith(VIPS_EXTEND_BACKGROUND),
withoutEnlargement(false),
withoutReduction(false),
affineMatrix{ 1.0, 0.0, 0.0, 1.0 },
affineBackground{ 0.0, 0.0, 0.0, 255.0 },
affineIdx(0),
affineIdy(0),
affineOdx(0),
affineOdy(0),
affineInterpolator("bicubic"),
jpegQuality(80),
jpegProgressive(false),
jpegChromaSubsampling("4:2:0"),
jpegTrellisQuantisation(false),
jpegQuantisationTable(0),
jpegOvershootDeringing(false),
jpegOptimiseScans(false),
jpegOptimiseCoding(true),
pngProgressive(false),
pngCompressionLevel(6),
pngAdaptiveFiltering(false),
pngPalette(false),
pngQuality(100),
pngEffort(7),
pngBitdepth(8),
pngDither(1.0),
jp2Quality(80),
jp2Lossless(false),
jp2TileHeight(512),
jp2TileWidth(512),
jp2ChromaSubsampling("4:4:4"),
webpQuality(80),
webpAlphaQuality(100),
webpNearLossless(false),
webpLossless(false),
webpSmartSubsample(false),
webpSmartDeblock(false),
webpPreset(VIPS_FOREIGN_WEBP_PRESET_DEFAULT),
webpEffort(4),
webpMinSize(false),
webpMixed(false),
gifBitdepth(8),
gifEffort(7),
gifDither(1.0),
gifInterFrameMaxError(0.0),
gifInterPaletteMaxError(3.0),
gifKeepDuplicateFrames(false),
gifReuse(true),
gifProgressive(false),
tiffQuality(80),
tiffCompression(VIPS_FOREIGN_TIFF_COMPRESSION_JPEG),
tiffBigtiff(false),
tiffPredictor(VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL),
tiffPyramid(false),
tiffBitdepth(8),
tiffMiniswhite(false),
tiffTile(false),
tiffTileHeight(256),
tiffTileWidth(256),
tiffXres(1.0),
tiffYres(1.0),
tiffResolutionUnit(VIPS_FOREIGN_TIFF_RESUNIT_INCH),
heifQuality(50),
heifCompression(VIPS_FOREIGN_HEIF_COMPRESSION_AV1),
heifEffort(4),
heifChromaSubsampling("4:4:4"),
heifLossless(false),
heifBitdepth(8),
jxlDistance(1.0),
jxlDecodingTier(0),
jxlEffort(7),
jxlLossless(false),
rawDepth(VIPS_FORMAT_UCHAR),
errUseWarning(false),
keepMetadata(0),
withMetadataOrientation(-1),
withMetadataDensity(0.0),
withExifMerge(true),
timeoutSeconds(0),
convKernelWidth(0),
convKernelHeight(0),
convKernelScale(0.0),
convKernelOffset(0.0),
boolean(nullptr),
booleanOp(VIPS_OPERATION_BOOLEAN_LAST),
bandBoolOp(VIPS_OPERATION_BOOLEAN_LAST),
extractChannel(-1),
removeAlpha(false),
ensureAlpha(-1.0),
colourspacePipeline(VIPS_INTERPRETATION_LAST),
colourspace(VIPS_INTERPRETATION_LAST),
loop(-1),
tileSize(256),
tileOverlap(0),
tileContainer(VIPS_FOREIGN_DZ_CONTAINER_FS),
tileLayout(VIPS_FOREIGN_DZ_LAYOUT_DZ),
tileAngle(0),
tileBackground{ 255.0, 255.0, 255.0, 255.0 },
tileSkipBlanks(-1),
tileDepth(VIPS_FOREIGN_DZ_DEPTH_LAST) {}
};
#endif // SRC_PIPELINE_H_

View File

@@ -0,0 +1,37 @@
'use strict'
module.exports = interpretConditionals
const getPropertyValue = require('./get-property-value')
/**
* Translates all conditional blocks from within the messageFormat. Translates
* any matching {if key}{key}{end} statements and returns everything between
* if and else blocks if the key provided was found in log.
*
* @param {MessageFormatString|MessageFormatFunction} messageFormat A format
* string or function that defines how the logged message should be
* conditionally formatted.
* @param {object} log The log object to be modified.
*
* @returns {string} The parsed messageFormat.
*/
function interpretConditionals (messageFormat, log) {
messageFormat = messageFormat.replace(/{if (.*?)}(.*?){end}/g, replacer)
// Remove non-terminated if blocks
messageFormat = messageFormat.replace(/{if (.*?)}/g, '')
// Remove floating end blocks
messageFormat = messageFormat.replace(/{end}/g, '')
return messageFormat.replace(/\s+/g, ' ').trim()
function replacer (_, key, value) {
const propertyValue = getPropertyValue(log, key)
if (propertyValue && value.includes(key)) {
return value.replace(new RegExp('{' + key + '}', 'g'), propertyValue)
} else {
return ''
}
}
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"heading-4.js","sources":["../../../src/icons/heading-4.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Heading4\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCAxMmg4IiAvPgogIDxwYXRoIGQ9Ik00IDE4VjYiIC8+CiAgPHBhdGggZD0iTTEyIDE4VjYiIC8+CiAgPHBhdGggZD0iTTE3IDEwdjRoNCIgLz4KICA8cGF0aCBkPSJNMjEgMTB2OCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/heading-4\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 Heading4 = createLucideIcon('Heading4', [\n ['path', { d: 'M4 12h8', key: '17cfdx' }],\n ['path', { d: 'M4 18V6', key: '1rz3zl' }],\n ['path', { d: 'M12 18V6', key: 'zqpxq5' }],\n ['path', { d: 'M17 10v4h4', key: '13sv97' }],\n ['path', { d: 'M21 10v8', key: '1kdml4' }],\n]);\n\nexport default Heading4;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,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,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,16 @@
import { Baggage, BaggageEntryMetadata } from '@opentelemetry/api';
type ParsedBaggageKeyValue = {
key: string;
value: string;
metadata: BaggageEntryMetadata | undefined;
};
export declare function serializeKeyPairs(keyPairs: string[]): string;
export declare function getKeyPairs(baggage: Baggage): string[];
export declare function parsePairKeyValue(entry: string): ParsedBaggageKeyValue | undefined;
/**
* Parse a string serialized in the baggage HTTP Format (without metadata):
* https://github.com/w3c/baggage/blob/master/baggage/HTTP_HEADER_FORMAT.md
*/
export declare function parseKeyPairsIntoRecord(value?: string): Record<string, string>;
export {};
//# sourceMappingURL=utils.d.ts.map

View File

@@ -0,0 +1,130 @@
"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.METRIC_DB_CLIENT_CONNECTIONS_USAGE = exports.DB_SYSTEM_VALUE_MONGODB = exports.DB_SYSTEM_NAME_VALUE_MONGODB = exports.ATTR_NET_PEER_PORT = exports.ATTR_NET_PEER_NAME = exports.ATTR_DB_SYSTEM = exports.ATTR_DB_STATEMENT = exports.ATTR_DB_OPERATION = exports.ATTR_DB_NAME = exports.ATTR_DB_MONGODB_COLLECTION = exports.ATTR_DB_CONNECTION_STRING = void 0;
/*
* This file contains a copy of unstable semantic convention definitions
* used by this package.
* @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv
*/
/**
* Deprecated, use `server.address`, `server.port` attributes instead.
*
* @example "Server=(localdb)\\v11.0;Integrated Security=true;"
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `server.address` and `server.port`.
*/
exports.ATTR_DB_CONNECTION_STRING = 'db.connection_string';
/**
* Deprecated, use `db.collection.name` instead.
*
* @example "mytable"
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `db.collection.name`.
*/
exports.ATTR_DB_MONGODB_COLLECTION = 'db.mongodb.collection';
/**
* Deprecated, use `db.namespace` instead.
*
* @example customers
* @example main
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `db.namespace`.
*/
exports.ATTR_DB_NAME = 'db.name';
/**
* Deprecated, use `db.operation.name` instead.
*
* @example findAndModify
* @example HMSET
* @example SELECT
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `db.operation.name`.
*/
exports.ATTR_DB_OPERATION = 'db.operation';
/**
* The database statement being executed.
*
* @example SELECT * FROM wuser_table
* @example SET mykey "WuValue"
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `db.query.text`.
*/
exports.ATTR_DB_STATEMENT = 'db.statement';
/**
* Deprecated, use `db.system.name` instead.
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `db.system.name`.
*/
exports.ATTR_DB_SYSTEM = 'db.system';
/**
* Deprecated, use `server.address` on client spans and `client.address` on server spans.
*
* @example example.com
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `server.address` on client spans and `client.address` on server spans.
*/
exports.ATTR_NET_PEER_NAME = 'net.peer.name';
/**
* Deprecated, use `server.port` on client spans and `client.port` on server spans.
*
* @example 8080
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `server.port` on client spans and `client.port` on server spans.
*/
exports.ATTR_NET_PEER_PORT = 'net.peer.port';
/**
* Enum value "mongodb" for attribute {@link ATTR_DB_SYSTEM_NAME}.
*
* [MongoDB](https://www.mongodb.com/)
*
* @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.DB_SYSTEM_NAME_VALUE_MONGODB = 'mongodb';
/**
* Enum value "mongodb" for attribute {@link ATTR_DB_SYSTEM}.
*
* MongoDB
*
* @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.DB_SYSTEM_VALUE_MONGODB = 'mongodb';
/**
* Deprecated, use `db.client.connection.count` instead.
*
* @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `db.client.connection.count`.
*/
exports.METRIC_DB_CLIENT_CONNECTIONS_USAGE = 'db.client.connections.usage';
//# sourceMappingURL=semconv.js.map

View File

@@ -0,0 +1,11 @@
import type { Locale } from "./types.js";
/**
* @category Locales
* @summary Hungarian locale.
* @language Hungarian
* @iso-639-2 hun
* @author Pavlo Shpak [@pshpak](https://github.com/pshpak)
* @author Eduardo Pardo [@eduardopsll](https://github.com/eduardopsll)
* @author Zoltan Szepesi [@twodcube](https://github.com/twodcube)
*/
export declare const hu: Locale;

View File

@@ -0,0 +1 @@
{"version":3,"file":"lt.d.ts","sourceRoot":"","sources":["../../../src/exports/i18n/lt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,uCAAuC,CAAA"}

View File

@@ -0,0 +1,2 @@
const e=()=>{let e=null;return{get:async()=>e,set:async t=>{e=t}}};export{e as memoryStorage};
//# sourceMappingURL=memory-storage.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"generateValueInjectionRules.d.ts","sourceRoot":"","sources":["../../../../src/config/turbopack/generateValueInjectionRules.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAa,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAGpE;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,EAC1C,aAAa,EACb,aAAa,EACb,UAAU,EACV,iBAAiB,GAClB,EAAE;IACD,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACvC,GAAG,wBAAwB,EAAE,CAoE7B"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platform/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { InstrumentationBase, normalize } from './node';\n"]}

View File

@@ -0,0 +1,160 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.mjs";
const eraValues = {
narrow: ["Î", "D"],
abbreviated: ["Î.d.C.", "D.C."],
wide: ["Înainte de Cristos", "După Cristos"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["T1", "T2", "T3", "T4"],
wide: [
"primul trimestru",
"al doilea trimestru",
"al treilea trimestru",
"al patrulea trimestru",
],
};
const monthValues = {
narrow: ["I", "F", "M", "A", "M", "I", "I", "A", "S", "O", "N", "D"],
abbreviated: [
"ian",
"feb",
"mar",
"apr",
"mai",
"iun",
"iul",
"aug",
"sep",
"oct",
"noi",
"dec",
],
wide: [
"ianuarie",
"februarie",
"martie",
"aprilie",
"mai",
"iunie",
"iulie",
"august",
"septembrie",
"octombrie",
"noiembrie",
"decembrie",
],
};
const dayValues = {
narrow: ["d", "l", "m", "m", "j", "v", "s"],
short: ["du", "lu", "ma", "mi", "jo", "vi", "sâ"],
abbreviated: ["dum", "lun", "mar", "mie", "joi", "vin", "sâm"],
wide: ["duminică", "luni", "marți", "miercuri", "joi", "vineri", "sâmbătă"],
};
const dayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "mn",
noon: "ami",
morning: "dim",
afternoon: "da",
evening: "s",
night: "n",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "miezul nopții",
noon: "amiază",
morning: "dimineață",
afternoon: "după-amiază",
evening: "seară",
night: "noapte",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "miezul nopții",
noon: "amiază",
morning: "dimineață",
afternoon: "după-amiază",
evening: "seară",
night: "noapte",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "mn",
noon: "amiază",
morning: "dimineață",
afternoon: "după-amiază",
evening: "seară",
night: "noapte",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "miezul nopții",
noon: "amiază",
morning: "dimineață",
afternoon: "după-amiază",
evening: "seară",
night: "noapte",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "miezul nopții",
noon: "amiază",
morning: "dimineață",
afternoon: "după-amiază",
evening: "seară",
night: "noapte",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
return String(dirtyNumber);
};
export const localize = {
ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
};

View File

@@ -0,0 +1 @@
var a=Object.defineProperty;var o=(e,n)=>a(e,"name",{value:n,configurable:!0});import p from"node:net";import{g}from"./get-pipe-path-BHW2eJdv.mjs";const m=o(()=>new Promise(e=>{const n=g(process.ppid),t=p.createConnection(n,()=>{e(o(i=>{const r=Buffer.from(JSON.stringify(i)),s=Buffer.alloc(4);s.writeInt32BE(r.length,0),t.write(Buffer.concat([s,r]))},"sendToParent"))});t.on("error",()=>{e()}),t.unref()}),"connectToServer"),c={send:void 0},f=m();f.then(e=>{c.send=e},()=>{});export{f as c,c as p};

View File

@@ -0,0 +1 @@
{"version":3,"file":"shield-ban.js","sources":["../../../src/icons/shield-ban.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ShieldBan\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjAgMTNjMCA1LTMuNSA3LjUtNy42NiA4Ljk1YTEgMSAwIDAgMS0uNjctLjAxQzcuNSAyMC41IDQgMTggNCAxM1Y2YTEgMSAwIDAgMSAxLTFjMiAwIDQuNS0xLjIgNi4yNC0yLjcyYTEuMTcgMS4xNyAwIDAgMSAxLjUyIDBDMTQuNTEgMy44MSAxNyA1IDE5IDVhMSAxIDAgMCAxIDEgMXoiIC8+CiAgPHBhdGggZD0ibTQuMjQzIDUuMjEgMTQuMzkgMTIuNDcyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/shield-ban\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 ShieldBan = createLucideIcon('ShieldBan', [\n [\n 'path',\n {\n d: 'M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z',\n key: 'oel41y',\n },\n ],\n ['path', { d: 'm4.243 5.21 14.39 12.472', key: '1c9a7c' }],\n]);\n\nexport default ShieldBan;\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;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,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AAC3D,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,106 @@
import { toDate } from "./toDate.mjs";
import { addLeadingZeros } from "./_lib/addLeadingZeros.mjs";
/**
* The {@link formatISO} function options.
*/
/**
* @name formatISO
* @category Common Helpers
* @summary Format the date according to the ISO 8601 standard (https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a003169814.htm).
*
* @description
* Return the formatted date string in ISO 8601 format. Options may be passed to control the parts and notations of the 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 original date
* @param options - An object with options.
*
* @returns The formatted date string (in loca.l time zone)
*
* @throws `date` must not be Invalid Date
*
* @example
* // Represent 18 September 2019 in ISO 8601 format (local time zone is UTC):
* const result = formatISO(new Date(2019, 8, 18, 19, 0, 52))
* //=> '2019-09-18T19:00:52Z'
*
* @example
* // Represent 18 September 2019 in ISO 8601, short format (local time zone is UTC):
* const result = formatISO(new Date(2019, 8, 18, 19, 0, 52), { format: 'basic' })
* //=> '20190918T190052'
*
* @example
* // Represent 18 September 2019 in ISO 8601 format, date only:
* const result = formatISO(new Date(2019, 8, 18, 19, 0, 52), { representation: 'date' })
* //=> '2019-09-18'
*
* @example
* // Represent 18 September 2019 in ISO 8601 format, time only (local time zone is UTC):
* const result = formatISO(new Date(2019, 8, 18, 19, 0, 52), { representation: 'time' })
* //=> '19:00:52Z'
*/
export function formatISO(date, options) {
const _date = toDate(date);
if (isNaN(_date.getTime())) {
throw new RangeError("Invalid time value");
}
const format = options?.format ?? "extended";
const representation = options?.representation ?? "complete";
let result = "";
let tzOffset = "";
const dateDelimiter = format === "extended" ? "-" : "";
const timeDelimiter = format === "extended" ? ":" : "";
// Representation is either 'date' or 'complete'
if (representation !== "time") {
const day = addLeadingZeros(_date.getDate(), 2);
const month = addLeadingZeros(_date.getMonth() + 1, 2);
const year = addLeadingZeros(_date.getFullYear(), 4);
// yyyyMMdd or yyyy-MM-dd.
result = `${year}${dateDelimiter}${month}${dateDelimiter}${day}`;
}
// Representation is either 'time' or 'complete'
if (representation !== "date") {
// Add the timezone.
const offset = _date.getTimezoneOffset();
if (offset !== 0) {
const absoluteOffset = Math.abs(offset);
const hourOffset = addLeadingZeros(Math.trunc(absoluteOffset / 60), 2);
const minuteOffset = addLeadingZeros(absoluteOffset % 60, 2);
// If less than 0, the sign is +, because it is ahead of time.
const sign = offset < 0 ? "+" : "-";
tzOffset = `${sign}${hourOffset}:${minuteOffset}`;
} else {
tzOffset = "Z";
}
const hour = addLeadingZeros(_date.getHours(), 2);
const minute = addLeadingZeros(_date.getMinutes(), 2);
const second = addLeadingZeros(_date.getSeconds(), 2);
// If there's also date, separate it with time with 'T'
const separator = result === "" ? "" : "T";
// Creates a time string consisting of hour, minute, and second, separated by delimiters, if defined.
const time = [hour, minute, second].join(timeDelimiter);
// HHmmss or HH:mm:ss.
result = `${result}${separator}${time}${tzOffset}`;
}
return result;
}
// Fallback for modularized imports:
export default formatISO;

View File

@@ -0,0 +1,12 @@
var a = require.resolve('buffer/').replace(process.cwd(), '$CWD');
var b = require('resolve').sync('buffer/', { preserveSymlinks: true }).replace(process.cwd(), '$CWD');
var c = require('resolve').sync('buffer/', { preserveSymlinks: false }).replace(process.cwd(), '$CWD');
console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false'));
console.log(b, ': preserveSymlinks true');
console.log(c, ': preserveSymlinks false');
if (a !== b && a !== c) {
throw 'sync: no match';
}
console.log('sync: success! a matched either b or c\n');

View File

@@ -0,0 +1,85 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const makeSerializable = require("../util/makeSerializable");
const NullDependency = require("./NullDependency");
/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */
/** @typedef {import("./NullDependency").RawRuntimeRequirements} RawRuntimeRequirements */
/** @typedef {import("../Dependency")} Dependency */
/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */
/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */
/** @typedef {import("../serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */
/** @typedef {import("../serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */
/** @typedef {import("../util/Hash")} Hash */
class RuntimeRequirementsDependency extends NullDependency {
/**
* @param {RawRuntimeRequirements} runtimeRequirements runtime requirements
*/
constructor(runtimeRequirements) {
super();
this.runtimeRequirements = new Set(runtimeRequirements);
/** @type {undefined | string} */
this._hashUpdate = undefined;
}
/**
* Update the hash
* @param {Hash} hash hash to be updated
* @param {UpdateHashContext} context context
* @returns {void}
*/
updateHash(hash, context) {
if (this._hashUpdate === undefined) {
this._hashUpdate = `${[...this.runtimeRequirements].join()}`;
}
hash.update(this._hashUpdate);
}
/**
* @param {ObjectSerializerContext} context context
*/
serialize(context) {
const { write } = context;
write(this.runtimeRequirements);
super.serialize(context);
}
/**
* @param {ObjectDeserializerContext} context context
*/
deserialize(context) {
const { read } = context;
this.runtimeRequirements = read();
super.deserialize(context);
}
}
makeSerializable(
RuntimeRequirementsDependency,
"webpack/lib/dependencies/RuntimeRequirementsDependency"
);
RuntimeRequirementsDependency.Template = class RuntimeRequirementsDependencyTemplate 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, { runtimeRequirements }) {
const dep = /** @type {RuntimeRequirementsDependency} */ (dependency);
for (const req of dep.runtimeRequirements) {
runtimeRequirements.add(req);
}
}
};
module.exports = RuntimeRequirementsDependency;

View File

@@ -0,0 +1,107 @@
"use strict";
exports.differenceInDays = differenceInDays;
var _index = require("./_lib/normalizeDates.cjs");
var _index2 = require("./differenceInCalendarDays.cjs");
/**
* The {@link differenceInDays} function options.
*/
/**
* @name differenceInDays
* @category Day Helpers
* @summary Get the number of full days between the given dates.
*
* @description
* Get the number of full day periods between two dates. Fractional days are
* truncated towards zero.
*
* One "full day" is the distance between a local time in one day to the same
* local time on the next or previous day. A full day can sometimes be less than
* or more than 24 hours if a daylight savings change happens between two dates.
*
* To ignore DST and only measure exact 24-hour periods, use this instead:
* `Math.trunc(differenceInHours(dateLeft, dateRight)/24)|0`.
*
* @param laterDate - The later date
* @param earlierDate - The earlier date
* @param options - An object with options
*
* @returns The number of full days according to the local timezone
*
* @example
* // How many full days are between
* // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?
* const result = differenceInDays(
* new Date(2012, 6, 2, 0, 0),
* new Date(2011, 6, 2, 23, 0)
* )
* //=> 365
*
* @example
* // How many full days are between
* // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?
* const result = differenceInDays(
* new Date(2011, 6, 3, 0, 1),
* new Date(2011, 6, 2, 23, 59)
* )
* //=> 0
*
* @example
* // How many full days are between
* // 1 March 2020 0:00 and 1 June 2020 0:00 ?
* // Note: because local time is used, the
* // result will always be 92 days, even in
* // time zones where DST starts and the
* // period has only 92*24-1 hours.
* const result = differenceInDays(
* new Date(2020, 5, 1),
* new Date(2020, 2, 1)
* )
* //=> 92
*/
function differenceInDays(laterDate, earlierDate, options) {
const [laterDate_, earlierDate_] = (0, _index.normalizeDates)(
options?.in,
laterDate,
earlierDate,
);
const sign = compareLocalAsc(laterDate_, earlierDate_);
const difference = Math.abs(
(0, _index2.differenceInCalendarDays)(laterDate_, earlierDate_),
);
laterDate_.setDate(laterDate_.getDate() - sign * difference);
// Math.abs(diff in full days - diff in calendar days) === 1 if last calendar day is not full
// If so, result must be decreased by 1 in absolute value
const isLastDayNotFull = Number(
compareLocalAsc(laterDate_, earlierDate_) === -sign,
);
const result = sign * (difference - isLastDayNotFull);
// Prevent negative zero
return result === 0 ? 0 : result;
}
// Like `compareAsc` but uses local time not UTC, which is needed
// for accurate equality comparisons of UTC timestamps that end up
// having the same representation in local time, e.g. one hour before
// DST ends vs. the instant that DST ends.
function compareLocalAsc(laterDate, earlierDate) {
const diff =
laterDate.getFullYear() - earlierDate.getFullYear() ||
laterDate.getMonth() - earlierDate.getMonth() ||
laterDate.getDate() - earlierDate.getDate() ||
laterDate.getHours() - earlierDate.getHours() ||
laterDate.getMinutes() - earlierDate.getMinutes() ||
laterDate.getSeconds() - earlierDate.getSeconds() ||
laterDate.getMilliseconds() - earlierDate.getMilliseconds();
if (diff < 0) return -1;
if (diff > 0) return 1;
// Return 0 if diff is 0; return NaN if diff is NaN
return diff;
}

View File

@@ -0,0 +1,442 @@
/*! @license DOMPurify 3.2.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.7/LICENSE */
import { TrustedTypePolicy, TrustedHTML, TrustedTypesWindow } from 'trusted-types/lib';
/**
* Configuration to control DOMPurify behavior.
*/
interface Config {
/**
* Extend the existing array of allowed attributes.
*/
ADD_ATTR?: string[] | undefined;
/**
* Extend the existing array of elements that can use Data URIs.
*/
ADD_DATA_URI_TAGS?: string[] | undefined;
/**
* Extend the existing array of allowed tags.
*/
ADD_TAGS?: string[] | undefined;
/**
* Extend the existing array of elements that are safe for URI-like values (be careful, XSS risk).
*/
ADD_URI_SAFE_ATTR?: string[] | undefined;
/**
* Allow ARIA attributes, leave other safe HTML as is (default is true).
*/
ALLOW_ARIA_ATTR?: boolean | undefined;
/**
* Allow HTML5 data attributes, leave other safe HTML as is (default is true).
*/
ALLOW_DATA_ATTR?: boolean | undefined;
/**
* Allow external protocol handlers in URL attributes (default is false, be careful, XSS risk).
* By default only `http`, `https`, `ftp`, `ftps`, `tel`, `mailto`, `callto`, `sms`, `cid` and `xmpp` are allowed.
*/
ALLOW_UNKNOWN_PROTOCOLS?: boolean | undefined;
/**
* Decide if self-closing tags in attributes are allowed.
* Usually removed due to a mXSS issue in jQuery 3.0.
*/
ALLOW_SELF_CLOSE_IN_ATTR?: boolean | undefined;
/**
* Allow only specific attributes.
*/
ALLOWED_ATTR?: string[] | undefined;
/**
* Allow only specific elements.
*/
ALLOWED_TAGS?: string[] | undefined;
/**
* Allow only specific namespaces. Defaults to:
* - `http://www.w3.org/1999/xhtml`
* - `http://www.w3.org/2000/svg`
* - `http://www.w3.org/1998/Math/MathML`
*/
ALLOWED_NAMESPACES?: string[] | undefined;
/**
* Allow specific protocols handlers in URL attributes via regex (be careful, XSS risk).
* Default RegExp:
* ```
* /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i;
* ```
*/
ALLOWED_URI_REGEXP?: RegExp | undefined;
/**
* Define how custom elements are handled.
*/
CUSTOM_ELEMENT_HANDLING?: {
/**
* Regular expression or function to match to allowed elements.
* Default is null (disallow any custom elements).
*/
tagNameCheck?: RegExp | ((tagName: string) => boolean) | null | undefined;
/**
* Regular expression or function to match to allowed attributes.
* Default is null (disallow any attributes not on the allow list).
*/
attributeNameCheck?: RegExp | ((attributeName: string, tagName?: string) => boolean) | null | undefined;
/**
* Allow custom elements derived from built-ins if they pass `tagNameCheck`. Default is false.
*/
allowCustomizedBuiltInElements?: boolean | undefined;
};
/**
* Add attributes to block-list.
*/
FORBID_ATTR?: string[] | undefined;
/**
* Add child elements to be removed when their parent is removed.
*/
FORBID_CONTENTS?: string[] | undefined;
/**
* Add elements to block-list.
*/
FORBID_TAGS?: string[] | undefined;
/**
* Glue elements like style, script or others to `document.body` and prevent unintuitive browser behavior in several edge-cases (default is false).
*/
FORCE_BODY?: boolean | undefined;
/**
* Map of non-standard HTML element names to support. Map to true to enable support. For example:
*
* ```
* HTML_INTEGRATION_POINTS: { foreignobject: true }
* ```
*/
HTML_INTEGRATION_POINTS?: Record<string, boolean> | undefined;
/**
* Sanitize a node "in place", which is much faster depending on how you use DOMPurify.
*/
IN_PLACE?: boolean | undefined;
/**
* Keep an element's content when the element is removed (default is true).
*/
KEEP_CONTENT?: boolean | undefined;
/**
* Map of MathML element names to support. Map to true to enable support. For example:
*
* ```
* MATHML_TEXT_INTEGRATION_POINTS: { mtext: true }
* ```
*/
MATHML_TEXT_INTEGRATION_POINTS?: Record<string, boolean> | undefined;
/**
* Change the default namespace from HTML to something different.
*/
NAMESPACE?: string | undefined;
/**
* Change the parser type so sanitized data is treated as XML and not as HTML, which is the default.
*/
PARSER_MEDIA_TYPE?: DOMParserSupportedType | undefined;
/**
* Return a DOM `DocumentFragment` instead of an HTML string (default is false).
*/
RETURN_DOM_FRAGMENT?: boolean | undefined;
/**
* Return a DOM `HTMLBodyElement` instead of an HTML string (default is false).
*/
RETURN_DOM?: boolean | undefined;
/**
* Return a TrustedHTML object instead of a string if possible.
*/
RETURN_TRUSTED_TYPE?: boolean | undefined;
/**
* Strip `{{ ... }}`, `${ ... }` and `<% ... %>` to make output safe for template systems.
* Be careful please, this mode is not recommended for production usage.
* Allowing template parsing in user-controlled HTML is not advised at all.
* Only use this mode if there is really no alternative.
*/
SAFE_FOR_TEMPLATES?: boolean | undefined;
/**
* Change how e.g. comments containing risky HTML characters are treated.
* Be very careful, this setting should only be set to `false` if you really only handle
* HTML and nothing else, no SVG, MathML or the like.
* Otherwise, changing from `true` to `false` will lead to XSS in this or some other way.
*/
SAFE_FOR_XML?: boolean | undefined;
/**
* Use DOM Clobbering protection on output (default is true, handle with care, minor XSS risks here).
*/
SANITIZE_DOM?: boolean | undefined;
/**
* Enforce strict DOM Clobbering protection via namespace isolation (default is false).
* When enabled, isolates the namespace of named properties (i.e., `id` and `name` attributes)
* from JS variables by prefixing them with the string `user-content-`
*/
SANITIZE_NAMED_PROPS?: boolean | undefined;
/**
* Supplied policy must define `createHTML` and `createScriptURL`.
*/
TRUSTED_TYPES_POLICY?: TrustedTypePolicy | undefined;
/**
* Controls categories of allowed elements.
*
* Note that the `USE_PROFILES` setting will override the `ALLOWED_TAGS` setting
* so don't use them together.
*/
USE_PROFILES?: false | UseProfilesConfig | undefined;
/**
* Return entire document including <html> tags (default is false).
*/
WHOLE_DOCUMENT?: boolean | undefined;
}
/**
* Defines categories of allowed elements.
*/
interface UseProfilesConfig {
/**
* Allow all safe MathML elements.
*/
mathMl?: boolean | undefined;
/**
* Allow all safe SVG elements.
*/
svg?: boolean | undefined;
/**
* Allow all save SVG Filters.
*/
svgFilters?: boolean | undefined;
/**
* Allow all safe HTML elements.
*/
html?: boolean | undefined;
}
declare const _default: DOMPurify;
interface DOMPurify {
/**
* Creates a DOMPurify instance using the given window-like object. Defaults to `window`.
*/
(root?: WindowLike): DOMPurify;
/**
* Version label, exposed for easier checks
* if DOMPurify is up to date or not
*/
version: string;
/**
* Array of elements that DOMPurify removed during sanitation.
* Empty if nothing was removed.
*/
removed: Array<RemovedElement | RemovedAttribute>;
/**
* Expose whether this browser supports running the full DOMPurify.
*/
isSupported: boolean;
/**
* Set the configuration once.
*
* @param cfg configuration object
*/
setConfig(cfg?: Config): void;
/**
* Removes the configuration.
*/
clearConfig(): void;
/**
* Provides core sanitation functionality.
*
* @param dirty string or DOM node
* @param cfg object
* @returns Sanitized TrustedHTML.
*/
sanitize(dirty: string | Node, cfg: Config & {
RETURN_TRUSTED_TYPE: true;
}): TrustedHTML;
/**
* Provides core sanitation functionality.
*
* @param dirty DOM node
* @param cfg object
* @returns Sanitized DOM node.
*/
sanitize(dirty: Node, cfg: Config & {
IN_PLACE: true;
}): Node;
/**
* Provides core sanitation functionality.
*
* @param dirty string or DOM node
* @param cfg object
* @returns Sanitized DOM node.
*/
sanitize(dirty: string | Node, cfg: Config & {
RETURN_DOM: true;
}): Node;
/**
* Provides core sanitation functionality.
*
* @param dirty string or DOM node
* @param cfg object
* @returns Sanitized document fragment.
*/
sanitize(dirty: string | Node, cfg: Config & {
RETURN_DOM_FRAGMENT: true;
}): DocumentFragment;
/**
* Provides core sanitation functionality.
*
* @param dirty string or DOM node
* @param cfg object
* @returns Sanitized string.
*/
sanitize(dirty: string | Node, cfg?: Config): string;
/**
* Checks if an attribute value is valid.
* Uses last set config, if any. Otherwise, uses config defaults.
*
* @param tag Tag name of containing element.
* @param attr Attribute name.
* @param value Attribute value.
* @returns Returns true if `value` is valid. Otherwise, returns false.
*/
isValidAttribute(tag: string, attr: string, value: string): boolean;
/**
* Adds a DOMPurify hook.
*
* @param entryPoint entry point for the hook to add
* @param hookFunction function to execute
*/
addHook(entryPoint: BasicHookName, hookFunction: NodeHook): void;
/**
* Adds a DOMPurify hook.
*
* @param entryPoint entry point for the hook to add
* @param hookFunction function to execute
*/
addHook(entryPoint: ElementHookName, hookFunction: ElementHook): void;
/**
* Adds a DOMPurify hook.
*
* @param entryPoint entry point for the hook to add
* @param hookFunction function to execute
*/
addHook(entryPoint: DocumentFragmentHookName, hookFunction: DocumentFragmentHook): void;
/**
* Adds a DOMPurify hook.
*
* @param entryPoint entry point for the hook to add
* @param hookFunction function to execute
*/
addHook(entryPoint: 'uponSanitizeElement', hookFunction: UponSanitizeElementHook): void;
/**
* Adds a DOMPurify hook.
*
* @param entryPoint entry point for the hook to add
* @param hookFunction function to execute
*/
addHook(entryPoint: 'uponSanitizeAttribute', hookFunction: UponSanitizeAttributeHook): void;
/**
* Remove a DOMPurify hook at a given entryPoint
* (pops it from the stack of hooks if hook not specified)
*
* @param entryPoint entry point for the hook to remove
* @param hookFunction optional specific hook to remove
* @returns removed hook
*/
removeHook(entryPoint: BasicHookName, hookFunction?: NodeHook): NodeHook | undefined;
/**
* Remove a DOMPurify hook at a given entryPoint
* (pops it from the stack of hooks if hook not specified)
*
* @param entryPoint entry point for the hook to remove
* @param hookFunction optional specific hook to remove
* @returns removed hook
*/
removeHook(entryPoint: ElementHookName, hookFunction?: ElementHook): ElementHook | undefined;
/**
* Remove a DOMPurify hook at a given entryPoint
* (pops it from the stack of hooks if hook not specified)
*
* @param entryPoint entry point for the hook to remove
* @param hookFunction optional specific hook to remove
* @returns removed hook
*/
removeHook(entryPoint: DocumentFragmentHookName, hookFunction?: DocumentFragmentHook): DocumentFragmentHook | undefined;
/**
* Remove a DOMPurify hook at a given entryPoint
* (pops it from the stack of hooks if hook not specified)
*
* @param entryPoint entry point for the hook to remove
* @param hookFunction optional specific hook to remove
* @returns removed hook
*/
removeHook(entryPoint: 'uponSanitizeElement', hookFunction?: UponSanitizeElementHook): UponSanitizeElementHook | undefined;
/**
* Remove a DOMPurify hook at a given entryPoint
* (pops it from the stack of hooks if hook not specified)
*
* @param entryPoint entry point for the hook to remove
* @param hookFunction optional specific hook to remove
* @returns removed hook
*/
removeHook(entryPoint: 'uponSanitizeAttribute', hookFunction?: UponSanitizeAttributeHook): UponSanitizeAttributeHook | undefined;
/**
* Removes all DOMPurify hooks at a given entryPoint
*
* @param entryPoint entry point for the hooks to remove
*/
removeHooks(entryPoint: HookName): void;
/**
* Removes all DOMPurify hooks.
*/
removeAllHooks(): void;
}
/**
* An element removed by DOMPurify.
*/
interface RemovedElement {
/**
* The element that was removed.
*/
element: Node;
}
/**
* An element removed by DOMPurify.
*/
interface RemovedAttribute {
/**
* The attribute that was removed.
*/
attribute: Attr | null;
/**
* The element that the attribute was removed.
*/
from: Node;
}
type BasicHookName = 'beforeSanitizeElements' | 'afterSanitizeElements' | 'uponSanitizeShadowNode';
type ElementHookName = 'beforeSanitizeAttributes' | 'afterSanitizeAttributes';
type DocumentFragmentHookName = 'beforeSanitizeShadowDOM' | 'afterSanitizeShadowDOM';
type UponSanitizeElementHookName = 'uponSanitizeElement';
type UponSanitizeAttributeHookName = 'uponSanitizeAttribute';
type HookName = BasicHookName | ElementHookName | DocumentFragmentHookName | UponSanitizeElementHookName | UponSanitizeAttributeHookName;
type NodeHook = (this: DOMPurify, currentNode: Node, hookEvent: null, config: Config) => void;
type ElementHook = (this: DOMPurify, currentNode: Element, hookEvent: null, config: Config) => void;
type DocumentFragmentHook = (this: DOMPurify, currentNode: DocumentFragment, hookEvent: null, config: Config) => void;
type UponSanitizeElementHook = (this: DOMPurify, currentNode: Node, hookEvent: UponSanitizeElementHookEvent, config: Config) => void;
type UponSanitizeAttributeHook = (this: DOMPurify, currentNode: Element, hookEvent: UponSanitizeAttributeHookEvent, config: Config) => void;
interface UponSanitizeElementHookEvent {
tagName: string;
allowedTags: Record<string, boolean>;
}
interface UponSanitizeAttributeHookEvent {
attrName: string;
attrValue: string;
keepAttr: boolean;
allowedAttributes: Record<string, boolean>;
forceKeepAttr: boolean | undefined;
}
/**
* A `Window`-like object containing the properties and types that DOMPurify requires.
*/
type WindowLike = Pick<typeof globalThis, 'DocumentFragment' | 'HTMLTemplateElement' | 'Node' | 'Element' | 'NodeFilter' | 'NamedNodeMap' | 'HTMLFormElement' | 'DOMParser'> & {
document?: Document;
MozNamedAttrMap?: typeof window.NamedNodeMap;
} & Pick<TrustedTypesWindow, 'trustedTypes'>;
export { type Config, type DOMPurify, type DocumentFragmentHook, type ElementHook, type HookName, type NodeHook, type RemovedAttribute, type RemovedElement, type UponSanitizeAttributeHook, type UponSanitizeAttributeHookEvent, type UponSanitizeElementHook, type UponSanitizeElementHookEvent, type WindowLike };
// @ts-ignore
export = _default;

View File

@@ -0,0 +1,81 @@
import { Parser } from "../Parser.mjs";
import { parseNDigits } from "../utils.mjs";
export class StandAloneQuarterParser extends Parser {
priority = 120;
parse(dateString, token, match) {
switch (token) {
// 1, 2, 3, 4
case "q":
case "qq": // 01, 02, 03, 04
return parseNDigits(token.length, dateString);
// 1st, 2nd, 3rd, 4th
case "qo":
return match.ordinalNumber(dateString, { unit: "quarter" });
// Q1, Q2, Q3, Q4
case "qqq":
return (
match.quarter(dateString, {
width: "abbreviated",
context: "standalone",
}) ||
match.quarter(dateString, {
width: "narrow",
context: "standalone",
})
);
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
case "qqqqq":
return match.quarter(dateString, {
width: "narrow",
context: "standalone",
});
// 1st quarter, 2nd quarter, ...
case "qqqq":
default:
return (
match.quarter(dateString, {
width: "wide",
context: "standalone",
}) ||
match.quarter(dateString, {
width: "abbreviated",
context: "standalone",
}) ||
match.quarter(dateString, {
width: "narrow",
context: "standalone",
})
);
}
}
validate(_date, value) {
return value >= 1 && value <= 4;
}
set(date, _flags, value) {
date.setMonth((value - 1) * 3, 1);
date.setHours(0, 0, 0, 0);
return date;
}
incompatibleTokens = [
"Y",
"R",
"Q",
"M",
"L",
"w",
"I",
"d",
"D",
"i",
"e",
"c",
"t",
"T",
];
}

View File

@@ -0,0 +1,28 @@
import { formatDistance } from "./ug/_lib/formatDistance.js";
import { formatLong } from "./ug/_lib/formatLong.js";
import { formatRelative } from "./ug/_lib/formatRelative.js";
import { localize } from "./ug/_lib/localize.js";
import { match } from "./ug/_lib/match.js";
/**
* @category Locales
* @summary Uighur locale
* @language Uighur
* @iso-639-2 uig
* @author Abduwaly M. [@abduwaly](https://github.com/abduwaly)
*/
export const ug = {
code: "ug",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 0 /* Sunday */,
firstWeekContainsDate: 1,
},
};
// Fallback for modularized imports:
export default ug;

View File

@@ -0,0 +1 @@
{"version":3,"file":"cat.js","sources":["../../../src/icons/cat.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Cat\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgNWMuNjcgMCAxLjM1LjA5IDIgLjI2IDEuNzgtMiA1LjAzLTIuODQgNi40Mi0yLjI2IDEuNC41OC0uNDIgNy0uNDIgNyAuNTcgMS4wNyAxIDIuMjQgMSAzLjQ0QzIxIDE3LjkgMTYuOTcgMjEgMTIgMjFzLTktMy05LTcuNTZjMC0xLjI1LjUtMi40IDEtMy40NCAwIDAtMS44OS02LjQyLS41LTcgMS4zOS0uNTggNC43Mi4yMyA2LjUgMi4yM0E5LjA0IDkuMDQgMCAwIDEgMTIgNVoiIC8+CiAgPHBhdGggZD0iTTggMTR2LjUiIC8+CiAgPHBhdGggZD0iTTE2IDE0di41IiAvPgogIDxwYXRoIGQ9Ik0xMS4yNSAxNi4yNWgxLjVMMTIgMTdsLS43NS0uNzVaIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/cat\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 Cat = createLucideIcon('Cat', [\n [\n 'path',\n {\n d: 'M12 5c.67 0 1.35.09 2 .26 1.78-2 5.03-2.84 6.42-2.26 1.4.58-.42 7-.42 7 .57 1.07 1 2.24 1 3.44C21 17.9 16.97 21 12 21s-9-3-9-7.56c0-1.25.5-2.4 1-3.44 0 0-1.89-6.42-.5-7 1.39-.58 4.72.23 6.5 2.23A9.04 9.04 0 0 1 12 5Z',\n key: 'x6xyqk',\n },\n ],\n ['path', { d: 'M8 14v.5', key: '1nzgdb' }],\n ['path', { d: 'M16 14v.5', key: '1lajdz' }],\n ['path', { d: 'M11.25 16.25h1.5L12 17l-.75-.75Z', key: '12kq1m' }],\n]);\n\nexport default Cat;\n"],"names":[],"mappings":"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"}

View File

@@ -0,0 +1,32 @@
var copyObject = require('./_copyObject'),
keysIn = require('./keysIn');
/**
* Converts `value` to a plain object flattening inherited enumerable string
* keyed properties of `value` to own properties of the plain object.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {Object} Returns the converted plain object.
* @example
*
* function Foo() {
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.assign({ 'a': 1 }, new Foo);
* // => { 'a': 1, 'b': 2 }
*
* _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
* // => { 'a': 1, 'b': 2, 'c': 3 }
*/
function toPlainObject(value) {
return copyObject(value, keysIn(value));
}
module.exports = toPlainObject;

View File

@@ -0,0 +1,20 @@
/**
* An enumeration of status codes.
*/
export var SpanStatusCode;
(function (SpanStatusCode) {
/**
* The default status.
*/
SpanStatusCode[SpanStatusCode["UNSET"] = 0] = "UNSET";
/**
* The operation has been validated by an Application developer or
* Operator to have completed successfully.
*/
SpanStatusCode[SpanStatusCode["OK"] = 1] = "OK";
/**
* The operation contains an error.
*/
SpanStatusCode[SpanStatusCode["ERROR"] = 2] = "ERROR";
})(SpanStatusCode || (SpanStatusCode = {}));
//# sourceMappingURL=status.js.map

View File

@@ -0,0 +1,31 @@
/**
* 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 {
EditorConfig,
LexicalNode,
NodeKey,
RangeSelection,
SerializedElementNode,
} from 'lexical';
import {ElementNode} from 'lexical';
declare export class OverflowNode extends ElementNode {
static getType(): string;
static clone(node: OverflowNode): OverflowNode;
constructor(key?: NodeKey): void;
createDOM(config: EditorConfig): HTMLElement;
insertNewAfter(selection: RangeSelection): null | LexicalNode;
excludeFromCopy(): boolean;
static importJSON(serializedNode: SerializedOverflowNode): OverflowNode;
}
declare export function $createOverflowNode(): OverflowNode;
declare export function $isOverflowNode(
node: ?LexicalNode,
): node is OverflowNode;
export type SerializedOverflowNode = SerializedElementNode;

View File

@@ -0,0 +1,28 @@
var baseUniq = require('./_baseUniq');
/**
* This method is like `_.uniq` except that it accepts `comparator` which
* is invoked to compare elements of `array`. The order of result values is
* determined by the order they occur in the array.The comparator is invoked
* with two arguments: (arrVal, othVal).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to inspect.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new duplicate free array.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
*
* _.uniqWith(objects, _.isEqual);
* // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
*/
function uniqWith(array, comparator) {
comparator = typeof comparator == 'function' ? comparator : undefined;
return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
}
module.exports = uniqWith;

View File

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

View File

@@ -0,0 +1,11 @@
import type { Client } from '@sentry/core';
/**
* Manually report the end of the page load, resulting in the SDK ending the pageload span.
* This only works if {@link BrowserTracingOptions.enableReportPageLoaded} is set to `true`.
* Otherwise, the pageload span will end itself based on the {@link BrowserTracingOptions.finalTimeout},
* {@link BrowserTracingOptions.idleTimeout} and {@link BrowserTracingOptions.childSpanTimeout}.
*
* @param client - The client to use. If not provided, the global client will be used.
*/
export declare function reportPageLoaded(client?: Client | undefined): void;
//# sourceMappingURL=reportPageLoaded.d.ts.map

View File

@@ -0,0 +1,107 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { getTranslation } from '@payloadcms/translations';
import React, { Fragment } from 'react';
import { PayloadIcon } from '../../graphics/Icon/index.js';
import { useConfig } from '../../providers/Config/index.js';
import { useTranslation } from '../../providers/Translation/index.js';
import { Link } from '../Link/index.js';
import { RenderCustomComponent } from '../RenderCustomComponent/index.js';
import { StepNavProvider, useStepNav } from './context.js';
import './index.scss';
export { SetStepNav } from './SetStepNav.js';
const baseClass = 'step-nav';
const StepNav = t0 => {
const $ = _c(7);
const {
className,
CustomIcon
} = t0;
const {
i18n
} = useTranslation();
const {
stepNav
} = useStepNav();
const {
config: t1
} = useConfig();
const {
routes: t2
} = t1;
const {
admin
} = t2;
const {
t
} = useTranslation();
let t3;
if ($[0] !== CustomIcon || $[1] !== admin || $[2] !== className || $[3] !== i18n || $[4] !== stepNav || $[5] !== t) {
t3 = _jsx(Fragment, {
children: stepNav.length > 0 ? _jsxs("nav", {
className: [baseClass, className].filter(Boolean).join(" "),
children: [_jsx(Link, {
className: `${baseClass}__home`,
href: admin,
prefetch: false,
tabIndex: 0,
children: _jsx("span", {
title: t("general:dashboard"),
children: _jsx(RenderCustomComponent, {
CustomComponent: CustomIcon,
Fallback: _jsx(PayloadIcon, {})
})
})
}), _jsx("span", {
children: "/"
}), stepNav.map((item, i) => {
const StepLabel = getTranslation(item.label, i18n);
const isLast = stepNav.length === i + 1;
const Step = isLast ? _jsx("span", {
className: `${baseClass}__last`,
children: StepLabel
}, i) : _jsxs(Fragment, {
children: [item.url ? _jsx(Link, {
href: item.url,
prefetch: false,
children: _jsx("span", {
children: StepLabel
}, i)
}) : _jsx("span", {
children: StepLabel
}, i), _jsx("span", {
children: "/"
})]
}, i);
return Step;
})]
}) : _jsx("div", {
className: [baseClass, className].filter(Boolean).join(" "),
children: _jsx("div", {
className: `${baseClass}__home`,
children: _jsx("span", {
title: t("general:dashboard"),
children: _jsx(RenderCustomComponent, {
CustomComponent: CustomIcon,
Fallback: _jsx(PayloadIcon, {})
})
})
})
})
});
$[0] = CustomIcon;
$[1] = admin;
$[2] = className;
$[3] = i18n;
$[4] = stepNav;
$[5] = t;
$[6] = t3;
} else {
t3 = $[6];
}
return t3;
};
export { StepNav, StepNavProvider, useStepNav };
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,250 @@
function declension(scheme, count) {
// scheme for count=1 exists
if (scheme.one !== undefined && count === 1) {
return scheme.one;
}
const rem10 = count % 10;
const rem100 = count % 100;
// 1, 21, 31, ...
if (rem10 === 1 && rem100 !== 11) {
return scheme.singularNominative.replace("{{count}}", String(count));
// 2, 3, 4, 22, 23, 24, 32 ...
} else if (rem10 >= 2 && rem10 <= 4 && (rem100 < 10 || rem100 > 20)) {
return scheme.singularGenitive.replace("{{count}}", String(count));
// 5, 6, 7, 8, 9, 10, 11, ...
} else {
return scheme.pluralGenitive.replace("{{count}}", String(count));
}
}
function buildLocalizeTokenFn(scheme) {
return (count, options) => {
if (options && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
if (scheme.future) {
return declension(scheme.future, count);
} else {
return "за " + declension(scheme.regular, count);
}
} else {
if (scheme.past) {
return declension(scheme.past, count);
} else {
return declension(scheme.regular, count) + " тому";
}
}
} else {
return declension(scheme.regular, count);
}
};
}
const halfAtMinute = (_, options) => {
if (options && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "за півхвилини";
} else {
return "півхвилини тому";
}
}
return "півхвилини";
};
const formatDistanceLocale = {
lessThanXSeconds: buildLocalizeTokenFn({
regular: {
one: "менше секунди",
singularNominative: "менше {{count}} секунди",
singularGenitive: "менше {{count}} секунд",
pluralGenitive: "менше {{count}} секунд",
},
future: {
one: "менше, ніж за секунду",
singularNominative: "менше, ніж за {{count}} секунду",
singularGenitive: "менше, ніж за {{count}} секунди",
pluralGenitive: "менше, ніж за {{count}} секунд",
},
}),
xSeconds: buildLocalizeTokenFn({
regular: {
singularNominative: "{{count}} секунда",
singularGenitive: "{{count}} секунди",
pluralGenitive: "{{count}} секунд",
},
past: {
singularNominative: "{{count}} секунду тому",
singularGenitive: "{{count}} секунди тому",
pluralGenitive: "{{count}} секунд тому",
},
future: {
singularNominative: "за {{count}} секунду",
singularGenitive: "за {{count}} секунди",
pluralGenitive: "за {{count}} секунд",
},
}),
halfAMinute: halfAtMinute,
lessThanXMinutes: buildLocalizeTokenFn({
regular: {
one: "менше хвилини",
singularNominative: "менше {{count}} хвилини",
singularGenitive: "менше {{count}} хвилин",
pluralGenitive: "менше {{count}} хвилин",
},
future: {
one: "менше, ніж за хвилину",
singularNominative: "менше, ніж за {{count}} хвилину",
singularGenitive: "менше, ніж за {{count}} хвилини",
pluralGenitive: "менше, ніж за {{count}} хвилин",
},
}),
xMinutes: buildLocalizeTokenFn({
regular: {
singularNominative: "{{count}} хвилина",
singularGenitive: "{{count}} хвилини",
pluralGenitive: "{{count}} хвилин",
},
past: {
singularNominative: "{{count}} хвилину тому",
singularGenitive: "{{count}} хвилини тому",
pluralGenitive: "{{count}} хвилин тому",
},
future: {
singularNominative: "за {{count}} хвилину",
singularGenitive: "за {{count}} хвилини",
pluralGenitive: "за {{count}} хвилин",
},
}),
aboutXHours: buildLocalizeTokenFn({
regular: {
singularNominative: "близько {{count}} години",
singularGenitive: "близько {{count}} годин",
pluralGenitive: "близько {{count}} годин",
},
future: {
singularNominative: "приблизно за {{count}} годину",
singularGenitive: "приблизно за {{count}} години",
pluralGenitive: "приблизно за {{count}} годин",
},
}),
xHours: buildLocalizeTokenFn({
regular: {
singularNominative: "{{count}} годину",
singularGenitive: "{{count}} години",
pluralGenitive: "{{count}} годин",
},
}),
xDays: buildLocalizeTokenFn({
regular: {
singularNominative: "{{count}} день",
singularGenitive: "{{count}} днi",
pluralGenitive: "{{count}} днів",
},
}),
aboutXWeeks: buildLocalizeTokenFn({
regular: {
singularNominative: "близько {{count}} тижня",
singularGenitive: "близько {{count}} тижнів",
pluralGenitive: "близько {{count}} тижнів",
},
future: {
singularNominative: "приблизно за {{count}} тиждень",
singularGenitive: "приблизно за {{count}} тижні",
pluralGenitive: "приблизно за {{count}} тижнів",
},
}),
xWeeks: buildLocalizeTokenFn({
regular: {
singularNominative: "{{count}} тиждень",
singularGenitive: "{{count}} тижні",
pluralGenitive: "{{count}} тижнів",
},
}),
aboutXMonths: buildLocalizeTokenFn({
regular: {
singularNominative: "близько {{count}} місяця",
singularGenitive: "близько {{count}} місяців",
pluralGenitive: "близько {{count}} місяців",
},
future: {
singularNominative: "приблизно за {{count}} місяць",
singularGenitive: "приблизно за {{count}} місяці",
pluralGenitive: "приблизно за {{count}} місяців",
},
}),
xMonths: buildLocalizeTokenFn({
regular: {
singularNominative: "{{count}} місяць",
singularGenitive: "{{count}} місяці",
pluralGenitive: "{{count}} місяців",
},
}),
aboutXYears: buildLocalizeTokenFn({
regular: {
singularNominative: "близько {{count}} року",
singularGenitive: "близько {{count}} років",
pluralGenitive: "близько {{count}} років",
},
future: {
singularNominative: "приблизно за {{count}} рік",
singularGenitive: "приблизно за {{count}} роки",
pluralGenitive: "приблизно за {{count}} років",
},
}),
xYears: buildLocalizeTokenFn({
regular: {
singularNominative: "{{count}} рік",
singularGenitive: "{{count}} роки",
pluralGenitive: "{{count}} років",
},
}),
overXYears: buildLocalizeTokenFn({
regular: {
singularNominative: "більше {{count}} року",
singularGenitive: "більше {{count}} років",
pluralGenitive: "більше {{count}} років",
},
future: {
singularNominative: "більше, ніж за {{count}} рік",
singularGenitive: "більше, ніж за {{count}} роки",
pluralGenitive: "більше, ніж за {{count}} років",
},
}),
almostXYears: buildLocalizeTokenFn({
regular: {
singularNominative: "майже {{count}} рік",
singularGenitive: "майже {{count}} роки",
pluralGenitive: "майже {{count}} років",
},
future: {
singularNominative: "майже за {{count}} рік",
singularGenitive: "майже за {{count}} роки",
pluralGenitive: "майже за {{count}} років",
},
}),
};
export const formatDistance = (token, count, options) => {
options = options || {};
return formatDistanceLocale[token](count, options);
};

View File

@@ -0,0 +1,7 @@
import classApplyDescriptorSet from "./classApplyDescriptorSet.js";
import classPrivateFieldGet2 from "./classPrivateFieldGet2.js";
function _classPrivateFieldSet(e, t, r) {
var s = classPrivateFieldGet2(t, e);
return classApplyDescriptorSet(e, s, r), r;
}
export { _classPrivateFieldSet as default };

View File

@@ -0,0 +1 @@
{"version":3,"names":["_index","require","_index2","prependToMemberExpression","member","prepend","isSuper","object","Error","memberExpression"],"sources":["../../src/modifications/prependToMemberExpression.ts"],"sourcesContent":["import { memberExpression } from \"../builders/generated/index.ts\";\nimport { isSuper } from \"../index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Prepend a node to a member expression.\n */\nexport default function prependToMemberExpression<\n T extends Pick<t.MemberExpression, \"object\" | \"property\">,\n>(member: T, prepend: t.MemberExpression[\"object\"]): T {\n if (isSuper(member.object)) {\n throw new Error(\n \"Cannot prepend node to super property access (`super.foo`).\",\n );\n }\n member.object = memberExpression(prepend, member.object);\n\n return member;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAMe,SAASE,yBAAyBA,CAE/CC,MAAS,EAAEC,OAAqC,EAAK;EACrD,IAAI,IAAAC,eAAO,EAACF,MAAM,CAACG,MAAM,CAAC,EAAE;IAC1B,MAAM,IAAIC,KAAK,CACb,6DACF,CAAC;EACH;EACAJ,MAAM,CAACG,MAAM,GAAG,IAAAE,uBAAgB,EAACJ,OAAO,EAAED,MAAM,CAACG,MAAM,CAAC;EAExD,OAAOH,MAAM;AACf","ignoreList":[]}

View File

@@ -0,0 +1,20 @@
import { RestCommand } from "../../types.js";
//#region src/rest/commands/utils/hash.d.ts
/**
* Generate a hash for a given string.
* @param string String to hash.
* @returns Hashed string.
*/
declare const generateHash: <Schema>(string: string) => RestCommand<string, Schema>;
/**
* Verify a string with a hash.
* @param string Source string.
* @param hash Hash you want to verify against.
* @returns Boolean.
*/
declare const verifyHash: <Schema>(string: string, hash: string) => RestCommand<boolean, Schema>;
//#endregion
export { generateHash, verifyHash };
//# sourceMappingURL=hash.d.ts.map

View File

@@ -0,0 +1,5 @@
import type { SingleValueProps } from 'react-select';
import React from 'react';
import type { Option } from '../types.js';
export declare const SingleValue: React.FC<SingleValueProps<Option>>;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,27 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AttributeNames = void 0;
/*
* 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.
*/
// Postgresql specific attributes not covered by semantic conventions
var AttributeNames;
(function (AttributeNames) {
AttributeNames["PG_VALUES"] = "db.postgresql.values";
AttributeNames["PG_PLAN"] = "db.postgresql.plan";
AttributeNames["IDLE_TIMEOUT_MILLIS"] = "db.postgresql.idle.timeout.millis";
AttributeNames["MAX_CLIENT"] = "db.postgresql.max.client";
})(AttributeNames = exports.AttributeNames || (exports.AttributeNames = {}));
//# sourceMappingURL=AttributeNames.js.map

View File

@@ -0,0 +1,26 @@
import React from 'react';
import './index.scss';
export type PaginationProps = {
hasNextPage?: boolean;
hasPrevPage?: boolean;
limit?: number;
nextPage?: number;
numberOfNeighbors?: number;
onChange?: (page: number) => void;
page?: number;
prevPage?: number;
totalPages?: number;
};
export type Node = {
props?: {
direction?: 'left' | 'right';
isDisabled?: boolean;
isFirstPage?: boolean;
isLastPage?: boolean;
page?: number;
updatePage: (page?: number) => void;
};
type: 'ClickableArrow' | 'Page' | 'Separator';
} | number;
export declare const Pagination: React.FC<PaginationProps>;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,11 @@
import type { ClientCollectionConfig, ClientGlobalConfig } from 'payload';
import type React from 'react';
export declare const SetStepNav: React.FC<{
readonly collectionConfig?: ClientCollectionConfig;
readonly globalConfig?: ClientGlobalConfig;
readonly id?: number | string;
readonly isTrashed?: boolean;
versionToCreatedAtFormatted?: string;
versionToID?: string;
}>;
//# sourceMappingURL=SetStepNav.d.ts.map

View File

@@ -0,0 +1,163 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.js";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.js";
const matchOrdinalNumberPattern = /^(\d+)(è|r|n|r|t)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(aC|dC)/i,
abbreviated: /^(a. de C.|d. de C.)/i,
wide: /^(abans de Crist|despr[eé]s de Crist)/i,
};
const parseEraPatterns = {
narrow: [/^aC/i, /^dC/i],
abbreviated: [/^(a. de C.)/i, /^(d. de C.)/i],
wide: [/^(abans de Crist)/i, /^(despr[eé]s de Crist)/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^T[1234]/i,
wide: /^[1234](è|r|n|r|t)? trimestre/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^(GN|FB|MÇ|AB|MG|JN|JL|AG|ST|OC|NV|DS)/i,
abbreviated:
/^(gen.|febr.|març|abr.|maig|juny|jul.|ag.|set.|oct.|nov.|des.)/i,
wide: /^(gener|febrer|març|abril|maig|juny|juliol|agost|setembre|octubre|novembre|desembre)/i,
};
const parseMonthPatterns = {
narrow: [
/^GN/i,
/^FB/i,
/^MÇ/i,
/^AB/i,
/^MG/i,
/^JN/i,
/^JL/i,
/^AG/i,
/^ST/i,
/^OC/i,
/^NV/i,
/^DS/i,
],
abbreviated: [
/^gen./i,
/^febr./i,
/^març/i,
/^abr./i,
/^maig/i,
/^juny/i,
/^jul./i,
/^ag./i,
/^set./i,
/^oct./i,
/^nov./i,
/^des./i,
],
wide: [
/^gener/i,
/^febrer/i,
/^març/i,
/^abril/i,
/^maig/i,
/^juny/i,
/^juliol/i,
/^agost/i,
/^setembre/i,
/^octubre/i,
/^novembre/i,
/^desembre/i,
],
};
const matchDayPatterns = {
narrow: /^(dg\.|dl\.|dt\.|dm\.|dj\.|dv\.|ds\.)/i,
short: /^(dg\.|dl\.|dt\.|dm\.|dj\.|dv\.|ds\.)/i,
abbreviated: /^(dg\.|dl\.|dt\.|dm\.|dj\.|dv\.|ds\.)/i,
wide: /^(diumenge|dilluns|dimarts|dimecres|dijous|divendres|dissabte)/i,
};
const parseDayPatterns = {
narrow: [/^dg./i, /^dl./i, /^dt./i, /^dm./i, /^dj./i, /^dv./i, /^ds./i],
abbreviated: [/^dg./i, /^dl./i, /^dt./i, /^dm./i, /^dj./i, /^dv./i, /^ds./i],
wide: [
/^diumenge/i,
/^dilluns/i,
/^dimarts/i,
/^dimecres/i,
/^dijous/i,
/^divendres/i,
/^disssabte/i,
],
};
const matchDayPeriodPatterns = {
narrow: /^(a|p|mn|md|(del|de la) (matí|tarda|vespre|nit))/i,
abbreviated:
/^([ap]\.?\s?m\.?|mitjanit|migdia|(del|de la) (matí|tarda|vespre|nit))/i,
wide: /^(ante meridiem|post meridiem|mitjanit|migdia|(del|de la) (matí|tarda|vespre|nit))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^mitjanit/i,
noon: /^migdia/i,
morning: /matí/i,
afternoon: /tarda/i,
evening: /vespre/i,
night: /nit/i,
},
};
export const match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "wide",
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "wide",
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "wide",
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
};

View File

@@ -0,0 +1,99 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { validateKey, validateValue } from '../internal/validators';
const MAX_TRACE_STATE_ITEMS = 32;
const MAX_TRACE_STATE_LEN = 512;
const LIST_MEMBERS_SEPARATOR = ',';
const LIST_MEMBER_KEY_VALUE_SPLITTER = '=';
/**
* TraceState must be a class and not a simple object type because of the spec
* requirement (https://www.w3.org/TR/trace-context/#tracestate-field).
*
* Here is the list of allowed mutations:
* - New key-value pair should be added into the beginning of the list
* - The value of any key can be updated. Modified keys MUST be moved to the
* beginning of the list.
*/
export class TraceState {
_internalState = new Map();
constructor(rawTraceState) {
if (rawTraceState)
this._parse(rawTraceState);
}
set(key, value) {
// TODO: Benchmark the different approaches(map vs list) and
// use the faster one.
const traceState = this._clone();
if (traceState._internalState.has(key)) {
traceState._internalState.delete(key);
}
traceState._internalState.set(key, value);
return traceState;
}
unset(key) {
const traceState = this._clone();
traceState._internalState.delete(key);
return traceState;
}
get(key) {
return this._internalState.get(key);
}
serialize() {
return this._keys()
.reduce((agg, key) => {
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
return agg;
}, [])
.join(LIST_MEMBERS_SEPARATOR);
}
_parse(rawTraceState) {
if (rawTraceState.length > MAX_TRACE_STATE_LEN)
return;
this._internalState = rawTraceState
.split(LIST_MEMBERS_SEPARATOR)
.reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning
.reduce((agg, part) => {
const listMember = part.trim(); // Optional Whitespace (OWS) handling
const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
if (i !== -1) {
const key = listMember.slice(0, i);
const value = listMember.slice(i + 1, part.length);
if (validateKey(key) && validateValue(value)) {
agg.set(key, value);
}
else {
// TODO: Consider to add warning log
}
}
return agg;
}, new Map());
// Because of the reverse() requirement, trunc must be done after map is created
if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
this._internalState = new Map(Array.from(this._internalState.entries())
.reverse() // Use reverse same as original tracestate parse chain
.slice(0, MAX_TRACE_STATE_ITEMS));
}
}
_keys() {
return Array.from(this._internalState.keys()).reverse();
}
_clone() {
const traceState = new TraceState();
traceState._internalState = new Map(this._internalState);
return traceState;
}
}
//# sourceMappingURL=TraceState.js.map

View File

@@ -0,0 +1,4 @@
{
"main": "../../cjs/_type_of.cjs",
"module": "../../esm/_type_of.js"
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"processSession.d.ts","sourceRoot":"","sources":["../../../src/integrations/processSession.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,eAAO,MAAM,yBAAyB,0CAuBpC,CAAC"}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../../src/pg-core/columns/vector_extension/bit.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 } from '~/utils.ts';\nimport { PgColumn, PgColumnBuilder } from '../common.ts';\n\nexport type PgBinaryVectorBuilderInitial<TName extends string, TDimensions extends number> = PgBinaryVectorBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'PgBinaryVector';\n\tdata: string;\n\tdriverParam: string;\n\tenumValues: undefined;\n\tdimensions: TDimensions;\n}>;\n\nexport class PgBinaryVectorBuilder<\n\tT extends ColumnBuilderBaseConfig<'string', 'PgBinaryVector'> & { dimensions: number },\n> extends PgColumnBuilder<\n\tT,\n\t{ dimensions: T['dimensions'] }\n> {\n\tstatic override readonly [entityKind]: string = 'PgBinaryVectorBuilder';\n\n\tconstructor(name: string, config: PgBinaryVectorConfig<T['dimensions']>) {\n\t\tsuper(name, 'string', 'PgBinaryVector');\n\t\tthis.config.dimensions = config.dimensions;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgBinaryVector<MakeColumnConfig<T, TTableName> & { dimensions: T['dimensions'] }> {\n\t\treturn new PgBinaryVector<MakeColumnConfig<T, TTableName> & { dimensions: T['dimensions'] }>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class PgBinaryVector<T extends ColumnBaseConfig<'string', 'PgBinaryVector'> & { dimensions: number }>\n\textends PgColumn<T, { dimensions: T['dimensions'] }, { dimensions: T['dimensions'] }>\n{\n\tstatic override readonly [entityKind]: string = 'PgBinaryVector';\n\n\treadonly dimensions = this.config.dimensions;\n\n\tgetSQLType(): string {\n\t\treturn `bit(${this.dimensions})`;\n\t}\n}\n\nexport interface PgBinaryVectorConfig<TDimensions extends number = number> {\n\tdimensions: TDimensions;\n}\n\nexport function bit<D extends number>(\n\tconfig: PgBinaryVectorConfig<D>,\n): PgBinaryVectorBuilderInitial<'', D>;\nexport function bit<TName extends string, D extends number>(\n\tname: TName,\n\tconfig: PgBinaryVectorConfig<D>,\n): PgBinaryVectorBuilderInitial<TName, D>;\nexport function bit(a: string | PgBinaryVectorConfig, b?: PgBinaryVectorConfig) {\n\tconst { name, config } = getColumnNameAndConfig<PgBinaryVectorConfig>(a, b);\n\treturn new PgBinaryVectorBuilder(name, config);\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,8BAA8B;AACvC,SAAS,UAAU,uBAAuB;AAYnC,MAAM,8BAEH,gBAGR;AAAA,EACD,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAc,QAA+C;AACxE,UAAM,MAAM,UAAU,gBAAgB;AACtC,SAAK,OAAO,aAAa,OAAO;AAAA,EACjC;AAAA;AAAA,EAGS,MACR,OACoF;AACpF,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,uBACJ,SACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEvC,aAAa,KAAK,OAAO;AAAA,EAElC,aAAqB;AACpB,WAAO,OAAO,KAAK,UAAU;AAAA,EAC9B;AACD;AAaO,SAAS,IAAI,GAAkC,GAA0B;AAC/E,QAAM,EAAE,MAAM,OAAO,IAAI,uBAA6C,GAAG,CAAC;AAC1E,SAAO,IAAI,sBAAsB,MAAM,MAAM;AAC9C;","names":[]}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"groupNavItems.d.ts","sourceRoot":"","sources":["../../src/utilities/groupNavItems.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,KAAK,EACV,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,EACpB,WAAW,EACZ,MAAM,SAAS,CAAA;AAIhB;;GAEG;AACH,oBAAY,UAAU;IACpB,UAAU,gBAAgB;IAC1B,MAAM,YAAY;CACnB;AAED,MAAM,MAAM,aAAa,GACrB;IACE,MAAM,EAAE,yBAAyB,CAAA;IACjC,IAAI,EAAE,UAAU,CAAC,UAAU,CAAA;CAC5B,GACD;IACE,MAAM,EAAE,qBAAqB,CAAA;IAC7B,IAAI,EAAE,UAAU,CAAC,MAAM,CAAA;CACxB,CAAA;AAEL,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE;QACR,KAAK,EAAE,WAAW,CAAA;QAClB,IAAI,EAAE,MAAM,CAAA;QACZ,IAAI,EAAE,UAAU,CAAA;KACjB,EAAE,CAAA;IACH,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,aAAa,EAAE,EACzB,WAAW,EAAE,oBAAoB,EACjC,IAAI,EAAE,UAAU,GACf,YAAY,EAAE,CAiEhB"}

View File

@@ -0,0 +1,164 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.js");
// Most data for localization are taken from this page
// https://www.unicode.org/cldr/charts/32/summary/ms.html
const eraValues = {
narrow: ["SM", "M"],
abbreviated: ["SM", "M"],
wide: ["Sebelum Masihi", "Masihi"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["S1", "S2", "S3", "S4"],
wide: ["Suku pertama", "Suku kedua", "Suku ketiga", "Suku keempat"],
};
// Note: in Malay, the names of days of the week and months are capitalized.
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
// Generally, formatted dates should look like they are in the middle of a sentence,
// e.g. in Spanish language the weekdays and months should be in the lowercase.
const monthValues = {
narrow: ["J", "F", "M", "A", "M", "J", "J", "O", "S", "O", "N", "D"],
abbreviated: [
"Jan",
"Feb",
"Mac",
"Apr",
"Mei",
"Jun",
"Jul",
"Ogo",
"Sep",
"Okt",
"Nov",
"Dis",
],
wide: [
"Januari",
"Februari",
"Mac",
"April",
"Mei",
"Jun",
"Julai",
"Ogos",
"September",
"Oktober",
"November",
"Disember",
],
};
const dayValues = {
narrow: ["A", "I", "S", "R", "K", "J", "S"],
short: ["Ahd", "Isn", "Sel", "Rab", "Kha", "Jum", "Sab"],
abbreviated: ["Ahd", "Isn", "Sel", "Rab", "Kha", "Jum", "Sab"],
wide: ["Ahad", "Isnin", "Selasa", "Rabu", "Khamis", "Jumaat", "Sabtu"],
};
const dayPeriodValues = {
narrow: {
am: "am",
pm: "pm",
midnight: "tgh malam",
noon: "tgh hari",
morning: "pagi",
afternoon: "tengah hari",
evening: "petang",
night: "malam",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "tengah malam",
noon: "tengah hari",
morning: "pagi",
afternoon: "tengah hari",
evening: "petang",
night: "malam",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "tengah malam",
noon: "tengah hari",
morning: "pagi",
afternoon: "tengah hari",
evening: "petang",
night: "malam",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "am",
pm: "pm",
midnight: "tengah malam",
noon: "tengah hari",
morning: "pagi",
afternoon: "tengah hari",
evening: "petang",
night: "malam",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "tengah malam",
noon: "tengah hari",
morning: "pagi",
afternoon: "tengah hari",
evening: "petang",
night: "malam",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "tengah malam",
noon: "tengah hari",
morning: "pagi",
afternoon: "tengah hari",
evening: "petang",
night: "malam",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
// Can't use "pertama", "kedua" because can't be parsed
return "ke-" + Number(dirtyNumber);
};
const localize = (exports.localize = {
ordinalNumber,
era: (0, _index.buildLocalizeFn)({
values: eraValues,
defaultWidth: "wide",
}),
quarter: (0, _index.buildLocalizeFn)({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: (0, _index.buildLocalizeFn)({
values: monthValues,
defaultWidth: "wide",
}),
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
});

View File

@@ -0,0 +1,243 @@
import { Minimatch } from 'minimatch';
import { fileURLToPath } from 'node:url';
import { PathScurry, PathScurryDarwin, PathScurryPosix, PathScurryWin32, } from 'path-scurry';
import { Pattern } from './pattern.js';
import { GlobStream, GlobWalker } from './walker.js';
// if no process global, just call it linux.
// so we default to case-sensitive, / separators
const defaultPlatform = (typeof process === 'object' &&
process &&
typeof process.platform === 'string') ?
process.platform
: 'linux';
/**
* An object that can perform glob pattern traversals.
*/
export class Glob {
absolute;
cwd;
root;
dot;
dotRelative;
follow;
ignore;
magicalBraces;
mark;
matchBase;
maxDepth;
nobrace;
nocase;
nodir;
noext;
noglobstar;
pattern;
platform;
realpath;
scurry;
stat;
signal;
windowsPathsNoEscape;
withFileTypes;
includeChildMatches;
/**
* The options provided to the constructor.
*/
opts;
/**
* An array of parsed immutable {@link Pattern} objects.
*/
patterns;
/**
* All options are stored as properties on the `Glob` object.
*
* See {@link GlobOptions} for full options descriptions.
*
* Note that a previous `Glob` object can be passed as the
* `GlobOptions` to another `Glob` instantiation to re-use settings
* and caches with a new pattern.
*
* Traversal functions can be called multiple times to run the walk
* again.
*/
constructor(pattern, opts) {
/* c8 ignore start */
if (!opts)
throw new TypeError('glob options required');
/* c8 ignore stop */
this.withFileTypes = !!opts.withFileTypes;
this.signal = opts.signal;
this.follow = !!opts.follow;
this.dot = !!opts.dot;
this.dotRelative = !!opts.dotRelative;
this.nodir = !!opts.nodir;
this.mark = !!opts.mark;
if (!opts.cwd) {
this.cwd = '';
}
else if (opts.cwd instanceof URL || opts.cwd.startsWith('file://')) {
opts.cwd = fileURLToPath(opts.cwd);
}
this.cwd = opts.cwd || '';
this.root = opts.root;
this.magicalBraces = !!opts.magicalBraces;
this.nobrace = !!opts.nobrace;
this.noext = !!opts.noext;
this.realpath = !!opts.realpath;
this.absolute = opts.absolute;
this.includeChildMatches = opts.includeChildMatches !== false;
this.noglobstar = !!opts.noglobstar;
this.matchBase = !!opts.matchBase;
this.maxDepth =
typeof opts.maxDepth === 'number' ? opts.maxDepth : Infinity;
this.stat = !!opts.stat;
this.ignore = opts.ignore;
if (this.withFileTypes && this.absolute !== undefined) {
throw new Error('cannot set absolute and withFileTypes:true');
}
if (typeof pattern === 'string') {
pattern = [pattern];
}
this.windowsPathsNoEscape =
!!opts.windowsPathsNoEscape ||
opts.allowWindowsEscape ===
false;
if (this.windowsPathsNoEscape) {
pattern = pattern.map(p => p.replace(/\\/g, '/'));
}
if (this.matchBase) {
if (opts.noglobstar) {
throw new TypeError('base matching requires globstar');
}
pattern = pattern.map(p => (p.includes('/') ? p : `./**/${p}`));
}
this.pattern = pattern;
this.platform = opts.platform || defaultPlatform;
this.opts = { ...opts, platform: this.platform };
if (opts.scurry) {
this.scurry = opts.scurry;
if (opts.nocase !== undefined &&
opts.nocase !== opts.scurry.nocase) {
throw new Error('nocase option contradicts provided scurry option');
}
}
else {
const Scurry = opts.platform === 'win32' ? PathScurryWin32
: opts.platform === 'darwin' ? PathScurryDarwin
: opts.platform ? PathScurryPosix
: PathScurry;
this.scurry = new Scurry(this.cwd, {
nocase: opts.nocase,
fs: opts.fs,
});
}
this.nocase = this.scurry.nocase;
// If you do nocase:true on a case-sensitive file system, then
// we need to use regexps instead of strings for non-magic
// path portions, because statting `aBc` won't return results
// for the file `AbC` for example.
const nocaseMagicOnly = this.platform === 'darwin' || this.platform === 'win32';
const mmo = {
// default nocase based on platform
...opts,
dot: this.dot,
matchBase: this.matchBase,
nobrace: this.nobrace,
nocase: this.nocase,
nocaseMagicOnly,
nocomment: true,
noext: this.noext,
nonegate: true,
optimizationLevel: 2,
platform: this.platform,
windowsPathsNoEscape: this.windowsPathsNoEscape,
debug: !!this.opts.debug,
};
const mms = this.pattern.map(p => new Minimatch(p, mmo));
const [matchSet, globParts] = mms.reduce((set, m) => {
set[0].push(...m.set);
set[1].push(...m.globParts);
return set;
}, [[], []]);
this.patterns = matchSet.map((set, i) => {
const g = globParts[i];
/* c8 ignore start */
if (!g)
throw new Error('invalid pattern object');
/* c8 ignore stop */
return new Pattern(set, g, 0, this.platform);
});
}
async walk() {
// Walkers always return array of Path objects, so we just have to
// coerce them into the right shape. It will have already called
// realpath() if the option was set to do so, so we know that's cached.
// start out knowing the cwd, at least
return [
...(await new GlobWalker(this.patterns, this.scurry.cwd, {
...this.opts,
maxDepth: this.maxDepth !== Infinity ?
this.maxDepth + this.scurry.cwd.depth()
: Infinity,
platform: this.platform,
nocase: this.nocase,
includeChildMatches: this.includeChildMatches,
}).walk()),
];
}
walkSync() {
return [
...new GlobWalker(this.patterns, this.scurry.cwd, {
...this.opts,
maxDepth: this.maxDepth !== Infinity ?
this.maxDepth + this.scurry.cwd.depth()
: Infinity,
platform: this.platform,
nocase: this.nocase,
includeChildMatches: this.includeChildMatches,
}).walkSync(),
];
}
stream() {
return new GlobStream(this.patterns, this.scurry.cwd, {
...this.opts,
maxDepth: this.maxDepth !== Infinity ?
this.maxDepth + this.scurry.cwd.depth()
: Infinity,
platform: this.platform,
nocase: this.nocase,
includeChildMatches: this.includeChildMatches,
}).stream();
}
streamSync() {
return new GlobStream(this.patterns, this.scurry.cwd, {
...this.opts,
maxDepth: this.maxDepth !== Infinity ?
this.maxDepth + this.scurry.cwd.depth()
: Infinity,
platform: this.platform,
nocase: this.nocase,
includeChildMatches: this.includeChildMatches,
}).streamSync();
}
/**
* Default sync iteration function. Returns a Generator that
* iterates over the results.
*/
iterateSync() {
return this.streamSync()[Symbol.iterator]();
}
[Symbol.iterator]() {
return this.iterateSync();
}
/**
* Default async iteration function. Returns an AsyncGenerator that
* iterates over the results.
*/
iterate() {
return this.stream()[Symbol.asyncIterator]();
}
[Symbol.asyncIterator]() {
return this.iterate();
}
}
//# sourceMappingURL=glob.js.map

View File

@@ -0,0 +1,7 @@
'use strict';
if (process.env.NODE_ENV === "production") {
module.exports = require("./react-select-animated.cjs.prod.js");
} else {
module.exports = require("./react-select-animated.cjs.dev.js");
}

View File

@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const LockKeyhole = createLucideIcon("LockKeyhole", [
["circle", { cx: "12", cy: "16", r: "1", key: "1au0dj" }],
["rect", { x: "3", y: "10", width: "18", height: "12", rx: "2", key: "6s8ecr" }],
["path", { d: "M7 10V7a5 5 0 0 1 10 0v3", key: "1pqi11" }]
]);
export { LockKeyhole as default };
//# sourceMappingURL=lock-keyhole.js.map

View File

@@ -0,0 +1,149 @@
import { buildAfterOperation } from '../../collections/operations/utilities/buildAfterOperation.js';
import { buildBeforeOperation } from '../../collections/operations/utilities/buildBeforeOperation.js';
import { Forbidden } from '../../errors/index.js';
import { commitTransaction } from '../../utilities/commitTransaction.js';
import { initTransaction } from '../../utilities/initTransaction.js';
import { killTransaction } from '../../utilities/killTransaction.js';
import { getFieldsToSign } from '../getFieldsToSign.js';
import { jwtSign } from '../jwt.js';
import { removeExpiredSessions } from '../sessions.js';
export const refreshOperation = async (incomingArgs)=>{
let args = incomingArgs;
try {
const shouldCommit = await initTransaction(args.req);
// /////////////////////////////////////
// beforeOperation - Collection
// /////////////////////////////////////
args = await buildBeforeOperation({
args,
collection: args.collection.config,
operation: 'refresh',
overrideAccess: false
});
// /////////////////////////////////////
// Refresh
// /////////////////////////////////////
const { collection: { config: collectionConfig }, req, req: { payload: { config, secret } } } = args;
if (!args.req.user) {
throw new Forbidden(args.req.t);
}
const pathname = new URL(args.req.url).pathname;
const isGraphQL = pathname === config.routes.graphQL;
let user = await req.payload.db.findOne({
collection: collectionConfig.slug,
req,
where: {
id: {
equals: args.req.user.id
}
}
});
const sid = args.req.user._sid;
if (collectionConfig.auth.useSessions && !collectionConfig.auth.disableLocalStrategy) {
if (!Array.isArray(user.sessions) || !sid) {
throw new Forbidden(args.req.t);
}
const existingSession = user.sessions.find(({ id })=>id === sid);
const now = new Date();
const tokenExpInMs = collectionConfig.auth.tokenExpiration * 1000;
existingSession.expiresAt = new Date(now.getTime() + tokenExpInMs);
// Prevent updatedAt from being updated when only refreshing a session
user.updatedAt = null;
await req.payload.db.updateOne({
id: user.id,
collection: collectionConfig.slug,
data: {
...user,
sessions: removeExpiredSessions(user.sessions)
},
req,
returning: false
});
}
user = await req.payload.findByID({
id: user.id,
collection: collectionConfig.slug,
depth: isGraphQL ? 0 : args.collection.config.auth.depth,
req: args.req
});
if (user) {
user.collection = args.req.user.collection;
user._strategy = args.req.user._strategy;
}
let result;
// /////////////////////////////////////
// refresh hook - Collection
// /////////////////////////////////////
for (const refreshHook of args.collection.config.hooks.refresh){
const hookResult = await refreshHook({
args,
user
});
if (hookResult) {
result = hookResult;
break;
}
}
if (!result) {
const fieldsToSign = getFieldsToSign({
collectionConfig,
email: user?.email,
sid,
user: args?.req?.user
});
const { exp, token: refreshedToken } = await jwtSign({
fieldsToSign,
secret,
tokenExpiration: collectionConfig.auth.tokenExpiration
});
result = {
exp,
refreshedToken,
setCookie: true,
/** @deprecated
* use:
* ```ts
* user._strategy
* ```
*/ strategy: args.req.user._strategy,
user
};
}
// /////////////////////////////////////
// After Refresh - Collection
// /////////////////////////////////////
if (collectionConfig.hooks?.afterRefresh?.length) {
for (const hook of collectionConfig.hooks.afterRefresh){
result = await hook({
collection: args.collection?.config,
context: args.req.context,
exp: result.exp,
req: args.req,
token: result.refreshedToken
}) || result;
}
}
// /////////////////////////////////////
// afterOperation - Collection
// /////////////////////////////////////
result = await buildAfterOperation({
args,
collection: args.collection?.config,
operation: 'refresh',
overrideAccess: false,
result
});
// /////////////////////////////////////
// Return results
// /////////////////////////////////////
if (shouldCommit) {
await commitTransaction(req);
}
return result;
} catch (error) {
await killTransaction(args.req);
throw error;
}
};
//# sourceMappingURL=refresh.js.map

View File

@@ -0,0 +1,157 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.mjs";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.mjs";
const matchOrdinalNumberPattern = /^(\d+)\./i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
abbreviated: /^(pr\. n\. št\.|po n\. št\.)/i,
wide: /^(pred Kristusom|pred na[sš]im [sš]tetjem|po Kristusu|po na[sš]em [sš]tetju|na[sš]ega [sš]tetja)/i,
};
const parseEraPatterns = {
any: [/^pr/i, /^(po|na[sš]em)/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^[1234]\.\s?[čc]et\.?/i,
wide: /^[1234]\. [čc]etrtletje/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[jfmasond]/i,
abbreviated:
/^(jan\.|feb\.|mar\.|apr\.|maj|jun\.|jul\.|avg\.|sep\.|okt\.|nov\.|dec\.)/i,
wide: /^(januar|februar|marec|april|maj|junij|julij|avgust|september|oktober|november|december)/i,
};
const parseMonthPatterns = {
narrow: [
/^j/i,
/^f/i,
/^m/i,
/^a/i,
/^m/i,
/^j/i,
/^j/i,
/^a/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
abbreviated: [
/^ja/i,
/^fe/i,
/^mar/i,
/^ap/i,
/^maj/i,
/^jun/i,
/^jul/i,
/^av/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
wide: [
/^ja/i,
/^fe/i,
/^mar/i,
/^ap/i,
/^maj/i,
/^jun/i,
/^jul/i,
/^av/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
};
const matchDayPatterns = {
narrow: /^[nptsčc]/i,
short: /^(ned\.|pon\.|tor\.|sre\.|[cč]et\.|pet\.|sob\.)/i,
abbreviated: /^(ned\.|pon\.|tor\.|sre\.|[cč]et\.|pet\.|sob\.)/i,
wide: /^(nedelja|ponedeljek|torek|sreda|[cč]etrtek|petek|sobota)/i,
};
const parseDayPatterns = {
narrow: [/^n/i, /^p/i, /^t/i, /^s/i, /^[cč]/i, /^p/i, /^s/i],
any: [/^n/i, /^po/i, /^t/i, /^sr/i, /^[cč]/i, /^pe/i, /^so/i],
};
const matchDayPeriodPatterns = {
narrow: /^(d|po?|z?v|n|z?j|24\.00|12\.00)/i,
any: /^(dop\.|pop\.|o?poln(\.|o[cč]i?)|o?pold(\.|ne)|z?ve[cč](\.|er)|(po)?no[cč]i?|popold(ne|an)|jut(\.|ro)|zjut(\.|raj))/i,
};
const parseDayPeriodPatterns = {
narrow: {
am: /^d/i,
pm: /^p/i,
midnight: /^24/i,
noon: /^12/i,
morning: /^(z?j)/i,
afternoon: /^p/i,
evening: /^(z?v)/i,
night: /^(n|po)/i,
},
any: {
am: /^dop\./i,
pm: /^pop\./i,
midnight: /^o?poln/i,
noon: /^o?pold/i,
morning: /j/i,
afternoon: /^pop\./i,
evening: /^z?ve/i,
night: /(po)?no/i,
},
};
export const match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "wide",
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
};

View File

@@ -0,0 +1,115 @@
'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { getTranslation } from '@payloadcms/translations';
import { toWords } from 'payload/shared';
import React from 'react';
import { FieldLabel } from '../../../../fields/FieldLabel/index.js';
import { useField } from '../../../../forms/useField/index.js';
import { useConfig } from '../../../../providers/Config/index.js';
import { useListQuery } from '../../../../providers/ListQuery/index.js';
import { useTranslation } from '../../../../providers/Translation/index.js';
import { Pill } from '../../../Pill/index.js';
import './index.scss';
/** @todo: improve this */
const transformWhereToNaturalLanguage = (where, collectionLabel) => {
if (!where) {
return null;
}
const renderCondition = condition => {
if (!condition || typeof condition !== 'object') {
return 'No where query';
}
const key = Object.keys(condition)[0];
if (!key || !condition[key] || typeof condition[key] !== 'object') {
return 'No where query';
}
const operator = Object.keys(condition[key])[0];
const operatorValue = condition[key][operator];
// Format value - ideally would use field schema for proper typing
const formatValue = val => {
if (typeof val === 'object' && val != null) {
try {
return new Date(val).toLocaleDateString();
} catch {
return 'Unknown error has occurred';
}
}
return val?.toString() ?? '';
};
const value = Array.isArray(operatorValue) ? operatorValue.map(formatValue).join(', ') : formatValue(operatorValue);
return /*#__PURE__*/_jsxs(Pill, {
pillStyle: "always-white",
size: "small",
children: [/*#__PURE__*/_jsx("b", {
children: toWords(key)
}), " ", operator, " ", /*#__PURE__*/_jsx("b", {
children: toWords(value)
})]
});
};
const renderWhere = (where, collectionLabel) => {
if (where.or && where.or.length > 0) {
return /*#__PURE__*/_jsx("div", {
className: "or-condition",
children: where.or.map((orCondition, orIndex) => /*#__PURE__*/_jsx(React.Fragment, {
children: orCondition.and && orCondition.and.length > 0 ? /*#__PURE__*/_jsxs("div", {
className: "and-condition",
children: [orIndex === 0 && /*#__PURE__*/_jsx("span", {
className: "label",
children: `Filter ${collectionLabel} where `
}), orIndex > 0 && /*#__PURE__*/_jsx("span", {
className: "label",
children: " or "
}), orCondition.and.map((andCondition, andIndex) => /*#__PURE__*/_jsxs(React.Fragment, {
children: [renderCondition(andCondition), andIndex < orCondition.and.length - 1 && /*#__PURE__*/_jsx("span", {
className: "label",
children: " and "
})]
}, andIndex))]
}) : renderCondition(orCondition)
}, orIndex))
});
}
return renderCondition(where);
};
return renderWhere(where, collectionLabel);
};
export const QueryPresetsWhereField = t0 => {
const {
field: t1
} = t0;
const {
label,
required
} = t1;
const {
path,
value
} = useField();
const {
collectionSlug
} = useListQuery();
const {
getEntityConfig
} = useConfig();
const collectionConfig = getEntityConfig({
collectionSlug
});
const {
i18n
} = useTranslation();
return _jsxs("div", {
className: "field-type query-preset-where-field",
children: [_jsx(FieldLabel, {
as: "h3",
label,
path,
required
}), _jsx("div", {
className: "value-wrapper",
children: value ? transformWhereToNaturalLanguage(value, getTranslation(collectionConfig?.labels?.plural, i18n)) : "No where query"
})]
});
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/enums.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,yBAAyB;AACZ,QAAA,kBAAkB,GAAG,WAAW,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Event name definitions\nexport const ExceptionEventName = 'exception';\n"]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/Folders/index.tsx"],"names":[],"mappings":"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"}

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