fix(products): fix breadcrumbs and product filtering (backport from main)
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled

This commit is contained in:
2026-02-24 16:04:21 +01:00
parent 915eb61613
commit 5397309103
43805 changed files with 4324295 additions and 3 deletions

View File

@@ -0,0 +1,6 @@
import * as uri from "fast-uri";
type URI = typeof uri & {
code: string;
};
declare const _default: URI;
export default _default;

View File

@@ -0,0 +1 @@
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../lib/vocabularies/metadata.ts"],"names":[],"mappings":";;;AAEa,QAAA,kBAAkB,GAAe;IAC5C,OAAO;IACP,aAAa;IACb,SAAS;IACT,YAAY;IACZ,UAAU;IACV,WAAW;IACX,UAAU;CACX,CAAA;AAEY,QAAA,iBAAiB,GAAe;IAC3C,kBAAkB;IAClB,iBAAiB;IACjB,eAAe;CAChB,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"transformColumnsToSelect.js","names":["unflatten","transformColumnsToSelect","columns","columnsSelect","reduce","acc","column","active","accessor"],"sources":["../../../src/views/List/transformColumnsToSelect.ts"],"sourcesContent":["import type { ColumnPreference, SelectType } from 'payload'\n\nimport { unflatten } from 'payload/shared'\n\nexport const transformColumnsToSelect = (columns: ColumnPreference[]): SelectType => {\n const columnsSelect = columns.reduce((acc, column) => {\n if (column.active) {\n acc[column.accessor] = true\n }\n return acc\n }, {} as SelectType)\n\n return unflatten(columnsSelect)\n}\n"],"mappings":"AAEA,SAASA,SAAS,QAAQ;AAE1B,OAAO,MAAMC,wBAAA,GAA4BC,OAAA;EACvC,MAAMC,aAAA,GAAgBD,OAAA,CAAQE,MAAM,CAAC,CAACC,GAAA,EAAKC,MAAA;IACzC,IAAIA,MAAA,CAAOC,MAAM,EAAE;MACjBF,GAAG,CAACC,MAAA,CAAOE,QAAQ,CAAC,GAAG;IACzB;IACA,OAAOH,GAAA;EACT,GAAG,CAAC;EAEJ,OAAOL,SAAA,CAAUG,aAAA;AACnB","ignoreList":[]}

View File

@@ -0,0 +1,471 @@
// @ts-nocheck
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
var $installedChunks$ = undefined;
var $loadUpdateChunk$ = undefined;
var $moduleCache$ = undefined;
var $moduleFactories$ = undefined;
var $ensureChunkHandlers$ = undefined;
var $hasOwnProperty$ = undefined;
var $hmrModuleData$ = undefined;
var $hmrDownloadUpdateHandlers$ = undefined;
var $hmrInvalidateModuleHandlers$ = undefined;
var __webpack_require__ = undefined;
module.exports = function () {
var currentUpdateChunks;
var currentUpdate;
var currentUpdateRemovedChunks;
var currentUpdateRuntime;
function applyHandler(options) {
if ($ensureChunkHandlers$) delete $ensureChunkHandlers$.$key$Hmr;
currentUpdateChunks = undefined;
function getAffectedModuleEffects(updateModuleId) {
var outdatedModules = [updateModuleId];
var outdatedDependencies = {};
var queue = outdatedModules.map(function (id) {
return {
chain: [id],
id: id
};
});
while (queue.length > 0) {
var queueItem = queue.pop();
var moduleId = queueItem.id;
var chain = queueItem.chain;
var module = $moduleCache$[moduleId];
if (
!module ||
(module.hot._selfAccepted && !module.hot._selfInvalidated)
)
continue;
if (module.hot._selfDeclined) {
return {
type: "self-declined",
chain: chain,
moduleId: moduleId
};
}
if (module.hot._main) {
return {
type: "unaccepted",
chain: chain,
moduleId: moduleId
};
}
for (var i = 0; i < module.parents.length; i++) {
var parentId = module.parents[i];
var parent = $moduleCache$[parentId];
if (!parent) continue;
if (parent.hot._declinedDependencies[moduleId]) {
return {
type: "declined",
chain: chain.concat([parentId]),
moduleId: moduleId,
parentId: parentId
};
}
if (outdatedModules.indexOf(parentId) !== -1) continue;
if (parent.hot._acceptedDependencies[moduleId]) {
if (!outdatedDependencies[parentId])
outdatedDependencies[parentId] = [];
addAllToSet(outdatedDependencies[parentId], [moduleId]);
continue;
}
delete outdatedDependencies[parentId];
outdatedModules.push(parentId);
queue.push({
chain: chain.concat([parentId]),
id: parentId
});
}
}
return {
type: "accepted",
moduleId: updateModuleId,
outdatedModules: outdatedModules,
outdatedDependencies: outdatedDependencies
};
}
function addAllToSet(a, b) {
for (var i = 0; i < b.length; i++) {
var item = b[i];
if (a.indexOf(item) === -1) a.push(item);
}
}
// at begin all updates modules are outdated
// the "outdated" status can propagate to parents if they don't accept the children
var outdatedDependencies = {};
var outdatedModules = [];
var appliedUpdate = {};
var warnUnexpectedRequire = function warnUnexpectedRequire(module) {
console.warn(
"[HMR] unexpected require(" + module.id + ") to disposed module"
);
};
for (var moduleId in currentUpdate) {
if ($hasOwnProperty$(currentUpdate, moduleId)) {
var newModuleFactory = currentUpdate[moduleId];
var result = newModuleFactory
? getAffectedModuleEffects(moduleId)
: {
type: "disposed",
moduleId: moduleId
};
/** @type {Error|false} */
var abortError = false;
var doApply = false;
var doDispose = false;
var chainInfo = "";
if (result.chain) {
chainInfo = "\nUpdate propagation: " + result.chain.join(" -> ");
}
switch (result.type) {
case "self-declined":
if (options.onDeclined) options.onDeclined(result);
if (!options.ignoreDeclined)
abortError = new Error(
"Aborted because of self decline: " +
result.moduleId +
chainInfo
);
break;
case "declined":
if (options.onDeclined) options.onDeclined(result);
if (!options.ignoreDeclined)
abortError = new Error(
"Aborted because of declined dependency: " +
result.moduleId +
" in " +
result.parentId +
chainInfo
);
break;
case "unaccepted":
if (options.onUnaccepted) options.onUnaccepted(result);
if (!options.ignoreUnaccepted)
abortError = new Error(
"Aborted because " + moduleId + " is not accepted" + chainInfo
);
break;
case "accepted":
if (options.onAccepted) options.onAccepted(result);
doApply = true;
break;
case "disposed":
if (options.onDisposed) options.onDisposed(result);
doDispose = true;
break;
default:
throw new Error("Unexception type " + result.type);
}
if (abortError) {
return {
error: abortError
};
}
if (doApply) {
appliedUpdate[moduleId] = newModuleFactory;
addAllToSet(outdatedModules, result.outdatedModules);
for (moduleId in result.outdatedDependencies) {
if ($hasOwnProperty$(result.outdatedDependencies, moduleId)) {
if (!outdatedDependencies[moduleId])
outdatedDependencies[moduleId] = [];
addAllToSet(
outdatedDependencies[moduleId],
result.outdatedDependencies[moduleId]
);
}
}
}
if (doDispose) {
addAllToSet(outdatedModules, [result.moduleId]);
appliedUpdate[moduleId] = warnUnexpectedRequire;
}
}
}
currentUpdate = undefined;
// Store self accepted outdated modules to require them later by the module system
var outdatedSelfAcceptedModules = [];
for (var j = 0; j < outdatedModules.length; j++) {
var outdatedModuleId = outdatedModules[j];
var module = $moduleCache$[outdatedModuleId];
if (
module &&
(module.hot._selfAccepted || module.hot._main) &&
// removed self-accepted modules should not be required
appliedUpdate[outdatedModuleId] !== warnUnexpectedRequire &&
// when called invalidate self-accepting is not possible
!module.hot._selfInvalidated
) {
outdatedSelfAcceptedModules.push({
module: outdatedModuleId,
require: module.hot._requireSelf,
errorHandler: module.hot._selfAccepted
});
}
}
var moduleOutdatedDependencies;
return {
dispose: function () {
currentUpdateRemovedChunks.forEach(function (chunkId) {
delete $installedChunks$[chunkId];
});
currentUpdateRemovedChunks = undefined;
var idx;
var queue = outdatedModules.slice();
while (queue.length > 0) {
var moduleId = queue.pop();
var module = $moduleCache$[moduleId];
if (!module) continue;
var data = {};
// Call dispose handlers
var disposeHandlers = module.hot._disposeHandlers;
for (j = 0; j < disposeHandlers.length; j++) {
disposeHandlers[j].call(null, data);
}
$hmrModuleData$[moduleId] = data;
// disable module (this disables requires from this module)
module.hot.active = false;
// remove module from cache
delete $moduleCache$[moduleId];
// when disposing there is no need to call dispose handler
delete outdatedDependencies[moduleId];
// remove "parents" references from all children
for (j = 0; j < module.children.length; j++) {
var child = $moduleCache$[module.children[j]];
if (!child) continue;
idx = child.parents.indexOf(moduleId);
if (idx >= 0) {
child.parents.splice(idx, 1);
}
}
}
// remove outdated dependency from module children
var dependency;
for (var outdatedModuleId in outdatedDependencies) {
if ($hasOwnProperty$(outdatedDependencies, outdatedModuleId)) {
module = $moduleCache$[outdatedModuleId];
if (module) {
moduleOutdatedDependencies =
outdatedDependencies[outdatedModuleId];
for (j = 0; j < moduleOutdatedDependencies.length; j++) {
dependency = moduleOutdatedDependencies[j];
idx = module.children.indexOf(dependency);
if (idx >= 0) module.children.splice(idx, 1);
}
}
}
}
},
apply: function (reportError) {
var acceptPromises = [];
// insert new code
for (var updateModuleId in appliedUpdate) {
if ($hasOwnProperty$(appliedUpdate, updateModuleId)) {
$moduleFactories$[updateModuleId] = appliedUpdate[updateModuleId];
}
}
// run new runtime modules
for (var i = 0; i < currentUpdateRuntime.length; i++) {
currentUpdateRuntime[i](__webpack_require__);
}
// call accept handlers
for (var outdatedModuleId in outdatedDependencies) {
if ($hasOwnProperty$(outdatedDependencies, outdatedModuleId)) {
var module = $moduleCache$[outdatedModuleId];
if (module) {
moduleOutdatedDependencies =
outdatedDependencies[outdatedModuleId];
var callbacks = [];
var errorHandlers = [];
var dependenciesForCallbacks = [];
for (var j = 0; j < moduleOutdatedDependencies.length; j++) {
var dependency = moduleOutdatedDependencies[j];
var acceptCallback =
module.hot._acceptedDependencies[dependency];
var errorHandler =
module.hot._acceptedErrorHandlers[dependency];
if (acceptCallback) {
if (callbacks.indexOf(acceptCallback) !== -1) continue;
callbacks.push(acceptCallback);
errorHandlers.push(errorHandler);
dependenciesForCallbacks.push(dependency);
}
}
for (var k = 0; k < callbacks.length; k++) {
var result;
try {
result = callbacks[k].call(null, moduleOutdatedDependencies);
} catch (err) {
if (typeof errorHandlers[k] === "function") {
try {
errorHandlers[k](err, {
moduleId: outdatedModuleId,
dependencyId: dependenciesForCallbacks[k]
});
} catch (err2) {
if (options.onErrored) {
options.onErrored({
type: "accept-error-handler-errored",
moduleId: outdatedModuleId,
dependencyId: dependenciesForCallbacks[k],
error: err2,
originalError: err
});
}
if (!options.ignoreErrored) {
reportError(err2);
reportError(err);
}
}
} else {
if (options.onErrored) {
options.onErrored({
type: "accept-errored",
moduleId: outdatedModuleId,
dependencyId: dependenciesForCallbacks[k],
error: err
});
}
if (!options.ignoreErrored) {
reportError(err);
}
}
}
if (result && typeof result.then === "function") {
acceptPromises.push(result);
}
}
}
}
}
var onAccepted = function () {
// Load self accepted modules
for (var o = 0; o < outdatedSelfAcceptedModules.length; o++) {
var item = outdatedSelfAcceptedModules[o];
var moduleId = item.module;
try {
item.require(moduleId);
} catch (err) {
if (typeof item.errorHandler === "function") {
try {
item.errorHandler(err, {
moduleId: moduleId,
module: $moduleCache$[moduleId]
});
} catch (err1) {
if (options.onErrored) {
options.onErrored({
type: "self-accept-error-handler-errored",
moduleId: moduleId,
error: err1,
originalError: err
});
}
if (!options.ignoreErrored) {
reportError(err1);
reportError(err);
}
}
} else {
if (options.onErrored) {
options.onErrored({
type: "self-accept-errored",
moduleId: moduleId,
error: err
});
}
if (!options.ignoreErrored) {
reportError(err);
}
}
}
}
};
return Promise.all(acceptPromises)
.then(onAccepted)
.then(function () {
return outdatedModules;
});
}
};
}
$hmrInvalidateModuleHandlers$.$key$ = function (moduleId, applyHandlers) {
if (!currentUpdate) {
currentUpdate = {};
currentUpdateRuntime = [];
currentUpdateRemovedChunks = [];
applyHandlers.push(applyHandler);
}
if (!$hasOwnProperty$(currentUpdate, moduleId)) {
currentUpdate[moduleId] = $moduleFactories$[moduleId];
}
};
$hmrDownloadUpdateHandlers$.$key$ = function (
chunkIds,
removedChunks,
removedModules,
promises,
applyHandlers,
updatedModulesList
) {
applyHandlers.push(applyHandler);
currentUpdateChunks = {};
currentUpdateRemovedChunks = removedChunks;
currentUpdate = removedModules.reduce(function (obj, key) {
obj[key] = false;
return obj;
}, {});
currentUpdateRuntime = [];
chunkIds.forEach(function (chunkId) {
if (
$hasOwnProperty$($installedChunks$, chunkId) &&
$installedChunks$[chunkId] !== undefined
) {
promises.push($loadUpdateChunk$(chunkId, updatedModulesList));
currentUpdateChunks[chunkId] = true;
} else {
currentUpdateChunks[chunkId] = false;
}
});
if ($ensureChunkHandlers$) {
$ensureChunkHandlers$.$key$Hmr = function (chunkId, promises) {
if (
currentUpdateChunks &&
$hasOwnProperty$(currentUpdateChunks, chunkId) &&
!currentUpdateChunks[chunkId]
) {
promises.push($loadUpdateChunk$(chunkId));
currentUpdateChunks[chunkId] = true;
}
};
}
};
};

View File

@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Gauge = createLucideIcon("Gauge", [
["path", { d: "m12 14 4-4", key: "9kzdfg" }],
["path", { d: "M3.34 19a10 10 0 1 1 17.32 0", key: "19p75a" }]
]);
export { Gauge as default };
//# sourceMappingURL=gauge.js.map

View File

@@ -0,0 +1,24 @@
/**
* @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 Turtle = createLucideIcon("Turtle", [
[
"path",
{
d: "m12 10 2 4v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3a8 8 0 1 0-16 0v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3l2-4h4Z",
key: "1lbbv7"
}
],
["path", { d: "M4.82 7.9 8 10", key: "m9wose" }],
["path", { d: "M15.18 7.9 12 10", key: "p8dp2u" }],
["path", { d: "M16.93 10H20a2 2 0 0 1 0 4H2", key: "12nsm7" }]
]);
export { Turtle as default };
//# sourceMappingURL=turtle.js.map

View File

@@ -0,0 +1,123 @@
import type { NumberFormatOptions } from "@formatjs/ecma402-abstract";
import { type NumberSkeletonToken } from "@formatjs/icu-skeleton-parser";
export interface ExtendedNumberFormatOptions extends NumberFormatOptions {
scale?: number;
}
export declare enum TYPE {
/**
* Raw text
*/
literal = 0,
/**
* Variable w/o any format, e.g `var` in `this is a {var}`
*/
argument = 1,
/**
* Variable w/ number format
*/
number = 2,
/**
* Variable w/ date format
*/
date = 3,
/**
* Variable w/ time format
*/
time = 4,
/**
* Variable w/ select format
*/
select = 5,
/**
* Variable w/ plural format
*/
plural = 6,
/**
* Only possible within plural argument.
* This is the `#` symbol that will be substituted with the count.
*/
pound = 7,
/**
* XML-like tag
*/
tag = 8
}
export declare enum SKELETON_TYPE {
number = 0,
dateTime = 1
}
export interface LocationDetails {
offset: number;
line: number;
column: number;
}
export interface Location {
start: LocationDetails;
end: LocationDetails;
}
export interface BaseElement<T extends TYPE> {
type: T;
value: string;
location?: Location;
}
export type LiteralElement = BaseElement<TYPE.literal>;
export type ArgumentElement = BaseElement<TYPE.argument>;
export interface TagElement extends BaseElement<TYPE.tag> {
children: MessageFormatElement[];
}
export interface SimpleFormatElement<
T extends TYPE,
S extends Skeleton
> extends BaseElement<T> {
style?: string | S | null;
}
export type NumberElement = SimpleFormatElement<TYPE.number, NumberSkeleton>;
export type DateElement = SimpleFormatElement<TYPE.date, DateTimeSkeleton>;
export type TimeElement = SimpleFormatElement<TYPE.time, DateTimeSkeleton>;
export type ValidPluralRule = "zero" | "one" | "two" | "few" | "many" | "other" | string;
export interface PluralOrSelectOption {
value: MessageFormatElement[];
location?: Location;
}
export interface SelectElement extends BaseElement<TYPE.select> {
options: Record<string, PluralOrSelectOption>;
}
export interface PluralElement extends BaseElement<TYPE.plural> {
options: Record<ValidPluralRule, PluralOrSelectOption>;
offset: number;
pluralType: Intl.PluralRulesOptions["type"];
}
export interface PoundElement {
type: TYPE.pound;
location?: Location;
}
export type MessageFormatElement = ArgumentElement | DateElement | LiteralElement | NumberElement | PluralElement | PoundElement | SelectElement | TagElement | TimeElement;
export interface NumberSkeleton {
type: SKELETON_TYPE.number;
tokens: NumberSkeletonToken[];
location?: Location;
parsedOptions: ExtendedNumberFormatOptions;
}
export interface DateTimeSkeleton {
type: SKELETON_TYPE.dateTime;
pattern: string;
location?: Location;
parsedOptions: Intl.DateTimeFormatOptions;
}
export type Skeleton = NumberSkeleton | DateTimeSkeleton;
/**
* Type Guards
*/
export declare function isLiteralElement(el: MessageFormatElement): el is LiteralElement;
export declare function isArgumentElement(el: MessageFormatElement): el is ArgumentElement;
export declare function isNumberElement(el: MessageFormatElement): el is NumberElement;
export declare function isDateElement(el: MessageFormatElement): el is DateElement;
export declare function isTimeElement(el: MessageFormatElement): el is TimeElement;
export declare function isSelectElement(el: MessageFormatElement): el is SelectElement;
export declare function isPluralElement(el: MessageFormatElement): el is PluralElement;
export declare function isPoundElement(el: MessageFormatElement): el is PoundElement;
export declare function isTagElement(el: MessageFormatElement): el is TagElement;
export declare function isNumberSkeleton(el: NumberElement["style"] | Skeleton): el is NumberSkeleton;
export declare function isDateTimeSkeleton(el?: DateElement["style"] | TimeElement["style"] | Skeleton): el is DateTimeSkeleton;
export declare function createLiteralElement(value: string): LiteralElement;
export declare function createNumberElement(value: string, style?: string | null): NumberElement;

View File

@@ -0,0 +1,11 @@
import type { Stacktrace } from './stacktrace';
/** JSDoc */
export interface Thread {
id?: number | string;
name?: string;
main?: boolean;
stacktrace?: Stacktrace;
crashed?: boolean;
current?: boolean;
}
//# sourceMappingURL=thread.d.ts.map

View File

@@ -0,0 +1,28 @@
import { addYears } from "./addYears.mjs";
/**
* @name subYears
* @category Year Helpers
* @summary Subtract the specified number of years from the given date.
*
* @description
* Subtract the specified number of years 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).
*
* @param date - The date to be changed
* @param amount - The amount of years to be subtracted.
*
* @returns The new date with the years subtracted
*
* @example
* // Subtract 5 years from 1 September 2014:
* const result = subYears(new Date(2014, 8, 1), 5)
* //=> Tue Sep 01 2009 00:00:00
*/
export function subYears(date, amount) {
return addYears(date, -amount);
}
// Fallback for modularized imports:
export default subYears;

View File

@@ -0,0 +1 @@
{"version":3,"file":"NonRecordingSpan.js","sourceRoot":"","sources":["../../../src/trace/NonRecordingSpan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAMhE;;;;GAIG;AACH,MAAM,OAAO,gBAAgB;IAC3B,YACmB,eAA4B,oBAAoB;QAAhD,iBAAY,GAAZ,YAAY,CAAoC;IAChE,CAAC;IAEJ,yBAAyB;IACzB,WAAW;QACT,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED,0BAA0B;IAC1B,YAAY,CAAC,IAAY,EAAE,MAAe;QACxC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,0BAA0B;IAC1B,aAAa,CAAC,WAA2B;QACvC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,0BAA0B;IAC1B,QAAQ,CAAC,KAAa,EAAE,WAA4B;QAClD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CAAC,KAAW;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,QAAQ,CAAC,MAAc;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,0BAA0B;IAC1B,SAAS,CAAC,OAAmB;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,0BAA0B;IAC1B,UAAU,CAAC,KAAa;QACtB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,0BAA0B;IAC1B,GAAG,CAAC,QAAoB,IAAS,CAAC;IAElC,yDAAyD;IACzD,WAAW;QACT,OAAO,KAAK,CAAC;IACf,CAAC;IAED,0BAA0B;IAC1B,eAAe,CAAC,UAAqB,EAAE,KAAiB,IAAS,CAAC;CACnE","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Exception } from '../common/Exception';\nimport { TimeInput } from '../common/Time';\nimport { SpanAttributes } from './attributes';\nimport { INVALID_SPAN_CONTEXT } from './invalid-span-constants';\nimport { Span } from './span';\nimport { SpanContext } from './span_context';\nimport { SpanStatus } from './status';\nimport { Link } from './link';\n\n/**\n * The NonRecordingSpan is the default {@link Span} that is used when no Span\n * implementation is available. All operations are no-op including context\n * propagation.\n */\nexport class NonRecordingSpan implements Span {\n constructor(\n private readonly _spanContext: SpanContext = INVALID_SPAN_CONTEXT\n ) {}\n\n // Returns a SpanContext.\n spanContext(): SpanContext {\n return this._spanContext;\n }\n\n // By default does nothing\n setAttribute(_key: string, _value: unknown): this {\n return this;\n }\n\n // By default does nothing\n setAttributes(_attributes: SpanAttributes): this {\n return this;\n }\n\n // By default does nothing\n addEvent(_name: string, _attributes?: SpanAttributes): this {\n return this;\n }\n\n addLink(_link: Link): this {\n return this;\n }\n\n addLinks(_links: Link[]): this {\n return this;\n }\n\n // By default does nothing\n setStatus(_status: SpanStatus): this {\n return this;\n }\n\n // By default does nothing\n updateName(_name: string): this {\n return this;\n }\n\n // By default does nothing\n end(_endTime?: TimeInput): void {}\n\n // isRecording always returns false for NonRecordingSpan.\n isRecording(): boolean {\n return false;\n }\n\n // By default does nothing\n recordException(_exception: Exception, _time?: TimeInput): void {}\n}\n"]}

View File

@@ -0,0 +1,13 @@
/**
* 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.
*
*/
const mod = await (process.env.NODE_ENV !== 'production' ? import('./LexicalAutoEmbedPlugin.dev.mjs') : import('./LexicalAutoEmbedPlugin.prod.mjs'));
export const AutoEmbedOption = mod.AutoEmbedOption;
export const INSERT_EMBED_COMMAND = mod.INSERT_EMBED_COMMAND;
export const LexicalAutoEmbedPlugin = mod.LexicalAutoEmbedPlugin;
export const URL_MATCHER = mod.URL_MATCHER;

View File

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

View File

@@ -0,0 +1,4 @@
function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
export { _nonIterableSpread as default };

View File

@@ -0,0 +1,38 @@
import { DiagLogger, DiagLogFunction } from './types';
/**
* A simple Immutable Console based diagnostic logger which will output any messages to the Console.
* If you want to limit the amount of logging to a specific level or lower use the
* {@link createLogLevelDiagLogger}
*/
export declare class DiagConsoleLogger implements DiagLogger {
constructor();
/** Log an error scenario that was not expected and caused the requested operation to fail. */
error: DiagLogFunction;
/**
* Log a warning scenario to inform the developer of an issues that should be investigated.
* The requested operation may or may not have succeeded or completed.
*/
warn: DiagLogFunction;
/**
* Log a general informational message, this should not affect functionality.
* This is also the default logging level so this should NOT be used for logging
* debugging level information.
*/
info: DiagLogFunction;
/**
* Log a general debug message that can be useful for identifying a failure.
* Information logged at this level may include diagnostic details that would
* help identify a failure scenario. Useful scenarios would be to log the execution
* order of async operations
*/
debug: DiagLogFunction;
/**
* Log a detailed (verbose) trace level logging that can be used to identify failures
* where debug level logging would be insufficient, this level of tracing can include
* input and output parameters and as such may include PII information passing through
* the API. As such it is recommended that this level of tracing should not be enabled
* in a production environment.
*/
verbose: DiagLogFunction;
}
//# sourceMappingURL=consoleLogger.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/uuid.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 { sql } from '~/sql/sql.ts';\nimport { PgColumn, PgColumnBuilder } from './common.ts';\n\nexport type PgUUIDBuilderInitial<TName extends string> = PgUUIDBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'PgUUID';\n\tdata: string;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class PgUUIDBuilder<T extends ColumnBuilderBaseConfig<'string', 'PgUUID'>> extends PgColumnBuilder<T> {\n\tstatic override readonly [entityKind]: string = 'PgUUIDBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'string', 'PgUUID');\n\t}\n\n\t/**\n\t * Adds `default gen_random_uuid()` to the column definition.\n\t */\n\tdefaultRandom(): ReturnType<this['default']> {\n\t\treturn this.default(sql`gen_random_uuid()`) as ReturnType<this['default']>;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgUUID<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgUUID<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class PgUUID<T extends ColumnBaseConfig<'string', 'PgUUID'>> extends PgColumn<T> {\n\tstatic override readonly [entityKind]: string = 'PgUUID';\n\n\tgetSQLType(): string {\n\t\treturn 'uuid';\n\t}\n}\n\nexport function uuid(): PgUUIDBuilderInitial<''>;\nexport function uuid<TName extends string>(name: TName): PgUUIDBuilderInitial<TName>;\nexport function uuid(name?: string) {\n\treturn new PgUUIDBuilder(name ?? '');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,iBAAoB;AACpB,oBAA0C;AAWnC,MAAM,sBAA6E,8BAAmB;AAAA,EAC5G,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,QAAQ;AAAA,EAC/B;AAAA;AAAA;AAAA;AAAA,EAKA,gBAA6C;AAC5C,WAAO,KAAK,QAAQ,iCAAsB;AAAA,EAC3C;AAAA;AAAA,EAGS,MACR,OAC0C;AAC1C,WAAO,IAAI,OAAwC,OAAO,KAAK,MAA8C;AAAA,EAC9G;AACD;AAEO,MAAM,eAA+D,uBAAY;AAAA,EACvF,QAA0B,wBAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAIO,SAAS,KAAK,MAAe;AACnC,SAAO,IAAI,cAAc,QAAQ,EAAE;AACpC;","names":[]}

View File

@@ -0,0 +1,30 @@
import { entityKind } from "../entity.cjs";
import type { AnyGelColumn, GelColumn } from "./columns/index.cjs";
import { GelTable } from "./table.cjs";
export declare function primaryKey<TTableName extends string, TColumn extends AnyGelColumn<{
tableName: TTableName;
}>, TColumns extends AnyGelColumn<{
tableName: TTableName;
}>[]>(config: {
name?: string;
columns: [TColumn, ...TColumns];
}): PrimaryKeyBuilder;
/**
* @deprecated: Please use primaryKey({ columns: [] }) instead of this function
* @param columns
*/
export declare function primaryKey<TTableName extends string, TColumns extends AnyGelColumn<{
tableName: TTableName;
}>[]>(...columns: TColumns): PrimaryKeyBuilder;
export declare class PrimaryKeyBuilder {
static readonly [entityKind]: string;
constructor(columns: GelColumn[], name?: string);
}
export declare class PrimaryKey {
readonly table: GelTable;
static readonly [entityKind]: string;
readonly columns: AnyGelColumn<{}>[];
readonly name?: string;
constructor(table: GelTable, columns: AnyGelColumn<{}>[], name?: string);
getName(): string;
}

View File

@@ -0,0 +1,67 @@
import * as origModule from '__SENTRY_NEXTJS_REQUEST_ASYNC_STORAGE_SHIM__';
import * as serverComponentModule from '__SENTRY_WRAPPING_TARGET_FILE__';
export * from '__SENTRY_WRAPPING_TARGET_FILE__';
export { default } from '__SENTRY_WRAPPING_TARGET_FILE__';
import * as Sentry from '@sentry/nextjs';
// @ts-expect-error Because we cannot be sure if the RequestAsyncStorage module exists (it is not part of the Next.js public
// API) we use a shim if it doesn't exist. The logic for this is in the wrapping loader.
const asyncStorageModule = { ...origModule } ;
const requestAsyncStorage =
'workUnitAsyncStorage' in asyncStorageModule
? asyncStorageModule.workUnitAsyncStorage
: 'requestAsyncStorage' in asyncStorageModule
? asyncStorageModule.requestAsyncStorage
: undefined;
function wrapHandler(handler, method) {
// Running the instrumentation code during the build phase will mark any function as "dynamic" because we're accessing
// the Request object. We do not want to turn handlers dynamic so we skip instrumentation in the build phase.
if (process.env.NEXT_PHASE === 'phase-production-build') {
return handler;
}
if (typeof handler !== 'function') {
return handler;
}
return new Proxy(handler, {
apply: (originalFunction, thisArg, args) => {
let headers = undefined;
// We try-catch here just in case the API around `requestAsyncStorage` changes unexpectedly since it is not public API
try {
const requestAsyncStore = requestAsyncStorage?.getStore();
headers = requestAsyncStore?.headers;
} catch {
/** empty */
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return Sentry.wrapRouteHandlerWithSentry(originalFunction , {
method,
parameterizedRoute: '__ROUTE__',
headers,
}).apply(thisArg, args);
},
});
}
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
const GET = wrapHandler(serverComponentModule.GET , 'GET');
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
const POST = wrapHandler(serverComponentModule.POST , 'POST');
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
const PUT = wrapHandler(serverComponentModule.PUT , 'PUT');
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
const PATCH = wrapHandler(serverComponentModule.PATCH , 'PATCH');
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
const DELETE = wrapHandler(serverComponentModule.DELETE , 'DELETE');
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
const HEAD = wrapHandler(serverComponentModule.HEAD , 'HEAD');
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
const OPTIONS = wrapHandler(serverComponentModule.OPTIONS , 'OPTIONS');
export { DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT };

View File

@@ -0,0 +1 @@
{"version":3,"file":"exports.js","sources":["../../../src/utils/exports.ts"],"sourcesContent":["/**\n * Replaces constructor functions in module exports, handling read-only properties,\n * and both default and named exports by wrapping them with the constructor.\n *\n * @param exports The module exports object to modify\n * @param exportName The name of the export to replace (e.g., 'GoogleGenAI', 'Anthropic', 'OpenAI')\n * @param wrappedConstructor The wrapped constructor function to replace the original with\n * @returns void\n */\nexport function replaceExports(\n exports: { [key: string]: unknown },\n exportName: string,\n wrappedConstructor: unknown,\n): void {\n const original = exports[exportName];\n\n if (typeof original !== 'function') {\n return;\n }\n\n // Replace the named export - handle read-only properties\n try {\n exports[exportName] = wrappedConstructor;\n } catch (error) {\n // If direct assignment fails, override the property descriptor\n Object.defineProperty(exports, exportName, {\n value: wrappedConstructor,\n writable: true,\n configurable: true,\n enumerable: true,\n });\n }\n\n // Replace the default export if it points to the original constructor\n if (exports.default === original) {\n try {\n exports.default = wrappedConstructor;\n } catch (error) {\n Object.defineProperty(exports, 'default', {\n value: wrappedConstructor,\n writable: true,\n configurable: true,\n enumerable: true,\n });\n }\n }\n}\n"],"names":["exports"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,cAAc;AAC9B,EAAEA,SAAO;AACT,EAAE,UAAU;AACZ,EAAE,kBAAkB;AACpB,EAAQ;AACR,EAAE,MAAM,QAAA,GAAWA,SAAO,CAAC,UAAU,CAAC;;AAEtC,EAAE,IAAI,OAAO,QAAA,KAAa,UAAU,EAAE;AACtC,IAAI;AACJ,EAAE;;AAEF;AACA,EAAE,IAAI;AACN,IAAIA,SAAO,CAAC,UAAU,CAAA,GAAI,kBAAkB;AAC5C,EAAE,CAAA,CAAE,OAAO,KAAK,EAAE;AAClB;AACA,IAAI,MAAM,CAAC,cAAc,CAACA,SAAO,EAAE,UAAU,EAAE;AAC/C,MAAM,KAAK,EAAE,kBAAkB;AAC/B,MAAM,QAAQ,EAAE,IAAI;AACpB,MAAM,YAAY,EAAE,IAAI;AACxB,MAAM,UAAU,EAAE,IAAI;AACtB,KAAK,CAAC;AACN,EAAE;;AAEF;AACA,EAAE,IAAIA,SAAO,CAAC,OAAA,KAAY,QAAQ,EAAE;AACpC,IAAI,IAAI;AACR,MAAMA,SAAO,CAAC,OAAA,GAAU,kBAAkB;AAC1C,IAAI,CAAA,CAAE,OAAO,KAAK,EAAE;AACpB,MAAM,MAAM,CAAC,cAAc,CAACA,SAAO,EAAE,SAAS,EAAE;AAChD,QAAQ,KAAK,EAAE,kBAAkB;AACjC,QAAQ,QAAQ,EAAE,IAAI;AACtB,QAAQ,YAAY,EAAE,IAAI;AAC1B,QAAQ,UAAU,EAAE,IAAI;AACxB,OAAO,CAAC;AACR,IAAI;AACJ,EAAE;AACF;;;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["c","_c","React","useLivePreviewContext","DeviceContainer","props","$","children","breakpoint","breakpoints","size","zoom","foundBreakpoint","find","bp","name","x","margin","width","height","scaledWidth","difference","t0","t1","t2","t3","_jsx","style","transform"],"sources":["../../../../src/elements/LivePreview/DeviceContainer/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { useLivePreviewContext } from '../../../providers/LivePreview/context.js'\n\nexport const DeviceContainer: React.FC<{\n children: React.ReactNode\n}> = (props) => {\n const { children } = props\n\n const { breakpoint, breakpoints, size, zoom } = useLivePreviewContext()\n\n const foundBreakpoint = breakpoint && breakpoints?.find((bp) => bp.name === breakpoint)\n\n let x = '0'\n let margin = '0'\n\n if (foundBreakpoint && breakpoint !== 'responsive') {\n x = '-50%'\n\n if (\n typeof zoom === 'number' &&\n typeof size.width === 'number' &&\n typeof size.height === 'number'\n ) {\n const scaledWidth = size.width / zoom\n const difference = scaledWidth - size.width\n x = `${difference / 2}px`\n margin = '0 auto'\n }\n }\n\n return (\n <div\n style={{\n height:\n foundBreakpoint && foundBreakpoint?.name !== 'responsive'\n ? `${size?.height / (typeof zoom === 'number' ? zoom : 1)}px`\n : typeof zoom === 'number'\n ? `${100 / zoom}%`\n : '100%',\n margin,\n transform: `translate3d(${x}, 0, 0)`,\n width:\n foundBreakpoint && foundBreakpoint?.name !== 'responsive'\n ? `${size?.width / (typeof zoom === 'number' ? zoom : 1)}px`\n : typeof zoom === 'number'\n ? `${100 / zoom}%`\n : '100%',\n }}\n >\n {children}\n </div>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AACA,OAAOC,KAAA,MAAW;AAElB,SAASC,qBAAqB,QAAQ;AAEtC,OAAO,MAAMC,eAAA,GAERC,KAAA;EAAA,MAAAC,CAAA,GAAAL,EAAA;EACH;IAAAM;EAAA,IAAqBF,KAAA;EAErB;IAAAG,UAAA;IAAAC,WAAA;IAAAC,IAAA;IAAAC;EAAA,IAAgDR,qBAAA;EAEhD,MAAAS,eAAA,GAAwBJ,UAAA,IAAcC,WAAA,EAAAI,IAAA,CAAAC,EAAA,IAA0BA,EAAA,CAAAC,IAAA,KAAYP,UAAA;EAE5E,IAAAQ,CAAA,GAAQ;EACR,IAAAC,MAAA,GAAa;EAAA,IAETL,eAAA,IAAmBJ,UAAA,KAAe;IACpCQ,CAAA,CAAAA,CAAA,CAAIA,MAAA;IAAJ,IAGE,OAAOL,IAAA,KAAS,YAChB,OAAOD,IAAA,CAAAQ,KAAA,KAAe,YACtB,OAAOR,IAAA,CAAAS,MAAA,KAAgB;MAEvB,MAAAC,WAAA,GAAoBV,IAAA,CAAAQ,KAAA,GAAaP,IAAA;MACjC,MAAAU,UAAA,GAAmBD,WAAA,GAAcV,IAAA,CAAAQ,KAAU;MAC3CF,CAAA,CAAAA,CAAA,CAAIA,GAAGK,UAAA,IAAa,IAAK;MACzBJ,MAAA,CAAAA,CAAA,CAASA,QAAA;IAAT;EAAA;EAQI,MAAAK,EAAA,GAAAV,eAAA,IAAmBA,eAAA,EAAAG,IAAA,KAA0B,eACzC,GAAGL,IAAA,EAAAS,MAAA,IAAgB,OAAOR,IAAA,KAAS,WAAWA,IAAA,IAAO,KAAM,GAC3D,OAAOA,IAAA,KAAS,WACd,GAAG,MAAMA,IAAA,GAAO,GAChB;EAEG,MAAAY,EAAA,kBAAeP,CAAA,SAAU;EAElC,MAAAQ,EAAA,GAAAZ,eAAA,IAAmBA,eAAA,EAAAG,IAAA,KAA0B,eACzC,GAAGL,IAAA,EAAAQ,KAAA,IAAe,OAAOP,IAAA,KAAS,WAAWA,IAAA,IAAO,KAAM,GAC1D,OAAOA,IAAA,KAAS,WACd,GAAG,MAAMA,IAAA,GAAO,GAChB;EAAA,IAAAc,EAAA;EAAA,IAAAnB,CAAA,QAAAC,QAAA,IAAAD,CAAA,QAAAW,MAAA,IAAAX,CAAA,QAAAgB,EAAA,IAAAhB,CAAA,QAAAiB,EAAA,IAAAjB,CAAA,QAAAkB,EAAA;IAfZC,EAAA,GAAAC,IAAA,CAAC;MAAAC,KAAA;QAAAR,MAAA,EAGKG,EAIM;QAAAL,MAAA;QAAAW,SAAA,EAEGL,EAAyB;QAAAL,KAAA,EAElCM;MAIM;MAAAjB;IAAA,C;;;;;;;;;;SAfZkB,E;CAqBJ","ignoreList":[]}

View File

@@ -0,0 +1,3 @@
var commondir = require('../');
var dir = commondir(process.argv.slice(2));
console.log(dir);

View File

@@ -0,0 +1,64 @@
import { commitTransaction } from '../../utilities/commitTransaction.js';
import { createLocalReq } from '../../utilities/createLocalReq.js';
import { initTransaction } from '../../utilities/initTransaction.js';
import { killTransaction } from '../../utilities/killTransaction.js';
import { getMigrations } from './getMigrations.js';
import { readMigrationFiles } from './readMigrationFiles.js';
export async function migrateDown() {
const { payload } = this;
const migrationFiles = await readMigrationFiles({
payload
});
const { existingMigrations, latestBatch } = await getMigrations({
payload
});
if (!existingMigrations?.length) {
payload.logger.info({
msg: 'No migrations to rollback.'
});
return;
}
payload.logger.info({
msg: `Rolling back batch ${latestBatch} consisting of ${existingMigrations.length} migration(s).`
});
const latestBatchMigrations = existingMigrations.filter(({ batch })=>batch === latestBatch);
for (const migration of latestBatchMigrations){
const migrationFile = migrationFiles.find((m)=>m.name === migration.name);
if (!migrationFile) {
throw new Error(`Migration ${migration.name} not found locally.`);
}
const start = Date.now();
const req = await createLocalReq({}, payload);
try {
payload.logger.info({
msg: `Migrating down: ${migrationFile.name}`
});
await initTransaction(req);
const session = payload.db.sessions?.[await req.transactionID];
await migrationFile.down({
payload,
req,
session
});
payload.logger.info({
msg: `Migrated down: ${migrationFile.name} (${Date.now() - start}ms)`
});
// Waiting for implementation here
await payload.delete({
id: migration.id,
collection: 'payload-migrations',
req
});
await commitTransaction(req);
} catch (err) {
await killTransaction(req);
payload.logger.error({
err,
msg: `Error running migration ${migrationFile.name}`
});
process.exit(1);
}
}
}
//# sourceMappingURL=migrateDown.js.map

View File

@@ -0,0 +1,130 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const browser = require('@sentry/browser');
const core = require('@sentry/core');
// Many of the types below had to be mocked out to prevent typescript issues
// these types are required for correct functionality.
/**
* A browser tracing integration that uses React Router v3 to instrument navigations.
* Expects `history` (and optionally `routes` and `matchPath`) to be passed as options.
*/
function reactRouterV3BrowserTracingIntegration(
options,
) {
const integration = browser.browserTracingIntegration({
...options,
instrumentPageLoad: false,
instrumentNavigation: false,
});
const { history, routes, match, instrumentPageLoad = true, instrumentNavigation = true } = options;
return {
...integration,
afterAllSetup(client) {
integration.afterAllSetup(client);
if (instrumentPageLoad && browser.WINDOW.location) {
normalizeTransactionName(
routes,
browser.WINDOW.location ,
match,
(localName, source = 'url') => {
browser.startBrowserTracingPageLoadSpan(client, {
name: localName,
attributes: {
[core.SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'pageload',
[core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.pageload.react.reactrouter_v3',
[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: source,
},
});
},
);
}
if (instrumentNavigation && history.listen) {
history.listen(location => {
if (location.action === 'PUSH' || location.action === 'POP') {
normalizeTransactionName(
routes,
location,
match,
(localName, source = 'url') => {
browser.startBrowserTracingNavigationSpan(client, {
name: localName,
attributes: {
[core.SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'navigation',
[core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.react.reactrouter_v3',
[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: source,
},
});
},
);
}
});
}
},
};
}
/**
* Normalize transaction names using `Router.match`
*/
function normalizeTransactionName(
appRoutes,
location,
match,
callback,
) {
let name = location.pathname;
match(
{
location,
routes: appRoutes,
},
(error, _redirectLocation, renderProps) => {
if (error || !renderProps) {
return callback(name);
}
const routePath = getRouteStringFromRoutes(renderProps.routes || []);
if (routePath.length === 0 || routePath === '/*') {
return callback(name);
}
name = routePath;
return callback(name, 'route');
},
);
}
/**
* Generate route name from array of routes
*/
function getRouteStringFromRoutes(routes) {
if (!Array.isArray(routes) || routes.length === 0) {
return '';
}
const routesWithPaths = routes.filter((route) => !!route.path);
let index = -1;
for (let x = routesWithPaths.length - 1; x >= 0; x--) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const route = routesWithPaths[x];
if (route.path?.startsWith('/')) {
index = x;
break;
}
}
return routesWithPaths.slice(index).reduce((acc, { path }) => {
const pathSegment = acc === '/' || acc === '' ? path : `/${path}`;
return `${acc}${pathSegment}`;
}, '');
}
exports.reactRouterV3BrowserTracingIntegration = reactRouterV3BrowserTracingIntegration;
//# sourceMappingURL=reactrouterv3.js.map

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"AddNewButton.js","names":["getTranslation","Button","Popup","PopupList","AddNewButton","allowCreate","baseClass","buttonStyle","className","collections","i18n","icon","label","onClick","permissions","relationTo","isPolymorphic","Array","isArray","_jsx","button","buttonType","horizontalAlign","render","close","closePopup","ButtonGroup","map","relatedCollection","create","find","each","slug","labels","singular","size"],"sources":["../../../src/elements/RelationshipTable/AddNewButton.tsx"],"sourcesContent":["'use client'\nimport type { I18nClient } from '@payloadcms/translations'\nimport type { ClientCollectionConfig, SanitizedPermissions } from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\n\nimport type { Props as ButtonProps } from '../../elements/Button/types.js'\n\nimport { Button } from '../../elements/Button/index.js'\nimport { Popup, PopupList } from '../Popup/index.js'\n\nexport const AddNewButton = ({\n allowCreate,\n baseClass,\n buttonStyle,\n className,\n collections,\n i18n,\n icon,\n label,\n onClick,\n permissions,\n relationTo,\n}: {\n allowCreate: boolean\n baseClass: string\n buttonStyle?: ButtonProps['buttonStyle']\n className?: string\n collections: ClientCollectionConfig[]\n i18n: I18nClient\n icon?: ButtonProps['icon']\n label: string\n onClick: (selectedCollection?: string) => void\n permissions: SanitizedPermissions\n relationTo: string | string[]\n}) => {\n if (!allowCreate) {\n return null\n }\n\n const isPolymorphic = Array.isArray(relationTo)\n\n if (!isPolymorphic) {\n return (\n <Button buttonStyle={buttonStyle} className={className} onClick={() => onClick()}>\n {label}\n </Button>\n )\n }\n\n return (\n <div className={`${baseClass}__add-new-polymorphic-wrapper`}>\n <Popup\n button={\n <Button buttonStyle={buttonStyle} className={className} icon={icon}>\n {label}\n </Button>\n }\n buttonType=\"custom\"\n horizontalAlign=\"center\"\n render={({ close: closePopup }) => (\n <PopupList.ButtonGroup>\n {relationTo.map((relatedCollection) => {\n if (permissions.collections[relatedCollection]?.create) {\n return (\n <PopupList.Button\n className={`${baseClass}__relation-button--${relatedCollection}`}\n key={relatedCollection}\n onClick={() => {\n closePopup()\n onClick(relatedCollection)\n }}\n >\n {getTranslation(\n collections.find((each) => each.slug === relatedCollection).labels.singular,\n i18n,\n )}\n </PopupList.Button>\n )\n }\n\n return null\n })}\n </PopupList.ButtonGroup>\n )}\n size=\"medium\"\n />\n </div>\n )\n}\n"],"mappings":"AAAA;;;AAIA,SAASA,cAAc,QAAQ;AAI/B,SAASC,MAAM,QAAQ;AACvB,SAASC,KAAK,EAAEC,SAAS,QAAQ;AAEjC,OAAO,MAAMC,YAAA,GAAeA,CAAC;EAC3BC,WAAW;EACXC,SAAS;EACTC,WAAW;EACXC,SAAS;EACTC,WAAW;EACXC,IAAI;EACJC,IAAI;EACJC,KAAK;EACLC,OAAO;EACPC,WAAW;EACXC;AAAU,CAaX;EACC,IAAI,CAACV,WAAA,EAAa;IAChB,OAAO;EACT;EAEA,MAAMW,aAAA,GAAgBC,KAAA,CAAMC,OAAO,CAACH,UAAA;EAEpC,IAAI,CAACC,aAAA,EAAe;IAClB,oBACEG,IAAA,CAAClB,MAAA;MAAOM,WAAA,EAAaA,WAAA;MAAaC,SAAA,EAAWA,SAAA;MAAWK,OAAA,EAASA,CAAA,KAAMA,OAAA;gBACpED;;EAGP;EAEA,oBACEO,IAAA,CAAC;IAAIX,SAAA,EAAW,GAAGF,SAAA,+BAAwC;cACzD,aAAAa,IAAA,CAACjB,KAAA;MACCkB,MAAA,eACED,IAAA,CAAClB,MAAA;QAAOM,WAAA,EAAaA,WAAA;QAAaC,SAAA,EAAWA,SAAA;QAAWG,IAAA,EAAMA,IAAA;kBAC3DC;;MAGLS,UAAA,EAAW;MACXC,eAAA,EAAgB;MAChBC,MAAA,EAAQA,CAAC;QAAEC,KAAA,EAAOC;MAAU,CAAE,kBAC5BN,IAAA,CAAChB,SAAA,CAAUuB,WAAW;kBACnBX,UAAA,CAAWY,GAAG,CAAEC,iBAAA;UACf,IAAId,WAAA,CAAYL,WAAW,CAACmB,iBAAA,CAAkB,EAAEC,MAAA,EAAQ;YACtD,oBACEV,IAAA,CAAChB,SAAA,CAAUF,MAAM;cACfO,SAAA,EAAW,GAAGF,SAAA,sBAA+BsB,iBAAA,EAAmB;cAEhEf,OAAA,EAASA,CAAA;gBACPY,UAAA;gBACAZ,OAAA,CAAQe,iBAAA;cACV;wBAEC5B,cAAA,CACCS,WAAA,CAAYqB,IAAI,CAAEC,IAAA,IAASA,IAAA,CAAKC,IAAI,KAAKJ,iBAAA,EAAmBK,MAAM,CAACC,QAAQ,EAC3ExB,IAAA;eARGkB,iBAAA;UAYX;UAEA,OAAO;QACT;;MAGJO,IAAA,EAAK;;;AAIb","ignoreList":[]}

View File

@@ -0,0 +1,69 @@
import { payloadFaviconDark, payloadFaviconLight, staticOGImage } from '@payloadcms/ui/assets';
import * as qs from 'qs-esm';
const defaultOpenGraph = {
description: 'Payload is a headless CMS and application framework built with TypeScript, Node.js, and React.',
siteName: 'Payload App',
title: 'Payload App'
};
export const generateMetadata = async args => {
const {
defaultOGImageType,
serverURL,
titleSuffix,
...rest
} = args;
/**
* @todo find a way to remove the type assertion here.
* It is a result of needing to `DeepCopy` the `MetaConfig` type from Payload.
* This is required for the `DeepRequired` from `Config` to `SanitizedConfig`.
*/
const incomingMetadata = rest;
const icons = incomingMetadata.icons || [{
type: 'image/png',
rel: 'icon',
sizes: '32x32',
url: typeof payloadFaviconDark === 'object' ? payloadFaviconDark?.src : payloadFaviconDark
}, {
type: 'image/png',
media: '(prefers-color-scheme: dark)',
rel: 'icon',
sizes: '32x32',
url: typeof payloadFaviconLight === 'object' ? payloadFaviconLight?.src : payloadFaviconLight
}];
const metaTitle = [incomingMetadata.title, titleSuffix].filter(Boolean).join(' ');
const ogTitle = `${typeof incomingMetadata.openGraph?.title === 'string' ? incomingMetadata.openGraph.title : incomingMetadata.title} ${titleSuffix}`;
const mergedOpenGraph = {
...(defaultOpenGraph || {}),
...(defaultOGImageType === 'dynamic' ? {
images: [{
alt: ogTitle,
height: 630,
url: `/api/og${qs.stringify({
description: incomingMetadata.openGraph?.description || defaultOpenGraph.description,
title: ogTitle
}, {
addQueryPrefix: true
})}`,
width: 1200
}]
} : {}),
...(defaultOGImageType === 'static' ? {
images: [{
alt: ogTitle,
height: 480,
url: typeof staticOGImage === 'object' ? staticOGImage?.src : staticOGImage,
width: 640
}]
} : {}),
title: ogTitle,
...(incomingMetadata.openGraph || {})
};
return Promise.resolve({
...incomingMetadata,
icons,
metadataBase: new URL(serverURL || process.env.PAYLOAD_PUBLIC_SERVER_URL || `http://localhost:${process.env.PORT || 3000}`),
openGraph: mergedOpenGraph,
title: metaTitle
});
};
//# sourceMappingURL=meta.js.map

View File

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

View File

@@ -0,0 +1,3 @@
import type { Plugin } from "ajv";
declare const instanceofPlugin: Plugin<undefined>;
export default instanceofPlugin;

View File

@@ -0,0 +1,6 @@
"use strict";
function _non_iterable_spread() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
exports._ = _non_iterable_spread;

View File

@@ -0,0 +1,12 @@
export default function collectElements(node, direction) {
var nextNode = null;
var nodes = [];
nextNode = node ? node[direction] : null;
while (nextNode && nextNode.nodeType !== 9) {
nodes.push(nextNode);
nextNode = nextNode[direction] || null;
}
return nodes;
}

View File

@@ -0,0 +1,25 @@
/**
* @name daysToWeeks
* @category Conversion Helpers
* @summary Convert days to weeks.
*
* @description
* Convert a number of days to a full number of weeks.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param days - The number of days to be converted
*
* @returns The number of days converted in weeks
*
* @example
* // Convert 14 days to weeks:
* const result = daysToWeeks(14)
* //=> 2
*
* @example
* // It uses trunc rounding:
* const result = daysToWeeks(13)
* //=> 1
*/
export declare function daysToWeeks(days: number): number;

View File

@@ -0,0 +1,7 @@
import type { FuncKeywordDefinition } from "ajv";
export declare type DynamicDefaultFunc = (args?: Record<string, any>) => () => any;
declare const DEFAULTS: Record<string, DynamicDefaultFunc | undefined>;
declare const getDef: (() => FuncKeywordDefinition) & {
DEFAULTS: typeof DEFAULTS;
};
export default getDef;

View File

@@ -0,0 +1,6 @@
import { EdgeRouteHandler } from './types';
/**
* Wraps a Next.js edge route handler with Sentry error and performance instrumentation.
*/
export declare function wrapApiHandlerWithSentry<H extends EdgeRouteHandler>(handler: H, parameterizedRoute: string): (...params: Parameters<H>) => Promise<ReturnType<H>>;
//# sourceMappingURL=wrapApiHandlerWithSentry.d.ts.map

View File

@@ -0,0 +1,36 @@
import { readMigrationFiles } from "../migrator.js";
import { sql } from "../sql/sql.js";
async function migrate(db, config) {
const migrations = readMigrationFiles(config);
const migrationsTable = config.migrationsTable ?? "__drizzle_migrations";
const migrationTableCreate = sql`
CREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsTable)} (
id SERIAL PRIMARY KEY,
hash text NOT NULL,
created_at numeric
)
`;
await db.session.run(migrationTableCreate);
const dbMigrations = await db.values(
sql`SELECT id, hash, created_at FROM ${sql.identifier(migrationsTable)} ORDER BY created_at DESC LIMIT 1`
);
const lastDbMigration = dbMigrations[0] ?? void 0;
const statementToBatch = [];
for (const migration of migrations) {
if (!lastDbMigration || Number(lastDbMigration[2]) < migration.folderMillis) {
for (const stmt of migration.sql) {
statementToBatch.push(db.run(sql.raw(stmt)));
}
statementToBatch.push(
db.run(
sql`INSERT INTO ${sql.identifier(migrationsTable)} ("hash", "created_at") VALUES(${migration.hash}, ${migration.folderMillis})`
)
);
}
}
await db.session.migrate(statementToBatch);
}
export {
migrate
};
//# sourceMappingURL=migrator.js.map

View File

@@ -0,0 +1,5 @@
import { useLayoutEffect } from 'react';
var index = useLayoutEffect ;
export { index as default };

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"names":["_defineEnumerableProperties","obj","descs","key","desc","configurable","enumerable","writable","Object","defineProperty","getOwnPropertySymbols","objectSymbols","i","length","sym"],"sources":["../../src/helpers/defineEnumerableProperties.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n/* @onlyBabel7 */\nexport default function _defineEnumerableProperties<T>(\n obj: T,\n descs: Record<string | symbol, PropertyDescriptor>,\n): T {\n // eslint-disable-next-line guard-for-in\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if (\"value\" in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n\n // Symbols are not enumerated over by for-in loops. If native\n // Symbols are available, fetch all of the descs object's own\n // symbol properties and define them on our target object too.\n if (Object.getOwnPropertySymbols) {\n var objectSymbols = Object.getOwnPropertySymbols(descs);\n for (var i = 0; i < objectSymbols.length; i++) {\n var sym = objectSymbols[i];\n desc = descs[sym];\n desc.configurable = desc.enumerable = true;\n if (\"value\" in desc) desc.writable = true;\n Object.defineProperty(obj, sym, desc);\n }\n }\n return obj;\n}\n"],"mappings":";;;;;;AAEe,SAASA,2BAA2BA,CACjDC,GAAM,EACNC,KAAkD,EAC/C;EAEH,KAAK,IAAIC,GAAG,IAAID,KAAK,EAAE;IACrB,IAAIE,IAAI,GAAGF,KAAK,CAACC,GAAG,CAAC;IACrBC,IAAI,CAACC,YAAY,GAAGD,IAAI,CAACE,UAAU,GAAG,IAAI;IAC1C,IAAI,OAAO,IAAIF,IAAI,EAAEA,IAAI,CAACG,QAAQ,GAAG,IAAI;IACzCC,MAAM,CAACC,cAAc,CAACR,GAAG,EAAEE,GAAG,EAAEC,IAAI,CAAC;EACvC;EAKA,IAAII,MAAM,CAACE,qBAAqB,EAAE;IAChC,IAAIC,aAAa,GAAGH,MAAM,CAACE,qBAAqB,CAACR,KAAK,CAAC;IACvD,KAAK,IAAIU,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGD,aAAa,CAACE,MAAM,EAAED,CAAC,EAAE,EAAE;MAC7C,IAAIE,GAAG,GAAGH,aAAa,CAACC,CAAC,CAAC;MAC1BR,IAAI,GAAGF,KAAK,CAACY,GAAG,CAAC;MACjBV,IAAI,CAACC,YAAY,GAAGD,IAAI,CAACE,UAAU,GAAG,IAAI;MAC1C,IAAI,OAAO,IAAIF,IAAI,EAAEA,IAAI,CAACG,QAAQ,GAAG,IAAI;MACzCC,MAAM,CAACC,cAAc,CAACR,GAAG,EAAEa,GAAG,EAAEV,IAAI,CAAC;IACvC;EACF;EACA,OAAOH,GAAG;AACZ","ignoreList":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"getArrayRelationName.d.ts","sourceRoot":"","sources":["../../src/utilities/getArrayRelationName.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC,eAAO,MAAM,oBAAoB,gCAI9B;IACD,KAAK,EAAE,UAAU,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;CAClB,WAMA,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"pill.js","sources":["../../../src/icons/pill.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Pill\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTAuNSAyMC41IDEwLTEwYTQuOTUgNC45NSAwIDEgMC03LTdsLTEwIDEwYTQuOTUgNC45NSAwIDEgMCA3IDdaIiAvPgogIDxwYXRoIGQ9Im04LjUgOC41IDcgNyIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/pill\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 Pill = createLucideIcon('Pill', [\n [\n 'path',\n { d: 'm10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z', key: 'wa1lgi' },\n ],\n ['path', { d: 'm8.5 8.5 7 7', key: 'rvfmvr' }],\n]);\n\nexport default Pill;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,iBAAiB,MAAQ,CAAA,CAAA,CAAA;AAAA,CACpC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAoE,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAS,CAAA,CAAA;AAAA,CACzF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,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;AAC/C,CAAC,CAAA,CAAA;;"}

View File

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

View File

@@ -0,0 +1,6 @@
export { closestCenter, closestCorners, rectIntersection, getFirstCollision, pointerWithin, } from './algorithms';
export type { Collision, CollisionDescriptor, CollisionDetection, } from './algorithms';
export { defaultCoordinates, distanceBetween, getRelativeTransformOrigin, } from './coordinates';
export { Rect, adjustScale, getAdjustedRect, getClientRect, getTransformAgnosticClientRect, getWindowClientRect, getRectDelta, } from './rect';
export { noop } from './other';
export { getFirstScrollableAncestor, getScrollableAncestors, getScrollableElement, getScrollCoordinates, getScrollDirectionAndSpeed, getScrollElementRect, getScrollOffsets, getScrollPosition, isDocumentScrollingElement, } from './scroll';

View File

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

View File

@@ -0,0 +1,342 @@
#include <string>
#include <fstream>
#include <stdlib.h>
#include <algorithm>
#include "../DirTree.hh"
#include "../Event.hh"
#include "./BSER.hh"
#include "./WatchmanBackend.hh"
#ifdef _WIN32
#include "../windows/win_utils.hh"
#define S_ISDIR(mode) ((mode & _S_IFDIR) == _S_IFDIR)
#define popen _popen
#define pclose _pclose
#else
#include <sys/stat.h>
#define normalizePath(dir) dir
#endif
template<typename T>
BSER readBSER(T &&do_read) {
std::stringstream oss;
char buffer[256];
size_t r;
int64_t len = -1;
do {
// Start by reading a minimal amount of data in order to decode the length.
// After that, attempt to read the remaining length, up to the buffer size.
r = do_read(buffer, len == -1 ? 20 : (len < 256 ? len : 256));
oss << std::string(buffer, r);
if (len == -1) {
uint64_t l = BSER::decodeLength(oss);
len = l + oss.tellg();
}
len -= r;
} while (len > 0);
return BSER(oss);
}
std::string getSockPath() {
auto var = getenv("WATCHMAN_SOCK");
if (var && *var) {
return std::string(var);
}
#ifdef _WIN32
FILE *fp = popen("watchman --output-encoding=bser get-sockname", "r");
#else
FILE *fp = popen("watchman --output-encoding=bser get-sockname 2>/dev/null", "r");
#endif
if (fp == NULL || errno == ECHILD) {
throw std::runtime_error("Failed to execute watchman");
}
BSER b = readBSER([fp] (char *buf, size_t len) {
return fread(buf, sizeof(char), len, fp);
});
pclose(fp);
auto objValue = b.objectValue();
auto foundSockname = objValue.find("sockname");
if (foundSockname == objValue.end()) {
throw std::runtime_error("sockname not found");
}
return foundSockname->second.stringValue();
}
std::unique_ptr<IPC> watchmanConnect() {
std::string path = getSockPath();
return std::unique_ptr<IPC>(new IPC(path));
}
BSER watchmanRead(IPC *ipc) {
return readBSER([ipc] (char *buf, size_t len) {
return ipc->read(buf, len);
});
}
BSER::Object WatchmanBackend::watchmanRequest(BSER b) {
std::string cmd = b.encode();
mIPC->write(cmd);
mRequestSignal.notify();
mResponseSignal.wait();
mResponseSignal.reset();
if (!mError.empty()) {
std::runtime_error err = std::runtime_error(mError);
mError = std::string();
throw err;
}
return mResponse;
}
void WatchmanBackend::watchmanWatch(std::string dir) {
std::vector<BSER> cmd;
cmd.push_back("watch");
cmd.push_back(normalizePath(dir));
watchmanRequest(cmd);
}
bool WatchmanBackend::checkAvailable() {
try {
watchmanConnect();
return true;
} catch (std::exception&) {
return false;
}
}
void handleFiles(WatcherRef watcher, BSER::Object obj) {
auto found = obj.find("files");
if (found == obj.end()) {
throw WatcherError("Error reading changes from watchman", watcher);
}
auto files = found->second.arrayValue();
for (auto it = files.begin(); it != files.end(); it++) {
auto file = it->objectValue();
auto name = file.find("name")->second.stringValue();
#ifdef _WIN32
std::replace(name.begin(), name.end(), '/', '\\');
#endif
auto mode = file.find("mode")->second.intValue();
auto isNew = file.find("new")->second.boolValue();
auto exists = file.find("exists")->second.boolValue();
auto path = watcher->mDir + DIR_SEP + name;
if (watcher->isIgnored(path)) {
continue;
}
if (isNew && exists) {
watcher->mEvents.create(path);
} else if (exists && !S_ISDIR(mode)) {
watcher->mEvents.update(path);
} else if (!isNew && !exists) {
watcher->mEvents.remove(path);
}
}
}
void WatchmanBackend::handleSubscription(BSER::Object obj) {
std::unique_lock<std::mutex> lock(mMutex);
auto subscription = obj.find("subscription")->second.stringValue();
auto it = mSubscriptions.find(subscription);
if (it == mSubscriptions.end()) {
return;
}
auto watcher = it->second;
try {
handleFiles(watcher, obj);
watcher->notify();
} catch (WatcherError &err) {
handleWatcherError(err);
}
}
void WatchmanBackend::start() {
mIPC = watchmanConnect();
notifyStarted();
while (true) {
// If there are no subscriptions we are reading, wait for a request.
if (mSubscriptions.size() == 0) {
mRequestSignal.wait();
mRequestSignal.reset();
}
// Break out of loop if we are stopped.
if (mStopped) {
break;
}
// Attempt to read from the socket.
// If there is an error and we are stopped, break.
BSER b;
try {
b = watchmanRead(&*mIPC);
} catch (std::exception &err) {
if (mStopped) {
break;
} else if (mResponseSignal.isWaiting()) {
mError = err.what();
mResponseSignal.notify();
} else {
// Throwing causes the backend to be destroyed, but we never reach the code below to notify the signal
mEndedSignal.notify();
throw;
}
}
auto obj = b.objectValue();
auto error = obj.find("error");
if (error != obj.end()) {
mError = error->second.stringValue();
mResponseSignal.notify();
continue;
}
// If this message is for a subscription, handle it, otherwise notify the request.
auto subscription = obj.find("subscription");
if (subscription != obj.end()) {
handleSubscription(obj);
} else {
mResponse = obj;
mResponseSignal.notify();
}
}
mEndedSignal.notify();
}
WatchmanBackend::~WatchmanBackend() {
// Mark the watcher as stopped, close the socket, and trigger the lock.
// This will cause the read loop to be broken and the thread to exit.
mStopped = true;
mIPC.reset();
mRequestSignal.notify();
// If not ended yet, wait.
mEndedSignal.wait();
}
std::string WatchmanBackend::clock(WatcherRef watcher) {
BSER::Array cmd;
cmd.push_back("clock");
cmd.push_back(normalizePath(watcher->mDir));
BSER::Object obj = watchmanRequest(cmd);
auto found = obj.find("clock");
if (found == obj.end()) {
throw WatcherError("Error reading clock from watchman", watcher);
}
return found->second.stringValue();
}
void WatchmanBackend::writeSnapshot(WatcherRef watcher, std::string *snapshotPath) {
std::unique_lock<std::mutex> lock(mMutex);
watchmanWatch(watcher->mDir);
std::ofstream ofs(*snapshotPath);
ofs << clock(watcher);
}
void WatchmanBackend::getEventsSince(WatcherRef watcher, std::string *snapshotPath) {
std::unique_lock<std::mutex> lock(mMutex);
std::ifstream ifs(*snapshotPath);
if (ifs.fail()) {
return;
}
watchmanWatch(watcher->mDir);
std::string clock;
ifs >> clock;
BSER::Array cmd;
cmd.push_back("since");
cmd.push_back(normalizePath(watcher->mDir));
cmd.push_back(clock);
BSER::Object obj = watchmanRequest(cmd);
handleFiles(watcher, obj);
}
std::string getId(WatcherRef watcher) {
std::ostringstream id;
id << "parcel-";
id << static_cast<void*>(watcher.get());
return id.str();
}
// This function is called by Backend::watch which takes a lock on mMutex
void WatchmanBackend::subscribe(WatcherRef watcher) {
watchmanWatch(watcher->mDir);
std::string id = getId(watcher);
BSER::Array cmd;
cmd.push_back("subscribe");
cmd.push_back(normalizePath(watcher->mDir));
cmd.push_back(id);
BSER::Array fields;
fields.push_back("name");
fields.push_back("mode");
fields.push_back("exists");
fields.push_back("new");
BSER::Object opts;
opts.emplace("fields", fields);
opts.emplace("since", clock(watcher));
if (watcher->mIgnorePaths.size() > 0) {
BSER::Array ignore;
BSER::Array anyOf;
anyOf.push_back("anyof");
for (auto it = watcher->mIgnorePaths.begin(); it != watcher->mIgnorePaths.end(); it++) {
std::string pathStart = watcher->mDir + DIR_SEP;
if (it->rfind(pathStart, 0) == 0) {
auto relative = it->substr(pathStart.size());
BSER::Array dirname;
dirname.push_back("dirname");
dirname.push_back(relative);
anyOf.push_back(dirname);
}
}
ignore.push_back("not");
ignore.push_back(anyOf);
opts.emplace("expression", ignore);
}
cmd.push_back(opts);
watchmanRequest(cmd);
mSubscriptions.emplace(id, watcher);
mRequestSignal.notify();
}
// This function is called by Backend::unwatch which takes a lock on mMutex
void WatchmanBackend::unsubscribe(WatcherRef watcher) {
std::string id = getId(watcher);
auto erased = mSubscriptions.erase(id);
if (erased) {
BSER::Array cmd;
cmd.push_back("unsubscribe");
cmd.push_back(normalizePath(watcher->mDir));
cmd.push_back(id);
watchmanRequest(cmd);
}
}

View File

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

View File

@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.escape = void 0;
/**
* Escape all magic characters in a glob pattern.
*
* If the {@link MinimatchOptions.windowsPathsNoEscape}
* option is used, then characters are escaped by wrapping in `[]`, because
* a magic character wrapped in a character class can only be satisfied by
* that exact character. In this mode, `\` is _not_ escaped, because it is
* not interpreted as a magic character, but instead as a path separator.
*
* If the {@link MinimatchOptions.magicalBraces} option is used,
* then braces (`{` and `}`) will be escaped.
*/
const escape = (s, { windowsPathsNoEscape = false, magicalBraces = false, } = {}) => {
// don't need to escape +@! because we escape the parens
// that make those magic, and escaping ! as [!] isn't valid,
// because [!]] is a valid glob class meaning not ']'.
if (magicalBraces) {
return windowsPathsNoEscape ?
s.replace(/[?*()[\]{}]/g, '[$&]')
: s.replace(/[?*()[\]\\{}]/g, '\\$&');
}
return windowsPathsNoEscape ?
s.replace(/[?*()[\]]/g, '[$&]')
: s.replace(/[?*()[\]\\]/g, '\\$&');
};
exports.escape = escape;
//# sourceMappingURL=escape.js.map

View File

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

View File

@@ -0,0 +1,18 @@
/**
* Determine a breadcrumb's log level (only `warning` or `error`) based on an HTTP status code.
*/
function getBreadcrumbLogLevelFromHttpStatusCode(statusCode) {
// NOTE: undefined defaults to 'info' in Sentry
if (statusCode === undefined) {
return undefined;
} else if (statusCode >= 400 && statusCode < 500) {
return 'warning';
} else if (statusCode >= 500) {
return 'error';
} else {
return undefined;
}
}
export { getBreadcrumbLogLevelFromHttpStatusCode };
//# sourceMappingURL=breadcrumb-log-level.js.map

View File

@@ -0,0 +1,43 @@
{
"name": "yocto-queue",
"version": "0.1.0",
"description": "Tiny queue data structure",
"license": "MIT",
"repository": "sindresorhus/yocto-queue",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"engines": {
"node": ">=10"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"queue",
"data",
"structure",
"algorithm",
"queues",
"queuing",
"list",
"array",
"linkedlist",
"fifo",
"enqueue",
"dequeue",
"data-structure"
],
"devDependencies": {
"ava": "^2.4.0",
"tsd": "^0.13.1",
"xo": "^0.35.0"
}
}

View File

@@ -0,0 +1,8 @@
// ESM wrapper for pg-connection-string
import connectionString from '../index.js'
// Re-export the parse function
export default connectionString.parse
export const parse = connectionString.parse
export const toClientConfig = connectionString.toClientConfig
export const parseIntoClientConfig = connectionString.parseIntoClientConfig

View File

@@ -0,0 +1 @@
{"version":3,"file":"folder-x.js","sources":["../../../src/icons/folder-x.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FolderX\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjAgMjBhMiAyIDAgMCAwIDItMlY4YTIgMiAwIDAgMC0yLTJoLTcuOWEyIDIgMCAwIDEtMS42OS0uOUw5LjYgMy45QTIgMiAwIDAgMCA3LjkzIDNINGEyIDIgMCAwIDAtMiAydjEzYTIgMiAwIDAgMCAyIDJaIiAvPgogIDxwYXRoIGQ9Im05LjUgMTAuNSA1IDUiIC8+CiAgPHBhdGggZD0ibTE0LjUgMTAuNS01IDUiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/folder-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 FolderX = createLucideIcon('FolderX', [\n [\n 'path',\n {\n d: 'M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z',\n key: '1kt360',\n },\n ],\n ['path', { d: 'm9.5 10.5 5 5', key: 'ra9qjz' }],\n ['path', { d: 'm14.5 10.5-5 5', key: 'l2rkpq' }],\n]);\n\nexport default FolderX;\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,CAC1C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/gel-core/columns/duration.ts"],"sourcesContent":["import type { Duration } from 'gel';\nimport type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyGelTable } from '~/gel-core/table.ts';\nimport { GelColumn, GelColumnBuilder } from './common.ts';\n\nexport type GelDurationBuilderInitial<TName extends string> = GelDurationBuilder<{\n\tname: TName;\n\tdataType: 'duration';\n\tcolumnType: 'GelDuration';\n\tdata: Duration;\n\tdriverParam: Duration;\n\tenumValues: undefined;\n}>;\n\nexport class GelDurationBuilder<T extends ColumnBuilderBaseConfig<'duration', 'GelDuration'>>\n\textends GelColumnBuilder<T>\n{\n\tstatic override readonly [entityKind]: string = 'GelDurationBuilder';\n\n\tconstructor(\n\t\tname: T['name'],\n\t) {\n\t\tsuper(name, 'duration', 'GelDuration');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyGelTable<{ name: TTableName }>,\n\t): GelDuration<MakeColumnConfig<T, TTableName>> {\n\t\treturn new GelDuration<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class GelDuration<T extends ColumnBaseConfig<'duration', 'GelDuration'>> extends GelColumn<T> {\n\tstatic override readonly [entityKind]: string = 'GelDuration';\n\n\tgetSQLType(): string {\n\t\treturn `duration`;\n\t}\n}\n\nexport function duration(): GelDurationBuilderInitial<''>;\nexport function duration<TName extends string>(name: TName): GelDurationBuilderInitial<TName>;\nexport function duration(name?: string) {\n\treturn new GelDurationBuilder(name ?? '');\n}\n"],"mappings":"AAGA,SAAS,kBAAkB;AAE3B,SAAS,WAAW,wBAAwB;AAWrC,MAAM,2BACJ,iBACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEhD,YACC,MACC;AACD,UAAM,MAAM,YAAY,aAAa;AAAA,EACtC;AAAA;AAAA,EAGS,MACR,OAC+C;AAC/C,WAAO,IAAI,YAA6C,OAAO,KAAK,MAA8C;AAAA,EACnH;AACD;AAEO,MAAM,oBAA2E,UAAa;AAAA,EACpG,QAA0B,UAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAIO,SAAS,SAAS,MAAe;AACvC,SAAO,IAAI,mBAAmB,QAAQ,EAAE;AACzC;","names":[]}

View File

@@ -0,0 +1,7 @@
{
"name": "dom-helpers/clear",
"private": true,
"main": "../cjs/clear.js",
"module": "../esm/clear.js",
"types": "../esm/clear.d.ts"
}

View File

@@ -0,0 +1,20 @@
/**
* @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 CalendarClock = createLucideIcon("CalendarClock", [
["path", { d: "M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5", key: "1osxxc" }],
["path", { d: "M16 2v4", key: "4m81vk" }],
["path", { d: "M8 2v4", key: "1cmpym" }],
["path", { d: "M3 10h5", key: "r794hk" }],
["path", { d: "M17.5 17.5 16 16.3V14", key: "akvzfd" }],
["circle", { cx: "16", cy: "16", r: "6", key: "qoo3c4" }]
]);
export { CalendarClock as default };
//# sourceMappingURL=calendar-clock.js.map

View File

@@ -0,0 +1,38 @@
var copyObject = require('./_copyObject'),
createAssigner = require('./_createAssigner'),
keysIn = require('./keysIn');
/**
* This method is like `_.assignIn` except that it accepts `customizer`
* which is invoked to produce the assigned values. If `customizer` returns
* `undefined`, assignment is handled by the method instead. The `customizer`
* is invoked with five arguments: (objValue, srcValue, key, object, source).
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @alias extendWith
* @category Object
* @param {Object} object The destination object.
* @param {...Object} sources The source objects.
* @param {Function} [customizer] The function to customize assigned values.
* @returns {Object} Returns `object`.
* @see _.assignWith
* @example
*
* function customizer(objValue, srcValue) {
* return _.isUndefined(objValue) ? srcValue : objValue;
* }
*
* var defaults = _.partialRight(_.assignInWith, customizer);
*
* defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
* // => { 'a': 1, 'b': 2 }
*/
var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
copyObject(source, keysIn(source), object, customizer);
});
module.exports = assignInWith;

View File

@@ -0,0 +1,524 @@
import { addDays } from "date-fns/addDays";
import { addHours } from "date-fns/addHours";
import { addMinutes } from "date-fns/addMinutes";
import { addMonths } from "date-fns/addMonths";
import { addQuarters } from "date-fns/addQuarters";
import { addSeconds } from "date-fns/addSeconds";
import { addWeeks } from "date-fns/addWeeks";
import { addYears } from "date-fns/addYears";
import { getDate } from "date-fns/getDate";
import { getDay } from "date-fns/getDay";
import { getHours } from "date-fns/getHours";
import { getMinutes } from "date-fns/getMinutes";
import { getMonth } from "date-fns/getMonth";
import { getQuarter } from "date-fns/getQuarter";
import { getSeconds } from "date-fns/getSeconds";
import { getTime } from "date-fns/getTime";
import { getYear } from "date-fns/getYear";
import { isAfter } from "date-fns/isAfter";
import { isBefore } from "date-fns/isBefore";
import { isDate } from "date-fns/isDate";
import { set } from "date-fns/set";
import { setHours } from "date-fns/setHours";
import { setMinutes } from "date-fns/setMinutes";
import { setMonth } from "date-fns/setMonth";
import { setQuarter } from "date-fns/setQuarter";
import { setYear } from "date-fns/setYear";
import { subDays } from "date-fns/subDays";
import { subMonths } from "date-fns/subMonths";
import { subQuarters } from "date-fns/subQuarters";
import { subWeeks } from "date-fns/subWeeks";
import { subYears } from "date-fns/subYears";
import type { Day, Locale as DateFnsLocale } from "date-fns";
export type DateNumberType = Day;
interface LocaleObj extends Pick<DateFnsLocale, "options" | "formatLong" | "localize" | "match"> {
}
export type Locale = string | LocaleObj;
export declare enum KeyType {
ArrowUp = "ArrowUp",
ArrowDown = "ArrowDown",
ArrowLeft = "ArrowLeft",
ArrowRight = "ArrowRight",
PageUp = "PageUp",
PageDown = "PageDown",
Home = "Home",
End = "End",
Enter = "Enter",
Space = " ",
Tab = "Tab",
Escape = "Escape",
Backspace = "Backspace",
X = "x"
}
export declare const DEFAULT_YEAR_ITEM_NUMBER = 12;
export declare function newDate(value?: string | Date | number | null): Date;
/**
* Parses a date.
*
* @param value - The string representing the Date in a parsable form, e.g., ISO 1861
* @param dateFormat - The date format.
* @param locale - The locale.
* @param strictParsing - The strict parsing flag.
* @param minDate - The minimum date.
* @returns - The parsed date or null.
*/
export declare function parseDate(value: string, dateFormat: string | string[], locale: Locale | undefined, strictParsing: boolean, minDate?: Date): Date | null;
export { isDate, set };
/**
* Checks if a given date is valid and not before the minimum date.
* @param date - The date to be checked.
* @param minDate - The minimum date allowed. If not provided, defaults to "1/1/1800".
* @returns A boolean value indicating whether the date is valid and not before the minimum date.
*/
export declare function isValid(date: Date, minDate?: Date): boolean;
/**
* Formats a date.
*
* @param date - The date.
* @param formatStr - The format string.
* @param locale - The locale.
* @returns - The formatted date.
*/
export declare function formatDate(date: Date, formatStr: string, locale?: Locale): string;
/**
* Safely formats a date.
*
* @param date - The date.
* @param options - An object containing the dateFormat and locale.
* @returns - The formatted date or an empty string.
*/
export declare function safeDateFormat(date: Date | null | undefined, { dateFormat, locale }: {
dateFormat: string | string[];
locale?: Locale;
}): string;
/**
* Safely formats a date range.
*
* @param startDate - The start date.
* @param endDate - The end date.
* @param props - The props.
* @returns - The formatted date range or an empty string.
*/
export declare function safeDateRangeFormat(startDate: Date | null | undefined, endDate: Date | null | undefined, props: {
dateFormat: string | string[];
locale?: Locale;
}): string;
/**
* Safely formats multiple dates.
*
* @param dates - The dates.
* @param props - The props.
* @returns - The formatted dates or an empty string.
*/
export declare function safeMultipleDatesFormat(dates: Date[], props: {
dateFormat: string | string[];
locale?: Locale;
}): string;
/**
* Sets the time for a given date.
*
* @param date - The date.
* @param time - An object containing the hour, minute, and second.
* @returns - The date with the time set.
*/
export declare function setTime(date: Date, { hour, minute, second }: {
hour?: number | undefined;
minute?: number | undefined;
second?: number | undefined;
}): Date;
export { setMinutes, setHours, setMonth, setQuarter, setYear };
export { getSeconds, getMinutes, getHours, getMonth, getQuarter, getYear, getDay, getDate, getTime, };
/**
* Gets the week of the year for a given date.
*
* @param date - The date.
* @returns - The week of the year.
*/
export declare function getWeek(date: Date): number;
/**
* Gets the day of the week code for a given day.
*
* @param day - The day.
* @param locale - The locale.
* @returns - The day of the week code.
*/
export declare function getDayOfWeekCode(day: Date, locale?: Locale): string;
/**
* Gets the start of the day for a given date.
*
* @param date - The date.
* @returns - The start of the day.
*/
export declare function getStartOfDay(date: Date): Date;
/**
* Gets the start of the week for a given date.
*
* @param date - The date.
* @param locale - The locale.
* @param calendarStartDay - The day the calendar starts on.
* @returns - The start of the week.
*/
export declare function getStartOfWeek(date: Date, locale?: Locale, calendarStartDay?: Day): Date;
/**
* Gets the start of the month for a given date.
*
* @param date - The date.
* @returns - The start of the month.
*/
export declare function getStartOfMonth(date: Date): Date;
/**
* Gets the start of the year for a given date.
*
* @param date - The date.
* @returns - The start of the year.
*/
export declare function getStartOfYear(date: Date): Date;
/**
* Gets the start of the quarter for a given date.
*
* @param date - The date.
* @returns - The start of the quarter.
*/
export declare function getStartOfQuarter(date: Date): Date;
/**
* Gets the start of today.
*
* @returns - The start of today.
*/
export declare function getStartOfToday(): Date;
/**
* Gets the end of the day for a given date.
*
* @param date - The date.
* @returns - The end of the day.
*/
export declare function getEndOfDay(date: Date): Date;
/**
* Gets the end of the week for a given date.
*
* @param date - The date.
* @returns - The end of the week.
*/
export declare function getEndOfWeek(date: Date): Date;
/**
* Gets the end of the month for a given date.
*
* @param date - The date.
* @returns - The end of the month.
*/
export declare function getEndOfMonth(date: Date): Date;
export { addSeconds, addMinutes, addDays, addWeeks, addMonths, addQuarters, addYears, };
export { addHours, subDays, subWeeks, subMonths, subQuarters, subYears };
export { isBefore, isAfter };
/**
* Checks if two dates are in the same year.
*
* @param date1 - The first date.
* @param date2 - The second date.
* @returns - True if the dates are in the same year, false otherwise.
*/
export declare function isSameYear(date1: Date | null, date2: Date | null): boolean;
/**
* Checks if two dates are in the same month.
*
* @param date1 - The first date.
* @param date2 - The second date.
* @returns - True if the dates are in the same month, false otherwise.
*/
export declare function isSameMonth(date1: Date | null, date2?: Date | null): boolean;
/**
* Checks if two dates are in the same quarter.
*
* @param date1 - The first date.
* @param date2 - The second date.
* @returns - True if the dates are in the same quarter, false otherwise.
*/
export declare function isSameQuarter(date1: Date | null, date2: Date | null): boolean;
/**
* Checks if two dates are on the same day.
*
* @param date1 - The first date.
* @param date2 - The second date.
* @returns - True if the dates are on the same day, false otherwise.
*/
export declare function isSameDay(date1?: Date | null, date2?: Date | null): boolean;
/**
* Checks if two dates are equal.
*
* @param date1 - The first date.
* @param date2 - The second date.
* @returns - True if the dates are equal, false otherwise.
*/
export declare function isEqual(date1: Date | null | undefined, date2: Date | null | undefined): boolean;
/**
* Checks if a day is within a date range.
*
* @param day - The day to check.
* @param startDate - The start date of the range.
* @param endDate - The end date of the range.
* @returns - True if the day is within the range, false otherwise.
*/
export declare function isDayInRange(day: Date, startDate: Date, endDate: Date): boolean;
/**
* Gets the difference in days between two dates.
*
* @param date1 - The first date.
* @param date2 - The second date.
* @returns - The difference in days.
*/
export declare function getDaysDiff(date1: Date, date2: Date): number;
/**
* Registers a locale.
*
* @param localeName - The name of the locale.
* @param localeData - The data of the locale.
*/
export declare function registerLocale(localeName: string, localeData: LocaleObj): void;
/**
* Sets the default locale.
*
* @param localeName - The name of the locale.
*/
export declare function setDefaultLocale(localeName?: string): void;
/**
* Gets the default locale.
*
* @returns - The default locale.
*/
export declare function getDefaultLocale(): string | undefined;
/**
* Gets the locale object.
*
* @param localeSpec - The locale specification.
* @returns - The locale object.
*/
export declare function getLocaleObject(localeSpec?: Locale): LocaleObj | undefined;
/**
* Formats the weekday in a given locale.
*
* @param date - The date to format.
* @param formatFunc - The formatting function.
* @param locale - The locale to use for formatting.
* @returns - The formatted weekday.
*/
export declare function getFormattedWeekdayInLocale(date: Date, formatFunc: (date: string) => string, locale?: Locale): string;
/**
* Gets the minimum weekday in a given locale.
*
* @param date - The date to format.
* @param locale - The locale to use for formatting.
* @returns - The minimum weekday.
*/
export declare function getWeekdayMinInLocale(date: Date, locale?: Locale): string;
/**
* Gets the short weekday in a given locale.
*
* @param date - The date to format.
* @param locale - The locale to use for formatting.
* @returns - The short weekday.
*/
export declare function getWeekdayShortInLocale(date: Date, locale?: Locale): string;
/**
* Gets the month in a given locale.
*
* @param month - The month to format.
* @param locale - The locale to use for formatting.
* @returns - The month.
*/
export declare function getMonthInLocale(month: number, locale?: Locale): string;
/**
* Gets the short month in a given locale.
*
* @param month - The month to format.
* @param locale - The locale to use for formatting.
* @returns - The short month.
*/
export declare function getMonthShortInLocale(month: number, locale?: Locale): string;
/**
* Gets the short quarter in a given locale.
*
* @param quarter - The quarter to format.
* @param locale - The locale to use for formatting.
* @returns - The short quarter.
*/
export declare function getQuarterShortInLocale(quarter: number, locale?: Locale): string;
export interface DateFilterOptions {
minDate?: Date;
maxDate?: Date;
excludeDates?: {
date: Date;
message?: string;
}[] | Date[];
excludeDateIntervals?: {
start: Date;
end: Date;
}[];
includeDates?: Date[];
includeDateIntervals?: {
start: Date;
end: Date;
}[];
filterDate?: (date: Date) => boolean;
yearItemNumber?: number;
}
/**
* Checks if a day is disabled.
*
* @param day - The day to check.
* @param options - The options to consider when checking.
* @returns - Returns true if the day is disabled, false otherwise.
*/
export declare function isDayDisabled(day: Date, { minDate, maxDate, excludeDates, excludeDateIntervals, includeDates, includeDateIntervals, filterDate, }?: DateFilterOptions): boolean;
/**
* Checks if a day is excluded.
*
* @param day - The day to check.
* @param options - The options to consider when checking.
* @returns - Returns true if the day is excluded, false otherwise.
*/
export declare function isDayExcluded(day: Date, { excludeDates, excludeDateIntervals, }?: Pick<DateFilterOptions, "excludeDates" | "excludeDateIntervals">): boolean;
export declare function isMonthDisabled(month: Date, { minDate, maxDate, excludeDates, includeDates, filterDate, }?: Pick<DateFilterOptions, "minDate" | "maxDate" | "excludeDates" | "includeDates" | "filterDate">): boolean;
export declare function isMonthInRange(startDate: Date, endDate: Date, m: number, day: Date): boolean;
/**
* To check if a date's month and year are disabled/excluded
* @param date Date to check
* @returns {boolean} true if month and year are disabled/excluded, false otherwise
*/
export declare function isMonthYearDisabled(date: Date, { minDate, maxDate, excludeDates, includeDates, }?: Pick<DateFilterOptions, "minDate" | "maxDate" | "excludeDates" | "includeDates">): boolean;
export declare function isQuarterDisabled(quarter: Date, { minDate, maxDate, excludeDates, includeDates, filterDate, }?: Pick<DateFilterOptions, "minDate" | "maxDate" | "excludeDates" | "includeDates" | "filterDate">): boolean;
export declare function isYearInRange(year: number, start?: Date | null, end?: Date | null): boolean;
export declare function isYearDisabled(year: number, { minDate, maxDate, excludeDates, includeDates, filterDate, }?: Pick<DateFilterOptions, "minDate" | "maxDate" | "excludeDates" | "includeDates" | "filterDate">): boolean;
export declare function isQuarterInRange(startDate: Date, endDate: Date, q: number, day: Date): boolean;
export declare function isOutOfBounds(day: Date, { minDate, maxDate }?: Pick<DateFilterOptions, "minDate" | "maxDate">): boolean;
export declare function isTimeInList(time: Date, times: Date[]): boolean;
export interface TimeFilterOptions {
minTime?: Date;
maxTime?: Date;
excludeTimes?: Date[];
includeTimes?: Date[];
filterTime?: (time: Date) => boolean;
}
export declare function isTimeDisabled(time: Date, { excludeTimes, includeTimes, filterTime, }?: Pick<TimeFilterOptions, "excludeTimes" | "includeTimes" | "filterTime">): boolean;
export declare function isTimeInDisabledRange(time: Date, { minTime, maxTime }: Pick<TimeFilterOptions, "minTime" | "maxTime">): boolean;
export declare function monthDisabledBefore(day: Date, { minDate, includeDates, }?: Pick<DateFilterOptions, "minDate" | "includeDates">): boolean;
export declare function monthDisabledAfter(day: Date, { maxDate, includeDates, }?: Pick<DateFilterOptions, "maxDate" | "includeDates">): boolean;
export declare function quarterDisabledBefore(date: Date, { minDate, includeDates, }?: Pick<DateFilterOptions, "minDate" | "includeDates">): boolean;
export declare function quarterDisabledAfter(date: Date, { maxDate, includeDates, }?: Pick<DateFilterOptions, "maxDate" | "includeDates">): boolean;
export declare function yearDisabledBefore(day: Date, { minDate, includeDates, }?: Pick<DateFilterOptions, "minDate" | "includeDates">): boolean;
export declare function yearsDisabledBefore(day: Date, { minDate, yearItemNumber, }?: Pick<DateFilterOptions, "minDate" | "yearItemNumber">): boolean;
export declare function yearDisabledAfter(day: Date, { maxDate, includeDates, }?: Pick<DateFilterOptions, "maxDate" | "includeDates">): boolean;
export declare function yearsDisabledAfter(day: Date, { maxDate, yearItemNumber, }?: Pick<DateFilterOptions, "maxDate" | "yearItemNumber">): boolean;
export declare function getEffectiveMinDate({ minDate, includeDates, }: Pick<DateFilterOptions, "minDate" | "includeDates">): Date | undefined;
export declare function getEffectiveMaxDate({ maxDate, includeDates, }: Pick<DateFilterOptions, "maxDate" | "includeDates">): Date | undefined;
export interface HighlightDate {
[className: string]: Date[];
}
/**
* Get a map of highlighted dates with their corresponding classes.
* @param highlightDates The dates to highlight.
* @param defaultClassName The default class to use for highlighting.
* @returns A map with dates as keys and arrays of class names as values.
*/
export declare function getHighLightDaysMap(highlightDates?: (Date | HighlightDate)[], defaultClassName?: string): Map<string, string[]>;
/**
* Compare the two arrays
* @param array1 The first array to compare.
* @param array2 The second array to compare.
* @returns true, if the passed arrays are equal, false otherwise.
*/
export declare function arraysAreEqual<T>(array1: T[], array2: T[]): boolean;
export interface HolidayItem {
date: Date;
holidayName: string;
}
interface ClassNamesObj {
className: string;
holidayNames: string[];
}
export type HolidaysMap = Map<string, ClassNamesObj>;
/**
* Assign the custom class to each date
* @param holidayDates array of object containing date and name of the holiday
* @param defaultClassName className to be added.
* @returns Map containing date as key and array of className and holiday name as value
*/
export declare function getHolidaysMap(holidayDates?: HolidayItem[], defaultClassName?: string): HolidaysMap;
/**
* Determines the times to inject after a given start of day, current time, and multiplier.
* @param startOfDay The start of the day.
* @param currentTime The current time.
* @param currentMultiplier The current multiplier.
* @param intervals The intervals.
* @param injectedTimes The times to potentially inject.
* @returns An array of times to inject.
*/
export declare function timesToInjectAfter(startOfDay: Date, currentTime: Date, currentMultiplier: number, intervals: number, injectedTimes: Date[]): Date[];
/**
* Adds a leading zero to a number if it's less than 10.
* @param i The number to add a leading zero to.
* @returns The number as a string, with a leading zero if it was less than 10.
*/
export declare function addZero(i: number): string;
/**
* Gets the start and end years for a period.
* @param date The date to get the period for.
* @param yearItemNumber The number of years in the period. Defaults to DEFAULT_YEAR_ITEM_NUMBER.
* @returns An object with the start and end years for the period.
*/
export declare function getYearsPeriod(date: Date, yearItemNumber?: number): {
startPeriod: number;
endPeriod: number;
};
/**
* Gets the number of hours in a day.
* @param d The date to get the number of hours for.
* @returns The number of hours in the day.
*/
export declare function getHoursInDay(d: Date): number;
/**
* Returns the start of the minute for the given date
*
* NOTE: this function is a DST and timezone-safe analog of `date-fns/startOfMinute`
* do not make changes unless you know what you're doing
*
* See comments on https://github.com/Hacker0x01/react-datepicker/pull/4244
* for more details
*
* @param d date
* @returns start of the minute
*/
export declare function startOfMinute(d: Date): Date;
/**
* Returns whether the given dates are in the same minute
*
* This function is a DST and timezone-safe analog of `date-fns/isSameMinute`
*
* @param d1
* @param d2
* @returns
*/
export declare function isSameMinute(d1: Date, d2: Date): boolean;
/**
* Returns a new datetime object representing the input date with midnight time
* @param date The date to get the midnight time for
* @returns A new datetime object representing the input date with midnight time
*/
export declare function getMidnightDate(date: Date): Date;
/**
* Is the first date before the second one?
* @param date The date that should be before the other one to return true
* @param dateToCompare The date to compare with
* @returns The first date is before the second date
*
* Note:
* This function considers the mid-night of the given dates for comparison.
* It evaluates whether date is before dateToCompare based on their mid-night timestamps.
*/
export declare function isDateBefore(date: Date, dateToCompare: Date): boolean;
/**
* Checks if the space key was pressed down.
*
* @param event - The keyboard event.
* @returns - Returns true if the space key was pressed down, false otherwise.
*/
export declare function isSpaceKeyDown(event: React.KeyboardEvent<HTMLDivElement>): boolean;

View File

@@ -0,0 +1,14 @@
const LANGCHAIN_INTEGRATION_NAME = 'LangChain';
const LANGCHAIN_ORIGIN = 'auto.ai.langchain';
const ROLE_MAP = {
human: 'user',
ai: 'assistant',
assistant: 'assistant',
system: 'system',
function: 'function',
tool: 'tool',
};
export { LANGCHAIN_INTEGRATION_NAME, LANGCHAIN_ORIGIN, ROLE_MAP };
//# sourceMappingURL=constants.js.map

View File

@@ -0,0 +1,288 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.SHOULD_STOP = exports.SHOULD_SKIP = exports.REMOVED = void 0;
var virtualTypes = require("./lib/virtual-types.js");
var _debug = require("debug");
var _index = require("../index.js");
var _index2 = require("../scope/index.js");
var _t = require("@babel/types");
var t = _t;
var cache = require("../cache.js");
var _generator = require("@babel/generator");
var NodePath_ancestry = require("./ancestry.js");
var NodePath_inference = require("./inference/index.js");
var NodePath_replacement = require("./replacement.js");
var NodePath_evaluation = require("./evaluation.js");
var NodePath_conversion = require("./conversion.js");
var NodePath_introspection = require("./introspection.js");
var _context = require("./context.js");
var NodePath_context = _context;
var NodePath_removal = require("./removal.js");
var NodePath_modification = require("./modification.js");
var NodePath_family = require("./family.js");
var NodePath_comments = require("./comments.js");
var NodePath_virtual_types_validator = require("./lib/virtual-types-validator.js");
const {
validate
} = _t;
const debug = _debug("babel");
const REMOVED = exports.REMOVED = 1 << 0;
const SHOULD_STOP = exports.SHOULD_STOP = 1 << 1;
const SHOULD_SKIP = exports.SHOULD_SKIP = 1 << 2;
const NodePath_Final = exports.default = class NodePath {
constructor(hub, parent) {
this.contexts = [];
this.state = null;
this._traverseFlags = 0;
this.skipKeys = null;
this.parentPath = null;
this.container = null;
this.listKey = null;
this.key = null;
this.node = null;
this.type = null;
this._store = null;
this.parent = parent;
this.hub = hub;
this.data = null;
this.context = null;
this.scope = null;
}
get removed() {
return (this._traverseFlags & 1) > 0;
}
set removed(v) {
if (v) this._traverseFlags |= 1;else this._traverseFlags &= -2;
}
get shouldStop() {
return (this._traverseFlags & 2) > 0;
}
set shouldStop(v) {
if (v) this._traverseFlags |= 2;else this._traverseFlags &= -3;
}
get shouldSkip() {
return (this._traverseFlags & 4) > 0;
}
set shouldSkip(v) {
if (v) this._traverseFlags |= 4;else this._traverseFlags &= -5;
}
static get({
hub,
parentPath,
parent,
container,
listKey,
key
}) {
if (!hub && parentPath) {
hub = parentPath.hub;
}
if (!parent) {
throw new Error("To get a node path the parent needs to exist");
}
const targetNode = container[key];
const paths = cache.getOrCreateCachedPaths(parent, parentPath);
let path = paths.get(targetNode);
if (!path) {
path = new NodePath(hub, parent);
if (targetNode) paths.set(targetNode, path);
}
_context.setup.call(path, parentPath, container, listKey, key);
return path;
}
getScope(scope) {
return this.isScope() ? new _index2.default(this) : scope;
}
setData(key, val) {
if (this.data == null) {
this.data = Object.create(null);
}
return this.data[key] = val;
}
getData(key, def) {
if (this.data == null) {
this.data = Object.create(null);
}
let val = this.data[key];
if (val === undefined && def !== undefined) val = this.data[key] = def;
return val;
}
hasNode() {
return this.node != null;
}
buildCodeFrameError(msg, Error = SyntaxError) {
return this.hub.buildError(this.node, msg, Error);
}
traverse(visitor, state) {
(0, _index.default)(this.node, visitor, this.scope, state, this);
}
set(key, node) {
validate(this.node, key, node);
this.node[key] = node;
}
getPathLocation() {
const parts = [];
let path = this;
do {
let key = path.key;
if (path.inList) key = `${path.listKey}[${key}]`;
parts.unshift(key);
} while (path = path.parentPath);
return parts.join(".");
}
debug(message) {
if (!debug.enabled) return;
debug(`${this.getPathLocation()} ${this.type}: ${message}`);
}
toString() {
return (0, _generator.default)(this.node).code;
}
get inList() {
return !!this.listKey;
}
set inList(inList) {
if (!inList) {
this.listKey = null;
}
}
get parentKey() {
return this.listKey || this.key;
}
};
const methods = {
findParent: NodePath_ancestry.findParent,
find: NodePath_ancestry.find,
getFunctionParent: NodePath_ancestry.getFunctionParent,
getStatementParent: NodePath_ancestry.getStatementParent,
getEarliestCommonAncestorFrom: NodePath_ancestry.getEarliestCommonAncestorFrom,
getDeepestCommonAncestorFrom: NodePath_ancestry.getDeepestCommonAncestorFrom,
getAncestry: NodePath_ancestry.getAncestry,
isAncestor: NodePath_ancestry.isAncestor,
isDescendant: NodePath_ancestry.isDescendant,
inType: NodePath_ancestry.inType,
getTypeAnnotation: NodePath_inference.getTypeAnnotation,
isBaseType: NodePath_inference.isBaseType,
couldBeBaseType: NodePath_inference.couldBeBaseType,
baseTypeStrictlyMatches: NodePath_inference.baseTypeStrictlyMatches,
isGenericType: NodePath_inference.isGenericType,
replaceWithMultiple: NodePath_replacement.replaceWithMultiple,
replaceWithSourceString: NodePath_replacement.replaceWithSourceString,
replaceWith: NodePath_replacement.replaceWith,
replaceExpressionWithStatements: NodePath_replacement.replaceExpressionWithStatements,
replaceInline: NodePath_replacement.replaceInline,
evaluateTruthy: NodePath_evaluation.evaluateTruthy,
evaluate: NodePath_evaluation.evaluate,
toComputedKey: NodePath_conversion.toComputedKey,
ensureBlock: NodePath_conversion.ensureBlock,
unwrapFunctionEnvironment: NodePath_conversion.unwrapFunctionEnvironment,
arrowFunctionToExpression: NodePath_conversion.arrowFunctionToExpression,
splitExportDeclaration: NodePath_conversion.splitExportDeclaration,
ensureFunctionName: NodePath_conversion.ensureFunctionName,
matchesPattern: NodePath_introspection.matchesPattern,
isStatic: NodePath_introspection.isStatic,
isNodeType: NodePath_introspection.isNodeType,
canHaveVariableDeclarationOrExpression: NodePath_introspection.canHaveVariableDeclarationOrExpression,
canSwapBetweenExpressionAndStatement: NodePath_introspection.canSwapBetweenExpressionAndStatement,
isCompletionRecord: NodePath_introspection.isCompletionRecord,
isStatementOrBlock: NodePath_introspection.isStatementOrBlock,
referencesImport: NodePath_introspection.referencesImport,
getSource: NodePath_introspection.getSource,
willIMaybeExecuteBefore: NodePath_introspection.willIMaybeExecuteBefore,
_guessExecutionStatusRelativeTo: NodePath_introspection._guessExecutionStatusRelativeTo,
resolve: NodePath_introspection.resolve,
isConstantExpression: NodePath_introspection.isConstantExpression,
isInStrictMode: NodePath_introspection.isInStrictMode,
isDenylisted: NodePath_context.isDenylisted,
visit: NodePath_context.visit,
skip: NodePath_context.skip,
skipKey: NodePath_context.skipKey,
stop: NodePath_context.stop,
setContext: NodePath_context.setContext,
requeue: NodePath_context.requeue,
requeueComputedKeyAndDecorators: NodePath_context.requeueComputedKeyAndDecorators,
remove: NodePath_removal.remove,
insertBefore: NodePath_modification.insertBefore,
insertAfter: NodePath_modification.insertAfter,
unshiftContainer: NodePath_modification.unshiftContainer,
pushContainer: NodePath_modification.pushContainer,
getOpposite: NodePath_family.getOpposite,
getCompletionRecords: NodePath_family.getCompletionRecords,
getSibling: NodePath_family.getSibling,
getPrevSibling: NodePath_family.getPrevSibling,
getNextSibling: NodePath_family.getNextSibling,
getAllNextSiblings: NodePath_family.getAllNextSiblings,
getAllPrevSiblings: NodePath_family.getAllPrevSiblings,
get: NodePath_family.get,
getAssignmentIdentifiers: NodePath_family.getAssignmentIdentifiers,
getBindingIdentifiers: NodePath_family.getBindingIdentifiers,
getOuterBindingIdentifiers: NodePath_family.getOuterBindingIdentifiers,
getBindingIdentifierPaths: NodePath_family.getBindingIdentifierPaths,
getOuterBindingIdentifierPaths: NodePath_family.getOuterBindingIdentifierPaths,
shareCommentsWithSiblings: NodePath_comments.shareCommentsWithSiblings,
addComment: NodePath_comments.addComment,
addComments: NodePath_comments.addComments
};
Object.assign(NodePath_Final.prototype, methods);
NodePath_Final.prototype.arrowFunctionToShadowed = NodePath_conversion[String("arrowFunctionToShadowed")];
Object.assign(NodePath_Final.prototype, {
has: NodePath_introspection[String("has")],
is: NodePath_introspection[String("is")],
isnt: NodePath_introspection[String("isnt")],
equals: NodePath_introspection[String("equals")],
hoist: NodePath_modification[String("hoist")],
updateSiblingKeys: NodePath_modification.updateSiblingKeys,
call: NodePath_context.call,
isBlacklisted: NodePath_context[String("isBlacklisted")],
setScope: NodePath_context.setScope,
resync: NodePath_context.resync,
popContext: NodePath_context.popContext,
pushContext: NodePath_context.pushContext,
setup: NodePath_context.setup,
setKey: NodePath_context.setKey
});
NodePath_Final.prototype._guessExecutionStatusRelativeToDifferentFunctions = NodePath_introspection._guessExecutionStatusRelativeTo;
NodePath_Final.prototype._guessExecutionStatusRelativeToDifferentFunctions = NodePath_introspection._guessExecutionStatusRelativeTo;
Object.assign(NodePath_Final.prototype, {
_getTypeAnnotation: NodePath_inference._getTypeAnnotation,
_replaceWith: NodePath_replacement._replaceWith,
_resolve: NodePath_introspection._resolve,
_call: NodePath_context._call,
_resyncParent: NodePath_context._resyncParent,
_resyncKey: NodePath_context._resyncKey,
_resyncList: NodePath_context._resyncList,
_resyncRemoved: NodePath_context._resyncRemoved,
_getQueueContexts: NodePath_context._getQueueContexts,
_removeFromScope: NodePath_removal._removeFromScope,
_callRemovalHooks: NodePath_removal._callRemovalHooks,
_remove: NodePath_removal._remove,
_markRemoved: NodePath_removal._markRemoved,
_assertUnremoved: NodePath_removal._assertUnremoved,
_containerInsert: NodePath_modification._containerInsert,
_containerInsertBefore: NodePath_modification._containerInsertBefore,
_containerInsertAfter: NodePath_modification._containerInsertAfter,
_verifyNodeList: NodePath_modification._verifyNodeList,
_getKey: NodePath_family._getKey,
_getPattern: NodePath_family._getPattern
});
for (const type of t.TYPES) {
const typeKey = `is${type}`;
const fn = t[typeKey];
NodePath_Final.prototype[typeKey] = function (opts) {
return fn(this.node, opts);
};
NodePath_Final.prototype[`assert${type}`] = function (opts) {
if (!fn(this.node, opts)) {
throw new TypeError(`Expected node path of type ${type}`);
}
};
}
Object.assign(NodePath_Final.prototype, NodePath_virtual_types_validator);
for (const type of Object.keys(virtualTypes)) {
if (type.startsWith("_")) continue;
if (!t.TYPES.includes(type)) t.TYPES.push(type);
}
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,54 @@
import { Parser } from "../Parser.js";
import { dayPeriodEnumToHours } from "../utils.js";
export class AMPMMidnightParser extends Parser {
priority = 80;
parse(dateString, token, match) {
switch (token) {
case "b":
case "bb":
case "bbb":
return (
match.dayPeriod(dateString, {
width: "abbreviated",
context: "formatting",
}) ||
match.dayPeriod(dateString, {
width: "narrow",
context: "formatting",
})
);
case "bbbbb":
return match.dayPeriod(dateString, {
width: "narrow",
context: "formatting",
});
case "bbbb":
default:
return (
match.dayPeriod(dateString, {
width: "wide",
context: "formatting",
}) ||
match.dayPeriod(dateString, {
width: "abbreviated",
context: "formatting",
}) ||
match.dayPeriod(dateString, {
width: "narrow",
context: "formatting",
})
);
}
}
set(date, _flags, value) {
date.setHours(dayPeriodEnumToHours(value), 0, 0, 0);
return date;
}
incompatibleTokens = ["a", "B", "H", "k", "t", "T"];
}

View File

@@ -0,0 +1,33 @@
var baseFlatten = require('./_baseFlatten'),
toInteger = require('./toInteger');
/**
* Recursively flatten `array` up to `depth` times.
*
* @static
* @memberOf _
* @since 4.4.0
* @category Array
* @param {Array} array The array to flatten.
* @param {number} [depth=1] The maximum recursion depth.
* @returns {Array} Returns the new flattened array.
* @example
*
* var array = [1, [2, [3, [4]], 5]];
*
* _.flattenDepth(array, 1);
* // => [1, 2, [3, [4]], 5]
*
* _.flattenDepth(array, 2);
* // => [1, 2, 3, [4], 5]
*/
function flattenDepth(array, depth) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
depth = depth === undefined ? 1 : toInteger(depth);
return baseFlatten(array, depth);
}
module.exports = flattenDepth;

View File

@@ -0,0 +1 @@
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/v4-v5/utils.ts"],"names":[],"mappings":";;;AAgBA,8EAI6C;AAC7C,wCAOoB;AACpB,oEAAkE;AAElE,SAAgB,mBAAmB,CACjC,IAAgB,EAChB,OAAY,EACZ,gBAAkC;IAElC,MAAM,UAAU,GAAe,EAAE,CAAC;IAElC,IAAI,gBAAgB,GAAG,kCAAgB,CAAC,GAAG,EAAE;QAC3C,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE;YACxB,CAAC,wBAAc,CAAC,EAAE,+BAAqB;YACvC,CAAC,4BAAkB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI;YAC3C,CAAC,4BAAkB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI;YAC3C,CAAC,mCAAyB,CAAC,EACzB,gDAAgD,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC;SACvE,CAAC,CAAC;KACJ;IAED,IAAI,gBAAgB,GAAG,kCAAgB,CAAC,MAAM,EAAE;QAC9C,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE;YACxB,CAAC,0CAAmB,CAAC,EAAE,oCAA0B;YACjD,CAAC,0CAAmB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI;YAC5C,CAAC,uCAAgB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI;SAC1C,CAAC,CAAC;KACJ;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AA1BD,kDA0BC;AAED;;;;;;GAMG;AACH,SAAS,gDAAgD,CACvD,IAAgB,EAChB,GAAa;IAEb,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,GAAG,EAAE;QACnC,OAAO;KACR;IAED,IAAI;QACF,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;QACvB,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAClC,CAAC,CAAC,QAAQ,GAAG,EAAE,CAAC;QAChB,CAAC,CAAC,QAAQ,GAAG,EAAE,CAAC;QAChB,OAAO,CAAC,CAAC,IAAI,CAAC;KACf;IAAC,OAAO,GAAG,EAAE;QACZ,IAAI,CAAC,KAAK,CAAC,yCAAyC,EAAE,GAAG,CAAC,CAAC;KAC5D;IACD,OAAO;AACT,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 */\nimport { Attributes, DiagLogger } from '@opentelemetry/api';\nimport {\n ATTR_DB_SYSTEM_NAME,\n ATTR_SERVER_ADDRESS,\n ATTR_SERVER_PORT,\n} from '@opentelemetry/semantic-conventions';\nimport {\n ATTR_DB_SYSTEM,\n ATTR_DB_CONNECTION_STRING,\n ATTR_NET_PEER_NAME,\n ATTR_NET_PEER_PORT,\n DB_SYSTEM_VALUE_REDIS,\n DB_SYSTEM_NAME_VALUE_REDIS,\n} from '../semconv';\nimport { SemconvStability } from '@opentelemetry/instrumentation';\n\nexport function getClientAttributes(\n diag: DiagLogger,\n options: any,\n semconvStability: SemconvStability\n): Attributes {\n const attributes: Attributes = {};\n\n if (semconvStability & SemconvStability.OLD) {\n Object.assign(attributes, {\n [ATTR_DB_SYSTEM]: DB_SYSTEM_VALUE_REDIS,\n [ATTR_NET_PEER_NAME]: options?.socket?.host,\n [ATTR_NET_PEER_PORT]: options?.socket?.port,\n [ATTR_DB_CONNECTION_STRING]:\n removeCredentialsFromDBConnectionStringAttribute(diag, options?.url),\n });\n }\n\n if (semconvStability & SemconvStability.STABLE) {\n Object.assign(attributes, {\n [ATTR_DB_SYSTEM_NAME]: DB_SYSTEM_NAME_VALUE_REDIS,\n [ATTR_SERVER_ADDRESS]: options?.socket?.host,\n [ATTR_SERVER_PORT]: options?.socket?.port,\n });\n }\n\n return attributes;\n}\n\n/**\n * removeCredentialsFromDBConnectionStringAttribute removes basic auth from url and user_pwd from query string\n *\n * Examples:\n * redis://user:pass@localhost:6379/mydb => redis://localhost:6379/mydb\n * redis://localhost:6379?db=mydb&user_pwd=pass => redis://localhost:6379?db=mydb\n */\nfunction removeCredentialsFromDBConnectionStringAttribute(\n diag: DiagLogger,\n url?: unknown\n): string | undefined {\n if (typeof url !== 'string' || !url) {\n return;\n }\n\n try {\n const u = new URL(url);\n u.searchParams.delete('user_pwd');\n u.username = '';\n u.password = '';\n return u.href;\n } catch (err) {\n diag.error('failed to sanitize redis connection url', err);\n }\n return;\n}\n"]}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/admin/functions/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AACrE,OAAO,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAA;AACpE,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,UAAU,EACV,oBAAoB,EACrB,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAA;AAEnF,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAE5B,OAAO,EAAE,OAAO,CAAA;IAEhB,YAAY,EAAE,iBAAiB,CAAA;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,oBAAoB,CAAA;IACjC,GAAG,EAAE,cAAc,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,EAAE,SAAS,CAAA;CACrB,GAAG,IAAI,CAAC,aAAa,EAAE,SAAS,GAAG,QAAQ,GAAG,aAAa,GAAG,KAAK,CAAC,CAAA;AAErE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC7B,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC7B,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG,CAAC,IAAI,EAAE,wBAAwB,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAA;AAEjG,MAAM,MAAM,cAAc,CACxB,KAAK,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9C,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,IACtC,CAAC,IAAI,EAAE,yBAAyB,GAAG,KAAK,KAAK,WAAW,CAAA;AAE5D,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,cAAc,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,CAClC,IAAI,EAAE;IACJ,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,eAAe,CAAA;IAClD,SAAS,EAAE,SAAS,CAAA;IACpB;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAA;CAC3D,GAAG,wBAAwB,KACzB,OAAO,CAAC,OAAO,CAAC,CAAA;AAErB,MAAM,MAAM,SAAS,GAAG;IAKtB,OAAO,CAAC,EAAE,cAAc,CAAA;IAKxB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IAIxC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAE3B,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,cAAc,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACjC,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAA;IAC5B,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,kBAAkB,EAAE,MAAM,CAAA;IAC1B,MAAM,CAAC,EAAE;QACP,cAAc,EAAE,cAAc,CAAA;QAC9B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;QACnB,QAAQ,EAAE,MAAM,CAAA;KACjB,CAAA;IACD,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,eAAe,CAAC,EAAE,WAAW,GAAG,SAAS,CAAA;CAC1C,CAAA;AAED,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,EAAE,KAAK,CAAC,SAAS,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,oCAAoC,GAAG;IACjD;;;OAGG;IACH,cAAc,EAAE,OAAO,CAAA;IACvB;;;;;;OAMG;IACH,oBAAoB,EAAE,cAAc,EAAE,CAAA;IACtC;;OAEG;IACH,SAAS,EAAE,MAAM,GAAG,MAAM,CAAA;IAC1B;;;;OAIG;IACH,yBAAyB,EAAE,cAAc,EAAE,CAAA;IAC3C;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;IACrC,GAAG,EAAE,cAAc,CAAA;IACnB;;OAEG;IACH,IAAI,EAAE,cAAc,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,IAAI,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAA;CAC1B,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA"}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utilities/telemetry/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAM7D,MAAM,MAAM,SAAS,GAAG;IACtB,MAAM,EAAE,IAAI,GAAG,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,IAAI,GAAG,MAAM,CAAA;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,yBAAyB,EAAE,IAAI,GAAG,MAAM,CAAA;IACxC,mBAAmB,EAAE,OAAO,CAAA;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,EAAE,MAAM,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,eAAe,EAAE,KAAK,GAAG,KAAK,GAAG,aAAa,GAAG,WAAW,CAAA;IAC5D,cAAc,EAAE,MAAM,EAAE,CAAA;CACzB,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;IAChD,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,KAAK,cAAc,GAAG,cAAc,GAAG,eAAe,CAAA;AAEtD,KAAK,IAAI,GAAG;IACV,KAAK,EAAE,cAAc,CAAA;IACrB,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAID,eAAO,MAAM,SAAS,uBAA8B,IAAI,KAAG,OAAO,CAAC,IAAI,CA2CtE,CAAA;AAiFD,eAAO,MAAM,iBAAiB,gBAAiB,WAAW,KAAG,MAE5D,CAAA;AAED,eAAO,MAAM,mBAAmB,YACrB,OAAO,KACf,IAAI,CAAC,SAAS,EAAE,SAAS,GAAG,2BAA2B,GAAG,qBAAqB,CAcjF,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,8EAAsF;AACtF,uCAAwD;AAMjD,MAAM,YAAY,GAAG,CAAC,MAAW,EAAE,EAAE;IAC1C,IAAI,MAAM,EAAE;QACV,IAAI,MAAM,CAAC,MAAM,EAAE;YACjB,IAAI,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE;gBAC9B,OAAO,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;aACvD;iBAAM,IAAI,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE;gBAClC,OAAO,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;aACrE;SACF;QACD,IAAI,MAAM,CAAC,OAAO,EAAE;YAClB,OAAO,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;SACrD;KACF;IACD,OAAO,GAAG,EAAE,CAAC,kBAAkB,CAAC;AAClC,CAAC,CAAC;AAdW,QAAA,YAAY,gBAcvB;AAEF,SAAgB,0BAA0B,CACxC,GAAc,EACd,OAAe;IAEf,IAAI,CAAC,CAAC,GAAG,IAAI,GAAG,YAAY,KAAK,CAAC,EAAE;QAClC,OAAO,GAAG,CAAC;KACZ;IAED,OAAO;QACL,OAAO;QACP,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,KAAK,EAAE,GAAG,CAAC,KAAK;QAChB,IAAI,EAAE,GAAG,CAAC,IAAI;KACf,CAAC;AACJ,CAAC;AAdD,gEAcC;AAED,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC;IACxB,CAAC,SAAS,EAAE,qCAA2B,CAAC;IACxC,CAAC,IAAI,EAAE,sDAA+B,CAAC;CACxC,CAAC,CAAC;AAEI,MAAM,SAAS,GAAG,CAAC,UAAkB,EAAE,EAAE;IAC9C,OAAO,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC;AACjD,CAAC,CAAC;AAFW,QAAA,SAAS,aAEpB;AAEK,MAAM,OAAO,GAAG,CAAC,EAAU,EAAE,SAAkB,EAAE,KAAc,EAAE,EAAE;IACxE,IAAI,SAAS,EAAE;QACb,IAAI,KAAK,EAAE;YACT,OAAO,GAAG,SAAS,IAAI,EAAE,IAAI,KAAK,EAAE,CAAC;SACtC;QACD,OAAO,GAAG,SAAS,IAAI,EAAE,EAAE,CAAC;KAC7B;IACD,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AARW,QAAA,OAAO,WAQlB;AAEK,MAAM,WAAW,GAAG,CAAC,GAAW,EAAE,SAAiB,EAAE,EAAE;IAC5D,IACE,OAAO,GAAG,KAAK,QAAQ;QACvB,OAAO,SAAS,KAAK,QAAQ;QAC7B,CAAC,GAAG,SAAS;QACb,SAAS,GAAG,GAAG,CAAC,MAAM,EACtB;QACA,OAAO,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG,IAAI,CAAC;KAC3C;IACD,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAVW,QAAA,WAAW,eAUtB;AAEK,MAAM,gBAAgB,GAAG,CAAC,OAAY,EAAU,EAAE;IACvD,MAAM,KAAK,GAAG,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC;IACtC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC7B,OAAO,IAAA,wBAAgB,EAAC,KAAK,CAAC,CAAC;KAChC;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AANW,QAAA,gBAAgB,oBAM3B","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Exception } from '@opentelemetry/api';\nimport { DB_SYSTEM_NAME_VALUE_POSTGRESQL } from '@opentelemetry/semantic-conventions';\nimport { DB_SYSTEM_NAME_VALUE_SQLITE } from './semconv';\n\ntype KnexError = Error & {\n code?: string;\n};\n\nexport const getFormatter = (runner: any) => {\n if (runner) {\n if (runner.client) {\n if (runner.client._formatQuery) {\n return runner.client._formatQuery.bind(runner.client);\n } else if (runner.client.SqlString) {\n return runner.client.SqlString.format.bind(runner.client.SqlString);\n }\n }\n if (runner.builder) {\n return runner.builder.toString.bind(runner.builder);\n }\n }\n return () => '<noop formatter>';\n};\n\nexport function otelExceptionFromKnexError(\n err: KnexError,\n message: string\n): Exception {\n if (!(err && err instanceof Error)) {\n return err;\n }\n\n return {\n message,\n code: err.code,\n stack: err.stack,\n name: err.name,\n };\n}\n\nconst systemMap = new Map([\n ['sqlite3', DB_SYSTEM_NAME_VALUE_SQLITE],\n ['pg', DB_SYSTEM_NAME_VALUE_POSTGRESQL],\n]);\n\nexport const mapSystem = (knexSystem: string) => {\n return systemMap.get(knexSystem) || knexSystem;\n};\n\nexport const getName = (db: string, operation?: string, table?: string) => {\n if (operation) {\n if (table) {\n return `${operation} ${db}.${table}`;\n }\n return `${operation} ${db}`;\n }\n return db;\n};\n\nexport const limitLength = (str: string, maxLength: number) => {\n if (\n typeof str === 'string' &&\n typeof maxLength === 'number' &&\n 0 < maxLength &&\n maxLength < str.length\n ) {\n return str.substring(0, maxLength) + '..';\n }\n return str;\n};\n\nexport const extractTableName = (builder: any): string => {\n const table = builder?._single?.table;\n if (typeof table === 'object') {\n return extractTableName(table);\n }\n return table;\n};\n"]}

View File

@@ -0,0 +1,15 @@
import ExtractionCompiler from './ExtractionCompiler.js';
import MessageExtractor from './extractor/MessageExtractor.js';
import { getDefaultProjectRoot } from './utils.js';
async function extractMessages(params) {
const compiler = new ExtractionCompiler(params, {
extractor: new MessageExtractor({
isDevelopment: false,
projectRoot: getDefaultProjectRoot()
})
});
await compiler.extractAll();
}
export { extractMessages as default };

View File

@@ -0,0 +1,9 @@
import type { EdgeRouteHandler } from '../edge/types';
/**
* Wraps Next.js middleware with Sentry error and performance instrumentation.
*
* @param middleware The middleware handler.
* @returns a wrapped middleware handler.
*/
export declare function wrapMiddlewareWithSentry<H extends EdgeRouteHandler>(middleware: H): (...params: Parameters<H>) => Promise<ReturnType<H>>;
//# sourceMappingURL=wrapMiddlewareWithSentry.d.ts.map

View File

@@ -0,0 +1,15 @@
"use strict";
function _class_apply_descriptor_set(receiver, descriptor, value) {
if (descriptor.set) descriptor.set.call(receiver, value);
else {
if (!descriptor.writable) {
// This should only throw in strict mode, but class bodies are
// always strict and private fields can only be used inside
// class bodies.
throw new TypeError("attempted to set read only private field");
}
descriptor.value = value;
}
}
exports._ = _class_apply_descriptor_set;

View File

@@ -0,0 +1 @@
{"version":3,"names":["_setPrototypeOf","require","_inheritsLoose","subClass","superClass","prototype","Object","create","constructor","setPrototypeOf"],"sources":["../../src/helpers/inheritsLoose.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n\nimport setPrototypeOf from \"./setPrototypeOf.ts\";\n\nexport default function _inheritsLoose(\n subClass: Function,\n superClass: Function,\n) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}\n"],"mappings":";;;;;;AAEA,IAAAA,eAAA,GAAAC,OAAA;AAEe,SAASC,cAAcA,CACpCC,QAAkB,EAClBC,UAAoB,EACpB;EACAD,QAAQ,CAACE,SAAS,GAAGC,MAAM,CAACC,MAAM,CAACH,UAAU,CAACC,SAAS,CAAC;EACxDF,QAAQ,CAACE,SAAS,CAACG,WAAW,GAAGL,QAAQ;EACzC,IAAAM,uBAAc,EAACN,QAAQ,EAAEC,UAAU,CAAC;AACtC","ignoreList":[]}

View File

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

View File

@@ -0,0 +1,4 @@
export declare const eachWeekendOfInterval: import("./types.js").FPFn1<
Date[],
import("../fp.js").Interval<Date>
>;

View File

@@ -0,0 +1 @@
{"version":3,"file":"cookie.d.ts","sourceRoot":"","sources":["../../../src/utils/cookie.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA4C/D"}

View File

@@ -0,0 +1,187 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.js";
const eraValues = {
narrow: ["R", "A"],
abbreviated: ["RC", "AD"],
wide: ["ro Chrìosta", "anno domini"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["C1", "C2", "C3", "C4"],
wide: [
"a' chiad chairteal",
"an dàrna cairteal",
"an treas cairteal",
"an ceathramh cairteal",
],
};
// Note: in English, the names of days of the week and months are capitalized.
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
// Generally, formatted dates should look like they are in the middle of a sentence,
// e.g. in Spanish language the weekdays and months should be in the lowercase.
const monthValues = {
narrow: ["F", "G", "M", "G", "C", "Ò", "I", "L", "S", "D", "S", "D"],
abbreviated: [
"Faoi",
"Gear",
"Màrt",
"Gibl",
"Cèit",
"Ògmh",
"Iuch",
"Lùn",
"Sult",
"Dàmh",
"Samh",
"Dùbh",
],
wide: [
"Am Faoilleach",
"An Gearran",
"Am Màrt",
"An Giblean",
"An Cèitean",
"An t-Ògmhios",
"An t-Iuchar",
"An Lùnastal",
"An t-Sultain",
"An Dàmhair",
"An t-Samhain",
"An Dùbhlachd",
],
};
const dayValues = {
narrow: ["D", "L", "M", "C", "A", "H", "S"],
short: ["Dò", "Lu", "Mà", "Ci", "Ar", "Ha", "Sa"],
abbreviated: ["Did", "Dil", "Dim", "Dic", "Dia", "Dih", "Dis"],
wide: [
"Didòmhnaich",
"Diluain",
"Dimàirt",
"Diciadain",
"Diardaoin",
"Dihaoine",
"Disathairne",
],
};
const dayPeriodValues = {
narrow: {
am: "m",
pm: "f",
midnight: "m.o.",
noon: "m.l.",
morning: "madainn",
afternoon: "feasgar",
evening: "feasgar",
night: "oidhche",
},
abbreviated: {
am: "M.",
pm: "F.",
midnight: "meadhan oidhche",
noon: "meadhan là",
morning: "madainn",
afternoon: "feasgar",
evening: "feasgar",
night: "oidhche",
},
wide: {
am: "m.",
pm: "f.",
midnight: "meadhan oidhche",
noon: "meadhan là",
morning: "madainn",
afternoon: "feasgar",
evening: "feasgar",
night: "oidhche",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "m",
pm: "f",
midnight: "m.o.",
noon: "m.l.",
morning: "sa mhadainn",
afternoon: "feasgar",
evening: "feasgar",
night: "air an oidhche",
},
abbreviated: {
am: "M.",
pm: "F.",
midnight: "meadhan oidhche",
noon: "meadhan là",
morning: "sa mhadainn",
afternoon: "feasgar",
evening: "feasgar",
night: "air an oidhche",
},
wide: {
am: "m.",
pm: "f.",
midnight: "meadhan oidhche",
noon: "meadhan là",
morning: "sa mhadainn",
afternoon: "feasgar",
evening: "feasgar",
night: "air an oidhche",
},
};
const ordinalNumber = (dirtyNumber) => {
const number = Number(dirtyNumber);
const rem100 = number % 100;
if (rem100 > 20 || rem100 < 10) {
switch (rem100 % 10) {
case 1:
return number + "d";
case 2:
return number + "na";
}
}
if (rem100 === 12) {
return number + "na";
}
return number + "mh";
};
export const localize = {
ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
};

View File

@@ -0,0 +1,121 @@
'use strict';
/*eslint-disable max-len*/
var YAMLException = require('./exception');
var Type = require('./type');
function compileList(schema, name) {
var result = [];
schema[name].forEach(function (currentType) {
var newIndex = result.length;
result.forEach(function (previousType, previousIndex) {
if (previousType.tag === currentType.tag &&
previousType.kind === currentType.kind &&
previousType.multi === currentType.multi) {
newIndex = previousIndex;
}
});
result[newIndex] = currentType;
});
return result;
}
function compileMap(/* lists... */) {
var result = {
scalar: {},
sequence: {},
mapping: {},
fallback: {},
multi: {
scalar: [],
sequence: [],
mapping: [],
fallback: []
}
}, index, length;
function collectType(type) {
if (type.multi) {
result.multi[type.kind].push(type);
result.multi['fallback'].push(type);
} else {
result[type.kind][type.tag] = result['fallback'][type.tag] = type;
}
}
for (index = 0, length = arguments.length; index < length; index += 1) {
arguments[index].forEach(collectType);
}
return result;
}
function Schema(definition) {
return this.extend(definition);
}
Schema.prototype.extend = function extend(definition) {
var implicit = [];
var explicit = [];
if (definition instanceof Type) {
// Schema.extend(type)
explicit.push(definition);
} else if (Array.isArray(definition)) {
// Schema.extend([ type1, type2, ... ])
explicit = explicit.concat(definition);
} else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {
// Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] })
if (definition.implicit) implicit = implicit.concat(definition.implicit);
if (definition.explicit) explicit = explicit.concat(definition.explicit);
} else {
throw new YAMLException('Schema.extend argument should be a Type, [ Type ], ' +
'or a schema definition ({ implicit: [...], explicit: [...] })');
}
implicit.forEach(function (type) {
if (!(type instanceof Type)) {
throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.');
}
if (type.loadKind && type.loadKind !== 'scalar') {
throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');
}
if (type.multi) {
throw new YAMLException('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.');
}
});
explicit.forEach(function (type) {
if (!(type instanceof Type)) {
throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.');
}
});
var result = Object.create(Schema.prototype);
result.implicit = (this.implicit || []).concat(implicit);
result.explicit = (this.explicit || []).concat(explicit);
result.compiledImplicit = compileList(result, 'implicit');
result.compiledExplicit = compileList(result, 'explicit');
result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit);
return result;
};
module.exports = Schema;

View File

@@ -0,0 +1,110 @@
export { Source } from './source';
export { getLocation } from './location';
export type { SourceLocation } from './location';
export { printLocation, printSourceLocation } from './printLocation';
export { Kind } from './kinds';
export type { KindEnum } from './kinds';
export { TokenKind } from './tokenKind';
export type { TokenKindEnum } from './tokenKind';
export { Lexer } from './lexer';
export {
parse,
parseValue,
parseConstValue,
parseType,
parseSchemaCoordinate,
} from './parser';
export type { ParseOptions } from './parser';
export { print } from './printer';
export {
visit,
visitInParallel,
getVisitFn,
getEnterLeaveForKind,
BREAK,
} from './visitor';
export type { ASTVisitor, ASTVisitFn, ASTVisitorKeyMap } from './visitor';
export { Location, Token, OperationTypeNode } from './ast';
export type {
ASTNode,
ASTKindToNode,
NameNode,
DocumentNode,
DefinitionNode,
ExecutableDefinitionNode,
OperationDefinitionNode,
VariableDefinitionNode,
VariableNode,
SelectionSetNode,
SelectionNode,
FieldNode,
ArgumentNode,
ConstArgumentNode,
FragmentSpreadNode,
InlineFragmentNode,
FragmentDefinitionNode,
ValueNode,
ConstValueNode,
IntValueNode,
FloatValueNode,
StringValueNode,
BooleanValueNode,
NullValueNode,
EnumValueNode,
ListValueNode,
ConstListValueNode,
ObjectValueNode,
ConstObjectValueNode,
ObjectFieldNode,
ConstObjectFieldNode,
DirectiveNode,
ConstDirectiveNode,
TypeNode,
NamedTypeNode,
ListTypeNode,
NonNullTypeNode,
TypeSystemDefinitionNode,
SchemaDefinitionNode,
OperationTypeDefinitionNode,
TypeDefinitionNode,
ScalarTypeDefinitionNode,
ObjectTypeDefinitionNode,
FieldDefinitionNode,
InputValueDefinitionNode,
InterfaceTypeDefinitionNode,
UnionTypeDefinitionNode,
EnumTypeDefinitionNode,
EnumValueDefinitionNode,
InputObjectTypeDefinitionNode,
DirectiveDefinitionNode,
TypeSystemExtensionNode,
SchemaExtensionNode,
TypeExtensionNode,
ScalarTypeExtensionNode,
ObjectTypeExtensionNode,
InterfaceTypeExtensionNode,
UnionTypeExtensionNode,
EnumTypeExtensionNode,
InputObjectTypeExtensionNode,
SchemaCoordinateNode,
TypeCoordinateNode,
MemberCoordinateNode,
ArgumentCoordinateNode,
DirectiveCoordinateNode,
DirectiveArgumentCoordinateNode,
} from './ast';
export {
isDefinitionNode,
isExecutableDefinitionNode,
isSelectionNode,
isValueNode,
isConstValueNode,
isTypeNode,
isTypeSystemDefinitionNode,
isTypeDefinitionNode,
isTypeSystemExtensionNode,
isTypeExtensionNode,
isSchemaCoordinateNode,
} from './predicates';
export { DirectiveLocation } from './directiveLocation';
export type { DirectiveLocationEnum } from './directiveLocation';

View File

@@ -0,0 +1,45 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isUrlIgnored = exports.urlMatches = void 0;
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
function urlMatches(url, urlToMatch) {
if (typeof urlToMatch === 'string') {
return url === urlToMatch;
}
else {
return !!url.match(urlToMatch);
}
}
exports.urlMatches = urlMatches;
/**
* Check if {@param url} should be ignored when comparing against {@param ignoredUrls}
* @param url
* @param ignoredUrls
*/
function isUrlIgnored(url, ignoredUrls) {
if (!ignoredUrls) {
return false;
}
for (const ignoreUrl of ignoredUrls) {
if (urlMatches(url, ignoreUrl)) {
return true;
}
}
return false;
}
exports.isUrlIgnored = isUrlIgnored;
//# sourceMappingURL=url.js.map

View File

@@ -0,0 +1,330 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const path = require('path');
const LOGGER_PREFIXES = {
'webpack-nodejs': '[@sentry/nextjs - Node.js]',
'webpack-edge': '[@sentry/nextjs - Edge]',
'webpack-client': '[@sentry/nextjs - Client]',
'after-production-compile-webpack': '[@sentry/nextjs - After Production Compile (Webpack)]',
'after-production-compile-turbopack': '[@sentry/nextjs - After Production Compile (Turbopack)]',
} ;
// File patterns for source map operations
// We use both glob patterns and directory paths for the sourcemap upload and deletion
// -> Direct CLI invocation handles file paths better than glob patterns
// -> Webpack/Bundler needs glob patterns as this is the format that is used by the plugin
const FILE_PATTERNS = {
SERVER: {
GLOB: 'server/**',
PATH: 'server',
},
SERVERLESS: 'serverless/**',
STATIC_CHUNKS: {
GLOB: 'static/chunks/**',
PATH: 'static/chunks',
},
STATIC_CHUNKS_PAGES: {
GLOB: 'static/chunks/pages/**',
PATH: 'static/chunks/pages',
},
STATIC_CHUNKS_APP: {
GLOB: 'static/chunks/app/**',
PATH: 'static/chunks/app',
},
MAIN_CHUNKS: 'static/chunks/main-*',
FRAMEWORK_CHUNKS: 'static/chunks/framework-*',
FRAMEWORK_CHUNKS_DOT: 'static/chunks/framework.*',
POLYFILLS_CHUNKS: 'static/chunks/polyfills-*',
WEBPACK_CHUNKS: 'static/chunks/webpack-*',
PAGE_CLIENT_REFERENCE_MANIFEST: '**/page_client-reference-manifest.js',
SERVER_REFERENCE_MANIFEST: '**/server-reference-manifest.js',
NEXT_FONT_MANIFEST: '**/next-font-manifest.js',
MIDDLEWARE_BUILD_MANIFEST: '**/middleware-build-manifest.js',
INTERCEPTION_ROUTE_REWRITE_MANIFEST: '**/interception-route-rewrite-manifest.js',
ROUTE_CLIENT_REFERENCE_MANIFEST: '**/route_client-reference-manifest.js',
MIDDLEWARE_REACT_LOADABLE_MANIFEST: '**/middleware-react-loadable-manifest.js',
} ;
// Source map file extensions to delete
const SOURCEMAP_EXTENSIONS = ['*.js.map', '*.mjs.map', '*.cjs.map', '*.css.map'] ;
/**
* Normalizes Windows paths to POSIX format for glob patterns
*/
function normalizePathForGlob(distPath) {
return distPath.replace(/\\/g, '/');
}
/**
* These functions are used to get the correct pattern for the sourcemap upload based on the build tool and the usage context
* -> Direct CLI invocation handles file paths better than glob patterns
*/
function getServerPattern({ useDirectoryPath = false }) {
return useDirectoryPath ? FILE_PATTERNS.SERVER.PATH : FILE_PATTERNS.SERVER.GLOB;
}
function getStaticChunksPattern({ useDirectoryPath = false }) {
return useDirectoryPath ? FILE_PATTERNS.STATIC_CHUNKS.PATH : FILE_PATTERNS.STATIC_CHUNKS.GLOB;
}
function getStaticChunksPagesPattern({ useDirectoryPath = false }) {
return useDirectoryPath ? FILE_PATTERNS.STATIC_CHUNKS_PAGES.PATH : FILE_PATTERNS.STATIC_CHUNKS_PAGES.GLOB;
}
function getStaticChunksAppPattern({ useDirectoryPath = false }) {
return useDirectoryPath ? FILE_PATTERNS.STATIC_CHUNKS_APP.PATH : FILE_PATTERNS.STATIC_CHUNKS_APP.GLOB;
}
/**
* Creates file patterns for source map uploads based on build tool and options
*/
function createSourcemapUploadAssetPatterns(
normalizedDistPath,
buildTool,
widenClientFileUpload = false,
) {
const assets = [];
if (buildTool.startsWith('after-production-compile')) {
assets.push(path.posix.join(normalizedDistPath, getServerPattern({ useDirectoryPath: true })));
if (buildTool === 'after-production-compile-turbopack') {
// In turbopack we always want to upload the full static chunks directory
// as the build output is not split into pages|app chunks
assets.push(path.posix.join(normalizedDistPath, getStaticChunksPattern({ useDirectoryPath: true })));
} else {
// Webpack client builds in after-production-compile mode
if (widenClientFileUpload) {
assets.push(path.posix.join(normalizedDistPath, getStaticChunksPattern({ useDirectoryPath: true })));
} else {
assets.push(
path.posix.join(normalizedDistPath, getStaticChunksPagesPattern({ useDirectoryPath: true })),
path.posix.join(normalizedDistPath, getStaticChunksAppPattern({ useDirectoryPath: true })),
);
}
}
} else {
if (buildTool === 'webpack-nodejs' || buildTool === 'webpack-edge') {
// Server builds
assets.push(
path.posix.join(normalizedDistPath, getServerPattern({ useDirectoryPath: false })),
path.posix.join(normalizedDistPath, FILE_PATTERNS.SERVERLESS),
);
} else if (buildTool === 'webpack-client') {
// Client builds
if (widenClientFileUpload) {
assets.push(path.posix.join(normalizedDistPath, getStaticChunksPattern({ useDirectoryPath: false })));
} else {
assets.push(
path.posix.join(normalizedDistPath, getStaticChunksPagesPattern({ useDirectoryPath: false })),
path.posix.join(normalizedDistPath, getStaticChunksAppPattern({ useDirectoryPath: false })),
);
}
}
}
return assets;
}
/**
* Creates ignore patterns for source map uploads
*/
function createSourcemapUploadIgnorePattern(
normalizedDistPath,
widenClientFileUpload = false,
) {
const ignore = [];
// We only add main-* files if the user has not opted into it
if (!widenClientFileUpload) {
ignore.push(path.posix.join(normalizedDistPath, FILE_PATTERNS.MAIN_CHUNKS));
}
// Always ignore these patterns
ignore.push(
path.posix.join(normalizedDistPath, FILE_PATTERNS.FRAMEWORK_CHUNKS),
path.posix.join(normalizedDistPath, FILE_PATTERNS.FRAMEWORK_CHUNKS_DOT),
path.posix.join(normalizedDistPath, FILE_PATTERNS.POLYFILLS_CHUNKS),
path.posix.join(normalizedDistPath, FILE_PATTERNS.WEBPACK_CHUNKS),
// Next.js internal manifest files that don't have source maps
// These files are auto-generated by Next.js and do not contain user code.
// Ignoring them prevents "Could not determine source map reference" warnings.
FILE_PATTERNS.PAGE_CLIENT_REFERENCE_MANIFEST,
FILE_PATTERNS.SERVER_REFERENCE_MANIFEST,
FILE_PATTERNS.NEXT_FONT_MANIFEST,
FILE_PATTERNS.MIDDLEWARE_BUILD_MANIFEST,
FILE_PATTERNS.INTERCEPTION_ROUTE_REWRITE_MANIFEST,
FILE_PATTERNS.ROUTE_CLIENT_REFERENCE_MANIFEST,
FILE_PATTERNS.MIDDLEWARE_REACT_LOADABLE_MANIFEST,
);
return ignore;
}
/**
* Creates file patterns for deletion after source map upload
*/
function createFilesToDeleteAfterUploadPattern(
normalizedDistPath,
buildTool,
deleteSourcemapsAfterUpload,
useRunAfterProductionCompileHook = false,
) {
if (!deleteSourcemapsAfterUpload) {
return undefined;
}
// We don't want to delete source maps for server builds as this led to errors on Vercel in the past
// See: https://github.com/getsentry/sentry-javascript/issues/13099
if (buildTool === 'webpack-nodejs' || buildTool === 'webpack-edge') {
return undefined;
}
// Skip deletion for webpack client builds when using the experimental hook
if (buildTool === 'webpack-client' && useRunAfterProductionCompileHook) {
return undefined;
}
return SOURCEMAP_EXTENSIONS.map(ext => path.posix.join(normalizedDistPath, 'static', '**', ext));
}
/**
* Determines if sourcemap uploads should be skipped
*/
function shouldSkipSourcemapUpload(buildTool, useRunAfterProductionCompileHook = false) {
return useRunAfterProductionCompileHook && buildTool.startsWith('webpack');
}
/**
* Source rewriting function for webpack sources
*/
function rewriteWebpackSources(source) {
return source.replace(/^webpack:\/\/(?:_N_E\/)?/, '');
}
/**
* Creates release configuration
*/
function createReleaseConfig(
releaseName,
sentryBuildOptions,
) {
if (releaseName !== undefined) {
return {
inject: false, // The webpack plugin's release injection breaks the `app` directory - we inject the release manually with the value injection loader instead.
name: releaseName,
create: sentryBuildOptions.release?.create,
finalize: sentryBuildOptions.release?.finalize,
dist: sentryBuildOptions.release?.dist,
vcsRemote: sentryBuildOptions.release?.vcsRemote,
setCommits: sentryBuildOptions.release?.setCommits,
deploy: sentryBuildOptions.release?.deploy,
...sentryBuildOptions.webpack?.unstable_sentryWebpackPluginOptions?.release,
};
}
return {
inject: false,
create: false,
finalize: false,
};
}
/**
* Merges default ignore patterns with user-provided ignore patterns.
* User patterns are appended to the defaults to ensure internal Next.js
* files are always ignored while allowing users to add additional patterns.
*/
function mergeIgnorePatterns(defaultPatterns, userPatterns) {
if (!userPatterns) {
return defaultPatterns;
}
const userPatternsArray = Array.isArray(userPatterns) ? userPatterns : [userPatterns];
return [...defaultPatterns, ...userPatternsArray];
}
/**
* Get Sentry Build Plugin options for both webpack and turbopack builds.
* These options can be used in two ways:
* 1. The options can be built in a single operation after the production build completes
* 2. The options can be built in multiple operations, one for each webpack build
*/
function getBuildPluginOptions({
sentryBuildOptions,
releaseName,
distDirAbsPath,
buildTool,
useRunAfterProductionCompileHook,
}
) {
// We need to convert paths to posix because Glob patterns use `\` to escape
// glob characters. This clashes with Windows path separators.
// See: https://www.npmjs.com/package/glob
const normalizedDistDirAbsPath = normalizePathForGlob(distDirAbsPath);
const loggerPrefix = LOGGER_PREFIXES[buildTool];
const widenClientFileUpload = sentryBuildOptions.widenClientFileUpload ?? false;
const deleteSourcemapsAfterUpload = sentryBuildOptions.sourcemaps?.deleteSourcemapsAfterUpload ?? false;
const sourcemapUploadAssets = createSourcemapUploadAssetPatterns(
normalizedDistDirAbsPath,
buildTool,
widenClientFileUpload,
);
const sourcemapUploadIgnore = createSourcemapUploadIgnorePattern(normalizedDistDirAbsPath, widenClientFileUpload);
const finalIgnorePatterns = mergeIgnorePatterns(sourcemapUploadIgnore, sentryBuildOptions.sourcemaps?.ignore);
const filesToDeleteAfterUpload = createFilesToDeleteAfterUploadPattern(
normalizedDistDirAbsPath,
buildTool,
deleteSourcemapsAfterUpload,
useRunAfterProductionCompileHook,
);
const skipSourcemapsUpload = shouldSkipSourcemapUpload(buildTool, useRunAfterProductionCompileHook);
return {
authToken: sentryBuildOptions.authToken,
headers: sentryBuildOptions.headers,
org: sentryBuildOptions.org,
project: sentryBuildOptions.project,
telemetry: sentryBuildOptions.telemetry,
debug: sentryBuildOptions.debug,
errorHandler: sentryBuildOptions.errorHandler,
reactComponentAnnotation: buildTool.startsWith('after-production-compile')
? undefined
: {
...sentryBuildOptions.webpack?.reactComponentAnnotation,
...sentryBuildOptions.webpack?.unstable_sentryWebpackPluginOptions?.reactComponentAnnotation,
},
silent: sentryBuildOptions.silent,
url: sentryBuildOptions.sentryUrl,
sourcemaps: {
disable: skipSourcemapsUpload ? true : (sentryBuildOptions.sourcemaps?.disable ?? false),
rewriteSources: rewriteWebpackSources,
assets: sentryBuildOptions.sourcemaps?.assets ?? sourcemapUploadAssets,
ignore: finalIgnorePatterns,
filesToDeleteAfterUpload,
...sentryBuildOptions.webpack?.unstable_sentryWebpackPluginOptions?.sourcemaps,
},
release: createReleaseConfig(releaseName, sentryBuildOptions),
bundleSizeOptimizations: {
...sentryBuildOptions.bundleSizeOptimizations,
},
_metaOptions: {
loggerPrefixOverride: loggerPrefix,
telemetry: {
metaFramework: 'nextjs',
},
},
...sentryBuildOptions.webpack?.unstable_sentryWebpackPluginOptions,
};
}
exports.getBuildPluginOptions = getBuildPluginOptions;
exports.normalizePathForGlob = normalizePathForGlob;
//# sourceMappingURL=getBuildPluginOptions.js.map

View File

@@ -0,0 +1,2 @@
import { isArrayBuffer } from "./index";
export = isArrayBuffer;

View File

@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Frame = createLucideIcon("Frame", [
["line", { x1: "22", x2: "2", y1: "6", y2: "6", key: "15w7dq" }],
["line", { x1: "22", x2: "2", y1: "18", y2: "18", key: "1ip48p" }],
["line", { x1: "6", x2: "6", y1: "2", y2: "22", key: "a2lnyx" }],
["line", { x1: "18", x2: "18", y1: "2", y2: "22", key: "8vb6jd" }]
]);
export { Frame as default };
//# sourceMappingURL=frame.js.map

View File

@@ -0,0 +1,27 @@
import { getCurrentDate } from '../utilities/getCurrentDate.js';
export function calculateBackoffWaitUntil({ retriesConfig, totalTried }) {
let waitUntil = getCurrentDate();
if (typeof retriesConfig === 'object') {
if (retriesConfig.backoff) {
if (retriesConfig.backoff.type === 'fixed') {
waitUntil = retriesConfig.backoff.delay ? new Date(getCurrentDate().getTime() + retriesConfig.backoff.delay) : getCurrentDate();
} else if (retriesConfig.backoff.type === 'exponential') {
// 2 ^ (attempts - 1) * delay (current attempt is not included in totalTried, thus no need for -1)
const delay = retriesConfig.backoff.delay ? retriesConfig.backoff.delay : 0;
waitUntil = new Date(getCurrentDate().getTime() + Math.pow(2, totalTried) * delay);
}
}
}
/*
const differenceInMSBetweenNowAndWaitUntil = waitUntil.getTime() - getCurrentDate().getTime()
const differenceInSBetweenNowAndWaitUntil = differenceInMSBetweenNowAndWaitUntil / 1000
console.log('Calculated backoff', {
differenceInMSBetweenNowAndWaitUntil,
differenceInSBetweenNowAndWaitUntil,
retriesConfig,
totalTried,
})*/ return waitUntil;
}
//# sourceMappingURL=calculateBackoffWaitUntil.js.map

View File

@@ -0,0 +1,13 @@
import { createProjectionNode } from './create-projection-node.mjs';
import { addDomEvent } from '../../events/add-dom-event.mjs';
const DocumentProjectionNode = createProjectionNode({
attachResizeListener: (ref, notify) => addDomEvent(ref, "resize", notify),
measureScroll: () => ({
x: document.documentElement.scrollLeft || document.body.scrollLeft,
y: document.documentElement.scrollTop || document.body.scrollTop,
}),
checkIsScrollRoot: () => true,
});
export { DocumentProjectionNode };

View File

@@ -0,0 +1,103 @@
import { getTranslation } from '@payloadcms/translations';
import { fieldAffectsData } from '../fields/config/types.js';
import { toWords } from '../utilities/formatLabels.js';
import { preventLockout } from './preventLockout.js';
import { operations } from './types.js';
const defaultConstraintOptions = [
{
label: 'Everyone',
value: 'everyone'
},
{
label: 'Only Me',
value: 'onlyMe'
},
{
label: 'Specific Users',
value: 'specificUsers'
}
];
export const getConstraints = (config)=>({
name: 'access',
type: 'group',
admin: {
components: {
Cell: '@payloadcms/next/client#QueryPresetsAccessCell'
},
condition: (data)=>Boolean(data?.isShared)
},
fields: operations.map((constraintOperation)=>({
type: 'collapsible',
fields: [
{
name: constraintOperation,
type: 'group',
admin: {
hideGutter: true
},
fields: [
{
name: 'constraint',
type: 'select',
defaultValue: 'onlyMe',
filterOptions: (args)=>typeof config?.queryPresets?.filterConstraints === 'function' ? config.queryPresets.filterConstraints(args) : args.options,
label: ({ i18n })=>`Specify who can ${constraintOperation} this ${getTranslation(config.queryPresets?.labels?.singular || 'Preset', i18n)}`,
options: [
...defaultConstraintOptions,
...config?.queryPresets?.constraints?.[constraintOperation]?.map((option)=>({
label: option.label,
value: option.value
})) || []
]
},
{
name: 'users',
type: 'relationship',
admin: {
condition: (data)=>Boolean(data?.access?.[constraintOperation]?.constraint === 'specificUsers')
},
hasMany: true,
hooks: {
beforeChange: [
({ data, req })=>{
if (data?.access?.[constraintOperation]?.constraint === 'onlyMe' && req.user) {
return [
req.user.id
];
}
if (data?.access?.[constraintOperation]?.constraint === 'specificUsers' && req.user) {
return [
...data?.access?.[constraintOperation]?.users || [],
req.user.id
];
}
}
]
},
relationTo: config.admin?.user ?? 'users'
},
...config?.queryPresets?.constraints?.[constraintOperation]?.reduce((acc, option)=>{
option.fields?.forEach((field, index)=>{
acc.push({
...field
});
if (fieldAffectsData(field)) {
acc[index].admin = {
...acc[index]?.admin || {},
condition: (data)=>Boolean(data?.access?.[constraintOperation]?.constraint === option.value)
};
}
});
return acc;
}, []) || []
],
label: false
}
],
label: ()=>toWords(constraintOperation)
})),
label: 'Sharing settings',
validate: preventLockout
});
//# sourceMappingURL=constraints.js.map

View File

@@ -0,0 +1,8 @@
import { resizeElement } from './handle-element.mjs';
import { resizeWindow } from './handle-window.mjs';
function resize(a, b) {
return typeof a === "function" ? resizeWindow(a) : resizeElement(a, b);
}
export { resize };

View File

@@ -0,0 +1,37 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
/**
* @template T
* @typedef {() => T} FunctionReturning
*/
/**
* @template T
* @param {FunctionReturning<T>} fn memorized function
* @returns {FunctionReturning<T>} new function
*/
const memoize = (fn) => {
let cache = false;
/** @type {T | undefined} */
let result;
return () => {
if (cache) {
return /** @type {T} */ (result);
}
result = fn();
cache = true;
// Allow to clean up memory for fn
// and all dependent resources
/** @type {FunctionReturning<T> | undefined} */
(fn) = undefined;
return /** @type {T} */ (result);
};
};
module.exports = memoize;

View File

@@ -0,0 +1,4 @@
function _taggedTemplateLiteralLoose(e, t) {
return t || (t = e.slice(0)), e.raw = t, e;
}
module.exports = _taggedTemplateLiteralLoose, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/vocabularies/jtd/index.ts"],"names":[],"mappings":";;AACA,+BAA8B;AAC9B,iCAAgD;AAChD,iCAAgD;AAChD,yCAAqD;AACrD,6CAA2D;AAC3D,6DAAqD;AACrD,mDAAoE;AACpE,qCAA+C;AAC/C,mCAA2B;AAC3B,yCAAiC;AAEjC,MAAM,aAAa,GAAe;IAChC,aAAa;IACb,aAAU;IACV,cAAW;IACX,cAAW;IACX,kBAAQ;IACR,oBAAU;IACV,4BAAkB;IAClB,uBAAa;IACb,gBAAM;IACN,eAAK;IACL,kBAAQ;IACR,EAAC,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,SAAS,EAAC;IACxD,EAAC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAC;CAC7C,CAAA;AAED,kBAAe,aAAa,CAAA"}

View File

@@ -0,0 +1,38 @@
import type { Context, Span, SpanOptions } from '@opentelemetry/api';
type V5SpanCallback<R> = (span?: Span, context?: Context) => R;
type V5ExtendedSpanOptions = SpanOptions & {
name: string;
internal?: boolean;
middleware?: boolean;
active?: boolean;
context?: Context;
};
type EngineSpanEvent = {
span: boolean;
spans: V5EngineSpan[];
};
type V5EngineSpanKind = 'client' | 'internal';
type V5EngineSpan = {
span: boolean;
name: string;
trace_id: string;
span_id: string;
parent_span_id: string;
start_time: [number, number];
end_time: [number, number];
attributes?: Record<string, string>;
links?: {
trace_id: string;
span_id: string;
}[];
kind: V5EngineSpanKind;
};
export interface PrismaV5TracingHelper {
isEnabled(): boolean;
getTraceParent(context?: Context): string;
createEngineSpan(engineSpanEvent: EngineSpanEvent): void;
getActiveContext(): Context | undefined;
runInChildSpan<R>(nameOrOptions: string | V5ExtendedSpanOptions, callback: V5SpanCallback<R>): R;
}
export {};
//# sourceMappingURL=v5-tracing-helper.d.ts.map

View File

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

View File

@@ -0,0 +1,20 @@
import { jsx as _jsx } from "react/jsx-runtime";
import React from 'react';
import './index.scss';
export function FolderIcon({
className
}) {
return /*#__PURE__*/_jsx("svg", {
className: [className, 'icon icon--folder'].filter(Boolean).join(' '),
fill: "none",
height: "16",
viewBox: "0 0 16 16",
width: "16",
xmlns: "http://www.w3.org/2000/svg",
children: /*#__PURE__*/_jsx("path", {
d: "M13.3333 13.3333C13.6869 13.3333 14.026 13.1929 14.2761 12.9428C14.5261 12.6928 14.6666 12.3536 14.6666 12V5.33333C14.6666 4.97971 14.5261 4.64057 14.2761 4.39052C14.026 4.14048 13.6869 4 13.3333 4H8.06659C7.84359 4.00219 7.62362 3.94841 7.42679 3.84359C7.22996 3.73877 7.06256 3.58625 6.93992 3.4L6.39992 2.6C6.27851 2.41565 6.11323 2.26432 5.91892 2.1596C5.7246 2.05488 5.50732 2.00004 5.28659 2H2.66659C2.31296 2 1.97382 2.14048 1.72378 2.39052C1.47373 2.64057 1.33325 2.97971 1.33325 3.33333V12C1.33325 12.3536 1.47373 12.6928 1.72378 12.9428C1.97382 13.1929 2.31296 13.3333 2.66659 13.3333H13.3333Z",
fill: "currentColor"
})
});
}
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,103 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
var printWarning = function() {};
if (process.env.NODE_ENV !== 'production') {
var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
var loggedTypeFailures = {};
var has = require('./lib/has');
printWarning = function(text) {
var message = 'Warning: ' + text;
if (typeof console !== 'undefined') {
console.error(message);
}
try {
// --- Welcome to debugging React ---
// This error was thrown as a convenience so that you can use this stack
// to find the callsite that caused this warning to fire.
throw new Error(message);
} catch (x) { /**/ }
};
}
/**
* Assert that the values match with the type specs.
* Error messages are memorized and will only be shown once.
*
* @param {object} typeSpecs Map of name to a ReactPropType
* @param {object} values Runtime values that need to be type-checked
* @param {string} location e.g. "prop", "context", "child context"
* @param {string} componentName Name of the component for error messages.
* @param {?Function} getStack Returns the component stack.
* @private
*/
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
if (process.env.NODE_ENV !== 'production') {
for (var typeSpecName in typeSpecs) {
if (has(typeSpecs, typeSpecName)) {
var error;
// Prop type validation may throw. In case they do, we don't want to
// fail the render phase where it didn't fail before. So we log it.
// After these have been cleaned up, we'll let them throw.
try {
// This is intentionally an invariant that gets caught. It's the same
// behavior as without this statement except with a better message.
if (typeof typeSpecs[typeSpecName] !== 'function') {
var err = Error(
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
);
err.name = 'Invariant Violation';
throw err;
}
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
} catch (ex) {
error = ex;
}
if (error && !(error instanceof Error)) {
printWarning(
(componentName || 'React class') + ': type specification of ' +
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
'You may have forgotten to pass an argument to the type checker ' +
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
'shape all require an argument).'
);
}
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
// Only monitor this failure once because there tends to be a lot of the
// same error.
loggedTypeFailures[error.message] = true;
var stack = getStack ? getStack() : '';
printWarning(
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
);
}
}
}
}
}
/**
* Resets warning cache when testing.
*
* @private
*/
checkPropTypes.resetWarningCache = function() {
if (process.env.NODE_ENV !== 'production') {
loggedTypeFailures = {};
}
}
module.exports = checkPropTypes;

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