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,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 CircleGauge = createLucideIcon("CircleGauge", [
["path", { d: "M15.6 2.7a10 10 0 1 0 5.7 5.7", key: "1e0p6d" }],
["circle", { cx: "12", cy: "12", r: "2", key: "1c9p78" }],
["path", { d: "M13.4 10.6 19 5", key: "1kr7tw" }]
]);
export { CircleGauge as default };
//# sourceMappingURL=circle-gauge.js.map

View File

@@ -0,0 +1,32 @@
/**
* @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 Binoculars = createLucideIcon("Binoculars", [
["path", { d: "M10 10h4", key: "tcdvrf" }],
["path", { d: "M19 7V4a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v3", key: "3apit1" }],
[
"path",
{
d: "M20 21a2 2 0 0 0 2-2v-3.851c0-1.39-2-2.962-2-4.829V8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v11a2 2 0 0 0 2 2z",
key: "rhpgnw"
}
],
["path", { d: "M 22 16 L 2 16", key: "14lkq7" }],
[
"path",
{
d: "M4 21a2 2 0 0 1-2-2v-3.851c0-1.39 2-2.962 2-4.829V8a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v11a2 2 0 0 1-2 2z",
key: "104b3k"
}
],
["path", { d: "M9 7V4a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1v3", key: "14fczp" }]
]);
export { Binoculars as default };
//# sourceMappingURL=binoculars.js.map

View File

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

View File

@@ -0,0 +1,17 @@
Prism.languages.basic = {
'comment': {
pattern: /(?:!|REM\b).+/i,
inside: {
'keyword': /^REM/i
}
},
'string': {
pattern: /"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,
greedy: true
},
'number': /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,
'keyword': /\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,
'function': /\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,
'operator': /<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,
'punctuation': /[,;:()]/
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["React","CodeCell","cellData","nowrap","textToShow","length","substring","noWrapStyle","whiteSpace","_jsx","className","style"],"sources":["../../../../../../src/elements/Table/DefaultCell/fields/Code/index.tsx"],"sourcesContent":["'use client'\nimport type { ClientCollectionConfig, CodeFieldClient, DefaultCellComponentProps } from 'payload'\n\nimport React from 'react'\n\nimport './index.scss'\n\nexport interface CodeCellProps extends DefaultCellComponentProps<CodeFieldClient> {\n readonly collectionConfig: ClientCollectionConfig\n readonly nowrap?: boolean\n}\n\nexport const CodeCell: React.FC<CodeCellProps> = ({ cellData, nowrap }) => {\n const textToShow = cellData?.length > 100 ? `${cellData.substring(0, 100)}\\u2026` : cellData\n\n const noWrapStyle: React.CSSProperties = nowrap ? { whiteSpace: 'nowrap' } : {}\n\n return (\n <code className=\"code-cell\" style={noWrapStyle}>\n <span>{textToShow}</span>\n </code>\n )\n}\n"],"mappings":"AAAA;;;AAGA,OAAOA,KAAA,MAAW;AAElB,OAAO;AAOP,OAAO,MAAMC,QAAA,GAAoCA,CAAC;EAAEC,QAAQ;EAAEC;AAAM,CAAE;EACpE,MAAMC,UAAA,GAAaF,QAAA,EAAUG,MAAA,GAAS,MAAM,GAAGH,QAAA,CAASI,SAAS,CAAC,GAAG,YAAY,GAAGJ,QAAA;EAEpF,MAAMK,WAAA,GAAmCJ,MAAA,GAAS;IAAEK,UAAA,EAAY;EAAS,IAAI,CAAC;EAE9E,oBACEC,IAAA,CAAC;IAAKC,SAAA,EAAU;IAAYC,KAAA,EAAOJ,WAAA;cACjC,aAAAE,IAAA,CAAC;gBAAML;;;AAGb","ignoreList":[]}

View File

@@ -0,0 +1,27 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const ModuleDependency = require("./ModuleDependency");
class PrefetchDependency extends ModuleDependency {
/**
* @param {string} request the request string
*/
constructor(request) {
super(request);
}
get type() {
return "prefetch";
}
get category() {
return "esm";
}
}
module.exports = PrefetchDependency;

View File

@@ -0,0 +1,53 @@
import { GraphQLError } from '../../error/GraphQLError.mjs';
import { print } from '../../language/printer.mjs';
import { isCompositeType } from '../../type/definition.mjs';
import { typeFromAST } from '../../utilities/typeFromAST.mjs';
/**
* Fragments on composite type
*
* Fragments use a type condition to determine if they apply, since fragments
* can only be spread into a composite type (object, interface, or union), the
* type condition must also be a composite type.
*
* See https://spec.graphql.org/draft/#sec-Fragments-On-Composite-Types
*/
export function FragmentsOnCompositeTypesRule(context) {
return {
InlineFragment(node) {
const typeCondition = node.typeCondition;
if (typeCondition) {
const type = typeFromAST(context.getSchema(), typeCondition);
if (type && !isCompositeType(type)) {
const typeStr = print(typeCondition);
context.reportError(
new GraphQLError(
`Fragment cannot condition on non composite type "${typeStr}".`,
{
nodes: typeCondition,
},
),
);
}
}
},
FragmentDefinition(node) {
const type = typeFromAST(context.getSchema(), node.typeCondition);
if (type && !isCompositeType(type)) {
const typeStr = print(node.typeCondition);
context.reportError(
new GraphQLError(
`Fragment "${node.name.value}" cannot condition on non composite type "${typeStr}".`,
{
nodes: node.typeCondition,
},
),
);
}
},
};
}

View File

@@ -0,0 +1,81 @@
import type { DeepPartial } from 'ts-essentials';
import type { Document, PayloadRequest, PopulateType, SelectType, TransformGlobalWithSelect } from '../../../types/index.js';
import type { DataFromGlobalSlug, DraftFlagFromGlobalSlug, SelectFromGlobalSlug } from '../../config/types.js';
import { type FindOptions, type GlobalSlug, type Payload, type RequestContext, type TypedLocale } from '../../../index.js';
type BaseOptions<TSlug extends GlobalSlug, TSelect extends SelectType> = {
/**
* [Context](https://payloadcms.com/docs/hooks/context), which will then be passed to `context` and `req.context`,
* which can be read by hooks. Useful if you want to pass additional information to the hooks which
* shouldn't be necessarily part of the document, for example a `triggerBeforeChange` option which can be read by the BeforeChange hook
* to determine if it should run or not.
*/
context?: RequestContext;
/**
* The global data to update.
*/
data: DeepPartial<Omit<DataFromGlobalSlug<TSlug>, 'id'>>;
/**
* [Control auto-population](https://payloadcms.com/docs/queries/depth) of nested relationship and upload fields.
*/
depth?: number;
/**
* Specify a [fallback locale](https://payloadcms.com/docs/configuration/localization) to use for any returned documents.
*/
fallbackLocale?: false | TypedLocale;
/**
* Specify [locale](https://payloadcms.com/docs/configuration/localization) for any returned documents.
*/
locale?: 'all' | TypedLocale;
/**
* Skip access control.
* Set to `false` if you want to respect Access Control for the operation, for example when fetching data for the front-end.
* @default true
*/
overrideAccess?: boolean;
/**
* If you are uploading a file and would like to replace
* the existing file instead of generating a new filename,
* you can set the following property to `true`
*/
overrideLock?: boolean;
/**
* Specify [populate](https://payloadcms.com/docs/queries/select#populate) to control which fields to include to the result from populated documents.
*/
populate?: PopulateType;
/**
* Publish the document / documents in all locales. Requires `versions.drafts.localizeStatus` to be enabled.
*
* @default undefined
*/
publishAllLocales?: boolean;
/**
* Publish the document / documents with a specific locale.
*/
publishSpecificLocale?: TypedLocale;
/**
* The `PayloadRequest` object. You can pass it to thread the current [transaction](https://payloadcms.com/docs/database/transactions), user and locale to the operation.
* Recommended to pass when using the Local API from hooks, as usually you want to execute the operation within the current transaction.
*/
req?: Partial<PayloadRequest>;
/**
* Opt-in to receiving hidden fields. By default, they are hidden from returned documents in accordance to your config.
* @default false
*/
showHiddenFields?: boolean;
/**
* the Global slug to operate against.
*/
slug: TSlug;
/**
* Unpublish the document / documents in all locales. Requires `versions.drafts.localizeStatus` to be enabled.
*/
unpublishAllLocales?: boolean;
/**
* If you set `overrideAccess` to `false`, you can pass a user to use against the access control checks.
*/
user?: Document;
} & Pick<FindOptions<string, SelectType>, 'select'>;
export type Options<TSlug extends GlobalSlug, TSelect extends SelectType> = BaseOptions<TSlug, TSelect> & DraftFlagFromGlobalSlug<TSlug>;
export declare function updateGlobalLocal<TSlug extends GlobalSlug, TSelect extends SelectFromGlobalSlug<TSlug>>(payload: Payload, options: Options<TSlug, TSelect>): Promise<TransformGlobalWithSelect<TSlug, TSelect>>;
export {};
//# sourceMappingURL=update.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"files.cjs","names":[],"sources":["../../../../src/rest/commands/create/files.ts"],"sourcesContent":["import type { DirectusFile } from '../../../schema/file.js';\nimport type { ApplyQueryFields, NestedPartial, Query } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\n\nexport type CreateFileOutput<\n\tSchema,\n\tTQuery extends Query<Schema, Item>,\n\tItem extends object = DirectusFile<Schema>,\n> = ApplyQueryFields<Schema, Item, TQuery['fields']>;\n\n/**\n * Upload/create a new file.\n *\n * @param data Formdata object\n * @param query The query parameters\n *\n * @returns Returns the file object for the uploaded file, or an array of file objects if multiple files were uploaded at once.\n */\nexport const uploadFiles =\n\t<Schema, const TQuery extends Query<Schema, DirectusFile<Schema>>>(\n\t\tdata: FormData,\n\t\tquery?: TQuery,\n\t): RestCommand<CreateFileOutput<Schema, TQuery>, Schema> =>\n\t() => ({\n\t\tpath: '/files',\n\t\tmethod: 'POST',\n\t\tbody: data,\n\t\tparams: query ?? {},\n\t\theaders: { 'Content-Type': 'multipart/form-data' },\n\t});\n\n/**\n * Import a file from the web\n *\n * @param url The url to import the file from\n * @param data Formdata object\n * @param query The query parameters\n *\n * @returns Returns the file object for the imported file.\n */\nexport const importFile =\n\t<Schema, TQuery extends Query<Schema, DirectusFile<Schema>>>(\n\t\turl: string,\n\t\tdata?: NestedPartial<DirectusFile<Schema>>,\n\t\tquery?: TQuery,\n\t): RestCommand<CreateFileOutput<Schema, TQuery>, Schema> =>\n\t() => ({\n\t\tpath: '/files/import',\n\t\tmethod: 'POST',\n\t\tbody: JSON.stringify({ url, data: data ?? {} }),\n\t\tparams: query ?? {},\n\t});\n"],"mappings":"AAkBA,MAAa,GAEX,EACA,SAEM,CACN,KAAM,SACN,OAAQ,OACR,KAAM,EACN,OAAQ,GAAS,EAAE,CACnB,QAAS,CAAE,eAAgB,sBAAuB,CAClD,EAWW,GAEX,EACA,EACA,SAEM,CACN,KAAM,gBACN,OAAQ,OACR,KAAM,KAAK,UAAU,CAAE,MAAK,KAAM,GAAQ,EAAE,CAAE,CAAC,CAC/C,OAAQ,GAAS,EAAE,CACnB"}

View File

@@ -0,0 +1,5 @@
export declare const eachDayOfIntervalWithOptions: import("./types.js").FPFn2<
Date[],
import("../eachDayOfInterval.js").EachDayOfIntervalOptions | undefined,
import("../fp.js").Interval<Date>
>;

View File

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

View File

@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Redo2 = createLucideIcon("Redo2", [
["path", { d: "m15 14 5-5-5-5", key: "12vg1m" }],
["path", { d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13", key: "6uklza" }]
]);
export { Redo2 as default };
//# sourceMappingURL=redo-2.js.map

View File

@@ -0,0 +1,19 @@
/**
* @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 IndianRupee = createLucideIcon("IndianRupee", [
["path", { d: "M6 3h12", key: "ggurg9" }],
["path", { d: "M6 8h12", key: "6g4wlu" }],
["path", { d: "m6 13 8.5 8", key: "u1kupk" }],
["path", { d: "M6 13h3", key: "wdp6ag" }],
["path", { d: "M9 13c6.667 0 6.667-10 0-10", key: "1nkvk2" }]
]);
export { IndianRupee as default };
//# sourceMappingURL=indian-rupee.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"flows.js","names":[],"sources":["../../../../src/rest/commands/update/flows.ts"],"sourcesContent":["import type { DirectusFlow } from '../../../schema/flow.js';\nimport type { ApplyQueryFields, NestedPartial, Query } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\nimport { throwIfEmpty } from '../../utils/index.js';\n\nexport type UpdateFlowOutput<\n\tSchema,\n\tTQuery extends Query<Schema, Item>,\n\tItem extends object = DirectusFlow<Schema>,\n> = ApplyQueryFields<Schema, Item, TQuery['fields']>;\n\n/**\n * Update multiple existing flows.\n * @param keys\n * @param item\n * @param query\n * @returns Returns the flow objects for the updated flows.\n * @throws Will throw if keys is empty\n */\nexport const updateFlows =\n\t<Schema, const TQuery extends Query<Schema, DirectusFlow<Schema>>>(\n\t\tkeys: DirectusFlow<Schema>['id'][],\n\t\titem: NestedPartial<DirectusFlow<Schema>>,\n\t\tquery?: TQuery,\n\t): RestCommand<UpdateFlowOutput<Schema, TQuery>[], Schema> =>\n\t() => {\n\t\tthrowIfEmpty(keys, 'Keys cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/flows`,\n\t\t\tparams: query ?? {},\n\t\t\tbody: JSON.stringify({ keys, data: item }),\n\t\t\tmethod: 'PATCH',\n\t\t};\n\t};\n\n/**\n * Update multiple flows as batch.\n * @param items\n * @param query\n * @returns Returns the flow objects for the updated flows.\n */\nexport const updateFlowsBatch =\n\t<Schema, const TQuery extends Query<Schema, DirectusFlow<Schema>>>(\n\t\titems: NestedPartial<DirectusFlow<Schema>>[],\n\t\tquery?: TQuery,\n\t): RestCommand<UpdateFlowOutput<Schema, TQuery>[], Schema> =>\n\t() => ({\n\t\tpath: `/flows`,\n\t\tparams: query ?? {},\n\t\tbody: JSON.stringify(items),\n\t\tmethod: 'PATCH',\n\t});\n\n/**\n * Update an existing flow.\n * @param key\n * @param item\n * @param query\n * @returns Returns the flow object for the updated flow.\n * @throws Will throw if key is empty\n */\nexport const updateFlow =\n\t<Schema, const TQuery extends Query<Schema, DirectusFlow<Schema>>>(\n\t\tkey: DirectusFlow<Schema>['id'],\n\t\titem: NestedPartial<DirectusFlow<Schema>>,\n\t\tquery?: TQuery,\n\t): RestCommand<UpdateFlowOutput<Schema, TQuery>, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(key, 'Key cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/flows/${key}`,\n\t\t\tparams: query ?? {},\n\t\t\tbody: JSON.stringify(item),\n\t\t\tmethod: 'PATCH',\n\t\t};\n\t};\n"],"mappings":"6DAmBA,MAAa,GAEX,EACA,EACA,SAGA,EAAa,EAAM,uBAAuB,CAEnC,CACN,KAAM,SACN,OAAQ,GAAS,EAAE,CACnB,KAAM,KAAK,UAAU,CAAE,OAAM,KAAM,EAAM,CAAC,CAC1C,OAAQ,QACR,EASU,GAEX,EACA,SAEM,CACN,KAAM,SACN,OAAQ,GAAS,EAAE,CACnB,KAAM,KAAK,UAAU,EAAM,CAC3B,OAAQ,QACR,EAUW,GAEX,EACA,EACA,SAGA,EAAa,EAAK,sBAAsB,CAEjC,CACN,KAAM,UAAU,IAChB,OAAQ,GAAS,EAAE,CACnB,KAAM,KAAK,UAAU,EAAK,CAC1B,OAAQ,QACR"}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/admin/fields/Upload.ts"],"sourcesContent":["import type { MarkOptional } from 'ts-essentials'\n\nimport type { UploadField, UploadFieldClient } from '../../fields/config/types.js'\nimport type { UploadFieldValidation } from '../../fields/validations.js'\nimport type { FieldErrorClientComponent, FieldErrorServerComponent } from '../forms/Error.js'\nimport type {\n ClientFieldBase,\n FieldClientComponent,\n FieldPaths,\n FieldServerComponent,\n ServerFieldBase,\n} from '../forms/Field.js'\nimport type {\n FieldDescriptionClientComponent,\n FieldDescriptionServerComponent,\n FieldDiffClientComponent,\n FieldDiffServerComponent,\n FieldLabelClientComponent,\n FieldLabelServerComponent,\n} from '../types.js'\n\ntype UploadFieldClientWithoutType = MarkOptional<UploadFieldClient, 'type'>\n\ntype UploadFieldBaseClientProps = {\n readonly path: string\n readonly validate?: UploadFieldValidation\n}\n\ntype UploadFieldBaseServerProps = Pick<FieldPaths, 'path'>\n\nexport type UploadFieldClientProps = ClientFieldBase<UploadFieldClientWithoutType> &\n UploadFieldBaseClientProps\n\nexport type UploadFieldServerProps = ServerFieldBase<UploadField, UploadFieldClientWithoutType> &\n UploadFieldBaseServerProps\n\nexport type UploadFieldServerComponent = FieldServerComponent<\n UploadField,\n UploadFieldClientWithoutType,\n UploadFieldBaseServerProps\n>\n\nexport type UploadFieldClientComponent = FieldClientComponent<\n UploadFieldClientWithoutType,\n UploadFieldBaseClientProps\n>\n\nexport type UploadFieldLabelServerComponent = FieldLabelServerComponent<\n UploadField,\n UploadFieldClientWithoutType\n>\n\nexport type UploadFieldLabelClientComponent =\n FieldLabelClientComponent<UploadFieldClientWithoutType>\n\nexport type UploadFieldDescriptionServerComponent = FieldDescriptionServerComponent<\n UploadField,\n UploadFieldClientWithoutType\n>\n\nexport type UploadFieldDescriptionClientComponent =\n FieldDescriptionClientComponent<UploadFieldClientWithoutType>\n\nexport type UploadFieldErrorServerComponent = FieldErrorServerComponent<\n UploadField,\n UploadFieldClientWithoutType\n>\n\nexport type UploadFieldErrorClientComponent =\n FieldErrorClientComponent<UploadFieldClientWithoutType>\n\nexport type UploadFieldDiffServerComponent = FieldDiffServerComponent<\n UploadField,\n UploadFieldClient\n>\n\nexport type UploadFieldDiffClientComponent = FieldDiffClientComponent<UploadFieldClient>\n"],"names":[],"mappings":"AA4EA,WAAwF"}

View File

@@ -0,0 +1,27 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.typeFromAST = typeFromAST;
var _kinds = require('../language/kinds.js');
var _definition = require('../type/definition.js');
function typeFromAST(schema, typeNode) {
switch (typeNode.kind) {
case _kinds.Kind.LIST_TYPE: {
const innerType = typeFromAST(schema, typeNode.type);
return innerType && new _definition.GraphQLList(innerType);
}
case _kinds.Kind.NON_NULL_TYPE: {
const innerType = typeFromAST(schema, typeNode.type);
return innerType && new _definition.GraphQLNonNull(innerType);
}
case _kinds.Kind.NAMED_TYPE:
return schema.getType(typeNode.name.value);
}
}

View File

@@ -0,0 +1,222 @@
"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 insert_exports = {};
__export(insert_exports, {
GelInsertBase: () => GelInsertBase,
GelInsertBuilder: () => GelInsertBuilder
});
module.exports = __toCommonJS(insert_exports);
var import_entity = require("../../entity.cjs");
var import_query_promise = require("../../query-promise.cjs");
var import_sql = require("../../sql/sql.cjs");
var import_table = require("../../table.cjs");
var import_tracing = require("../../tracing.cjs");
var import_utils = require("../../utils.cjs");
var import_utils2 = require("../utils.cjs");
var import_query_builder = require("./query-builder.cjs");
class GelInsertBuilder {
constructor(table, session, dialect, withList, overridingSystemValue_) {
this.table = table;
this.session = session;
this.dialect = dialect;
this.withList = withList;
this.overridingSystemValue_ = overridingSystemValue_;
}
static [import_entity.entityKind] = "GelInsertBuilder";
authToken;
/** @internal */
setToken(token) {
this.authToken = token;
return this;
}
overridingSystemValue() {
this.overridingSystemValue_ = true;
return this;
}
values(values) {
values = Array.isArray(values) ? values : [values];
if (values.length === 0) {
throw new Error("values() must be called with at least one value");
}
const mappedValues = values.map((entry) => {
const result = {};
const cols = this.table[import_table.Table.Symbol.Columns];
for (const colKey of Object.keys(entry)) {
const colValue = entry[colKey];
result[colKey] = (0, import_entity.is)(colValue, import_sql.SQL) ? colValue : new import_sql.Param(colValue, cols[colKey]);
}
return result;
});
return new GelInsertBase(
this.table,
mappedValues,
this.session,
this.dialect,
this.withList,
false,
this.overridingSystemValue_
);
}
select(selectQuery) {
const select = typeof selectQuery === "function" ? selectQuery(new import_query_builder.QueryBuilder()) : selectQuery;
if (!(0, import_entity.is)(select, import_sql.SQL) && !(0, import_utils.haveSameKeys)(this.table[import_table.Columns], select._.selectedFields)) {
throw new Error(
"Insert select error: selected fields are not the same or are in a different order compared to the table definition"
);
}
return new GelInsertBase(this.table, select, this.session, this.dialect, this.withList, true);
}
}
class GelInsertBase extends import_query_promise.QueryPromise {
constructor(table, values, session, dialect, withList, select, overridingSystemValue_) {
super();
this.session = session;
this.dialect = dialect;
this.config = { table, values, withList, select, overridingSystemValue_ };
}
static [import_entity.entityKind] = "GelInsert";
config;
returning(fields = this.config.table[import_table.Table.Symbol.Columns]) {
this.config.returning = (0, import_utils.orderSelectedFields)(fields);
return this;
}
/**
* Adds an `on conflict do nothing` clause to the query.
*
* Calling this method simply avoids inserting a row as its alternative action.
*
* See docs: {@link https://orm.drizzle.team/docs/insert#on-conflict-do-nothing}
*
* @param config The `target` and `where` clauses.
*
* @example
* ```ts
* // Insert one row and cancel the insert if there's a conflict
* await db.insert(cars)
* .values({ id: 1, brand: 'BMW' })
* .onConflictDoNothing();
*
* // Explicitly specify conflict target
* await db.insert(cars)
* .values({ id: 1, brand: 'BMW' })
* .onConflictDoNothing({ target: cars.id });
* ```
*/
// TODO not supported
// onConflictDoNothing(
// config: { target?: IndexColumn | IndexColumn[]; where?: SQL } = {},
// ): GelInsertWithout<this, TDynamic, 'onConflictDoNothing' | 'onConflictDoUpdate'> {
// if (config.target === undefined) {
// this.config.onConflict = sql`do nothing`;
// } else {
// let targetColumn = '';
// targetColumn = Array.isArray(config.target)
// ? config.target.map((it) => this.dialect.escapeName(this.dialect.casing.getColumnCasing(it))).join(',')
// : this.dialect.escapeName(this.dialect.casing.getColumnCasing(config.target));
// const whereSql = config.where ? sql` where ${config.where}` : undefined;
// this.config.onConflict = sql`(${sql.raw(targetColumn)})${whereSql} do nothing`;
// }
// return this as any;
// }
/**
* Adds an `on conflict do update` clause to the query.
*
* Calling this method will update the existing row that conflicts with the row proposed for insertion as its alternative action.
*
* See docs: {@link https://orm.drizzle.team/docs/insert#upserts-and-conflicts}
*
* @param config The `target`, `set` and `where` clauses.
*
* @example
* ```ts
* // Update the row if there's a conflict
* await db.insert(cars)
* .values({ id: 1, brand: 'BMW' })
* .onConflictDoUpdate({
* target: cars.id,
* set: { brand: 'Porsche' }
* });
*
* // Upsert with 'where' clause
* await db.insert(cars)
* .values({ id: 1, brand: 'BMW' })
* .onConflictDoUpdate({
* target: cars.id,
* set: { brand: 'newBMW' },
* targetWhere: sql`${cars.createdAt} > '2023-01-01'::date`,
* });
* ```
*/
// TODO not supported
// onConflictDoUpdate(
// config: GelInsertOnConflictDoUpdateConfig<this>,
// ): GelInsertWithout<this, TDynamic, 'onConflictDoNothing' | 'onConflictDoUpdate'> {
// if (config.where && (config.targetWhere || config.setWhere)) {
// throw new Error(
// 'You cannot use both "where" and "targetWhere"/"setWhere" at the same time - "where" is deprecated, use "targetWhere" or "setWhere" instead.',
// );
// }
// const whereSql = config.where ? sql` where ${config.where}` : undefined;
// const targetWhereSql = config.targetWhere ? sql` where ${config.targetWhere}` : undefined;
// const setWhereSql = config.setWhere ? sql` where ${config.setWhere}` : undefined;
// const setSql = this.dialect.buildUpdateSet(this.config.table, mapUpdateSet(this.config.table, config.set));
// let targetColumn = '';
// targetColumn = Array.isArray(config.target)
// ? config.target.map((it) => this.dialect.escapeName(this.dialect.casing.getColumnCasing(it))).join(',')
// : this.dialect.escapeName(this.dialect.casing.getColumnCasing(config.target));
// this.config.onConflict = sql`(${
// sql.raw(targetColumn)
// })${targetWhereSql} do update set ${setSql}${whereSql}${setWhereSql}`;
// return this as any;
// }
/** @internal */
getSQL() {
return this.dialect.buildInsertQuery(this.config);
}
toSQL() {
const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());
return rest;
}
/** @internal */
_prepare(name) {
return import_tracing.tracer.startActiveSpan("drizzle.prepareQuery", () => {
return this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()), this.config.returning, name, true, void 0, {
type: "insert",
tables: (0, import_utils2.extractUsedTable)(this.config.table)
});
});
}
prepare(name) {
return this._prepare(name);
}
execute = (placeholderValues) => {
return import_tracing.tracer.startActiveSpan("drizzle.operation", () => {
return this._prepare().execute(placeholderValues);
});
};
$dynamic() {
return this;
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
GelInsertBase,
GelInsertBuilder
});
//# sourceMappingURL=insert.cjs.map

View File

@@ -0,0 +1,36 @@
/*
* 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.
*/
// Updates to this file should also be replicated to @opentelemetry/api and
// @opentelemetry/core too.
/**
* - globalThis (New standard)
* - self (Will return the current window instance for supported browsers)
* - window (fallback for older browser implementations)
* - global (NodeJS implementation)
* - <object> (When all else fails)
*/
/** only globals that common to node and browsers are allowed */
// eslint-disable-next-line n/no-unsupported-features/es-builtins, no-undef
export const _globalThis = typeof globalThis === 'object'
? globalThis
: typeof self === 'object'
? self
: typeof window === 'object'
? window
: typeof global === 'object'
? global
: {};
//# sourceMappingURL=globalThis.js.map

View File

@@ -0,0 +1,71 @@
export const reducer = (state, action) => {
let newState = Object.assign({}, state);
const { type, payload, } = action;
switch (type) {
case 'UPDATE_MODAL': {
const { slug, } = payload;
if (slug) {
newState[slug] = Object.assign(Object.assign({}, newState[slug]), payload);
}
break;
}
case 'OPEN_MODAL': {
const { slug, } = payload;
if (slug) {
const isCurrentlyOpen = slug in newState && newState[slug].isOpen;
if (!isCurrentlyOpen) {
newState[slug] = Object.assign(Object.assign({}, newState[slug]), { slug, openedOn: Date.now(), isOpen: true });
}
}
break;
}
case 'TOGGLE_MODAL': {
const { slug, } = payload;
if (slug) {
const isCurrentlyOpen = slug in newState && newState[slug].isOpen;
newState[slug] = Object.assign(Object.assign({}, newState[slug]), { slug, openedOn: !isCurrentlyOpen ? Date.now() : undefined, isOpen: !isCurrentlyOpen });
}
break;
}
case 'CLOSE_MODAL': {
const { slug, } = payload;
if (slug) {
newState[slug] = Object.assign(Object.assign({}, newState[slug]), { slug, openedOn: undefined, isOpen: false });
}
break;
}
case 'REMOVE_MODAL': {
const { slug, } = payload;
if (slug && slug in newState) {
delete newState[slug];
}
break;
}
case 'CLOSE_LATEST_MODAL': {
const latestModal = Object.keys(newState)
.reduce((acc, slug) => {
const modal = newState[slug];
if (modal.isOpen && typeof modal.openedOn === 'number' && (!acc || (typeof acc.openedOn === 'number' && modal.openedOn > acc.openedOn))) {
return modal;
}
return acc;
}, undefined);
if (latestModal) {
newState[latestModal.slug] = Object.assign(Object.assign({}, newState[latestModal.slug]), { isOpen: false, openedOn: undefined });
}
break;
}
case 'CLOSE_ALL_MODALS': {
newState = Object.entries((newState)).reduce((acc, [key, value]) => {
acc[key] = Object.assign(Object.assign({}, value), { isOpen: false, openedOn: undefined });
return acc;
}, {});
break;
}
default: {
break;
}
}
return newState;
};
//# sourceMappingURL=reducer.js.map

View File

@@ -0,0 +1,156 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isConfirmChannelTracing = exports.unmarkConfirmChannelTracing = exports.markConfirmChannelTracing = exports.getConnectionAttributesFromUrl = exports.getConnectionAttributesFromServer = exports.normalizeExchange = exports.CONNECTION_ATTRIBUTES = exports.CHANNEL_CONSUME_TIMEOUT_TIMER = exports.CHANNEL_SPANS_NOT_ENDED = exports.MESSAGE_STORED_SPAN = 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.
*/
const api_1 = require("@opentelemetry/api");
const instrumentation_1 = require("@opentelemetry/instrumentation");
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
const semconv_1 = require("./semconv");
const semconv_obsolete_1 = require("../src/semconv-obsolete");
exports.MESSAGE_STORED_SPAN = Symbol('opentelemetry.amqplib.message.stored-span');
exports.CHANNEL_SPANS_NOT_ENDED = Symbol('opentelemetry.amqplib.channel.spans-not-ended');
exports.CHANNEL_CONSUME_TIMEOUT_TIMER = Symbol('opentelemetry.amqplib.channel.consumer-timeout-timer');
exports.CONNECTION_ATTRIBUTES = Symbol('opentelemetry.amqplib.connection.attributes');
const IS_CONFIRM_CHANNEL_CONTEXT_KEY = (0, api_1.createContextKey)('opentelemetry.amqplib.channel.is-confirm-channel');
const normalizeExchange = (exchangeName) => exchangeName !== '' ? exchangeName : '<default>';
exports.normalizeExchange = normalizeExchange;
const censorPassword = (url) => {
return url.replace(/:[^:@/]*@/, ':***@');
};
const getPort = (portFromUrl, resolvedProtocol) => {
// we are using the resolved protocol which is upper case
// this code mimic the behavior of the amqplib which is used to set connection params
return portFromUrl || (resolvedProtocol === 'AMQP' ? 5672 : 5671);
};
const getProtocol = (protocolFromUrl) => {
const resolvedProtocol = protocolFromUrl || 'amqp';
// the substring removed the ':' part of the protocol ('amqp:' -> 'amqp')
const noEndingColon = resolvedProtocol.endsWith(':')
? resolvedProtocol.substring(0, resolvedProtocol.length - 1)
: resolvedProtocol;
// upper cases to match spec
return noEndingColon.toUpperCase();
};
const getHostname = (hostnameFromUrl) => {
// if user supplies empty hostname, it gets forwarded to 'net' package which default it to localhost.
// https://nodejs.org/docs/latest-v12.x/api/net.html#net_socket_connect_options_connectlistener
return hostnameFromUrl || 'localhost';
};
const extractConnectionAttributeOrLog = (url, attributeKey, attributeValue, nameForLog) => {
if (attributeValue) {
return { [attributeKey]: attributeValue };
}
else {
api_1.diag.error(`amqplib instrumentation: could not extract connection attribute ${nameForLog} from user supplied url`, {
url,
});
return {};
}
};
const getConnectionAttributesFromServer = (conn) => {
const product = conn.serverProperties.product?.toLowerCase?.();
if (product) {
return {
[semconv_1.ATTR_MESSAGING_SYSTEM]: product,
};
}
else {
return {};
}
};
exports.getConnectionAttributesFromServer = getConnectionAttributesFromServer;
const getConnectionAttributesFromUrl = (url, netSemconvStability) => {
const attributes = {
[semconv_obsolete_1.ATTR_MESSAGING_PROTOCOL_VERSION]: '0.9.1', // this is the only protocol supported by the instrumented library
};
url = url || 'amqp://localhost';
if (typeof url === 'object') {
const connectOptions = url;
const protocol = getProtocol(connectOptions?.protocol);
Object.assign(attributes, {
...extractConnectionAttributeOrLog(url, semconv_obsolete_1.ATTR_MESSAGING_PROTOCOL, protocol, 'protocol'),
});
const hostname = getHostname(connectOptions?.hostname);
if (netSemconvStability & instrumentation_1.SemconvStability.OLD) {
Object.assign(attributes, {
...extractConnectionAttributeOrLog(url, semconv_1.ATTR_NET_PEER_NAME, hostname, 'hostname'),
});
}
if (netSemconvStability & instrumentation_1.SemconvStability.STABLE) {
Object.assign(attributes, {
...extractConnectionAttributeOrLog(url, semantic_conventions_1.ATTR_SERVER_ADDRESS, hostname, 'hostname'),
});
}
const port = getPort(connectOptions.port, protocol);
if (netSemconvStability & instrumentation_1.SemconvStability.OLD) {
Object.assign(attributes, extractConnectionAttributeOrLog(url, semconv_1.ATTR_NET_PEER_PORT, port, 'port'));
}
if (netSemconvStability & instrumentation_1.SemconvStability.STABLE) {
Object.assign(attributes, extractConnectionAttributeOrLog(url, semantic_conventions_1.ATTR_SERVER_PORT, port, 'port'));
}
}
else {
const censoredUrl = censorPassword(url);
attributes[semconv_obsolete_1.ATTR_MESSAGING_URL] = censoredUrl;
try {
const urlParts = new URL(censoredUrl);
const protocol = getProtocol(urlParts.protocol);
Object.assign(attributes, {
...extractConnectionAttributeOrLog(censoredUrl, semconv_obsolete_1.ATTR_MESSAGING_PROTOCOL, protocol, 'protocol'),
});
const hostname = getHostname(urlParts.hostname);
if (netSemconvStability & instrumentation_1.SemconvStability.OLD) {
Object.assign(attributes, {
...extractConnectionAttributeOrLog(censoredUrl, semconv_1.ATTR_NET_PEER_NAME, hostname, 'hostname'),
});
}
if (netSemconvStability & instrumentation_1.SemconvStability.STABLE) {
Object.assign(attributes, {
...extractConnectionAttributeOrLog(censoredUrl, semantic_conventions_1.ATTR_SERVER_ADDRESS, hostname, 'hostname'),
});
}
const port = getPort(urlParts.port ? parseInt(urlParts.port) : undefined, protocol);
if (netSemconvStability & instrumentation_1.SemconvStability.OLD) {
Object.assign(attributes, extractConnectionAttributeOrLog(censoredUrl, semconv_1.ATTR_NET_PEER_PORT, port, 'port'));
}
if (netSemconvStability & instrumentation_1.SemconvStability.STABLE) {
Object.assign(attributes, extractConnectionAttributeOrLog(censoredUrl, semantic_conventions_1.ATTR_SERVER_PORT, port, 'port'));
}
}
catch (err) {
api_1.diag.error('amqplib instrumentation: error while extracting connection details from connection url', {
censoredUrl,
err,
});
}
}
return attributes;
};
exports.getConnectionAttributesFromUrl = getConnectionAttributesFromUrl;
const markConfirmChannelTracing = (context) => {
return context.setValue(IS_CONFIRM_CHANNEL_CONTEXT_KEY, true);
};
exports.markConfirmChannelTracing = markConfirmChannelTracing;
const unmarkConfirmChannelTracing = (context) => {
return context.deleteValue(IS_CONFIRM_CHANNEL_CONTEXT_KEY);
};
exports.unmarkConfirmChannelTracing = unmarkConfirmChannelTracing;
const isConfirmChannelTracing = (context) => {
return context.getValue(IS_CONFIRM_CHANNEL_CONTEXT_KEY) === true;
};
exports.isConfirmChannelTracing = isConfirmChannelTracing;
//# sourceMappingURL=utils.js.map

View File

@@ -0,0 +1,35 @@
import type * as core from "./core.js";
import type { $ZodType } from "./schemas.js";
export declare const $output: unique symbol;
export type $output = typeof $output;
export declare const $input: unique symbol;
export type $input = typeof $input;
export type $replace<Meta, S extends $ZodType> = Meta extends $output ? core.output<S> : Meta extends $input ? core.input<S> : Meta extends (infer M)[] ? $replace<M, S>[] : Meta extends (...args: infer P) => infer R ? (...args: {
[K in keyof P]: $replace<P[K], S>;
}) => $replace<R, S> : Meta extends object ? {
[K in keyof Meta]: $replace<Meta[K], S>;
} : Meta;
type MetadataType = Record<string, unknown> | undefined;
export declare class $ZodRegistry<Meta extends MetadataType = MetadataType, Schema extends $ZodType = $ZodType> {
_meta: Meta;
_schema: Schema;
_map: Map<Schema, $replace<Meta, Schema>>;
_idmap: Map<string, Schema>;
add<S extends Schema>(schema: S, ..._meta: undefined extends Meta ? [$replace<Meta, S>?] : [$replace<Meta, S>]): this;
clear(): this;
remove(schema: Schema): this;
get<S extends Schema>(schema: S): $replace<Meta, S> | undefined;
has(schema: Schema): boolean;
}
export interface JSONSchemaMeta {
id?: string | undefined;
title?: string | undefined;
description?: string | undefined;
deprecated?: boolean | undefined;
[k: string]: unknown;
}
export interface GlobalMeta extends JSONSchemaMeta {
}
export declare function registry<T extends MetadataType = MetadataType, S extends $ZodType = $ZodType>(): $ZodRegistry<T, S>;
export declare const globalRegistry: $ZodRegistry<GlobalMeta>;
export {};

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["c","_c","React","ExternalLinkIcon","usePreviewURL","useTranslation","baseClass","PreviewButton","props","$","previewURL","t","t0","_jsx","className","href","id","target","title","children"],"sources":["../../../src/elements/PreviewButton/index.tsx"],"sourcesContent":["'use client'\nimport type { PreviewButtonClientProps } from 'payload'\n\nimport React from 'react'\n\nimport { ExternalLinkIcon } from '../../icons/ExternalLink/index.js'\nimport './index.scss'\nimport { usePreviewURL } from '../../providers/LivePreview/context.js'\nimport { useTranslation } from '../../providers/Translation/index.js'\n\nconst baseClass = 'preview-btn'\n\nexport function PreviewButton(props: PreviewButtonClientProps) {\n const { previewURL } = usePreviewURL()\n const { t } = useTranslation()\n\n if (!previewURL) {\n return null\n }\n\n return (\n <a\n aria-label={t('version:preview')}\n className={baseClass}\n href={previewURL}\n id=\"preview-button\"\n target=\"_blank\"\n title={t('version:preview')}\n >\n <ExternalLinkIcon />\n </a>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,OAAOC,KAAA,MAAW;AAElB,SAASC,gBAAgB,QAAQ;AACjC,OAAO;AACP,SAASC,aAAa,QAAQ;AAC9B,SAASC,cAAc,QAAQ;AAE/B,MAAMC,SAAA,GAAY;AAElB,OAAO,SAAAC,cAAAC,KAAA;EAAA,MAAAC,CAAA,GAAAR,EAAA;EACL;IAAAS;EAAA,IAAuBN,aAAA;EACvB;IAAAO;EAAA,IAAcN,cAAA;EAAA,KAETK,UAAA;IAAA;EAAA;EAAA,IAAAE,EAAA;EAAA,IAAAH,CAAA,QAAAC,UAAA,IAAAD,CAAA,QAAAE,CAAA;IAKHC,EAAA,GAAAC,IAAA,CAAC;MAAA,cACaF,CAAA,CAAE;MAAAG,SAAA,EAAAR,SAAA;MAAAS,IAAA,EAERL,UAAA;MAAAM,EAAA,EACH;MAAAC,MAAA,EACI;MAAAC,KAAA,EACAP,CAAA,CAAE;MAAAQ,QAAA,EAETN,IAAA,CAAAV,gBAAA,IAAC;IAAA,C;;;;;;;SARHS,E","ignoreList":[]}

View File

@@ -0,0 +1,18 @@
/**
* @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 GitCompare = createLucideIcon("GitCompare", [
["circle", { cx: "18", cy: "18", r: "3", key: "1xkwt0" }],
["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
["path", { d: "M13 6h3a2 2 0 0 1 2 2v7", key: "1yeb86" }],
["path", { d: "M11 18H8a2 2 0 0 1-2-2V9", key: "19pyzm" }]
]);
export { GitCompare as default };
//# sourceMappingURL=git-compare.js.map

View File

@@ -0,0 +1,17 @@
import { wrapInternalEndpoints } from '../../utilities/wrapInternalEndpoints.js';
import { getFileHandler } from './getFile.js';
import { getFileFromURLHandler } from './getFileFromURL.js';
export const uploadCollectionEndpoints = wrapInternalEndpoints([
{
handler: getFileFromURLHandler,
method: 'get',
path: '/paste-url/:id?'
},
{
handler: getFileHandler,
method: 'get',
path: '/file/:filename'
}
]);
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,83 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.transform = transform;
var t = require("../../index"); // func and call_indirect instructions can either define a signature inline, or
// reference a signature, e.g.
//
// ;; inline signature
// (func (result i64)
// (i64.const 2)
// )
// ;; signature reference
// (type (func (result i64)))
// (func (type 0)
// (i64.const 2))
// )
//
// this AST transform denormalises the type references, making all signatures within the module
// inline.
function transform(ast) {
var typeInstructions = [];
t.traverse(ast, {
TypeInstruction: function TypeInstruction(_ref) {
var node = _ref.node;
typeInstructions.push(node);
}
});
if (!typeInstructions.length) {
return;
}
function denormalizeSignature(signature) {
// signature referenced by identifier
if (signature.type === "Identifier") {
var identifier = signature;
var typeInstruction = typeInstructions.find(function (t) {
return t.id.type === identifier.type && t.id.value === identifier.value;
});
if (!typeInstruction) {
throw new Error("A type instruction reference was not found ".concat(JSON.stringify(signature)));
}
return typeInstruction.functype;
} // signature referenced by index
if (signature.type === "NumberLiteral") {
var signatureRef = signature;
var _typeInstruction = typeInstructions[signatureRef.value];
return _typeInstruction.functype;
}
return signature;
}
t.traverse(ast, {
Func: function (_Func) {
function Func(_x) {
return _Func.apply(this, arguments);
}
Func.toString = function () {
return _Func.toString();
};
return Func;
}(function (_ref2) {
var node = _ref2.node;
node.signature = denormalizeSignature(node.signature);
}),
CallIndirectInstruction: function CallIndirectInstruction(_ref3) {
var node = _ref3.node;
node.signature = denormalizeSignature(node.signature);
}
});
}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/fields/setDefaultBeforeDuplicate.ts"],"sourcesContent":["// @ts-strict-ignore\n// default beforeDuplicate hook for required and unique fields\nimport { type FieldAffectingData, type FieldHook, fieldShouldBeLocalized } from './config/types.js'\n\nconst isStringValue = (value: unknown) => typeof value === 'string' && value.trim() !== ''\nconst unique: FieldHook = ({ value }) => (isStringValue(value) ? `${value} - Copy` : undefined)\nconst localizedUnique: FieldHook = ({ req, value }) =>\n isStringValue(value) ? `${value} - ${req?.t('general:copy') ?? 'Copy'}` : undefined\n\nexport const setDefaultBeforeDuplicate = (\n field: FieldAffectingData,\n parentIsLocalized: boolean,\n) => {\n if (\n (('required' in field && field.required) || field.unique) &&\n 'hooks' in field &&\n (!field.hooks?.beforeDuplicate ||\n (Array.isArray(field.hooks.beforeDuplicate) && field.hooks.beforeDuplicate.length === 0))\n ) {\n if (field.unique) {\n if (['email', 'number', 'point', 'relationship', 'select', 'upload'].includes(field.type)) {\n field.hooks!.beforeDuplicate = [() => undefined]\n } else if (['code', 'json', 'text', 'textarea'].includes(field.type)) {\n field.hooks!.beforeDuplicate = fieldShouldBeLocalized({ field, parentIsLocalized })\n ? [localizedUnique]\n : [unique]\n }\n }\n }\n}\n"],"names":["fieldShouldBeLocalized","isStringValue","value","trim","unique","undefined","localizedUnique","req","t","setDefaultBeforeDuplicate","field","parentIsLocalized","required","hooks","beforeDuplicate","Array","isArray","length","includes","type"],"mappings":"AAAA,oBAAoB;AACpB,8DAA8D;AAC9D,SAAkDA,sBAAsB,QAAQ,oBAAmB;AAEnG,MAAMC,gBAAgB,CAACC,QAAmB,OAAOA,UAAU,YAAYA,MAAMC,IAAI,OAAO;AACxF,MAAMC,SAAoB,CAAC,EAAEF,KAAK,EAAE,GAAMD,cAAcC,SAAS,GAAGA,MAAM,OAAO,CAAC,GAAGG;AACrF,MAAMC,kBAA6B,CAAC,EAAEC,GAAG,EAAEL,KAAK,EAAE,GAChDD,cAAcC,SAAS,GAAGA,MAAM,GAAG,EAAEK,KAAKC,EAAE,mBAAmB,QAAQ,GAAGH;AAE5E,OAAO,MAAMI,4BAA4B,CACvCC,OACAC;IAEA,IACE,AAAC,CAAA,AAAC,cAAcD,SAASA,MAAME,QAAQ,IAAKF,MAAMN,MAAM,AAAD,KACvD,WAAWM,SACV,CAAA,CAACA,MAAMG,KAAK,EAAEC,mBACZC,MAAMC,OAAO,CAACN,MAAMG,KAAK,CAACC,eAAe,KAAKJ,MAAMG,KAAK,CAACC,eAAe,CAACG,MAAM,KAAK,CAAC,GACzF;QACA,IAAIP,MAAMN,MAAM,EAAE;YAChB,IAAI;gBAAC;gBAAS;gBAAU;gBAAS;gBAAgB;gBAAU;aAAS,CAACc,QAAQ,CAACR,MAAMS,IAAI,GAAG;gBACzFT,MAAMG,KAAK,CAAEC,eAAe,GAAG;oBAAC,IAAMT;iBAAU;YAClD,OAAO,IAAI;gBAAC;gBAAQ;gBAAQ;gBAAQ;aAAW,CAACa,QAAQ,CAACR,MAAMS,IAAI,GAAG;gBACpET,MAAMG,KAAK,CAAEC,eAAe,GAAGd,uBAAuB;oBAAEU;oBAAOC;gBAAkB,KAC7E;oBAACL;iBAAgB,GACjB;oBAACF;iBAAO;YACd;QACF;IACF;AACF,EAAC"}

View File

@@ -0,0 +1,153 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.renderAuditResultsToHTML = void 0;
/**
* Renders the provided audit results to well-formatted and valid HTML.
*
* Do note that the rendered result is not an HTML document, it's rather
* just a component with results.
*/
async function renderAuditResultsToHTML(results) {
const grouped = {
total: 0,
ok: [],
notice: [],
warn: [],
error: [],
};
for (const result of results) {
grouped.total++;
if (result.status === 'ok') {
grouped[result.status].push(result);
}
else {
grouped[result.status].push(result);
}
}
let report = '<i>* This report was auto-generated by graphql-http</i>\n';
report += '\n';
report += '<h1>GraphQL over HTTP audit report</h1>\n';
report += '\n';
report += '<ul>\n';
report += `<li><b>${grouped.total}</b> audits in total</li>\n`;
// font-family: monospace helps render native emojis in HTML
if (grouped.ok.length) {
report += `<li><span style="font-family: monospace">✅</span> <b>${grouped.ok.length}</b> pass</li>\n`;
}
if (grouped.notice.length) {
report += `<li><span style="font-family: monospace">💡</span> <b>${grouped.notice.length}</b> notices (suggestions)</li>\n`;
}
if (grouped.warn.length) {
report += `<li><span style="font-family: monospace">❗️</span> <b>${grouped.warn.length}</b> warnings (optional)</li>\n`;
}
if (grouped.error.length) {
report += `<li><span style="font-family: monospace">❌</span> <b>${grouped.error.length}</b> errors (required)</li>\n`;
}
report += '</ul>\n';
report += '\n';
if (grouped.ok.length) {
report += '<h2>Passing</h2>\n';
report += '<ol>\n';
for (const [, result] of grouped.ok.entries()) {
report += `<li><code>${result.id}</code> ${result.name}</li>\n`;
}
report += '</ol>\n';
report += '\n';
}
if (grouped.notice.length) {
report += `<h2>Notices</h2>\n`;
report +=
'The server <i>MAY</i> support these, but are truly optional. These are suggestions following recommended conventions.\n';
report += '<ol>\n';
for (const [, result] of grouped.notice.entries()) {
report += await printAuditFail(result);
}
report += '</ol>\n';
report += '\n';
}
if (grouped.warn.length) {
report += `<h2>Warnings</h2>\n`;
report += 'The server <i>SHOULD</i> support these, but is not required.\n';
report += '<ol>\n';
for (const [, result] of grouped.warn.entries()) {
report += await printAuditFail(result);
}
report += '</ol>\n';
report += '\n';
}
if (grouped.error.length) {
report += `<h2>Errors</h2>\n`;
report += 'The server <b>MUST</b> support these.\n';
report += '<ol>\n';
for (const [, result] of grouped.error.entries()) {
report += await printAuditFail(result);
}
report += '</ol>\n';
}
return report;
}
exports.renderAuditResultsToHTML = renderAuditResultsToHTML;
async function printAuditFail(result) {
var _a;
let report = '';
report += `<li><code>${result.id}</code> ${result.name}\n`;
report += '<details>\n';
report += `<summary>${truncate(result.reason)}</summary>\n`;
report += '<pre><code class="lang-json">'; // no "\n" because they count in HTML pre tags
const res = result.response;
const headers = {};
for (const [key, val] of res.headers.entries()) {
// some headers change on each run, dont report it
if (key === 'date') {
headers[key] = '<timestamp>';
}
else if (['cf-ray', 'server-timing', 'set-cookie'].includes(key)) {
headers[key] = '<omitted>';
}
else {
headers[key] = val;
}
}
let text = '', json;
try {
text = await res.text();
json = JSON.parse(text);
// is json, there shouldnt be nothing to sanitize (hopefully)
}
catch (_b) {
// is not json, avoid rendering html (rest is allowed)
if ((_a = res.headers.get('content-type')) === null || _a === void 0 ? void 0 : _a.includes('text/html')) {
text = '<html omitted>';
}
}
const stringified = JSON.stringify({
status: res.status,
statusText: res.statusText,
headers,
body: json || ((text === null || text === void 0 ? void 0 : text.length) > 5120 ? '<body is too long>' : text) || null,
}, (_k, v) => {
if (v != null && typeof v === 'object' && !Array.isArray(v)) {
// sort object fields for stable stringify
const acc = {};
return Object.keys(v)
.sort()
.reverse() // body on bottom
.reduce((acc, k) => {
acc[k] = v[k];
return acc;
}, acc);
}
return v;
}, 2);
report += stringified + '\n';
report += '</code></pre>\n';
report += '</details>\n';
report += '</li>\n';
return report;
}
function truncate(str, len = 1024) {
if (str.length > len) {
return str.substring(0, len) + '...';
}
return str;
}

View File

@@ -0,0 +1,21 @@
import { Span } from '../../types-hoist/span';
import { AnthropicAiInstrumentedMethod, AnthropicAiResponse } from './types';
/**
* Check if a method path should be instrumented
*/
export declare function shouldInstrument(methodPath: string): methodPath is AnthropicAiInstrumentedMethod;
/**
* Set the messages and messages original length attributes.
* Extracts system instructions before truncation.
*/
export declare function setMessagesAttribute(span: Span, messages: unknown): void;
/**
* Capture error information from the response
* @see https://docs.anthropic.com/en/api/errors#error-shapes
*/
export declare function handleResponseError(span: Span, response: AnthropicAiResponse): void;
/**
* Include the system prompt in the messages list, if available
*/
export declare function messagesFromParams(params: Record<string, unknown>): unknown[];
//# sourceMappingURL=utils.d.ts.map

View File

@@ -0,0 +1,46 @@
export { escapeStringForRegex } from '../vendor/escapeStringForRegex';
/**
* Truncates given string to the maximum characters count
*
* @param str An object that contains serializable values
* @param max Maximum number of characters in truncated string (0 = unlimited)
* @returns string Encoded
*/
export declare function truncate(str: string, max?: number): string;
/**
* This is basically just `trim_line` from
* https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67
*
* @param str An object that contains serializable values
* @param max Maximum number of characters in truncated string
* @returns string Encoded
*/
export declare function snipLine(line: string, colno: number): string;
/**
* Join values in array
* @param input array of values to be joined together
* @param delimiter string to be placed in-between values
* @returns Joined values
*/
export declare function safeJoin(input: unknown[], delimiter?: string): string;
/**
* Checks if the given value matches a regex or string
*
* @param value The string to test
* @param pattern Either a regex or a string against which `value` will be matched
* @param requireExactStringMatch If true, `value` must match `pattern` exactly. If false, `value` will match
* `pattern` if it contains `pattern`. Only applies to string-type patterns.
*/
export declare function isMatchingPattern(value: string, pattern: RegExp | string, requireExactStringMatch?: boolean): boolean;
/**
* Test the given string against an array of strings and regexes. By default, string matching is done on a
* substring-inclusion basis rather than a strict equality basis
*
* @param testString The string to test
* @param patterns The patterns against which to test the string
* @param requireExactStringMatch If true, `testString` must match one of the given string patterns exactly in order to
* count. If false, `testString` will match a string pattern if it contains that pattern.
* @returns
*/
export declare function stringMatchesSomePattern(testString: string, patterns?: Array<string | RegExp>, requireExactStringMatch?: boolean): boolean;
//# sourceMappingURL=string.d.ts.map

View File

@@ -0,0 +1,82 @@
import { NEGATIVE_ZERO, ZERO } from "../constants.js";
import "../types/number.js";
import { invariant, repeat } from "../utils.js";
import { GetUnsignedRoundingMode } from "./GetUnsignedRoundingMode.js";
import { ToRawFixed } from "./ToRawFixed.js";
import { ToRawPrecision } from "./ToRawPrecision.js";
/**
* https://tc39.es/ecma402/#sec-formatnumberstring
*/
export function FormatNumericToString(intlObject, _x) {
let x = _x;
let sign;
// -0
if (x.isZero() && x.isNegative()) {
sign = "negative";
x = ZERO;
} else {
invariant(x.isFinite(), "NumberFormatDigitInternalSlots value is not finite");
if (x.lessThan(0)) {
sign = "negative";
} else {
sign = "positive";
}
if (sign === "negative") {
x = x.negated();
}
}
let result;
const roundingType = intlObject.roundingType;
const unsignedRoundingMode = GetUnsignedRoundingMode(intlObject.roundingMode, sign === "negative");
switch (roundingType) {
case "significantDigits":
result = ToRawPrecision(x, intlObject.minimumSignificantDigits, intlObject.maximumSignificantDigits, unsignedRoundingMode);
break;
case "fractionDigits":
result = ToRawFixed(x, intlObject.minimumFractionDigits, intlObject.maximumFractionDigits, intlObject.roundingIncrement, unsignedRoundingMode);
break;
default:
let sResult = ToRawPrecision(x, intlObject.minimumSignificantDigits, intlObject.maximumSignificantDigits, unsignedRoundingMode);
let fResult = ToRawFixed(x, intlObject.minimumFractionDigits, intlObject.maximumFractionDigits, intlObject.roundingIncrement, unsignedRoundingMode);
if (intlObject.roundingType === "morePrecision") {
if (sResult.roundingMagnitude <= fResult.roundingMagnitude) {
result = sResult;
} else {
result = fResult;
}
} else {
invariant(intlObject.roundingType === "lessPrecision", "Invalid roundingType");
if (sResult.roundingMagnitude <= fResult.roundingMagnitude) {
result = fResult;
} else {
result = sResult;
}
}
break;
}
x = result.roundedNumber;
let string = result.formattedString;
if (intlObject.trailingZeroDisplay === "stripIfInteger" && x.isInteger()) {
let i = string.indexOf(".");
if (i > -1) {
string = string.slice(0, i);
}
}
const int = result.integerDigitsCount;
const minInteger = intlObject.minimumIntegerDigits;
if (int < minInteger) {
const forwardZeros = repeat("0", minInteger - int);
string = forwardZeros + string;
}
if (sign === "negative") {
if (x.isZero()) {
x = NEGATIVE_ZERO;
} else {
x = x.negated();
}
}
return {
roundedNumber: x,
formattedString: string
};
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utilities/telemetry/conf/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAsBH,qBAAa,IAAI,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CACvE,YAAW,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;;IAG1C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA+C;IAC5E,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAkE;IAE7F,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;IAE5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;;IA6BrB,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,MAAM;IAMd;;;;OAIG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAOzB;;;;OAIG;IACH,GAAG,CAAC,GAAG,SAAS,MAAM,CAAC,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC;IAK1C;;;;;OAKG;IACH,GAAG,CAAC,GAAG,SAAS,MAAM,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,GAAG,IAAI;IA8BpE,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,gBAAgB,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAK7D,IAAI,IAAI,IAAI,MAAM,CAEjB;IACD,IAAI,KAAK,IAAI,CAAC,CAab;IAED,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC,EAMjB;CACF;AAED,MAAM,MAAM,OAAO,GAAG;IACpB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAE5B;;;;;;;;OAQG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAA;IAEhC;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAChC,CAAA;AAED,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,MAAM,CAAA;AAC/C,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,CAAA"}

View File

@@ -0,0 +1,21 @@
# picocolors
The tiniest and the fastest library for terminal output formatting with ANSI colors.
```javascript
import pc from "picocolors"
console.log(
pc.green(`How are ${pc.italic(`you`)} doing?`)
)
```
- **No dependencies.**
- **14 times** smaller and **2 times** faster than chalk.
- Used by popular tools like PostCSS, SVGO, Stylelint, and Browserslist.
- Node.js v6+ & browsers support. Support for both CJS and ESM projects.
- TypeScript type declarations included.
- [`NO_COLOR`](https://no-color.org/) friendly.
## Docs
Read **[full docs](https://github.com/alexeyraspopov/picocolors#readme)** on GitHub.

View File

@@ -0,0 +1,6 @@
/**
* Collects all child elements of an element.
*
* @param node the element
*/
export default function childElements(node: Element | null): Element[];

View File

@@ -0,0 +1,65 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const Dependency = require("../Dependency");
const makeSerializable = require("../util/makeSerializable");
/** @typedef {import("./RemoteModule").ExternalRequests} ExternalRequests */
/** @typedef {import("../serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */
/** @typedef {import("../serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */
class FallbackDependency extends Dependency {
/**
* @param {ExternalRequests} requests requests
*/
constructor(requests) {
super();
this.requests = requests;
}
/**
* @returns {string | null} an identifier to merge equal requests
*/
getResourceIdentifier() {
return `fallback ${this.requests.join(" ")}`;
}
get type() {
return "fallback";
}
get category() {
return "esm";
}
/**
* @param {ObjectSerializerContext} context context
*/
serialize(context) {
const { write } = context;
write(this.requests);
super.serialize(context);
}
/**
* @param {ObjectDeserializerContext} context context
* @returns {FallbackDependency} deserialize fallback dependency
*/
static deserialize(context) {
const { read } = context;
const obj = new FallbackDependency(read());
obj.deserialize(context);
return obj;
}
}
makeSerializable(
FallbackDependency,
"webpack/lib/container/FallbackDependency"
);
module.exports = FallbackDependency;

View File

@@ -0,0 +1 @@
{"version":3,"file":"MissingCollectionLabel.d.ts","sourceRoot":"","sources":["../../src/errors/MissingCollectionLabel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,qBAAa,sBAAuB,SAAQ,QAAQ;;CAInD"}

View File

@@ -0,0 +1,22 @@
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from 'react';
export const PayloadIcon = ({
fill: fillFromProps
}) => {
const fill = fillFromProps || 'var(--theme-elevation-1000)';
return /*#__PURE__*/_jsxs("svg", {
className: "graphic-icon",
height: "100%",
viewBox: "0 0 25 25",
width: "100%",
xmlns: "http://www.w3.org/2000/svg",
children: [/*#__PURE__*/_jsx("path", {
d: "M11.8673 21.2336L4.40922 16.9845C4.31871 16.9309 4.25837 16.8355 4.25837 16.7282V10.1609C4.25837 10.0477 4.38508 9.97616 4.48162 10.0298L13.1404 14.9642C13.2611 15.0358 13.412 14.9464 13.412 14.8093V11.6091C13.412 11.4839 13.3456 11.3647 13.2309 11.2992L2.81624 5.36353C2.72573 5.30989 2.60505 5.30989 2.51454 5.36353L1.15085 6.14422C1.06034 6.19786 1 6.29321 1 6.40048V18.5995C1 18.7068 1.06034 18.8021 1.15085 18.8558L11.8491 24.9583C11.9397 25.0119 12.0603 25.0119 12.1509 24.9583L21.1355 19.8331C21.2562 19.7616 21.2562 19.5948 21.1355 19.5232L18.3357 17.9261C18.2211 17.8605 18.0883 17.8605 17.9737 17.9261L12.175 21.2336C12.0845 21.2872 11.9638 21.2872 11.8733 21.2336H11.8673Z",
fill: fill
}), /*#__PURE__*/_jsx("path", {
d: "M22.8491 6.13827L12.1508 0.0417218C12.0603 -0.0119135 11.9397 -0.0119135 11.8491 0.0417218L6.19528 3.2658C6.0746 3.33731 6.0746 3.50418 6.19528 3.57569L8.97092 5.16091C9.08557 5.22647 9.21832 5.22647 9.33296 5.16091L11.8672 3.71872C11.9578 3.66508 12.0784 3.66508 12.1689 3.71872L19.627 7.96782C19.7175 8.02146 19.7778 8.11681 19.7778 8.22408V14.8212C19.7778 14.9464 19.8442 15.0656 19.9589 15.1311L22.7345 16.7104C22.8552 16.7819 23.006 16.6925 23.006 16.5554V6.40048C23.006 6.29321 22.9457 6.19786 22.8552 6.14423L22.8491 6.13827Z",
fill: fill
})]
});
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"arrow-up-left.js","sources":["../../../src/icons/arrow-up-left.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ArrowUpLeft\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNyAxN1Y3aDEwIiAvPgogIDxwYXRoIGQ9Ik0xNyAxNyA3IDciIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/arrow-up-left\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 ArrowUpLeft = createLucideIcon('ArrowUpLeft', [\n ['path', { d: 'M7 17V7h10', key: '11bw93' }],\n ['path', { d: 'M17 17 7 7', key: '2786uv' }],\n]);\n\nexport default ArrowUpLeft;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAAA,CAClD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,131 @@
{
"name": "@sentry/nextjs",
"version": "10.39.0",
"description": "Official Sentry SDK for Next.js",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/nextjs",
"author": "Sentry",
"license": "MIT",
"engines": {
"node": ">=18"
},
"main": "build/cjs/index.server.js",
"module": "build/esm/index.server.js",
"types": "build/types/index.types.d.ts",
"files": [
"/build"
],
"exports": {
"./package.json": "./package.json",
".": {
"types": "./build/types/index.types.d.ts",
"edge": {
"import": "./build/esm/edge/index.js",
"require": "./build/cjs/edge/index.js",
"default": "./build/esm/edge/index.js"
},
"edge-light": {
"import": "./build/esm/edge/index.js",
"require": "./build/cjs/edge/index.js",
"default": "./build/esm/edge/index.js"
},
"worker": {
"import": "./build/esm/edge/index.js",
"require": "./build/cjs/edge/index.js",
"default": "./build/esm/edge/index.js"
},
"workerd": {
"import": "./build/esm/edge/index.js",
"require": "./build/cjs/edge/index.js",
"default": "./build/esm/edge/index.js"
},
"browser": {
"import": "./build/esm/index.client.js",
"require": "./build/cjs/index.client.js"
},
"node": "./build/cjs/index.server.js",
"import": "./build/esm/index.server.js"
},
"./async-storage-shim": {
"import": {
"default": "./build/esm/config/templates/requestAsyncStorageShim.js"
},
"require": {
"default": "./build/cjs/config/templates/requestAsyncStorageShim.js"
}
},
"./import": {
"import": {
"default": "./build/import-hook.mjs"
}
},
"./loader": {
"import": {
"default": "./build/loader-hook.mjs"
}
}
},
"typesVersions": {
"<5.0": {
"build/npm/types/index.d.ts": [
"build/npm/types-ts3.8/index.d.ts"
]
}
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/semantic-conventions": "^1.37.0",
"@rollup/plugin-commonjs": "28.0.1",
"@sentry-internal/browser-utils": "10.39.0",
"@sentry/bundler-plugin-core": "^4.9.0",
"@sentry/core": "10.39.0",
"@sentry/node": "10.39.0",
"@sentry/opentelemetry": "10.39.0",
"@sentry/react": "10.39.0",
"@sentry/vercel-edge": "10.39.0",
"@sentry/webpack-plugin": "^4.8.0",
"rollup": "^4.35.0",
"stacktrace-parser": "^0.1.10"
},
"devDependencies": {
"eslint-plugin-react": "^7.31.11",
"next": "14.2.35",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"peerDependencies": {
"next": "^13.2.0 || ^14.0 || ^15.0.0-rc.0 || ^16.0.0-0"
},
"scripts": {
"build": "run-p build:transpile build:types",
"build:dev": "yarn build",
"build:transpile": "ts-node scripts/buildRollup.ts",
"build:types": "run-s build:types:core build:types:downlevel",
"build:types:core": "tsc -p tsconfig.types.json",
"build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8",
"build:watch": "run-p build:transpile:watch build:types:watch",
"build:dev:watch": "yarn build:watch",
"build:transpile:watch": "nodemon --ext ts --watch src scripts/buildRollup.ts",
"build:types:watch": "tsc -p tsconfig.types.json --watch",
"build:tarball": "npm pack",
"circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/edge/index.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts",
"clean": "rimraf build coverage sentry-nextjs-*.tgz",
"fix": "eslint . --format stylish --fix",
"lint": "eslint . --format stylish",
"lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module",
"test": "yarn test:unit",
"test:all": "run-s test:unit",
"test:unit": "vitest run",
"test:watch": "vitest --watch",
"vercel:branch": "source vercel/set-up-branch-for-test-app-use.sh",
"vercel:project": "source vercel/make-project-use-current-branch.sh",
"yalc:publish": "yalc publish --push --sig"
},
"volta": {
"extends": "../../package.json"
},
"sideEffects": false
}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/xata-http/migrator.ts"],"sourcesContent":["import { readMigrationFiles } from '~/migrator.ts';\nimport { sql } from '~/sql/sql.ts';\nimport type { XataHttpDatabase } from './driver.ts';\n\nexport interface MigrationConfig {\n\tmigrationsFolder: string;\n\tmigrationsTable?: string;\n}\n\n/**\n * This function reads migrationFolder and execute each unapplied migration and mark it as executed in database\n *\n * NOTE: The Xata HTTP driver does not support transactions. This means that if any part of a migration fails,\n * no rollback will be executed. Currently, you will need to handle unsuccessful migration yourself.\n * @param db - drizzle db instance\n * @param config - path to migration folder generated by drizzle-kit\n */ export async function migrate<TSchema extends Record<string, unknown>>(\n\tdb: XataHttpDatabase<TSchema>,\n\tconfig: MigrationConfig,\n) {\n\tconst migrations = readMigrationFiles(config);\n\tconst migrationsTable = config.migrationsTable ?? '__drizzle_migrations';\n\tconst migrationTableCreate = sql`\n\t\tCREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsTable)} (\n\t\t\tid SERIAL PRIMARY KEY,\n\t\t\thash text NOT NULL,\n\t\t\tcreated_at bigint\n\t\t)\n\t`;\n\tawait db.session.execute(migrationTableCreate);\n\n\tconst dbMigrations = await db.session.all<{\n\t\tid: number;\n\t\thash: string;\n\t\tcreated_at: string;\n\t}>(\n\t\tsql`select id, hash, created_at from ${sql.identifier(migrationsTable)} order by created_at desc limit 1`,\n\t);\n\n\tconst lastDbMigration = dbMigrations[0];\n\n\tfor await (const migration of migrations) {\n\t\tif (!lastDbMigration || Number(lastDbMigration.created_at) < migration.folderMillis) {\n\t\t\tfor (const stmt of migration.sql) {\n\t\t\t\tawait db.session.execute(sql.raw(stmt));\n\t\t\t}\n\n\t\t\tawait db.session.execute(\n\t\t\t\tsql`insert into ${\n\t\t\t\t\tsql.identifier(migrationsTable)\n\t\t\t\t} (\"hash\", \"created_at\") values(${migration.hash}, ${migration.folderMillis})`,\n\t\t\t);\n\t\t}\n\t}\n}\n"],"mappings":"AAAA,SAAS,0BAA0B;AACnC,SAAS,WAAW;AAehB,eAAsB,QACzB,IACA,QACC;AACD,QAAM,aAAa,mBAAmB,MAAM;AAC5C,QAAM,kBAAkB,OAAO,mBAAmB;AAClD,QAAM,uBAAuB;AAAA,+BACC,IAAI,WAAW,eAAe,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAM7D,QAAM,GAAG,QAAQ,QAAQ,oBAAoB;AAE7C,QAAM,eAAe,MAAM,GAAG,QAAQ;AAAA,IAKrC,uCAAuC,IAAI,WAAW,eAAe,CAAC;AAAA,EACvE;AAEA,QAAM,kBAAkB,aAAa,CAAC;AAEtC,mBAAiB,aAAa,YAAY;AACzC,QAAI,CAAC,mBAAmB,OAAO,gBAAgB,UAAU,IAAI,UAAU,cAAc;AACpF,iBAAW,QAAQ,UAAU,KAAK;AACjC,cAAM,GAAG,QAAQ,QAAQ,IAAI,IAAI,IAAI,CAAC;AAAA,MACvC;AAEA,YAAM,GAAG,QAAQ;AAAA,QAChB,kBACC,IAAI,WAAW,eAAe,CAC/B,kCAAkC,UAAU,IAAI,KAAK,UAAU,YAAY;AAAA,MAC5E;AAAA,IACD;AAAA,EACD;AACD;","names":[]}

View File

@@ -0,0 +1,6 @@
import type { ClientConfig } from 'payload';
import React from 'react';
export declare const ToastContainer: React.FC<{
config: ClientConfig;
}>;
//# sourceMappingURL=index.d.ts.map

View File

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

View File

@@ -0,0 +1,40 @@
type FocusableElement = HTMLElement | SVGElement;
export type CheckOptions = {
displayCheck?:
| 'full'
| 'full-native'
| 'legacy-full'
| 'non-zero-area'
| 'none';
getShadowRoot?:
| boolean
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents -- there is no overlap here; the function can return true/false/undefined
| ((node: FocusableElement) => ShadowRoot | boolean | undefined);
};
export type TabbableOptions = {
includeContainer?: boolean;
};
export declare function tabbable(
container: Element,
options?: TabbableOptions & CheckOptions
): FocusableElement[];
export declare function focusable(
container: Element,
options?: TabbableOptions & CheckOptions
): FocusableElement[];
export declare function isTabbable(
node: Element,
options?: CheckOptions
): boolean;
export declare function isFocusable(
node: Element,
options?: CheckOptions
): boolean;
export declare function getTabIndex(node: Element): number;

View File

@@ -0,0 +1,2 @@
const e=(e,t=1e3)=>new Promise((n,r)=>{let i=e=>{try{let t=JSON.parse(e.data);typeof t==`object`&&!Array.isArray(t)&&t!==null?(o(),n(t)):(o(),a())}catch{o(),n(e)}},a=()=>r(),o=()=>{clearTimeout(s),e.removeEventListener(`message`,i),e.removeEventListener(`error`,a),e.removeEventListener(`close`,a)};e.addEventListener(`message`,i),e.addEventListener(`error`,a),e.addEventListener(`close`,a);let s=setTimeout(()=>{o(),n(void 0)},t)});exports.messageCallback=e;
//# sourceMappingURL=message-callback.cjs.map

View File

@@ -0,0 +1 @@
module.exports={C:{"43":0.03102,"44":0.01551,"93":0.01551,"94":1.02366,"100":0.03102,"115":1.00815,"124":0.01551,"127":0.01551,"134":0.43428,"140":0.0698,"143":0.08531,"144":0.51959,"145":4.61423,"146":4.43586,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 95 96 97 98 99 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 121 122 123 125 126 128 129 130 131 132 133 135 136 137 138 139 141 142 147 148 149 3.5 3.6"},D:{"49":0.2249,"71":0.1551,"77":0.01551,"86":0.03102,"92":0.03102,"104":0.03102,"106":0.01551,"107":0.05429,"109":7.1346,"118":0.58938,"120":0.41877,"128":0.05429,"130":0.05429,"131":0.13959,"132":0.03102,"134":0.1551,"135":0.19388,"136":0.10082,"137":0.05429,"138":0.0698,"139":6.25053,"140":0.26367,"141":0.13959,"142":6.30482,"143":6.61502,"144":0.01551,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 72 73 74 75 76 78 79 80 81 83 84 85 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 105 108 110 111 112 113 114 115 116 117 119 121 122 123 124 125 126 127 129 133 145 146"},F:{"73":0.29469,"80":0.01551,"120":0.03102,"124":0.58938,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 74 75 76 77 78 79 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 121 122 123 125 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"84":0.01551,"89":0.24041,"90":0.03102,"92":0.01551,"109":0.01551,"111":0.12408,"122":0.01551,"134":0.19388,"135":0.0698,"138":0.10082,"139":0.01551,"140":0.12408,"142":1.49672,"143":8.30561,_:"12 13 14 15 16 17 18 79 80 81 83 85 86 87 88 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 112 113 114 115 116 117 118 119 120 121 123 124 125 126 127 128 129 130 131 132 133 136 137 141"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 13.1 14.1 15.1 15.2-15.3 15.4 15.5 16.0 16.1 16.2 16.3 16.4 16.5 16.6 17.0 17.1 17.2 17.3 17.4 17.5 17.6 18.0 18.1 18.2 18.3 18.4 18.5-18.6 26.0 26.2","15.6":0.03102,"26.1":0.0698,"26.3":0.01551},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00007,"5.0-5.1":0,"6.0-6.1":0.00014,"7.0-7.1":0.00011,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00029,"10.0-10.2":0.00004,"10.3":0.00051,"11.0-11.2":0.00622,"11.3-11.4":0.00018,"12.0-12.1":0.00014,"12.2-12.5":0.00163,"13.0-13.1":0.00004,"13.2":0.00025,"13.3":0.00007,"13.4-13.7":0.00025,"14.0-14.4":0.00051,"14.5-14.8":0.00054,"15.0-15.1":0.00058,"15.2-15.3":0.00043,"15.4":0.00047,"15.5":0.00051,"15.6-15.8":0.00784,"16.0":0.0009,"16.1":0.00173,"16.2":0.0009,"16.3":0.00163,"16.4":0.0004,"16.5":0.00069,"16.6-16.7":0.01019,"17.0":0.00058,"17.1":0.00094,"17.2":0.00069,"17.3":0.00105,"17.4":0.00177,"17.5":0.00347,"17.6-17.7":0.00802,"18.0":0.00181,"18.1":0.00376,"18.2":0.00199,"18.3":0.00647,"18.4":0.00333,"18.5-18.7":0.23877,"26.0":0.00466,"26.1":0.03878,"26.2":0.00737,"26.3":0.00033},P:{"29":0.03592,_:"4 20 21 22 23 24 25 26 27 28 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0"},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0},A:{_:"6 7 8 9 10 11 5.5"},K:{"0":0.0898,_:"10 11 12 11.1 11.5 12.1"},N:{_:"10 11"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},Q:{_:"14.9"},O:{"0":0.50737},H:{"0":0},L:{"0":45.17168},R:{_:"0"},M:{"0":0.03592}};

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAwDG,oCACQ,KAAK,aACL,QAAQ,GAAG,IAAI,GAAG,SAAS,YAC3B,OAAO,GAAG,IAAI,GAAG,SAAS,GACxB,IAAI,CAEd;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oCACQ,KAAK,YACL,OAAO,GAAG,IAAI,GAAG,SAAS,GACxB,IAAI,CAEd;2BAvCO,sBAAsB;8BAAtB,sBAAsB;6BAUtB,YAAY;0BAhBZ,OAAO"}

View File

@@ -0,0 +1,18 @@
/**
* @name quartersToMonths
* @category Conversion Helpers
* @summary Convert number of quarters to months.
*
* @description
* Convert a number of quarters to a full number of months.
*
* @param quarters - The number of quarters to be converted
*
* @returns The number of quarters converted in months
*
* @example
* // Convert 2 quarters to months
* const result = quartersToMonths(2)
* //=> 6
*/
export declare function quartersToMonths(quarters: number): number;

View File

@@ -0,0 +1,12 @@
import { Integration } from '@sentry/core';
/**
* With OTEL, all performance integrations will be added, as OTEL only initializes them when the patched package is actually required.
*/
export declare function getAutoPerformanceIntegrations(): Integration[];
/**
* Get a list of methods to instrument OTEL, when preload instrumentation.
*/
export declare function getOpenTelemetryInstrumentationToPreload(): (((options?: any) => void) & {
id: string;
})[];
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Clock = createLucideIcon("Clock", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["polyline", { points: "12 6 12 12 16 14", key: "68esgv" }]
]);
export { Clock as default };
//# sourceMappingURL=clock.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"lru.js","sources":["../../../src/utils/lru.ts"],"sourcesContent":["/** A simple Least Recently Used map */\nexport class LRUMap<K, V> {\n private readonly _cache: Map<K, V>;\n\n public constructor(private readonly _maxSize: number) {\n this._cache = new Map<K, V>();\n }\n\n /** Get the current size of the cache */\n public get size(): number {\n return this._cache.size;\n }\n\n /** Get an entry or undefined if it was not in the cache. Re-inserts to update the recently used order */\n public get(key: K): V | undefined {\n const value = this._cache.get(key);\n if (value === undefined) {\n return undefined;\n }\n // Remove and re-insert to update the order\n this._cache.delete(key);\n this._cache.set(key, value);\n return value;\n }\n\n /** Insert an entry and evict an older entry if we've reached maxSize */\n public set(key: K, value: V): void {\n if (this._cache.size >= this._maxSize) {\n // keys() returns an iterator in insertion order so keys().next() gives us the oldest key\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const nextKey = this._cache.keys().next().value!;\n this._cache.delete(nextKey);\n }\n this._cache.set(key, value);\n }\n\n /** Remove an entry and return the entry if it was in the cache */\n public remove(key: K): V | undefined {\n const value = this._cache.get(key);\n if (value) {\n this._cache.delete(key);\n }\n return value;\n }\n\n /** Clear all entries */\n public clear(): void {\n this._cache.clear();\n }\n\n /** Get all the keys */\n public keys(): Array<K> {\n return Array.from(this._cache.keys());\n }\n\n /** Get all the values */\n public values(): Array<V> {\n const values: V[] = [];\n this._cache.forEach(value => values.push(value));\n return values;\n }\n}\n"],"names":[],"mappings":"AAAA;AACO,MAAM,MAAM,CAAO;;AAG1B,GAAS,WAAW,GAAkB,QAAQ,EAAU,CAAA,IAAA,CAAA,QAAA,GAAA,QAAA;AACxD,IAAI,IAAI,CAAC,MAAA,GAAS,IAAI,GAAG,EAAQ;AACjC,EAAE;;AAEF;AACA,GAAS,IAAI,IAAI,GAAW;AAC5B,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI;AAC3B,EAAE;;AAEF;AACA,GAAS,GAAG,CAAC,GAAG,EAAoB;AACpC,IAAI,MAAM,KAAA,GAAQ,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC;AACtC,IAAI,IAAI,KAAA,KAAU,SAAS,EAAE;AAC7B,MAAM,OAAO,SAAS;AACtB,IAAI;AACJ;AACA,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC;AAC3B,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC;AAC/B,IAAI,OAAO,KAAK;AAChB,EAAE;;AAEF;AACA,GAAS,GAAG,CAAC,GAAG,EAAK,KAAK,EAAW;AACrC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,IAAA,IAAQ,IAAI,CAAC,QAAQ,EAAE;AAC3C;AACA;AACA,MAAM,MAAM,OAAA,GAAU,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK;AACrD,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;AACjC,IAAI;AACJ,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC;AAC/B,EAAE;;AAEF;AACA,GAAS,MAAM,CAAC,GAAG,EAAoB;AACvC,IAAI,MAAM,KAAA,GAAQ,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC;AACtC,IAAI,IAAI,KAAK,EAAE;AACf,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC;AAC7B,IAAI;AACJ,IAAI,OAAO,KAAK;AAChB,EAAE;;AAEF;AACA,GAAS,KAAK,GAAS;AACvB,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE;AACvB,EAAE;;AAEF;AACA,GAAS,IAAI,GAAa;AAC1B,IAAI,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;AACzC,EAAE;;AAEF;AACA,GAAS,MAAM,GAAa;AAC5B,IAAI,MAAM,MAAM,GAAQ,EAAE;AAC1B,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAA,IAAS,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACpD,IAAI,OAAO,MAAM;AACjB,EAAE;AACF;;;;"}

View File

@@ -0,0 +1,11 @@
import { _ as _class_apply_descriptor_destructure } from "./_class_apply_descriptor_destructure.js";
import { _ as _class_check_private_static_access } from "./_class_check_private_static_access.js";
import { _ as _class_check_private_static_field_descriptor } from "./_class_check_private_static_field_descriptor.js";
function _class_static_private_field_destructure(receiver, classConstructor, descriptor) {
_class_check_private_static_access(receiver, classConstructor);
_class_check_private_static_field_descriptor(descriptor, "set");
return _class_apply_descriptor_destructure(receiver, descriptor);
}
export { _class_static_private_field_destructure as _ };

View File

@@ -0,0 +1,30 @@
import { DirectusFile } from "../../../schema/file.cjs";
import { NestedPartial } from "../../../types/utils.cjs";
import { ApplyQueryFields } from "../../../types/output.cjs";
import { Query } from "../../../types/query.cjs";
import { RestCommand } from "../../types.cjs";
//#region src/rest/commands/create/files.d.ts
type CreateFileOutput<Schema, TQuery extends Query<Schema, Item>, Item extends object = DirectusFile<Schema>> = ApplyQueryFields<Schema, Item, TQuery['fields']>;
/**
* Upload/create a new file.
*
* @param data Formdata object
* @param query The query parameters
*
* @returns Returns the file object for the uploaded file, or an array of file objects if multiple files were uploaded at once.
*/
declare const uploadFiles: <Schema, const TQuery extends Query<Schema, DirectusFile<Schema>>>(data: FormData, query?: TQuery) => RestCommand<CreateFileOutput<Schema, TQuery>, Schema>;
/**
* Import a file from the web
*
* @param url The url to import the file from
* @param data Formdata object
* @param query The query parameters
*
* @returns Returns the file object for the imported file.
*/
declare const importFile: <Schema, TQuery extends Query<Schema, DirectusFile<Schema>>>(url: string, data?: NestedPartial<DirectusFile<Schema>>, query?: TQuery) => RestCommand<CreateFileOutput<Schema, TQuery>, Schema>;
//#endregion
export { CreateFileOutput, importFile, uploadFiles };
//# sourceMappingURL=files.d.cts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"globalThis.js","sourceRoot":"","sources":["../../../src/common/globalThis.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH;;GAEG;AACU,QAAA,WAAW,GAAG,UAAU,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/**\n * @deprecated Use globalThis directly instead.\n */\nexport const _globalThis = globalThis;\n"]}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"logSpans.js","sources":["../../../src/tracing/logSpans.ts"],"sourcesContent":["import { DEBUG_BUILD } from '../debug-build';\nimport type { Span } from '../types-hoist/span';\nimport { debug } from '../utils/debug-logger';\nimport { getRootSpan, spanIsSampled, spanToJSON } from '../utils/spanUtils';\n\n/**\n * Print a log message for a started span.\n */\nexport function logSpanStart(span: Span): void {\n if (!DEBUG_BUILD) return;\n\n const { description = '< unknown name >', op = '< unknown op >', parent_span_id: parentSpanId } = spanToJSON(span);\n const { spanId } = span.spanContext();\n\n const sampled = spanIsSampled(span);\n const rootSpan = getRootSpan(span);\n const isRootSpan = rootSpan === span;\n\n const header = `[Tracing] Starting ${sampled ? 'sampled' : 'unsampled'} ${isRootSpan ? 'root ' : ''}span`;\n\n const infoParts: string[] = [`op: ${op}`, `name: ${description}`, `ID: ${spanId}`];\n\n if (parentSpanId) {\n infoParts.push(`parent ID: ${parentSpanId}`);\n }\n\n if (!isRootSpan) {\n const { op, description } = spanToJSON(rootSpan);\n infoParts.push(`root ID: ${rootSpan.spanContext().spanId}`);\n if (op) {\n infoParts.push(`root op: ${op}`);\n }\n if (description) {\n infoParts.push(`root description: ${description}`);\n }\n }\n\n debug.log(`${header}\n ${infoParts.join('\\n ')}`);\n}\n\n/**\n * Print a log message for an ended span.\n */\nexport function logSpanEnd(span: Span): void {\n if (!DEBUG_BUILD) return;\n\n const { description = '< unknown name >', op = '< unknown op >' } = spanToJSON(span);\n const { spanId } = span.spanContext();\n const rootSpan = getRootSpan(span);\n const isRootSpan = rootSpan === span;\n\n const msg = `[Tracing] Finishing \"${op}\" ${isRootSpan ? 'root ' : ''}span \"${description}\" with ID ${spanId}`;\n debug.log(msg);\n}\n"],"names":[],"mappings":";;;;AAKA;AACA;AACA;AACO,SAAS,YAAY,CAAC,IAAI,EAAc;AAC/C,EAAE,IAAI,CAAC,WAAW,EAAE;;AAEpB,EAAE,MAAM,EAAE,WAAA,GAAc,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,cAAc,EAAE,YAAA,EAAa,GAAI,UAAU,CAAC,IAAI,CAAC;AACpH,EAAE,MAAM,EAAE,MAAA,EAAO,GAAI,IAAI,CAAC,WAAW,EAAE;;AAEvC,EAAE,MAAM,OAAA,GAAU,aAAa,CAAC,IAAI,CAAC;AACrC,EAAE,MAAM,QAAA,GAAW,WAAW,CAAC,IAAI,CAAC;AACpC,EAAE,MAAM,UAAA,GAAa,QAAA,KAAa,IAAI;;AAEtC,EAAE,MAAM,SAAS,CAAC,mBAAmB,EAAE,OAAA,GAAU,SAAA,GAAY,WAAW,CAAC,CAAC,EAAE,UAAA,GAAa,UAAU,EAAE,CAAC,IAAI,CAAC;;AAE3G,EAAE,MAAM,SAAS,GAAa,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA,EAAA,CAAA,MAAA,EAAA,WAAA,CAAA,CAAA,EAAA,CAAA,IAAA,EAAA,MAAA,CAAA,CAAA,CAAA;;AAEA,EAAA,IAAA,YAAA,EAAA;AACA,IAAA,SAAA,CAAA,IAAA,CAAA,CAAA,WAAA,EAAA,YAAA,CAAA,CAAA,CAAA;AACA,EAAA;;AAEA,EAAA,IAAA,CAAA,UAAA,EAAA;AACA,IAAA,MAAA,EAAA,EAAA,EAAA,WAAA,EAAA,GAAA,UAAA,CAAA,QAAA,CAAA;AACA,IAAA,SAAA,CAAA,IAAA,CAAA,CAAA,SAAA,EAAA,QAAA,CAAA,WAAA,EAAA,CAAA,MAAA,CAAA,CAAA,CAAA;AACA,IAAA,IAAA,EAAA,EAAA;AACA,MAAA,SAAA,CAAA,IAAA,CAAA,CAAA,SAAA,EAAA,EAAA,CAAA,CAAA,CAAA;AACA,IAAA;AACA,IAAA,IAAA,WAAA,EAAA;AACA,MAAA,SAAA,CAAA,IAAA,CAAA,CAAA,kBAAA,EAAA,WAAA,CAAA,CAAA,CAAA;AACA,IAAA;AACA,EAAA;;AAEA,EAAA,KAAA,CAAA,GAAA,CAAA,CAAA,EAAA,MAAA;AACA,EAAA,EAAA,SAAA,CAAA,IAAA,CAAA,MAAA,CAAA,CAAA,CAAA,CAAA;AACA;;AAEA;AACA;AACA;AACA,SAAA,UAAA,CAAA,IAAA,EAAA;AACA,EAAA,IAAA,CAAA,WAAA,EAAA;;AAEA,EAAA,MAAA,EAAA,WAAA,GAAA,kBAAA,EAAA,EAAA,GAAA,gBAAA,EAAA,GAAA,UAAA,CAAA,IAAA,CAAA;AACA,EAAA,MAAA,EAAA,MAAA,EAAA,GAAA,IAAA,CAAA,WAAA,EAAA;AACA,EAAA,MAAA,QAAA,GAAA,WAAA,CAAA,IAAA,CAAA;AACA,EAAA,MAAA,UAAA,GAAA,QAAA,KAAA,IAAA;;AAEA,EAAA,MAAA,GAAA,GAAA,CAAA,qBAAA,EAAA,EAAA,CAAA,EAAA,EAAA,UAAA,GAAA,OAAA,GAAA,EAAA,CAAA,MAAA,EAAA,WAAA,CAAA,UAAA,EAAA,MAAA,CAAA,CAAA;AACA,EAAA,KAAA,CAAA,GAAA,CAAA,GAAA,CAAA;AACA;;;;"}

View File

@@ -0,0 +1,25 @@
/**
* Very simple, but fast deepMerge implementation. Only deepMerges objects, not arrays and clones everything.
* Do not use this if your object contains any complex objects like React Components, or if you would like to combine Arrays.
* If you only have simple objects and need a fast deepMerge, this is the function for you.
*
* obj2 takes precedence over obj1 - thus if obj2 has a key that obj1 also has, obj2's value will be used.
*
* @param obj1 base object
* @param obj2 object to merge "into" obj1
*/export function deepMergeSimple(obj1, obj2) {
const output = {
...obj1
};
for (const key in obj2) {
if (Object.prototype.hasOwnProperty.call(obj2, key)) {
if (typeof obj2[key] === 'object' && !Array.isArray(obj2[key]) && obj1[key]) {
output[key] = deepMergeSimple(obj1[key], obj2[key]);
} else {
output[key] = obj2[key];
}
}
}
return output;
}
//# sourceMappingURL=deepMerge.js.map

View File

@@ -0,0 +1,2 @@
import type { DependencyList } from 'react';
export declare function useLatestValue<T extends any>(value: T, dependencies?: DependencyList): import("react").MutableRefObject<T>;

View File

@@ -0,0 +1,207 @@
import { normalizeDates } from "./_lib/normalizeDates.js";
import {
secondsInDay,
secondsInHour,
secondsInMinute,
secondsInMonth,
secondsInQuarter,
secondsInWeek,
secondsInYear,
} from "./constants.js";
import { differenceInCalendarDays } from "./differenceInCalendarDays.js";
import { differenceInCalendarMonths } from "./differenceInCalendarMonths.js";
import { differenceInCalendarQuarters } from "./differenceInCalendarQuarters.js";
import { differenceInCalendarWeeks } from "./differenceInCalendarWeeks.js";
import { differenceInCalendarYears } from "./differenceInCalendarYears.js";
import { differenceInHours } from "./differenceInHours.js";
import { differenceInMinutes } from "./differenceInMinutes.js";
import { differenceInSeconds } from "./differenceInSeconds.js";
/**
* The {@link intlFormatDistance} function options.
*/
/**
* The unit used to format the distance in {@link intlFormatDistance}.
*/
/**
* @name intlFormatDistance
* @category Common Helpers
* @summary Formats distance between two dates in a human-readable format
* @description
* The function calculates the difference between two dates and formats it as a human-readable string.
*
* The function will pick the most appropriate unit depending on the distance between dates. For example, if the distance is a few hours, it might return `x hours`. If the distance is a few months, it might return `x months`.
*
* You can also specify a unit to force using it regardless of the distance to get a result like `123456 hours`.
*
* See the table below for the unit picking logic:
*
* | Distance between dates | Result (past) | Result (future) |
* | ---------------------- | -------------- | --------------- |
* | 0 seconds | now | now |
* | 1-59 seconds | X seconds ago | in X seconds |
* | 1-59 minutes | X minutes ago | in X minutes |
* | 1-23 hours | X hours ago | in X hours |
* | 1 day | yesterday | tomorrow |
* | 2-6 days | X days ago | in X days |
* | 7 days | last week | next week |
* | 8 days-1 month | X weeks ago | in X weeks |
* | 1 month | last month | next month |
* | 2-3 months | X months ago | in X months |
* | 1 quarter | last quarter | next quarter |
* | 2-3 quarters | X quarters ago | in X quarters |
* | 1 year | last year | next year |
* | 2+ years | X years ago | in X years |
*
* @param laterDate - The date
* @param earlierDate - The date to compare with.
* @param options - An object with options.
* See MDN for details [Locale identification and negotiation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation)
* The narrow one could be similar to the short one for some locales.
*
* @returns The distance in words according to language-sensitive relative time formatting.
*
* @throws `date` must not be Invalid Date
* @throws `baseDate` must not be Invalid Date
* @throws `options.unit` must not be invalid Unit
* @throws `options.locale` must not be invalid locale
* @throws `options.localeMatcher` must not be invalid localeMatcher
* @throws `options.numeric` must not be invalid numeric
* @throws `options.style` must not be invalid style
*
* @example
* // What is the distance between the dates when the fist date is after the second?
* intlFormatDistance(
* new Date(1986, 3, 4, 11, 30, 0),
* new Date(1986, 3, 4, 10, 30, 0)
* )
* //=> 'in 1 hour'
*
* // What is the distance between the dates when the fist date is before the second?
* intlFormatDistance(
* new Date(1986, 3, 4, 10, 30, 0),
* new Date(1986, 3, 4, 11, 30, 0)
* )
* //=> '1 hour ago'
*
* @example
* // Use the unit option to force the function to output the result in quarters. Without setting it, the example would return "next year"
* intlFormatDistance(
* new Date(1987, 6, 4, 10, 30, 0),
* new Date(1986, 3, 4, 10, 30, 0),
* { unit: 'quarter' }
* )
* //=> 'in 5 quarters'
*
* @example
* // Use the locale option to get the result in Spanish. Without setting it, the example would return "in 1 hour".
* intlFormatDistance(
* new Date(1986, 3, 4, 11, 30, 0),
* new Date(1986, 3, 4, 10, 30, 0),
* { locale: 'es' }
* )
* //=> 'dentro de 1 hora'
*
* @example
* // Use the numeric option to force the function to use numeric values. Without setting it, the example would return "tomorrow".
* intlFormatDistance(
* new Date(1986, 3, 5, 11, 30, 0),
* new Date(1986, 3, 4, 11, 30, 0),
* { numeric: 'always' }
* )
* //=> 'in 1 day'
*
* @example
* // Use the style option to force the function to use short values. Without setting it, the example would return "in 2 years".
* intlFormatDistance(
* new Date(1988, 3, 4, 11, 30, 0),
* new Date(1986, 3, 4, 11, 30, 0),
* { style: 'short' }
* )
* //=> 'in 2 yr'
*/
export function intlFormatDistance(laterDate, earlierDate, options) {
let value = 0;
let unit;
const [laterDate_, earlierDate_] = normalizeDates(
options?.in,
laterDate,
earlierDate,
);
if (!options?.unit) {
// Get the unit based on diffInSeconds calculations if no unit is specified
const diffInSeconds = differenceInSeconds(laterDate_, earlierDate_); // The smallest unit
if (Math.abs(diffInSeconds) < secondsInMinute) {
value = differenceInSeconds(laterDate_, earlierDate_);
unit = "second";
} else if (Math.abs(diffInSeconds) < secondsInHour) {
value = differenceInMinutes(laterDate_, earlierDate_);
unit = "minute";
} else if (
Math.abs(diffInSeconds) < secondsInDay &&
Math.abs(differenceInCalendarDays(laterDate_, earlierDate_)) < 1
) {
value = differenceInHours(laterDate_, earlierDate_);
unit = "hour";
} else if (
Math.abs(diffInSeconds) < secondsInWeek &&
(value = differenceInCalendarDays(laterDate_, earlierDate_)) &&
Math.abs(value) < 7
) {
unit = "day";
} else if (Math.abs(diffInSeconds) < secondsInMonth) {
value = differenceInCalendarWeeks(laterDate_, earlierDate_);
unit = "week";
} else if (Math.abs(diffInSeconds) < secondsInQuarter) {
value = differenceInCalendarMonths(laterDate_, earlierDate_);
unit = "month";
} else if (Math.abs(diffInSeconds) < secondsInYear) {
if (differenceInCalendarQuarters(laterDate_, earlierDate_) < 4) {
// To filter out cases that are less than a year but match 4 quarters
value = differenceInCalendarQuarters(laterDate_, earlierDate_);
unit = "quarter";
} else {
value = differenceInCalendarYears(laterDate_, earlierDate_);
unit = "year";
}
} else {
value = differenceInCalendarYears(laterDate_, earlierDate_);
unit = "year";
}
} else {
// Get the value if unit is specified
unit = options?.unit;
if (unit === "second") {
value = differenceInSeconds(laterDate_, earlierDate_);
} else if (unit === "minute") {
value = differenceInMinutes(laterDate_, earlierDate_);
} else if (unit === "hour") {
value = differenceInHours(laterDate_, earlierDate_);
} else if (unit === "day") {
value = differenceInCalendarDays(laterDate_, earlierDate_);
} else if (unit === "week") {
value = differenceInCalendarWeeks(laterDate_, earlierDate_);
} else if (unit === "month") {
value = differenceInCalendarMonths(laterDate_, earlierDate_);
} else if (unit === "quarter") {
value = differenceInCalendarQuarters(laterDate_, earlierDate_);
} else if (unit === "year") {
value = differenceInCalendarYears(laterDate_, earlierDate_);
}
}
const rtf = new Intl.RelativeTimeFormat(options?.locale, {
numeric: "auto",
...options,
});
return rtf.format(value, unit);
}
// Fallback for modularized imports:
export default intlFormatDistance;

View File

@@ -0,0 +1,32 @@
type Key = string | number | symbol;
/**
* SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the
* index of the `key` in the backing array.
*
* This is designed to allow synchronizing a second array with the contents of the backing array,
* like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`,
* and there are never duplicates.
*/
export declare class SetArray<T extends Key = Key> {
private _indexes;
array: readonly T[];
constructor();
}
/**
* Gets the index associated with `key` in the backing array, if it is already present.
*/
export declare function get<T extends Key>(setarr: SetArray<T>, key: T): number | undefined;
/**
* Puts `key` into the backing array, if it is not already present. Returns
* the index of the `key` in the backing array.
*/
export declare function put<T extends Key>(setarr: SetArray<T>, key: T): number;
/**
* Pops the last added item out of the SetArray.
*/
export declare function pop<T extends Key>(setarr: SetArray<T>): void;
/**
* Removes the key, if it exists in the set.
*/
export declare function remove<T extends Key>(setarr: SetArray<T>, key: T): void;
export {};

View File

@@ -0,0 +1,5 @@
export declare const sub: import("./types.js").FPFn2<
Date,
import("../fp.js").Duration,
import("../fp.js").DateArg<Date>
>;

View File

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

View File

@@ -0,0 +1,10 @@
import type { Plugin, CodeKeywordDefinition, ErrorObject } from "ajv";
declare type Kwd = "formatMaximum" | "formatMinimum" | "formatExclusiveMaximum" | "formatExclusiveMinimum";
declare type Comparison = "<=" | ">=" | "<" | ">";
export declare type LimitFormatError = ErrorObject<Kwd, {
limit: string;
comparison: Comparison;
}>;
export declare const formatLimitDefinition: CodeKeywordDefinition;
declare const formatLimitPlugin: Plugin<undefined>;
export default formatLimitPlugin;

View File

@@ -0,0 +1,2 @@
// Todo (Babel 8): remove this file, in Babel 8 users import the .json directly
module.exports = require("./data/native-modules.json");

View File

@@ -0,0 +1,541 @@
function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}(function (_window$dateFns) {var __defProp = Object.defineProperty;
var __export = function __export(target, all) {
for (var name in all)
__defProp(target, name, {
get: all[name],
enumerable: true,
configurable: true,
set: function set(newValue) {return all[name] = function () {return newValue;};}
});
};
// lib/locale/pt-BR/_lib/formatDistance.mjs
var formatDistanceLocale = {
lessThanXSeconds: {
one: "menos de um segundo",
other: "menos de {{count}} segundos"
},
xSeconds: {
one: "1 segundo",
other: "{{count}} segundos"
},
halfAMinute: "meio minuto",
lessThanXMinutes: {
one: "menos de um minuto",
other: "menos de {{count}} minutos"
},
xMinutes: {
one: "1 minuto",
other: "{{count}} minutos"
},
aboutXHours: {
one: "cerca de 1 hora",
other: "cerca de {{count}} horas"
},
xHours: {
one: "1 hora",
other: "{{count}} horas"
},
xDays: {
one: "1 dia",
other: "{{count}} dias"
},
aboutXWeeks: {
one: "cerca de 1 semana",
other: "cerca de {{count}} semanas"
},
xWeeks: {
one: "1 semana",
other: "{{count}} semanas"
},
aboutXMonths: {
one: "cerca de 1 m\xEAs",
other: "cerca de {{count}} meses"
},
xMonths: {
one: "1 m\xEAs",
other: "{{count}} meses"
},
aboutXYears: {
one: "cerca de 1 ano",
other: "cerca de {{count}} anos"
},
xYears: {
one: "1 ano",
other: "{{count}} anos"
},
overXYears: {
one: "mais de 1 ano",
other: "mais de {{count}} anos"
},
almostXYears: {
one: "quase 1 ano",
other: "quase {{count}} anos"
}
};
var formatDistance = function formatDistance(token, count, options) {
var result;
var tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "em " + result;
} else {
return "h\xE1 " + result;
}
}
return result;
};
// lib/locale/_lib/buildFormatLongFn.mjs
function buildFormatLongFn(args) {
return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var width = options.width ? String(options.width) : args.defaultWidth;
var format = args.formats[width] || args.formats[args.defaultWidth];
return format;
};
}
// lib/locale/pt-BR/_lib/formatLong.mjs
var dateFormats = {
full: "EEEE, d 'de' MMMM 'de' y",
long: "d 'de' MMMM 'de' y",
medium: "d MMM y",
short: "dd/MM/yyyy"
};
var timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm"
};
var dateTimeFormats = {
full: "{{date}} '\xE0s' {{time}}",
long: "{{date}} '\xE0s' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}"
};
var formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full"
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full"
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full"
})
};
// lib/locale/pt-BR/_lib/formatRelative.mjs
var formatRelativeLocale = {
lastWeek: function lastWeek(date) {
var weekday = date.getDay();
var last = weekday === 0 || weekday === 6 ? "\xFAltimo" : "\xFAltima";
return "'" + last + "' eeee '\xE0s' p";
},
yesterday: "'ontem \xE0s' p",
today: "'hoje \xE0s' p",
tomorrow: "'amanh\xE3 \xE0s' p",
nextWeek: "eeee '\xE0s' p",
other: "P"
};
var formatRelative = function formatRelative(token, date, _baseDate, _options) {
var format = formatRelativeLocale[token];
if (typeof format === "function") {
return format(date);
}
return format;
};
// lib/locale/_lib/buildLocalizeFn.mjs
function buildLocalizeFn(args) {
return function (value, options) {
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
var valuesArray;
if (context === "formatting" && args.formattingValues) {
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
} else {
var _defaultWidth = args.defaultWidth;
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
valuesArray = args.values[_width] || args.values[_defaultWidth];
}
var index = args.argumentCallback ? args.argumentCallback(value) : value;
return valuesArray[index];
};
}
// lib/locale/pt-BR/_lib/localize.mjs
var eraValues = {
narrow: ["AC", "DC"],
abbreviated: ["AC", "DC"],
wide: ["antes de cristo", "depois de cristo"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["T1", "T2", "T3", "T4"],
wide: ["1\xBA trimestre", "2\xBA trimestre", "3\xBA trimestre", "4\xBA trimestre"]
};
var monthValues = {
narrow: ["j", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"],
abbreviated: [
"jan",
"fev",
"mar",
"abr",
"mai",
"jun",
"jul",
"ago",
"set",
"out",
"nov",
"dez"],
wide: [
"janeiro",
"fevereiro",
"mar\xE7o",
"abril",
"maio",
"junho",
"julho",
"agosto",
"setembro",
"outubro",
"novembro",
"dezembro"]
};
var dayValues = {
narrow: ["D", "S", "T", "Q", "Q", "S", "S"],
short: ["dom", "seg", "ter", "qua", "qui", "sex", "sab"],
abbreviated: [
"domingo",
"segunda",
"ter\xE7a",
"quarta",
"quinta",
"sexta",
"s\xE1bado"],
wide: [
"domingo",
"segunda-feira",
"ter\xE7a-feira",
"quarta-feira",
"quinta-feira",
"sexta-feira",
"s\xE1bado"]
};
var dayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "mn",
noon: "md",
morning: "manh\xE3",
afternoon: "tarde",
evening: "tarde",
night: "noite"
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "meia-noite",
noon: "meio-dia",
morning: "manh\xE3",
afternoon: "tarde",
evening: "tarde",
night: "noite"
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "meia-noite",
noon: "meio-dia",
morning: "manh\xE3",
afternoon: "tarde",
evening: "tarde",
night: "noite"
}
};
var formattingDayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "mn",
noon: "md",
morning: "da manh\xE3",
afternoon: "da tarde",
evening: "da tarde",
night: "da noite"
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "meia-noite",
noon: "meio-dia",
morning: "da manh\xE3",
afternoon: "da tarde",
evening: "da tarde",
night: "da noite"
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "meia-noite",
noon: "meio-dia",
morning: "da manh\xE3",
afternoon: "da tarde",
evening: "da tarde",
night: "da noite"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber, options) {
var number = Number(dirtyNumber);
if ((options === null || options === void 0 ? void 0 : options.unit) === "week") {
return number + "\xAA";
}
return number + "\xBA";
};
var localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide"
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: function argumentCallback(quarter) {return quarter - 1;}
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide"
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide"
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide"
})
};
// lib/locale/_lib/buildMatchFn.mjs
function buildMatchFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var width = options.width;
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
var matchResult = string.match(matchPattern);
if (!matchResult) {
return null;
}
var matchedString = matchResult[0];
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
var value;
value = args.valueCallback ? args.valueCallback(key) : key;
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
var findKey = function findKey(object, predicate) {
for (var key in object) {
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
return key;
}
}
return;
};
var findIndex = function findIndex(array, predicate) {
for (var key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return;
};
// lib/locale/_lib/buildMatchPatternFn.mjs
function buildMatchPatternFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var matchResult = string.match(args.matchPattern);
if (!matchResult)
return null;
var matchedString = matchResult[0];
var parseResult = string.match(args.parsePattern);
if (!parseResult)
return null;
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
// lib/locale/pt-BR/_lib/match.mjs
var matchOrdinalNumberPattern = /^(\d+)[ºªo]?/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^(ac|dc|a|d)/i,
abbreviated: /^(a\.?\s?c\.?|d\.?\s?c\.?)/i,
wide: /^(antes de cristo|depois de cristo)/i
};
var parseEraPatterns = {
any: [/^ac/i, /^dc/i],
wide: [/^antes de cristo/i, /^depois de cristo/i]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^T[1234]/i,
wide: /^[1234](º)? trimestre/i
};
var parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i]
};
var matchMonthPatterns = {
narrow: /^[jfmajsond]/i,
abbreviated: /^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,
wide: /^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i
};
var 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],
any: [
/^ja/i,
/^fev/i,
/^mar/i,
/^abr/i,
/^mai/i,
/^jun/i,
/^jul/i,
/^ago/i,
/^set/i,
/^out/i,
/^nov/i,
/^dez/i]
};
var matchDayPatterns = {
narrow: /^(dom|[23456]ª?|s[aá]b)/i,
short: /^(dom|[23456]ª?|s[aá]b)/i,
abbreviated: /^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,
wide: /^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i
};
var parseDayPatterns = {
short: [/^d/i, /^2/i, /^3/i, /^4/i, /^5/i, /^6/i, /^s[aá]/i],
narrow: [/^d/i, /^2/i, /^3/i, /^4/i, /^5/i, /^6/i, /^s[aá]/i],
any: [/^d/i, /^seg/i, /^t/i, /^qua/i, /^qui/i, /^sex/i, /^s[aá]b/i]
};
var matchDayPeriodPatterns = {
narrow: /^(a|p|mn|md|(da) (manhã|tarde|noite))/i,
any: /^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i
};
var parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^mn|^meia[-\s]noite/i,
noon: /^md|^meio[-\s]dia/i,
morning: /manhã/i,
afternoon: /tarde/i,
evening: /tarde/i,
night: /noite/i
}
};
var match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function valueCallback(value) {return parseInt(value, 10);}
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any"
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: function valueCallback(index) {return index + 1;}
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any"
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any"
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any"
})
};
// lib/locale/pt-BR.mjs
var ptBR = {
code: "pt-BR",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 0,
firstWeekContainsDate: 1
}
};
// lib/locale/pt-BR/cdn.js
window.dateFns = _objectSpread(_objectSpread({},
window.dateFns), {}, {
locale: _objectSpread(_objectSpread({}, (_window$dateFns =
window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
ptBR: ptBR }) });
//# debugId=E4D3C337BEF06CE764756e2164756e21
})();
//# sourceMappingURL=cdn.js.map

View File

@@ -0,0 +1,10 @@
function _regeneratorKeys(e) {
var n = Object(e),
r = [];
for (var t in n) r.unshift(t);
return function e() {
for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e;
return e.done = !0, e;
};
}
export { _regeneratorKeys as default };

View File

@@ -0,0 +1,19 @@
{
"name": "merge-stream",
"version": "2.0.0",
"description": "Create a stream that emits events from multiple other streams",
"files": [
"index.js"
],
"scripts": {
"test": "istanbul cover test.js && istanbul check-cover --statements 100 --branches 100"
},
"repository": "grncdr/merge-stream",
"author": "Stephen Sugden <me@stephensugden.com>",
"license": "MIT",
"dependencies": {},
"devDependencies": {
"from2": "^2.0.3",
"istanbul": "^0.4.5"
}
}

View File

@@ -0,0 +1,16 @@
import { EvaluationDetails, HookContext, HookHints, JsonValue, OpenFeatureHook } from './types';
export declare const openFeatureIntegration: () => import("@sentry/core").Integration;
/**
* OpenFeature Hook class implementation.
*/
export declare class OpenFeatureIntegrationHook implements OpenFeatureHook {
/**
* Successful evaluation result.
*/
after(_hookContext: Readonly<HookContext<JsonValue>>, evaluationDetails: EvaluationDetails<JsonValue>): void;
/**
* On error evaluation result.
*/
error(hookContext: Readonly<HookContext<JsonValue>>, _error: unknown, _hookHints?: HookHints): void;
}
//# sourceMappingURL=integration.d.ts.map

View File

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

View File

@@ -0,0 +1,64 @@
'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import { getTranslation } from '@payloadcms/translations';
import { Button } from '../../elements/Button/index.js';
import { Popup, PopupList } from '../Popup/index.js';
export const AddNewButton = ({
allowCreate,
baseClass,
buttonStyle,
className,
collections,
i18n,
icon,
label,
onClick,
permissions,
relationTo
}) => {
if (!allowCreate) {
return null;
}
const isPolymorphic = Array.isArray(relationTo);
if (!isPolymorphic) {
return /*#__PURE__*/_jsx(Button, {
buttonStyle: buttonStyle,
className: className,
onClick: () => onClick(),
children: label
});
}
return /*#__PURE__*/_jsx("div", {
className: `${baseClass}__add-new-polymorphic-wrapper`,
children: /*#__PURE__*/_jsx(Popup, {
button: /*#__PURE__*/_jsx(Button, {
buttonStyle: buttonStyle,
className: className,
icon: icon,
children: label
}),
buttonType: "custom",
horizontalAlign: "center",
render: ({
close: closePopup
}) => /*#__PURE__*/_jsx(PopupList.ButtonGroup, {
children: relationTo.map(relatedCollection => {
if (permissions.collections[relatedCollection]?.create) {
return /*#__PURE__*/_jsx(PopupList.Button, {
className: `${baseClass}__relation-button--${relatedCollection}`,
onClick: () => {
closePopup();
onClick(relatedCollection);
},
children: getTranslation(collections.find(each => each.slug === relatedCollection).labels.singular, i18n)
}, relatedCollection);
}
return null;
})
}),
size: "medium"
})
});
};
//# sourceMappingURL=AddNewButton.js.map

View File

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

View File

@@ -0,0 +1,16 @@
import { ClientOptions, DirectusClient } from "./types/client.js";
//#region src/client.d.ts
/**
* Creates a client to communicate with a Directus app.
*
* @param url The URL to the Directus app.
* @param options The client options. Defaults to the standard implementation of `globals`.
*
* @returns A Directus client.
*/
declare const createDirectus: <Schema = any>(url: string, options?: ClientOptions) => DirectusClient<Schema>;
//#endregion
export { createDirectus };
//# sourceMappingURL=client.d.ts.map

View File

@@ -0,0 +1,26 @@
import type { KeyLike, DecryptOptions, JWEHeaderParameters, GetKeyFunction, FlattenedJWE, GeneralJWE, GeneralDecryptResult, ResolvedKey } from '../../types';
/**
* Interface for General JWE Decryption dynamic key resolution. No token components have been
* verified at the time of this function call.
*/
export interface GeneralDecryptGetKey extends GetKeyFunction<JWEHeaderParameters, FlattenedJWE> {
}
/**
* Decrypts a General JWE.
*
* This function is exported (as a named export) from the main `'jose'` module entry point as well
* as from its subpath export `'jose/jwe/general/decrypt'`.
*
* @param jwe General JWE.
* @param key Private Key or Secret to decrypt the JWE with. See
* {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}.
* @param options JWE Decryption options.
*/
export declare function generalDecrypt(jwe: GeneralJWE, key: KeyLike | Uint8Array, options?: DecryptOptions): Promise<GeneralDecryptResult>;
/**
* @param jwe General JWE.
* @param getKey Function resolving Private Key or Secret to decrypt the JWE with. See
* {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}.
* @param options JWE Decryption options.
*/
export declare function generalDecrypt<KeyLikeType extends KeyLike = KeyLike>(jwe: GeneralJWE, getKey: GeneralDecryptGetKey, options?: DecryptOptions): Promise<GeneralDecryptResult & ResolvedKey<KeyLikeType>>;

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"validatePDF.d.ts","sourceRoot":"","sources":["../../src/utilities/validatePDF.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,WAgBzC"}

View File

@@ -0,0 +1 @@
{"version":3,"names":["_classApplyDescriptorSet","receiver","descriptor","value","set","call","writable","TypeError"],"sources":["../../src/helpers/classApplyDescriptorSet.js"],"sourcesContent":["/* @minVersion 7.13.10 */\n/* @onlyBabel7 */\n\nexport default function _classApplyDescriptorSet(receiver, descriptor, value) {\n if (descriptor.set) {\n descriptor.set.call(receiver, value);\n } else {\n if (!descriptor.writable) {\n // This should only throw in strict mode, but class bodies are\n // always strict and private fields can only be used inside\n // class bodies.\n throw new TypeError(\"attempted to set read only private field\");\n }\n descriptor.value = value;\n }\n}\n"],"mappings":";;;;;;AAGe,SAASA,wBAAwBA,CAACC,QAAQ,EAAEC,UAAU,EAAEC,KAAK,EAAE;EAC5E,IAAID,UAAU,CAACE,GAAG,EAAE;IAClBF,UAAU,CAACE,GAAG,CAACC,IAAI,CAACJ,QAAQ,EAAEE,KAAK,CAAC;EACtC,CAAC,MAAM;IACL,IAAI,CAACD,UAAU,CAACI,QAAQ,EAAE;MAIxB,MAAM,IAAIC,SAAS,CAAC,0CAA0C,CAAC;IACjE;IACAL,UAAU,CAACC,KAAK,GAAGA,KAAK;EAC1B;AACF","ignoreList":[]}

View File

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

View File

@@ -0,0 +1,2 @@
export * from "./declarations/src/index.js";
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1vdGlvbi1zZXJpYWxpemUuY2pzLmQubXRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi9kZWNsYXJhdGlvbnMvc3JjL2luZGV4LmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEifQ==

View File

@@ -0,0 +1 @@
{"version":3,"file":"battery-charging.js","sources":["../../../src/icons/battery-charging.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BatteryCharging\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTUgN2gxYTIgMiAwIDAgMSAyIDJ2NmEyIDIgMCAwIDEtMiAyaC0yIiAvPgogIDxwYXRoIGQ9Ik02IDdINGEyIDIgMCAwIDAtMiAydjZhMiAyIDAgMCAwIDIgMmgxIiAvPgogIDxwYXRoIGQ9Im0xMSA3LTMgNWg0bC0zIDUiIC8+CiAgPGxpbmUgeDE9IjIyIiB4Mj0iMjIiIHkxPSIxMSIgeTI9IjEzIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/battery-charging\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 BatteryCharging = createLucideIcon('BatteryCharging', [\n ['path', { d: 'M15 7h1a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2h-2', key: '1sdynx' }],\n ['path', { d: 'M6 7H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h1', key: '1gkd3k' }],\n ['path', { d: 'm11 7-3 5h4l-3 5', key: 'b4a64w' }],\n ['line', { x1: '22', x2: '22', y1: '11', y2: '13', key: '4dh1rd' }],\n]);\n\nexport default BatteryCharging;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkB,iBAAiB,iBAAmB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAoB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACjD,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACpE,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,107 @@
import { JSONSchema4Type } from 'json-schema';
export type AST_TYPE = AST['type'];
export type AST = TAny | TArray | TBoolean | TEnum | TInterface | TNamedInterface | TIntersection | TLiteral | TNever | TNumber | TNull | TObject | TReference | TString | TTuple | TUnion | TUnknown | TCustomType;
export interface AbstractAST {
comment?: string;
keyName?: string;
standaloneName?: string;
type: AST_TYPE;
deprecated?: boolean;
}
export type ASTWithComment = AST & {
comment: string;
};
export type ASTWithName = AST & {
keyName: string;
};
export type ASTWithStandaloneName = AST & {
standaloneName: string;
};
export declare function hasComment(ast: AST): ast is ASTWithComment;
export declare function hasStandaloneName(ast: AST): ast is ASTWithStandaloneName;
export interface TAny extends AbstractAST {
type: 'ANY';
}
export interface TArray extends AbstractAST {
type: 'ARRAY';
params: AST;
}
export interface TBoolean extends AbstractAST {
type: 'BOOLEAN';
}
export interface TEnum extends AbstractAST {
standaloneName: string;
type: 'ENUM';
params: TEnumParam[];
}
export interface TEnumParam {
ast: AST;
keyName: string;
}
export interface TInterface extends AbstractAST {
type: 'INTERFACE';
params: TInterfaceParam[];
superTypes: TNamedInterface[];
}
export interface TNamedInterface extends AbstractAST {
standaloneName: string;
type: 'INTERFACE';
params: TInterfaceParam[];
superTypes: TNamedInterface[];
}
export interface TNever extends AbstractAST {
type: 'NEVER';
}
export interface TInterfaceParam {
ast: AST;
keyName: string;
isRequired: boolean;
isPatternProperty: boolean;
isUnreachableDefinition: boolean;
}
export interface TIntersection extends AbstractAST {
type: 'INTERSECTION';
params: AST[];
}
export interface TLiteral extends AbstractAST {
params: JSONSchema4Type;
type: 'LITERAL';
}
export interface TNumber extends AbstractAST {
type: 'NUMBER';
}
export interface TNull extends AbstractAST {
type: 'NULL';
}
export interface TObject extends AbstractAST {
type: 'OBJECT';
}
export interface TReference extends AbstractAST {
type: 'REFERENCE';
params: string;
}
export interface TString extends AbstractAST {
type: 'STRING';
}
export interface TTuple extends AbstractAST {
type: 'TUPLE';
params: AST[];
spreadParam?: AST;
minItems: number;
maxItems?: number;
}
export interface TUnion extends AbstractAST {
type: 'UNION';
params: AST[];
}
export interface TUnknown extends AbstractAST {
type: 'UNKNOWN';
}
export interface TCustomType extends AbstractAST {
type: 'CUSTOM_TYPE';
params: string;
}
export declare const T_ANY: TAny;
export declare const T_ANY_ADDITIONAL_PROPERTIES: TAny & ASTWithName;
export declare const T_UNKNOWN: TUnknown;
export declare const T_UNKNOWN_ADDITIONAL_PROPERTIES: TUnknown & ASTWithName;

View File

@@ -0,0 +1,126 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const api = require('@opentelemetry/api');
const resources = require('@opentelemetry/resources');
const sdkTraceBase = require('@opentelemetry/sdk-trace-base');
const semanticConventions = require('@opentelemetry/semantic-conventions');
const core = require('@sentry/core');
const nodeCore = require('@sentry/node-core');
const opentelemetry = require('@sentry/opentelemetry');
const debugBuild = require('../debug-build.js');
const index = require('../integrations/tracing/index.js');
// About 277h - this must fit into new Array(len)!
const MAX_MAX_SPAN_WAIT_DURATION = 1000000;
/**
* Initialize OpenTelemetry for Node.
*/
function initOpenTelemetry(client, options = {}) {
if (client.getOptions().debug) {
nodeCore.setupOpenTelemetryLogger();
}
const [provider, asyncLocalStorageLookup] = setupOtel(client, options);
client.traceProvider = provider;
client.asyncLocalStorageLookup = asyncLocalStorageLookup;
}
/**
* Preload OpenTelemetry for Node.
* This can be used to preload instrumentation early, but set up Sentry later.
* By preloading the OTEL instrumentation wrapping still happens early enough that everything works.
*/
function preloadOpenTelemetry(options = {}) {
const { debug } = options;
if (debug) {
core.debug.enable();
}
nodeCore.initializeEsmLoader();
// These are all integrations that we need to pre-load to ensure they are set up before any other code runs
getPreloadMethods(options.integrations).forEach(fn => {
fn();
if (debug) {
core.debug.log(`[Sentry] Preloaded ${fn.id} instrumentation`);
}
});
}
function getPreloadMethods(integrationNames) {
const instruments = index.getOpenTelemetryInstrumentationToPreload();
if (!integrationNames) {
return instruments;
}
// We match exact matches of instrumentation, but also match prefixes, e.g. "Fastify.v5" will match "Fastify"
return instruments.filter(instrumentation => {
const id = instrumentation.id;
return integrationNames.some(integrationName => id === integrationName || id.startsWith(`${integrationName}.`));
});
}
/** Just exported for tests. */
function setupOtel(
client,
options = {},
) {
// Create and configure NodeTracerProvider
const provider = new sdkTraceBase.BasicTracerProvider({
sampler: new opentelemetry.SentrySampler(client),
resource: resources.defaultResource().merge(
resources.resourceFromAttributes({
[semanticConventions.ATTR_SERVICE_NAME]: 'node',
// eslint-disable-next-line deprecation/deprecation
[semanticConventions.SEMRESATTRS_SERVICE_NAMESPACE]: 'sentry',
[semanticConventions.ATTR_SERVICE_VERSION]: core.SDK_VERSION,
}),
),
forceFlushTimeoutMillis: 500,
spanProcessors: [
new opentelemetry.SentrySpanProcessor({
timeout: _clampSpanProcessorTimeout(client.getOptions().maxSpanWaitDuration),
}),
...(options.spanProcessors || []),
],
});
// Register as globals
api.trace.setGlobalTracerProvider(provider);
api.propagation.setGlobalPropagator(new opentelemetry.SentryPropagator());
const ctxManager = new nodeCore.SentryContextManager();
api.context.setGlobalContextManager(ctxManager);
return [provider, ctxManager.getAsyncLocalStorageLookup()];
}
/** Just exported for tests. */
function _clampSpanProcessorTimeout(maxSpanWaitDuration) {
if (maxSpanWaitDuration == null) {
return undefined;
}
// We guard for a max. value here, because we create an array with this length
// So if this value is too large, this would fail
if (maxSpanWaitDuration > MAX_MAX_SPAN_WAIT_DURATION) {
debugBuild.DEBUG_BUILD &&
core.debug.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${MAX_MAX_SPAN_WAIT_DURATION}`);
return MAX_MAX_SPAN_WAIT_DURATION;
} else if (maxSpanWaitDuration <= 0 || Number.isNaN(maxSpanWaitDuration)) {
debugBuild.DEBUG_BUILD && core.debug.warn('`maxSpanWaitDuration` must be a positive number, using default value instead.');
return undefined;
}
return maxSpanWaitDuration;
}
exports._clampSpanProcessorTimeout = _clampSpanProcessorTimeout;
exports.initOpenTelemetry = initOpenTelemetry;
exports.preloadOpenTelemetry = preloadOpenTelemetry;
exports.setupOtel = setupOtel;
//# sourceMappingURL=initOtel.js.map

View File

@@ -0,0 +1,34 @@
import { CollectionType, RegularCollections } from "../../../types/schema.cjs";
import { ApplyQueryFields } from "../../../types/output.cjs";
import { Query, QueryItem } from "../../../types/query.cjs";
import { RestCommand } from "../../types.cjs";
//#region src/rest/commands/read/items.d.ts
type ReadItemOutput<Schema, Collection extends RegularCollections<Schema>, TQuery extends Query<Schema, CollectionType<Schema, Collection>>> = ApplyQueryFields<Schema, CollectionType<Schema, Collection>, TQuery['fields']>;
/**
* List all items that exist in Directus.
*
* @param collection The collection of the items
* @param query The query parameters
*
* @returns An array of up to limit item objects. If no items are available, data will be an empty array.
* @throws Will throw if collection is a core collection
* @throws Will throw if collection is empty
*/
declare const readItems: <Schema, Collection extends RegularCollections<Schema>, const TQuery extends Query<Schema, CollectionType<Schema, Collection>>>(collection: Collection, query?: TQuery) => RestCommand<ReadItemOutput<Schema, Collection, TQuery>[], Schema>;
/**
* Get an item that exists in Directus.
*
* @param collection The collection of the item
* @param key The primary key of the item
* @param query The query parameters
*
* @returns Returns an item object if a valid primary key was provided.
* @throws Will throw if collection is a core collection
* @throws Will throw if collection is empty
* @throws Will throw if key is empty
*/
declare const readItem: <Schema, Collection extends RegularCollections<Schema>, const TQuery extends QueryItem<Schema, CollectionType<Schema, Collection>>>(collection: Collection, key: string | number, query?: TQuery) => RestCommand<ReadItemOutput<Schema, Collection, TQuery>, Schema>;
//#endregion
export { ReadItemOutput, readItem, readItems };
//# sourceMappingURL=items.d.cts.map

View File

@@ -0,0 +1,41 @@
/* @minVersion 7.22.0 */
function dispose_SuppressedError(suppressed, error) {
if (typeof SuppressedError !== "undefined") {
// eslint-disable-next-line no-undef
dispose_SuppressedError = SuppressedError;
} else {
dispose_SuppressedError = function SuppressedError(suppressed, error) {
this.suppressed = suppressed;
this.error = error;
this.stack = new Error().stack;
};
dispose_SuppressedError.prototype = Object.create(Error.prototype, { constructor: { value: dispose_SuppressedError, writable: true, configurable: true } });
}
return new dispose_SuppressedError(suppressed, error);
}
function _dispose(stack, error, hasError) {
function next() {
while (stack.length > 0) {
try {
var r = stack.pop();
var p = r.d.call(r.v);
if (r.a) return Promise.resolve(p).then(next, err);
} catch (e) {
return err(e);
}
}
if (hasError) throw error;
}
function err(e) {
error = hasError ? new dispose_SuppressedError(e, error) : e;
hasError = true;
return next();
}
return next();
}
export { _dispose as _ };

View File

@@ -0,0 +1,8 @@
'use strict'
const warning = require('process-warning')()
module.exports = warning
// const warnName = 'PinoWarning'
// warning.create(warnName, 'PINODEP010', 'A new deprecation')

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/browser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,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 { _globalThis } from './globalThis';\n"]}

View File

@@ -0,0 +1,18 @@
/**
* @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 ListVideo = createLucideIcon("ListVideo", [
["path", { d: "M12 12H3", key: "18klou" }],
["path", { d: "M16 6H3", key: "1wxfjs" }],
["path", { d: "M12 18H3", key: "11ftsu" }],
["path", { d: "m16 12 5 3-5 3v-6Z", key: "zpskkp" }]
]);
export { ListVideo as default };
//# sourceMappingURL=list-video.js.map

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../../src/pg-core/columns/vector_extension/halfvec.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 PgHalfVectorBuilderInitial<TName extends string, TDimensions extends number> = PgHalfVectorBuilder<{\n\tname: TName;\n\tdataType: 'array';\n\tcolumnType: 'PgHalfVector';\n\tdata: number[];\n\tdriverParam: string;\n\tenumValues: undefined;\n\tdimensions: TDimensions;\n}>;\n\nexport class PgHalfVectorBuilder<T extends ColumnBuilderBaseConfig<'array', 'PgHalfVector'> & { dimensions: number }>\n\textends PgColumnBuilder<\n\t\tT,\n\t\t{ dimensions: T['dimensions'] },\n\t\t{ dimensions: T['dimensions'] }\n\t>\n{\n\tstatic override readonly [entityKind]: string = 'PgHalfVectorBuilder';\n\n\tconstructor(name: string, config: PgHalfVectorConfig<T['dimensions']>) {\n\t\tsuper(name, 'array', 'PgHalfVector');\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): PgHalfVector<MakeColumnConfig<T, TTableName> & { dimensions: T['dimensions'] }> {\n\t\treturn new PgHalfVector<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 PgHalfVector<T extends ColumnBaseConfig<'array', 'PgHalfVector'> & { dimensions: number }>\n\textends PgColumn<T, { dimensions: T['dimensions'] }, { dimensions: T['dimensions'] }>\n{\n\tstatic override readonly [entityKind]: string = 'PgHalfVector';\n\n\treadonly dimensions: T['dimensions'] = this.config.dimensions;\n\n\tgetSQLType(): string {\n\t\treturn `halfvec(${this.dimensions})`;\n\t}\n\n\toverride mapToDriverValue(value: unknown): unknown {\n\t\treturn JSON.stringify(value);\n\t}\n\n\toverride mapFromDriverValue(value: string): unknown {\n\t\treturn value\n\t\t\t.slice(1, -1)\n\t\t\t.split(',')\n\t\t\t.map((v) => Number.parseFloat(v));\n\t}\n}\n\nexport interface PgHalfVectorConfig<TDimensions extends number = number> {\n\tdimensions: TDimensions;\n}\n\nexport function halfvec<D extends number>(\n\tconfig: PgHalfVectorConfig<D>,\n): PgHalfVectorBuilderInitial<'', D>;\nexport function halfvec<TName extends string, D extends number>(\n\tname: TName,\n\tconfig: PgHalfVectorConfig,\n): PgHalfVectorBuilderInitial<TName, D>;\nexport function halfvec(a: string | PgHalfVectorConfig, b?: PgHalfVectorConfig) {\n\tconst { name, config } = getColumnNameAndConfig<PgHalfVectorConfig>(a, b);\n\treturn new PgHalfVectorBuilder(name, config);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,mBAAuC;AACvC,oBAA0C;AAYnC,MAAM,4BACJ,8BAKT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAc,QAA6C;AACtE,UAAM,MAAM,SAAS,cAAc;AACnC,SAAK,OAAO,aAAa,OAAO;AAAA,EACjC;AAAA;AAAA,EAGS,MACR,OACkF;AAClF,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,qBACJ,uBACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEvC,aAA8B,KAAK,OAAO;AAAA,EAEnD,aAAqB;AACpB,WAAO,WAAW,KAAK,UAAU;AAAA,EAClC;AAAA,EAES,iBAAiB,OAAyB;AAClD,WAAO,KAAK,UAAU,KAAK;AAAA,EAC5B;AAAA,EAES,mBAAmB,OAAwB;AACnD,WAAO,MACL,MAAM,GAAG,EAAE,EACX,MAAM,GAAG,EACT,IAAI,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAAA,EAClC;AACD;AAaO,SAAS,QAAQ,GAAgC,GAAwB;AAC/E,QAAM,EAAE,MAAM,OAAO,QAAI,qCAA2C,GAAG,CAAC;AACxE,SAAO,IAAI,oBAAoB,MAAM,MAAM;AAC5C;","names":[]}

View File

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

View File

@@ -0,0 +1,123 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "字符", verb: "包含" },
file: { unit: "字节", verb: "包含" },
array: { unit: "项", verb: "包含" },
set: { unit: "项", verb: "包含" },
};
function getSizing(origin: string): { unit: string; verb: string } | null {
return Sizable[origin] ?? null;
}
const parsedType = (data: any): string => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "非数字(NaN)" : "数字";
}
case "object": {
if (Array.isArray(data)) {
return "数组";
}
if (data === null) {
return "空值(null)";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "输入",
email: "电子邮件",
url: "URL",
emoji: "表情符号",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO日期时间",
date: "ISO日期",
time: "ISO时间",
duration: "ISO时长",
ipv4: "IPv4地址",
ipv6: "IPv6地址",
cidrv4: "IPv4网段",
cidrv6: "IPv6网段",
base64: "base64编码字符串",
base64url: "base64url编码字符串",
json_string: "JSON字符串",
e164: "E.164号码",
jwt: "JWT",
template_literal: "输入",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `无效输入:期望 ${issue.expected},实际接收 ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1) return `无效输入:期望 ${util.stringifyPrimitive(issue.values[0])}`;
return `无效选项:期望以下之一 ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `数值过大:期望 ${issue.origin ?? "值"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "个元素"}`;
return `数值过大:期望 ${issue.origin ?? "值"} ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `数值过小:期望 ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `数值过小:期望 ${issue.origin} ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") return `无效字符串:必须以 "${_issue.prefix}" 开头`;
if (_issue.format === "ends_with") return `无效字符串:必须以 "${_issue.suffix}" 结尾`;
if (_issue.format === "includes") return `无效字符串:必须包含 "${_issue.includes}"`;
if (_issue.format === "regex") return `无效字符串:必须满足正则表达式 ${_issue.pattern}`;
return `无效${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `无效数字:必须是 ${issue.divisor} 的倍数`;
case "unrecognized_keys":
return `出现未知的键(key): ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `${issue.origin} 中的键(key)无效`;
case "invalid_union":
return "无效输入";
case "invalid_element":
return `${issue.origin} 中包含无效值(value)`;
default:
return `无效输入`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}

View File

@@ -0,0 +1,40 @@
import { dsnToString, createEnvelope } from '@sentry/core';
/**
* Creates an envelope from a user feedback.
*/
function createUserFeedbackEnvelope(
feedback,
{
metadata,
tunnel,
dsn,
}
,
) {
const headers = {
event_id: feedback.event_id,
sent_at: new Date().toISOString(),
...(metadata?.sdk && {
sdk: {
name: metadata.sdk.name,
version: metadata.sdk.version,
},
}),
...(!!tunnel && !!dsn && { dsn: dsnToString(dsn) }),
};
const item = createUserFeedbackEnvelopeItem(feedback);
return createEnvelope(headers, [item]);
}
function createUserFeedbackEnvelopeItem(feedback) {
const feedbackHeaders = {
type: 'user_report',
};
return [feedbackHeaders, feedback];
}
export { createUserFeedbackEnvelope };
//# sourceMappingURL=userfeedback.js.map

View File

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

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