fix(products): fix breadcrumbs and product filtering (backport from main)
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
@@ -0,0 +1,59 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const types = require('../../../types.js');
const globalListeners = require('./globalListeners.js');
/*
* Copyright 2020 Google LLC
*
* 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.
*/
/**
* Sentry-specific change:
*
* This function's logic was NOT updated to web-vitals 4.2.4 or 5.x but we continue
* to use the web-vitals 3.5.2 version due to having stricter browser support.
*
* PR with context that made the changes:
* https://github.com/GoogleChrome/web-vitals/pull/442/files#r1530492402
*
* The PR removed listening to the `pagehide` event, in favour of only listening to
* the `visibilitychange` event. This is "more correct" but some browsers we still
* support (Safari <14.4) don't fully support `visibilitychange` or have known bugs
* with respect to the `visibilitychange` event.
*
* TODO (v11): If we decide to drop support for Safari 14.4, we can use the logic
* from web-vitals 4.2.4. In this case, we also need to update the integration tests
* that currently trigger the `pagehide` event to simulate the page being hidden.
*
* @param {OnHiddenCallback} cb - Callback to be executed when the page is hidden or unloaded.
*
* @deprecated use `whenIdleOrHidden` or `addPageListener('visibilitychange')` instead
*/
const onHidden = (cb) => {
const onHiddenOrPageHide = (event) => {
if (event.type === 'pagehide' || types.WINDOW.document?.visibilityState === 'hidden') {
cb(event);
}
};
globalListeners.addPageListener('visibilitychange', onHiddenOrPageHide, { capture: true, once: true });
// Some browsers have buggy implementations of visibilitychange,
// so we use pagehide in addition, just to be safe.
globalListeners.addPageListener('pagehide', onHiddenOrPageHide, { capture: true, once: true });
};
exports.onHidden = onHidden;
//# sourceMappingURL=onHidden.js.map
@@ -0,0 +1,27 @@
import type { ContextOptions, DateArg } from "./types.js";
/**
* The {@link getHours} function options.
*/
export interface GetHoursOptions extends ContextOptions<Date> {}
/**
* @name getHours
* @category Hour Helpers
* @summary Get the hours of the given date.
*
* @description
* Get the hours of the given date.
*
* @param date - The given date
* @param options - An object with options
*
* @returns The hours
*
* @example
* // Get the hours of 29 February 2012 11:45:00:
* const result = getHours(new Date(2012, 1, 29, 11, 45))
* //=> 11
*/
export declare function getHours(
date: DateArg<Date> & {},
options?: GetHoursOptions | undefined,
): number;
@@ -0,0 +1,12 @@
'use strict';
module.exports = {
action: require('./action'),
clear: require('./clear'),
style: require('./style'),
strip: require('./strip'),
figures: require('./figures'),
lines: require('./lines'),
wrap: require('./wrap'),
entriesToDisplay: require('./entriesToDisplay')
};
@@ -0,0 +1,5 @@
export declare const endOfSecondWithOptions: import("./types.js").FPFn2<
Date,
import("../endOfSecond.js").EndOfSecondOptions<Date> | undefined,
import("../fp.js").DateArg<Date>
>;
@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const SquareSlash = createLucideIcon("SquareSlash", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["line", { x1: "9", x2: "15", y1: "15", y2: "9", key: "1dfufj" }]
]);
export { SquareSlash as default };
//# sourceMappingURL=square-slash.js.map
@@ -0,0 +1,9 @@
language: node_js
node_js:
- "6"
- "7"
- "8"
- "9"
- "10"
- "11"
- "node"
@@ -0,0 +1,36 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.mjs";
const dateFormats = {
full: "EEEE, do MMMM, y",
long: "do MMMM, y",
medium: "d MMM, y",
short: "dd/MM/yyyy",
};
const timeFormats = {
full: "H:mm:ss zzzz",
long: "H:mm:ss z",
medium: "H:mm:ss",
short: "H:mm",
};
const dateTimeFormats = {
any: "{{date}}, {{time}}",
};
export const formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full",
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "any",
}),
};
@@ -0,0 +1 @@
{"version":3,"file":"focus.js","sources":["../../../src/icons/focus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Focus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIzIiAvPgogIDxwYXRoIGQ9Ik0zIDdWNWEyIDIgMCAwIDEgMi0yaDIiIC8+CiAgPHBhdGggZD0iTTE3IDNoMmEyIDIgMCAwIDEgMiAydjIiIC8+CiAgPHBhdGggZD0iTTIxIDE3djJhMiAyIDAgMCAxLTIgMmgtMiIgLz4KICA8cGF0aCBkPSJNNyAyMUg1YTIgMiAwIDAgMS0yLTJ2LTIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/focus\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 Focus = createLucideIcon('Focus', [\n ['circle', { cx: '12', cy: '12', r: '3', key: '1v7zrd' }],\n ['path', { d: 'M3 7V5a2 2 0 0 1 2-2h2', key: 'aa7l1z' }],\n ['path', { d: 'M17 3h2a2 2 0 0 1 2 2v2', key: '4qcy5o' }],\n ['path', { d: 'M21 17v2a2 2 0 0 1-2 2h-2', key: '6vwrx8' }],\n ['path', { d: 'M7 21H5a2 2 0 0 1-2-2v-2', key: 'ioqczr' }],\n]);\n\nexport default Focus;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CACtC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0B,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,36 @@
import { AnyMap, originalPositionFor, generatedPositionFor, eachMapping } from '@jridgewell/trace-mapping';
import { GenMapping, maybeAddMapping, toDecodedMap, toEncodedMap, setSourceContent } from '@jridgewell/gen-mapping';
import type { TraceMap, SourceMapInput, SectionedSourceMapInput, DecodedSourceMap } from '@jridgewell/trace-mapping';
export type { TraceMap, SourceMapInput, SectionedSourceMapInput, DecodedSourceMap };
import type { Mapping, EncodedSourceMap } from '@jridgewell/gen-mapping';
export type { Mapping, EncodedSourceMap };
export declare class SourceMapConsumer {
private _map;
file: TraceMap['file'];
names: TraceMap['names'];
sourceRoot: TraceMap['sourceRoot'];
sources: TraceMap['sources'];
sourcesContent: TraceMap['sourcesContent'];
version: TraceMap['version'];
constructor(map: ConstructorParameters<typeof AnyMap>[0], mapUrl?: ConstructorParameters<typeof AnyMap>[1]);
static fromSourceMap(map: SourceMapGenerator, mapUrl?: Parameters<typeof AnyMap>[1]): SourceMapConsumer;
get mappings(): string;
originalPositionFor(needle: Parameters<typeof originalPositionFor>[1]): ReturnType<typeof originalPositionFor>;
generatedPositionFor(originalPosition: Parameters<typeof generatedPositionFor>[1]): ReturnType<typeof generatedPositionFor>;
allGeneratedPositionsFor(originalPosition: Parameters<typeof generatedPositionFor>[1]): ReturnType<typeof generatedPositionFor>[];
hasContentsOfAllSources(): boolean;
sourceContentFor(source: string, nullOnMissing?: boolean): string | null;
eachMapping(callback: Parameters<typeof eachMapping>[1], context?: any): void;
destroy(): void;
}
export declare class SourceMapGenerator {
private _map;
constructor(opts: ConstructorParameters<typeof GenMapping>[0] | GenMapping);
static fromSourceMap(consumer: SourceMapConsumer): SourceMapGenerator;
addMapping(mapping: Parameters<typeof maybeAddMapping>[1]): ReturnType<typeof maybeAddMapping>;
setSourceContent(source: Parameters<typeof setSourceContent>[1], content: Parameters<typeof setSourceContent>[2]): ReturnType<typeof setSourceContent>;
toJSON(): ReturnType<typeof toEncodedMap>;
toString(): string;
toDecodedMap(): ReturnType<typeof toDecodedMap>;
}
//# sourceMappingURL=source-map.d.ts.map
@@ -0,0 +1,5 @@
export {
Fragment,
jsx,
jsxs
} from "./emotion-react-jsx-runtime.development.cjs.js";
@@ -0,0 +1 @@
{"version":3,"file":"empty.js","sourceRoot":"","sources":["../src/empty.ts"],"names":[],"mappings":";;AAAA,kFAAkF;AAClF,0CAA0C;AAC1C,kBAAe,EAAE,CAAA"}
@@ -0,0 +1 @@
{"version":3,"file":"search-x.js","sources":["../../../src/icons/search-x.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SearchX\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTMuNSA4LjUtNSA1IiAvPgogIDxwYXRoIGQ9Im04LjUgOC41IDUgNSIgLz4KICA8Y2lyY2xlIGN4PSIxMSIgY3k9IjExIiByPSI4IiAvPgogIDxwYXRoIGQ9Im0yMSAyMS00LjMtNC4zIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/search-x\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 SearchX = createLucideIcon('SearchX', [\n ['path', { d: 'm13.5 8.5-5 5', key: '1cs55j' }],\n ['path', { d: 'm8.5 8.5 5 5', key: 'a8mexj' }],\n ['circle', { cx: '11', cy: '11', r: '8', key: '4ej97u' }],\n ['path', { d: 'm21 21-4.3-4.3', key: '1qie3q' }],\n]);\n\nexport default SearchX;\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,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC7C,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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;;"}
@@ -0,0 +1,29 @@
import { formatDistance } from "./ar-DZ/_lib/formatDistance.js";
import { formatLong } from "./ar-DZ/_lib/formatLong.js";
import { formatRelative } from "./ar-DZ/_lib/formatRelative.js";
import { localize } from "./ar-DZ/_lib/localize.js";
import { match } from "./ar-DZ/_lib/match.js";
/**
* @category Locales
* @summary Arabic locale (Algerian Arabic).
* @language Algerian Arabic
* @iso-639-2 ara
* @author Badreddine Boumaza [@badre429](https://github.com/badre429)
* @author Ahmed ElShahat [@elshahat](https://github.com/elshahat)
*/
export const arDZ = {
code: "ar-DZ",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 0 /* Sunday */,
firstWeekContainsDate: 1,
},
};
// Fallback for modularized imports:
export default arDZ;
@@ -0,0 +1,7 @@
"use strict";
exports.isDate = void 0;
var _index = require("../isDate.cjs");
var _index2 = require("./_lib/convertToFP.cjs"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const isDate = (exports.isDate = (0, _index2.convertToFP)(_index.isDate, 1));
@@ -0,0 +1,41 @@
"use strict";
exports.addDays = addDays;
var _index = require("./constructFrom.cjs");
var _index2 = require("./toDate.cjs");
/**
* The {@link addDays} function options.
*/
/**
* @name addDays
* @category Day Helpers
* @summary Add the specified number of days to the given date.
*
* @description
* Add the specified number of days to the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @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 be changed
* @param amount - The amount of days to be added.
* @param options - An object with options
*
* @returns The new date with the days added
*
* @example
* // Add 10 days to 1 September 2014:
* const result = addDays(new Date(2014, 8, 1), 10)
* //=> Thu Sep 11 2014 00:00:00
*/
function addDays(date, amount, options) {
const _date = (0, _index2.toDate)(date, options?.in);
if (isNaN(amount)) return (0, _index.constructFrom)(options?.in || date, NaN);
// If 0 days, no-op to avoid changing times in the hour before end of DST
if (!amount) return _date;
_date.setDate(_date.getDate() + amount);
return _date;
}
@@ -0,0 +1,32 @@
import type { browserTracingIntegration } from '@sentry/browser';
import type { Integration } from '@sentry/core';
import type { ReactRouterOptions } from './reactrouter-compat-utils';
import type { CreateRouterFunction, Router, RouterState, UseRoutes } from './types';
/**
* A browser tracing integration that uses React Router v6 to instrument navigations.
* Expects `useEffect`, `useLocation`, `useNavigationType`, `createRoutesFromChildren` and `matchRoutes` to be passed as options.
*/
export declare function reactRouterV6BrowserTracingIntegration(options: Parameters<typeof browserTracingIntegration>[0] & ReactRouterOptions): Integration;
/**
* A wrapper function that adds Sentry routing instrumentation to a React Router v6 useRoutes hook.
* This is used to automatically capture route changes as transactions when using the useRoutes hook.
*/
export declare function wrapUseRoutesV6(origUseRoutes: UseRoutes): UseRoutes;
/**
* A wrapper function that adds Sentry routing instrumentation to a React Router v6 createBrowserRouter function.
* This is used to automatically capture route changes as transactions when using the createBrowserRouter API.
*/
export declare function wrapCreateBrowserRouterV6<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 v6 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 wrapCreateMemoryRouterV6<TState extends RouterState = RouterState, TRouter extends Router<TState> = Router<TState>>(createMemoryRouterFunction: CreateRouterFunction<TState, TRouter>): CreateRouterFunction<TState, TRouter>;
/**
* A higher-order component that adds Sentry routing instrumentation to a React Router v6 Route component.
* This is used to automatically capture route changes as transactions.
*/
export declare function withSentryReactRouterV6Routing<P extends Record<string, any>, R extends React.FC<P>>(routes: R): R;
//# sourceMappingURL=reactrouterv6.d.ts.map
@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const GitPullRequestCreate = createLucideIcon("GitPullRequestCreate", [
["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
["path", { d: "M6 9v12", key: "1sc30k" }],
["path", { d: "M13 6h3a2 2 0 0 1 2 2v3", key: "1jb6z3" }],
["path", { d: "M18 15v6", key: "9wciyi" }],
["path", { d: "M21 18h-6", key: "139f0c" }]
]);
export { GitPullRequestCreate as default };
//# sourceMappingURL=git-pull-request-create.js.map
@@ -0,0 +1,3 @@
import type { Transform } from '@dnd-kit/utilities';
import type { ClientRect } from '../../types';
export declare function adjustScale(transform: Transform, rect1: ClientRect | null, rect2: ClientRect | null): Transform;
@@ -0,0 +1,17 @@
import type { BaseTransportOptions, Transport } from '@sentry/core';
import type { HTTPModule } from './http-module';
export interface NodeTransportOptions extends BaseTransportOptions {
/** Set a proxy that should be used for outbound requests. */
proxy?: string;
/** HTTPS proxy CA certificates */
caCerts?: string | Buffer | Array<string | Buffer>;
/** Custom HTTP module. Defaults to the native 'http' and 'https' modules. */
httpModule?: HTTPModule;
/** Allow overriding connection keepAlive, defaults to false */
keepAlive?: boolean;
}
/**
* Creates a Transport that uses native the native 'http' and 'https' modules to send events to Sentry.
*/
export declare function makeNodeTransport(options: NodeTransportOptions): Transport;
//# sourceMappingURL=http.d.ts.map
@@ -0,0 +1,10 @@
import type { ClipboardCopyActionArgs, ClipboardPasteActionArgs } from './types.js';
/**
* @note This function doesn't use the Clipboard API, but localStorage. See rationale in #11513
*/
export declare function clipboardCopy(args: ClipboardCopyActionArgs): string | true;
/**
* @note This function doesn't use the Clipboard API, but localStorage. See rationale in #11513
*/
export declare function clipboardPaste({ onPaste, path: fieldPath, t, ...args }: ClipboardPasteActionArgs): string | true;
//# sourceMappingURL=clipboardUtilities.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"Relationship.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Relationship.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AAC9F,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAA;AAC9E,OAAO,KAAK,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AAC7F,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,UAAU,EACV,oBAAoB,EACpB,eAAe,EAChB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EACV,+BAA+B,EAC/B,+BAA+B,EAC/B,wBAAwB,EACxB,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EAC1B,MAAM,aAAa,CAAA;AAEpB,KAAK,kCAAkC,GAAG,YAAY,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAA;AAEvF,KAAK,gCAAgC,GAAG;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,QAAQ,CAAC,EAAE,2BAA2B,CAAA;CAChD,CAAA;AAED,KAAK,gCAAgC,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;AAEhE,MAAM,MAAM,4BAA4B,GAAG,eAAe,CAAC,kCAAkC,CAAC,GAC5F,gCAAgC,CAAA;AAElC,MAAM,MAAM,4BAA4B,GAAG,gCAAgC,GACzE,eAAe,CAAC,iBAAiB,EAAE,kCAAkC,CAAC,CAAA;AAExE,MAAM,MAAM,gCAAgC,GAAG,oBAAoB,CACjE,iBAAiB,EACjB,kCAAkC,EAClC,gCAAgC,CACjC,CAAA;AAED,MAAM,MAAM,gCAAgC,GAAG,oBAAoB,CACjE,kCAAkC,EAClC,gCAAgC,CACjC,CAAA;AAED,MAAM,MAAM,qCAAqC,GAAG,yBAAyB,CAC3E,iBAAiB,EACjB,kCAAkC,CACnC,CAAA;AAED,MAAM,MAAM,qCAAqC,GAC/C,yBAAyB,CAAC,kCAAkC,CAAC,CAAA;AAE/D,MAAM,MAAM,2CAA2C,GAAG,+BAA+B,CACvF,iBAAiB,EACjB,kCAAkC,CACnC,CAAA;AAED,MAAM,MAAM,2CAA2C,GACrD,+BAA+B,CAAC,kCAAkC,CAAC,CAAA;AAErE,MAAM,MAAM,qCAAqC,GAAG,yBAAyB,CAC3E,iBAAiB,EACjB,kCAAkC,CACnC,CAAA;AAED,MAAM,MAAM,qCAAqC,GAC/C,yBAAyB,CAAC,kCAAkC,CAAC,CAAA;AAE/D,MAAM,MAAM,oCAAoC,GAAG,wBAAwB,CACzE,iBAAiB,EACjB,uBAAuB,CACxB,CAAA;AAED,MAAM,MAAM,oCAAoC,GAAG,wBAAwB,CAAC,uBAAuB,CAAC,CAAA"}
@@ -0,0 +1 @@
{"version":3,"file":"integration.js","sources":["../../../../../../../src/integrations/featureFlags/growthbook/integration.ts"],"sourcesContent":["import type { IntegrationFn } from '@sentry/core';\nimport { growthbookIntegration as coreGrowthbookIntegration } from '@sentry/core';\nimport type { GrowthBookClass } from './types';\n\n/**\n * Sentry integration for capturing feature flag evaluations from GrowthBook.\n *\n * See the feature flag documentation: https://develop.sentry.dev/sdk/expected-features/#feature-flags\n *\n * @example\n * ```\n * import { GrowthBook } from '@growthbook/growthbook';\n * import * as Sentry from '@sentry/browser';\n *\n * Sentry.init({\n * dsn: '___PUBLIC_DSN___',\n * integrations: [Sentry.growthbookIntegration({ growthbookClass: GrowthBook })],\n * });\n *\n * const gb = new GrowthBook();\n * gb.isOn('my-feature');\n * Sentry.captureException(new Error('something went wrong'));\n * ```\n */\nexport const growthbookIntegration = (({ growthbookClass }: { growthbookClass: GrowthBookClass }) =>\n coreGrowthbookIntegration({ growthbookClass })) satisfies IntegrationFn;\n"],"names":["coreGrowthbookIntegration"],"mappings":";;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,yBAAyB,CAAC,EAAE,eAAA,EAAiB;AAC1D,EAAEA,0BAAyB,CAAC,EAAE,eAAA,EAAiB,CAAC,CAAA;;;;"}
@@ -0,0 +1,46 @@
/**
* Options added to the Browser SDK's init options that are specific for Replay.
* Note: This type was moved to @sentry/core to avoid a circular dependency between Browser and Replay.
*/
export type BrowserClientReplayOptions = {
/**
* The sample rate for session-long replays.
* 1.0 will record all sessions and 0 will record none.
*/
replaysSessionSampleRate?: number;
/**
* The sample rate for sessions that has had an error occur.
* This is independent of `sessionSampleRate`.
* 1.0 will record all sessions and 0 will record none.
*/
replaysOnErrorSampleRate?: number;
};
export type BrowserClientProfilingOptions = {
/**
* The sample rate for profiling
* 1.0 will profile all transactions and 0 will profile none.
*
* @deprecated Use `profileSessionSampleRate` and `profileLifecycle` instead.
*/
profilesSampleRate?: number;
/**
* Sets profiling session sample rate for the entire profiling session.
*
* A profiling session corresponds to a user session, meaning it is set once at integration initialization and
* persisted until the next page reload. This rate determines what percentage of user sessions will have profiling enabled.
* @default 0
*/
profileSessionSampleRate?: number;
/**
* Set the lifecycle mode of the profiler.
* - **manual**: The profiler will be manually started and stopped via `startProfiler`/`stopProfiler`.
* If a session is sampled, is dependent on the `profileSessionSampleRate`.
* - **trace**: The profiler will be automatically started when a root span exists and stopped when there are no
* more sampled root spans. Whether a session is sampled, is dependent on the `profileSessionSampleRate` and the
* existing sampling configuration for tracing (`tracesSampleRate`/`tracesSampler`).
*
* @default 'manual'
*/
profileLifecycle?: 'manual' | 'trace';
};
//# sourceMappingURL=browseroptions.d.ts.map
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/bun-sqlite/migrator.ts"],"sourcesContent":["import type { MigrationConfig } from '~/migrator.ts';\nimport { readMigrationFiles } from '~/migrator.ts';\nimport type { BunSQLiteDatabase } from './driver.ts';\n\nexport function migrate<TSchema extends Record<string, unknown>>(\n\tdb: BunSQLiteDatabase<TSchema>,\n\tconfig: MigrationConfig,\n) {\n\tconst migrations = readMigrationFiles(config);\n\tdb.dialect.migrate(migrations, db.session, config);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,sBAAmC;AAG5B,SAAS,QACf,IACA,QACC;AACD,QAAM,iBAAa,oCAAmB,MAAM;AAC5C,KAAG,QAAQ,QAAQ,YAAY,GAAG,SAAS,MAAM;AAClD;","names":[]}
@@ -0,0 +1 @@
{"version":3,"file":"globalThis.js","sourceRoot":"","sources":["../../../src/common/globalThis.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @deprecated Use globalThis directly instead.\n */\nexport const _globalThis = globalThis;\n"]}
@@ -0,0 +1 @@
{"version":3,"file":"index.server.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,6 @@
export declare const addWithOptions: import("./types.js").FPFn3<
Date,
import("../add.js").AddOptions<Date> | undefined,
import("../fp.js").Duration,
import("../fp.js").DateArg<Date>
>;
@@ -0,0 +1,6 @@
import { Span } from '@opentelemetry/api';
/**
* Returns the currently active span.
*/
export declare function getActiveSpan(): Span | undefined;
//# sourceMappingURL=getActiveSpan.d.ts.map
@@ -0,0 +1,45 @@
var baseFill = require('./_baseFill'),
isIterateeCall = require('./_isIterateeCall');
/**
* Fills elements of `array` with `value` from `start` up to, but not
* including, `end`.
*
* **Note:** This method mutates `array`.
*
* @static
* @memberOf _
* @since 3.2.0
* @category Array
* @param {Array} array The array to fill.
* @param {*} value The value to fill `array` with.
* @param {number} [start=0] The start position.
* @param {number} [end=array.length] The end position.
* @returns {Array} Returns `array`.
* @example
*
* var array = [1, 2, 3];
*
* _.fill(array, 'a');
* console.log(array);
* // => ['a', 'a', 'a']
*
* _.fill(Array(3), 2);
* // => [2, 2, 2]
*
* _.fill([4, 6, 8, 10], '*', 1, 3);
* // => [4, '*', '*', 10]
*/
function fill(array, value, start, end) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
start = 0;
end = length;
}
return baseFill(array, value, start, end);
}
module.exports = fill;
@@ -0,0 +1,4 @@
export declare const lastDayOfISOWeekYear: import("./types.js").FPFn1<
Date,
import("../fp.js").DateArg<Date>
>;
@@ -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 './cloud-download.js';
//# sourceMappingURL=download-cloud.js.map
@@ -0,0 +1 @@
{"version":3,"file":"lock.js","sources":["../../../src/icons/lock.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Lock\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTEiIHg9IjMiIHk9IjExIiByeD0iMiIgcnk9IjIiIC8+CiAgPHBhdGggZD0iTTcgMTFWN2E1IDUgMCAwIDEgMTAgMHY0IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/lock\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 Lock = createLucideIcon('Lock', [\n ['rect', { width: '18', height: '11', x: '3', y: '11', rx: '2', ry: '2', key: '1w4ew1' }],\n ['path', { d: 'M7 11V7a5 5 0 0 1 10 0v4', key: 'fwvmzm' }],\n]);\n\nexport default Lock;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,iBAAiB,MAAQ,CAAA,CAAA,CAAA;AAAA,CAAA,CACpC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,KAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAQ,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,EAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,MAAM,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAA,EAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAU,CAAA,CAAA;AAAA,CAAA,CACxF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"getMigrationTemplate.d.ts","sourceRoot":"","sources":["../../src/utilities/getMigrationTemplate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEpD,eAAO,MAAM,MAAM,SAAU,MAAM,WAIpB,CAAA;AAEf,eAAO,MAAM,oBAAoB,8CAK9B,qBAAqB,KAAG,MAS1B,CAAA"}
@@ -0,0 +1 @@
{"version":3,"file":"candlestick-chart.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,28 @@
import { formatDistance } from "./uz/_lib/formatDistance.mjs";
import { formatLong } from "./uz/_lib/formatLong.mjs";
import { formatRelative } from "./uz/_lib/formatRelative.mjs";
import { localize } from "./uz/_lib/localize.mjs";
import { match } from "./uz/_lib/match.mjs";
/**
* @category Locales
* @summary Uzbek locale.
* @language Uzbek
* @iso-639-2 uzb
* @author Mukhammadali [@mukhammadali](https://github.com/Mukhammadali)
*/
export const uz = {
code: "uz",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 1,
},
};
// Fallback for modularized imports:
export default uz;
@@ -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 './triangle-alert.js';
//# sourceMappingURL=alert-triangle.js.map
@@ -0,0 +1,412 @@
'use strict'
const {
InvalidArgumentError,
NotSupportedError
} = require('./errors')
const assert = require('node:assert')
const {
isValidHTTPToken,
isValidHeaderValue,
isStream,
destroy,
isBuffer,
isFormDataLike,
isIterable,
isBlobLike,
serializePathWithQuery,
assertRequestHandler,
getServerName,
normalizedMethodRecords,
getProtocolFromUrlString
} = require('./util')
const { channels } = require('./diagnostics.js')
const { headerNameLowerCasedRecord } = require('./constants')
// Verifies that a given path is valid does not contain control chars \x00 to \x20
const invalidPathRegex = /[^\u0021-\u00ff]/
const kHandler = Symbol('handler')
class Request {
constructor (origin, {
path,
method,
body,
headers,
query,
idempotent,
blocking,
upgrade,
headersTimeout,
bodyTimeout,
reset,
expectContinue,
servername,
throwOnError,
maxRedirections
}, handler) {
if (typeof path !== 'string') {
throw new InvalidArgumentError('path must be a string')
} else if (
path[0] !== '/' &&
!(path.startsWith('http://') || path.startsWith('https://')) &&
method !== 'CONNECT'
) {
throw new InvalidArgumentError('path must be an absolute URL or start with a slash')
} else if (invalidPathRegex.test(path)) {
throw new InvalidArgumentError('invalid request path')
}
if (typeof method !== 'string') {
throw new InvalidArgumentError('method must be a string')
} else if (normalizedMethodRecords[method] === undefined && !isValidHTTPToken(method)) {
throw new InvalidArgumentError('invalid request method')
}
if (upgrade && typeof upgrade !== 'string') {
throw new InvalidArgumentError('upgrade must be a string')
}
if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) {
throw new InvalidArgumentError('invalid headersTimeout')
}
if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) {
throw new InvalidArgumentError('invalid bodyTimeout')
}
if (reset != null && typeof reset !== 'boolean') {
throw new InvalidArgumentError('invalid reset')
}
if (expectContinue != null && typeof expectContinue !== 'boolean') {
throw new InvalidArgumentError('invalid expectContinue')
}
if (throwOnError != null) {
throw new InvalidArgumentError('invalid throwOnError')
}
if (maxRedirections != null && maxRedirections !== 0) {
throw new InvalidArgumentError('maxRedirections is not supported, use the redirect interceptor')
}
this.headersTimeout = headersTimeout
this.bodyTimeout = bodyTimeout
this.method = method
this.abort = null
if (body == null) {
this.body = null
} else if (isStream(body)) {
this.body = body
const rState = this.body._readableState
if (!rState || !rState.autoDestroy) {
this.endHandler = function autoDestroy () {
destroy(this)
}
this.body.on('end', this.endHandler)
}
this.errorHandler = err => {
if (this.abort) {
this.abort(err)
} else {
this.error = err
}
}
this.body.on('error', this.errorHandler)
} else if (isBuffer(body)) {
this.body = body.byteLength ? body : null
} else if (ArrayBuffer.isView(body)) {
this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null
} else if (body instanceof ArrayBuffer) {
this.body = body.byteLength ? Buffer.from(body) : null
} else if (typeof body === 'string') {
this.body = body.length ? Buffer.from(body) : null
} else if (isFormDataLike(body) || isIterable(body) || isBlobLike(body)) {
this.body = body
} else {
throw new InvalidArgumentError('body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable')
}
this.completed = false
this.aborted = false
this.upgrade = upgrade || null
this.path = query ? serializePathWithQuery(path, query) : path
// TODO: shall we maybe standardize it to an URL object?
this.origin = origin
this.protocol = getProtocolFromUrlString(origin)
this.idempotent = idempotent == null
? method === 'HEAD' || method === 'GET'
: idempotent
this.blocking = blocking ?? this.method !== 'HEAD'
this.reset = reset == null ? null : reset
this.host = null
this.contentLength = null
this.contentType = null
this.headers = []
// Only for H2
this.expectContinue = expectContinue != null ? expectContinue : false
if (Array.isArray(headers)) {
if (headers.length % 2 !== 0) {
throw new InvalidArgumentError('headers array must be even')
}
for (let i = 0; i < headers.length; i += 2) {
processHeader(this, headers[i], headers[i + 1])
}
} else if (headers && typeof headers === 'object') {
if (headers[Symbol.iterator]) {
for (const header of headers) {
if (!Array.isArray(header) || header.length !== 2) {
throw new InvalidArgumentError('headers must be in key-value pair format')
}
processHeader(this, header[0], header[1])
}
} else {
const keys = Object.keys(headers)
for (let i = 0; i < keys.length; ++i) {
processHeader(this, keys[i], headers[keys[i]])
}
}
} else if (headers != null) {
throw new InvalidArgumentError('headers must be an object or an array')
}
assertRequestHandler(handler, method, upgrade)
this.servername = servername || getServerName(this.host) || null
this[kHandler] = handler
if (channels.create.hasSubscribers) {
channels.create.publish({ request: this })
}
}
onBodySent (chunk) {
if (channels.bodyChunkSent.hasSubscribers) {
channels.bodyChunkSent.publish({ request: this, chunk })
}
if (this[kHandler].onBodySent) {
try {
return this[kHandler].onBodySent(chunk)
} catch (err) {
this.abort(err)
}
}
}
onRequestSent () {
if (channels.bodySent.hasSubscribers) {
channels.bodySent.publish({ request: this })
}
if (this[kHandler].onRequestSent) {
try {
return this[kHandler].onRequestSent()
} catch (err) {
this.abort(err)
}
}
}
onConnect (abort) {
assert(!this.aborted)
assert(!this.completed)
if (this.error) {
abort(this.error)
} else {
this.abort = abort
return this[kHandler].onConnect(abort)
}
}
onResponseStarted () {
return this[kHandler].onResponseStarted?.()
}
onHeaders (statusCode, headers, resume, statusText) {
assert(!this.aborted)
assert(!this.completed)
if (channels.headers.hasSubscribers) {
channels.headers.publish({ request: this, response: { statusCode, headers, statusText } })
}
try {
return this[kHandler].onHeaders(statusCode, headers, resume, statusText)
} catch (err) {
this.abort(err)
}
}
onData (chunk) {
assert(!this.aborted)
assert(!this.completed)
if (channels.bodyChunkReceived.hasSubscribers) {
channels.bodyChunkReceived.publish({ request: this, chunk })
}
try {
return this[kHandler].onData(chunk)
} catch (err) {
this.abort(err)
return false
}
}
onUpgrade (statusCode, headers, socket) {
assert(!this.aborted)
assert(!this.completed)
return this[kHandler].onUpgrade(statusCode, headers, socket)
}
onComplete (trailers) {
this.onFinally()
assert(!this.aborted)
assert(!this.completed)
this.completed = true
if (channels.trailers.hasSubscribers) {
channels.trailers.publish({ request: this, trailers })
}
try {
return this[kHandler].onComplete(trailers)
} catch (err) {
// TODO (fix): This might be a bad idea?
this.onError(err)
}
}
onError (error) {
this.onFinally()
if (channels.error.hasSubscribers) {
channels.error.publish({ request: this, error })
}
if (this.aborted) {
return
}
this.aborted = true
return this[kHandler].onError(error)
}
onFinally () {
if (this.errorHandler) {
this.body.off('error', this.errorHandler)
this.errorHandler = null
}
if (this.endHandler) {
this.body.off('end', this.endHandler)
this.endHandler = null
}
}
addHeader (key, value) {
processHeader(this, key, value)
return this
}
}
function processHeader (request, key, val) {
if (val && (typeof val === 'object' && !Array.isArray(val))) {
throw new InvalidArgumentError(`invalid ${key} header`)
} else if (val === undefined) {
return
}
let headerName = headerNameLowerCasedRecord[key]
if (headerName === undefined) {
headerName = key.toLowerCase()
if (headerNameLowerCasedRecord[headerName] === undefined && !isValidHTTPToken(headerName)) {
throw new InvalidArgumentError('invalid header key')
}
}
if (Array.isArray(val)) {
const arr = []
for (let i = 0; i < val.length; i++) {
if (typeof val[i] === 'string') {
if (!isValidHeaderValue(val[i])) {
throw new InvalidArgumentError(`invalid ${key} header`)
}
arr.push(val[i])
} else if (val[i] === null) {
arr.push('')
} else if (typeof val[i] === 'object') {
throw new InvalidArgumentError(`invalid ${key} header`)
} else {
arr.push(`${val[i]}`)
}
}
val = arr
} else if (typeof val === 'string') {
if (!isValidHeaderValue(val)) {
throw new InvalidArgumentError(`invalid ${key} header`)
}
} else if (val === null) {
val = ''
} else {
val = `${val}`
}
if (request.host === null && headerName === 'host') {
if (typeof val !== 'string') {
throw new InvalidArgumentError('invalid host header')
}
// Consumed by Client
request.host = val
} else if (request.contentLength === null && headerName === 'content-length') {
request.contentLength = parseInt(val, 10)
if (!Number.isFinite(request.contentLength)) {
throw new InvalidArgumentError('invalid content-length header')
}
} else if (request.contentType === null && headerName === 'content-type') {
request.contentType = val
request.headers.push(key, val)
} else if (headerName === 'transfer-encoding' || headerName === 'keep-alive' || headerName === 'upgrade') {
throw new InvalidArgumentError(`invalid ${headerName} header`)
} else if (headerName === 'connection') {
const value = typeof val === 'string' ? val.toLowerCase() : null
if (value !== 'close' && value !== 'keep-alive') {
throw new InvalidArgumentError('invalid connection header')
}
if (value === 'close') {
request.reset = true
}
} else if (headerName === 'expect') {
throw new NotSupportedError('expect header not supported')
} else {
request.headers.push(key, val)
}
}
module.exports = Request
@@ -0,0 +1 @@
{"version":3,"file":"emotion-hash.cjs.d.ts","sourceRoot":"","sources":["./declarations/src/index.d.ts"],"names":[],"mappings":"AAAA"}
@@ -0,0 +1,52 @@
import { ParserError } from "../util/errors.js";
import yaml from "js-yaml";
import { JSON_SCHEMA } from "js-yaml";
import type { FileInfo } from "../types/index.js";
import type { Plugin } from "../types/index.js";
export default {
/**
* The order that this parser will run, in relation to other parsers.
*/
order: 200,
/**
* Whether to allow "empty" files. This includes zero-byte files, as well as empty JSON objects.
*/
allowEmpty: true,
/**
* Determines whether this parser can parse a given file reference.
* Parsers that match will be tried, in order, until one successfully parses the file.
* Parsers that don't match will be skipped, UNLESS none of the parsers match, in which case
* every parser will be tried.
*/
canParse: [".yaml", ".yml", ".json"], // JSON is valid YAML
/**
* Parses the given file as YAML
*
* @param file - An object containing information about the referenced file
* @param file.url - The full URL of the referenced file
* @param file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.)
* @param file.data - The file contents. This will be whatever data type was returned by the resolver
* @returns
*/
async parse(file: FileInfo) {
let data = file.data;
if (Buffer.isBuffer(data)) {
data = data.toString();
}
if (typeof data === "string") {
try {
return yaml.load(data, { schema: JSON_SCHEMA });
} catch (e: any) {
throw new ParserError(e?.message || "Parser Error", file.url);
}
} else {
// data is already a JavaScript value (object, array, number, null, NaN, etc.)
return data;
}
},
} as Plugin;
@@ -0,0 +1,9 @@
import React from 'react';
import './index.scss';
type NoResultsProps = {
Actions?: React.ReactNode[];
Message: React.ReactNode;
};
export declare function NoListResults({ Actions, Message }: NoResultsProps): React.JSX.Element;
export {};
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,27 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import { SingleStoreColumn, SingleStoreColumnBuilder } from "./common.cjs";
export type SingleStoreVarBinaryBuilderInitial<TName extends string> = SingleStoreVarBinaryBuilder<{
name: TName;
dataType: 'string';
columnType: 'SingleStoreVarBinary';
data: string;
driverParam: string;
enumValues: undefined;
generated: undefined;
}>;
export declare class SingleStoreVarBinaryBuilder<T extends ColumnBuilderBaseConfig<'string', 'SingleStoreVarBinary'>> extends SingleStoreColumnBuilder<T, SingleStoreVarbinaryOptions> {
static readonly [entityKind]: string;
}
export declare class SingleStoreVarBinary<T extends ColumnBaseConfig<'string', 'SingleStoreVarBinary'>> extends SingleStoreColumn<T, SingleStoreVarbinaryOptions> {
static readonly [entityKind]: string;
length: number | undefined;
mapFromDriverValue(value: string | Buffer | Uint8Array): string;
getSQLType(): string;
}
export interface SingleStoreVarbinaryOptions {
length: number;
}
export declare function varbinary(config: SingleStoreVarbinaryOptions): SingleStoreVarBinaryBuilderInitial<''>;
export declare function varbinary<TName extends string>(name: TName, config: SingleStoreVarbinaryOptions): SingleStoreVarBinaryBuilderInitial<TName>;
@@ -0,0 +1 @@
{"version":3,"file":"DatabaseKVAdapter.d.ts","sourceRoot":"","sources":["../../../src/kv/adapters/DatabaseKVAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,KAAK,EAAE,OAAO,EAAkB,MAAM,sBAAsB,CAAA;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAK3E,qBAAa,iBAAkB,YAAW,SAAS;IAE/C,QAAQ,CAAC,OAAO,EAAE,OAAO;IACzB,QAAQ,CAAC,cAAc,EAAE,MAAM;gBADtB,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,MAAM;IAG3B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAQtB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQlC,GAAG,CAAC,CAAC,SAAS,YAAY,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,CAAC,CAAC;IAsB3D,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAUlC,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAczB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;CAa1D;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,oDAAoD;IACpD,qBAAqB,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAA;CAClD,CAAA;AAED,eAAO,MAAM,iBAAiB,aAAa,wBAAwB,KAAQ,eAkC1E,CAAA"}
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.cloneNode = cloneNode;
function cloneNode(n) {
// $FlowIgnore
return Object.assign({}, n);
}
@@ -0,0 +1 @@
{"version":3,"file":"panel-right-inactive.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,35 @@
var root = require('./_root'),
toInteger = require('./toInteger'),
toNumber = require('./toNumber'),
toString = require('./toString');
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeIsFinite = root.isFinite,
nativeMin = Math.min;
/**
* Creates a function like `_.round`.
*
* @private
* @param {string} methodName The name of the `Math` method to use when rounding.
* @returns {Function} Returns the new round function.
*/
function createRound(methodName) {
var func = Math[methodName];
return function(number, precision) {
number = toNumber(number);
precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
if (precision && nativeIsFinite(number)) {
// Shift with exponential notation to avoid floating-point issues.
// See [MDN](https://mdn.io/round#Examples) for more details.
var pair = (toString(number) + 'e').split('e'),
value = func(pair[0] + 'e' + (+pair[1] + precision));
pair = (toString(value) + 'e').split('e');
return +(pair[0] + 'e' + (+pair[1] - precision));
}
return func(number);
};
}
module.exports = createRound;
@@ -0,0 +1 @@
{"version":3,"names":["_regeneratorAsyncGen","require","_regeneratorAsync","innerFn","outerFn","self","tryLocsList","PromiseImpl","iter","asyncGen","next","then","result","done","value"],"sources":["../../src/helpers/regeneratorAsync.ts"],"sourcesContent":["/* @minVersion 7.27.0 */\n\nimport asyncGen from \"./regeneratorAsyncGen.ts\";\n\nexport default function _regeneratorAsync(\n innerFn: Function,\n outerFn: Function,\n self: any,\n tryLocsList: any[],\n PromiseImpl: PromiseConstructor | undefined,\n) {\n var iter = asyncGen(innerFn, outerFn, self, tryLocsList, PromiseImpl);\n return iter.next().then(function (result: IteratorResult<any>) {\n return result.done ? result.value : iter.next();\n });\n}\n"],"mappings":";;;;;;AAEA,IAAAA,oBAAA,GAAAC,OAAA;AAEe,SAASC,iBAAiBA,CACvCC,OAAiB,EACjBC,OAAiB,EACjBC,IAAS,EACTC,WAAkB,EAClBC,WAA2C,EAC3C;EACA,IAAIC,IAAI,GAAG,IAAAC,4BAAQ,EAACN,OAAO,EAAEC,OAAO,EAAEC,IAAI,EAAEC,WAAW,EAAEC,WAAW,CAAC;EACrE,OAAOC,IAAI,CAACE,IAAI,CAAC,CAAC,CAACC,IAAI,CAAC,UAAUC,MAA2B,EAAE;IAC7D,OAAOA,MAAM,CAACC,IAAI,GAAGD,MAAM,CAACE,KAAK,GAAGN,IAAI,CAACE,IAAI,CAAC,CAAC;EACjD,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -0,0 +1,6 @@
export declare const setDayOfYearWithOptions: import("./types.js").FPFn3<
Date,
import("../setDayOfYear.js").SetDayOfYearOptions<Date> | undefined,
number,
import("../fp.js").DateArg<Date>
>;
@@ -0,0 +1 @@
{"version":3,"file":"sanitizeSelect.d.ts","sourceRoot":"","sources":["../../src/utilities/sanitizeSelect.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAqB,UAAU,EAAE,MAAM,mBAAmB,CAAA;AA+GtE,eAAO,MAAM,cAAc,+CAKxB;IACD,MAAM,EAAE,cAAc,EAAE,CAAA;IACxB,WAAW,CAAC,EAAE,UAAU,CAAA;IACxB,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,KAAG,UAAU,GAAG,SA2ChB,CAAA"}
@@ -0,0 +1,2 @@
export type DataCategory = 'default' | 'error' | 'transaction' | 'replay' | 'security' | 'attachment' | 'session' | 'internal' | 'profile' | 'monitor' | 'feedback' | 'span' | 'log_item' | 'log_byte' | 'metric' | 'unknown';
//# sourceMappingURL=datacategory.d.ts.map
@@ -0,0 +1,164 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Ivan Kopeykin @vankop
*/
"use strict";
const makeSerializable = require("../util/makeSerializable");
const HarmonyImportSpecifierDependency = require("./HarmonyImportSpecifierDependency");
const { ImportPhase } = require("./ImportPhase");
/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */
/** @typedef {import("../Dependency")} Dependency */
/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */
/** @typedef {import("../Module").BuildMeta} BuildMeta */
/** @typedef {import("../ModuleGraphConnection")} ModuleGraphConnection */
/** @typedef {import("../javascript/JavascriptParser").ImportAttributes} ImportAttributes */
/** @typedef {import("../javascript/JavascriptParser").Range} Range */
/** @typedef {import("../serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */
/** @typedef {import("../serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */
/** @typedef {import("./HarmonyImportDependency").Ids} Ids */
/**
* Dependency for static evaluating import specifier. e.g.
* @example
* import a from "a";
* "x" in a;
* a.x !== undefined; // if x value statically analyzable
*/
class HarmonyEvaluatedImportSpecifierDependency extends HarmonyImportSpecifierDependency {
/**
* @param {string} request the request string
* @param {number} sourceOrder source order
* @param {Ids} ids ids
* @param {string} name name
* @param {Range} range location in source code
* @param {ImportAttributes | undefined} attributes import assertions
* @param {string} operator operator
*/
constructor(request, sourceOrder, ids, name, range, attributes, operator) {
super(
request,
sourceOrder,
ids,
name,
range,
false,
ImportPhase.Evaluation,
attributes,
[]
);
this.operator = operator;
}
get type() {
return `evaluated X ${this.operator} harmony import specifier`;
}
/**
* @param {ObjectSerializerContext} context context
*/
serialize(context) {
super.serialize(context);
const { write } = context;
write(this.operator);
}
/**
* @param {ObjectDeserializerContext} context context
*/
deserialize(context) {
super.deserialize(context);
const { read } = context;
this.operator = read();
}
}
makeSerializable(
HarmonyEvaluatedImportSpecifierDependency,
"webpack/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency"
);
HarmonyEvaluatedImportSpecifierDependency.Template = class HarmonyEvaluatedImportSpecifierDependencyTemplate extends (
HarmonyImportSpecifierDependency.Template
) {
/**
* @param {Dependency} dependency the dependency for which the template should be applied
* @param {ReplaceSource} source the current replace source which can be modified
* @param {DependencyTemplateContext} templateContext the context object
* @returns {void}
*/
apply(dependency, source, templateContext) {
const dep =
/** @type {HarmonyEvaluatedImportSpecifierDependency} */
(dependency);
const { module, moduleGraph, runtime } = templateContext;
const connection = moduleGraph.getConnection(dep);
// Skip rendering depending when dependency is conditional
if (connection && !connection.isTargetActive(runtime)) return;
const exportsInfo = moduleGraph.getExportsInfo(
/** @type {ModuleGraphConnection} */ (connection).module
);
const ids = dep.getIds(moduleGraph);
/** @type {boolean | undefined | null} */
let value;
const exportsType =
/** @type {ModuleGraphConnection} */
(connection).module.getExportsType(
moduleGraph,
/** @type {BuildMeta} */
(module.buildMeta).strictHarmonyModule
);
switch (exportsType) {
case "default-with-named": {
if (ids[0] === "default") {
value =
ids.length === 1 || exportsInfo.isExportProvided(ids.slice(1));
} else {
value = exportsInfo.isExportProvided(ids);
}
break;
}
case "namespace": {
value =
ids[0] === "__esModule"
? ids.length === 1 || undefined
: exportsInfo.isExportProvided(ids);
break;
}
case "dynamic": {
if (ids[0] !== "default") {
value = exportsInfo.isExportProvided(ids);
}
break;
}
// default-only could lead to runtime error, when default value is primitive
}
if (typeof value === "boolean") {
source.replace(dep.range[0], dep.range[1] - 1, ` ${value}`);
} else {
const usedName = exportsInfo.getUsedName(ids, runtime);
const code = this._getCodeForIds(
dep,
source,
templateContext,
ids.slice(0, -1)
);
source.replace(
dep.range[0],
dep.range[1] - 1,
`${
usedName ? JSON.stringify(usedName[usedName.length - 1]) : '""'
} in ${code}`
);
}
}
};
module.exports = HarmonyEvaluatedImportSpecifierDependency;
@@ -0,0 +1,11 @@
## Unreleased
## [1.0.2][] – 2019-11-10
### Fixed
- A negative sign is no longer stripped by mistake for numbers of the form −0.000…00(d) where the number of zeros after the decimal point is 2 mod 4.
[1.0.2]: https://github.com/charmander/pg-numeric/compare/v1.0.1...v1.0.2
@@ -0,0 +1,96 @@
(function() {
var base64map
= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
crypt = {
// Bit-wise rotation left
rotl: function(n, b) {
return (n << b) | (n >>> (32 - b));
},
// Bit-wise rotation right
rotr: function(n, b) {
return (n << (32 - b)) | (n >>> b);
},
// Swap big-endian to little-endian and vice versa
endian: function(n) {
// If number given, swap endian
if (n.constructor == Number) {
return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00;
}
// Else, assume array and swap all items
for (var i = 0; i < n.length; i++)
n[i] = crypt.endian(n[i]);
return n;
},
// Generate an array of any length of random bytes
randomBytes: function(n) {
for (var bytes = []; n > 0; n--)
bytes.push(Math.floor(Math.random() * 256));
return bytes;
},
// Convert a byte array to big-endian 32-bit words
bytesToWords: function(bytes) {
for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)
words[b >>> 5] |= bytes[i] << (24 - b % 32);
return words;
},
// Convert big-endian 32-bit words to a byte array
wordsToBytes: function(words) {
for (var bytes = [], b = 0; b < words.length * 32; b += 8)
bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);
return bytes;
},
// Convert a byte array to a hex string
bytesToHex: function(bytes) {
for (var hex = [], i = 0; i < bytes.length; i++) {
hex.push((bytes[i] >>> 4).toString(16));
hex.push((bytes[i] & 0xF).toString(16));
}
return hex.join('');
},
// Convert a hex string to a byte array
hexToBytes: function(hex) {
for (var bytes = [], c = 0; c < hex.length; c += 2)
bytes.push(parseInt(hex.substr(c, 2), 16));
return bytes;
},
// Convert a byte array to a base-64 string
bytesToBase64: function(bytes) {
for (var base64 = [], i = 0; i < bytes.length; i += 3) {
var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];
for (var j = 0; j < 4; j++)
if (i * 8 + j * 6 <= bytes.length * 8)
base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F));
else
base64.push('=');
}
return base64.join('');
},
// Convert a base-64 string to a byte array
base64ToBytes: function(base64) {
// Remove non-base-64 characters
base64 = base64.replace(/[^A-Z0-9+\/]/ig, '');
for (var bytes = [], i = 0, imod4 = 0; i < base64.length;
imod4 = ++i % 4) {
if (imod4 == 0) continue;
bytes.push(((base64map.indexOf(base64.charAt(i - 1))
& (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))
| (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));
}
return bytes;
}
};
module.exports = crypt;
})();
@@ -0,0 +1,34 @@
import type { Where } from 'payload';
import React from 'react';
export declare enum SelectAllStatus {
AllAvailable = "allAvailable",
AllInPage = "allInPage",
None = "none",
Some = "some"
}
type SelectionContext = {
count: number;
disableBulkDelete?: boolean;
disableBulkEdit?: boolean;
getQueryParams: (additionalParams?: Where) => string;
getSelectedIds: () => (number | string)[];
selectAll: SelectAllStatus;
selected: Map<number | string, boolean>;
selectedIDs: (number | string)[];
setSelection: (id: number | string) => void;
/**
* Selects all rows on the current page within the current query.
* If `allAvailable` is true, does not select specific IDs so that the query itself affects all rows across all pages.
*/
toggleAll: (allAvailable?: boolean) => void;
totalDocs: number;
};
type Props = {
readonly children: React.ReactNode;
readonly docs: any[];
readonly totalDocs: number;
};
export declare const SelectionProvider: React.FC<Props>;
export declare const useSelection: () => SelectionContext;
export {};
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,46 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import { LexicalNode } from 'lexical';
import { MutableRefObject } from 'react';
declare class MenuOption {
key: string;
ref?: MutableRefObject<HTMLElement | null>;
constructor(key: string);
setRefElement(element: HTMLElement | null): void;
}
declare class NodeContextMenuOption extends MenuOption {
type: string;
title: string;
icon: JSX.Element | null;
disabled: boolean;
$onSelect: () => void;
$showOn?: (node: LexicalNode) => boolean;
constructor(title: string, options: {
disabled?: boolean;
icon?: JSX.Element;
$onSelect: () => void;
$showOn?: (node: LexicalNode) => boolean;
});
}
declare class NodeContextMenuSeparator extends MenuOption {
type: string;
$showOn?: (node: LexicalNode) => boolean;
constructor(options?: {
$showOn?: (node: LexicalNode) => boolean;
});
}
type ContextMenuType = NodeContextMenuOption | NodeContextMenuSeparator;
interface Props {
label?: string;
nested?: boolean;
itemClassName?: string;
separatorClassName?: string;
items: ContextMenuType[];
}
declare const NodeContextMenuPlugin: import("react").ForwardRefExoticComponent<Omit<Props & import("react").HTMLProps<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
export { NodeContextMenuOption, NodeContextMenuPlugin, NodeContextMenuSeparator };
@@ -0,0 +1,12 @@
import type { Locale } from "./types.js";
/**
* @category Locales
* @summary Indonesian locale.
* @language Indonesian
* @iso-639-2 ind
* @author Rahmat Budiharso [@rbudiharso](https://github.com/rbudiharso)
* @author Benget Nata [@bentinata](https://github.com/bentinata)
* @author Budi Irawan [@deerawan](https://github.com/deerawan)
* @author Try Ajitiono [@imballinst](https://github.com/imballinst)
*/
export declare const id: Locale;
@@ -0,0 +1,193 @@
'use strict'
const bench = require('fastbench')
const pino = require('../')
const bunyan = require('bunyan')
const bole = require('bole')('bench')
const winston = require('winston')
const fs = require('node:fs')
const dest = fs.createWriteStream('/dev/null')
const plogNodeStream = pino(dest)
delete require.cache[require.resolve('../')]
const plogDest = require('../')(pino.destination('/dev/null'))
delete require.cache[require.resolve('../')]
const plogMinLength = require('../')(pino.destination({ dest: '/dev/null', sync: false, minLength: 4096 }))
delete require.cache[require.resolve('../')]
const deep = require('../package.json')
deep.deep = Object.assign({}, JSON.parse(JSON.stringify(deep)))
deep.deep.deep = Object.assign({}, JSON.parse(JSON.stringify(deep)))
deep.deep.deep.deep = Object.assign({}, JSON.parse(JSON.stringify(deep)))
const blog = bunyan.createLogger({
name: 'myapp',
streams: [{
level: 'trace',
stream: dest
}]
})
require('bole').output({
level: 'info',
stream: dest
}).setFastTime(true)
const chill = winston.createLogger({
transports: [
new winston.transports.Stream({
stream: fs.createWriteStream('/dev/null')
})
]
})
const max = 10
const run = bench([
function benchBunyanInterpolate (cb) {
for (var i = 0; i < max; i++) {
blog.info('hello %s', 'world')
}
setImmediate(cb)
},
function benchWinstonInterpolate (cb) {
for (var i = 0; i < max; i++) {
chill.log('info', 'hello %s', 'world')
}
setImmediate(cb)
},
function benchBoleInterpolate (cb) {
for (var i = 0; i < max; i++) {
bole.info('hello %s', 'world')
}
setImmediate(cb)
},
function benchPinoInterpolate (cb) {
for (var i = 0; i < max; i++) {
plogDest.info('hello %s', 'world')
}
setImmediate(cb)
},
function benchPinoMinLengthInterpolate (cb) {
for (var i = 0; i < max; i++) {
plogMinLength.info('hello %s', 'world')
}
setImmediate(cb)
},
function benchPinoNodeStreamInterpolate (cb) {
for (var i = 0; i < max; i++) {
plogNodeStream.info('hello %s', 'world')
}
setImmediate(cb)
},
function benchBunyanInterpolateAll (cb) {
for (var i = 0; i < max; i++) {
blog.info('hello %s %j %d', 'world', { obj: true }, 4)
}
setImmediate(cb)
},
function benchWinstonInterpolateAll (cb) {
for (var i = 0; i < max; i++) {
chill.log('info', 'hello %s %j %d', 'world', { obj: true }, 4)
}
setImmediate(cb)
},
function benchBoleInterpolateAll (cb) {
for (var i = 0; i < max; i++) {
bole.info('hello %s %j %d', 'world', { obj: true }, 4)
}
setImmediate(cb)
},
function benchPinoInterpolateAll (cb) {
for (var i = 0; i < max; i++) {
plogDest.info('hello %s %j %d', 'world', { obj: true }, 4)
}
setImmediate(cb)
},
function benchPinoMinLengthInterpolateAll (cb) {
for (var i = 0; i < max; i++) {
plogMinLength.info('hello %s %j %d', 'world', { obj: true }, 4)
}
setImmediate(cb)
},
function benchPinoNodeStreamInterpolateAll (cb) {
for (var i = 0; i < max; i++) {
plogNodeStream.info('hello %s %j %d', 'world', { obj: true }, 4)
}
setImmediate(cb)
},
function benchBunyanInterpolateExtra (cb) {
for (var i = 0; i < max; i++) {
blog.info('hello %s %j %d', 'world', { obj: true }, 4, { another: 'obj' })
}
setImmediate(cb)
},
function benchWinstonInterpolateExtra (cb) {
for (var i = 0; i < max; i++) {
chill.log('info', 'hello %s %j %d', 'world', { obj: true }, 4, { another: 'obj' })
}
setImmediate(cb)
},
function benchBoleInterpolateExtra (cb) {
for (var i = 0; i < max; i++) {
bole.info('hello %s %j %d', 'world', { obj: true }, 4, { another: 'obj' })
}
setImmediate(cb)
},
function benchPinoInterpolateExtra (cb) {
for (var i = 0; i < max; i++) {
plogDest.info('hello %s %j %d', 'world', { obj: true }, 4, { another: 'obj' })
}
setImmediate(cb)
},
function benchPinoMinLengthInterpolateExtra (cb) {
for (var i = 0; i < max; i++) {
plogMinLength.info('hello %s %j %d', 'world', { obj: true }, 4, { another: 'obj' })
}
setImmediate(cb)
},
function benchPinoNodeStreamInterpolateExtra (cb) {
for (var i = 0; i < max; i++) {
plogNodeStream.info('hello %s %j %d', 'world', { obj: true }, 4, { another: 'obj' })
}
setImmediate(cb)
},
function benchBunyanInterpolateDeep (cb) {
for (var i = 0; i < max; i++) {
blog.info('hello %j', deep)
}
setImmediate(cb)
},
function benchWinstonInterpolateDeep (cb) {
for (var i = 0; i < max; i++) {
chill.log('info', 'hello %j', deep)
}
setImmediate(cb)
},
function benchBoleInterpolateDeep (cb) {
for (var i = 0; i < max; i++) {
bole.info('hello %j', deep)
}
setImmediate(cb)
},
function benchPinoInterpolateDeep (cb) {
for (var i = 0; i < max; i++) {
plogDest.info('hello %j', deep)
}
setImmediate(cb)
},
function benchPinoMinLengthInterpolateDeep (cb) {
for (var i = 0; i < max; i++) {
plogMinLength.info('hello %j', deep)
}
setImmediate(cb)
},
function benchPinoNodeStreamInterpolateDeep (cb) {
for (var i = 0; i < max; i++) {
plogNodeStream.info('hello %j', deep)
}
setImmediate(cb)
}
], 10000)
run(run)
@@ -0,0 +1,3 @@
export * from "./expressions/index.js";
export * from "./functions/index.js";
export * from "./sql.js";
@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/mysql-core/columns/boolean.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyMySqlTable } from '~/mysql-core/table.ts';\nimport { MySqlColumn, MySqlColumnBuilder } from './common.ts';\n\nexport type MySqlBooleanBuilderInitial<TName extends string> = MySqlBooleanBuilder<{\n\tname: TName;\n\tdataType: 'boolean';\n\tcolumnType: 'MySqlBoolean';\n\tdata: boolean;\n\tdriverParam: number | boolean;\n\tenumValues: undefined;\n}>;\n\nexport class MySqlBooleanBuilder<T extends ColumnBuilderBaseConfig<'boolean', 'MySqlBoolean'>>\n\textends MySqlColumnBuilder<T>\n{\n\tstatic override readonly [entityKind]: string = 'MySqlBooleanBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'boolean', 'MySqlBoolean');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyMySqlTable<{ name: TTableName }>,\n\t): MySqlBoolean<MakeColumnConfig<T, TTableName>> {\n\t\treturn new MySqlBoolean<MakeColumnConfig<T, TTableName>>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class MySqlBoolean<T extends ColumnBaseConfig<'boolean', 'MySqlBoolean'>> extends MySqlColumn<T> {\n\tstatic override readonly [entityKind]: string = 'MySqlBoolean';\n\n\tgetSQLType(): string {\n\t\treturn 'boolean';\n\t}\n\n\toverride mapFromDriverValue(value: number | boolean): boolean {\n\t\tif (typeof value === 'boolean') {\n\t\t\treturn value;\n\t\t}\n\t\treturn value === 1;\n\t}\n}\n\nexport function boolean(): MySqlBooleanBuilderInitial<''>;\nexport function boolean<TName extends string>(name: TName): MySqlBooleanBuilderInitial<TName>;\nexport function boolean(name?: string) {\n\treturn new MySqlBooleanBuilder(name ?? '');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,oBAAgD;AAWzC,MAAM,4BACJ,iCACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,WAAW,cAAc;AAAA,EACtC;AAAA;AAAA,EAGS,MACR,OACgD;AAChD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,qBAA4E,0BAAe;AAAA,EACvG,QAA0B,wBAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AAAA,EAES,mBAAmB,OAAkC;AAC7D,QAAI,OAAO,UAAU,WAAW;AAC/B,aAAO;AAAA,IACR;AACA,WAAO,UAAU;AAAA,EAClB;AACD;AAIO,SAAS,QAAQ,MAAe;AACtC,SAAO,IAAI,oBAAoB,QAAQ,EAAE;AAC1C;","names":[]}
@@ -0,0 +1,172 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _t = require("@babel/types");
var _t2 = _t;
const {
react
} = _t;
const {
cloneNode,
jsxExpressionContainer,
variableDeclaration,
variableDeclarator
} = _t2;
const referenceVisitor = {
ReferencedIdentifier(path, state) {
if (path.isJSXIdentifier() && react.isCompatTag(path.node.name) && !path.parentPath.isJSXMemberExpression()) {
return;
}
if (path.node.name === "this") {
let scope = path.scope;
do {
if (scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) {
break;
}
} while (scope = scope.parent);
if (scope) state.breakOnScopePaths.push(scope.path);
}
const binding = path.scope.getBinding(path.node.name);
if (!binding) return;
for (const violation of binding.constantViolations) {
if (violation.scope !== binding.path.scope) {
state.mutableBinding = true;
path.stop();
return;
}
}
if (binding !== state.scope.getBinding(path.node.name)) return;
state.bindings[path.node.name] = binding;
}
};
class PathHoister {
constructor(path, scope) {
this.breakOnScopePaths = void 0;
this.bindings = void 0;
this.mutableBinding = void 0;
this.scopes = void 0;
this.scope = void 0;
this.path = void 0;
this.attachAfter = void 0;
this.breakOnScopePaths = [];
this.bindings = {};
this.mutableBinding = false;
this.scopes = [];
this.scope = scope;
this.path = path;
this.attachAfter = false;
}
isCompatibleScope(scope) {
for (const key of Object.keys(this.bindings)) {
const binding = this.bindings[key];
if (!scope.bindingIdentifierEquals(key, binding.identifier)) {
return false;
}
}
return true;
}
getCompatibleScopes() {
let scope = this.path.scope;
do {
if (this.isCompatibleScope(scope)) {
this.scopes.push(scope);
} else {
break;
}
if (this.breakOnScopePaths.includes(scope.path)) {
break;
}
} while (scope = scope.parent);
}
getAttachmentPath() {
let path = this._getAttachmentPath();
if (!path) return;
let targetScope = path.scope;
if (targetScope.path === path) {
targetScope = path.scope.parent;
}
if (targetScope.path.isProgram() || targetScope.path.isFunction()) {
for (const name of Object.keys(this.bindings)) {
if (!targetScope.hasOwnBinding(name)) continue;
const binding = this.bindings[name];
if (binding.kind === "param" || binding.path.parentKey === "params") {
continue;
}
const bindingParentPath = this.getAttachmentParentForPath(binding.path);
if (bindingParentPath.key >= path.key) {
this.attachAfter = true;
path = binding.path;
for (const violationPath of binding.constantViolations) {
if (this.getAttachmentParentForPath(violationPath).key > path.key) {
path = violationPath;
}
}
}
}
}
return path;
}
_getAttachmentPath() {
const scopes = this.scopes;
const scope = scopes.pop();
if (!scope) return;
if (scope.path.isFunction()) {
if (this.hasOwnParamBindings(scope)) {
if (this.scope === scope) return;
const bodies = scope.path.get("body").get("body");
for (let i = 0; i < bodies.length; i++) {
if (bodies[i].node._blockHoist) continue;
return bodies[i];
}
} else {
return this.getNextScopeAttachmentParent();
}
} else if (scope.path.isProgram()) {
return this.getNextScopeAttachmentParent();
}
}
getNextScopeAttachmentParent() {
const scope = this.scopes.pop();
if (scope) return this.getAttachmentParentForPath(scope.path);
}
getAttachmentParentForPath(path) {
do {
if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
return path;
}
} while (path = path.parentPath);
return path;
}
hasOwnParamBindings(scope) {
for (const name of Object.keys(this.bindings)) {
if (!scope.hasOwnBinding(name)) continue;
const binding = this.bindings[name];
if (binding.kind === "param" && binding.constant) return true;
}
return false;
}
run() {
this.path.traverse(referenceVisitor, this);
if (this.mutableBinding) return;
this.getCompatibleScopes();
const attachTo = this.getAttachmentPath();
if (!attachTo) return;
if (attachTo.getFunctionParent() === this.path.getFunctionParent()) return;
let uid = attachTo.scope.generateUidIdentifier("ref");
const declarator = variableDeclarator(uid, this.path.node);
const insertFn = this.attachAfter ? "insertAfter" : "insertBefore";
const [attached] = attachTo[insertFn]([attachTo.isVariableDeclarator() ? declarator : variableDeclaration("var", [declarator])]);
const parent = this.path.parentPath;
if (parent.isJSXElement() && this.path.container === parent.node.children) {
uid = jsxExpressionContainer(uid);
}
this.path.replaceWith(cloneNode(uid));
return attached.isVariableDeclarator() ? attached.get("init") : attached.get("declarations.0.init");
}
}
exports.default = PathHoister;
//# sourceMappingURL=hoister.js.map
@@ -0,0 +1,30 @@
import { ComponentLoggerOptions, DiagLogFunction, DiagLogger, DiagLoggerApi } from '../diag/types';
/**
* Singleton object which represents the entry point to the OpenTelemetry internal
* diagnostic API
*/
export declare class DiagAPI implements DiagLogger, DiagLoggerApi {
private static _instance?;
/** Get the singleton instance of the DiagAPI API */
static instance(): DiagAPI;
/**
* Private internal constructor
* @private
*/
private constructor();
setLogger: DiagLoggerApi['setLogger'];
/**
*
*/
createComponentLogger: (options: ComponentLoggerOptions) => DiagLogger;
verbose: DiagLogFunction;
debug: DiagLogFunction;
info: DiagLogFunction;
warn: DiagLogFunction;
error: DiagLogFunction;
/**
* Unregister the global logger and return to Noop
*/
disable: () => void;
}
//# sourceMappingURL=diag.d.ts.map
@@ -0,0 +1 @@
{"version":3,"sources":["../src/subquery.ts"],"sourcesContent":["import { entityKind } from './entity.ts';\nimport type { SQL, SQLWrapper } from './sql/sql.ts';\n\nexport interface Subquery<\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTAlias extends string = string,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTSelectedFields extends Record<string, unknown> = Record<string, unknown>,\n> extends SQLWrapper {\n\t// SQLWrapper runtime implementation is defined in 'sql/sql.ts'\n}\nexport class Subquery<\n\tTAlias extends string = string,\n\tTSelectedFields extends Record<string, unknown> = Record<string, unknown>,\n> implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'Subquery';\n\n\tdeclare _: {\n\t\tbrand: 'Subquery';\n\t\tsql: SQL;\n\t\tselectedFields: TSelectedFields;\n\t\talias: TAlias;\n\t\tisWith: boolean;\n\t\tusedTables?: string[];\n\t};\n\n\tconstructor(sql: SQL, fields: TSelectedFields, alias: string, isWith = false, usedTables: string[] = []) {\n\t\tthis._ = {\n\t\t\tbrand: 'Subquery',\n\t\t\tsql,\n\t\t\tselectedFields: fields as TSelectedFields,\n\t\t\talias: alias as TAlias,\n\t\t\tisWith,\n\t\t\tusedTables,\n\t\t};\n\t}\n\n\t// getSQL(): SQL<unknown> {\n\t// \treturn new SQL([this]);\n\t// }\n}\n\nexport class WithSubquery<\n\tTAlias extends string = string,\n\tTSelection extends Record<string, unknown> = Record<string, unknown>,\n> extends Subquery<TAlias, TSelection> {\n\tstatic override readonly [entityKind]: string = 'WithSubquery';\n}\n\nexport type WithSubqueryWithoutSelection<TAlias extends string> = WithSubquery<TAlias, {}>;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA2B;AAWpB,MAAM,SAGW;AAAA,EACvB,QAAiB,wBAAU,IAAY;AAAA,EAWvC,YAAY,KAAU,QAAyB,OAAe,SAAS,OAAO,aAAuB,CAAC,GAAG;AACxG,SAAK,IAAI;AAAA,MACR,OAAO;AAAA,MACP;AAAA,MACA,gBAAgB;AAAA,MAChB;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,EACD;AAAA;AAAA;AAAA;AAKD;AAEO,MAAM,qBAGH,SAA6B;AAAA,EACtC,QAA0B,wBAAU,IAAY;AACjD;","names":[]}
@@ -0,0 +1,60 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var integer_exports = {};
__export(integer_exports, {
PgInteger: () => PgInteger,
PgIntegerBuilder: () => PgIntegerBuilder,
integer: () => integer
});
module.exports = __toCommonJS(integer_exports);
var import_entity = require("../../entity.cjs");
var import_common = require("./common.cjs");
var import_int_common = require("./int.common.cjs");
class PgIntegerBuilder extends import_int_common.PgIntColumnBaseBuilder {
static [import_entity.entityKind] = "PgIntegerBuilder";
constructor(name) {
super(name, "number", "PgInteger");
}
/** @internal */
build(table) {
return new PgInteger(table, this.config);
}
}
class PgInteger extends import_common.PgColumn {
static [import_entity.entityKind] = "PgInteger";
getSQLType() {
return "integer";
}
mapFromDriverValue(value) {
if (typeof value === "string") {
return Number.parseInt(value);
}
return value;
}
}
function integer(name) {
return new PgIntegerBuilder(name ?? "");
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
PgInteger,
PgIntegerBuilder,
integer
});
//# sourceMappingURL=integer.cjs.map
@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["toWords","React","Fragment","QueryPresetsAccessCell","cellData","operations","_jsx","reduce","acc","operation","index","operationData","constraint","push","_jsxs","length"],"sources":["../../../../../src/elements/QueryPresets/cells/AccessCell/index.tsx"],"sourcesContent":["import type { DefaultCellComponentProps } from 'payload'\nimport type { JSX } from 'react'\n\nimport { toWords } from 'payload/shared'\nimport React, { Fragment } from 'react'\n\nexport const QueryPresetsAccessCell: React.FC<DefaultCellComponentProps> = ({ cellData }) => {\n // first sort the operations in the order they should be displayed\n const operations = ['read', 'update', 'delete']\n\n return (\n <p>\n {operations.reduce((acc, operation, index) => {\n const operationData = (cellData as JSON)?.[operation]\n\n if (operationData && operationData.constraint) {\n acc.push(\n <Fragment key={operation}>\n <span>\n <strong>{toWords(operation)}</strong>: {toWords(operationData.constraint)}\n </span>\n {index !== operations.length - 1 && ', '}\n </Fragment>,\n )\n }\n return acc\n }, [] as JSX.Element[])}\n </p>\n )\n}\n"],"mappings":";AAGA,SAASA,OAAO,QAAQ;AACxB,OAAOC,KAAA,IAASC,QAAQ,QAAQ;AAEhC,OAAO,MAAMC,sBAAA,GAA8DA,CAAC;EAAEC;AAAQ,CAAE;EACtF;EACA,MAAMC,UAAA,GAAa,CAAC,QAAQ,UAAU,SAAS;EAE/C,oBACEC,IAAA,CAAC;cACED,UAAA,CAAWE,MAAM,CAAC,CAACC,GAAA,EAAKC,SAAA,EAAWC,KAAA;MAClC,MAAMC,aAAA,GAAiBP,QAAA,GAAoBK,SAAA,CAAU;MAErD,IAAIE,aAAA,IAAiBA,aAAA,CAAcC,UAAU,EAAE;QAC7CJ,GAAA,CAAIK,IAAI,cACNC,KAAA,CAACZ,QAAA;kCACCY,KAAA,CAAC;oCACCR,IAAA,CAAC;wBAAQN,OAAA,CAAQS,SAAA;gBAAoB,MAAGT,OAAA,CAAQW,aAAA,CAAcC,UAAU;cAEzEF,KAAA,KAAUL,UAAA,CAAWU,MAAM,GAAG,KAAK;WAJvBN,SAAA;MAOnB;MACA,OAAOD,GAAA;IACT,GAAG,EAAE;;AAGX","ignoreList":[]}
@@ -0,0 +1,195 @@
import { $constructor } from "./core.js";
import * as util from "./util.js";
const initializer = (inst, def) => {
inst.name = "$ZodError";
Object.defineProperty(inst, "_zod", {
value: inst._zod,
enumerable: false,
});
Object.defineProperty(inst, "issues", {
value: def,
enumerable: false,
});
Object.defineProperty(inst, "message", {
get() {
return JSON.stringify(def, util.jsonStringifyReplacer, 2);
},
enumerable: true,
// configurable: false,
});
Object.defineProperty(inst, "toString", {
value: () => inst.message,
enumerable: false,
});
};
export const $ZodError = $constructor("$ZodError", initializer);
export const $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
export function flattenError(error, mapper = (issue) => issue.message) {
const fieldErrors = {};
const formErrors = [];
for (const sub of error.issues) {
if (sub.path.length > 0) {
fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
fieldErrors[sub.path[0]].push(mapper(sub));
}
else {
formErrors.push(mapper(sub));
}
}
return { formErrors, fieldErrors };
}
export function formatError(error, _mapper) {
const mapper = _mapper ||
function (issue) {
return issue.message;
};
const fieldErrors = { _errors: [] };
const processError = (error) => {
for (const issue of error.issues) {
if (issue.code === "invalid_union" && issue.errors.length) {
issue.errors.map((issues) => processError({ issues }));
}
else if (issue.code === "invalid_key") {
processError({ issues: issue.issues });
}
else if (issue.code === "invalid_element") {
processError({ issues: issue.issues });
}
else if (issue.path.length === 0) {
fieldErrors._errors.push(mapper(issue));
}
else {
let curr = fieldErrors;
let i = 0;
while (i < issue.path.length) {
const el = issue.path[i];
const terminal = i === issue.path.length - 1;
if (!terminal) {
curr[el] = curr[el] || { _errors: [] };
}
else {
curr[el] = curr[el] || { _errors: [] };
curr[el]._errors.push(mapper(issue));
}
curr = curr[el];
i++;
}
}
}
};
processError(error);
return fieldErrors;
}
export function treeifyError(error, _mapper) {
const mapper = _mapper ||
function (issue) {
return issue.message;
};
const result = { errors: [] };
const processError = (error, path = []) => {
var _a, _b;
for (const issue of error.issues) {
if (issue.code === "invalid_union" && issue.errors.length) {
// regular union error
issue.errors.map((issues) => processError({ issues }, issue.path));
}
else if (issue.code === "invalid_key") {
processError({ issues: issue.issues }, issue.path);
}
else if (issue.code === "invalid_element") {
processError({ issues: issue.issues }, issue.path);
}
else {
const fullpath = [...path, ...issue.path];
if (fullpath.length === 0) {
result.errors.push(mapper(issue));
continue;
}
let curr = result;
let i = 0;
while (i < fullpath.length) {
const el = fullpath[i];
const terminal = i === fullpath.length - 1;
if (typeof el === "string") {
curr.properties ?? (curr.properties = {});
(_a = curr.properties)[el] ?? (_a[el] = { errors: [] });
curr = curr.properties[el];
}
else {
curr.items ?? (curr.items = []);
(_b = curr.items)[el] ?? (_b[el] = { errors: [] });
curr = curr.items[el];
}
if (terminal) {
curr.errors.push(mapper(issue));
}
i++;
}
}
}
};
processError(error);
return result;
}
/** Format a ZodError as a human-readable string in the following form.
*
* From
*
* ```ts
* ZodError {
* issues: [
* {
* expected: 'string',
* code: 'invalid_type',
* path: [ 'username' ],
* message: 'Invalid input: expected string'
* },
* {
* expected: 'number',
* code: 'invalid_type',
* path: [ 'favoriteNumbers', 1 ],
* message: 'Invalid input: expected number'
* }
* ];
* }
* ```
*
* to
*
* ```
* username
* ✖ Expected number, received string at "username
* favoriteNumbers[0]
* ✖ Invalid input: expected number
* ```
*/
export function toDotPath(path) {
const segs = [];
for (const seg of path) {
if (typeof seg === "number")
segs.push(`[${seg}]`);
else if (typeof seg === "symbol")
segs.push(`[${JSON.stringify(String(seg))}]`);
else if (/[^\w$]/.test(seg))
segs.push(`[${JSON.stringify(seg)}]`);
else {
if (segs.length)
segs.push(".");
segs.push(seg);
}
}
return segs.join("");
}
export function prettifyError(error) {
const lines = [];
// sort by path length
const issues = [...error.issues].sort((a, b) => a.path.length - b.path.length);
// Process each issue
for (const issue of issues) {
lines.push(`✖ ${issue.message}`);
if (issue.path?.length)
lines.push(` → at ${toDotPath(issue.path)}`);
}
// Convert Map to formatted string
return lines.join("\n");
}
@@ -0,0 +1,16 @@
import { TracerProvider } from '@opentelemetry/api';
import { InstrumentationBase, InstrumentationConfig, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
export interface PrismaInstrumentationConfig {
ignoreSpanTypes?: (string | RegExp)[];
}
type Config = PrismaInstrumentationConfig & InstrumentationConfig;
export declare class PrismaInstrumentation extends InstrumentationBase {
private tracerProvider;
constructor(config?: Config);
setTracerProvider(tracerProvider: TracerProvider): void;
init(): InstrumentationNodeModuleDefinition[];
enable(): void;
disable(): void;
isEnabled(): boolean;
}
export {};
@@ -0,0 +1,55 @@
# Blue Oak Model License
Version 1.0.0
## Purpose
This license gives everyone as much permission to work with
this software as possible, while protecting contributors
from liability.
## Acceptance
In order to receive this license, you must agree to its
rules. The rules of this license are both obligations
under that agreement and conditions to your license.
You must not do anything with this software that triggers
a rule that you cannot or will not follow.
## Copyright
Each contributor licenses you to do everything with this
software that would otherwise infringe that contributor's
copyright in it.
## Notices
You must ensure that everyone who gets a copy of
any part of this software from you, with or without
changes, also gets the text of this license or a link to
<https://blueoakcouncil.org/license/1.0.0>.
## Excuse
If anyone notifies you in writing that you have not
complied with [Notices](#notices), you can keep your
license by taking all practical steps to comply within 30
days after the notice. If you do not do so, your license
ends immediately.
## Patent
Each contributor licenses you to do everything with this
software that would otherwise infringe any patent claims
they can license or become able to license.
## Reliability
No contributor can revoke this license.
## No Liability
**_As far as the law allows, this software comes as is,
without any warranty or condition, and no contributor
will be liable to anyone for any damages related to this
software or this license, under any kind of legal claim._**
@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.unreleasedLabels = exports.browserNameMap = void 0;
const unreleasedLabels = exports.unreleasedLabels = {
safari: "tp"
};
const browserNameMap = exports.browserNameMap = {
and_chr: "chrome",
and_ff: "firefox",
android: "android",
chrome: "chrome",
edge: "edge",
firefox: "firefox",
ie: "ie",
ie_mob: "ie",
ios_saf: "ios",
node: "node",
deno: "deno",
op_mob: "opera_mobile",
opera: "opera",
safari: "safari",
samsung: "samsung"
};
//# sourceMappingURL=targets.js.map
@@ -0,0 +1,146 @@
import { jsx as _jsx } from "react/jsx-runtime";
import { getTranslation } from '@payloadcms/translations';
import { useRouter, useSearchParams } from 'next/navigation.js';
import { combineWhereConstraints, formatAdminURL, mergeListSearchAndWhere } from 'payload/shared';
import * as qs from 'qs-esm';
import React, { useCallback } from 'react';
import { toast } from 'sonner';
import { useConfig } from '../../providers/Config/index.js';
import { useLocale } from '../../providers/Locale/index.js';
import { useRouteCache } from '../../providers/RouteCache/index.js';
import { useTranslation } from '../../providers/Translation/index.js';
import { requests } from '../../utilities/api.js';
import { parseSearchParams } from '../../utilities/parseSearchParams.js';
import { ConfirmationModal } from '../ConfirmationModal/index.js';
export function UnpublishManyDrawerContent(props) {
const {
collection,
collection: {
slug,
labels: {
plural,
singular
}
} = {},
drawerSlug,
ids,
onSuccess,
selectAll,
where
} = props;
const {
config: {
routes: {
api
}
}
} = useConfig();
const {
code: locale
} = useLocale();
const {
i18n,
t
} = useTranslation();
const searchParams = useSearchParams();
const router = useRouter();
const {
clearRouteCache
} = useRouteCache();
const addDefaultError = useCallback(() => {
toast.error(t('error:unknown'));
}, [t]);
const queryString = React.useMemo(() => {
const whereConstraints = [{
_status: {
not_equals: 'draft'
}
}];
if (where) {
whereConstraints.push(where);
}
const queryWithSearch = mergeListSearchAndWhere({
collectionConfig: collection,
search: searchParams.get('search')
});
if (queryWithSearch) {
whereConstraints.push(queryWithSearch);
}
if (!selectAll) {
// If we're not selecting all, we need to select specific docs
whereConstraints.push({
id: {
in: ids || []
}
});
}
return qs.stringify({
locale,
select: {},
where: combineWhereConstraints(whereConstraints)
}, {
addQueryPrefix: true
});
}, [collection, searchParams, selectAll, ids, locale, where]);
const handleUnpublish = useCallback(async () => {
const url = formatAdminURL({
apiRoute: api,
path: `/${slug}${queryString}`
});
await requests.patch(url, {
body: JSON.stringify({
_status: 'draft'
}),
headers: {
'Accept-Language': i18n.language,
'Content-Type': 'application/json'
}
}).then(async res => {
try {
const json = await res.json();
const deletedDocs = json?.docs.length || 0;
const successLabel = deletedDocs > 1 ? plural : singular;
if (res.status < 400 || deletedDocs > 0) {
toast.success(t('general:updatedCountSuccessfully', {
count: deletedDocs,
label: getTranslation(successLabel, i18n)
}));
if (json?.errors.length > 0) {
toast.error(json.message, {
description: json.errors.map(error => error.message).join('\n')
});
}
router.replace(qs.stringify({
...parseSearchParams(searchParams),
page: selectAll ? '1' : undefined
}, {
addQueryPrefix: true
}));
clearRouteCache();
if (typeof onSuccess === 'function') {
onSuccess();
}
return null;
}
if (json.errors) {
json.errors.forEach(error => toast.error(error.message));
} else {
addDefaultError();
}
return false;
} catch (_err) {
return addDefaultError();
}
});
}, [api, slug, queryString, i18n, plural, singular, t, router, searchParams, selectAll, clearRouteCache, addDefaultError, onSuccess]);
return /*#__PURE__*/_jsx(ConfirmationModal, {
body: t('version:aboutToUnpublishSelection', {
label: getTranslation(plural, i18n)
}),
confirmingLabel: t('version:unpublishing'),
heading: t('version:confirmUnpublish'),
modalSlug: drawerSlug,
onConfirm: handleUnpublish
});
}
//# sourceMappingURL=DrawerContent.js.map
@@ -0,0 +1,25 @@
var isObjectLike = require('./isObjectLike'),
isPlainObject = require('./isPlainObject');
/**
* Checks if `value` is likely a DOM element.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
* @example
*
* _.isElement(document.body);
* // => true
*
* _.isElement('<body>');
* // => false
*/
function isElement(value) {
return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
}
module.exports = isElement;
@@ -0,0 +1,43 @@
import { startOfISOWeek } from "../../../startOfISOWeek.js";
import { constructFrom } from "../../../constructFrom.js";
import { Parser } from "../Parser.js";
import { parseNDigitsSigned } from "../utils.js";
// ISO week-numbering year
export class ISOWeekYearParser extends Parser {
priority = 130;
parse(dateString, token) {
if (token === "R") {
return parseNDigitsSigned(4, dateString);
}
return parseNDigitsSigned(token.length, dateString);
}
set(date, _flags, value) {
const firstWeekOfYear = constructFrom(date, 0);
firstWeekOfYear.setFullYear(value, 0, 4);
firstWeekOfYear.setHours(0, 0, 0, 0);
return startOfISOWeek(firstWeekOfYear);
}
incompatibleTokens = [
"G",
"y",
"Y",
"u",
"Q",
"q",
"M",
"L",
"w",
"d",
"D",
"e",
"c",
"t",
"T",
];
}
@@ -0,0 +1,7 @@
/**
* Returns one or all computed style properties of an element.
*
* @param node the element
* @param psuedoElement the style property
*/
export default function getComputedStyle(node: HTMLElement, psuedoElement?: string): CSSStyleDeclaration;
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/utilities/toKebabCase.ts"],"sourcesContent":["export const toKebabCase = (string?: string) =>\n string\n ?.replace(/([a-z])([A-Z])/g, '$1-$2')\n .replace(/\\s+/g, '-')\n .toLowerCase()\n"],"names":["toKebabCase","string","replace","toLowerCase"],"mappings":"AAAA,OAAO,MAAMA,cAAc,CAACC,SAC1BA,QACIC,QAAQ,mBAAmB,SAC5BA,QAAQ,QAAQ,KAChBC,cAAa"}
@@ -0,0 +1,136 @@
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
import _inheritsLoose from "@babel/runtime/helpers/esm/inheritsLoose";
import PropTypes from 'prop-types';
import React from 'react';
import ReactDOM from 'react-dom';
import TransitionGroup from './TransitionGroup';
/**
* The `<ReplaceTransition>` component is a specialized `Transition` component
* that animates between two children.
*
* ```jsx
* <ReplaceTransition in>
* <Fade><div>I appear first</div></Fade>
* <Fade><div>I replace the above</div></Fade>
* </ReplaceTransition>
* ```
*/
var ReplaceTransition = /*#__PURE__*/function (_React$Component) {
_inheritsLoose(ReplaceTransition, _React$Component);
function ReplaceTransition() {
var _this;
for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
_args[_key] = arguments[_key];
}
_this = _React$Component.call.apply(_React$Component, [this].concat(_args)) || this;
_this.handleEnter = function () {
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
return _this.handleLifecycle('onEnter', 0, args);
};
_this.handleEntering = function () {
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
args[_key3] = arguments[_key3];
}
return _this.handleLifecycle('onEntering', 0, args);
};
_this.handleEntered = function () {
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
args[_key4] = arguments[_key4];
}
return _this.handleLifecycle('onEntered', 0, args);
};
_this.handleExit = function () {
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
args[_key5] = arguments[_key5];
}
return _this.handleLifecycle('onExit', 1, args);
};
_this.handleExiting = function () {
for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
args[_key6] = arguments[_key6];
}
return _this.handleLifecycle('onExiting', 1, args);
};
_this.handleExited = function () {
for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
args[_key7] = arguments[_key7];
}
return _this.handleLifecycle('onExited', 1, args);
};
return _this;
}
var _proto = ReplaceTransition.prototype;
_proto.handleLifecycle = function handleLifecycle(handler, idx, originalArgs) {
var _child$props;
var children = this.props.children;
var child = React.Children.toArray(children)[idx];
if (child.props[handler]) (_child$props = child.props)[handler].apply(_child$props, originalArgs);
if (this.props[handler]) {
var maybeNode = child.props.nodeRef ? undefined : ReactDOM.findDOMNode(this);
this.props[handler](maybeNode);
}
};
_proto.render = function render() {
var _this$props = this.props,
children = _this$props.children,
inProp = _this$props.in,
props = _objectWithoutPropertiesLoose(_this$props, ["children", "in"]);
var _React$Children$toArr = React.Children.toArray(children),
first = _React$Children$toArr[0],
second = _React$Children$toArr[1];
delete props.onEnter;
delete props.onEntering;
delete props.onEntered;
delete props.onExit;
delete props.onExiting;
delete props.onExited;
return /*#__PURE__*/React.createElement(TransitionGroup, props, inProp ? React.cloneElement(first, {
key: 'first',
onEnter: this.handleEnter,
onEntering: this.handleEntering,
onEntered: this.handleEntered
}) : React.cloneElement(second, {
key: 'second',
onEnter: this.handleExit,
onEntering: this.handleExiting,
onEntered: this.handleExited
}));
};
return ReplaceTransition;
}(React.Component);
ReplaceTransition.propTypes = process.env.NODE_ENV !== "production" ? {
in: PropTypes.bool.isRequired,
children: function children(props, propName) {
if (React.Children.count(props[propName]) !== 2) return new Error("\"" + propName + "\" must be exactly two transition components.");
return null;
}
} : {};
export default ReplaceTransition;
@@ -0,0 +1,6 @@
import type { GenerateEditViewMetadata } from '../Document/getMetaBySegment.js';
/**
* @todo Remove the `MetaConfig` type assertions. They are currently required because of how the `Metadata` type from `next` consumes the `URL` type.
*/
export declare const generateVersionViewMetadata: GenerateEditViewMetadata;
//# sourceMappingURL=metadata.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"document-cloner.js","sourceRoot":"","sources":["../../../../src/dom/__mocks__/document-cloner.ts"],"names":[],"mappings":";;;AAAA;IAGI;QACI,IAAI,CAAC,sBAAsB,GAAG;YAC1B,aAAa,EAAE;gBACX,WAAW,EAAE;oBACT,WAAW,EAAE,EAAE;oBACf,WAAW,EAAE,EAAE;iBAClB;aACJ;SACW,CAAC;IACrB,CAAC;IAED,iCAAQ,GAAR;QACI,OAAO,OAAO,CAAC,OAAO,CAAC,EAAuB,CAAC,CAAC;IACpD,CAAC;IAEM,sBAAO,GAAd;QACI,OAAO,IAAI,CAAC;IAChB,CAAC;IACL,qBAAC;AAAD,CAAC,AArBD,IAqBC;AArBY,wCAAc"}
@@ -0,0 +1 @@
{"version":3,"file":"symbols.js","sourceRoot":"","sources":["../../src/symbols.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEU,QAAA,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;AAE1D,QAAA,wBAAwB,GAAG,MAAM,CAAC,GAAG,CAChD,4BAA4B,CAC7B,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const OTEL_PATCHED_SYMBOL = Symbol.for('opentelemetry.patched');\n\nexport const OTEL_GRAPHQL_DATA_SYMBOL = Symbol.for(\n 'opentelemetry.graphql_data'\n);\n"]}
@@ -0,0 +1,59 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import { type Equal } from "../../utils.cjs";
import { PgColumn, PgColumnBuilder } from "./common.cjs";
export type PgLineBuilderInitial<TName extends string> = PgLineBuilder<{
name: TName;
dataType: 'array';
columnType: 'PgLine';
data: [number, number, number];
driverParam: number | string;
enumValues: undefined;
}>;
export declare class PgLineBuilder<T extends ColumnBuilderBaseConfig<'array', 'PgLine'>> extends PgColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class PgLineTuple<T extends ColumnBaseConfig<'array', 'PgLine'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: string): [number, number, number];
mapToDriverValue(value: [number, number, number]): string;
}
export type PgLineABCBuilderInitial<TName extends string> = PgLineABCBuilder<{
name: TName;
dataType: 'json';
columnType: 'PgLineABC';
data: {
a: number;
b: number;
c: number;
};
driverParam: string;
enumValues: undefined;
}>;
export declare class PgLineABCBuilder<T extends ColumnBuilderBaseConfig<'json', 'PgLineABC'>> extends PgColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class PgLineABC<T extends ColumnBaseConfig<'json', 'PgLineABC'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: string): {
a: number;
b: number;
c: number;
};
mapToDriverValue(value: {
a: number;
b: number;
c: number;
}): string;
}
export interface PgLineTypeConfig<T extends 'tuple' | 'abc' = 'tuple' | 'abc'> {
mode?: T;
}
export declare function line(): PgLineBuilderInitial<''>;
export declare function line<TMode extends PgLineTypeConfig['mode'] & {}>(config?: PgLineTypeConfig<TMode>): Equal<TMode, 'abc'> extends true ? PgLineABCBuilderInitial<''> : PgLineBuilderInitial<''>;
export declare function line<TName extends string, TMode extends PgLineTypeConfig['mode'] & {}>(name: TName, config?: PgLineTypeConfig<TMode>): Equal<TMode, 'abc'> extends true ? PgLineABCBuilderInitial<TName> : PgLineBuilderInitial<TName>;
@@ -0,0 +1,42 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Ivan Kopeykin @vankop
*/
"use strict";
const makeSerializable = require("../util/makeSerializable");
const ModuleDependency = require("./ModuleDependency");
const ModuleDependencyTemplateAsId = require("./ModuleDependencyTemplateAsId");
/** @typedef {import("../javascript/JavascriptParser").Range} Range */
class ImportMetaHotDeclineDependency extends ModuleDependency {
/**
* @param {string} request the request string
* @param {Range} range location in source code
*/
constructor(request, range) {
super(request);
this.range = range;
this.weak = true;
}
get type() {
return "import.meta.webpackHot.decline";
}
get category() {
return "esm";
}
}
makeSerializable(
ImportMetaHotDeclineDependency,
"webpack/lib/dependencies/ImportMetaHotDeclineDependency"
);
ImportMetaHotDeclineDependency.Template = ModuleDependencyTemplateAsId;
module.exports = ImportMetaHotDeclineDependency;
@@ -0,0 +1,33 @@
"use strict";
exports.subWeeks = subWeeks;
var _index = require("./addWeeks.cjs");
/**
* The {@link subWeeks} function options.
*/
/**
* @name subWeeks
* @category Week Helpers
* @summary Subtract the specified number of weeks from the given date.
*
* @description
* Subtract the specified number of weeks from the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @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 be changed
* @param amount - The amount of weeks to be subtracted.
* @param options - An object with options
*
* @returns The new date with the weeks subtracted
*
* @example
* // Subtract 4 weeks from 1 September 2014:
* const result = subWeeks(new Date(2014, 8, 1), 4)
* //=> Mon Aug 04 2014 00:00:00
*/
function subWeeks(date, amount, options) {
return (0, _index.addWeeks)(date, -amount, options);
}
@@ -0,0 +1 @@
{"version":3,"file":"formatDateTitle.d.ts","sourceRoot":"","sources":["../../../src/utilities/formatDocTitle/formatDateTitle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAKhE,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;IACxC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;IAClD,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,UAAU,sCAAuC,cAAc,KAAG,MAoB9E,CAAA;AAED,KAAK,mBAAmB,GAAG;IACzB,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;IACxC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;CACnD,CAAA;AAED,eAAO,MAAM,eAAe,mBAAoB,mBAAmB,KAAG,MAKrE,CAAA"}
@@ -0,0 +1,177 @@
import { GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE, GEN_AI_RESPONSE_TEXT_ATTRIBUTE, GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE, GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE, GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE, GEN_AI_RESPONSE_MODEL_ATTRIBUTE, GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE } from '../ai/gen-ai-attributes.js';
import { normalizeLangChainMessages } from '../langchain/utils.js';
/**
* Extract tool calls from messages
*/
function extractToolCalls(messages) {
if (!messages || messages.length === 0) {
return null;
}
const toolCalls = [];
for (const message of messages) {
if (message && typeof message === 'object') {
const msgToolCalls = message.tool_calls;
if (msgToolCalls && Array.isArray(msgToolCalls)) {
toolCalls.push(...msgToolCalls);
}
}
}
return toolCalls.length > 0 ? toolCalls : null;
}
/**
* Extract token usage from a message's usage_metadata or response_metadata
* Returns token counts without setting span attributes
*/
function extractTokenUsageFromMessage(message)
{
const msg = message ;
let inputTokens = 0;
let outputTokens = 0;
let totalTokens = 0;
// Extract from usage_metadata (newer format)
if (msg.usage_metadata && typeof msg.usage_metadata === 'object') {
const usage = msg.usage_metadata ;
if (typeof usage.input_tokens === 'number') {
inputTokens = usage.input_tokens;
}
if (typeof usage.output_tokens === 'number') {
outputTokens = usage.output_tokens;
}
if (typeof usage.total_tokens === 'number') {
totalTokens = usage.total_tokens;
}
return { inputTokens, outputTokens, totalTokens };
}
// Fallback: Extract from response_metadata.tokenUsage
if (msg.response_metadata && typeof msg.response_metadata === 'object') {
const metadata = msg.response_metadata ;
if (metadata.tokenUsage && typeof metadata.tokenUsage === 'object') {
const tokenUsage = metadata.tokenUsage ;
if (typeof tokenUsage.promptTokens === 'number') {
inputTokens = tokenUsage.promptTokens;
}
if (typeof tokenUsage.completionTokens === 'number') {
outputTokens = tokenUsage.completionTokens;
}
if (typeof tokenUsage.totalTokens === 'number') {
totalTokens = tokenUsage.totalTokens;
}
}
}
return { inputTokens, outputTokens, totalTokens };
}
/**
* Extract model and finish reason from a message's response_metadata
*/
function extractModelMetadata(span, message) {
const msg = message ;
if (msg.response_metadata && typeof msg.response_metadata === 'object') {
const metadata = msg.response_metadata ;
if (metadata.model_name && typeof metadata.model_name === 'string') {
span.setAttribute(GEN_AI_RESPONSE_MODEL_ATTRIBUTE, metadata.model_name);
}
if (metadata.finish_reason && typeof metadata.finish_reason === 'string') {
span.setAttribute(GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE, [metadata.finish_reason]);
}
}
}
/**
* Extract tools from compiled graph structure
*
* Tools are stored in: compiledGraph.builder.nodes.tools.runnable.tools
*/
function extractToolsFromCompiledGraph(compiledGraph) {
if (!compiledGraph.builder?.nodes?.tools?.runnable?.tools) {
return null;
}
const tools = compiledGraph.builder?.nodes?.tools?.runnable?.tools;
if (!tools || !Array.isArray(tools) || tools.length === 0) {
return null;
}
// Extract name, description, and schema from each tool's lc_kwargs
return tools.map((tool) => ({
name: tool.lc_kwargs?.name,
description: tool.lc_kwargs?.description,
schema: tool.lc_kwargs?.schema,
}));
}
/**
* Set response attributes on the span
*/
function setResponseAttributes(span, inputMessages, result) {
// Extract messages from result
const resultObj = result ;
const outputMessages = resultObj?.messages;
if (!outputMessages || !Array.isArray(outputMessages)) {
return;
}
// Get new messages (delta between input and output)
const inputCount = inputMessages?.length ?? 0;
const newMessages = outputMessages.length > inputCount ? outputMessages.slice(inputCount) : [];
if (newMessages.length === 0) {
return;
}
// Extract and set tool calls from new messages BEFORE normalization
// (normalization strips tool_calls, so we need to extract them first)
const toolCalls = extractToolCalls(newMessages );
if (toolCalls) {
span.setAttribute(GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE, JSON.stringify(toolCalls));
}
// Normalize the new messages
const normalizedNewMessages = normalizeLangChainMessages(newMessages);
span.setAttribute(GEN_AI_RESPONSE_TEXT_ATTRIBUTE, JSON.stringify(normalizedNewMessages));
// Accumulate token usage across all messages
let totalInputTokens = 0;
let totalOutputTokens = 0;
let totalTokens = 0;
// Extract metadata from messages
for (const message of newMessages) {
// Accumulate token usage
const tokens = extractTokenUsageFromMessage(message);
totalInputTokens += tokens.inputTokens;
totalOutputTokens += tokens.outputTokens;
totalTokens += tokens.totalTokens;
// Extract model metadata (last message's metadata wins for model/finish_reason)
extractModelMetadata(span, message);
}
// Set accumulated token usage on span
if (totalInputTokens > 0) {
span.setAttribute(GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE, totalInputTokens);
}
if (totalOutputTokens > 0) {
span.setAttribute(GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE, totalOutputTokens);
}
if (totalTokens > 0) {
span.setAttribute(GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE, totalTokens);
}
}
export { extractModelMetadata, extractTokenUsageFromMessage, extractToolCalls, extractToolsFromCompiledGraph, setResponseAttributes };
//# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
{"version":3,"file":"properties.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/properties.ts"],"names":[],"mappings":";;AACA,qDAAiD;AACjD,kCAA2D;AAC3D,6CAA4E;AAC5E,iEAA0C;AAE1C,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,YAAY;IACrB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,QAAQ;IACpB,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QACjD,IAAI,EAAE,CAAC,IAAI,CAAC,gBAAgB,KAAK,KAAK,IAAI,YAAY,CAAC,oBAAoB,KAAK,SAAS,EAAE,CAAC;YAC1F,8BAAK,CAAC,IAAI,CAAC,IAAI,qBAAU,CAAC,EAAE,EAAE,8BAAK,EAAE,sBAAsB,CAAC,CAAC,CAAA;QAC/D,CAAC;QACD,MAAM,QAAQ,GAAG,IAAA,0BAAmB,EAAC,MAAM,CAAC,CAAA;QAC5C,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE,CAAC;YAC5B,EAAE,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;QAChC,CAAC;QACD,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,IAAI,QAAQ,CAAC,MAAM,IAAI,EAAE,CAAC,KAAK,KAAK,IAAI,EAAE,CAAC;YAChE,EAAE,CAAC,KAAK,GAAG,qBAAc,CAAC,KAAK,CAAC,GAAG,EAAE,IAAA,aAAM,EAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAA;QAClE,CAAC;QACD,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAA,wBAAiB,EAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QAC5E,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;YAAE,OAAM;QACnC,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAE/B,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC;YAC9B,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;gBACrB,mBAAmB,CAAC,IAAI,CAAC,CAAA;YAC3B,CAAC;iBAAM,CAAC;gBACN,GAAG,CAAC,EAAE,CAAC,IAAA,qBAAc,EAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAA;gBAC9D,mBAAmB,CAAC,IAAI,CAAC,CAAA;gBACzB,IAAI,CAAC,EAAE,CAAC,SAAS;oBAAE,GAAG,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;gBAC9C,GAAG,CAAC,KAAK,EAAE,CAAA;YACb,CAAC;YACD,GAAG,CAAC,EAAE,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;YAClC,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,CAAA;QACf,CAAC;QAED,SAAS,UAAU,CAAC,IAAY;YAC9B,OAAO,EAAE,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,EAAE,CAAC,aAAa,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,KAAK,SAAS,CAAA;QACvF,CAAC;QAED,SAAS,mBAAmB,CAAC,IAAY;YACvC,GAAG,CAAC,SAAS,CACX;gBACE,OAAO,EAAE,YAAY;gBACrB,UAAU,EAAE,IAAI;gBAChB,QAAQ,EAAE,IAAI;aACf,EACD,KAAK,CACN,CAAA;QACH,CAAC;IACH,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"}
@@ -0,0 +1 @@
{"version":3,"file":"types.js","names":[],"sources":["../../../src/elements/WhereBuilder/types.ts"],"sourcesContent":["import type {\n ClientField,\n Operator,\n ResolvedFilterOptions,\n SanitizedCollectionConfig,\n Where,\n} from 'payload'\n\nexport type WhereBuilderProps = {\n readonly collectionPluralLabel: SanitizedCollectionConfig['labels']['plural']\n readonly collectionSlug: SanitizedCollectionConfig['slug']\n readonly fields?: ClientField[]\n readonly renderedFilters?: Map<string, React.ReactNode>\n readonly resolvedFilterOptions?: Map<string, ResolvedFilterOptions>\n}\n\nexport type Value = Date | number | number[] | string | string[]\n\nexport type ReducedField = {\n field: ClientField\n label: React.ReactNode\n operators: {\n label: string\n value: Operator\n }[]\n plainTextLabel?: string\n value: Value\n}\n\nexport type Relation = 'and' | 'or'\n\nexport type ADD = {\n andIndex?: number\n field: string\n orIndex?: number\n relation?: Relation\n type: 'add'\n}\n\nexport type REMOVE = {\n andIndex: number\n orIndex: number\n type: 'remove'\n}\n\nexport type UPDATE = {\n andIndex: number\n field?: string\n operator?: string\n orIndex: number\n type: 'update'\n value?: unknown\n}\n\nexport type Action = ADD | REMOVE | UPDATE\n\nexport type State = {\n or: Where[]\n}\n\nexport type AddCondition = ({\n andIndex,\n field,\n orIndex,\n relation,\n}: {\n andIndex: number\n field: ReducedField\n orIndex: number\n relation: 'and' | 'or'\n}) => Promise<void> | void\n\nexport type UpdateCondition = ({\n type,\n andIndex,\n field,\n operator,\n orIndex,\n value,\n}: {\n andIndex: number\n field: ReducedField\n operator: string\n orIndex: number\n type: 'field' | 'operator' | 'value'\n value: Value\n}) => Promise<void> | void\n\nexport type RemoveCondition = ({\n andIndex,\n orIndex,\n}: {\n andIndex: number\n orIndex: number\n}) => Promise<void> | void\n"],"mappings":"AAwFA","ignoreList":[]}
@@ -0,0 +1,46 @@
/**
* Validate SVG content for security vulnerabilities
* Detects and blocks malicious patterns commonly used in SVG-based attacks
*/ export function validateSvg(buffer) {
try {
const content = buffer.toString('utf8');
const dangerousPatterns = [
// Script tags
/<script[\s>]/i,
/<\/script>/i,
// Event handlers (onclick, onload, onerror, etc.)
/\son\w+\s*=/i,
// JavaScript URLs
/javascript:/i,
/data:text\/html/i,
// Foreign objects (can embed HTML)
/<foreignObject[\s>]/i,
// Embedded iframes
/<iframe[\s>]/i,
// Embedded objects and embeds
/<object[\s>]/i,
/<embed[\s>]/i,
// Base64 encoded scripts (common obfuscation technique)
/data:image\/svg\+xml;base64,[\w+/]*PHNjcmlwdA/i,
// XLink href with javascript (deprecated but still dangerous)
/xlink:href\s*=\s*["']javascript:/i,
// Import statements
/@import/i,
// External resource references that could be dangerous
/<!ENTITY/i,
/<!DOCTYPE[^>]*\[/i,
// Attempt to use CDATA to hide scripts
/<!\[CDATA\[[\s\S]*<script/i
];
for (const pattern of dangerousPatterns){
if (pattern.test(content)) {
return false;
}
}
return true;
} catch (_error) {
return false;
}
}
//# sourceMappingURL=validateSvg.js.map
@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/text.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '~/pg-core/table.ts';\nimport { getColumnNameAndConfig, type Writable } from '~/utils.ts';\nimport { PgColumn, PgColumnBuilder } from './common.ts';\n\nexport type PgTextBuilderInitial<TName extends string, TEnum extends [string, ...string[]]> = PgTextBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'PgText';\n\tdata: TEnum[number];\n\tenumValues: TEnum;\n\tdriverParam: string;\n}>;\n\nexport class PgTextBuilder<\n\tT extends ColumnBuilderBaseConfig<'string', 'PgText'>,\n> extends PgColumnBuilder<T, { enumValues: T['enumValues'] }> {\n\tstatic override readonly [entityKind]: string = 'PgTextBuilder';\n\n\tconstructor(\n\t\tname: T['name'],\n\t\tconfig: PgTextConfig<T['enumValues']>,\n\t) {\n\t\tsuper(name, 'string', 'PgText');\n\t\tthis.config.enumValues = config.enum;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgText<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgText<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class PgText<T extends ColumnBaseConfig<'string', 'PgText'>>\n\textends PgColumn<T, { enumValues: T['enumValues'] }>\n{\n\tstatic override readonly [entityKind]: string = 'PgText';\n\n\toverride readonly enumValues = this.config.enumValues;\n\n\tgetSQLType(): string {\n\t\treturn 'text';\n\t}\n}\n\nexport interface PgTextConfig<\n\tTEnum extends readonly string[] | string[] | undefined = readonly string[] | string[] | undefined,\n> {\n\tenum?: TEnum;\n}\n\nexport function text(): PgTextBuilderInitial<'', [string, ...string[]]>;\nexport function text<U extends string, T extends Readonly<[U, ...U[]]>>(\n\tconfig?: PgTextConfig<T | Writable<T>>,\n): PgTextBuilderInitial<'', Writable<T>>;\nexport function text<TName extends string, U extends string, T extends Readonly<[U, ...U[]]>>(\n\tname: TName,\n\tconfig?: PgTextConfig<T | Writable<T>>,\n): PgTextBuilderInitial<TName, Writable<T>>;\nexport function text(a?: string | PgTextConfig, b: PgTextConfig = {}): any {\n\tconst { name, config } = getColumnNameAndConfig<PgTextConfig>(a, b);\n\treturn new PgTextBuilder(name, config as any);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,mBAAsD;AACtD,oBAA0C;AAWnC,MAAM,sBAEH,8BAAoD;AAAA,EAC7D,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YACC,MACA,QACC;AACD,UAAM,MAAM,UAAU,QAAQ;AAC9B,SAAK,OAAO,aAAa,OAAO;AAAA,EACjC;AAAA;AAAA,EAGS,MACR,OAC0C;AAC1C,WAAO,IAAI,OAAwC,OAAO,KAAK,MAA8C;AAAA,EAC9G;AACD;AAEO,MAAM,eACJ,uBACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAE9B,aAAa,KAAK,OAAO;AAAA,EAE3C,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAgBO,SAAS,KAAK,GAA2B,IAAkB,CAAC,GAAQ;AAC1E,QAAM,EAAE,MAAM,OAAO,QAAI,qCAAqC,GAAG,CAAC;AAClE,SAAO,IAAI,cAAc,MAAM,MAAa;AAC7C;","names":[]}
@@ -0,0 +1,31 @@
import type { TypeWithVersion } from 'payload';
import React from 'react';
import './index.scss';
export declare const VersionPillLabel: React.FC<{
currentlyPublishedVersion?: TypeWithVersion<any>;
disableDate?: boolean;
doc: {
[key: string]: unknown;
id: number | string;
publishedLocale?: string;
updatedAt?: string;
version: {
[key: string]: unknown;
_status: 'draft' | 'published';
updatedAt: string;
};
};
/**
* By default, the date is displayed first, followed by the version label.
* @default false
*/
labelFirst?: boolean;
labelOverride?: React.ReactNode;
/**
* @default 'pill'
*/
labelStyle?: 'pill' | 'text';
labelSuffix?: React.ReactNode;
latestDraftVersion?: TypeWithVersion<any>;
}>;
//# sourceMappingURL=VersionPillLabel.d.ts.map
@@ -0,0 +1,28 @@
"use strict";
exports.ru = void 0;
var _index = require("./ru/_lib/formatDistance.cjs");
var _index2 = require("./ru/_lib/formatLong.cjs");
var _index3 = require("./ru/_lib/formatRelative.cjs");
var _index4 = require("./ru/_lib/localize.cjs");
var _index5 = require("./ru/_lib/match.cjs");
/**
* @category Locales
* @summary Russian locale.
* @language Russian
* @iso-639-2 rus
* @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)
* @author Lesha Koss [@leshakoss](https://github.com/leshakoss)
*/
const ru = (exports.ru = {
code: "ru",
formatDistance: _index.formatDistance,
formatLong: _index2.formatLong,
formatRelative: _index3.formatRelative,
localize: _index4.localize,
match: _index5.match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 1,
},
});
@@ -0,0 +1,94 @@
{
"name": "@opentelemetry/core",
"version": "2.5.0",
"description": "OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.",
"main": "build/src/index.js",
"module": "build/esm/index.js",
"esnext": "build/esnext/index.js",
"browser": {
"./src/platform/index.ts": "./src/platform/browser/index.ts",
"./build/esm/platform/index.js": "./build/esm/platform/browser/index.js",
"./build/esnext/platform/index.js": "./build/esnext/platform/browser/index.js",
"./build/src/platform/index.js": "./build/src/platform/browser/index.js"
},
"types": "build/src/index.d.ts",
"repository": "open-telemetry/opentelemetry-js",
"scripts": {
"prepublishOnly": "npm run compile",
"compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
"test": "nyc mocha 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'",
"test:browser": "karma start --single-run",
"tdd": "npm run tdd:node",
"tdd:node": "npm run test -- --watch-extensions ts --watch",
"tdd:browser": "karma start",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"version": "node ../../scripts/version-update.js",
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
"prewatch": "npm run precompile",
"test:bench": "node test/performance/benchmark/index.js | tee .benchmark-results.txt",
"peer-api-check": "node ../../scripts/peer-api-check.js",
"align-api-deps": "node ../../scripts/align-api-deps.js"
},
"keywords": [
"opentelemetry",
"nodejs",
"browser",
"tracing",
"profiling",
"metrics",
"stats"
],
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/esm/**/*.js",
"build/esm/**/*.js.map",
"build/esm/**/*.d.ts",
"build/esnext/**/*.js",
"build/esnext/**/*.js.map",
"build/esnext/**/*.d.ts",
"build/src/**/*.js",
"build/src/**/*.js.map",
"build/src/**/*.d.ts",
"doc",
"LICENSE",
"README.md"
],
"publishConfig": {
"access": "public"
},
"devDependencies": {
"@opentelemetry/api": ">=1.0.0 <1.10.0",
"@types/mocha": "10.0.10",
"@types/node": "18.19.130",
"@types/sinon": "17.0.4",
"@types/webpack-env": "1.16.3",
"babel-plugin-istanbul": "7.0.1",
"karma": "6.4.4",
"karma-chrome-launcher": "3.1.0",
"karma-coverage": "2.2.1",
"karma-mocha": "2.0.1",
"karma-spec-reporter": "0.0.36",
"karma-webpack": "5.0.1",
"mocha": "11.7.5",
"nyc": "17.1.0",
"sinon": "18.0.1",
"ts-loader": "9.5.4",
"typescript": "5.0.4",
"webpack": "5.101.3"
},
"peerDependencies": {
"@opentelemetry/api": ">=1.0.0 <1.10.0"
},
"dependencies": {
"@opentelemetry/semantic-conventions": "^1.29.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core",
"sideEffects": false,
"gitHead": "38924cbff2a6e924ce8a2a227d3a72de52fbcd35"
}
@@ -0,0 +1,33 @@
import { write, read } from "@xtuc/ieee754";
/**
* According to https://webassembly.github.io/spec/binary/values.html#binary-float
* n = 32/8
*/
export var NUMBER_OF_BYTE_F32 = 4;
/**
* According to https://webassembly.github.io/spec/binary/values.html#binary-float
* n = 64/8
*/
export var NUMBER_OF_BYTE_F64 = 8;
export var SINGLE_PRECISION_MANTISSA = 23;
export var DOUBLE_PRECISION_MANTISSA = 52;
export function encodeF32(v) {
var buffer = [];
write(buffer, v, 0, true, SINGLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F32);
return buffer;
}
export function encodeF64(v) {
var buffer = [];
write(buffer, v, 0, true, DOUBLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F64);
return buffer;
}
export function decodeF32(bytes) {
var buffer = new Uint8Array(bytes);
return read(buffer, 0, true, SINGLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F32);
}
export function decodeF64(bytes) {
var buffer = new Uint8Array(bytes);
return read(buffer, 0, true, DOUBLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F64);
}
@@ -0,0 +1 @@
{"version":3,"file":"mapStatus.d.ts","sourceRoot":"","sources":["../../../src/utils/mapStatus.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAkB,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AA2B7C;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,YAAY,GAAG,UAAU,CAsCxD"}
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('commit', require('../commit'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

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