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,24 @@
export type Locales = ReadonlyArray<string>;
export type LocalePrefixMode = 'always' | 'as-needed' | 'never';
type Pathname = string;
export type LocalePrefixes<AppLocales extends Locales> = Partial<Record<AppLocales[number], Pathname>>;
export type LocalePrefixConfigVerbose<AppLocales extends Locales, AppLocalePrefixMode extends LocalePrefixMode> = AppLocalePrefixMode extends 'always' ? {
mode: 'always';
prefixes?: LocalePrefixes<AppLocales>;
} : AppLocalePrefixMode extends 'as-needed' ? {
mode: 'as-needed';
prefixes?: LocalePrefixes<AppLocales>;
} : {
mode: 'never';
};
export type LocalePrefix<AppLocales extends Locales = [], AppLocalePrefixMode extends LocalePrefixMode = 'always'> = AppLocalePrefixMode | LocalePrefixConfigVerbose<AppLocales, AppLocalePrefixMode>;
export type Pathnames<AppLocales extends Locales> = Record<Pathname, Partial<Record<AppLocales[number], Pathname>> | Pathname>;
export type DomainConfig<AppLocales extends Locales> = {
defaultLocale: AppLocales[number];
/** The domain name (e.g. "example.com", "www.example.com" or "fr.example.com"). Note that the `x-forwarded-host` or alternatively the `host` header will be used to determine the requested domain. */
domain: string;
/** The locales that are available on this domain. */
locales: Array<AppLocales[number]>;
};
export type DomainsConfig<AppLocales extends Locales> = Array<DomainConfig<AppLocales>>;
export {};

View File

@@ -0,0 +1,28 @@
/**
* @name closestTo
* @category Common Helpers
* @summary Return a date from the array closest to the given date.
*
* @description
* Return a date from the array closest to the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param dateToCompare - The date to compare with
* @param dates - The array to search
*
* @returns The date from the array closest to the given date or undefined if no valid value is given
*
* @example
* // Which date is closer to 6 September 2015: 1 January 2000 or 1 January 2030?
* const dateToCompare = new Date(2015, 8, 6)
* const result = closestTo(dateToCompare, [
* new Date(2000, 0, 1),
* new Date(2030, 0, 1)
* ])
* //=> Tue Jan 01 2030 00:00:00
*/
export declare function closestTo<DateType extends Date>(
dateToCompare: DateType | number | string,
dates: Array<DateType | number | string>,
): DateType | undefined;

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"names":["_getPrototypeOf","o","exports","default","Object","setPrototypeOf","getPrototypeOf","bind","__proto__"],"sources":["../../src/helpers/getPrototypeOf.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n\nexport default function _getPrototypeOf(o: object): any {\n // @ts-expect-error explicitly assign to function\n _getPrototypeOf = Object.setPrototypeOf\n ? // @ts-expect-error -- intentionally omitting the argument\n Object.getPrototypeOf.bind(/* undefined */)\n : function _getPrototypeOf<T extends object>(o: T) {\n return (o as any).__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n"],"mappings":";;;;;;AAEe,SAASA,eAAeA,CAACC,CAAS,EAAO;EAEtDC,OAAA,CAAAC,OAAA,GAAAH,eAAe,GAAGI,MAAM,CAACC,cAAc,GAEnCD,MAAM,CAACE,cAAc,CAACC,IAAI,CAAgB,CAAC,GAC3C,SAASP,eAAeA,CAAmBC,CAAI,EAAE;IAC/C,OAAQA,CAAC,CAASO,SAAS,IAAIJ,MAAM,CAACE,cAAc,CAACL,CAAC,CAAC;EACzD,CAAC;EACL,OAAOD,eAAe,CAACC,CAAC,CAAC;AAC3B","ignoreList":[]}

View File

@@ -0,0 +1,54 @@
import { toDate } from "./toDate.mjs";
/**
* @name compareDesc
* @category Common Helpers
* @summary Compare the two dates reverse chronologically and return -1, 0 or 1.
*
* @description
* Compare the two dates and return -1 if the first date is after the second,
* 1 if the first date is before the second or 0 if dates are equal.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param dateLeft - The first date to compare
* @param dateRight - The second date to compare
*
* @returns The result of the comparison
*
* @example
* // Compare 11 February 1987 and 10 July 1989 reverse chronologically:
* const result = compareDesc(new Date(1987, 1, 11), new Date(1989, 6, 10))
* //=> 1
*
* @example
* // Sort the array of dates in reverse chronological order:
* const result = [
* new Date(1995, 6, 2),
* new Date(1987, 1, 11),
* new Date(1989, 6, 10)
* ].sort(compareDesc)
* //=> [
* // Sun Jul 02 1995 00:00:00,
* // Mon Jul 10 1989 00:00:00,
* // Wed Feb 11 1987 00:00:00
* // ]
*/
export function compareDesc(dateLeft, dateRight) {
const _dateLeft = toDate(dateLeft);
const _dateRight = toDate(dateRight);
const diff = _dateLeft.getTime() - _dateRight.getTime();
if (diff > 0) {
return -1;
} else if (diff < 0) {
return 1;
// Return 0 if diff is 0; return NaN if diff is NaN
} else {
return diff;
}
}
// Fallback for modularized imports:
export default compareDesc;

View File

@@ -0,0 +1 @@
{"version":3,"file":"blocks-as-json.d.ts","sourceRoot":"","sources":["../../src/predefinedMigrations/blocks-as-json.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAIvD,eAAO,MAAM,OAAO,EAAE,wBAEpB,CAAA"}

View File

@@ -0,0 +1,41 @@
import { sql } from '@vercel/postgres';
import type { Cache } from "../cache/core/cache.cjs";
import { entityKind } from "../entity.cjs";
import type { Logger } from "../logger.cjs";
import { PgDatabase } from "../pg-core/db.cjs";
import { PgDialect } from "../pg-core/index.cjs";
import { type RelationalSchemaConfig, type TablesRelationalConfig } from "../relations.cjs";
import { type DrizzleConfig } from "../utils.cjs";
import { type VercelPgClient, type VercelPgQueryResultHKT, VercelPgSession } from "./session.cjs";
export interface VercelPgDriverOptions {
logger?: Logger;
cache?: Cache;
}
export declare class VercelPgDriver {
private client;
private dialect;
private options;
static readonly [entityKind]: string;
constructor(client: VercelPgClient, dialect: PgDialect, options?: VercelPgDriverOptions);
createSession(schema: RelationalSchemaConfig<TablesRelationalConfig> | undefined): VercelPgSession<Record<string, unknown>, TablesRelationalConfig>;
}
export declare class VercelPgDatabase<TSchema extends Record<string, unknown> = Record<string, never>> extends PgDatabase<VercelPgQueryResultHKT, TSchema> {
static readonly [entityKind]: string;
}
export declare function drizzle<TSchema extends Record<string, unknown> = Record<string, never>, TClient extends VercelPgClient = typeof sql>(...params: [] | [
TClient
] | [
TClient,
DrizzleConfig<TSchema>
] | [
(DrizzleConfig<TSchema> & ({
client?: TClient;
}))
]): VercelPgDatabase<TSchema> & {
$client: VercelPgClient extends TClient ? typeof sql : TClient;
};
export declare namespace drizzle {
function mock<TSchema extends Record<string, unknown> = Record<string, never>>(config?: DrizzleConfig<TSchema>): VercelPgDatabase<TSchema> & {
$client: '$client is not available on drizzle.mock()';
};
}

View File

@@ -0,0 +1,91 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import { useLexicalCommandsLog, TreeView as TreeView$1, generateContent } from '@lexical/devtools-core';
import { mergeRegister } from '@lexical/utils';
import * as React from 'react';
import { useState, useEffect } from 'react';
import { jsx } from 'react/jsx-runtime';
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
function TreeView({
treeTypeButtonClassName,
timeTravelButtonClassName,
timeTravelPanelSliderClassName,
timeTravelPanelButtonClassName,
timeTravelPanelClassName,
viewClassName,
editor,
customPrintNode
}) {
const treeElementRef = /*#__PURE__*/React.createRef();
const [editorCurrentState, setEditorCurrentState] = useState(editor.getEditorState());
const commandsLog = useLexicalCommandsLog(editor);
useEffect(() => {
// Registers listeners to update the tree view when the editor state changes
return mergeRegister(editor.registerUpdateListener(({
editorState
}) => {
setEditorCurrentState(editorState);
}), editor.registerEditableListener(() => {
setEditorCurrentState(editor.getEditorState());
}));
}, [editor]);
useEffect(() => {
const element = treeElementRef.current;
if (element !== null) {
// Assigns the editor instance to the tree view DOM element for internal tracking
// @ts-ignore Internal field used by Lexical
element.__lexicalEditor = editor;
return () => {
// Cleans up the reference when the component is unmounted
// @ts-ignore Internal field used by Lexical
element.__lexicalEditor = null;
};
}
}, [editor, treeElementRef]);
/**
* Handles toggling the readonly state of the editor.
*
* @param {boolean} isReadonly - Whether the editor should be set to readonly.
*/
const handleEditorReadOnly = isReadonly => {
const rootElement = editor.getRootElement();
if (rootElement == null) {
return;
}
rootElement.contentEditable = isReadonly ? 'false' : 'true';
};
return /*#__PURE__*/jsx(TreeView$1, {
treeTypeButtonClassName: treeTypeButtonClassName,
timeTravelButtonClassName: timeTravelButtonClassName,
timeTravelPanelSliderClassName: timeTravelPanelSliderClassName,
timeTravelPanelButtonClassName: timeTravelPanelButtonClassName,
viewClassName: viewClassName,
timeTravelPanelClassName: timeTravelPanelClassName,
setEditorReadOnly: handleEditorReadOnly,
editorState: editorCurrentState,
setEditorState: state => editor.setEditorState(state),
generateContent: async function (exportDOM) {
// Generates the content for the tree view, allowing customization with exportDOM and customPrintNode
return generateContent(editor, commandsLog, exportDOM, customPrintNode);
},
ref: treeElementRef,
commandsLog: commandsLog
});
}
export { TreeView };

View File

@@ -0,0 +1,39 @@
/**
* @name formatISODuration
* @category Common Helpers
* @summary Format a duration object according as ISO 8601 duration string
*
* @description
* Format a duration object according to the ISO 8601 duration standard (https://www.digi.com/resources/documentation/digidocs//90001488-13/reference/r_iso_8601_duration_format.htm)
*
* @param duration - The duration to format
*
* @returns The ISO 8601 duration string
*
* @example
* // Format the given duration as ISO 8601 string
* const result = formatISODuration({
* years: 39,
* months: 2,
* days: 20,
* hours: 7,
* minutes: 5,
* seconds: 0
* })
* //=> 'P39Y2M20DT0H0M0S'
*/
export function formatISODuration(duration) {
const {
years = 0,
months = 0,
days = 0,
hours = 0,
minutes = 0,
seconds = 0,
} = duration;
return `P${years}Y${months}M${days}DT${hours}H${minutes}M${seconds}S`;
}
// Fallback for modularized imports:
export default formatISODuration;

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 FilePlus = createLucideIcon("FilePlus", [
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
["path", { d: "M9 15h6", key: "cctwl0" }],
["path", { d: "M12 18v-6", key: "17g6i2" }]
]);
export { FilePlus as default };
//# sourceMappingURL=file-plus.js.map

View File

@@ -0,0 +1,26 @@
/** Used for built-in method references. */
var funcProto = Function.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;
/**
* Converts `func` to its source code.
*
* @private
* @param {Function} func The function to convert.
* @returns {string} Returns the source code.
*/
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {}
try {
return (func + '');
} catch (e) {}
}
return '';
}
module.exports = toSource;

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9saWIvbWFyay1yZWFkb25seS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgUmVhZG9ubHlLZXlzIH0gZnJvbSBcIi4uL3JlYWRvbmx5LWtleXNcIjtcbmltcG9ydCB7IFdyaXRhYmxlIH0gZnJvbSBcIi4uL3dyaXRhYmxlXCI7XG5cbmV4cG9ydCB0eXBlIE1hcmtSZWFkb25seTxUeXBlLCBLZXlzIGV4dGVuZHMga2V5b2YgVHlwZT4gPSBUeXBlIGV4dGVuZHMgVHlwZVxuICA/IFJlYWRvbmx5PFR5cGU+ICZcbiAgICAgIFdyaXRhYmxlPFBpY2s8VHlwZSwgRXhjbHVkZTxrZXlvZiBUeXBlLCBLZXlzIHwgKFR5cGUgZXh0ZW5kcyBvYmplY3QgPyBSZWFkb25seUtleXM8VHlwZT4gOiBuZXZlcik+Pj5cbiAgOiBuZXZlcjtcbiJdfQ==

View File

@@ -0,0 +1 @@
{"version":3,"file":"cloud-upload.js","sources":["../../../src/icons/cloud-upload.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CloudUpload\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMTN2OCIgLz4KICA8cGF0aCBkPSJNNCAxNC44OTlBNyA3IDAgMSAxIDE1LjcxIDhoMS43OWE0LjUgNC41IDAgMCAxIDIuNSA4LjI0MiIgLz4KICA8cGF0aCBkPSJtOCAxNyA0LTQgNCA0IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/cloud-upload\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 CloudUpload = createLucideIcon('CloudUpload', [\n ['path', { d: 'M12 13v8', key: '1l5pq0' }],\n ['path', { d: 'M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242', key: '1pljnt' }],\n ['path', { d: 'm8 17 4-4 4 4', key: '1quai1' }],\n]);\n\nexport default CloudUpload;\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,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAChD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,116 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.InvalidPointerError = exports.TimeoutError = exports.MissingPointerError = exports.UnmatchedResolverError = exports.ResolverError = exports.UnmatchedParserError = exports.ParserError = exports.JSONParserErrorGroup = exports.JSONParserError = void 0;
exports.isHandledError = isHandledError;
exports.normalizeError = normalizeError;
const ono_1 = require("@jsdevtools/ono");
const url_js_1 = require("./url.js");
class JSONParserError extends Error {
constructor(message, source) {
super();
this.code = "EUNKNOWN";
this.name = "JSONParserError";
this.message = message;
this.source = source;
this.path = null;
ono_1.Ono.extend(this);
}
get footprint() {
return `${this.path}+${this.source}+${this.code}+${this.message}`;
}
}
exports.JSONParserError = JSONParserError;
class JSONParserErrorGroup extends Error {
constructor(parser) {
super();
this.files = parser;
this.name = "JSONParserErrorGroup";
this.message = `${this.errors.length} error${this.errors.length > 1 ? "s" : ""} occurred while reading '${(0, url_js_1.toFileSystemPath)(parser.$refs._root$Ref.path)}'`;
ono_1.Ono.extend(this);
}
static getParserErrors(parser) {
const errors = [];
for (const $ref of Object.values(parser.$refs._$refs)) {
if ($ref.errors) {
errors.push(...$ref.errors);
}
}
return errors;
}
get errors() {
return JSONParserErrorGroup.getParserErrors(this.files);
}
}
exports.JSONParserErrorGroup = JSONParserErrorGroup;
class ParserError extends JSONParserError {
constructor(message, source) {
super(`Error parsing ${source}: ${message}`, source);
this.code = "EPARSER";
this.name = "ParserError";
}
}
exports.ParserError = ParserError;
class UnmatchedParserError extends JSONParserError {
constructor(source) {
super(`Could not find parser for "${source}"`, source);
this.code = "EUNMATCHEDPARSER";
this.name = "UnmatchedParserError";
}
}
exports.UnmatchedParserError = UnmatchedParserError;
class ResolverError extends JSONParserError {
constructor(ex, source) {
super(ex.message || `Error reading file "${source}"`, source);
this.code = "ERESOLVER";
this.name = "ResolverError";
if ("code" in ex) {
this.ioErrorCode = String(ex.code);
}
}
}
exports.ResolverError = ResolverError;
class UnmatchedResolverError extends JSONParserError {
constructor(source) {
super(`Could not find resolver for "${source}"`, source);
this.code = "EUNMATCHEDRESOLVER";
this.name = "UnmatchedResolverError";
}
}
exports.UnmatchedResolverError = UnmatchedResolverError;
class MissingPointerError extends JSONParserError {
constructor(token, path, targetRef, targetFound, parentPath) {
super(`Missing $ref pointer "${(0, url_js_1.getHash)(path)}". Token "${token}" does not exist.`, (0, url_js_1.stripHash)(path));
this.code = "EMISSINGPOINTER";
this.name = "MissingPointerError";
this.targetToken = token;
this.targetRef = targetRef;
this.targetFound = targetFound;
this.parentPath = parentPath;
}
}
exports.MissingPointerError = MissingPointerError;
class TimeoutError extends JSONParserError {
constructor(timeout) {
super(`Dereferencing timeout reached: ${timeout}ms`);
this.code = "ETIMEOUT";
this.name = "TimeoutError";
}
}
exports.TimeoutError = TimeoutError;
class InvalidPointerError extends JSONParserError {
constructor(pointer, path) {
super(`Invalid $ref pointer "${pointer}". Pointers must begin with "#/"`, (0, url_js_1.stripHash)(path));
this.code = "EUNMATCHEDRESOLVER";
this.name = "InvalidPointerError";
}
}
exports.InvalidPointerError = InvalidPointerError;
function isHandledError(err) {
return err instanceof JSONParserError || err instanceof JSONParserErrorGroup;
}
function normalizeError(err) {
if (err.path === null) {
err.path = [];
}
return err;
}

View File

@@ -0,0 +1,8 @@
The MIT License (MIT)
Copyright (c) 2015 Dmitry Ivanov
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,49 @@
Prism.languages.jsstacktrace = {
'error-message': {
pattern: /^\S.*/m,
alias: 'string'
},
'stack-frame': {
pattern: /(^[ \t]+)at[ \t].*/m,
lookbehind: true,
inside: {
'not-my-code': {
pattern: /^at[ \t]+(?!\s)(?:node\.js|<unknown>|.*(?:node_modules|\(<anonymous>\)|\(<unknown>|<anonymous>$|\(internal\/|\(node\.js)).*/m,
alias: 'comment'
},
'filename': {
pattern: /(\bat\s+(?!\s)|\()(?:[a-zA-Z]:)?[^():]+(?=:)/,
lookbehind: true,
alias: 'url'
},
'function': {
pattern: /(\bat\s+(?:new\s+)?)(?!\s)[_$a-zA-Z\xA0-\uFFFF<][.$\w\xA0-\uFFFF<>]*/,
lookbehind: true,
inside: {
'punctuation': /\./
}
},
'punctuation': /[()]/,
'keyword': /\b(?:at|new)\b/,
'alias': {
pattern: /\[(?:as\s+)?(?!\s)[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\]/,
alias: 'variable'
},
'line-number': {
pattern: /:\d+(?::\d+)?\b/,
alias: 'number',
inside: {
'punctuation': /:/
}
},
}
}
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"square-stack.js","sources":["../../../src/icons/square-stack.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SquareStack\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCAxMGMtMS4xIDAtMi0uOS0yLTJWNGMwLTEuMS45LTIgMi0yaDRjMS4xIDAgMiAuOSAyIDIiIC8+CiAgPHBhdGggZD0iTTEwIDE2Yy0xLjEgMC0yLS45LTItMnYtNGMwLTEuMS45LTIgMi0yaDRjMS4xIDAgMiAuOSAyIDIiIC8+CiAgPHJlY3Qgd2lkdGg9IjgiIGhlaWdodD0iOCIgeD0iMTQiIHk9IjE0IiByeD0iMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/square-stack\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 SquareStack = createLucideIcon('SquareStack', [\n ['path', { d: 'M4 10c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h4c1.1 0 2 .9 2 2', key: '4i38lg' }],\n ['path', { d: 'M10 16c-1.1 0-2-.9-2-2v-4c0-1.1.9-2 2-2h4c1.1 0 2 .9 2 2', key: 'mlte4a' }],\n ['rect', { width: '8', height: '8', x: '14', y: '14', rx: '2', key: '1fa9i4' }],\n]);\n\nexport default SquareStack;\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,CAA0D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACvF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAK,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAG,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAChF,CAAC,CAAA,CAAA;;"}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEI,MAAM,aAAa,GAAG,CAAI,GAAY,EAAyB,EAAE;IACtE,OAAO,CACL,GAAG,KAAK,IAAI;QACZ,OAAO,GAAG,KAAK,QAAQ;QACvB,OAAQ,GAA+B,CAAC,IAAI,KAAK,UAAU,CAC5D,CAAC;AACJ,CAAC,CAAC;AANW,QAAA,aAAa,iBAMxB","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 const isPromiseLike = <R>(val: unknown): val is PromiseLike<R> => {\n return (\n val !== null &&\n typeof val === 'object' &&\n typeof (val as Partial<PromiseLike<R>>).then === 'function'\n );\n};\n"]}

View File

@@ -0,0 +1,37 @@
{
"name": "@pinojs/redact",
"version": "0.4.0",
"description": "Redact JS objects",
"main": "index.js",
"types": "index.d.ts",
"scripts": {
"test": "node --test && npm run test:types",
"test:integration": "node --test test/integration.test.js",
"test:types": "tsd",
"test:all": "node --test test/*.test.js",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"bench": "node benchmarks/basic.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/pinojs/redact.git"
},
"keywords": [
"redact"
],
"author": "Matteo Collina <hello@matteocollina.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/pinojs/redact/issues"
},
"homepage": "https://github.com/pinojs/redact#readme",
"devDependencies": {
"eslint": "^9.36.0",
"fast-redact": "^3.5.0",
"mitata": "^1.0.34",
"neostandard": "^0.12.2",
"tsd": "^0.33.0",
"typescript": "^5.9.2"
}
}

View File

@@ -0,0 +1,74 @@
import { hasAutosaveEnabled, hasDraftsEnabled } from '../utilities/getVersionsConfig.js';
import { versionSnapshotField } from './baseFields.js';
export const buildVersionCollectionFields = (config, collection, flatten)=>{
const fields = [
{
name: 'parent',
type: 'relationship',
index: true,
relationTo: collection.slug
},
{
name: 'version',
type: 'group',
fields: collection.fields.filter((field)=>!('name' in field) || field.name !== 'id'),
...flatten && {
flattenedFields: collection.flattenedFields.filter((each)=>each.name !== 'id')
}
},
{
name: 'createdAt',
type: 'date',
admin: {
disabled: true
},
index: true
},
{
name: 'updatedAt',
type: 'date',
admin: {
disabled: true
},
index: true
}
];
if (hasDraftsEnabled(collection)) {
if (config.localization) {
fields.push(versionSnapshotField);
fields.push({
name: 'publishedLocale',
type: 'select',
admin: {
disableBulkEdit: true,
disabled: true
},
index: true,
options: config.localization.locales.map((locale)=>{
if (typeof locale === 'string') {
return locale;
}
return locale.code;
})
});
}
fields.push({
name: 'latest',
type: 'checkbox',
admin: {
disabled: true
},
index: true
});
if (hasAutosaveEnabled(collection)) {
fields.push({
name: 'autosave',
type: 'checkbox',
index: true
});
}
}
return fields;
};
//# sourceMappingURL=buildCollectionFields.js.map

View File

@@ -0,0 +1,16 @@
/**
* PII filtering for MCP server spans
*
* Removes network-level sensitive data when sendDefaultPii is false.
* Input/output data (request arguments, tool/prompt results) is controlled
* separately via recordInputs/recordOutputs options.
*/
import type { SpanAttributeValue } from '../../types-hoist/span';
/**
* Removes network PII attributes from span data when sendDefaultPii is false
* @param spanData - Raw span attributes
* @param sendDefaultPii - Whether to include PII data
* @returns Filtered span attributes
*/
export declare function filterMcpPiiFromSpanData(spanData: Record<string, unknown>, sendDefaultPii: boolean): Record<string, SpanAttributeValue>;
//# sourceMappingURL=piiFiltering.d.ts.map

View File

@@ -0,0 +1,56 @@
import { IfNever, UnpackList } from "./utils.js";
import { ItemType, RelationalFields, RemoveRelationships } from "./schema.js";
import { FunctionFields } from "./functions.js";
import { ExtractItem } from "./query.js";
//#region src/types/fields.d.ts
/**
* Fields querying, including nested relational fields
*/
type QueryFields<Schema, Item> = WrapQueryFields<Schema, Item, QueryFieldsRelational<Schema, UnpackList<Item>>>;
/**
* Wrap array of fields
*/
type WrapQueryFields<Schema, Item, NestedFields> = readonly ('*' | keyof UnpackList<Item> | NestedFields | FunctionFields<Schema, UnpackList<Item>>)[];
/**
* Object of nested relational fields in a given Item with it's own fields available for selection
*/
type QueryFieldsRelational<Schema, Item> = IfNever<RelationalFields<Schema, Item>, never, { [Key in RelationalFields<Schema, Item>]?: Extract<Item[Key], ItemType<Schema>> extends infer RelatedCollection ? RelatedCollection extends any[] ? HasManyToAnyRelation<RelatedCollection> extends never ? QueryFields<Schema, RelatedCollection> : ManyToAnyFields<Schema, RelatedCollection> : QueryFields<Schema, RelatedCollection> : never }>;
/**
* Deal with many-to-any relational fields
*/
type ManyToAnyFields<Schema, Item> = ExtractItem<Schema, Item> extends infer TItem ? TItem extends object ? 'collection' extends keyof TItem ? 'item' extends keyof TItem ? WrapQueryFields<Schema, TItem, Omit<QueryFieldsRelational<Schema, UnpackList<Item>>, 'item'> & {
item?: { [Collection in keyof Schema as Collection extends TItem['collection'] ? Collection : never]?: QueryFields<Schema, Schema[Collection]> };
}> : never : never : never : never;
/**
* Determine whether a field definition has a many-to-any relation
* TODO try making this dynamic somehow instead of relying on "item" as key
*/
type HasManyToAnyRelation<Item> = UnpackList<Item> extends infer TItem ? TItem extends object ? 'collection' extends keyof TItem ? 'item' extends keyof TItem ? true : never : never : never : never;
/**
* Returns true if the Fields has any nested field
*/
type HasNestedFields<Fields> = UnpackList<Fields> extends infer Field ? (Field extends object ? true : never) : never;
/**
* Return all keys if Fields is undefined or contains '*'
*/
type FieldsWildcard<Item extends object, Fields> = unknown extends Fields ? keyof Item : UnpackList<Fields> extends infer Field ? Field extends undefined ? keyof Item : Field extends '*' ? keyof Item : Field extends string ? Field : never : never;
/**
* Returns the relational fields from the fields list
*/
type PickRelationalFields<Fields> = MergeRelations<UnpackList<Fields> extends infer Field ? (Field extends object ? Field : never) : never>;
type MergeRelations<RelationalFields$1 extends object | never> = { [Key in AllKeys<RelationalFields$1>]: PickType<RelationalFields$1, Key> };
type PickType<T, K extends AllKeys<T>> = T extends { [k in K]?: any } ? T[K] : undefined;
type AllKeys<T> = T extends any ? keyof T : never;
/**
* Extract the required fields from an item
*/
type PickFlatFields<Schema, Item, Fields> = Extract<Fields, keyof Item> extends never ? never : Pick<RemoveRelationships<Schema, Item>, Extract<Fields, keyof Item>>;
/**
* Extract a specific literal type from a collection
*/
type LiteralFields<Item, Type extends string> = { [Key in keyof Item]: Extract<Item[Key], Type>[] extends never[] ? never : Key }[keyof Item];
//#endregion
export { FieldsWildcard, HasManyToAnyRelation, HasNestedFields, LiteralFields, ManyToAnyFields, PickFlatFields, PickRelationalFields, QueryFields, QueryFieldsRelational, WrapQueryFields };
//# sourceMappingURL=fields.d.ts.map

View File

@@ -0,0 +1,24 @@
/**
* @license React
* react-compiler-runtime.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
"production" !== process.env.NODE_ENV &&
(function () {
var ReactSharedInternals =
require("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
exports.c = function (size) {
var dispatcher = ReactSharedInternals.H;
null === dispatcher &&
console.error(
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
);
return dispatcher.useMemoCache(size);
};
})();

View File

@@ -0,0 +1 @@
{"version":3,"file":"getClientSchemaMap.d.ts","sourceRoot":"","sources":["../../src/utilities/getClientSchemaMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAY1F,eAAO,MAAM,kBAAkB,SACtB;IACL,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,MAAM,EAAE,YAAY,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,UAAU,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,cAAc,CAAA;CAC1B,KAAG,oBAgCL,CAAA"}

View File

@@ -0,0 +1,28 @@
"use strict";
exports.getDay = getDay;
var _index = require("./toDate.js");
/**
* @name getDay
* @category Weekday Helpers
* @summary Get the day of the week of the given date.
*
* @description
* Get the day of the week of the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The given date
*
* @returns The day of week, 0 represents Sunday
*
* @example
* // Which day of the week is 29 February 2012?
* const result = getDay(new Date(2012, 1, 29))
* //=> 3
*/
function getDay(date) {
const _date = (0, _index.toDate)(date);
const day = _date.getDay();
return day;
}

View File

@@ -0,0 +1,3 @@
import type { GenerateViewMetadata } from '../Root/index.js';
export declare const generateUnauthorizedViewMetadata: GenerateViewMetadata;
//# sourceMappingURL=metadata.d.ts.map

View File

@@ -0,0 +1 @@
!function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var n={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var t="(?:"+["([^a-zA-Z0-9\\s{(\\[<=])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1","\\((?:[^()\\\\]|\\\\[^]|\\((?:[^()\\\\]|\\\\[^])*\\))*\\)","\\{(?:[^{}\\\\]|\\\\[^]|\\{(?:[^{}\\\\]|\\\\[^])*\\})*\\}","\\[(?:[^\\[\\]\\\\]|\\\\[^]|\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\])*\\]","<(?:[^<>\\\\]|\\\\[^]|<(?:[^<>\\\\]|\\\\[^])*>)*>"].join("|")+")",i='(?:"(?:\\\\.|[^"\\\\\r\n])*"|(?:\\b[a-zA-Z_]\\w*|[^\\s\0-\\x7F]+)[?!]?|\\$.)';e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp("%r"+t+"[egimnosux]{0,6}"),greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp("(^|[^:]):"+i),lookbehind:!0,greedy:!0},{pattern:RegExp("([\r\n{(,][ \t]*)"+i+"(?=:(?!:))"),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp("%[qQiIwWs]?"+t),greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp("%x"+t),greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(Prism);

View File

@@ -0,0 +1,133 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.js";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.js";
const matchOrdinalNumberPattern = /^(\d+)(\.)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,
abbreviated: /^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,
wide: /^(viru Christus|virun eiser Zäitrechnung|no Christus|eiser Zäitrechnung)/i,
};
const parseEraPatterns = {
any: [/^v/i, /^n/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^q[1234]/i,
wide: /^[1234](\.)? Quartal/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[jfmasond]/i,
abbreviated: /^(jan|feb|mäe|abr|mee|jun|jul|aug|sep|okt|nov|dez)/i,
wide: /^(januar|februar|mäerz|abrëll|mee|juni|juli|august|september|oktober|november|dezember)/i,
};
const parseMonthPatterns = {
narrow: [
/^j/i,
/^f/i,
/^m/i,
/^a/i,
/^m/i,
/^j/i,
/^j/i,
/^a/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
any: [
/^ja/i,
/^f/i,
/^mä/i,
/^ab/i,
/^me/i,
/^jun/i,
/^jul/i,
/^au/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
};
const matchDayPatterns = {
narrow: /^[smdf]/i,
short: /^(so|mé|dë|më|do|fr|sa)/i,
abbreviated: /^(son?|méi?|dën?|mët?|don?|fre?|sam?)\.?/i,
wide: /^(sonndeg|méindeg|dënschdeg|mëttwoch|donneschdeg|freideg|samschdeg)/i,
};
const parseDayPatterns = {
any: [/^so/i, /^mé/i, /^dë/i, /^më/i, /^do/i, /^f/i, /^sa/i],
};
const matchDayPeriodPatterns = {
narrow: /^(mo\.?|nomë\.?|Mëtternuecht|mëttes|moies|nomëttes|owes|nuets)/i,
abbreviated:
/^(moi\.?|nomët\.?|Mëtternuecht|mëttes|moies|nomëttes|owes|nuets)/i,
wide: /^(moies|nomëttes|Mëtternuecht|mëttes|moies|nomëttes|owes|nuets)/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^m/i,
pm: /^n/i,
midnight: /^Mëtter/i,
noon: /^mëttes/i,
morning: /moies/i,
afternoon: /nomëttes/i, // will never be matched. Afternoon is matched by `pm`
evening: /owes/i,
night: /nuets/i, // will never be matched. Night is matched by `pm`
},
};
export const match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
};

View File

@@ -0,0 +1,58 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { _globalThis } from '../platform';
import { VERSION } from '../version';
import { isCompatible } from './semver';
const major = VERSION.split('.')[0];
const GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);
const _global = _globalThis;
export function registerGlobal(type, instance, diag, allowOverride = false) {
var _a;
const api = (_global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : {
version: VERSION,
});
if (!allowOverride && api[type]) {
// already registered an API of this type
const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);
diag.error(err.stack || err.message);
return false;
}
if (api.version !== VERSION) {
// All registered APIs must be of the same version exactly
const err = new Error(`@opentelemetry/api: Registration of version v${api.version} for ${type} does not match previously registered API v${VERSION}`);
diag.error(err.stack || err.message);
return false;
}
api[type] = instance;
diag.debug(`@opentelemetry/api: Registered a global for ${type} v${VERSION}.`);
return true;
}
export function getGlobal(type) {
var _a, _b;
const globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version;
if (!globalVersion || !isCompatible(globalVersion)) {
return;
}
return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];
}
export function unregisterGlobal(type, diag) {
diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${VERSION}.`);
const api = _global[GLOBAL_OPENTELEMETRY_API_KEY];
if (api) {
delete api[type];
}
}
//# sourceMappingURL=global-utils.js.map

View File

@@ -0,0 +1,246 @@
import { debug, consoleSandbox, getCurrentScope, applySdkMetadata, GLOBAL_OBJ, envToBool, stackParserFromStackParserOptions, getIntegrationsToSetup, propagationContextFromHeaders, inboundFiltersIntegration, functionToStringIntegration, linkedErrorsIntegration, requestDataIntegration, conversationIdIntegration, consoleIntegration, hasSpansEnabled } from '@sentry/core';
import { setOpenTelemetryContextAsyncContextStrategy, enhanceDscWithOpenTelemetryRootSpanName, setupEventContextTrace, openTelemetrySetupCheck } from '@sentry/opentelemetry';
import { DEBUG_BUILD } from '../debug-build.js';
import { childProcessIntegration } from '../integrations/childProcess.js';
import { nodeContextIntegration } from '../integrations/context.js';
import { contextLinesIntegration } from '../integrations/contextlines.js';
import { httpIntegration } from '../integrations/http/index.js';
import { localVariablesIntegration } from '../integrations/local-variables/index.js';
import { modulesIntegration } from '../integrations/modules.js';
import { nativeNodeFetchIntegration } from '../integrations/node-fetch/index.js';
import { onUncaughtExceptionIntegration } from '../integrations/onuncaughtexception.js';
import { onUnhandledRejectionIntegration } from '../integrations/onunhandledrejection.js';
import { processSessionIntegration } from '../integrations/processSession.js';
import { INTEGRATION_NAME, spotlightIntegration } from '../integrations/spotlight.js';
import { systemErrorIntegration } from '../integrations/systemError.js';
import { makeNodeTransport } from '../transports/http.js';
import { isCjs } from '../utils/detection.js';
import { getSpotlightConfig } from '../utils/spotlight.js';
import { defaultStackParser, getSentryRelease } from './api.js';
import { NodeClient } from './client.js';
import { initializeEsmLoader } from './esmLoader.js';
/**
* Get default integrations for the Node-Core SDK.
*/
function getDefaultIntegrations() {
return [
// Common
// TODO(v11): Replace with `eventFiltersIntegration` once we remove the deprecated `inboundFiltersIntegration`
// eslint-disable-next-line deprecation/deprecation
inboundFiltersIntegration(),
functionToStringIntegration(),
linkedErrorsIntegration(),
requestDataIntegration(),
systemErrorIntegration(),
conversationIdIntegration(),
// Native Wrappers
consoleIntegration(),
httpIntegration(),
nativeNodeFetchIntegration(),
// Global Handlers
onUncaughtExceptionIntegration(),
onUnhandledRejectionIntegration(),
// Event Info
contextLinesIntegration(),
localVariablesIntegration(),
nodeContextIntegration(),
childProcessIntegration(),
processSessionIntegration(),
modulesIntegration(),
];
}
/**
* Initialize Sentry for Node.
*/
function init(options = {}) {
return _init(options, getDefaultIntegrations);
}
/**
* Initialize Sentry for Node, without any integrations added by default.
*/
function initWithoutDefaultIntegrations(options = {}) {
return _init(options, () => []);
}
/**
* Initialize Sentry for Node, without performance instrumentation.
*/
function _init(
_options = {},
getDefaultIntegrationsImpl,
) {
const options = getClientOptions(_options, getDefaultIntegrationsImpl);
if (options.debug === true) {
if (DEBUG_BUILD) {
debug.enable();
} else {
// use `console.warn` rather than `debug.warn` since by non-debug bundles have all `debug.x` statements stripped
consoleSandbox(() => {
// eslint-disable-next-line no-console
console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');
});
}
}
if (options.registerEsmLoaderHooks !== false) {
initializeEsmLoader();
}
setOpenTelemetryContextAsyncContextStrategy();
const scope = getCurrentScope();
scope.update(options.initialScope);
if (options.spotlight && !options.integrations.some(({ name }) => name === INTEGRATION_NAME)) {
options.integrations.push(
spotlightIntegration({
sidecarUrl: typeof options.spotlight === 'string' ? options.spotlight : undefined,
}),
);
}
applySdkMetadata(options, 'node-core');
const client = new NodeClient(options);
// The client is on the current scope, from where it generally is inherited
getCurrentScope().setClient(client);
client.init();
GLOBAL_OBJ._sentryInjectLoaderHookRegister?.();
debug.log(`SDK initialized from ${isCjs() ? 'CommonJS' : 'ESM'}`);
client.startClientReportTracking();
updateScopeFromEnvVariables();
enhanceDscWithOpenTelemetryRootSpanName(client);
setupEventContextTrace(client);
// Ensure we flush events when vercel functions are ended
// See: https://vercel.com/docs/functions/functions-api-reference#sigterm-signal
if (process.env.VERCEL) {
process.on('SIGTERM', async () => {
// We have 500ms for processing here, so we try to make sure to have enough time to send the events
await client.flush(200);
});
}
return client;
}
/**
* Validate that your OpenTelemetry setup is correct.
*/
function validateOpenTelemetrySetup() {
if (!DEBUG_BUILD) {
return;
}
const setup = openTelemetrySetupCheck();
const required = ['SentryContextManager', 'SentryPropagator'];
if (hasSpansEnabled()) {
required.push('SentrySpanProcessor');
}
for (const k of required) {
if (!setup.includes(k)) {
debug.error(
`You have to set up the ${k}. Without this, the OpenTelemetry & Sentry integration will not work properly.`,
);
}
}
if (!setup.includes('SentrySampler')) {
debug.warn(
'You have to set up the SentrySampler. Without this, the OpenTelemetry & Sentry integration may still work, but sample rates set for the Sentry SDK will not be respected. If you use a custom sampler, make sure to use `wrapSamplingDecision`.',
);
}
}
function getClientOptions(
options,
getDefaultIntegrationsImpl,
) {
const release = getRelease(options.release);
const spotlight = getSpotlightConfig(options.spotlight);
const tracesSampleRate = getTracesSampleRate(options.tracesSampleRate);
const mergedOptions = {
...options,
dsn: options.dsn ?? process.env.SENTRY_DSN,
environment: options.environment ?? process.env.SENTRY_ENVIRONMENT,
sendClientReports: options.sendClientReports ?? true,
transport: options.transport ?? makeNodeTransport,
stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),
release,
tracesSampleRate,
spotlight,
debug: envToBool(options.debug ?? process.env.SENTRY_DEBUG),
};
const integrations = options.integrations;
const defaultIntegrations = options.defaultIntegrations ?? getDefaultIntegrationsImpl(mergedOptions);
return {
...mergedOptions,
integrations: getIntegrationsToSetup({
defaultIntegrations,
integrations,
}),
};
}
function getRelease(release) {
if (release !== undefined) {
return release;
}
const detectedRelease = getSentryRelease();
if (detectedRelease !== undefined) {
return detectedRelease;
}
return undefined;
}
function getTracesSampleRate(tracesSampleRate) {
if (tracesSampleRate !== undefined) {
return tracesSampleRate;
}
const sampleRateFromEnv = process.env.SENTRY_TRACES_SAMPLE_RATE;
if (!sampleRateFromEnv) {
return undefined;
}
const parsed = parseFloat(sampleRateFromEnv);
return isFinite(parsed) ? parsed : undefined;
}
/**
* Update scope and propagation context based on environmental variables.
*
* See https://github.com/getsentry/rfcs/blob/main/text/0071-continue-trace-over-process-boundaries.md
* for more details.
*/
function updateScopeFromEnvVariables() {
if (envToBool(process.env.SENTRY_USE_ENVIRONMENT) !== false) {
const sentryTraceEnv = process.env.SENTRY_TRACE;
const baggageEnv = process.env.SENTRY_BAGGAGE;
const propagationContext = propagationContextFromHeaders(sentryTraceEnv, baggageEnv);
getCurrentScope().setPropagationContext(propagationContext);
}
}
export { getDefaultIntegrations, init, initWithoutDefaultIntegrations, validateOpenTelemetrySetup };
//# sourceMappingURL=index.js.map

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"updateGlobalVersion.d.ts","sourceRoot":"","sources":["../src/updateGlobalVersion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EAEV,eAAe,EACf,uBAAuB,EACxB,MAAM,SAAS,CAAA;AAKhB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAMhD,wBAAsB,mBAAmB,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU,EACzE,IAAI,EAAE,cAAc,EACpB,EACE,EAAE,EACF,MAAM,EACN,MAAM,EACN,GAAG,EACH,SAAS,EACT,MAAM,EACN,WAAW,EACX,KAAK,EAAE,QAAQ,GAChB,EAAE,uBAAuB,CAAC,CAAC,CAAC,GAC5B,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CA0C7B"}

View File

@@ -0,0 +1,277 @@
import type Ajv from "../../core"
import type {SchemaObject} from "../../types"
import {jtdForms, JTDForm, SchemaObjectMap} from "./types"
import {SchemaEnv, getCompilingSchema} from ".."
import {_, str, and, getProperty, CodeGen, Code, Name} from "../codegen"
import MissingRefError from "../ref_error"
import N from "../names"
import {isOwnProperty} from "../../vocabularies/code"
import {hasRef} from "../../vocabularies/jtd/ref"
import {useFunc} from "../util"
import quote from "../../runtime/quote"
const genSerialize: {[F in JTDForm]: (cxt: SerializeCxt) => void} = {
elements: serializeElements,
values: serializeValues,
discriminator: serializeDiscriminator,
properties: serializeProperties,
optionalProperties: serializeProperties,
enum: serializeString,
type: serializeType,
ref: serializeRef,
}
interface SerializeCxt {
readonly gen: CodeGen
readonly self: Ajv // current Ajv instance
readonly schemaEnv: SchemaEnv
readonly definitions: SchemaObjectMap
schema: SchemaObject
data: Code
}
export default function compileSerializer(
this: Ajv,
sch: SchemaEnv,
definitions: SchemaObjectMap
): SchemaEnv {
const _sch = getCompilingSchema.call(this, sch)
if (_sch) return _sch
const {es5, lines} = this.opts.code
const {ownProperties} = this.opts
const gen = new CodeGen(this.scope, {es5, lines, ownProperties})
const serializeName = gen.scopeName("serialize")
const cxt: SerializeCxt = {
self: this,
gen,
schema: sch.schema as SchemaObject,
schemaEnv: sch,
definitions,
data: N.data,
}
let sourceCode: string | undefined
try {
this._compilations.add(sch)
sch.serializeName = serializeName
gen.func(serializeName, N.data, false, () => {
gen.let(N.json, str``)
serializeCode(cxt)
gen.return(N.json)
})
gen.optimize(this.opts.code.optimize)
const serializeFuncCode = gen.toString()
sourceCode = `${gen.scopeRefs(N.scope)}return ${serializeFuncCode}`
const makeSerialize = new Function(`${N.scope}`, sourceCode)
const serialize: (data: unknown) => string = makeSerialize(this.scope.get())
this.scope.value(serializeName, {ref: serialize})
sch.serialize = serialize
} catch (e) {
if (sourceCode) this.logger.error("Error compiling serializer, function code:", sourceCode)
delete sch.serialize
delete sch.serializeName
throw e
} finally {
this._compilations.delete(sch)
}
return sch
}
function serializeCode(cxt: SerializeCxt): void {
let form: JTDForm | undefined
for (const key of jtdForms) {
if (key in cxt.schema) {
form = key
break
}
}
serializeNullable(cxt, form ? genSerialize[form] : serializeEmpty)
}
function serializeNullable(cxt: SerializeCxt, serializeForm: (_cxt: SerializeCxt) => void): void {
const {gen, schema, data} = cxt
if (!schema.nullable) return serializeForm(cxt)
gen.if(
_`${data} === undefined || ${data} === null`,
() => gen.add(N.json, _`"null"`),
() => serializeForm(cxt)
)
}
function serializeElements(cxt: SerializeCxt): void {
const {gen, schema, data} = cxt
gen.add(N.json, str`[`)
const first = gen.let("first", true)
gen.forOf("el", data, (el) => {
addComma(cxt, first)
serializeCode({...cxt, schema: schema.elements, data: el})
})
gen.add(N.json, str`]`)
}
function serializeValues(cxt: SerializeCxt): void {
const {gen, schema, data} = cxt
gen.add(N.json, str`{`)
const first = gen.let("first", true)
gen.forIn("key", data, (key) => serializeKeyValue(cxt, key, schema.values, first))
gen.add(N.json, str`}`)
}
function serializeKeyValue(cxt: SerializeCxt, key: Name, schema: SchemaObject, first?: Name): void {
const {gen, data} = cxt
addComma(cxt, first)
serializeString({...cxt, data: key})
gen.add(N.json, str`:`)
const value = gen.const("value", _`${data}${getProperty(key)}`)
serializeCode({...cxt, schema, data: value})
}
function serializeDiscriminator(cxt: SerializeCxt): void {
const {gen, schema, data} = cxt
const {discriminator} = schema
gen.add(N.json, str`{${JSON.stringify(discriminator)}:`)
const tag = gen.const("tag", _`${data}${getProperty(discriminator)}`)
serializeString({...cxt, data: tag})
gen.if(false)
for (const tagValue in schema.mapping) {
gen.elseIf(_`${tag} === ${tagValue}`)
const sch = schema.mapping[tagValue]
serializeSchemaProperties({...cxt, schema: sch}, discriminator)
}
gen.endIf()
gen.add(N.json, str`}`)
}
function serializeProperties(cxt: SerializeCxt): void {
const {gen} = cxt
gen.add(N.json, str`{`)
serializeSchemaProperties(cxt)
gen.add(N.json, str`}`)
}
function serializeSchemaProperties(cxt: SerializeCxt, discriminator?: string): void {
const {gen, schema, data} = cxt
const {properties, optionalProperties} = schema
const props = keys(properties)
const optProps = keys(optionalProperties)
const allProps = allProperties(props.concat(optProps))
let first = !discriminator
let firstProp: Name | undefined
for (const key of props) {
if (first) first = false
else gen.add(N.json, str`,`)
serializeProperty(key, properties[key], keyValue(key))
}
if (first) firstProp = gen.let("first", true)
for (const key of optProps) {
const value = keyValue(key)
gen.if(and(_`${value} !== undefined`, isOwnProperty(gen, data, key)), () => {
addComma(cxt, firstProp)
serializeProperty(key, optionalProperties[key], value)
})
}
if (schema.additionalProperties) {
gen.forIn("key", data, (key) =>
gen.if(isAdditional(key, allProps), () => serializeKeyValue(cxt, key, {}, firstProp))
)
}
function keys(ps?: SchemaObjectMap): string[] {
return ps ? Object.keys(ps) : []
}
function allProperties(ps: string[]): string[] {
if (discriminator) ps.push(discriminator)
if (new Set(ps).size !== ps.length) {
throw new Error("JTD: properties/optionalProperties/disciminator overlap")
}
return ps
}
function keyValue(key: string): Name {
return gen.const("value", _`${data}${getProperty(key)}`)
}
function serializeProperty(key: string, propSchema: SchemaObject, value: Name): void {
gen.add(N.json, str`${JSON.stringify(key)}:`)
serializeCode({...cxt, schema: propSchema, data: value})
}
function isAdditional(key: Name, ps: string[]): Code | true {
return ps.length ? and(...ps.map((p) => _`${key} !== ${p}`)) : true
}
}
function serializeType(cxt: SerializeCxt): void {
const {gen, schema, data} = cxt
switch (schema.type) {
case "boolean":
gen.add(N.json, _`${data} ? "true" : "false"`)
break
case "string":
serializeString(cxt)
break
case "timestamp":
gen.if(
_`${data} instanceof Date`,
() => gen.add(N.json, _`'"' + ${data}.toISOString() + '"'`),
() => serializeString(cxt)
)
break
default:
serializeNumber(cxt)
}
}
function serializeString({gen, data}: SerializeCxt): void {
gen.add(N.json, _`${useFunc(gen, quote)}(${data})`)
}
function serializeNumber({gen, data, self}: SerializeCxt): void {
const condition = _`${data} === Infinity || ${data} === -Infinity || ${data} !== ${data}`
if (self.opts.specialNumbers === undefined || self.opts.specialNumbers === "fast") {
gen.add(N.json, _`"" + ${data}`)
} else {
// specialNumbers === "null"
gen.if(
condition,
() => gen.add(N.json, _`null`),
() => gen.add(N.json, _`"" + ${data}`)
)
}
}
function serializeRef(cxt: SerializeCxt): void {
const {gen, self, data, definitions, schema, schemaEnv} = cxt
const {ref} = schema
const refSchema = definitions[ref]
if (!refSchema) throw new MissingRefError(self.opts.uriResolver, "", ref, `No definition ${ref}`)
if (!hasRef(refSchema)) return serializeCode({...cxt, schema: refSchema})
const {root} = schemaEnv
const sch = compileSerializer.call(self, new SchemaEnv({schema: refSchema, root}), definitions)
gen.add(N.json, _`${getSerialize(gen, sch)}(${data})`)
}
function getSerialize(gen: CodeGen, sch: SchemaEnv): Code {
return sch.serialize
? gen.scopeValue("serialize", {ref: sch.serialize})
: _`${gen.scopeValue("wrapper", {ref: sch})}.serialize`
}
function serializeEmpty({gen, data}: SerializeCxt): void {
gen.add(N.json, _`JSON.stringify(${data})`)
}
function addComma({gen}: SerializeCxt, first?: Name): void {
if (first) {
gen.if(
first,
() => gen.assign(first, false),
() => gen.add(N.json, str`,`)
)
} else {
gen.add(N.json, str`,`)
}
}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/gel-core/columns/json.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyGelTable } from '~/gel-core/table.ts';\nimport { GelColumn, GelColumnBuilder } from './common.ts';\n\nexport type GelJsonBuilderInitial<TName extends string> = GelJsonBuilder<{\n\tname: TName;\n\tdataType: 'json';\n\tcolumnType: 'GelJson';\n\tdata: unknown;\n\tdriverParam: unknown;\n\tenumValues: undefined;\n}>;\n\nexport class GelJsonBuilder<T extends ColumnBuilderBaseConfig<'json', 'GelJson'>> extends GelColumnBuilder<\n\tT\n> {\n\tstatic override readonly [entityKind]: string = 'GelJsonBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'json', 'GelJson');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyGelTable<{ name: TTableName }>,\n\t): GelJson<MakeColumnConfig<T, TTableName>> {\n\t\treturn new GelJson<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class GelJson<T extends ColumnBaseConfig<'json', 'GelJson'>> extends GelColumn<T> {\n\tstatic override readonly [entityKind]: string = 'GelJson';\n\n\tconstructor(table: AnyGelTable<{ name: T['tableName'] }>, config: GelJsonBuilder<T>['config']) {\n\t\tsuper(table, config);\n\t}\n\n\tgetSQLType(): string {\n\t\treturn 'json';\n\t}\n}\n\nexport function json(): GelJsonBuilderInitial<''>;\nexport function json<TName extends string>(name: TName): GelJsonBuilderInitial<TName>;\nexport function json(name?: string) {\n\treturn new GelJsonBuilder(name ?? '');\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,WAAW,wBAAwB;AAWrC,MAAM,uBAA6E,iBAExF;AAAA,EACD,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,QAAQ,SAAS;AAAA,EAC9B;AAAA;AAAA,EAGS,MACR,OAC2C;AAC3C,WAAO,IAAI,QAAyC,OAAO,KAAK,MAA8C;AAAA,EAC/G;AACD;AAEO,MAAM,gBAA+D,UAAa;AAAA,EACxF,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,OAA8C,QAAqC;AAC9F,UAAM,OAAO,MAAM;AAAA,EACpB;AAAA,EAEA,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAIO,SAAS,KAAK,MAAe;AACnC,SAAO,IAAI,eAAe,QAAQ,EAAE;AACrC;","names":[]}

View File

@@ -0,0 +1,29 @@
import { CharLengthDict, Dictionary, Row } from '../models/common';
import { ComplexOptions, ComputedColumn, RowFilterFunction, RowSortFunction } from '../models/external-table';
import { Column, TableStyleDetails } from '../models/internal-table';
import { ColorMap } from '../utils/colored-console-line';
import { RowOptions } from '../utils/table-helpers';
declare class TableInternal {
title?: string;
tableStyle: TableStyleDetails;
columns: Column[];
rows: Row[];
filterFunction: RowFilterFunction;
sortFunction: RowSortFunction;
enabledColumns: string[];
disabledColumns: string[];
computedColumns: any[];
rowSeparator: boolean;
colorMap: ColorMap;
charLength: CharLengthDict;
initSimple(columns: string[]): void;
initDetailed(options: ComplexOptions): void;
constructor(options?: ComplexOptions | string[]);
createColumnFromRow(text: Dictionary): void;
addColumn(textOrObj: string | ComputedColumn): void;
addColumns(toBeInsertedColumns: string[]): void;
addRow(text: Dictionary, options?: RowOptions): void;
addRows(toBeInsertedRows: Dictionary[], options?: RowOptions): void;
renderTable(): string;
}
export default TableInternal;

View File

@@ -0,0 +1,20 @@
import type { CustomVersionParser } from './dependencyChecker.js';
export declare function parseVersion(version: string): {
parts: number[];
preReleases: string[];
};
/**
* Compares two semantic version strings, including handling pre-release identifiers.
*
* This function first compares the major, minor, and patch components as integers.
* If these components are equal, it then moves on to compare pre-release versions.
* Pre-release versions are compared first by extracting and comparing any numerical values.
* If numerical values are equal, it compares the whole pre-release string lexicographically.
*
* @param {string} compare - The first version string to compare.
* @param {string} to - The second version string to compare.
* @param {function} [customVersionParser] - An optional function to parse version strings into parts and pre-releases.
* @returns {string} - Returns greater if compare is greater than to, lower if compare is less than to, and equal if they are equal.
*/
export declare function compareVersions(compare: string, to: string, customVersionParser?: CustomVersionParser): 'equal' | 'greater' | 'lower';
//# sourceMappingURL=versionUtils.d.ts.map

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 FileDown = createLucideIcon("FileDown", [
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
["path", { d: "M12 18v-6", key: "17g6i2" }],
["path", { d: "m9 15 3 3 3-3", key: "1npd3o" }]
]);
export { FileDown as default };
//# sourceMappingURL=file-down.js.map

View File

@@ -0,0 +1,11 @@
import type { GenerateSchema } from 'payload';
import type { ColumnToCodeConverter } from '../types.js';
export declare const createSchemaGenerator: ({ columnToCodeConverter, corePackageSuffix, defaultOutputFile, enumImport, schemaImport, tableImport, }: {
columnToCodeConverter: ColumnToCodeConverter;
corePackageSuffix: string;
defaultOutputFile?: string;
enumImport?: string;
schemaImport?: string;
tableImport: string;
}) => GenerateSchema;
//# sourceMappingURL=createSchemaGenerator.d.ts.map

View File

@@ -0,0 +1 @@
"use strict";var m=Object.defineProperty;var a=(r,e)=>m(r,"name",{value:e,configurable:!0});var q=require("../../register-2sWVXuRQ.cjs");require("../../get-pipe-path-BoR10qr8.cjs");var t=require("../../register-D46fvsV_.cjs");require("../../require-D4F1Lv60.cjs");var n=require("../../node-features-roYmp9jK.cjs");require("node:module"),require("node:worker_threads"),require("node:url"),require("module"),require("node:path"),require("../../temporary-directory-B83uKxJF.cjs"),require("node:os"),require("get-tsconfig"),require("node:fs"),require("../../index-gckBtVBf.cjs"),require("esbuild"),require("node:crypto"),require("../../client-D6NvIMSC.cjs"),require("node:net"),require("node:util"),require("../../index-BWFBUo6r.cjs");const c=a((r,e)=>{if(!e||typeof e=="object"&&!e.parentURL)throw new Error("The current file path (import.meta.url) must be provided in the second argument of tsImport()");const i=typeof e=="string",u=i?e:e.parentURL,s=Date.now().toString(),o=t.register({namespace:s});return!n.isFeatureSupported(n.esmLoadReadFile)&&!t.isBarePackageNamePattern.test(r)&&t.cjsExtensionPattern.test(r)?Promise.resolve(o.require(r,u)):q.register({namespace:s,...i?{}:e}).import(r,u)},"tsImport");exports.register=q.register,exports.tsImport=c;

View File

@@ -0,0 +1,25 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.toError = toError;
var _inspect = require('./inspect.js');
/**
* Sometimes a non-error is thrown, wrap it as an Error instance to ensure a consistent Error interface.
*/
function toError(thrownValue) {
return thrownValue instanceof Error
? thrownValue
: new NonErrorThrown(thrownValue);
}
class NonErrorThrown extends Error {
constructor(thrownValue) {
super('Unexpected error value: ' + (0, _inspect.inspect)(thrownValue));
this.name = 'NonErrorThrown';
this.thrownValue = thrownValue;
}
}

View File

@@ -0,0 +1,177 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.mjs";
const eraValues = {
narrow: ["BC", "AC"],
abbreviated: ["紀元前", "西暦"],
wide: ["紀元前", "西暦"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
wide: ["第1四半期", "第2四半期", "第3四半期", "第4四半期"],
};
const monthValues = {
narrow: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
abbreviated: [
"1月",
"2月",
"3月",
"4月",
"5月",
"6月",
"7月",
"8月",
"9月",
"10月",
"11月",
"12月",
],
wide: [
"1月",
"2月",
"3月",
"4月",
"5月",
"6月",
"7月",
"8月",
"9月",
"10月",
"11月",
"12月",
],
};
const dayValues = {
narrow: ["日", "月", "火", "水", "木", "金", "土"],
short: ["日", "月", "火", "水", "木", "金", "土"],
abbreviated: ["日", "月", "火", "水", "木", "金", "土"],
wide: ["日曜日", "月曜日", "火曜日", "水曜日", "木曜日", "金曜日", "土曜日"],
};
const dayPeriodValues = {
narrow: {
am: "午前",
pm: "午後",
midnight: "深夜",
noon: "正午",
morning: "朝",
afternoon: "午後",
evening: "夜",
night: "深夜",
},
abbreviated: {
am: "午前",
pm: "午後",
midnight: "深夜",
noon: "正午",
morning: "朝",
afternoon: "午後",
evening: "夜",
night: "深夜",
},
wide: {
am: "午前",
pm: "午後",
midnight: "深夜",
noon: "正午",
morning: "朝",
afternoon: "午後",
evening: "夜",
night: "深夜",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "午前",
pm: "午後",
midnight: "深夜",
noon: "正午",
morning: "朝",
afternoon: "午後",
evening: "夜",
night: "深夜",
},
abbreviated: {
am: "午前",
pm: "午後",
midnight: "深夜",
noon: "正午",
morning: "朝",
afternoon: "午後",
evening: "夜",
night: "深夜",
},
wide: {
am: "午前",
pm: "午後",
midnight: "深夜",
noon: "正午",
morning: "朝",
afternoon: "午後",
evening: "夜",
night: "深夜",
},
};
const ordinalNumber = (dirtyNumber, options) => {
const number = Number(dirtyNumber);
const unit = String(options?.unit);
switch (unit) {
case "year":
return `${number}年`;
case "quarter":
return `第${number}四半期`;
case "month":
return `${number}月`;
case "week":
return `第${number}週`;
case "date":
return `${number}日`;
case "hour":
return `${number}時`;
case "minute":
return `${number}分`;
case "second":
return `${number}秒`;
default:
return `${number}`;
}
};
export const localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => Number(quarter) - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
};

View File

@@ -0,0 +1,58 @@
# Crawling
[RFC 9309](https://datatracker.ietf.org/doc/html/rfc9309) defines crawlers as automated clients.
Some web servers may reject requests that omit the `User-Agent` header or that use common defaults such as `'curl/7.79.1'`.
In **undici**, the default user agent is `'undici'`. Since undici is integrated into Node.js core as the implementation of `fetch()`, requests made via `fetch()` use `'node'` as the default user agent.
It is recommended to specify a **custom `User-Agent` header** when implementing crawlers. Providing a descriptive user agent allows servers to correctly identify the client and reduces the likelihood of requests being denied.
A user agent string should include sufficient detail to identify the crawler and provide contact information. For example:
```
AcmeCo Crawler - acme.co - contact@acme.co
```
When adding contact details, avoid using personal identifiers such as your own name or a private email address—especially in a professional or employment context. Instead, use a role-based or organizational contact (e.g., crawler-team@company.com) to protect individual privacy while still enabling communication.
If a crawler behaves unexpectedly—for example, due to misconfiguration or implementation errors—server administrators can use the information in the user agent to contact the operator and coordinate an appropriate resolution.
The `User-Agent` header can be set on individual requests or applied globally by configuring a custom dispatcher.
**Example: setting a `User-Agent` per request**
```js
import { fetch } from 'undici'
const headers = {
'User-Agent': 'AcmeCo Crawler - acme.co - contact@acme.co'
}
const res = await fetch('https://example.com', { headers })
```
## Best Practices for Crawlers
When developing a crawler, the following practices are recommended in addition to setting a descriptive `User-Agent` header:
* **Respect `robots.txt`**
Follow the directives defined in the target sites `robots.txt` file, including disallowed paths and optional crawl-delay settings (see [W3C guidelines](https://www.w3.org/wiki/Write_Web_Crawler)).
* **Rate limiting**
Regulate request frequency to avoid imposing excessive load on servers. Introduce delays between requests or limit the number of concurrent requests. The W3C suggests at least one second between requests.
* **Error handling**
Implement retry logic with exponential backoff for transient failures, and stop requests when persistent errors occur (e.g., HTTP 403 or 429).
* **Monitoring and logging**
Track request volume, response codes, and error rates to detect misbehavior and address issues proactively.
* **Contact information**
Always include valid and current contact details in the `User-Agent` string so that administrators can reach the crawler operator if necessary.
## References and Further Reading
* [RFC 9309: The Robots Exclusion Protocol](https://datatracker.ietf.org/doc/html/rfc9309)
* [W3C Wiki: Write Web Crawler](https://www.w3.org/wiki/Write_Web_Crawler)
* [Ethical Web Crawling (WWW 2010 Conference Paper)](https://archives.iw3c2.org/www2010/proceedings/www/p1101.pdf)

View File

@@ -0,0 +1 @@
!function(e){for(var t="[^<()\"']|\\((?:<expr>)*\\)|<(?!#--)|<#--(?:[^-]|-(?!->))*--\x3e|\"(?:[^\\\\\"]|\\\\.)*\"|'(?:[^\\\\']|\\\\.)*'",n=0;n<2;n++)t=t.replace(/<expr>/g,(function(){return t}));t=t.replace(/<expr>/g,"[^\\s\\S]");var i={comment:/<#--[\s\S]*?-->/,string:[{pattern:/\br("|')(?:(?!\1)[^\\]|\\.)*\1/,greedy:!0},{pattern:RegExp("(\"|')(?:(?!\\1|\\$\\{)[^\\\\]|\\\\.|\\$\\{(?:(?!\\})(?:<expr>))*\\})*\\1".replace(/<expr>/g,(function(){return t}))),greedy:!0,inside:{interpolation:{pattern:RegExp("((?:^|[^\\\\])(?:\\\\\\\\)*)\\$\\{(?:(?!\\})(?:<expr>))*\\}".replace(/<expr>/g,(function(){return t}))),lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:null}}}}],keyword:/\b(?:as)\b/,boolean:/\b(?:false|true)\b/,"builtin-function":{pattern:/((?:^|[^?])\?\s*)\w+/,lookbehind:!0,alias:"function"},function:/\b\w+(?=\s*\()/,number:/\b\d+(?:\.\d+)?\b/,operator:/\.\.[<*!]?|->|--|\+\+|&&|\|\||\?{1,2}|[-+*/%!=<>]=?|\b(?:gt|gte|lt|lte)\b/,punctuation:/[,;.:()[\]{}]/};i.string[1].inside.interpolation.inside.rest=i,e.languages.ftl={"ftl-comment":{pattern:/^<#--[\s\S]*/,alias:"comment"},"ftl-directive":{pattern:/^<[\s\S]+>$/,inside:{directive:{pattern:/(^<\/?)[#@][a-z]\w*/i,lookbehind:!0,alias:"keyword"},punctuation:/^<\/?|\/?>$/,content:{pattern:/\s*\S[\s\S]*/,alias:"ftl",inside:i}}},"ftl-interpolation":{pattern:/^\$\{[\s\S]*\}$/,inside:{punctuation:/^\$\{|\}$/,content:{pattern:/\s*\S[\s\S]*/,alias:"ftl",inside:i}}}},e.hooks.add("before-tokenize",(function(n){var i=RegExp("<#--[^]*?--\x3e|</?[#@][a-zA-Z](?:<expr>)*?>|\\$\\{(?:<expr>)*?\\}".replace(/<expr>/g,(function(){return t})),"gi");e.languages["markup-templating"].buildPlaceholders(n,"ftl",i)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"ftl")}))}(Prism);

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/errors/DuplicateCollection.ts"],"sourcesContent":["import { APIError } from './APIError.js'\n\nexport class DuplicateCollection extends APIError {\n constructor(propertyName: string, duplicate: string) {\n super(`Collection ${propertyName} already in use: \"${duplicate}\"`)\n }\n}\n"],"names":["APIError","DuplicateCollection","propertyName","duplicate"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,gBAAe;AAExC,OAAO,MAAMC,4BAA4BD;IACvC,YAAYE,YAAoB,EAAEC,SAAiB,CAAE;QACnD,KAAK,CAAC,CAAC,WAAW,EAAED,aAAa,kBAAkB,EAAEC,UAAU,CAAC,CAAC;IACnE;AACF"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/Unauthorized/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAInD,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,cAAc,CAAA;AAIrB,wBAAgB,gBAAgB,CAAC,EAAE,cAAc,EAAE,EAAE,oBAAoB,qBAsCxE;AAED,eAAO,MAAM,0BAA0B,UAAW,oBAAoB,sBAMrE,CAAA"}

View File

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

View File

@@ -0,0 +1,4 @@
/// <reference types="node" />
import * as util from 'util';
export declare const parseArgs: typeof util.parseArgs;
//# sourceMappingURL=parse-args-cjs.d.cts.map

View File

@@ -0,0 +1 @@
Prism.languages.tap={fail:/not ok[^#{\n\r]*/,pass:/ok[^#{\n\r]*/,pragma:/pragma [+-][a-z]+/,bailout:/bail out!.*/i,version:/TAP version \d+/i,plan:/\b\d+\.\.\d+(?: +#.*)?/,subtest:{pattern:/# Subtest(?:: .*)?/,greedy:!0},punctuation:/[{}]/,directive:/#.*/,yamlish:{pattern:/(^[ \t]*)---[\s\S]*?[\r\n][ \t]*\.\.\.$/m,lookbehind:!0,inside:Prism.languages.yaml,alias:"language-yaml"}};

View File

@@ -0,0 +1 @@
{"version":3,"file":"university.js","sources":["../../../src/icons/university.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name University\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEwIiByPSIxIiAvPgogIDxwYXRoIGQ9Ik0yMiAyMFY4aC00bC02LTQtNiA0SDJ2MTJhMiAyIDAgMCAwIDIgMmgxNmEyIDIgMCAwIDAgMi0yIiAvPgogIDxwYXRoIGQ9Ik02IDE3di4wMSIgLz4KICA8cGF0aCBkPSJNNiAxM3YuMDEiIC8+CiAgPHBhdGggZD0iTTE4IDE3di4wMSIgLz4KICA8cGF0aCBkPSJNMTggMTN2LjAxIiAvPgogIDxwYXRoIGQ9Ik0xNCAyMnYtNWEyIDIgMCAwIDAtMi0yYTIgMiAwIDAgMC0yIDJ2NSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/university\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 University = createLucideIcon('University', [\n ['circle', { cx: '12', cy: '10', r: '1', key: '1gnqs8' }],\n ['path', { d: 'M22 20V8h-4l-6-4-6 4H2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2', key: '1qj5sn' }],\n ['path', { d: 'M6 17v.01', key: 'roodi6' }],\n ['path', { d: 'M6 13v.01', key: '67c122' }],\n ['path', { d: 'M18 17v.01', key: '12ktxm' }],\n ['path', { d: 'M18 13v.01', key: 'tn1rt1' }],\n ['path', { d: 'M14 22v-5a2 2 0 0 0-2-2a2 2 0 0 0-2 2v5', key: '11g7fi' }],\n]);\n\nexport default University;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAChD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,CAA2C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AAC1E,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,124 @@
import { ANTHROPIC_AI_INSTRUMENTED_METHODS } from './constants';
export interface AnthropicAiOptions {
/**
* Enable or disable input recording.
*/
recordInputs?: boolean;
/**
* Enable or disable output recording.
*/
recordOutputs?: boolean;
}
export type Message = {
role: 'user' | 'assistant';
content: string | unknown[];
};
export type ContentBlock = {
type: 'tool_use' | 'server_tool_use' | string;
text?: string;
/** Tool name when type is tool_use */
name?: string;
/** Tool invocation id when type is tool_use */
id?: string;
input?: Record<string, unknown>;
tool_use_id?: string;
};
export type MessageError = {
type: 'error';
error: {
type: string;
message: string;
};
request_id: string;
};
type SuccessfulResponse = {
[key: string]: unknown;
id: string;
model: string;
created?: number;
created_at?: number;
messages?: Array<Message>;
content?: string | Array<ContentBlock>;
completion?: string;
input_tokens?: number;
usage?: {
input_tokens: number;
output_tokens: number;
cache_creation_input_tokens: number;
cache_read_input_tokens: number;
};
error?: never;
};
export type AnthropicAiResponse = SuccessfulResponse | MessageError;
/**
* Basic interface for Anthropic AI client with only the instrumented methods
* This provides type safety while being generic enough to work with different client implementations
*/
export interface AnthropicAiClient {
messages?: {
create: (...args: unknown[]) => Promise<AnthropicAiResponse>;
countTokens: (...args: unknown[]) => Promise<AnthropicAiResponse>;
};
models?: {
list: (...args: unknown[]) => Promise<AnthropicAiResponse>;
get: (...args: unknown[]) => Promise<AnthropicAiResponse>;
};
completions?: {
create: (...args: unknown[]) => Promise<AnthropicAiResponse>;
};
}
/**
* Anthropic AI Integration interface for type safety
*/
export interface AnthropicAiIntegration {
name: string;
options: AnthropicAiOptions;
}
export type AnthropicAiInstrumentedMethod = (typeof ANTHROPIC_AI_INSTRUMENTED_METHODS)[number];
/**
* Message type for Anthropic AI
*/
export type AnthropicAiMessage = {
id: string;
type: 'message';
role: string;
model: string;
content: unknown[];
stop_reason: string | null;
stop_sequence: number | null;
usage?: {
input_tokens: number;
cache_creation_input_tokens?: number;
cache_read_input_tokens?: number;
cache_creation?: unknown;
output_tokens?: number;
service_tier?: string;
};
};
/**
* Streaming event type for Anthropic AI
*/
export type AnthropicAiStreamingEvent = {
type: 'message_start' | 'message_delta' | 'message_stop' | 'content_block_start' | 'content_block_delta' | 'content_block_stop' | 'error';
error?: {
type: string;
message: string;
};
index?: number;
delta?: {
type: unknown;
text?: string;
/** Present for fine-grained tool streaming */
partial_json?: string;
stop_reason?: string;
stop_sequence?: number;
};
usage?: {
output_tokens: number;
};
message?: AnthropicAiMessage;
/** Present for fine-grained tool streaming */
content_block?: ContentBlock;
};
export {};
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tracing/vercel-ai/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAqT3C;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAI1D"}

View File

@@ -0,0 +1,3 @@
export * from "./declarations/src/index";
export { default } from "./declarations/src/index";
//# sourceMappingURL=react-select.cjs.d.ts.map

View File

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

View File

@@ -0,0 +1,5 @@
export declare const startOfDayWithOptions: import("./types.js").FPFn2<
Date,
import("../startOfDay.js").StartOfDayOptions<Date> | undefined,
import("../fp.js").DateArg<Date>
>;

View File

@@ -0,0 +1,138 @@
# OpenTelemetry Instrumentation GraphQL
:bangbang: You could be a component owner for this package, and help maintain the quality its users deserve! Check out [open issues](https://github.com/open-telemetry/opentelemetry-js-contrib/labels/pkg%3Ainstrumentation-graphql) on how to help.
[![NPM Published Version][npm-img]][npm-url]
[![Apache License][license-image]][license-image]
This module provides automatic instrumentation and tracing for GraphQL in Node.js applications, which may be loaded using the [`@opentelemetry/sdk-trace-node`](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node) package and is included in the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle.
If total installation size is not constrained, it is recommended to use the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle with [@opentelemetry/sdk-node](`https://www.npmjs.com/package/@opentelemetry/sdk-node`) for the most seamless instrumentation experience.
Compatible with OpenTelemetry JS API and SDK `1.0+`.
*Note*: graphql plugin instruments graphql directly. it should work with any package that wraps the graphql package (e.g apollo).
## Installation
```shell script
npm install @opentelemetry/instrumentation-graphql
```
### Supported Versions
- [`graphql`](https://www.npmjs.com/package/graphql) versions `>=14.0.0 <17`
## Usage
```js
'use strict';
const { GraphQLInstrumentation } = require('@opentelemetry/instrumentation-graphql');
const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
const provider = new NodeTracerProvider();
provider.register();
registerInstrumentations({
instrumentations: [
new GraphQLInstrumentation({
// optional params
// allowValues: true,
// depth: 2,
// mergeItems: true,
// ignoreTrivialResolveSpans: true,
// ignoreResolveSpans: true,
}),
],
});
```
## Optional Parameters
| Param | type | Default Value | Description |
|---------------------------|---------------------------------------------|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| mergeItems | boolean | false | Whether to merge list items into a single element. example: `users.*.name` instead of `users.0.name`, `users.1.name` |
| depth | number | -1 | The maximum depth of fields/resolvers to instrument. When set to 0 it will not instrument fields and resolvers. When set to -1 it will instrument all fields and resolvers. |
| allowValues | boolean | false | When set to true it will not remove attributes values from schema source. By default all values that can be sensitive are removed and replaced with "*" |
| ignoreTrivialResolveSpans | boolean | false | Don't create spans for the execution of the default resolver on object properties. |
| ignoreResolveSpans | boolean | false | Don't create spans for resolvers, regardless if they are trivial or not. |
| flatResolveSpans | boolean | false | Place all resolve spans under the same parent instead of producing a nested tree structure. |
| responseHook | GraphQLInstrumentationExecutionResponseHook | undefined | Hook that allows adding custom span attributes based on the data returned from "execute" GraphQL action. |
## Verbosity
The instrumentation by default will create a span for each invocation of a resolver.
A resolver is run by graphql for each field in the query response, which can be a lot of spans for objects with many properties, or when lists are involved.
There are few config options which can be used to reduce the verbosity of the instrumentations.
They are all disabled by default. User can opt in to any combination of them to control the amount of spans.
### ignoreTrivialResolveSpans
When a resolver function is not defined on the schema for a field, graphql will use the default resolver which just looks for a property with that name on the object. If the property is not a function, it's not very interesting to trace.
### ignoreResolveSpans
The performance overhead for complex schemas with a lot of resolvers can be high due to the large number of spans created. When ignoreResolveSpans is set to true, no spans for resolvers will be created.
If you are using `@apollo/server` as your graphql server, you might want to
enable this option because all resolvers are [currently considered non-trivial](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1686).
### depth
The depth is the number of nesting levels of the field, and the following is a query with a depth of 3:
```json
{
a {
b {
c
}
}
}
```
You can limit the instrumentation to stop recording "resolve" spans after a specific depth is reached.
- `-1` means no limit.
- `0` means don't record any "resolve" spans.
- `2` for the example above will record a span for resolving "a" and "b" but not "c".
### mergeItems
When resolving a field to a list, graphql will execute a resolver for every field in the query on every object in the list.
When setting mergeItems to `true` it will only record a span for the first invocation of a resolver on each field in the list, marking it's path as "foo.*.bar" instead of "foo.0.bar", "foo.1.bar".
Notice that all span data only reflects the invocation on the first element. That includes timing, events and status.
Downstream spans in the context of all resolvers will be child of the first span.
## Examples
Can be found [in the examples directory](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/examples/graphql)
## Semantic Conventions
This package does not currently generate any attributes from semantic conventions.
## Useful links
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>
- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]
## License
Apache 2.0 - See [LICENSE][license-url] for more information.
[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions
[license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE
[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat
[npm-url]: https://www.npmjs.com/package/@opentelemetry/instrumentation-graphql
[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Finstrumentation-graphql.svg

View File

@@ -0,0 +1,32 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.cacheWrapper = cacheWrapper;
exports.cacheWrapperSync = cacheWrapperSync;
async function cacheWrapper(cache, key, fn) {
const cached = cache.get(key);
if (cached !== undefined) {
return cached;
}
const result = await fn();
cache.set(key, result);
return result;
}
function cacheWrapperSync(cache, key, fn) {
const cached = cache.get(key);
if (cached !== undefined) {
return cached;
}
const result = fn();
cache.set(key, result);
return result;
}
//# sourceMappingURL=cacheWrapper.js.map

View File

@@ -0,0 +1,53 @@
(function (Prism) {
Prism.languages.tt2 = Prism.languages.extend('clike', {
'comment': /#.*|\[%#[\s\S]*?%\]/,
'keyword': /\b(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|ELSE|ELSIF|END|FILTER|FINAL|FOREACH|GET|IF|IN|INCLUDE|INSERT|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|SWITCH|TAGS|THROW|TRY|UNLESS|USE|WHILE|WRAPPER)\b/,
'punctuation': /[[\]{},()]/
});
Prism.languages.insertBefore('tt2', 'number', {
'operator': /=[>=]?|!=?|<=?|>=?|&&|\|\|?|\b(?:and|not|or)\b/,
'variable': {
pattern: /\b[a-z]\w*(?:\s*\.\s*(?:\d+|\$?[a-z]\w*))*\b/i
}
});
Prism.languages.insertBefore('tt2', 'keyword', {
'delimiter': {
pattern: /^(?:\[%|%%)-?|-?%\]$/,
alias: 'punctuation'
}
});
Prism.languages.insertBefore('tt2', 'string', {
'single-quoted-string': {
pattern: /'[^\\']*(?:\\[\s\S][^\\']*)*'/,
greedy: true,
alias: 'string'
},
'double-quoted-string': {
pattern: /"[^\\"]*(?:\\[\s\S][^\\"]*)*"/,
greedy: true,
alias: 'string',
inside: {
'variable': {
pattern: /\$(?:[a-z]\w*(?:\.(?:\d+|\$?[a-z]\w*))*)/i
}
}
}
});
// The different types of TT2 strings "replace" the C-like standard string
delete Prism.languages.tt2.string;
Prism.hooks.add('before-tokenize', function (env) {
var tt2Pattern = /\[%[\s\S]+?%\]/g;
Prism.languages['markup-templating'].buildPlaceholders(env, 'tt2', tt2Pattern);
});
Prism.hooks.add('after-tokenize', function (env) {
Prism.languages['markup-templating'].tokenizePlaceholders(env, 'tt2');
});
}(Prism));

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"blinds.js","sources":["../../../src/icons/blinds.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Blinds\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMyAzaDE4IiAvPgogIDxwYXRoIGQ9Ik0yMCA3SDgiIC8+CiAgPHBhdGggZD0iTTIwIDExSDgiIC8+CiAgPHBhdGggZD0iTTEwIDE5aDEwIiAvPgogIDxwYXRoIGQ9Ik04IDE1aDEyIiAvPgogIDxwYXRoIGQ9Ik00IDN2MTQiIC8+CiAgPGNpcmNsZSBjeD0iNCIgY3k9IjE5IiByPSIyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/blinds\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 Blinds = createLucideIcon('Blinds', [\n ['path', { d: 'M3 3h18', key: 'o7r712' }],\n ['path', { d: 'M20 7H8', key: 'gd2fo2' }],\n ['path', { d: 'M20 11H8', key: '1ynp89' }],\n ['path', { d: 'M10 19h10', key: '19hjk5' }],\n ['path', { d: 'M8 15h12', key: '1yqzne' }],\n ['path', { d: 'M4 3v14', key: 'fggqzn' }],\n ['circle', { cx: '4', cy: '19', r: '2', key: 'p3m9r0' }],\n]);\n\nexport default Blinds;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACxC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AACzD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,18 @@
export { FieldDiffContainer } from '../../elements/FieldDiffContainer/index.js';
export { FieldDiffLabel } from '../../elements/FieldDiffLabel/index.js';
export { FolderTableCell } from '../../elements/FolderView/Cell/index.server.js';
export { FolderField } from '../../elements/FolderView/FolderField/index.server.js';
export { getHTMLDiffComponents } from '../../elements/HTMLDiff/index.js';
export { _internal_renderFieldHandler } from '../../forms/fieldSchemasToFormState/serverFunctions/renderFieldServerFn.js';
export { File } from '../../graphics/File/index.js';
export { CheckIcon } from '../../icons/Check/index.js';
export { copyDataFromLocaleHandler } from '../../utilities/copyDataFromLocale.js';
export { getColumns } from '../../utilities/getColumns.js';
export { getFolderResultsComponentAndData } from '../../utilities/getFolderResultsComponentAndData.js';
export { handleLivePreview } from '../../utilities/handleLivePreview.js';
export { handlePreview } from '../../utilities/handlePreview.js';
export { renderFilters, renderTable } from '../../utilities/renderTable.js';
export { resolveFilterOptions } from '../../utilities/resolveFilterOptions.js';
export { upsertPreferences } from '../../utilities/upsertPreferences.js';
export { CollectionCards } from '../../widgets/CollectionCards/index.js';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"sdkinfo.d.ts","sourceRoot":"","sources":["../../../src/types-hoist/sdkinfo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB,QAAQ,CAAC,EAAE;QACT,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;KAC7B,CAAC;CACH"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"library.js","sources":["../../../src/icons/library.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Library\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTYgNiA0IDE0IiAvPgogIDxwYXRoIGQ9Ik0xMiA2djE0IiAvPgogIDxwYXRoIGQ9Ik04IDh2MTIiIC8+CiAgPHBhdGggZD0iTTQgNHYxNiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/library\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 Library = createLucideIcon('Library', [\n ['path', { d: 'm16 6 4 14', key: 'ji33uf' }],\n ['path', { d: 'M12 6v14', key: '1n7gus' }],\n ['path', { d: 'M8 8v12', key: '1gg7y9' }],\n ['path', { d: 'M4 4v16', key: '6qkkli' }],\n]);\n\nexport default Library;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,69 @@
import { GraphQLScalarType, Kind } from 'graphql';
import { createGraphQLError } from '../error.js';
const routingNumber = (rtn) => '' + rtn;
const haveNineDigits = rtn => /^\d{9}$/.test(rtn);
/**
* Calculates checksum for MIRC format XXXXYYYYC where C is the check digit
*
* The checksum is position-weighted sum of each of the digits. So, given the
* routing number `031001175`, which The last digit (5 in the example), is the
* check digit. The calculation is given in terms of the eight first digits:
*
* 0 3 1 0 0 1 1 7
* x
* 3 7 1 3 7 1 3 7
* ____________________________________
* 0 + 21 + 1 + 0 + 0 + 1 + 3 + 49 = 75
* ____________________________________
* 75 + 5 (check digit) = 80 (Must multiple of 10)
*/
const checksum = rtn => {
const weight = [3, 7, 1];
const accumulator = (acc, curr) => acc + curr;
const digits = rtn.split('').map(digit => Number.parseInt(digit, 10));
const checkDigit = digits.pop();
const sum = digits.map((digit, index) => digit * weight[index % 3]).reduce(accumulator, 0);
return (sum + checkDigit) % 10 === 0;
};
const validate = (value, ast) => {
if (typeof value !== 'string' && !(typeof value === 'number' && Number.isInteger(value))) {
throw createGraphQLError('must be integer or string', ast ? { nodes: ast } : undefined);
}
const rtn = routingNumber(value);
if (!haveNineDigits(rtn)) {
throw createGraphQLError('must have nine digits', ast ? { nodes: ast } : undefined);
}
if (!checksum(rtn)) {
throw createGraphQLError("checksum doens't match", ast ? { nodes: ast } : undefined);
}
return rtn;
};
export const GraphQLRoutingNumberConfig = {
name: 'RoutingNumber',
description: 'In the US, an ABA routing transit number (`ABA RTN`) is a nine-digit ' +
'code to identify the financial institution.',
specifiedByURL: 'https://en.wikipedia.org/wiki/ABA_routing_transit_number',
serialize(value) {
return validate(value);
},
parseValue(value) {
return validate(value);
},
parseLiteral(ast) {
if (ast.kind === Kind.INT || ast.kind === Kind.STRING) {
return validate(ast.value, ast);
}
throw createGraphQLError(`ABA Routing Transit Number can only parse Integer or String but got '${ast.kind}'`, {
nodes: ast,
});
},
extensions: {
codegenScalarType: 'string',
jsonSchema: {
title: 'RoutingNumber',
type: 'string',
pattern: /^\d{9}$/.source,
},
},
};
export const GraphQLRoutingNumber = /*#__PURE__*/ new GraphQLScalarType(GraphQLRoutingNumberConfig);

View File

@@ -0,0 +1,8 @@
'use client';
import { createContext, use } from 'react';
export const SelectedLocalesContext = /*#__PURE__*/createContext({
selectedLocales: []
});
export const useSelectedLocales = () => use(SelectedLocalesContext);
//# sourceMappingURL=SelectedLocalesContext.js.map

View File

@@ -0,0 +1,170 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.js";
const eraValues = {
narrow: ["ម.គស", "គស"],
abbreviated: ["មុនគ.ស", "គ.ស"],
wide: ["មុនគ្រិស្តសករាជ", "នៃគ្រិស្តសករាជ"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
wide: ["ត្រីមាសទី 1", "ត្រីមាសទី 2", "ត្រីមាសទី 3", "ត្រីមាសទី 4"],
};
const monthValues = {
narrow: [
"ម.ក",
"ក.ម",
"មិ",
"ម.ស",
"ឧ.ស",
"ម.ថ",
"ក.ដ",
"សី",
"កញ",
"តុ",
"វិ",
"ធ",
],
abbreviated: [
"មករា",
"កុម្ភៈ",
"មីនា",
"មេសា",
"ឧសភា",
"មិថុនា",
"កក្កដា",
"សីហា",
"កញ្ញា",
"តុលា",
"វិច្ឆិកា",
"ធ្នូ",
],
wide: [
"មករា",
"កុម្ភៈ",
"មីនា",
"មេសា",
"ឧសភា",
"មិថុនា",
"កក្កដា",
"សីហា",
"កញ្ញា",
"តុលា",
"វិច្ឆិកា",
"ធ្នូ",
],
};
const dayValues = {
narrow: ["អា", "ច", "អ", "ព", "ព្រ", "សុ", "ស"],
short: ["អា", "ច", "អ", "ព", "ព្រ", "សុ", "ស"],
abbreviated: ["អា", "ច", "អ", "ព", "ព្រ", "សុ", "ស"],
wide: ["អាទិត្យ", "ចន្ទ", "អង្គារ", "ពុធ", "ព្រហស្បតិ៍", "សុក្រ", "សៅរ៍"],
};
const dayPeriodValues = {
narrow: {
am: "ព្រឹក",
pm: "ល្ងាច",
midnight: "​ពេលកណ្ដាលអធ្រាត្រ",
noon: "ពេលថ្ងៃត្រង់",
morning: "ពេលព្រឹក",
afternoon: "ពេលរសៀល",
evening: "ពេលល្ងាច",
night: "ពេលយប់",
},
abbreviated: {
am: "ព្រឹក",
pm: "ល្ងាច",
midnight: "​ពេលកណ្ដាលអធ្រាត្រ",
noon: "ពេលថ្ងៃត្រង់",
morning: "ពេលព្រឹក",
afternoon: "ពេលរសៀល",
evening: "ពេលល្ងាច",
night: "ពេលយប់",
},
wide: {
am: "ព្រឹក",
pm: "ល្ងាច",
midnight: "​ពេលកណ្ដាលអធ្រាត្រ",
noon: "ពេលថ្ងៃត្រង់",
morning: "ពេលព្រឹក",
afternoon: "ពេលរសៀល",
evening: "ពេលល្ងាច",
night: "ពេលយប់",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "ព្រឹក",
pm: "ល្ងាច",
midnight: "​ពេលកណ្ដាលអធ្រាត្រ",
noon: "ពេលថ្ងៃត្រង់",
morning: "ពេលព្រឹក",
afternoon: "ពេលរសៀល",
evening: "ពេលល្ងាច",
night: "ពេលយប់",
},
abbreviated: {
am: "ព្រឹក",
pm: "ល្ងាច",
midnight: "​ពេលកណ្ដាលអធ្រាត្រ",
noon: "ពេលថ្ងៃត្រង់",
morning: "ពេលព្រឹក",
afternoon: "ពេលរសៀល",
evening: "ពេលល្ងាច",
night: "ពេលយប់",
},
wide: {
am: "ព្រឹក",
pm: "ល្ងាច",
midnight: "​ពេលកណ្ដាលអធ្រាត្រ",
noon: "ពេលថ្ងៃត្រង់",
morning: "ពេលព្រឹក",
afternoon: "ពេលរសៀល",
evening: "ពេលល្ងាច",
night: "ពេលយប់",
},
};
const ordinalNumber = (dirtyNumber, _) => {
const number = Number(dirtyNumber);
return number.toString();
};
export const localize = {
ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
};

View File

@@ -0,0 +1,782 @@
/*
Copyright (C) 2012-2013 Yusuke Suzuki <utatane.tea@gmail.com>
Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*jslint vars:false, bitwise:true*/
/*jshint indent:4*/
/*global exports:true*/
(function clone(exports) {
'use strict';
var Syntax,
VisitorOption,
VisitorKeys,
BREAK,
SKIP,
REMOVE;
function deepCopy(obj) {
var ret = {}, key, val;
for (key in obj) {
if (obj.hasOwnProperty(key)) {
val = obj[key];
if (typeof val === 'object' && val !== null) {
ret[key] = deepCopy(val);
} else {
ret[key] = val;
}
}
}
return ret;
}
// based on LLVM libc++ upper_bound / lower_bound
// MIT License
function upperBound(array, func) {
var diff, len, i, current;
len = array.length;
i = 0;
while (len) {
diff = len >>> 1;
current = i + diff;
if (func(array[current])) {
len = diff;
} else {
i = current + 1;
len -= diff + 1;
}
}
return i;
}
Syntax = {
AssignmentExpression: 'AssignmentExpression',
AssignmentPattern: 'AssignmentPattern',
ArrayExpression: 'ArrayExpression',
ArrayPattern: 'ArrayPattern',
ArrowFunctionExpression: 'ArrowFunctionExpression',
AwaitExpression: 'AwaitExpression', // CAUTION: It's deferred to ES7.
BlockStatement: 'BlockStatement',
BinaryExpression: 'BinaryExpression',
BreakStatement: 'BreakStatement',
CallExpression: 'CallExpression',
CatchClause: 'CatchClause',
ClassBody: 'ClassBody',
ClassDeclaration: 'ClassDeclaration',
ClassExpression: 'ClassExpression',
ComprehensionBlock: 'ComprehensionBlock', // CAUTION: It's deferred to ES7.
ComprehensionExpression: 'ComprehensionExpression', // CAUTION: It's deferred to ES7.
ConditionalExpression: 'ConditionalExpression',
ContinueStatement: 'ContinueStatement',
DebuggerStatement: 'DebuggerStatement',
DirectiveStatement: 'DirectiveStatement',
DoWhileStatement: 'DoWhileStatement',
EmptyStatement: 'EmptyStatement',
ExportAllDeclaration: 'ExportAllDeclaration',
ExportDefaultDeclaration: 'ExportDefaultDeclaration',
ExportNamedDeclaration: 'ExportNamedDeclaration',
ExportSpecifier: 'ExportSpecifier',
ExpressionStatement: 'ExpressionStatement',
ForStatement: 'ForStatement',
ForInStatement: 'ForInStatement',
ForOfStatement: 'ForOfStatement',
FunctionDeclaration: 'FunctionDeclaration',
FunctionExpression: 'FunctionExpression',
GeneratorExpression: 'GeneratorExpression', // CAUTION: It's deferred to ES7.
Identifier: 'Identifier',
IfStatement: 'IfStatement',
ImportExpression: 'ImportExpression',
ImportDeclaration: 'ImportDeclaration',
ImportDefaultSpecifier: 'ImportDefaultSpecifier',
ImportNamespaceSpecifier: 'ImportNamespaceSpecifier',
ImportSpecifier: 'ImportSpecifier',
Literal: 'Literal',
LabeledStatement: 'LabeledStatement',
LogicalExpression: 'LogicalExpression',
MemberExpression: 'MemberExpression',
MetaProperty: 'MetaProperty',
MethodDefinition: 'MethodDefinition',
ModuleSpecifier: 'ModuleSpecifier',
NewExpression: 'NewExpression',
ObjectExpression: 'ObjectExpression',
ObjectPattern: 'ObjectPattern',
Program: 'Program',
Property: 'Property',
RestElement: 'RestElement',
ReturnStatement: 'ReturnStatement',
SequenceExpression: 'SequenceExpression',
SpreadElement: 'SpreadElement',
Super: 'Super',
SwitchStatement: 'SwitchStatement',
SwitchCase: 'SwitchCase',
TaggedTemplateExpression: 'TaggedTemplateExpression',
TemplateElement: 'TemplateElement',
TemplateLiteral: 'TemplateLiteral',
ThisExpression: 'ThisExpression',
ThrowStatement: 'ThrowStatement',
TryStatement: 'TryStatement',
UnaryExpression: 'UnaryExpression',
UpdateExpression: 'UpdateExpression',
VariableDeclaration: 'VariableDeclaration',
VariableDeclarator: 'VariableDeclarator',
WhileStatement: 'WhileStatement',
WithStatement: 'WithStatement',
YieldExpression: 'YieldExpression'
};
VisitorKeys = {
AssignmentExpression: ['left', 'right'],
AssignmentPattern: ['left', 'right'],
ArrayExpression: ['elements'],
ArrayPattern: ['elements'],
ArrowFunctionExpression: ['params', 'body'],
AwaitExpression: ['argument'], // CAUTION: It's deferred to ES7.
BlockStatement: ['body'],
BinaryExpression: ['left', 'right'],
BreakStatement: ['label'],
CallExpression: ['callee', 'arguments'],
CatchClause: ['param', 'body'],
ClassBody: ['body'],
ClassDeclaration: ['id', 'superClass', 'body'],
ClassExpression: ['id', 'superClass', 'body'],
ComprehensionBlock: ['left', 'right'], // CAUTION: It's deferred to ES7.
ComprehensionExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.
ConditionalExpression: ['test', 'consequent', 'alternate'],
ContinueStatement: ['label'],
DebuggerStatement: [],
DirectiveStatement: [],
DoWhileStatement: ['body', 'test'],
EmptyStatement: [],
ExportAllDeclaration: ['source'],
ExportDefaultDeclaration: ['declaration'],
ExportNamedDeclaration: ['declaration', 'specifiers', 'source'],
ExportSpecifier: ['exported', 'local'],
ExpressionStatement: ['expression'],
ForStatement: ['init', 'test', 'update', 'body'],
ForInStatement: ['left', 'right', 'body'],
ForOfStatement: ['left', 'right', 'body'],
FunctionDeclaration: ['id', 'params', 'body'],
FunctionExpression: ['id', 'params', 'body'],
GeneratorExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.
Identifier: [],
IfStatement: ['test', 'consequent', 'alternate'],
ImportExpression: ['source'],
ImportDeclaration: ['specifiers', 'source'],
ImportDefaultSpecifier: ['local'],
ImportNamespaceSpecifier: ['local'],
ImportSpecifier: ['imported', 'local'],
Literal: [],
LabeledStatement: ['label', 'body'],
LogicalExpression: ['left', 'right'],
MemberExpression: ['object', 'property'],
MetaProperty: ['meta', 'property'],
MethodDefinition: ['key', 'value'],
ModuleSpecifier: [],
NewExpression: ['callee', 'arguments'],
ObjectExpression: ['properties'],
ObjectPattern: ['properties'],
Program: ['body'],
Property: ['key', 'value'],
RestElement: [ 'argument' ],
ReturnStatement: ['argument'],
SequenceExpression: ['expressions'],
SpreadElement: ['argument'],
Super: [],
SwitchStatement: ['discriminant', 'cases'],
SwitchCase: ['test', 'consequent'],
TaggedTemplateExpression: ['tag', 'quasi'],
TemplateElement: [],
TemplateLiteral: ['quasis', 'expressions'],
ThisExpression: [],
ThrowStatement: ['argument'],
TryStatement: ['block', 'handler', 'finalizer'],
UnaryExpression: ['argument'],
UpdateExpression: ['argument'],
VariableDeclaration: ['declarations'],
VariableDeclarator: ['id', 'init'],
WhileStatement: ['test', 'body'],
WithStatement: ['object', 'body'],
YieldExpression: ['argument']
};
// unique id
BREAK = {};
SKIP = {};
REMOVE = {};
VisitorOption = {
Break: BREAK,
Skip: SKIP,
Remove: REMOVE
};
function Reference(parent, key) {
this.parent = parent;
this.key = key;
}
Reference.prototype.replace = function replace(node) {
this.parent[this.key] = node;
};
Reference.prototype.remove = function remove() {
if (Array.isArray(this.parent)) {
this.parent.splice(this.key, 1);
return true;
} else {
this.replace(null);
return false;
}
};
function Element(node, path, wrap, ref) {
this.node = node;
this.path = path;
this.wrap = wrap;
this.ref = ref;
}
function Controller() { }
// API:
// return property path array from root to current node
Controller.prototype.path = function path() {
var i, iz, j, jz, result, element;
function addToPath(result, path) {
if (Array.isArray(path)) {
for (j = 0, jz = path.length; j < jz; ++j) {
result.push(path[j]);
}
} else {
result.push(path);
}
}
// root node
if (!this.__current.path) {
return null;
}
// first node is sentinel, second node is root element
result = [];
for (i = 2, iz = this.__leavelist.length; i < iz; ++i) {
element = this.__leavelist[i];
addToPath(result, element.path);
}
addToPath(result, this.__current.path);
return result;
};
// API:
// return type of current node
Controller.prototype.type = function () {
var node = this.current();
return node.type || this.__current.wrap;
};
// API:
// return array of parent elements
Controller.prototype.parents = function parents() {
var i, iz, result;
// first node is sentinel
result = [];
for (i = 1, iz = this.__leavelist.length; i < iz; ++i) {
result.push(this.__leavelist[i].node);
}
return result;
};
// API:
// return current node
Controller.prototype.current = function current() {
return this.__current.node;
};
Controller.prototype.__execute = function __execute(callback, element) {
var previous, result;
result = undefined;
previous = this.__current;
this.__current = element;
this.__state = null;
if (callback) {
result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node);
}
this.__current = previous;
return result;
};
// API:
// notify control skip / break
Controller.prototype.notify = function notify(flag) {
this.__state = flag;
};
// API:
// skip child nodes of current node
Controller.prototype.skip = function () {
this.notify(SKIP);
};
// API:
// break traversals
Controller.prototype['break'] = function () {
this.notify(BREAK);
};
// API:
// remove node
Controller.prototype.remove = function () {
this.notify(REMOVE);
};
Controller.prototype.__initialize = function(root, visitor) {
this.visitor = visitor;
this.root = root;
this.__worklist = [];
this.__leavelist = [];
this.__current = null;
this.__state = null;
this.__fallback = null;
if (visitor.fallback === 'iteration') {
this.__fallback = Object.keys;
} else if (typeof visitor.fallback === 'function') {
this.__fallback = visitor.fallback;
}
this.__keys = VisitorKeys;
if (visitor.keys) {
this.__keys = Object.assign(Object.create(this.__keys), visitor.keys);
}
};
function isNode(node) {
if (node == null) {
return false;
}
return typeof node === 'object' && typeof node.type === 'string';
}
function isProperty(nodeType, key) {
return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key;
}
Controller.prototype.traverse = function traverse(root, visitor) {
var worklist,
leavelist,
element,
node,
nodeType,
ret,
key,
current,
current2,
candidates,
candidate,
sentinel;
this.__initialize(root, visitor);
sentinel = {};
// reference
worklist = this.__worklist;
leavelist = this.__leavelist;
// initialize
worklist.push(new Element(root, null, null, null));
leavelist.push(new Element(null, null, null, null));
while (worklist.length) {
element = worklist.pop();
if (element === sentinel) {
element = leavelist.pop();
ret = this.__execute(visitor.leave, element);
if (this.__state === BREAK || ret === BREAK) {
return;
}
continue;
}
if (element.node) {
ret = this.__execute(visitor.enter, element);
if (this.__state === BREAK || ret === BREAK) {
return;
}
worklist.push(sentinel);
leavelist.push(element);
if (this.__state === SKIP || ret === SKIP) {
continue;
}
node = element.node;
nodeType = node.type || element.wrap;
candidates = this.__keys[nodeType];
if (!candidates) {
if (this.__fallback) {
candidates = this.__fallback(node);
} else {
throw new Error('Unknown node type ' + nodeType + '.');
}
}
current = candidates.length;
while ((current -= 1) >= 0) {
key = candidates[current];
candidate = node[key];
if (!candidate) {
continue;
}
if (Array.isArray(candidate)) {
current2 = candidate.length;
while ((current2 -= 1) >= 0) {
if (!candidate[current2]) {
continue;
}
if (isProperty(nodeType, candidates[current])) {
element = new Element(candidate[current2], [key, current2], 'Property', null);
} else if (isNode(candidate[current2])) {
element = new Element(candidate[current2], [key, current2], null, null);
} else {
continue;
}
worklist.push(element);
}
} else if (isNode(candidate)) {
worklist.push(new Element(candidate, key, null, null));
}
}
}
}
};
Controller.prototype.replace = function replace(root, visitor) {
var worklist,
leavelist,
node,
nodeType,
target,
element,
current,
current2,
candidates,
candidate,
sentinel,
outer,
key;
function removeElem(element) {
var i,
key,
nextElem,
parent;
if (element.ref.remove()) {
// When the reference is an element of an array.
key = element.ref.key;
parent = element.ref.parent;
// If removed from array, then decrease following items' keys.
i = worklist.length;
while (i--) {
nextElem = worklist[i];
if (nextElem.ref && nextElem.ref.parent === parent) {
if (nextElem.ref.key < key) {
break;
}
--nextElem.ref.key;
}
}
}
}
this.__initialize(root, visitor);
sentinel = {};
// reference
worklist = this.__worklist;
leavelist = this.__leavelist;
// initialize
outer = {
root: root
};
element = new Element(root, null, null, new Reference(outer, 'root'));
worklist.push(element);
leavelist.push(element);
while (worklist.length) {
element = worklist.pop();
if (element === sentinel) {
element = leavelist.pop();
target = this.__execute(visitor.leave, element);
// node may be replaced with null,
// so distinguish between undefined and null in this place
if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {
// replace
element.ref.replace(target);
}
if (this.__state === REMOVE || target === REMOVE) {
removeElem(element);
}
if (this.__state === BREAK || target === BREAK) {
return outer.root;
}
continue;
}
target = this.__execute(visitor.enter, element);
// node may be replaced with null,
// so distinguish between undefined and null in this place
if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {
// replace
element.ref.replace(target);
element.node = target;
}
if (this.__state === REMOVE || target === REMOVE) {
removeElem(element);
element.node = null;
}
if (this.__state === BREAK || target === BREAK) {
return outer.root;
}
// node may be null
node = element.node;
if (!node) {
continue;
}
worklist.push(sentinel);
leavelist.push(element);
if (this.__state === SKIP || target === SKIP) {
continue;
}
nodeType = node.type || element.wrap;
candidates = this.__keys[nodeType];
if (!candidates) {
if (this.__fallback) {
candidates = this.__fallback(node);
} else {
throw new Error('Unknown node type ' + nodeType + '.');
}
}
current = candidates.length;
while ((current -= 1) >= 0) {
key = candidates[current];
candidate = node[key];
if (!candidate) {
continue;
}
if (Array.isArray(candidate)) {
current2 = candidate.length;
while ((current2 -= 1) >= 0) {
if (!candidate[current2]) {
continue;
}
if (isProperty(nodeType, candidates[current])) {
element = new Element(candidate[current2], [key, current2], 'Property', new Reference(candidate, current2));
} else if (isNode(candidate[current2])) {
element = new Element(candidate[current2], [key, current2], null, new Reference(candidate, current2));
} else {
continue;
}
worklist.push(element);
}
} else if (isNode(candidate)) {
worklist.push(new Element(candidate, key, null, new Reference(node, key)));
}
}
}
return outer.root;
};
function traverse(root, visitor) {
var controller = new Controller();
return controller.traverse(root, visitor);
}
function replace(root, visitor) {
var controller = new Controller();
return controller.replace(root, visitor);
}
function extendCommentRange(comment, tokens) {
var target;
target = upperBound(tokens, function search(token) {
return token.range[0] > comment.range[0];
});
comment.extendedRange = [comment.range[0], comment.range[1]];
if (target !== tokens.length) {
comment.extendedRange[1] = tokens[target].range[0];
}
target -= 1;
if (target >= 0) {
comment.extendedRange[0] = tokens[target].range[1];
}
return comment;
}
function attachComments(tree, providedComments, tokens) {
// At first, we should calculate extended comment ranges.
var comments = [], comment, len, i, cursor;
if (!tree.range) {
throw new Error('attachComments needs range information');
}
// tokens array is empty, we attach comments to tree as 'leadingComments'
if (!tokens.length) {
if (providedComments.length) {
for (i = 0, len = providedComments.length; i < len; i += 1) {
comment = deepCopy(providedComments[i]);
comment.extendedRange = [0, tree.range[0]];
comments.push(comment);
}
tree.leadingComments = comments;
}
return tree;
}
for (i = 0, len = providedComments.length; i < len; i += 1) {
comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens));
}
// This is based on John Freeman's implementation.
cursor = 0;
traverse(tree, {
enter: function (node) {
var comment;
while (cursor < comments.length) {
comment = comments[cursor];
if (comment.extendedRange[1] > node.range[0]) {
break;
}
if (comment.extendedRange[1] === node.range[0]) {
if (!node.leadingComments) {
node.leadingComments = [];
}
node.leadingComments.push(comment);
comments.splice(cursor, 1);
} else {
cursor += 1;
}
}
// already out of owned node
if (cursor === comments.length) {
return VisitorOption.Break;
}
if (comments[cursor].extendedRange[0] > node.range[1]) {
return VisitorOption.Skip;
}
}
});
cursor = 0;
traverse(tree, {
leave: function (node) {
var comment;
while (cursor < comments.length) {
comment = comments[cursor];
if (node.range[1] < comment.extendedRange[0]) {
break;
}
if (node.range[1] === comment.extendedRange[0]) {
if (!node.trailingComments) {
node.trailingComments = [];
}
node.trailingComments.push(comment);
comments.splice(cursor, 1);
} else {
cursor += 1;
}
}
// already out of owned node
if (cursor === comments.length) {
return VisitorOption.Break;
}
if (comments[cursor].extendedRange[0] > node.range[1]) {
return VisitorOption.Skip;
}
}
});
return tree;
}
exports.version = require('./package.json').version;
exports.Syntax = Syntax;
exports.traverse = traverse;
exports.replace = replace;
exports.attachComments = attachComments;
exports.VisitorKeys = VisitorKeys;
exports.VisitorOption = VisitorOption;
exports.Controller = Controller;
exports.cloneEnvironment = function () { return clone({}); };
return exports;
}(exports));
/* vim: set sw=4 ts=4 et tw=80 : */

View File

@@ -0,0 +1,21 @@
import type { StaticLabel } from 'payload';
import React from 'react';
export type CheckboxInputProps = {
readonly AfterInput?: React.ReactNode;
readonly BeforeInput?: React.ReactNode;
readonly checked?: boolean;
readonly className?: string;
readonly id?: string;
readonly inputRef?: React.RefObject<HTMLInputElement | null>;
readonly Label?: React.ReactNode;
readonly label?: StaticLabel;
readonly localized?: boolean;
readonly name?: string;
readonly onToggle: (event: React.ChangeEvent<HTMLInputElement>) => void;
readonly partialChecked?: boolean;
readonly readOnly?: boolean;
readonly required?: boolean;
};
export declare const inputBaseClass = "checkbox-input";
export declare const CheckboxInput: React.FC<CheckboxInputProps>;
//# sourceMappingURL=Input.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"up.d.ts","sourceRoot":"","sources":["../../../../../src/versions/migrations/localizeStatus/mongo/up.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAIzD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;IAChB,GAAG,CAAC,EAAE,GAAG,CAAA;CACV,CAAA;AAED,wBAAsB,EAAE,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CA2PhE"}

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 Files = createLucideIcon("Files", [
["path", { d: "M20 7h-3a2 2 0 0 1-2-2V2", key: "x099mo" }],
["path", { d: "M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z", key: "18t6ie" }],
["path", { d: "M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8", key: "1nja0z" }]
]);
export { Files as default };
//# sourceMappingURL=files.js.map

View File

@@ -0,0 +1,44 @@
import { status as httpStatus } from 'http-status';
import { getRequestCollection } from '../../utilities/getRequestEntity.js';
import { headersWithCors } from '../../utilities/headersWithCors.js';
import { isNumber } from '../../utilities/isNumber.js';
import { sanitizeJoinParams } from '../../utilities/sanitizeJoinParams.js';
import { sanitizePopulateParam } from '../../utilities/sanitizePopulateParam.js';
import { sanitizeSelectParam } from '../../utilities/sanitizeSelectParam.js';
import { extractJWT } from '../extractJWT.js';
import { meOperation } from '../operations/me.js';
export const meHandler = async (req)=>{
const { searchParams } = req;
const collection = getRequestCollection(req);
const currentToken = extractJWT(req);
const depthFromSearchParams = searchParams.get('depth');
const draftFromSearchParams = searchParams.get('depth');
const { depth: depthFromQuery, draft: draftFromQuery, joins, populate, select } = req.query;
const depth = depthFromQuery || depthFromSearchParams;
const draft = draftFromQuery || draftFromSearchParams;
const result = await meOperation({
collection,
currentToken: currentToken,
depth: isNumber(depth) ? Number(depth) : undefined,
draft: draft === 'true',
joins: sanitizeJoinParams(joins),
populate: sanitizePopulateParam(populate),
req,
select: sanitizeSelectParam(select)
});
if (collection.config.auth.removeTokenFromResponses) {
delete result.token;
}
return Response.json({
...result,
message: req.t('authentication:account')
}, {
headers: headersWithCors({
headers: new Headers(),
req
}),
status: httpStatus.OK
});
};
//# sourceMappingURL=me.js.map

View File

@@ -0,0 +1,36 @@
import {IMPORT, LAYER, COMMENT, RULESET, DECLARATION, KEYFRAMES} from './Enum.js'
import {strlen, sizeof} from './Utility.js'
/**
* @param {object[]} children
* @param {function} callback
* @return {string}
*/
export function serialize (children, callback) {
var output = ''
var length = sizeof(children)
for (var i = 0; i < length; i++)
output += callback(children[i], i, children, callback) || ''
return output
}
/**
* @param {object} element
* @param {number} index
* @param {object[]} children
* @param {function} callback
* @return {string}
*/
export function stringify (element, index, children, callback) {
switch (element.type) {
case LAYER: if (element.children.length) break
case IMPORT: case DECLARATION: return element.return = element.return || element.value
case COMMENT: return ''
case KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'
case RULESET: element.value = element.props.join(',')
}
return strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''
}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/singlestore-core/columns/tinyint.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnySingleStoreTable } from '~/singlestore-core/table.ts';\nimport { getColumnNameAndConfig } from '~/utils.ts';\nimport { SingleStoreColumnBuilderWithAutoIncrement, SingleStoreColumnWithAutoIncrement } from './common.ts';\nimport type { SingleStoreIntConfig } from './int.ts';\n\nexport type SingleStoreTinyIntBuilderInitial<TName extends string> = SingleStoreTinyIntBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'SingleStoreTinyInt';\n\tdata: number;\n\tdriverParam: number | string;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class SingleStoreTinyIntBuilder<T extends ColumnBuilderBaseConfig<'number', 'SingleStoreTinyInt'>>\n\textends SingleStoreColumnBuilderWithAutoIncrement<T, SingleStoreIntConfig>\n{\n\tstatic override readonly [entityKind]: string = 'SingleStoreTinyIntBuilder';\n\n\tconstructor(name: T['name'], config?: SingleStoreIntConfig) {\n\t\tsuper(name, 'number', 'SingleStoreTinyInt');\n\t\tthis.config.unsigned = config ? config.unsigned : false;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnySingleStoreTable<{ name: TTableName }>,\n\t): SingleStoreTinyInt<MakeColumnConfig<T, TTableName>> {\n\t\treturn new SingleStoreTinyInt<MakeColumnConfig<T, TTableName>>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class SingleStoreTinyInt<T extends ColumnBaseConfig<'number', 'SingleStoreTinyInt'>>\n\textends SingleStoreColumnWithAutoIncrement<T, SingleStoreIntConfig>\n{\n\tstatic override readonly [entityKind]: string = 'SingleStoreTinyInt';\n\n\tgetSQLType(): string {\n\t\treturn `tinyint${this.config.unsigned ? ' unsigned' : ''}`;\n\t}\n\n\toverride mapFromDriverValue(value: number | string): number {\n\t\tif (typeof value === 'string') {\n\t\t\treturn Number(value);\n\t\t}\n\t\treturn value;\n\t}\n}\n\nexport function tinyint(): SingleStoreTinyIntBuilderInitial<''>;\nexport function tinyint(\n\tconfig?: SingleStoreIntConfig,\n): SingleStoreTinyIntBuilderInitial<''>;\nexport function tinyint<TName extends string>(\n\tname: TName,\n\tconfig?: SingleStoreIntConfig,\n): SingleStoreTinyIntBuilderInitial<TName>;\nexport function tinyint(a?: string | SingleStoreIntConfig, b?: SingleStoreIntConfig) {\n\tconst { name, config } = getColumnNameAndConfig<SingleStoreIntConfig>(a, b);\n\treturn new SingleStoreTinyIntBuilder(name, config);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,mBAAuC;AACvC,oBAA8F;AAavF,MAAM,kCACJ,wDACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB,QAA+B;AAC3D,UAAM,MAAM,UAAU,oBAAoB;AAC1C,SAAK,OAAO,WAAW,SAAS,OAAO,WAAW;AAAA,EACnD;AAAA;AAAA,EAGS,MACR,OACsD;AACtD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,2BACJ,iDACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO,UAAU,KAAK,OAAO,WAAW,cAAc,EAAE;AAAA,EACzD;AAAA,EAES,mBAAmB,OAAgC;AAC3D,QAAI,OAAO,UAAU,UAAU;AAC9B,aAAO,OAAO,KAAK;AAAA,IACpB;AACA,WAAO;AAAA,EACR;AACD;AAUO,SAAS,QAAQ,GAAmC,GAA0B;AACpF,QAAM,EAAE,MAAM,OAAO,QAAI,qCAA6C,GAAG,CAAC;AAC1E,SAAO,IAAI,0BAA0B,MAAM,MAAM;AAClD;","names":[]}

View File

@@ -0,0 +1,28 @@
"use strict";
var REACT_ELEMENT_TYPE;
function _jsx(type, props, key, children) {
if (!REACT_ELEMENT_TYPE) {
REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7;
}
var defaultProps = type && type.defaultProps;
var childrenLength = arguments.length - 3;
if (!props && childrenLength !== 0) props = { children: void 0 };
if (props && defaultProps) {
for (var propName in defaultProps) {
if (props[propName] === void 0) props[propName] = defaultProps[propName];
else if (!props) props = defaultProps || {};
}
}
if (childrenLength === 1) props.children = children;
else if (childrenLength > 1) {
var childArray = new Array(childrenLength);
for (var i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 3];
props.children = childArray;
}
return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : "" + key, ref: null, props: props, _owner: null };
}
exports._ = _jsx;

View File

@@ -0,0 +1,35 @@
import type { DateArg, ContextOptions } from "./types.js";
/**
* The {@link startOfSecond} function options.
*/
export interface StartOfSecondOptions<DateType extends Date = Date>
extends ContextOptions<DateType> {}
/**
* @name startOfSecond
* @category Second Helpers
* @summary Return the start of a second for the given date.
*
* @description
* Return the start of a second for the given date.
* The result will be in the local timezone.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The original date
* @param options - The options
*
* @returns The start of a second
*
* @example
* // The start of a second for 1 December 2014 22:15:45.400:
* const result = startOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400))
* //=> Mon Dec 01 2014 22:15:45.000
*/
export declare function startOfSecond<
DateType extends Date,
ResultDate extends Date = DateType,
>(
date: DateArg<DateType>,
options?: StartOfSecondOptions<ResultDate> | undefined,
): ResultDate;

View File

@@ -0,0 +1,3 @@
import cf from '../dist/index.js'
export const CloudflareSocket = cf.CloudflareSocket

View File

@@ -0,0 +1,4 @@
export { createComplexityRule } from './createComplexityRule.js';
export { fieldExtensionsEstimator } from './estimators/fieldExtensions/index.js';
export { simpleEstimator } from './estimators/simple/index.js';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../src/views/API/metadata.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAA;AAI/E;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,wBAiCrC,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"chart-no-axes-gantt.js","sources":["../../../src/icons/chart-no-axes-gantt.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ChartNoAxesGantt\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNOCA2aDEwIiAvPgogIDxwYXRoIGQ9Ik02IDEyaDkiIC8+CiAgPHBhdGggZD0iTTExIDE4aDciIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/chart-no-axes-gantt\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 ChartNoAxesGantt = createLucideIcon('ChartNoAxesGantt', [\n ['path', { d: 'M8 6h10', key: '9lnwnk' }],\n ['path', { d: 'M6 12h9', key: '1g9pqf' }],\n ['path', { d: 'M11 18h7', key: 'c8dzvl' }],\n]);\n\nexport default ChartNoAxesGantt;\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,CAAA,CAAmB,iBAAiB,kBAAoB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}

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