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,13 @@
import type { ASTVisitor } from '../../language/visitor';
import type { ASTValidationContext } from '../ValidationContext';
/**
* Unique argument names
*
* A GraphQL field or directive is only valid if all supplied arguments are
* uniquely named.
*
* See https://spec.graphql.org/draft/#sec-Argument-Names
*/
export declare function UniqueArgumentNamesRule(
context: ASTValidationContext,
): ASTVisitor;

View File

@@ -0,0 +1,32 @@
"use strict";
exports.nextThursday = nextThursday;
var _index = require("./nextDay.cjs");
/**
* The {@link nextThursday} function options.
*/
/**
* @name nextThursday
* @category Weekday Helpers
* @summary When is the next Thursday?
*
* @description
* When is the next Thursday?
*
* @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 date to start counting from
* @param options - An object with options
*
* @returns The next Thursday
*
* @example
* // When is the next Thursday after Mar, 22, 2020?
* const result = nextThursday(new Date(2020, 2, 22))
* //=> Thur Mar 26 2020 00:00:00
*/
function nextThursday(date, options) {
return (0, _index.nextDay)(date, 4, options);
}

View File

@@ -0,0 +1,39 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.js";
const dateFormats = {
full: "EEEE, d בMMMM y",
long: "d בMMMM y",
medium: "d בMMM y",
short: "d.M.y",
};
const timeFormats = {
full: "H:mm:ss zzzz",
long: "H:mm:ss z",
medium: "H:mm:ss",
short: "H:mm",
};
const dateTimeFormats = {
full: "{{date}} 'בשעה' {{time}}",
long: "{{date}} 'בשעה' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}",
};
export const formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full",
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full",
}),
};

View File

@@ -0,0 +1,352 @@
import { executeAccess } from '../../auth/executeAccess.js';
import { afterChange } from '../../fields/hooks/afterChange/index.js';
import { afterRead } from '../../fields/hooks/afterRead/index.js';
import { beforeChange } from '../../fields/hooks/beforeChange/index.js';
import { beforeValidate } from '../../fields/hooks/beforeValidate/index.js';
import { deepCopyObjectSimple } from '../../index.js';
import { checkDocumentLockStatus } from '../../utilities/checkDocumentLockStatus.js';
import { commitTransaction } from '../../utilities/commitTransaction.js';
import { getSelectMode } from '../../utilities/getSelectMode.js';
import { hasDraftsEnabled, hasDraftValidationEnabled, hasLocalizeStatusEnabled } from '../../utilities/getVersionsConfig.js';
import { initTransaction } from '../../utilities/initTransaction.js';
import { killTransaction } from '../../utilities/killTransaction.js';
import { mergeLocalizedData } from '../../utilities/mergeLocalizedData.js';
import { sanitizeSelect } from '../../utilities/sanitizeSelect.js';
import { getLatestGlobalVersion } from '../../versions/getLatestGlobalVersion.js';
import { saveVersion } from '../../versions/saveVersion.js';
export const updateOperation = async (args)=>{
if (args.publishSpecificLocale) {
args.req.locale = args.publishSpecificLocale;
}
const { slug, autosave, depth, disableTransaction, draft: draftArg, globalConfig, overrideAccess, overrideLock, populate, publishAllLocales: publishAllLocalesArg, publishSpecificLocale, req: { fallbackLocale, locale, payload, payload: { config } = {} }, req, select: incomingSelect, showHiddenFields, unpublishAllLocales: unpublishAllLocalesArg } = args;
try {
const shouldCommit = !disableTransaction && await initTransaction(req);
// /////////////////////////////////////
// beforeOperation - Global
// /////////////////////////////////////
if (globalConfig.hooks?.beforeOperation?.length) {
for (const hook of globalConfig.hooks.beforeOperation){
args = await hook({
args,
context: args.req.context,
global: globalConfig,
operation: 'update',
overrideAccess,
req: args.req
}) || args;
}
}
let { data } = args;
const publishAllLocales = !draftArg && (publishAllLocalesArg ?? (hasLocalizeStatusEnabled(globalConfig) ? false : true));
const unpublishAllLocales = typeof unpublishAllLocalesArg === 'string' ? unpublishAllLocalesArg === 'true' : !!unpublishAllLocalesArg;
const isSavingDraft = Boolean(draftArg && hasDraftsEnabled(globalConfig)) && data._status !== 'published' && !publishAllLocales;
if (isSavingDraft) {
data._status = 'draft';
}
// /////////////////////////////////////
// 1. Retrieve and execute access
// /////////////////////////////////////
const accessResults = !overrideAccess ? await executeAccess({
data,
req
}, globalConfig.access.update) : true;
// /////////////////////////////////////
// Retrieve document
// /////////////////////////////////////
const query = overrideAccess ? undefined : accessResults;
// /////////////////////////////////////
// 2. Retrieve document
// /////////////////////////////////////
const globalVersionResult = await getLatestGlobalVersion({
slug,
config: globalConfig,
locale: locale,
payload,
req,
where: query
});
const { global, globalExists } = globalVersionResult || {};
let globalJSON = {};
if (globalVersionResult && globalVersionResult.global) {
globalJSON = deepCopyObjectSimple(global);
if (globalJSON._id) {
delete globalJSON._id;
}
}
const originalDoc = await afterRead({
collection: null,
context: req.context,
depth: 0,
doc: deepCopyObjectSimple(globalJSON),
draft: draftArg,
fallbackLocale: fallbackLocale,
global: globalConfig,
locale: locale,
overrideAccess: true,
req,
showHiddenFields: showHiddenFields
});
// ///////////////////////////////////////////
// Handle potentially locked global documents
// ///////////////////////////////////////////
await checkDocumentLockStatus({
globalSlug: slug,
lockErrorMessage: `Global with slug "${slug}" is currently locked by another user and cannot be updated.`,
overrideLock,
req
});
// /////////////////////////////////////
// beforeValidate - Fields
// /////////////////////////////////////
data = await beforeValidate({
collection: null,
context: req.context,
data,
doc: originalDoc,
global: globalConfig,
operation: 'update',
overrideAccess: overrideAccess,
req
});
// /////////////////////////////////////
// beforeValidate - Global
// /////////////////////////////////////
if (globalConfig.hooks?.beforeValidate?.length) {
for (const hook of globalConfig.hooks.beforeValidate){
data = await hook({
context: req.context,
data,
global: globalConfig,
originalDoc,
overrideAccess,
req
}) || data;
}
}
// /////////////////////////////////////
// beforeChange - Global
// /////////////////////////////////////
if (globalConfig.hooks?.beforeChange?.length) {
for (const hook of globalConfig.hooks.beforeChange){
data = await hook({
context: req.context,
data,
global: globalConfig,
originalDoc,
overrideAccess,
req
}) || data;
}
}
// /////////////////////////////////////
// beforeChange - Fields
// /////////////////////////////////////
const beforeChangeArgs = {
collection: null,
context: req.context,
data,
doc: originalDoc,
docWithLocales: globalJSON,
global: globalConfig,
operation: 'update',
req,
skipValidation: isSavingDraft && !hasDraftValidationEnabled(globalConfig)
};
let result = await beforeChange(beforeChangeArgs);
let snapshotToSave;
// /////////////////////////////////////
// Handle Localized Data Merging
// /////////////////////////////////////
if (config && config.localization && globalConfig.versions) {
let currentGlobal = null;
let snapshotData;
if (globalConfig.versions.drafts && globalConfig.versions.drafts.localizeStatus) {
if (publishAllLocales || unpublishAllLocales) {
let accessibleLocaleCodes = config.localization.localeCodes;
if (config.localization.filterAvailableLocales) {
const filteredLocales = await config.localization.filterAvailableLocales({
locales: config.localization.locales,
req
});
accessibleLocaleCodes = filteredLocales.map((locale)=>typeof locale === 'string' ? locale : locale.code);
}
if (typeof result._status !== 'object' || result._status === null) {
result._status = {};
}
for (const localeCode of accessibleLocaleCodes){
result._status[localeCode] = unpublishAllLocales ? 'draft' : 'published';
}
} else if (!isSavingDraft) {
// publishing a single locale
currentGlobal = await payload.db.findGlobal({
slug: globalConfig.slug,
req,
where: query
});
snapshotData = result;
}
} else if (publishSpecificLocale) {
// previous way of publishing a single locale
currentGlobal = (await getLatestGlobalVersion({
slug,
config: globalConfig,
payload,
published: true,
req,
where: query
})).global;
snapshotData = {
...result,
_status: 'draft'
};
}
if (snapshotData) {
snapshotToSave = deepCopyObjectSimple(snapshotData);
result = mergeLocalizedData({
configBlockReferences: config.blocks,
dataWithLocales: result || {},
docWithLocales: currentGlobal || {},
fields: globalConfig.fields,
selectedLocales: [
locale
]
});
}
}
// /////////////////////////////////////
// Update
// /////////////////////////////////////
const select = sanitizeSelect({
fields: globalConfig.flattenedFields,
forceSelect: globalConfig.forceSelect,
select: incomingSelect
});
if (!isSavingDraft) {
const now = new Date().toISOString();
// Ensure global has createdAt
if (!result.createdAt) {
result.createdAt = now;
}
// Ensure updatedAt date is always updated
result.updatedAt = now;
if (globalExists) {
result = await payload.db.updateGlobal({
slug,
data: result,
req,
select
});
} else {
result = await payload.db.createGlobal({
slug,
data: result,
req
});
}
}
// /////////////////////////////////////
// Create version
// /////////////////////////////////////
if (globalConfig.versions) {
const { globalType } = result;
result = await saveVersion({
autosave,
docWithLocales: result,
draft: isSavingDraft,
global: globalConfig,
operation: 'update',
payload,
publishSpecificLocale,
req,
select,
snapshot: snapshotToSave
});
result = {
...result,
globalType
};
}
// /////////////////////////////////////
// Execute globalType field if not selected
// /////////////////////////////////////
if (select && result.globalType) {
const selectMode = getSelectMode(select);
if (selectMode === 'include' && !select['globalType'] || selectMode === 'exclude' && select['globalType'] === false) {
delete result['globalType'];
}
}
// /////////////////////////////////////
// afterRead - Fields
// /////////////////////////////////////
result = await afterRead({
collection: null,
context: req.context,
depth: depth,
doc: result,
draft: draftArg,
fallbackLocale: null,
global: globalConfig,
locale: locale,
overrideAccess: overrideAccess,
populate,
req,
select,
showHiddenFields: showHiddenFields
});
// /////////////////////////////////////
// afterRead - Global
// /////////////////////////////////////
if (globalConfig.hooks?.afterRead?.length) {
for (const hook of globalConfig.hooks.afterRead){
result = await hook({
context: req.context,
doc: result,
global: globalConfig,
overrideAccess,
req
}) || result;
}
}
// /////////////////////////////////////
// afterChange - Fields
// /////////////////////////////////////
result = await afterChange({
collection: null,
context: req.context,
data,
doc: result,
global: globalConfig,
operation: 'update',
previousDoc: originalDoc,
req
});
// /////////////////////////////////////
// afterChange - Global
// /////////////////////////////////////
if (globalConfig.hooks?.afterChange?.length) {
for (const hook of globalConfig.hooks.afterChange){
result = await hook({
context: req.context,
data,
doc: result,
global: globalConfig,
overrideAccess,
previousDoc: originalDoc,
req
}) || result;
}
}
// /////////////////////////////////////
// Return results
// /////////////////////////////////////
if (shouldCommit) {
await commitTransaction(req);
}
return result;
} catch (error) {
await killTransaction(req);
throw error;
}
};
//# sourceMappingURL=update.js.map

View File

@@ -0,0 +1,22 @@
import { type Client, type Config } from '@libsql/client-wasm';
import { type DrizzleConfig } from "../../utils.js";
import { type LibSQLDatabase } from "../driver-core.js";
export declare function drizzle<TSchema extends Record<string, unknown> = Record<string, never>, TClient extends Client = Client>(...params: [
TClient | string
] | [
TClient | string,
DrizzleConfig<TSchema>
] | [
(DrizzleConfig<TSchema> & ({
connection: string | Config;
} | {
client: TClient;
}))
]): LibSQLDatabase<TSchema> & {
$client: TClient;
};
export declare namespace drizzle {
function mock<TSchema extends Record<string, unknown> = Record<string, never>>(config?: DrizzleConfig<TSchema>): LibSQLDatabase<TSchema> & {
$client: '$client is not available on drizzle.mock()';
};
}

View File

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

View File

@@ -0,0 +1,63 @@
{
"name": "@opentelemetry/instrumentation-hapi",
"version": "0.57.0",
"description": "OpenTelemetry instrumentation for `@hapi/hapi` http web application framework",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/open-telemetry/opentelemetry-js-contrib.git",
"directory": "packages/instrumentation-hapi"
},
"scripts": {
"clean": "rimraf build/*",
"compile": "tsc -p .",
"compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-hapi",
"lint:readme": "node ../../scripts/lint-readme.js",
"prepublishOnly": "npm run compile",
"tdd": "npm test -- --watch-extensions ts --watch",
"test": "nyc --no-clean mocha 'test/**/*.test.ts'",
"test-all-versions": "tav",
"version:update": "node ../../scripts/version-update.js"
},
"keywords": [
"hapi",
"instrumentation",
"nodejs",
"opentelemetry",
"profiling",
"tracing"
],
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/src/**/*.js",
"build/src/**/*.js.map",
"build/src/**/*.d.ts"
],
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"@opentelemetry/api": "^1.3.0"
},
"devDependencies": {
"@hapi/hapi": "21.3.12",
"@opentelemetry/api": "^1.3.0",
"@opentelemetry/context-async-hooks": "^2.0.0",
"@opentelemetry/contrib-test-utils": "^0.58.0",
"@opentelemetry/sdk-trace-base": "^2.0.0",
"@opentelemetry/sdk-trace-node": "^2.0.0",
"joi": "17.12.2"
},
"dependencies": {
"@opentelemetry/core": "^2.0.0",
"@opentelemetry/instrumentation": "^0.211.0",
"@opentelemetry/semantic-conventions": "^1.27.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-hapi#readme",
"gitHead": "7a5f3c0a09b6a2d32c712b2962b95137c906a016"
}

View File

@@ -0,0 +1,32 @@
import { browserTracingIntegration } from '@sentry/browser';
import { Integration } from '@sentry/core';
import { ReactRouterOptions } from './reactrouter-compat-utils';
import { CreateRouterFunction, Router, RouterState, UseRoutes } from './types';
/**
* A browser tracing integration that uses React Router v7 to instrument navigations.
* Expects `useEffect`, `useLocation`, `useNavigationType`, `createRoutesFromChildren` and `matchRoutes` to be passed as options.
*/
export declare function reactRouterV7BrowserTracingIntegration(options: Parameters<typeof browserTracingIntegration>[0] & ReactRouterOptions): Integration;
/**
* A higher-order component that adds Sentry routing instrumentation to a React Router v7 Route component.
* This is used to automatically capture route changes as transactions.
*/
export declare function withSentryReactRouterV7Routing<P extends Record<string, any>, R extends React.FC<P>>(routes: R): R;
/**
* A wrapper function that adds Sentry routing instrumentation to a React Router v7 createBrowserRouter function.
* This is used to automatically capture route changes as transactions when using the createBrowserRouter API.
*/
export declare function wrapCreateBrowserRouterV7<TState extends RouterState = RouterState, TRouter extends Router<TState> = Router<TState>>(createRouterFunction: CreateRouterFunction<TState, TRouter>): CreateRouterFunction<TState, TRouter>;
/**
* A wrapper function that adds Sentry routing instrumentation to a React Router v7 createMemoryRouter function.
* This is used to automatically capture route changes as transactions when using the createMemoryRouter API.
* The difference between createBrowserRouter and createMemoryRouter is that with createMemoryRouter,
* optional `initialEntries` are also taken into account.
*/
export declare function wrapCreateMemoryRouterV7<TState extends RouterState = RouterState, TRouter extends Router<TState> = Router<TState>>(createMemoryRouterFunction: CreateRouterFunction<TState, TRouter>): CreateRouterFunction<TState, TRouter>;
/**
* A wrapper function that adds Sentry routing instrumentation to a React Router v7 useRoutes hook.
* This is used to automatically capture route changes as transactions when using the useRoutes hook.
*/
export declare function wrapUseRoutesV7(origUseRoutes: UseRoutes): UseRoutes;
//# sourceMappingURL=reactrouterv7.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"watchdog.js","sourceRoot":"","sources":["../../src/watchdog.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,gEAAgE;AAChE,uCAAuC;AAEvC,OAAO,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAA;AAEnD,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;CAqB9B,CAAA;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAmB,EAAE,EAAE;IAC9C,IAAI,SAAS,GAAG,KAAK,CAAA;IACrB,MAAM,GAAG,GAAG,KAAK,CACf,OAAO,CAAC,QAAQ,EAChB,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EACvC;QACE,KAAK,EAAE,QAAQ;KAChB,CACF,CAAA;IACD,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC,CAAA;IACxC,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE;QACpB,IAAI,CAAC,SAAS;YAAE,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IACrC,CAAC,CAAC,CAAA;IACF,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA","sourcesContent":["// this spawns a child process that listens for SIGHUP when the\n// parent process exits, and after 200ms, sends a SIGKILL to the\n// child, in case it did not terminate.\n\nimport { ChildProcess, spawn } from 'child_process'\n\nconst watchdogCode = String.raw`\nconst pid = parseInt(process.argv[1], 10)\nprocess.title = 'node (foreground-child watchdog pid=' + pid + ')'\nif (!isNaN(pid)) {\n let barked = false\n // keepalive\n const interval = setInterval(() => {}, 60000)\n const bark = () => {\n clearInterval(interval)\n if (barked) return\n barked = true\n process.removeListener('SIGHUP', bark)\n setTimeout(() => {\n try {\n process.kill(pid, 'SIGKILL')\n setTimeout(() => process.exit(), 200)\n } catch (_) {}\n }, 500)\n })\n process.on('SIGHUP', bark)\n}\n`\n\n/**\n * Pass in a ChildProcess, and this will spawn a watchdog process that\n * will make sure it exits if the parent does, thus preventing any\n * dangling detached zombie processes.\n *\n * If the child ends before the parent, then the watchdog will terminate.\n */\nexport const watchdog = (child: ChildProcess) => {\n let dogExited = false\n const dog = spawn(\n process.execPath,\n ['-e', watchdogCode, String(child.pid)],\n {\n stdio: 'ignore',\n },\n )\n dog.on('exit', () => (dogExited = true))\n child.on('exit', () => {\n if (!dogExited) dog.kill('SIGKILL')\n })\n return dog\n}\n"]}

View File

@@ -0,0 +1,6 @@
import React from 'react';
import './index.scss';
export declare const PopupListGroupLabel: React.FC<{
label: string;
}>;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,110 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const http = require('../http.js');
const amqplib = require('./amqplib.js');
const index$6 = require('./anthropic-ai/index.js');
const connect = require('./connect.js');
const express = require('./express.js');
const index = require('./fastify/index.js');
const firebase = require('./firebase/firebase.js');
const genericPool = require('./genericPool.js');
const index$7 = require('./google-genai/index.js');
const graphql = require('./graphql.js');
const index$1 = require('./hapi/index.js');
const index$2 = require('./hono/index.js');
const kafka = require('./kafka.js');
const koa = require('./koa.js');
const index$3 = require('./langchain/index.js');
const index$8 = require('./langgraph/index.js');
const lrumemoizer = require('./lrumemoizer.js');
const mongo = require('./mongo.js');
const mongoose = require('./mongoose.js');
const mysql = require('./mysql.js');
const mysql2 = require('./mysql2.js');
const index$5 = require('./openai/index.js');
const postgres = require('./postgres.js');
const postgresjs = require('./postgresjs.js');
const prisma = require('./prisma.js');
const redis = require('./redis.js');
const tedious = require('./tedious.js');
const index$4 = require('./vercelai/index.js');
/**
* With OTEL, all performance integrations will be added, as OTEL only initializes them when the patched package is actually required.
*/
function getAutoPerformanceIntegrations() {
return [
express.expressIntegration(),
index.fastifyIntegration(),
graphql.graphqlIntegration(),
index$2.honoIntegration(),
mongo.mongoIntegration(),
mongoose.mongooseIntegration(),
mysql.mysqlIntegration(),
mysql2.mysql2Integration(),
redis.redisIntegration(),
postgres.postgresIntegration(),
prisma.prismaIntegration(),
index$1.hapiIntegration(),
koa.koaIntegration(),
connect.connectIntegration(),
tedious.tediousIntegration(),
genericPool.genericPoolIntegration(),
kafka.kafkaIntegration(),
amqplib.amqplibIntegration(),
lrumemoizer.lruMemoizerIntegration(),
// AI providers
// LangChain must come first to disable AI provider integrations before they instrument
index$3.langChainIntegration(),
index$8.langGraphIntegration(),
index$4.vercelAIIntegration(),
index$5.openAIIntegration(),
index$6.anthropicAIIntegration(),
index$7.googleGenAIIntegration(),
postgresjs.postgresJsIntegration(),
firebase.firebaseIntegration(),
];
}
/**
* Get a list of methods to instrument OTEL, when preload instrumentation.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function getOpenTelemetryInstrumentationToPreload() {
return [
http.instrumentSentryHttp,
http.instrumentOtelHttp,
express.instrumentExpress,
connect.instrumentConnect,
index.instrumentFastify,
index.instrumentFastifyV3,
index$1.instrumentHapi,
index$2.instrumentHono,
kafka.instrumentKafka,
koa.instrumentKoa,
lrumemoizer.instrumentLruMemoizer,
mongo.instrumentMongo,
mongoose.instrumentMongoose,
mysql.instrumentMysql,
mysql2.instrumentMysql2,
postgres.instrumentPostgres,
index$1.instrumentHapi,
graphql.instrumentGraphql,
redis.instrumentRedis,
tedious.instrumentTedious,
genericPool.instrumentGenericPool,
amqplib.instrumentAmqplib,
index$3.instrumentLangChain,
index$4.instrumentVercelAi,
index$5.instrumentOpenAi,
postgresjs.instrumentPostgresJs,
firebase.instrumentFirebase,
index$6.instrumentAnthropicAi,
index$7.instrumentGoogleGenAI,
index$8.instrumentLangGraph,
];
}
exports.getAutoPerformanceIntegrations = getAutoPerformanceIntegrations;
exports.getOpenTelemetryInstrumentationToPreload = getOpenTelemetryInstrumentationToPreload;
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,52 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _asyncGeneratorDelegate;
var _OverloadYield = require("./OverloadYield.js");
function _asyncGeneratorDelegate(inner) {
var iter = {},
waiting = false;
function pump(key, value) {
waiting = true;
value = new Promise(function (resolve) {
resolve(inner[key](value));
});
return {
done: false,
value: new _OverloadYield.default(value, 1)
};
}
iter[typeof Symbol !== "undefined" && Symbol.iterator || "@@iterator"] = function () {
return this;
};
iter.next = function (value) {
if (waiting) {
waiting = false;
return value;
}
return pump("next", value);
};
if (typeof inner["throw"] === "function") {
iter["throw"] = function (value) {
if (waiting) {
waiting = false;
throw value;
}
return pump("throw", value);
};
}
if (typeof inner["return"] === "function") {
iter["return"] = function (value) {
if (waiting) {
waiting = false;
return value;
}
return pump("return", value);
};
}
return iter;
}
//# sourceMappingURL=asyncGeneratorDelegate.js.map

View File

@@ -0,0 +1,15 @@
/**
* @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 LoaderCircle = createLucideIcon("LoaderCircle", [
["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]
]);
export { LoaderCircle as default };
//# sourceMappingURL=loader-circle.js.map

View File

@@ -0,0 +1,2 @@
export declare function fieldHasChanges(a: unknown, b: unknown): boolean;
//# sourceMappingURL=fieldHasChanges.d.ts.map

View File

@@ -0,0 +1,26 @@
"use strict";
exports.ExtendedYearParser = void 0;
var _Parser = require("../Parser.js");
var _utils = require("../utils.js");
class ExtendedYearParser extends _Parser.Parser {
priority = 130;
parse(dateString, token) {
if (token === "u") {
return (0, _utils.parseNDigitsSigned)(4, dateString);
}
return (0, _utils.parseNDigitsSigned)(token.length, dateString);
}
set(date, _flags, value) {
date.setFullYear(value, 0, 1);
date.setHours(0, 0, 0, 0);
return date;
}
incompatibleTokens = ["G", "y", "Y", "R", "w", "I", "i", "e", "c", "t", "T"];
}
exports.ExtendedYearParser = ExtendedYearParser;

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/utilities/isURLAllowed.ts"],"sourcesContent":["import type { AllowList } from '../uploads/types.js'\n\nexport const isURLAllowed = (url: string, allowList: AllowList): boolean => {\n try {\n const parsedUrl = new URL(url)\n\n return allowList.some((allowItem) => {\n return Object.entries(allowItem).every(([key, value]) => {\n // Skip undefined or null values\n if (!value) {\n return true\n }\n // Compare protocol with colon\n if (key === 'protocol') {\n return typeof value === 'string' && parsedUrl.protocol === `${value}:`\n }\n\n if (key === 'pathname') {\n // Convert wildcards to a regex\n const regexPattern = value\n .replace(/\\*\\*/g, '.*') // Match any path\n .replace(/\\*/g, '[^/]*') // Match any part of a path segment\n .replace(/\\/$/, '(/)?') // Allow optional trailing slash\n const regex = new RegExp(`^${regexPattern}$`)\n return regex.test(parsedUrl.pathname)\n }\n\n // Default comparison for all other properties (hostname, port, search)\n return parsedUrl[key as keyof URL] === value\n })\n })\n } catch {\n return false // If the URL is invalid, deny by default\n }\n}\n"],"names":["isURLAllowed","url","allowList","parsedUrl","URL","some","allowItem","Object","entries","every","key","value","protocol","regexPattern","replace","regex","RegExp","test","pathname"],"mappings":"AAEA,OAAO,MAAMA,eAAe,CAACC,KAAaC;IACxC,IAAI;QACF,MAAMC,YAAY,IAAIC,IAAIH;QAE1B,OAAOC,UAAUG,IAAI,CAAC,CAACC;YACrB,OAAOC,OAAOC,OAAO,CAACF,WAAWG,KAAK,CAAC,CAAC,CAACC,KAAKC,MAAM;gBAClD,gCAAgC;gBAChC,IAAI,CAACA,OAAO;oBACV,OAAO;gBACT;gBACA,8BAA8B;gBAC9B,IAAID,QAAQ,YAAY;oBACtB,OAAO,OAAOC,UAAU,YAAYR,UAAUS,QAAQ,KAAK,GAAGD,MAAM,CAAC,CAAC;gBACxE;gBAEA,IAAID,QAAQ,YAAY;oBACtB,+BAA+B;oBAC/B,MAAMG,eAAeF,MAClBG,OAAO,CAAC,SAAS,MAAM,iBAAiB;qBACxCA,OAAO,CAAC,OAAO,SAAS,mCAAmC;qBAC3DA,OAAO,CAAC,OAAO,QAAQ,gCAAgC;;oBAC1D,MAAMC,QAAQ,IAAIC,OAAO,CAAC,CAAC,EAAEH,aAAa,CAAC,CAAC;oBAC5C,OAAOE,MAAME,IAAI,CAACd,UAAUe,QAAQ;gBACtC;gBAEA,uEAAuE;gBACvE,OAAOf,SAAS,CAACO,IAAiB,KAAKC;YACzC;QACF;IACF,EAAE,OAAM;QACN,OAAO,MAAM,yCAAyC;;IACxD;AACF,EAAC"}

View File

@@ -0,0 +1,23 @@
/**
* A specialized version of `_.some` for arrays without support for iteratee
* shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {boolean} Returns `true` if any element passes the predicate check,
* else `false`.
*/
function arraySome(array, predicate) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (predicate(array[index], index, array)) {
return true;
}
}
return false;
}
module.exports = arraySome;

View File

@@ -0,0 +1,6 @@
@layer payload-default {
.icon--trash {
height: var(--base);
width: var(--base);
}
}

View File

@@ -0,0 +1,6 @@
import React from 'react'
import { createRoot } from 'react-dom/client'
import { Demo } from './Demo'
const root = createRoot(document.getElementById('root')!)
root.render(<Demo />)

View File

@@ -0,0 +1 @@
{"version":3,"file":"propertyNames.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/propertyNames.ts"],"names":[],"mappings":";;AAOA,mDAA4C;AAC5C,6CAAoD;AAIpD,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,6BAA6B;IACtC,MAAM,EAAE,CAAC,EAAC,MAAM,EAAC,EAAE,EAAE,CAAC,IAAA,WAAC,EAAA,kBAAkB,MAAM,CAAC,YAAY,GAAG;CAChE,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,eAAe;IACxB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;IACjC,KAAK;IACL,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QACnC,IAAI,IAAA,wBAAiB,EAAC,EAAE,EAAE,MAAM,CAAC;YAAE,OAAM;QACzC,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAE/B,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE;YAC7B,GAAG,CAAC,SAAS,CAAC,EAAC,YAAY,EAAE,GAAG,EAAC,CAAC,CAAA;YAClC,GAAG,CAAC,SAAS,CACX;gBACE,OAAO,EAAE,eAAe;gBACxB,IAAI,EAAE,GAAG;gBACT,SAAS,EAAE,CAAC,QAAQ,CAAC;gBACrB,YAAY,EAAE,GAAG;gBACjB,aAAa,EAAE,IAAI;aACpB,EACD,KAAK,CACN,CAAA;YACD,GAAG,CAAC,EAAE,CAAC,IAAA,aAAG,EAAC,KAAK,CAAC,EAAE,GAAG,EAAE;gBACtB,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;gBACf,IAAI,CAAC,EAAE,CAAC,SAAS;oBAAE,GAAG,CAAC,KAAK,EAAE,CAAA;YAChC,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;QAEF,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,CAAA;IACf,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"}

View File

@@ -0,0 +1,31 @@
import { MotionGlobalConfig } from '../utils/GlobalConfig.mjs';
import { frameData } from './frame.mjs';
let now;
function clearTime() {
now = undefined;
}
/**
* An eventloop-synchronous alternative to performance.now().
*
* Ensures that time measurements remain consistent within a synchronous context.
* Usually calling performance.now() twice within the same synchronous context
* will return different values which isn't useful for animations when we're usually
* trying to sync animations to the same frame.
*/
const time = {
now: () => {
if (now === undefined) {
time.set(frameData.isProcessing || MotionGlobalConfig.useManualTiming
? frameData.timestamp
: performance.now());
}
return now;
},
set: (newTime) => {
now = newTime;
queueMicrotask(clearTime);
},
};
export { time };

View File

@@ -0,0 +1,24 @@
import { entityKind } from "../../entity.js";
import { sql } from "../../sql/sql.js";
import { MySqlColumn, MySqlColumnBuilder } from "./common.js";
class MySqlDateColumnBaseBuilder extends MySqlColumnBuilder {
static [entityKind] = "MySqlDateColumnBuilder";
defaultNow() {
return this.default(sql`(now())`);
}
// "on update now" also adds an implicit default value to the column - https://dev.mysql.com/doc/refman/8.0/en/timestamp-initialization.html
onUpdateNow() {
this.config.hasOnUpdateNow = true;
this.config.hasDefault = true;
return this;
}
}
class MySqlDateBaseColumn extends MySqlColumn {
static [entityKind] = "MySqlDateColumn";
hasOnUpdateNow = this.config.hasOnUpdateNow;
}
export {
MySqlDateBaseColumn,
MySqlDateColumnBaseBuilder
};
//# sourceMappingURL=date.common.js.map

View File

@@ -0,0 +1,6 @@
function _getPrototypeOf(t) {
return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
return t.__proto__ || Object.getPrototypeOf(t);
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t);
}
module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["ScrollInfoProvider","useScrollInfo"],"sources":["../../../src/providers/ScrollInfo/index.tsx"],"sourcesContent":["'use client'\nexport { ScrollInfoProvider, useScrollInfo } from '@faceless-ui/scroll-info'\n"],"mappings":"AAAA;;AACA,SAASA,kBAAkB,EAAEC,aAAa,QAAQ","ignoreList":[]}

View File

@@ -0,0 +1,52 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateTuple = void 0;
const codegen_1 = require("../../compile/codegen");
const util_1 = require("../../compile/util");
const code_1 = require("../code");
const def = {
keyword: "items",
type: "array",
schemaType: ["object", "array", "boolean"],
before: "uniqueItems",
code(cxt) {
const { schema, it } = cxt;
if (Array.isArray(schema))
return validateTuple(cxt, "additionalItems", schema);
it.items = true;
if ((0, util_1.alwaysValidSchema)(it, schema))
return;
cxt.ok((0, code_1.validateArray)(cxt));
},
};
function validateTuple(cxt, extraItems, schArr = cxt.schema) {
const { gen, parentSchema, data, keyword, it } = cxt;
checkStrictTuple(parentSchema);
if (it.opts.unevaluated && schArr.length && it.items !== true) {
it.items = util_1.mergeEvaluated.items(gen, schArr.length, it.items);
}
const valid = gen.name("valid");
const len = gen.const("len", (0, codegen_1._) `${data}.length`);
schArr.forEach((sch, i) => {
if ((0, util_1.alwaysValidSchema)(it, sch))
return;
gen.if((0, codegen_1._) `${len} > ${i}`, () => cxt.subschema({
keyword,
schemaProp: i,
dataProp: i,
}, valid));
cxt.ok(valid);
});
function checkStrictTuple(sch) {
const { opts, errSchemaPath } = it;
const l = schArr.length;
const fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false);
if (opts.strictTuples && !fullTuple) {
const msg = `"${keyword}" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path "${errSchemaPath}"`;
(0, util_1.checkStrictMode)(it, msg, opts.strictTuples);
}
}
}
exports.validateTuple = validateTuple;
exports.default = def;
//# sourceMappingURL=items.js.map

View File

@@ -0,0 +1,8 @@
import { findOne } from './findOne.js';
import { findVersionByID } from './findVersionByID.js';
import { findVersions } from './findVersions.js';
import { restoreVersion } from './restoreVersion.js';
import { update } from './update.js';
export { findOne, findVersionByID, findVersions, restoreVersion, update };
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"martini.js","sources":["../../../src/icons/martini.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Martini\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNOCAyMmg4IiAvPgogIDxwYXRoIGQ9Ik0xMiAxMXYxMSIgLz4KICA8cGF0aCBkPSJtMTkgMy03IDgtNy04WiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/martini\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 Martini = createLucideIcon('Martini', [\n ['path', { d: 'M8 22h8', key: 'rmew8v' }],\n ['path', { d: 'M12 11v11', key: 'ur9y6a' }],\n ['path', { d: 'm19 3-7 8-7-8Z', key: '1sgpiw' }],\n]);\n\nexport default Martini;\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,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,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,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,51 @@
import { expectTypeOf, test } from "vitest";
import * as z from "../index.js";
test("branded types", () => {
const mySchema = z
.object({
name: z.string(),
})
.brand<"superschema">();
// simple branding
type MySchema = z.infer<typeof mySchema>;
// Using true for type equality assertion
expectTypeOf<MySchema>().toEqualTypeOf<{ name: string } & z.$brand<"superschema">>();
const doStuff = (arg: MySchema) => arg;
doStuff(z.parse(mySchema, { name: "hello there" }));
// inheritance
const extendedSchema = mySchema.brand<"subschema">();
type ExtendedSchema = z.infer<typeof extendedSchema>;
expectTypeOf<ExtendedSchema>().toEqualTypeOf<{ name: string } & z.$brand<"superschema"> & z.$brand<"subschema">>();
doStuff(z.parse(extendedSchema, { name: "hello again" }));
// number branding
const numberSchema = z.number().brand<42>();
type NumberSchema = z.infer<typeof numberSchema>;
expectTypeOf<NumberSchema>().toEqualTypeOf<number & { [z.$brand]: { 42: true } }>();
// symbol branding
const MyBrand: unique symbol = Symbol("hello");
type MyBrand = typeof MyBrand;
const symbolBrand = z.number().brand<"sup">().brand<typeof MyBrand>();
type SymbolBrand = z.infer<typeof symbolBrand>;
// number & { [z.$brand]: { sup: true, [MyBrand]: true } }
expectTypeOf<SymbolBrand>().toEqualTypeOf<number & z.$brand<"sup"> & z.$brand<MyBrand>>();
// keeping brands out of input types
const age = z.number().brand<"age">();
type Age1 = z.infer<typeof age>;
type AgeInput1 = z.input<typeof age>;
// Using not for type inequality assertion
expectTypeOf<AgeInput1>().not.toEqualTypeOf<Age1>();
expectTypeOf<number>().toEqualTypeOf<AgeInput1>();
expectTypeOf<number & z.$brand<"age">>().toEqualTypeOf<Age1>();
// @ts-expect-error
doStuff({ name: "hello there!" });
});

View File

@@ -0,0 +1 @@
{"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../../src/exports/utilities.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAA;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAE7D,OAAO,EAEL,2BAA2B,IAAI,4BAA4B,EAK5D,MAAM,SAAS,CAAA;AAEhB;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,kEAAgB,CAAA;AAEzC;;;;;;GAMG;AACH,eAAO,MAAM,eAAe;;;aAAmB,CAAA;AAE/C;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;+CAAwB,CAAA;AAEzD;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,0DAA2B,CAAA;AAE/D;;;;;;GAMG;AACH,eAAO,MAAM,eAAe;;;;;;;CAAmB,CAAA;AAE/C;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,qCAA+B,CAAA"}

View File

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

View File

@@ -0,0 +1,37 @@
// Vendored from https://github.com/open-telemetry/opentelemetry-js-contrib/blob/407f61591ba69a39a6908264379d4d98a48dbec4/plugins/node/opentelemetry-instrumentation-fastify/src/enums/AttributeNames.ts
//
/*
* 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.
*/
var AttributeNames; (function (AttributeNames) {
const FASTIFY_NAME = 'fastify.name'; AttributeNames["FASTIFY_NAME"] = FASTIFY_NAME;
const FASTIFY_TYPE = 'fastify.type'; AttributeNames["FASTIFY_TYPE"] = FASTIFY_TYPE;
const HOOK_NAME = 'hook.name'; AttributeNames["HOOK_NAME"] = HOOK_NAME;
const PLUGIN_NAME = 'plugin.name'; AttributeNames["PLUGIN_NAME"] = PLUGIN_NAME;
})(AttributeNames || (AttributeNames = {}));
var FastifyTypes; (function (FastifyTypes) {
const MIDDLEWARE = 'middleware'; FastifyTypes["MIDDLEWARE"] = MIDDLEWARE;
const REQUEST_HANDLER = 'request_handler'; FastifyTypes["REQUEST_HANDLER"] = REQUEST_HANDLER;
})(FastifyTypes || (FastifyTypes = {}));
var FastifyNames; (function (FastifyNames) {
const MIDDLEWARE = 'middleware'; FastifyNames["MIDDLEWARE"] = MIDDLEWARE;
const REQUEST_HANDLER = 'request handler'; FastifyNames["REQUEST_HANDLER"] = REQUEST_HANDLER;
})(FastifyNames || (FastifyNames = {}));
export { AttributeNames, FastifyNames, FastifyTypes };
//# sourceMappingURL=AttributeNames.js.map

View File

@@ -0,0 +1,2 @@
const e=(e,t,n)=>()=>({path:`/fields/${e}`,params:n??{},body:JSON.stringify(t),method:`POST`});exports.createField=e;
//# sourceMappingURL=fields.cjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"voicemail.js","sources":["../../../src/icons/voicemail.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Voicemail\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSI2IiBjeT0iMTIiIHI9IjQiIC8+CiAgPGNpcmNsZSBjeD0iMTgiIGN5PSIxMiIgcj0iNCIgLz4KICA8bGluZSB4MT0iNiIgeDI9IjE4IiB5MT0iMTYiIHkyPSIxNiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/voicemail\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 Voicemail = createLucideIcon('Voicemail', [\n ['circle', { cx: '6', cy: '12', r: '4', key: '1ehtga' }],\n ['circle', { cx: '18', cy: '12', r: '4', key: '4vafl8' }],\n ['line', { x1: '6', x2: '18', y1: '16', y2: '16', key: 'pmt8us' }],\n]);\n\nexport default Voicemail;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAC9C,CAAA,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,CAAA;AAAA,CACvD,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,CACxD,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACnE,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,23 @@
/**
* Given a child DOM element, returns a query-selector statement describing that
* and its ancestors
* e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]
* @returns generated DOM path
*/
export declare function htmlTreeAsString(elem: unknown, options?: string[] | {
keyAttrs?: string[];
maxStringLength?: number;
}): string;
/**
* A safe form of location.href
*/
export declare function getLocationHref(): string;
/**
* Given a DOM element, traverses up the tree until it finds the first ancestor node
* that has the `data-sentry-component` or `data-sentry-element` attribute with `data-sentry-component` taking
* precedence. This attribute is added at build-time by projects that have the component name annotation plugin installed.
*
* @returns a string representation of the component for the provided DOM element, or `null` if not found
*/
export declare function getComponentName(elem: unknown): string | null;
//# sourceMappingURL=browser.d.ts.map

View File

@@ -0,0 +1,183 @@
import { URIComponent } from "fast-uri";
import type { CodeGen, Code, Name, ScopeValueSets, ValueScopeName } from "../compile/codegen";
import type { SchemaEnv, SchemaCxt, SchemaObjCxt } from "../compile";
import type { JSONType } from "../compile/rules";
import type { KeywordCxt } from "../compile/validate";
import type Ajv from "../core";
interface _SchemaObject {
id?: string;
$id?: string;
$schema?: string;
[x: string]: any;
}
export interface SchemaObject extends _SchemaObject {
id?: string;
$id?: string;
$schema?: string;
$async?: false;
[x: string]: any;
}
export interface AsyncSchema extends _SchemaObject {
$async: true;
}
export type AnySchemaObject = SchemaObject | AsyncSchema;
export type Schema = SchemaObject | boolean;
export type AnySchema = Schema | AsyncSchema;
export type SchemaMap = {
[Key in string]?: AnySchema;
};
export interface SourceCode {
validateName: ValueScopeName;
validateCode: string;
scopeValues: ScopeValueSets;
evaluated?: Code;
}
export interface DataValidationCxt<T extends string | number = string | number> {
instancePath: string;
parentData: {
[K in T]: any;
};
parentDataProperty: T;
rootData: Record<string, any> | any[];
dynamicAnchors: {
[Ref in string]?: ValidateFunction;
};
}
export interface ValidateFunction<T = unknown> {
(this: Ajv | any, data: any, dataCxt?: DataValidationCxt): data is T;
errors?: null | ErrorObject[];
evaluated?: Evaluated;
schema: AnySchema;
schemaEnv: SchemaEnv;
source?: SourceCode;
}
export interface JTDParser<T = unknown> {
(json: string): T | undefined;
message?: string;
position?: number;
}
export type EvaluatedProperties = {
[K in string]?: true;
} | true;
export type EvaluatedItems = number | true;
export interface Evaluated {
props?: EvaluatedProperties;
items?: EvaluatedItems;
dynamicProps: boolean;
dynamicItems: boolean;
}
export interface AsyncValidateFunction<T = unknown> extends ValidateFunction<T> {
(...args: Parameters<ValidateFunction<T>>): Promise<T>;
$async: true;
}
export type AnyValidateFunction<T = any> = ValidateFunction<T> | AsyncValidateFunction<T>;
export interface ErrorObject<K extends string = string, P = Record<string, any>, S = unknown> {
keyword: K;
instancePath: string;
schemaPath: string;
params: P;
propertyName?: string;
message?: string;
schema?: S;
parentSchema?: AnySchemaObject;
data?: unknown;
}
export type ErrorNoParams<K extends string, S = unknown> = ErrorObject<K, Record<string, never>, S>;
interface _KeywordDef {
keyword: string | string[];
type?: JSONType | JSONType[];
schemaType?: JSONType | JSONType[];
allowUndefined?: boolean;
$data?: boolean;
implements?: string[];
before?: string;
post?: boolean;
metaSchema?: AnySchemaObject;
validateSchema?: AnyValidateFunction;
dependencies?: string[];
error?: KeywordErrorDefinition;
$dataError?: KeywordErrorDefinition;
}
export interface CodeKeywordDefinition extends _KeywordDef {
code: (cxt: KeywordCxt, ruleType?: string) => void;
trackErrors?: boolean;
}
export type MacroKeywordFunc = (schema: any, parentSchema: AnySchemaObject, it: SchemaCxt) => AnySchema;
export type CompileKeywordFunc = (schema: any, parentSchema: AnySchemaObject, it: SchemaObjCxt) => DataValidateFunction;
export interface DataValidateFunction {
(...args: Parameters<ValidateFunction>): boolean | Promise<any>;
errors?: Partial<ErrorObject>[];
}
export interface SchemaValidateFunction {
(schema: any, data: any, parentSchema?: AnySchemaObject, dataCxt?: DataValidationCxt): boolean | Promise<any>;
errors?: Partial<ErrorObject>[];
}
export interface FuncKeywordDefinition extends _KeywordDef {
validate?: SchemaValidateFunction | DataValidateFunction;
compile?: CompileKeywordFunc;
schema?: boolean;
modifying?: boolean;
async?: boolean;
valid?: boolean;
errors?: boolean | "full";
}
export interface MacroKeywordDefinition extends FuncKeywordDefinition {
macro: MacroKeywordFunc;
}
export type KeywordDefinition = CodeKeywordDefinition | FuncKeywordDefinition | MacroKeywordDefinition;
export type AddedKeywordDefinition = KeywordDefinition & {
type: JSONType[];
schemaType: JSONType[];
};
export interface KeywordErrorDefinition {
message: string | Code | ((cxt: KeywordErrorCxt) => string | Code);
params?: Code | ((cxt: KeywordErrorCxt) => Code);
}
export type Vocabulary = (KeywordDefinition | string)[];
export interface KeywordErrorCxt {
gen: CodeGen;
keyword: string;
data: Name;
$data?: string | false;
schema: any;
parentSchema?: AnySchemaObject;
schemaCode: Code | number | boolean;
schemaValue: Code | number | boolean;
schemaType?: JSONType[];
errsCount?: Name;
params: KeywordCxtParams;
it: SchemaCxt;
}
export type KeywordCxtParams = {
[P in string]?: Code | string | number;
};
export type FormatValidator<T extends string | number> = (data: T) => boolean;
export type FormatCompare<T extends string | number> = (data1: T, data2: T) => number | undefined;
export type AsyncFormatValidator<T extends string | number> = (data: T) => Promise<boolean>;
export interface FormatDefinition<T extends string | number> {
type?: T extends string ? "string" | undefined : "number";
validate: FormatValidator<T> | (T extends string ? string | RegExp : never);
async?: false | undefined;
compare?: FormatCompare<T>;
}
export interface AsyncFormatDefinition<T extends string | number> {
type?: T extends string ? "string" | undefined : "number";
validate: AsyncFormatValidator<T>;
async: true;
compare?: FormatCompare<T>;
}
export type AddedFormat = true | RegExp | FormatValidator<string> | FormatDefinition<string> | FormatDefinition<number> | AsyncFormatDefinition<string> | AsyncFormatDefinition<number>;
export type Format = AddedFormat | string;
export interface RegExpEngine {
(pattern: string, u: string): RegExpLike;
code: string;
}
export interface RegExpLike {
test: (s: string) => boolean;
}
export interface UriResolver {
parse(uri: string): URIComponent;
resolve(base: string, path: string): string;
serialize(component: URIComponent): string;
}
export {};

View File

@@ -0,0 +1,53 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import type { AnySingleStoreTable } from "../table.cjs";
import { type Equal } from "../../utils.cjs";
import { SingleStoreColumn, SingleStoreColumnBuilder } from "./common.cjs";
export type SingleStoreDateBuilderInitial<TName extends string> = SingleStoreDateBuilder<{
name: TName;
dataType: 'date';
columnType: 'SingleStoreDate';
data: Date;
driverParam: string | number;
enumValues: undefined;
generated: undefined;
}>;
export declare class SingleStoreDateBuilder<T extends ColumnBuilderBaseConfig<'date', 'SingleStoreDate'>> extends SingleStoreColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class SingleStoreDate<T extends ColumnBaseConfig<'date', 'SingleStoreDate'>> extends SingleStoreColumn<T> {
static readonly [entityKind]: string;
constructor(table: AnySingleStoreTable<{
name: T['tableName'];
}>, config: SingleStoreDateBuilder<T>['config']);
getSQLType(): string;
mapFromDriverValue(value: string): Date;
}
export type SingleStoreDateStringBuilderInitial<TName extends string> = SingleStoreDateStringBuilder<{
name: TName;
dataType: 'string';
columnType: 'SingleStoreDateString';
data: string;
driverParam: string | number;
enumValues: undefined;
generated: undefined;
}>;
export declare class SingleStoreDateStringBuilder<T extends ColumnBuilderBaseConfig<'string', 'SingleStoreDateString'>> extends SingleStoreColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class SingleStoreDateString<T extends ColumnBaseConfig<'string', 'SingleStoreDateString'>> extends SingleStoreColumn<T> {
static readonly [entityKind]: string;
constructor(table: AnySingleStoreTable<{
name: T['tableName'];
}>, config: SingleStoreDateStringBuilder<T>['config']);
getSQLType(): string;
}
export interface SingleStoreDateConfig<TMode extends 'date' | 'string' = 'date' | 'string'> {
mode?: TMode;
}
export declare function date(): SingleStoreDateBuilderInitial<''>;
export declare function date<TMode extends SingleStoreDateConfig['mode'] & {}>(config?: SingleStoreDateConfig<TMode>): Equal<TMode, 'string'> extends true ? SingleStoreDateStringBuilderInitial<''> : SingleStoreDateBuilderInitial<''>;
export declare function date<TName extends string, TMode extends SingleStoreDateConfig['mode'] & {}>(name: TName, config?: SingleStoreDateConfig<TMode>): Equal<TMode, 'string'> extends true ? SingleStoreDateStringBuilderInitial<TName> : SingleStoreDateBuilderInitial<TName>;

View File

@@ -0,0 +1 @@
exports._default = require("./emotion-weak-memoize.cjs.js").default;

View File

@@ -0,0 +1,82 @@
@import '../../scss/styles';
@layer payload-default {
.search-bar {
--icon-width: 40px;
--search-bg: var(--theme-elevation-50);
display: grid;
grid-template-columns: auto 1fr;
width: 100%;
background-color: var(--search-bg);
border-radius: var(--style-radius-m);
position: relative;
min-height: 46px;
isolation: isolate;
&:has(.search-bar__actions) {
grid-template-columns: auto 1fr auto;
}
&:has(.popup--active) {
z-index: 1;
}
.icon--search {
grid-column: 1/2;
grid-row: 1/2;
z-index: 1;
align-self: center;
justify-self: center;
pointer-events: none;
width: 40px;
}
.search-filter {
grid-column: 1/3;
grid-row: 1/2;
background-color: transparent;
border-radius: inherit;
input {
height: 100%;
padding-bottom: calc(var(--base) * 0.5);
padding-top: calc(var(--base) * 0.5);
padding-inline-start: var(--icon-width);
padding-inline-end: var(--base);
background-color: transparent;
}
}
&__actions {
display: flex;
align-items: center;
gap: calc(var(--base) / 4);
padding: calc(var(--base) * 0.5);
grid-column: 3/4;
}
@include small-break {
min-height: 40px;
background-color: transparent;
&:has(.search-bar__actions) {
row-gap: calc(var(--base) / 2);
grid-template-columns: auto 1fr;
grid-template-rows: auto auto;
}
.search-filter {
background-color: var(--search-bg);
}
&__actions {
grid-row: 2/3;
grid-column: 1/3;
display: flex;
align-items: center;
gap: calc(var(--base) / 4);
padding: 0;
}
}
}
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"migrateStatus.d.ts","sourceRoot":"","sources":["../src/migrateStatus.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAIhD,wBAAsB,aAAa,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAuCvE"}

View File

@@ -0,0 +1 @@
{"version":3,"names":["setFunctionName","fn","name","prefix","description","Object","defineProperty","configurable","value","_"],"sources":["../../src/helpers/setFunctionName.ts"],"sourcesContent":["/* @minVersion 7.23.6 */\n\n// https://tc39.es/ecma262/#sec-setfunctionname\nexport default function setFunctionName<T extends Function>(\n fn: T,\n name: symbol | string,\n prefix?: string,\n): T {\n if (typeof name === \"symbol\") {\n // Here `undefined` is possible, we check for it in the next line.\n name = name.description!;\n name = name ? \"[\" + name + \"]\" : \"\";\n }\n // In some older browsers .name was non-configurable, here we catch any\n // errors thrown by defineProperty.\n try {\n Object.defineProperty(fn, \"name\", {\n configurable: true,\n value: prefix ? prefix + \" \" + name : name,\n });\n } catch (_) {}\n return fn;\n}\n"],"mappings":";;;;;;AAGe,SAASA,eAAeA,CACrCC,EAAK,EACLC,IAAqB,EACrBC,MAAe,EACZ;EACH,IAAI,OAAOD,IAAI,KAAK,QAAQ,EAAE;IAE5BA,IAAI,GAAGA,IAAI,CAACE,WAAY;IACxBF,IAAI,GAAGA,IAAI,GAAG,GAAG,GAAGA,IAAI,GAAG,GAAG,GAAG,EAAE;EACrC;EAGA,IAAI;IACFG,MAAM,CAACC,cAAc,CAACL,EAAE,EAAE,MAAM,EAAE;MAChCM,YAAY,EAAE,IAAI;MAClBC,KAAK,EAAEL,MAAM,GAAGA,MAAM,GAAG,GAAG,GAAGD,IAAI,GAAGA;IACxC,CAAC,CAAC;EACJ,CAAC,CAAC,OAAOO,CAAC,EAAE,CAAC;EACb,OAAOR,EAAE;AACX","ignoreList":[]}

View File

@@ -0,0 +1,61 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.NoUnusedFragmentsRule = NoUnusedFragmentsRule;
var _GraphQLError = require('../../error/GraphQLError.js');
/**
* No unused fragments
*
* A GraphQL document is only valid if all fragment definitions are spread
* within operations, or spread within other fragments spread within operations.
*
* See https://spec.graphql.org/draft/#sec-Fragments-Must-Be-Used
*/
function NoUnusedFragmentsRule(context) {
const operationDefs = [];
const fragmentDefs = [];
return {
OperationDefinition(node) {
operationDefs.push(node);
return false;
},
FragmentDefinition(node) {
fragmentDefs.push(node);
return false;
},
Document: {
leave() {
const fragmentNameUsed = Object.create(null);
for (const operation of operationDefs) {
for (const fragment of context.getRecursivelyReferencedFragments(
operation,
)) {
fragmentNameUsed[fragment.name.value] = true;
}
}
for (const fragmentDef of fragmentDefs) {
const fragName = fragmentDef.name.value;
if (fragmentNameUsed[fragName] !== true) {
context.reportError(
new _GraphQLError.GraphQLError(
`Fragment "${fragName}" is never used.`,
{
nodes: fragmentDef,
},
),
);
}
}
},
},
};
}

View File

@@ -0,0 +1,4 @@
function _is_native_function(fn) {
return Function.toString.call(fn).indexOf("[native code]") !== -1;
}
export { _is_native_function as _ };

View File

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

View File

@@ -0,0 +1,4 @@
var supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;
export default function isTransform(value) {
return !!(value && supportedTransforms.test(value));
}

View File

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

View File

@@ -0,0 +1,10 @@
import type { CoreOptions } from '../types-hoist/options';
import type { SamplingContext } from '../types-hoist/samplingcontext';
/**
* Makes a sampling decision for the given options.
*
* Called every time a root span is created. Only root spans which emerge with a `sampled` value of `true` will be
* sent to Sentry.
*/
export declare function sampleSpan(options: Pick<CoreOptions, 'tracesSampleRate' | 'tracesSampler'>, samplingContext: SamplingContext, sampleRand: number): [sampled: boolean, sampleRate?: number, localSampleRateWasApplied?: boolean];
//# sourceMappingURL=sampling.d.ts.map

View File

@@ -0,0 +1,18 @@
/**
* This method returns an empty string.
*
* @static
* @memberOf _
* @since 4.13.0
* @category Util
* @returns {string} Returns the empty string.
* @example
*
* _.times(2, _.stubString);
* // => ['', '']
*/
function stubString() {
return '';
}
module.exports = stubString;

View File

@@ -0,0 +1 @@
{"version":3,"file":"NoopSpanProcessor.js","sourceRoot":"","sources":["../../../src/export/NoopSpanProcessor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAOH,4CAA4C;AAC5C,MAAM,OAAO,iBAAiB;IAC5B,OAAO,CAAC,KAAW,EAAE,QAAiB,IAAS,CAAC;IAChD,KAAK,CAAC,KAAmB,IAAS,CAAC;IACnC,QAAQ;QACN,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IACD,UAAU;QACR,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;CACF","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\nimport { Context } from '@opentelemetry/api';\nimport { ReadableSpan } from './ReadableSpan';\nimport { Span } from '../Span';\nimport { SpanProcessor } from '../SpanProcessor';\n\n/** No-op implementation of SpanProcessor */\nexport class NoopSpanProcessor implements SpanProcessor {\n onStart(_span: Span, _context: Context): void {}\n onEnd(_span: ReadableSpan): void {}\n shutdown(): Promise<void> {\n return Promise.resolve();\n }\n forceFlush(): Promise<void> {\n return Promise.resolve();\n }\n}\n"]}

View File

@@ -0,0 +1,9 @@
/**
* 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";var e=require("@lexical/react/LexicalComposerContext"),t=require("@lexical/react/useLexicalEditable"),r=require("@lexical/text"),n=require("@lexical/utils"),o=require("react"),i=require("react-dom"),c=require("react/jsx-runtime"),u=require("@lexical/dragon"),s=require("@lexical/rich-text");const l="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?o.useLayoutEffect:o.useEffect;function a(e){return e.getEditorState().read(r.$canShowPlaceholderCurry(e.isComposing()))}function d({content:r}){const[i]=e.useLexicalComposerContext(),c=function(e){const[t,r]=o.useState((()=>a(e)));return l((()=>{function t(){const t=a(e);r(t)}return t(),n.mergeRegister(e.registerUpdateListener((()=>{t()})),e.registerEditableListener((()=>{t()})))}),[e]),t}(i),u=t.useLexicalEditable();return c?"function"==typeof r?r(u):r:null}exports.RichTextPlugin=function({contentEditable:t,placeholder:r=null,ErrorBoundary:a}){const[x]=e.useLexicalComposerContext(),f=function(e,t){const[r,n]=o.useState((()=>e.getDecorators()));return l((()=>e.registerDecoratorListener((e=>{i.flushSync((()=>{n(e)}))}))),[e]),o.useEffect((()=>{n(e.getDecorators())}),[e]),o.useMemo((()=>{const n=[],u=Object.keys(r);for(let s=0;s<u.length;s++){const l=u[s],a=c.jsx(t,{onError:t=>e._onError(t),children:c.jsx(o.Suspense,{fallback:null,children:r[l]})}),d=e.getElementByKey(l);null!==d&&n.push(i.createPortal(a,d,l))}return n}),[t,r,e])}(x,a);return function(e){l((()=>n.mergeRegister(s.registerRichText(e),u.registerDragonSupport(e))),[e])}(x),c.jsxs(c.Fragment,{children:[t,c.jsx(d,{content:r}),f]})};

View File

@@ -0,0 +1,156 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const genAiAttributes = require('./gen-ai-attributes.js');
const messageTruncation = require('./messageTruncation.js');
/**
* Maps AI method paths to OpenTelemetry semantic convention operation names
* @see https://opentelemetry.io/docs/specs/semconv/gen-ai/gen-ai-spans/#llm-request-spans
*/
function getFinalOperationName(methodPath) {
if (methodPath.includes('messages')) {
return 'chat';
}
if (methodPath.includes('completions')) {
return 'text_completion';
}
// Google GenAI: models.generateContent* -> generate_content (actually generates AI responses)
if (methodPath.includes('generateContent')) {
return 'generate_content';
}
// Anthropic: models.get/retrieve -> models (metadata retrieval only)
if (methodPath.includes('models')) {
return 'models';
}
if (methodPath.includes('chat')) {
return 'chat';
}
return methodPath.split('.').pop() || 'unknown';
}
/**
* Get the span operation for AI methods
* Following Sentry's convention: "gen_ai.{operation_name}"
*/
function getSpanOperation(methodPath) {
return `gen_ai.${getFinalOperationName(methodPath)}`;
}
/**
* Build method path from current traversal
*/
function buildMethodPath(currentPath, prop) {
return currentPath ? `${currentPath}.${prop}` : prop;
}
/**
* Set token usage attributes
* @param span - The span to add attributes to
* @param promptTokens - The number of prompt tokens
* @param completionTokens - The number of completion tokens
* @param cachedInputTokens - The number of cached input tokens
* @param cachedOutputTokens - The number of cached output tokens
*/
function setTokenUsageAttributes(
span,
promptTokens,
completionTokens,
cachedInputTokens,
cachedOutputTokens,
) {
if (promptTokens !== undefined) {
span.setAttributes({
[genAiAttributes.GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE]: promptTokens,
});
}
if (completionTokens !== undefined) {
span.setAttributes({
[genAiAttributes.GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE]: completionTokens,
});
}
if (
promptTokens !== undefined ||
completionTokens !== undefined ||
cachedInputTokens !== undefined ||
cachedOutputTokens !== undefined
) {
/**
* Total input tokens in a request is the summation of `input_tokens`,
* `cache_creation_input_tokens`, and `cache_read_input_tokens`.
*/
const totalTokens =
(promptTokens ?? 0) + (completionTokens ?? 0) + (cachedInputTokens ?? 0) + (cachedOutputTokens ?? 0);
span.setAttributes({
[genAiAttributes.GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE]: totalTokens,
});
}
}
/**
* Get the truncated JSON string for a string or array of strings.
*
* @param value - The string or array of strings to truncate
* @returns The truncated JSON string
*/
function getTruncatedJsonString(value) {
if (typeof value === 'string') {
// Some values are already JSON strings, so we don't need to duplicate the JSON parsing
return messageTruncation.truncateGenAiStringInput(value);
}
if (Array.isArray(value)) {
// truncateGenAiMessages returns an array of strings, so we need to stringify it
const truncatedMessages = messageTruncation.truncateGenAiMessages(value);
return JSON.stringify(truncatedMessages);
}
// value is an object, so we need to stringify it
return JSON.stringify(value);
}
/**
* Extract system instructions from messages array.
* Finds the first system message and formats it according to OpenTelemetry semantic conventions.
*
* @param messages - Array of messages to extract system instructions from
* @returns systemInstructions (JSON string) and filteredMessages (without system message)
*/
function extractSystemInstructions(messages)
{
if (!Array.isArray(messages)) {
return { systemInstructions: undefined, filteredMessages: messages };
}
const systemMessageIndex = messages.findIndex(
msg => msg && typeof msg === 'object' && 'role' in msg && (msg ).role === 'system',
);
if (systemMessageIndex === -1) {
return { systemInstructions: undefined, filteredMessages: messages };
}
const systemMessage = messages[systemMessageIndex] ;
const systemContent =
typeof systemMessage.content === 'string'
? systemMessage.content
: systemMessage.content !== undefined
? JSON.stringify(systemMessage.content)
: undefined;
if (!systemContent) {
return { systemInstructions: undefined, filteredMessages: messages };
}
const systemInstructions = JSON.stringify([{ type: 'text', content: systemContent }]);
const filteredMessages = [...messages.slice(0, systemMessageIndex), ...messages.slice(systemMessageIndex + 1)];
return { systemInstructions, filteredMessages };
}
exports.buildMethodPath = buildMethodPath;
exports.extractSystemInstructions = extractSystemInstructions;
exports.getFinalOperationName = getFinalOperationName;
exports.getSpanOperation = getSpanOperation;
exports.getTruncatedJsonString = getTruncatedJsonString;
exports.setTokenUsageAttributes = setTokenUsageAttributes;
//# sourceMappingURL=utils.js.map

View File

@@ -0,0 +1,6 @@
{
"name": "react-transition-group/SwitchTransition",
"private": true,
"main": "../cjs/SwitchTransition.js",
"module": "../esm/SwitchTransition.js"
}

View File

@@ -0,0 +1,5 @@
/**
* Records a Session for the current process to track release health.
*/
export declare const processSessionIntegration: () => import("@sentry/core").Integration;
//# sourceMappingURL=processSession.d.ts.map

View File

@@ -0,0 +1,17 @@
import type { ReadableSpan } from '@opentelemetry/sdk-trace-base';
export interface SpanNode {
id: string;
span?: ReadableSpan;
parentNode?: SpanNode | undefined;
children: SpanNode[];
}
/**
* This function runs through a list of OTEL Spans, and wraps them in an `SpanNode`
* where each node holds a reference to their parent node.
*/
export declare function groupSpansWithParents(spans: ReadableSpan[]): SpanNode[];
/**
* This returns the _local_ parent ID - `parentId` on the span may point to a remote span.
*/
export declare function getLocalParentId(span: ReadableSpan): string | undefined;
//# sourceMappingURL=groupSpansWithParents.d.ts.map

View File

@@ -0,0 +1,95 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPoolNameOld = exports.arrayStringifyHelper = exports.getSpanName = exports.getDbValues = exports.getDbQueryText = exports.getJDBCString = exports.getConfig = void 0;
function getConfig(config) {
const { host, port, database, user } = (config && config.connectionConfig) || config || {};
return { host, port, database, user };
}
exports.getConfig = getConfig;
function getJDBCString(host, port, database) {
let jdbcString = `jdbc:mysql://${host || 'localhost'}`;
if (typeof port === 'number') {
jdbcString += `:${port}`;
}
if (typeof database === 'string') {
jdbcString += `/${database}`;
}
return jdbcString;
}
exports.getJDBCString = getJDBCString;
/**
* @returns the database query being executed.
*/
function getDbQueryText(query) {
if (typeof query === 'string') {
return query;
}
else {
return query.sql;
}
}
exports.getDbQueryText = getDbQueryText;
function getDbValues(query, values) {
if (typeof query === 'string') {
return arrayStringifyHelper(values);
}
else {
// According to https://github.com/mysqljs/mysql#performing-queries
// The values argument will override the values in the option object.
return arrayStringifyHelper(values || query.values);
}
}
exports.getDbValues = getDbValues;
/**
* The span name SHOULD be set to a low cardinality value
* representing the statement executed on the database.
*
* TODO: revisit span name based on https://github.com/open-telemetry/semantic-conventions/blob/v1.33.0/docs/database/database-spans.md#name
*
* @returns SQL statement without variable arguments or SQL verb
*/
function getSpanName(query) {
const rawQuery = typeof query === 'object' ? query.sql : query;
// Extract the SQL verb
const firstSpace = rawQuery?.indexOf(' ');
if (typeof firstSpace === 'number' && firstSpace !== -1) {
return rawQuery?.substring(0, firstSpace);
}
return rawQuery;
}
exports.getSpanName = getSpanName;
function arrayStringifyHelper(arr) {
if (arr)
return `[${arr.toString()}]`;
return '';
}
exports.arrayStringifyHelper = arrayStringifyHelper;
function getPoolNameOld(pool) {
const c = pool.config.connectionConfig;
let poolName = '';
poolName += c.host ? `host: '${c.host}', ` : '';
poolName += c.port ? `port: ${c.port}, ` : '';
poolName += c.database ? `database: '${c.database}', ` : '';
poolName += c.user ? `user: '${c.user}'` : '';
if (!c.user) {
poolName = poolName.substring(0, poolName.length - 2); //omit last comma
}
return poolName.trim();
}
exports.getPoolNameOld = getPoolNameOld;
//# sourceMappingURL=utils.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/sqlite-core/primary-keys.ts"],"sourcesContent":["import { entityKind } from '~/entity.ts';\nimport type { AnySQLiteColumn, SQLiteColumn } from './columns/index.ts';\nimport { SQLiteTable } from './table.ts';\n\nexport function primaryKey<\n\tTTableName extends string,\n\tTColumn extends AnySQLiteColumn<{ tableName: TTableName }>,\n\tTColumns extends AnySQLiteColumn<{ tableName: TTableName }>[],\n>(config: { name?: string; columns: [TColumn, ...TColumns] }): PrimaryKeyBuilder;\n/**\n * @deprecated: Please use primaryKey({ columns: [] }) instead of this function\n * @param columns\n */\nexport function primaryKey<\n\tTTableName extends string,\n\tTColumns extends AnySQLiteColumn<{ tableName: TTableName }>[],\n>(...columns: TColumns): PrimaryKeyBuilder;\nexport function primaryKey(...config: any) {\n\tif (config[0].columns) {\n\t\treturn new PrimaryKeyBuilder(config[0].columns, config[0].name);\n\t}\n\treturn new PrimaryKeyBuilder(config);\n}\nexport class PrimaryKeyBuilder {\n\tstatic readonly [entityKind]: string = 'SQLitePrimaryKeyBuilder';\n\n\tdeclare _: {\n\t\tbrand: 'SQLitePrimaryKeyBuilder';\n\t};\n\n\t/** @internal */\n\tcolumns: SQLiteColumn[];\n\n\t/** @internal */\n\tname?: string;\n\n\tconstructor(\n\t\tcolumns: SQLiteColumn[],\n\t\tname?: string,\n\t) {\n\t\tthis.columns = columns;\n\t\tthis.name = name;\n\t}\n\n\t/** @internal */\n\tbuild(table: SQLiteTable): PrimaryKey {\n\t\treturn new PrimaryKey(table, this.columns, this.name);\n\t}\n}\n\nexport class PrimaryKey {\n\tstatic readonly [entityKind]: string = 'SQLitePrimaryKey';\n\n\treadonly columns: SQLiteColumn[];\n\treadonly name?: string;\n\n\tconstructor(readonly table: SQLiteTable, columns: SQLiteColumn[], name?: string) {\n\t\tthis.columns = columns;\n\t\tthis.name = name;\n\t}\n\n\tgetName(): string {\n\t\treturn this.name\n\t\t\t?? `${this.table[SQLiteTable.Symbol.Name]}_${this.columns.map((column) => column.name).join('_')}_pk`;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA2B;AAE3B,mBAA4B;AAerB,SAAS,cAAc,QAAa;AAC1C,MAAI,OAAO,CAAC,EAAE,SAAS;AACtB,WAAO,IAAI,kBAAkB,OAAO,CAAC,EAAE,SAAS,OAAO,CAAC,EAAE,IAAI;AAAA,EAC/D;AACA,SAAO,IAAI,kBAAkB,MAAM;AACpC;AACO,MAAM,kBAAkB;AAAA,EAC9B,QAAiB,wBAAU,IAAY;AAAA;AAAA,EAOvC;AAAA;AAAA,EAGA;AAAA,EAEA,YACC,SACA,MACC;AACD,SAAK,UAAU;AACf,SAAK,OAAO;AAAA,EACb;AAAA;AAAA,EAGA,MAAM,OAAgC;AACrC,WAAO,IAAI,WAAW,OAAO,KAAK,SAAS,KAAK,IAAI;AAAA,EACrD;AACD;AAEO,MAAM,WAAW;AAAA,EAMvB,YAAqB,OAAoB,SAAyB,MAAe;AAA5D;AACpB,SAAK,UAAU;AACf,SAAK,OAAO;AAAA,EACb;AAAA,EARA,QAAiB,wBAAU,IAAY;AAAA,EAE9B;AAAA,EACA;AAAA,EAOT,UAAkB;AACjB,WAAO,KAAK,QACR,GAAG,KAAK,MAAM,yBAAY,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,WAAW,OAAO,IAAI,EAAE,KAAK,GAAG,CAAC;AAAA,EAClG;AACD;","names":[]}

View File

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

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"fieldReducer.d.ts","sourceRoot":"","sources":["../../../src/forms/Form/fieldReducer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAa,SAAS,EAAO,MAAM,SAAS,CAAA;AAMxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAO7C;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,GAAG,SAAS,CAqb7E"}

View File

@@ -0,0 +1,35 @@
import { useMotionValueEvent } from '../utils/use-motion-value-event.mjs';
import { useMotionValue } from './use-motion-value.mjs';
import { frame } from '../frameloop/frame.mjs';
/**
* Creates a `MotionValue` that updates when the velocity of the provided `MotionValue` changes.
*
* ```javascript
* const x = useMotionValue(0)
* const xVelocity = useVelocity(x)
* const xAcceleration = useVelocity(xVelocity)
* ```
*
* @public
*/
function useVelocity(value) {
const velocity = useMotionValue(value.getVelocity());
const updateVelocity = () => {
const latest = value.getVelocity();
velocity.set(latest);
/**
* If we still have velocity, schedule an update for the next frame
* to keep checking until it is zero.
*/
if (latest)
frame.update(updateVelocity);
};
useMotionValueEvent(value, "change", () => {
// Schedule an update to this value at the end of the current frame.
frame.update(updateVelocity, false, true);
});
return velocity;
}
export { useVelocity };

View File

@@ -0,0 +1,67 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Ivan Kopeykin @vankop
*/
"use strict";
const {
JAVASCRIPT_MODULE_TYPE_AUTO,
JAVASCRIPT_MODULE_TYPE_ESM
} = require("../ModuleTypeConstants");
const URLContextDependency = require("../dependencies/URLContextDependency");
const URLDependency = require("../dependencies/URLDependency");
const URLParserPlugin = require("../url/URLParserPlugin");
/** @typedef {import("../../declarations/WebpackOptions").JavascriptParserOptions} JavascriptParserOptions */
/** @typedef {import("../Compiler")} Compiler */
/** @typedef {import("../javascript/JavascriptParser")} JavascriptParser */
const PLUGIN_NAME = "URLPlugin";
class URLPlugin {
/**
* @param {Compiler} compiler compiler
*/
apply(compiler) {
compiler.hooks.compilation.tap(
PLUGIN_NAME,
(compilation, { normalModuleFactory, contextModuleFactory }) => {
compilation.dependencyFactories.set(URLDependency, normalModuleFactory);
compilation.dependencyTemplates.set(
URLDependency,
new URLDependency.Template()
);
compilation.dependencyFactories.set(
URLContextDependency,
contextModuleFactory
);
compilation.dependencyTemplates.set(
URLContextDependency,
new URLContextDependency.Template()
);
/**
* @param {JavascriptParser} parser parser parser
* @param {JavascriptParserOptions} parserOptions parserOptions
* @returns {void}
*/
const handler = (parser, parserOptions) => {
if (parserOptions.url === false) return;
new URLParserPlugin(parserOptions).apply(parser);
};
normalModuleFactory.hooks.parser
.for(JAVASCRIPT_MODULE_TYPE_AUTO)
.tap(PLUGIN_NAME, handler);
normalModuleFactory.hooks.parser
.for(JAVASCRIPT_MODULE_TYPE_ESM)
.tap(PLUGIN_NAME, handler);
}
);
}
}
module.exports = URLPlugin;

View File

@@ -0,0 +1,14 @@
"use strict";
exports.formatRelative = void 0;
const formatRelativeLocale = {
lastWeek: "eeee 'إلي فات مع' p",
yesterday: "'البارح مع' p",
today: "'اليوم مع' p",
tomorrow: "'غدوة مع' p",
nextWeek: "eeee 'الجمعة الجاية مع' p 'نهار'",
other: "P",
};
const formatRelative = (token) => formatRelativeLocale[token];
exports.formatRelative = formatRelative;

View File

@@ -0,0 +1,156 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.checkSigCryptoKey = checkSigCryptoKey;
exports.checkEncCryptoKey = checkEncCryptoKey;
function unusable(name, prop = 'algorithm.name') {
return new TypeError(`CryptoKey does not support this operation, its ${prop} must be ${name}`);
}
function isAlgorithm(algorithm, name) {
return algorithm.name === name;
}
function getHashLength(hash) {
return parseInt(hash.name.slice(4), 10);
}
function getNamedCurve(alg) {
switch (alg) {
case 'ES256':
return 'P-256';
case 'ES384':
return 'P-384';
case 'ES512':
return 'P-521';
default:
throw new Error('unreachable');
}
}
function checkUsage(key, usages) {
if (usages.length && !usages.some((expected) => key.usages.includes(expected))) {
let msg = 'CryptoKey does not support this operation, its usages must include ';
if (usages.length > 2) {
const last = usages.pop();
msg += `one of ${usages.join(', ')}, or ${last}.`;
}
else if (usages.length === 2) {
msg += `one of ${usages[0]} or ${usages[1]}.`;
}
else {
msg += `${usages[0]}.`;
}
throw new TypeError(msg);
}
}
function checkSigCryptoKey(key, alg, ...usages) {
switch (alg) {
case 'HS256':
case 'HS384':
case 'HS512': {
if (!isAlgorithm(key.algorithm, 'HMAC'))
throw unusable('HMAC');
const expected = parseInt(alg.slice(2), 10);
const actual = getHashLength(key.algorithm.hash);
if (actual !== expected)
throw unusable(`SHA-${expected}`, 'algorithm.hash');
break;
}
case 'RS256':
case 'RS384':
case 'RS512': {
if (!isAlgorithm(key.algorithm, 'RSASSA-PKCS1-v1_5'))
throw unusable('RSASSA-PKCS1-v1_5');
const expected = parseInt(alg.slice(2), 10);
const actual = getHashLength(key.algorithm.hash);
if (actual !== expected)
throw unusable(`SHA-${expected}`, 'algorithm.hash');
break;
}
case 'PS256':
case 'PS384':
case 'PS512': {
if (!isAlgorithm(key.algorithm, 'RSA-PSS'))
throw unusable('RSA-PSS');
const expected = parseInt(alg.slice(2), 10);
const actual = getHashLength(key.algorithm.hash);
if (actual !== expected)
throw unusable(`SHA-${expected}`, 'algorithm.hash');
break;
}
case 'EdDSA': {
if (key.algorithm.name !== 'Ed25519' && key.algorithm.name !== 'Ed448') {
throw unusable('Ed25519 or Ed448');
}
break;
}
case 'ES256':
case 'ES384':
case 'ES512': {
if (!isAlgorithm(key.algorithm, 'ECDSA'))
throw unusable('ECDSA');
const expected = getNamedCurve(alg);
const actual = key.algorithm.namedCurve;
if (actual !== expected)
throw unusable(expected, 'algorithm.namedCurve');
break;
}
default:
throw new TypeError('CryptoKey does not support this operation');
}
checkUsage(key, usages);
}
function checkEncCryptoKey(key, alg, ...usages) {
switch (alg) {
case 'A128GCM':
case 'A192GCM':
case 'A256GCM': {
if (!isAlgorithm(key.algorithm, 'AES-GCM'))
throw unusable('AES-GCM');
const expected = parseInt(alg.slice(1, 4), 10);
const actual = key.algorithm.length;
if (actual !== expected)
throw unusable(expected, 'algorithm.length');
break;
}
case 'A128KW':
case 'A192KW':
case 'A256KW': {
if (!isAlgorithm(key.algorithm, 'AES-KW'))
throw unusable('AES-KW');
const expected = parseInt(alg.slice(1, 4), 10);
const actual = key.algorithm.length;
if (actual !== expected)
throw unusable(expected, 'algorithm.length');
break;
}
case 'ECDH': {
switch (key.algorithm.name) {
case 'ECDH':
case 'X25519':
case 'X448':
break;
default:
throw unusable('ECDH, X25519, or X448');
}
break;
}
case 'PBES2-HS256+A128KW':
case 'PBES2-HS384+A192KW':
case 'PBES2-HS512+A256KW':
if (!isAlgorithm(key.algorithm, 'PBKDF2'))
throw unusable('PBKDF2');
break;
case 'RSA-OAEP':
case 'RSA-OAEP-256':
case 'RSA-OAEP-384':
case 'RSA-OAEP-512': {
if (!isAlgorithm(key.algorithm, 'RSA-OAEP'))
throw unusable('RSA-OAEP');
const expected = parseInt(alg.slice(9), 10) || 1;
const actual = getHashLength(key.algorithm.hash);
if (actual !== expected)
throw unusable(`SHA-${expected}`, 'algorithm.hash');
break;
}
default:
throw new TypeError('CryptoKey does not support this operation');
}
checkUsage(key, usages);
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"Util.js","sourceRoot":"","sources":["../../src/Util.ts"],"names":[],"mappings":";;;AAAO,IAAM,YAAY,GAAG,UAAC,GAAW;IACpC,IAAM,UAAU,GAAG,EAAE,CAAC;IACtB,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,IAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;IAC1B,OAAO,CAAC,GAAG,MAAM,EAAE;QACf,IAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC;QAClC,IAAI,KAAK,IAAI,MAAM,IAAI,KAAK,IAAI,MAAM,IAAI,CAAC,GAAG,MAAM,EAAE;YAClD,IAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC;YAClC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,MAAM,EAAE;gBAC7B,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC;aACxE;iBAAM;gBACH,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvB,CAAC,EAAE,CAAC;aACP;SACJ;aAAM;YACH,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAC1B;KACJ;IACD,OAAO,UAAU,CAAC;AACtB,CAAC,CAAC;AAnBW,QAAA,YAAY,gBAmBvB;AAEK,IAAM,aAAa,GAAG;IAAC,oBAAuB;SAAvB,UAAuB,EAAvB,qBAAuB,EAAvB,IAAuB;QAAvB,+BAAuB;;IACjD,IAAI,MAAM,CAAC,aAAa,EAAE;QACtB,OAAO,MAAM,CAAC,aAAa,OAApB,MAAM,EAAkB,UAAU,EAAE;KAC9C;IAED,IAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IACjC,IAAI,CAAC,MAAM,EAAE;QACT,OAAO,EAAE,CAAC;KACb;IAED,IAAM,SAAS,GAAG,EAAE,CAAC;IAErB,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC;IACf,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,OAAO,EAAE,KAAK,GAAG,MAAM,EAAE;QACrB,IAAI,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;QAClC,IAAI,SAAS,IAAI,MAAM,EAAE;YACrB,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SAC7B;aAAM;YACH,SAAS,IAAI,OAAO,CAAC;YACrB,SAAS,CAAC,IAAI,CAAC,CAAC,SAAS,IAAI,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,SAAS,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,CAAC;SAC5E;QACD,IAAI,KAAK,GAAG,CAAC,KAAK,MAAM,IAAI,SAAS,CAAC,MAAM,GAAG,MAAM,EAAE;YACnD,MAAM,IAAI,MAAM,CAAC,YAAY,OAAnB,MAAM,EAAiB,SAAS,CAAC,CAAC;YAC5C,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC;SACxB;KACJ;IACD,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC;AA5BW,QAAA,aAAa,iBA4BxB;AAEF,IAAM,KAAK,GAAG,kEAAkE,CAAC;AAEjF,wCAAwC;AACxC,IAAM,MAAM,GAAG,OAAO,UAAU,KAAK,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;AAC5E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACnC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CACnC;AAEM,IAAM,MAAM,GAAG,UAAC,MAAc;IACjC,IAAI,YAAY,GAAG,MAAM,CAAC,MAAM,GAAG,IAAI,EACnC,GAAG,GAAG,MAAM,CAAC,MAAM,EACnB,CAAC,EACD,CAAC,GAAG,CAAC,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,CAAC;IAEb,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE;QACnC,YAAY,EAAE,CAAC;QACf,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE;YACnC,YAAY,EAAE,CAAC;SAClB;KACJ;IAED,IAAM,MAAM,GACR,OAAO,WAAW,KAAK,WAAW;QAClC,OAAO,UAAU,KAAK,WAAW;QACjC,OAAO,UAAU,CAAC,SAAS,CAAC,KAAK,KAAK,WAAW;QAC7C,CAAC,CAAC,IAAI,WAAW,CAAC,YAAY,CAAC;QAC/B,CAAC,CAAC,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC;IAClC,IAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;IAEtE,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE;QACzB,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;QACxC,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC5C,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC5C,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAE5C,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,QAAQ,IAAI,CAAC,CAAC,GAAG,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC;QAC/C,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,QAAQ,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC;QACtD,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,QAAQ,GAAG,EAAE,CAAC,CAAC;KACxD;IAED,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC;AArCW,QAAA,MAAM,UAqCjB;AAEK,IAAM,eAAe,GAAG,UAAC,MAAgB;IAC5C,IAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7B,IAAM,KAAK,GAAG,EAAE,CAAC;IACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;QAChC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;KAChD;IACD,OAAO,KAAK,CAAC;AACjB,CAAC,CAAC;AAPW,QAAA,eAAe,mBAO1B;AAEK,IAAM,eAAe,GAAG,UAAC,MAAgB;IAC5C,IAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7B,IAAM,KAAK,GAAG,EAAE,CAAC;IACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;QAChC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;KAChG;IACD,OAAO,KAAK,CAAC;AACjB,CAAC,CAAC;AAPW,QAAA,eAAe,mBAO1B"}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/PublishMany/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAG5D,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,sBAAsB,CAAA;CACnC,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAYlD,CAAA;AAED,KAAK,mBAAmB,GAAG;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAA;IACxB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,SAAS,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,GAAG,gBAAgB,CAAA;AAEpB,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA8CxD,CAAA"}

View File

@@ -0,0 +1,136 @@
import { captureException } from '../../exports.js';
import { SPAN_STATUS_ERROR } from '../spanstatus.js';
import { GEN_AI_RESPONSE_STREAMING_ATTRIBUTE, GEN_AI_RESPONSE_ID_ATTRIBUTE, GEN_AI_RESPONSE_MODEL_ATTRIBUTE, GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE, GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE, GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE, GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE, GEN_AI_RESPONSE_TEXT_ATTRIBUTE, GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE } from '../ai/gen-ai-attributes.js';
/**
* State object used to accumulate information from a stream of Google GenAI events.
*/
/**
* Checks if a response chunk contains an error
* @param chunk - The response chunk to check
* @param span - The span to update if error is found
* @returns Whether an error occurred
*/
function isErrorChunk(chunk, span) {
const feedback = chunk?.promptFeedback;
if (feedback?.blockReason) {
const message = feedback.blockReasonMessage ?? feedback.blockReason;
span.setStatus({ code: SPAN_STATUS_ERROR, message: `Content blocked: ${message}` });
captureException(`Content blocked: ${message}`, {
mechanism: { handled: false, type: 'auto.ai.google_genai' },
});
return true;
}
return false;
}
/**
* Processes response metadata from a chunk
* @param chunk - The response chunk to process
* @param state - The state of the streaming process
*/
function handleResponseMetadata(chunk, state) {
if (typeof chunk.responseId === 'string') state.responseId = chunk.responseId;
if (typeof chunk.modelVersion === 'string') state.responseModel = chunk.modelVersion;
const usage = chunk.usageMetadata;
if (usage) {
if (typeof usage.promptTokenCount === 'number') state.promptTokens = usage.promptTokenCount;
if (typeof usage.candidatesTokenCount === 'number') state.completionTokens = usage.candidatesTokenCount;
if (typeof usage.totalTokenCount === 'number') state.totalTokens = usage.totalTokenCount;
}
}
/**
* Processes candidate content from a response chunk
* @param chunk - The response chunk to process
* @param state - The state of the streaming process
* @param recordOutputs - Whether to record outputs
*/
function handleCandidateContent(chunk, state, recordOutputs) {
if (Array.isArray(chunk.functionCalls)) {
state.toolCalls.push(...chunk.functionCalls);
}
for (const candidate of chunk.candidates ?? []) {
if (candidate?.finishReason && !state.finishReasons.includes(candidate.finishReason)) {
state.finishReasons.push(candidate.finishReason);
}
for (const part of candidate?.content?.parts ?? []) {
if (recordOutputs && part.text) state.responseTexts.push(part.text);
if (part.functionCall) {
state.toolCalls.push({
type: 'function',
id: part.functionCall.id,
name: part.functionCall.name,
arguments: part.functionCall.args,
});
}
}
}
}
/**
* Processes a single chunk from the Google GenAI stream
* @param chunk - The chunk to process
* @param state - The state of the streaming process
* @param recordOutputs - Whether to record outputs
* @param span - The span to update
*/
function processChunk(chunk, state, recordOutputs, span) {
if (!chunk || isErrorChunk(chunk, span)) return;
handleResponseMetadata(chunk, state);
handleCandidateContent(chunk, state, recordOutputs);
}
/**
* Instruments an async iterable stream of Google GenAI response chunks, updates the span with
* streaming attributes and (optionally) the aggregated output text, and yields
* each chunk from the input stream unchanged.
*/
async function* instrumentStream(
stream,
span,
recordOutputs,
) {
const state = {
responseTexts: [],
finishReasons: [],
toolCalls: [],
};
try {
for await (const chunk of stream) {
processChunk(chunk, state, recordOutputs, span);
yield chunk;
}
} finally {
const attrs = {
[GEN_AI_RESPONSE_STREAMING_ATTRIBUTE]: true,
};
if (state.responseId) attrs[GEN_AI_RESPONSE_ID_ATTRIBUTE] = state.responseId;
if (state.responseModel) attrs[GEN_AI_RESPONSE_MODEL_ATTRIBUTE] = state.responseModel;
if (state.promptTokens !== undefined) attrs[GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE] = state.promptTokens;
if (state.completionTokens !== undefined) attrs[GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE] = state.completionTokens;
if (state.totalTokens !== undefined) attrs[GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE] = state.totalTokens;
if (state.finishReasons.length) {
attrs[GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE] = JSON.stringify(state.finishReasons);
}
if (recordOutputs && state.responseTexts.length) {
attrs[GEN_AI_RESPONSE_TEXT_ATTRIBUTE] = state.responseTexts.join('');
}
if (recordOutputs && state.toolCalls.length) {
attrs[GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE] = JSON.stringify(state.toolCalls);
}
span.setAttributes(attrs);
span.end();
}
}
export { instrumentStream };
//# sourceMappingURL=streaming.js.map

View File

@@ -0,0 +1,135 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchFn.cjs");
var _index2 = require("../../_lib/buildMatchPatternFn.cjs");
const matchOrdinalNumberPattern = /^(\d+)(-rë|-të|t|)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(p|m)/i,
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
wide: /^(para krishtit|mbas krishtit)/i,
};
const parseEraPatterns = {
any: [/^b/i, /^(p|m)/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^q[1234]/i,
wide: /^[1234]-mujori (i{1,3}|iv)/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[jsmpqkftnd]/i,
abbreviated: /^(jan|shk|mar|pri|maj|qer|kor|gus|sht|tet|nën|dhj)/i,
wide: /^(janar|shkurt|mars|prill|maj|qershor|korrik|gusht|shtator|tetor|nëntor|dhjetor)/i,
};
const parseMonthPatterns = {
narrow: [
/^j/i,
/^s/i,
/^m/i,
/^p/i,
/^m/i,
/^q/i,
/^k/i,
/^g/i,
/^s/i,
/^t/i,
/^n/i,
/^d/i,
],
any: [
/^ja/i,
/^shk/i,
/^mar/i,
/^pri/i,
/^maj/i,
/^qer/i,
/^kor/i,
/^gu/i,
/^sht/i,
/^tet/i,
/^n/i,
/^d/i,
],
};
const matchDayPatterns = {
narrow: /^[dhmeps]/i,
short: /^(di|hë|ma|më|en|pr|sh)/i,
abbreviated: /^(die|hën|mar|mër|enj|pre|sht)/i,
wide: /^(dielë|hënë|martë|mërkurë|enjte|premte|shtunë)/i,
};
const parseDayPatterns = {
narrow: [/^d/i, /^h/i, /^m/i, /^m/i, /^e/i, /^p/i, /^s/i],
any: [/^d/i, /^h/i, /^ma/i, /^më/i, /^e/i, /^p/i, /^s/i],
};
const matchDayPeriodPatterns = {
narrow: /^(p|m|me|në (mëngjes|mbasdite|mbrëmje|mesnatë))/i,
any: /^([pm]\.?\s?d\.?|drek|në (mëngjes|mbasdite|mbrëmje|mesnatë))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^p/i,
pm: /^m/i,
midnight: /^me/i,
noon: /^dr/i,
morning: /mëngjes/i,
afternoon: /mbasdite/i,
evening: /mbrëmje/i,
night: /natë/i,
},
};
const match = (exports.match = {
ordinalNumber: (0, _index2.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: (0, _index.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: (0, _index.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: (0, _index.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: (0, _index.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: (0, _index.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});

View File

@@ -0,0 +1 @@
{"version":3,"file":"inbox.js","sources":["../../../src/icons/inbox.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Inbox\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cG9seWxpbmUgcG9pbnRzPSIyMiAxMiAxNiAxMiAxNCAxNSAxMCAxNSA4IDEyIDIgMTIiIC8+CiAgPHBhdGggZD0iTTUuNDUgNS4xMSAyIDEydjZhMiAyIDAgMCAwIDIgMmgxNmEyIDIgMCAwIDAgMi0ydi02bC0zLjQ1LTYuODlBMiAyIDAgMCAwIDE2Ljc2IDRINy4yNGEyIDIgMCAwIDAtMS43OSAxLjExeiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/inbox\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 Inbox = createLucideIcon('Inbox', [\n ['polyline', { points: '22 12 16 12 14 15 10 15 8 12 2 12', key: 'o97t9d' }],\n [\n 'path',\n {\n d: 'M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z',\n key: 'oot6mr',\n },\n ],\n]);\n\nexport default Inbox;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CAAA,CACtC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAqC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC3E,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"mail-check.js","sources":["../../../src/icons/mail-check.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name MailCheck\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjIgMTNWNmEyIDIgMCAwIDAtMi0ySDRhMiAyIDAgMCAwLTIgMnYxMmMwIDEuMS45IDIgMiAyaDgiIC8+CiAgPHBhdGggZD0ibTIyIDctOC45NyA1LjdhMS45NCAxLjk0IDAgMCAxLTIuMDYgMEwyIDciIC8+CiAgPHBhdGggZD0ibTE2IDE5IDIgMiA0LTQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/mail-check\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 MailCheck = createLucideIcon('MailCheck', [\n ['path', { d: 'M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8', key: '12jkf8' }],\n ['path', { d: 'm22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7', key: '1ocrg3' }],\n ['path', { d: 'm16 19 2 2 4-4', key: '1b14m6' }],\n]);\n\nexport default MailCheck;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC1F,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC1E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,8 @@
type WindowOpenHandler = () => void;
/**
* Register a handler to be called when `window.open()` is called.
* Returns a cleanup function.
*/
export declare function onWindowOpen(cb: WindowOpenHandler): () => void;
export {};
//# sourceMappingURL=onWindowOpen.d.ts.map

View File

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

View File

@@ -0,0 +1,34 @@
{
"name": "@types/pg",
"version": "8.10.2",
"description": "TypeScript definitions for pg",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pg",
"license": "MIT",
"contributors": [
{
"name": "Phips Peter",
"url": "https://github.com/pspeter3",
"githubUsername": "pspeter3"
},
{
"name": "Ravi van Rooijen",
"url": "https://github.com/HoldYourWaffle",
"githubUsername": "HoldYourWaffle"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/pg"
},
"scripts": {},
"dependencies": {
"@types/node": "*",
"pg-protocol": "*",
"pg-types": "^4.0.1"
},
"typesPublisherContentHash": "cf44f82f273867e6a720cb38d5290f46b91dc859bb2ba0e83d364a8dad8839d6",
"typeScriptVersion": "4.3"
}

View File

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

View File

@@ -0,0 +1,21 @@
import { envToBool } from '@sentry/node-core';
import { preloadOpenTelemetry } from './sdk/initOtel.js';
const debug = envToBool(process.env.SENTRY_DEBUG);
const integrationsStr = process.env.SENTRY_PRELOAD_INTEGRATIONS;
const integrations = integrationsStr ? integrationsStr.split(',').map(integration => integration.trim()) : undefined;
/**
* The @sentry/node/preload export can be used with the node --import and --require args to preload the OTEL
* instrumentation, without initializing the Sentry SDK.
*
* This is useful if you cannot initialize the SDK immediately, but still want to preload the instrumentation,
* e.g. if you have to load the DSN from somewhere else.
*
* You can configure this in two ways via environment variables:
* - `SENTRY_DEBUG` to enable debug logging
* - `SENTRY_PRELOAD_INTEGRATIONS` to preload specific integrations - e.g. `SENTRY_PRELOAD_INTEGRATIONS="Http,Express"`
*/
preloadOpenTelemetry({ debug, integrations });
//# sourceMappingURL=preload.js.map

View File

@@ -0,0 +1,15 @@
"use strict";
exports.formatRelative = void 0;
const formatRelativeLocale = {
lastWeek: "'ئ‍ۆتكەن' eeee 'دە' p",
yesterday: "'تۈنۈگۈن دە' p",
today: "'بۈگۈن دە' p",
tomorrow: "'ئەتە دە' p",
nextWeek: "eeee 'دە' p",
other: "P",
};
const formatRelative = (token, _date, _baseDate, _options) =>
formatRelativeLocale[token];
exports.formatRelative = formatRelative;

View File

@@ -0,0 +1,36 @@
import { constructFrom } from "./constructFrom.js";
/**
* @name constructNow
* @category Generic Helpers
* @summary Constructs a new current date using the passed value constructor.
* @pure false
*
* @description
* The function constructs a new current date using the constructor from
* the reference date. It helps to build generic functions that accept date
* extensions and use the current date.
*
* It defaults to `Date` if the passed reference date is a number or a string.
*
* @param date - The reference date to take constructor from
*
* @returns Current date initialized using the given date constructor
*
* @example
* import { constructNow, isSameDay } from 'date-fns'
*
* function isToday<DateType extends Date>(
* date: DateArg<DateType>,
* ): boolean {
* // If we were to use `new Date()` directly, the function would behave
* // differently in different timezones and return false for the same date.
* return isSameDay(date, constructNow(date));
* }
*/
export function constructNow(date) {
return constructFrom(date, Date.now());
}
// Fallback for modularized imports:
export default constructNow;

View File

@@ -0,0 +1 @@
{"version":3,"file":"entry-point.d.ts","sourceRoot":"","sources":["../../../src/utils/entry-point.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,EAAE,MAAM,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,gBAAgB,GAAG,WAAW,CAUrE;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,GAAE,gBAA0B,GAAG,QAAQ,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,CA2B5G"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../src/utils/url.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,KAAK,UAAU,GAAG;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAQF,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,IAAI,CAAC;IACjB,QAAQ,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;IAC1B,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IACtB,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACnB,CAAC;AAEF,KAAK,SAAS,GAAG,WAAW,GAAG,GAAG,CAAC;AAgBnC;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,SAAS,GAAG,GAAG,IAAI,WAAW,CAEtE;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,GAAG,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CA4B7G;AAED;;;GAGG;AACH,wBAAgB,kCAAkC,CAAC,GAAG,EAAE,SAAS,GAAG,MAAM,CAmBzE;AAED,KAAK,cAAc,GAAG;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAoBF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,+BAA+B,CAC7C,SAAS,EAAE,SAAS,GAAG,SAAS,EAChC,IAAI,EAAE,QAAQ,GAAG,QAAQ,EACzB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,cAAc,EACxB,SAAS,CAAC,EAAE,MAAM,GACjB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,cAAc,CAAC,CA6C5C;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAsBhD;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM,CAa7D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,iBAAiB,GAAE,OAAc,GAAG,MAAM,CAmB1F"}

View File

@@ -0,0 +1,17 @@
/*
* 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.
*/
export {};
//# sourceMappingURL=Sampler.js.map

View File

@@ -0,0 +1,19 @@
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from 'react';
export const File = () => /*#__PURE__*/_jsxs("svg", {
height: "150",
style: {
backgroundColor: '#333333'
},
viewBox: "0 0 150 150",
width: "150",
xmlns: "http://www.w3.org/2000/svg",
children: [/*#__PURE__*/_jsx("path", {
d: "M82.8876 50.5H55.5555V100.5H94.4444V61.9818H82.8876V50.5Z",
fill: "white"
}), /*#__PURE__*/_jsx("path", {
d: "M82.8876 61.9818H94.4444L82.8876 50.5V61.9818Z",
fill: "#9A9A9A"
})]
});
//# sourceMappingURL=index.js.map

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"setsAreEqual.js","names":["setsAreEqual","lhs","rhs","size","Array","from","every","value","has"],"sources":["../../src/utilities/setsAreEqual.ts"],"sourcesContent":["/**\n * Function to determine whether two sets are equal or not.\n */\nexport const setsAreEqual = <T>(lhs: Set<T>, rhs: Set<T>) => {\n return lhs.size === rhs.size && Array.from(lhs).every((value) => rhs.has(value))\n}\n"],"mappings":"AAAA;;GAGA,OAAO,MAAMA,YAAA,GAAeA,CAAIC,GAAA,EAAaC,GAAA;EAC3C,OAAOD,GAAA,CAAIE,IAAI,KAAKD,GAAA,CAAIC,IAAI,IAAIC,KAAA,CAAMC,IAAI,CAACJ,GAAA,EAAKK,KAAK,CAAEC,KAAA,IAAUL,GAAA,CAAIM,GAAG,CAACD,KAAA;AAC3E","ignoreList":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"panels-top-left.js","sources":["../../../src/icons/panels-top-left.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PanelsTopLeft\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik0zIDloMTgiIC8+CiAgPHBhdGggZD0iTTkgMjFWOSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/panels-top-left\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst PanelsTopLeft = createLucideIcon('PanelsTopLeft', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'M3 9h18', key: '1pudct' }],\n ['path', { d: 'M9 21V9', key: '1oto5p' }],\n]);\n\nexport default PanelsTopLeft;\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,CAAgB,iBAAiB,eAAiB,CAAA,CAAA,CAAA;AAAA,CAAA,CACtD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,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 @@
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../src/create.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AASrC,eAAO,MAAM,MAAM,EAAE,MA6BpB,CAAA"}

View File

@@ -0,0 +1,524 @@
"use strict";
Object.defineProperty(exports, "longFormatters", {
enumerable: true,
get: function () {
return _index2.longFormatters;
},
});
exports.parse = parse;
Object.defineProperty(exports, "parsers", {
enumerable: true,
get: function () {
return _index7.parsers;
},
});
var _index = require("./_lib/defaultLocale.cjs");
var _index2 = require("./_lib/format/longFormatters.cjs");
var _index3 = require("./_lib/protectedTokens.cjs");
var _index4 = require("./constructFrom.cjs");
var _index5 = require("./getDefaultOptions.cjs");
var _index6 = require("./toDate.cjs");
var _Setter = require("./parse/_lib/Setter.cjs");
var _index7 = require("./parse/_lib/parsers.cjs");
// Rexports of internal for libraries to use.
// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874
/**
* The {@link parse} function options.
*/
// This RegExp consists of three parts separated by `|`:
// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token
// (one of the certain letters followed by `o`)
// - (\w)\1* matches any sequences of the same letter
// - '' matches two quote characters in a row
// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),
// except a single quote symbol, which ends the sequence.
// Two quote characters do not end the sequence.
// If there is no matching single quote
// then the sequence will continue until the end of the string.
// - . matches any single character unmatched by previous parts of the RegExps
const formattingTokensRegExp =
/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
// This RegExp catches symbols escaped by quotes, and also
// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`
const longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
const escapedStringRegExp = /^'([^]*?)'?$/;
const doubleQuoteRegExp = /''/g;
const notWhitespaceRegExp = /\S/;
const unescapedLatinCharacterRegExp = /[a-zA-Z]/;
/**
* @name parse
* @category Common Helpers
* @summary Parse the date.
*
* @description
* Return the date parsed from string using the given format string.
*
* > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.
* > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* The characters in the format string wrapped between two single quotes characters (') are escaped.
* Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.
*
* Format of the format string is based on Unicode Technical Standard #35:
* https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
* with a few additions (see note 5 below the table).
*
* Not all tokens are compatible. Combinations that don't make sense or could lead to bugs are prohibited
* and will throw `RangeError`. For example usage of 24-hour format token with AM/PM token will throw an exception:
*
* ```javascript
* parse('23 AM', 'HH a', new Date())
* //=> RangeError: The format string mustn't contain `HH` and `a` at the same time
* ```
*
* See the compatibility table: https://docs.google.com/spreadsheets/d/e/2PACX-1vQOPU3xUhplll6dyoMmVUXHKl_8CRDs6_ueLmex3SoqwhuolkuN3O05l4rqx5h1dKX8eb46Ul-CCSrq/pubhtml?gid=0&single=true
*
* Accepted format string patterns:
* | Unit |Prior| Pattern | Result examples | Notes |
* |---------------------------------|-----|---------|-----------------------------------|-------|
* | Era | 140 | G..GGG | AD, BC | |
* | | | GGGG | Anno Domini, Before Christ | 2 |
* | | | GGGGG | A, B | |
* | Calendar year | 130 | y | 44, 1, 1900, 2017, 9999 | 4 |
* | | | yo | 44th, 1st, 1900th, 9999999th | 4,5 |
* | | | yy | 44, 01, 00, 17 | 4 |
* | | | yyy | 044, 001, 123, 999 | 4 |
* | | | yyyy | 0044, 0001, 1900, 2017 | 4 |
* | | | yyyyy | ... | 2,4 |
* | Local week-numbering year | 130 | Y | 44, 1, 1900, 2017, 9000 | 4 |
* | | | Yo | 44th, 1st, 1900th, 9999999th | 4,5 |
* | | | YY | 44, 01, 00, 17 | 4,6 |
* | | | YYY | 044, 001, 123, 999 | 4 |
* | | | YYYY | 0044, 0001, 1900, 2017 | 4,6 |
* | | | YYYYY | ... | 2,4 |
* | ISO week-numbering year | 130 | R | -43, 1, 1900, 2017, 9999, -9999 | 4,5 |
* | | | RR | -43, 01, 00, 17 | 4,5 |
* | | | RRR | -043, 001, 123, 999, -999 | 4,5 |
* | | | RRRR | -0043, 0001, 2017, 9999, -9999 | 4,5 |
* | | | RRRRR | ... | 2,4,5 |
* | Extended year | 130 | u | -43, 1, 1900, 2017, 9999, -999 | 4 |
* | | | uu | -43, 01, 99, -99 | 4 |
* | | | uuu | -043, 001, 123, 999, -999 | 4 |
* | | | uuuu | -0043, 0001, 2017, 9999, -9999 | 4 |
* | | | uuuuu | ... | 2,4 |
* | Quarter (formatting) | 120 | Q | 1, 2, 3, 4 | |
* | | | Qo | 1st, 2nd, 3rd, 4th | 5 |
* | | | QQ | 01, 02, 03, 04 | |
* | | | QQQ | Q1, Q2, Q3, Q4 | |
* | | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |
* | | | QQQQQ | 1, 2, 3, 4 | 4 |
* | Quarter (stand-alone) | 120 | q | 1, 2, 3, 4 | |
* | | | qo | 1st, 2nd, 3rd, 4th | 5 |
* | | | qq | 01, 02, 03, 04 | |
* | | | qqq | Q1, Q2, Q3, Q4 | |
* | | | qqqq | 1st quarter, 2nd quarter, ... | 2 |
* | | | qqqqq | 1, 2, 3, 4 | 3 |
* | Month (formatting) | 110 | M | 1, 2, ..., 12 | |
* | | | Mo | 1st, 2nd, ..., 12th | 5 |
* | | | MM | 01, 02, ..., 12 | |
* | | | MMM | Jan, Feb, ..., Dec | |
* | | | MMMM | January, February, ..., December | 2 |
* | | | MMMMM | J, F, ..., D | |
* | Month (stand-alone) | 110 | L | 1, 2, ..., 12 | |
* | | | Lo | 1st, 2nd, ..., 12th | 5 |
* | | | LL | 01, 02, ..., 12 | |
* | | | LLL | Jan, Feb, ..., Dec | |
* | | | LLLL | January, February, ..., December | 2 |
* | | | LLLLL | J, F, ..., D | |
* | Local week of year | 100 | w | 1, 2, ..., 53 | |
* | | | wo | 1st, 2nd, ..., 53th | 5 |
* | | | ww | 01, 02, ..., 53 | |
* | ISO week of year | 100 | I | 1, 2, ..., 53 | 5 |
* | | | Io | 1st, 2nd, ..., 53th | 5 |
* | | | II | 01, 02, ..., 53 | 5 |
* | Day of month | 90 | d | 1, 2, ..., 31 | |
* | | | do | 1st, 2nd, ..., 31st | 5 |
* | | | dd | 01, 02, ..., 31 | |
* | Day of year | 90 | D | 1, 2, ..., 365, 366 | 7 |
* | | | Do | 1st, 2nd, ..., 365th, 366th | 5 |
* | | | DD | 01, 02, ..., 365, 366 | 7 |
* | | | DDD | 001, 002, ..., 365, 366 | |
* | | | DDDD | ... | 2 |
* | Day of week (formatting) | 90 | E..EEE | Mon, Tue, Wed, ..., Sun | |
* | | | EEEE | Monday, Tuesday, ..., Sunday | 2 |
* | | | EEEEE | M, T, W, T, F, S, S | |
* | | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |
* | ISO day of week (formatting) | 90 | i | 1, 2, 3, ..., 7 | 5 |
* | | | io | 1st, 2nd, ..., 7th | 5 |
* | | | ii | 01, 02, ..., 07 | 5 |
* | | | iii | Mon, Tue, Wed, ..., Sun | 5 |
* | | | iiii | Monday, Tuesday, ..., Sunday | 2,5 |
* | | | iiiii | M, T, W, T, F, S, S | 5 |
* | | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 5 |
* | Local day of week (formatting) | 90 | e | 2, 3, 4, ..., 1 | |
* | | | eo | 2nd, 3rd, ..., 1st | 5 |
* | | | ee | 02, 03, ..., 01 | |
* | | | eee | Mon, Tue, Wed, ..., Sun | |
* | | | eeee | Monday, Tuesday, ..., Sunday | 2 |
* | | | eeeee | M, T, W, T, F, S, S | |
* | | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |
* | Local day of week (stand-alone) | 90 | c | 2, 3, 4, ..., 1 | |
* | | | co | 2nd, 3rd, ..., 1st | 5 |
* | | | cc | 02, 03, ..., 01 | |
* | | | ccc | Mon, Tue, Wed, ..., Sun | |
* | | | cccc | Monday, Tuesday, ..., Sunday | 2 |
* | | | ccccc | M, T, W, T, F, S, S | |
* | | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |
* | AM, PM | 80 | a..aaa | AM, PM | |
* | | | aaaa | a.m., p.m. | 2 |
* | | | aaaaa | a, p | |
* | AM, PM, noon, midnight | 80 | b..bbb | AM, PM, noon, midnight | |
* | | | bbbb | a.m., p.m., noon, midnight | 2 |
* | | | bbbbb | a, p, n, mi | |
* | Flexible day period | 80 | B..BBB | at night, in the morning, ... | |
* | | | BBBB | at night, in the morning, ... | 2 |
* | | | BBBBB | at night, in the morning, ... | |
* | Hour [1-12] | 70 | h | 1, 2, ..., 11, 12 | |
* | | | ho | 1st, 2nd, ..., 11th, 12th | 5 |
* | | | hh | 01, 02, ..., 11, 12 | |
* | Hour [0-23] | 70 | H | 0, 1, 2, ..., 23 | |
* | | | Ho | 0th, 1st, 2nd, ..., 23rd | 5 |
* | | | HH | 00, 01, 02, ..., 23 | |
* | Hour [0-11] | 70 | K | 1, 2, ..., 11, 0 | |
* | | | Ko | 1st, 2nd, ..., 11th, 0th | 5 |
* | | | KK | 01, 02, ..., 11, 00 | |
* | Hour [1-24] | 70 | k | 24, 1, 2, ..., 23 | |
* | | | ko | 24th, 1st, 2nd, ..., 23rd | 5 |
* | | | kk | 24, 01, 02, ..., 23 | |
* | Minute | 60 | m | 0, 1, ..., 59 | |
* | | | mo | 0th, 1st, ..., 59th | 5 |
* | | | mm | 00, 01, ..., 59 | |
* | Second | 50 | s | 0, 1, ..., 59 | |
* | | | so | 0th, 1st, ..., 59th | 5 |
* | | | ss | 00, 01, ..., 59 | |
* | Seconds timestamp | 40 | t | 512969520 | |
* | | | tt | ... | 2 |
* | Fraction of second | 30 | S | 0, 1, ..., 9 | |
* | | | SS | 00, 01, ..., 99 | |
* | | | SSS | 000, 001, ..., 999 | |
* | | | SSSS | ... | 2 |
* | Milliseconds timestamp | 20 | T | 512969520900 | |
* | | | TT | ... | 2 |
* | Timezone (ISO-8601 w/ Z) | 10 | X | -08, +0530, Z | |
* | | | XX | -0800, +0530, Z | |
* | | | XXX | -08:00, +05:30, Z | |
* | | | XXXX | -0800, +0530, Z, +123456 | 2 |
* | | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |
* | Timezone (ISO-8601 w/o Z) | 10 | x | -08, +0530, +00 | |
* | | | xx | -0800, +0530, +0000 | |
* | | | xxx | -08:00, +05:30, +00:00 | 2 |
* | | | xxxx | -0800, +0530, +0000, +123456 | |
* | | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |
* | Long localized date | NA | P | 05/29/1453 | 5,8 |
* | | | PP | May 29, 1453 | |
* | | | PPP | May 29th, 1453 | |
* | | | PPPP | Sunday, May 29th, 1453 | 2,5,8 |
* | Long localized time | NA | p | 12:00 AM | 5,8 |
* | | | pp | 12:00:00 AM | |
* | Combination of date and time | NA | Pp | 05/29/1453, 12:00 AM | |
* | | | PPpp | May 29, 1453, 12:00:00 AM | |
* | | | PPPpp | May 29th, 1453 at ... | |
* | | | PPPPpp | Sunday, May 29th, 1453 at ... | 2,5,8 |
* Notes:
* 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale
* are the same as "stand-alone" units, but are different in some languages.
* "Formatting" units are declined according to the rules of the language
* in the context of a date. "Stand-alone" units are always nominative singular.
* In `format` function, they will produce different result:
*
* `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`
*
* `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`
*
* `parse` will try to match both formatting and stand-alone units interchangeably.
*
* 2. Any sequence of the identical letters is a pattern, unless it is escaped by
* the single quote characters (see below).
* If the sequence is longer than listed in table:
* - for numerical units (`yyyyyyyy`) `parse` will try to match a number
* as wide as the sequence
* - for text units (`MMMMMMMM`) `parse` will try to match the widest variation of the unit.
* These variations are marked with "2" in the last column of the table.
*
* 3. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.
* These tokens represent the shortest form of the quarter.
*
* 4. The main difference between `y` and `u` patterns are B.C. years:
*
* | Year | `y` | `u` |
* |------|-----|-----|
* | AC 1 | 1 | 1 |
* | BC 1 | 1 | 0 |
* | BC 2 | 2 | -1 |
*
* Also `yy` will try to guess the century of two digit year by proximity with `referenceDate`:
*
* `parse('50', 'yy', new Date(2018, 0, 1)) //=> Sat Jan 01 2050 00:00:00`
*
* `parse('75', 'yy', new Date(2018, 0, 1)) //=> Wed Jan 01 1975 00:00:00`
*
* while `uu` will just assign the year as is:
*
* `parse('50', 'uu', new Date(2018, 0, 1)) //=> Sat Jan 01 0050 00:00:00`
*
* `parse('75', 'uu', new Date(2018, 0, 1)) //=> Tue Jan 01 0075 00:00:00`
*
* The same difference is true for local and ISO week-numbering years (`Y` and `R`),
* except local week-numbering years are dependent on `options.weekStartsOn`
* and `options.firstWeekContainsDate` (compare [setISOWeekYear](https://date-fns.org/docs/setISOWeekYear)
* and [setWeekYear](https://date-fns.org/docs/setWeekYear)).
*
* 5. These patterns are not in the Unicode Technical Standard #35:
* - `i`: ISO day of week
* - `I`: ISO week of year
* - `R`: ISO week-numbering year
* - `o`: ordinal number modifier
* - `P`: long localized date
* - `p`: long localized time
*
* 6. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
* You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* 7. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
* You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* 8. `P+` tokens do not have a defined priority since they are merely aliases to other tokens based
* on the given locale.
*
* using `en-US` locale: `P` => `MM/dd/yyyy`
* using `en-US` locale: `p` => `hh:mm a`
* using `pt-BR` locale: `P` => `dd/MM/yyyy`
* using `pt-BR` locale: `p` => `HH:mm`
*
* Values will be assigned to the date in the descending order of its unit's priority.
* Units of an equal priority overwrite each other in the order of appearance.
*
* If no values of higher priority are parsed (e.g. when parsing string 'January 1st' without a year),
* the values will be taken from 3rd argument `referenceDate` which works as a context of parsing.
*
* `referenceDate` must be passed for correct work of the function.
* If you're not sure which `referenceDate` to supply, create a new instance of Date:
* `parse('02/11/2014', 'MM/dd/yyyy', new Date())`
* In this case parsing will be done in the context of the current date.
* If `referenceDate` is `Invalid Date` or a value not convertible to valid `Date`,
* then `Invalid Date` will be returned.
*
* The result may vary by locale.
*
* If `formatString` matches with `dateString` but does not provides tokens, `referenceDate` will be returned.
*
* If parsing failed, `Invalid Date` will be returned.
* Invalid Date is a Date, whose time value is NaN.
* Time value of Date: http://es5.github.io/#x15.9.1.1
*
* @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 dateStr - The string to parse
* @param formatStr - The string of tokens
* @param referenceDate - defines values missing from the parsed dateString
* @param options - An object with options.
* see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
* see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* @returns The parsed date
*
* @throws `options.locale` must contain `match` property
* @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
* @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
* @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
* @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
* @throws format string contains an unescaped latin alphabet character
*
* @example
* // Parse 11 February 2014 from middle-endian format:
* var result = parse('02/11/2014', 'MM/dd/yyyy', new Date())
* //=> Tue Feb 11 2014 00:00:00
*
* @example
* // Parse 28th of February in Esperanto locale in the context of 2010 year:
* import eo from 'date-fns/locale/eo'
* var result = parse('28-a de februaro', "do 'de' MMMM", new Date(2010, 0, 1), {
* locale: eo
* })
* //=> Sun Feb 28 2010 00:00:00
*/
function parse(dateStr, formatStr, referenceDate, options) {
const invalidDate = () =>
(0, _index4.constructFrom)(options?.in || referenceDate, NaN);
const defaultOptions = (0, _index5.getDefaultOptions)();
const locale =
options?.locale ?? defaultOptions.locale ?? _index.defaultLocale;
const firstWeekContainsDate =
options?.firstWeekContainsDate ??
options?.locale?.options?.firstWeekContainsDate ??
defaultOptions.firstWeekContainsDate ??
defaultOptions.locale?.options?.firstWeekContainsDate ??
1;
const weekStartsOn =
options?.weekStartsOn ??
options?.locale?.options?.weekStartsOn ??
defaultOptions.weekStartsOn ??
defaultOptions.locale?.options?.weekStartsOn ??
0;
if (!formatStr)
return dateStr
? invalidDate()
: (0, _index6.toDate)(referenceDate, options?.in);
const subFnOptions = {
firstWeekContainsDate,
weekStartsOn,
locale,
};
// If timezone isn't specified, it will try to use the context or
// the reference date and fallback to the system time zone.
const setters = [new _Setter.DateTimezoneSetter(options?.in, referenceDate)];
const tokens = formatStr
.match(longFormattingTokensRegExp)
.map((substring) => {
const firstCharacter = substring[0];
if (firstCharacter in _index2.longFormatters) {
const longFormatter = _index2.longFormatters[firstCharacter];
return longFormatter(substring, locale.formatLong);
}
return substring;
})
.join("")
.match(formattingTokensRegExp);
const usedTokens = [];
for (let token of tokens) {
if (
!options?.useAdditionalWeekYearTokens &&
(0, _index3.isProtectedWeekYearToken)(token)
) {
(0, _index3.warnOrThrowProtectedError)(token, formatStr, dateStr);
}
if (
!options?.useAdditionalDayOfYearTokens &&
(0, _index3.isProtectedDayOfYearToken)(token)
) {
(0, _index3.warnOrThrowProtectedError)(token, formatStr, dateStr);
}
const firstCharacter = token[0];
const parser = _index7.parsers[firstCharacter];
if (parser) {
const { incompatibleTokens } = parser;
if (Array.isArray(incompatibleTokens)) {
const incompatibleToken = usedTokens.find(
(usedToken) =>
incompatibleTokens.includes(usedToken.token) ||
usedToken.token === firstCharacter,
);
if (incompatibleToken) {
throw new RangeError(
`The format string mustn't contain \`${incompatibleToken.fullToken}\` and \`${token}\` at the same time`,
);
}
} else if (parser.incompatibleTokens === "*" && usedTokens.length > 0) {
throw new RangeError(
`The format string mustn't contain \`${token}\` and any other token at the same time`,
);
}
usedTokens.push({ token: firstCharacter, fullToken: token });
const parseResult = parser.run(
dateStr,
token,
locale.match,
subFnOptions,
);
if (!parseResult) {
return invalidDate();
}
setters.push(parseResult.setter);
dateStr = parseResult.rest;
} else {
if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
throw new RangeError(
"Format string contains an unescaped latin alphabet character `" +
firstCharacter +
"`",
);
}
// Replace two single quote characters with one single quote character
if (token === "''") {
token = "'";
} else if (firstCharacter === "'") {
token = cleanEscapedString(token);
}
// Cut token from string, or, if string doesn't match the token, return Invalid Date
if (dateStr.indexOf(token) === 0) {
dateStr = dateStr.slice(token.length);
} else {
return invalidDate();
}
}
}
// Check if the remaining input contains something other than whitespace
if (dateStr.length > 0 && notWhitespaceRegExp.test(dateStr)) {
return invalidDate();
}
const uniquePrioritySetters = setters
.map((setter) => setter.priority)
.sort((a, b) => b - a)
.filter((priority, index, array) => array.indexOf(priority) === index)
.map((priority) =>
setters
.filter((setter) => setter.priority === priority)
.sort((a, b) => b.subPriority - a.subPriority),
)
.map((setterArray) => setterArray[0]);
let date = (0, _index6.toDate)(referenceDate, options?.in);
if (isNaN(+date)) return invalidDate();
const flags = {};
for (const setter of uniquePrioritySetters) {
if (!setter.validate(date, subFnOptions)) {
return invalidDate();
}
const result = setter.set(date, flags, subFnOptions);
// Result is tuple (date, flags)
if (Array.isArray(result)) {
date = result[0];
Object.assign(flags, result[1]);
// Result is date
} else {
date = result;
}
}
return date;
}
function cleanEscapedString(input) {
return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
}

View File

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

View File

@@ -0,0 +1,9 @@
import { HandlerDataError } from '../types-hoist/instrument';
/**
* Add an instrumentation handler for when an error is captured by the global error handler.
*
* Use at your own risk, this might break without changelog notice, only used internally.
* @hidden
*/
export declare function addGlobalErrorInstrumentationHandler(handler: (data: HandlerDataError) => void): void;
//# sourceMappingURL=globalError.d.ts.map

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