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

View File

@@ -0,0 +1,40 @@
import { transformProps } from '../../render/html/utils/keys-transform.mjs';
const underDampedSpring = {
type: "spring",
stiffness: 500,
damping: 25,
restSpeed: 10,
};
const criticallyDampedSpring = (target) => ({
type: "spring",
stiffness: 550,
damping: target === 0 ? 2 * Math.sqrt(550) : 30,
restSpeed: 10,
});
const keyframesTransition = {
type: "keyframes",
duration: 0.8,
};
/**
* Default easing curve is a slightly shallower version of
* the default browser easing curve.
*/
const ease = {
type: "keyframes",
ease: [0.25, 0.1, 0.35, 1],
duration: 0.3,
};
const getDefaultTransition = (valueKey, { keyframes }) => {
if (keyframes.length > 2) {
return keyframesTransition;
}
else if (transformProps.has(valueKey)) {
return valueKey.startsWith("scale")
? criticallyDampedSpring(keyframes[1])
: underDampedSpring;
}
return ease;
};
export { getDefaultTransition };

View File

@@ -0,0 +1,6 @@
import type { Metadata } from 'next';
import type { MetaConfig } from 'payload';
export declare const generateMetadata: (args: {
serverURL: string;
} & MetaConfig) => Promise<Metadata>;
//# sourceMappingURL=meta.d.ts.map

View File

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

View File

@@ -0,0 +1,101 @@
import { browserPerformanceTimeOrigin, getActiveSpan, getRootSpan, spanToJSON, getCurrentScope, timestampInSeconds, startSpan, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core';
import { addPerformanceInstrumentationHandler } from './instrument.js';
import { getBrowserPerformanceAPI, msToSec } from './utils.js';
// ElementTiming interface based on the W3C spec
/**
* Start tracking ElementTiming performance entries.
*/
function startTrackingElementTiming() {
const performance = getBrowserPerformanceAPI();
if (performance && browserPerformanceTimeOrigin()) {
return addPerformanceInstrumentationHandler('element', _onElementTiming);
}
return () => undefined;
}
/**
* exported only for testing
*/
const _onElementTiming = ({ entries }) => {
const activeSpan = getActiveSpan();
const rootSpan = activeSpan ? getRootSpan(activeSpan) : undefined;
const transactionName = rootSpan
? spanToJSON(rootSpan).description
: getCurrentScope().getScopeData().transactionName;
entries.forEach(entry => {
const elementEntry = entry ;
// Skip entries without identifier (elementtiming attribute)
if (!elementEntry.identifier) {
return;
}
// `name` contains the type of the element paint. Can be `'image-paint'` or `'text-paint'`.
// https://developer.mozilla.org/en-US/docs/Web/API/PerformanceElementTiming#instance_properties
const paintType = elementEntry.name ;
const renderTime = elementEntry.renderTime;
const loadTime = elementEntry.loadTime;
// starting the span at:
// - `loadTime` if available (should be available for all "image-paint" entries, 0 otherwise)
// - `renderTime` if available (available for all entries, except 3rd party images, but these should be covered by `loadTime`, 0 otherwise)
// - `timestampInSeconds()` as a safeguard
// see https://developer.mozilla.org/en-US/docs/Web/API/PerformanceElementTiming/renderTime#cross-origin_image_render_time
const [spanStartTime, spanStartTimeSource] = loadTime
? [msToSec(loadTime), 'load-time']
: renderTime
? [msToSec(renderTime), 'render-time']
: [timestampInSeconds(), 'entry-emission'];
const duration =
paintType === 'image-paint'
? // for image paints, we can acually get a duration because image-paint entries also have a `loadTime`
// and `renderTime`. `loadTime` is the time when the image finished loading and `renderTime` is the
// time when the image finished rendering.
msToSec(Math.max(0, (renderTime ?? 0) - (loadTime ?? 0)))
: // for `'text-paint'` entries, we can't get a duration because the `loadTime` is always zero.
0;
const attributes = {
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.elementtiming',
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'ui.elementtiming',
// name must be user-entered, so we can assume low cardinality
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'component',
// recording the source of the span start time, as it varies depending on available data
'sentry.span_start_time_source': spanStartTimeSource,
'sentry.transaction_name': transactionName,
'element.id': elementEntry.id,
'element.type': elementEntry.element?.tagName?.toLowerCase() || 'unknown',
'element.size':
elementEntry.naturalWidth && elementEntry.naturalHeight
? `${elementEntry.naturalWidth}x${elementEntry.naturalHeight}`
: undefined,
'element.render_time': renderTime,
'element.load_time': loadTime,
// `url` is `0`(number) for text paints (hence we fall back to undefined)
'element.url': elementEntry.url || undefined,
'element.identifier': elementEntry.identifier,
'element.paint_type': paintType,
};
startSpan(
{
name: `element[${elementEntry.identifier}]`,
attributes,
startTime: spanStartTime,
onlyIfParent: true,
},
span => {
span.end(spanStartTime + duration);
},
);
});
};
export { _onElementTiming, startTrackingElementTiming };
//# sourceMappingURL=elementTiming.js.map

View File

@@ -0,0 +1,55 @@
"use strict";
exports.LocalWeekParser = void 0;
var _index = require("../../../setWeek.cjs");
var _index2 = require("../../../startOfWeek.cjs");
var _constants = require("../constants.cjs");
var _Parser = require("../Parser.cjs");
var _utils = require("../utils.cjs");
// Local week of year
class LocalWeekParser extends _Parser.Parser {
priority = 100;
parse(dateString, token, match) {
switch (token) {
case "w":
return (0, _utils.parseNumericPattern)(
_constants.numericPatterns.week,
dateString,
);
case "wo":
return match.ordinalNumber(dateString, { unit: "week" });
default:
return (0, _utils.parseNDigits)(token.length, dateString);
}
}
validate(_date, value) {
return value >= 1 && value <= 53;
}
set(date, _flags, value, options) {
return (0, _index2.startOfWeek)(
(0, _index.setWeek)(date, value, options),
options,
);
}
incompatibleTokens = [
"y",
"R",
"u",
"q",
"Q",
"M",
"L",
"I",
"d",
"D",
"i",
"t",
"T",
];
}
exports.LocalWeekParser = LocalWeekParser;

View File

@@ -0,0 +1,2 @@
export { extraErrorDataIntegration } from '@sentry/core';
//# sourceMappingURL=index.extraerrordata.d.ts.map

View File

@@ -0,0 +1,45 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UnicodeExtensionComponents = UnicodeExtensionComponents;
var utils_1 = require("./utils");
function UnicodeExtensionComponents(extension) {
(0, utils_1.invariant)(extension === extension.toLowerCase(), 'Expected extension to be lowercase');
(0, utils_1.invariant)(extension.slice(0, 3) === '-u-', 'Expected extension to be a Unicode locale extension');
var attributes = [];
var keywords = [];
var keyword;
var size = extension.length;
var k = 3;
while (k < size) {
var e = extension.indexOf('-', k);
var len = void 0;
if (e === -1) {
len = size - k;
}
else {
len = e - k;
}
var subtag = extension.slice(k, k + len);
(0, utils_1.invariant)(len >= 2, 'Expected a subtag to have at least 2 characters');
if (keyword === undefined && len != 2) {
if (attributes.indexOf(subtag) === -1) {
attributes.push(subtag);
}
}
else if (len === 2) {
keyword = { key: subtag, value: '' };
if (keywords.find(function (k) { return k.key === (keyword === null || keyword === void 0 ? void 0 : keyword.key); }) === undefined) {
keywords.push(keyword);
}
}
else if ((keyword === null || keyword === void 0 ? void 0 : keyword.value) === '') {
keyword.value = subtag;
}
else {
(0, utils_1.invariant)(keyword !== undefined, 'Expected keyword to be defined');
keyword.value += '-' + subtag;
}
k += len + 1;
}
return { attributes: attributes, keywords: keywords };
}

View File

@@ -0,0 +1,29 @@
import { DirectusUser } from "../../../schema/user.js";
import { NestedPartial } from "../../../types/utils.js";
import { ApplyQueryFields } from "../../../types/output.js";
import { Query } from "../../../types/query.js";
import { RestCommand } from "../../types.js";
//#region src/rest/commands/create/users.d.ts
type CreateUserOutput<Schema, TQuery extends Query<Schema, Item>, Item extends object = DirectusUser<Schema>> = ApplyQueryFields<Schema, Item, TQuery['fields']>;
/**
* Create multiple new users.
*
* @param items The items to create
* @param query Optional return data query
*
* @returns Returns the user objects for the created users.
*/
declare const createUsers: <Schema, const TQuery extends Query<Schema, DirectusUser<Schema>>>(items: NestedPartial<DirectusUser<Schema>>[], query?: TQuery) => RestCommand<CreateUserOutput<Schema, TQuery>[], Schema>;
/**
* Create a new user.
*
* @param item The user to create
* @param query Optional return data query
*
* @returns Returns the user object for the created user.
*/
declare const createUser: <Schema, const TQuery extends Query<Schema, DirectusUser<Schema>>>(item: NestedPartial<DirectusUser<Schema>>, query?: TQuery) => RestCommand<CreateUserOutput<Schema, TQuery>, Schema>;
//#endregion
export { CreateUserOutput, createUser, createUsers };
//# sourceMappingURL=users.d.ts.map

View File

@@ -0,0 +1,5 @@
/**
* Decide if the currently running process is part of the build phase or happening at runtime.
*/
export declare function isBuild(): boolean;
//# sourceMappingURL=isBuild.d.ts.map

View File

@@ -0,0 +1,10 @@
import type { Locale } from "./types.js";
/**
* @category Locales
* @summary Vietnamese locale (Vietnam).
* @language Vietnamese
* @iso-639-2 vie
* @author Thanh Tran [@trongthanh](https://github.com/trongthanh)
* @author Leroy Hopson [@lihop](https://github.com/lihop)
*/
export declare const vi: Locale;

View File

@@ -0,0 +1,125 @@
const parseInt64 = require('pg-int8')
const parseNumeric = require('pg-numeric')
const parseInt16 = function (value) {
return value.readInt16BE(0)
}
const parseInt32 = function (value) {
return value.readInt32BE(0)
}
const parseFloat32 = function (value) {
return value.readFloatBE(0)
}
const parseFloat64 = function (value) {
return value.readDoubleBE(0)
}
const parseTimestampUTC = function (value) {
const rawValue = 0x100000000 * value.readInt32BE(0) + value.readUInt32BE(4)
// discard usecs and shift from 2000 to 1970
const result = new Date(Math.round(rawValue / 1000) + 946684800000)
return result
}
const parseArray = function (value) {
const dim = value.readInt32BE(0)
const elementType = value.readUInt32BE(8)
let offset = 12
const dims = []
for (let i = 0; i < dim; i++) {
// parse dimension
dims[i] = value.readInt32BE(offset)
offset += 4
// ignore lower bounds
offset += 4
}
const parseElement = function (elementType) {
// parse content length
const length = value.readInt32BE(offset)
offset += 4
// parse null values
if (length === -1) {
return null
}
let result
if (elementType === 0x17) {
// int
result = value.readInt32BE(offset)
offset += length
return result
} else if (elementType === 0x14) {
// bigint
result = parseInt64(value.slice(offset, offset += length))
return result
} else if (elementType === 0x19) {
// string
result = value.toString('utf8', offset, offset += length)
return result
} else {
throw new Error('ElementType not implemented: ' + elementType)
}
}
const parse = function (dimension, elementType) {
const array = []
let i
if (dimension.length > 1) {
const count = dimension.shift()
for (i = 0; i < count; i++) {
array[i] = parse(dimension, elementType)
}
dimension.unshift(count)
} else {
for (i = 0; i < dimension[0]; i++) {
array[i] = parseElement(elementType)
}
}
return array
}
return parse(dims, elementType)
}
const parseText = function (value) {
return value.toString('utf8')
}
const parseBool = function (value) {
return value[0] !== 0
}
const init = function (register) {
register(20, parseInt64)
register(21, parseInt16)
register(23, parseInt32)
register(26, parseInt32)
register(1700, parseNumeric)
register(700, parseFloat32)
register(701, parseFloat64)
register(16, parseBool)
register(1114, parseTimestampUTC)
register(1184, parseTimestampUTC)
register(1000, parseArray)
register(1007, parseArray)
register(1016, parseArray)
register(1008, parseArray)
register(1009, parseArray)
register(25, parseText)
}
module.exports = {
init: init
}

View File

@@ -0,0 +1,131 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const aeskw_js_1 = require("../runtime/aeskw.js");
const ECDH = require("../runtime/ecdhes.js");
const pbes2kw_js_1 = require("../runtime/pbes2kw.js");
const rsaes_js_1 = require("../runtime/rsaes.js");
const base64url_js_1 = require("../runtime/base64url.js");
const normalize_key_js_1 = require("../runtime/normalize_key.js");
const errors_js_1 = require("../util/errors.js");
const cek_js_1 = require("../lib/cek.js");
const import_js_1 = require("../key/import.js");
const check_key_type_js_1 = require("./check_key_type.js");
const is_object_js_1 = require("./is_object.js");
const aesgcmkw_js_1 = require("./aesgcmkw.js");
async function decryptKeyManagement(alg, key, encryptedKey, joseHeader, options) {
(0, check_key_type_js_1.default)(alg, key, 'decrypt');
key = (await normalize_key_js_1.default.normalizePrivateKey?.(key, alg)) || key;
switch (alg) {
case 'dir': {
if (encryptedKey !== undefined)
throw new errors_js_1.JWEInvalid('Encountered unexpected JWE Encrypted Key');
return key;
}
case 'ECDH-ES':
if (encryptedKey !== undefined)
throw new errors_js_1.JWEInvalid('Encountered unexpected JWE Encrypted Key');
case 'ECDH-ES+A128KW':
case 'ECDH-ES+A192KW':
case 'ECDH-ES+A256KW': {
if (!(0, is_object_js_1.default)(joseHeader.epk))
throw new errors_js_1.JWEInvalid(`JOSE Header "epk" (Ephemeral Public Key) missing or invalid`);
if (!ECDH.ecdhAllowed(key))
throw new errors_js_1.JOSENotSupported('ECDH with the provided key is not allowed or not supported by your javascript runtime');
const epk = await (0, import_js_1.importJWK)(joseHeader.epk, alg);
let partyUInfo;
let partyVInfo;
if (joseHeader.apu !== undefined) {
if (typeof joseHeader.apu !== 'string')
throw new errors_js_1.JWEInvalid(`JOSE Header "apu" (Agreement PartyUInfo) invalid`);
try {
partyUInfo = (0, base64url_js_1.decode)(joseHeader.apu);
}
catch {
throw new errors_js_1.JWEInvalid('Failed to base64url decode the apu');
}
}
if (joseHeader.apv !== undefined) {
if (typeof joseHeader.apv !== 'string')
throw new errors_js_1.JWEInvalid(`JOSE Header "apv" (Agreement PartyVInfo) invalid`);
try {
partyVInfo = (0, base64url_js_1.decode)(joseHeader.apv);
}
catch {
throw new errors_js_1.JWEInvalid('Failed to base64url decode the apv');
}
}
const sharedSecret = await ECDH.deriveKey(epk, key, alg === 'ECDH-ES' ? joseHeader.enc : alg, alg === 'ECDH-ES' ? (0, cek_js_1.bitLength)(joseHeader.enc) : parseInt(alg.slice(-5, -2), 10), partyUInfo, partyVInfo);
if (alg === 'ECDH-ES')
return sharedSecret;
if (encryptedKey === undefined)
throw new errors_js_1.JWEInvalid('JWE Encrypted Key missing');
return (0, aeskw_js_1.unwrap)(alg.slice(-6), sharedSecret, encryptedKey);
}
case 'RSA1_5':
case 'RSA-OAEP':
case 'RSA-OAEP-256':
case 'RSA-OAEP-384':
case 'RSA-OAEP-512': {
if (encryptedKey === undefined)
throw new errors_js_1.JWEInvalid('JWE Encrypted Key missing');
return (0, rsaes_js_1.decrypt)(alg, key, encryptedKey);
}
case 'PBES2-HS256+A128KW':
case 'PBES2-HS384+A192KW':
case 'PBES2-HS512+A256KW': {
if (encryptedKey === undefined)
throw new errors_js_1.JWEInvalid('JWE Encrypted Key missing');
if (typeof joseHeader.p2c !== 'number')
throw new errors_js_1.JWEInvalid(`JOSE Header "p2c" (PBES2 Count) missing or invalid`);
const p2cLimit = options?.maxPBES2Count || 10_000;
if (joseHeader.p2c > p2cLimit)
throw new errors_js_1.JWEInvalid(`JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds`);
if (typeof joseHeader.p2s !== 'string')
throw new errors_js_1.JWEInvalid(`JOSE Header "p2s" (PBES2 Salt) missing or invalid`);
let p2s;
try {
p2s = (0, base64url_js_1.decode)(joseHeader.p2s);
}
catch {
throw new errors_js_1.JWEInvalid('Failed to base64url decode the p2s');
}
return (0, pbes2kw_js_1.decrypt)(alg, key, encryptedKey, joseHeader.p2c, p2s);
}
case 'A128KW':
case 'A192KW':
case 'A256KW': {
if (encryptedKey === undefined)
throw new errors_js_1.JWEInvalid('JWE Encrypted Key missing');
return (0, aeskw_js_1.unwrap)(alg, key, encryptedKey);
}
case 'A128GCMKW':
case 'A192GCMKW':
case 'A256GCMKW': {
if (encryptedKey === undefined)
throw new errors_js_1.JWEInvalid('JWE Encrypted Key missing');
if (typeof joseHeader.iv !== 'string')
throw new errors_js_1.JWEInvalid(`JOSE Header "iv" (Initialization Vector) missing or invalid`);
if (typeof joseHeader.tag !== 'string')
throw new errors_js_1.JWEInvalid(`JOSE Header "tag" (Authentication Tag) missing or invalid`);
let iv;
try {
iv = (0, base64url_js_1.decode)(joseHeader.iv);
}
catch {
throw new errors_js_1.JWEInvalid('Failed to base64url decode the iv');
}
let tag;
try {
tag = (0, base64url_js_1.decode)(joseHeader.tag);
}
catch {
throw new errors_js_1.JWEInvalid('Failed to base64url decode the tag');
}
return (0, aesgcmkw_js_1.unwrap)(alg, key, encryptedKey, iv, tag);
}
default: {
throw new errors_js_1.JOSENotSupported('Invalid or unsupported "alg" (JWE Algorithm) header value');
}
}
}
exports.default = decryptKeyManagement;

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/admin/forms/Field.ts"],"sourcesContent":["import type { I18nClient } from '@payloadcms/translations'\nimport type { MarkOptional } from 'ts-essentials'\n\nimport type { SanitizedFieldPermissions } from '../../auth/types.js'\nimport type { ClientBlock, ClientField, Field } from '../../fields/config/types.js'\nimport type { TypedUser } from '../../index.js'\nimport type { DocumentPreferences } from '../../preferences/types.js'\nimport type { Operation, Payload, PayloadRequest } from '../../types/index.js'\nimport type {\n ClientFieldSchemaMap,\n ClientTab,\n Data,\n FieldSchemaMap,\n FormField,\n FormState,\n RenderedField,\n} from '../types.js'\n\nexport type ClientFieldWithOptionalType = MarkOptional<ClientField, 'type'>\n\nexport type ClientComponentProps = {\n customComponents?: FormField['customComponents']\n field: ClientBlock | ClientField | ClientTab\n /**\n * Controls the rendering behavior of the fields, i.e. defers rendering until they intersect with the viewport using the Intersection Observer API.\n *\n * If true, the fields will be rendered immediately, rather than waiting for them to intersect with the viewport.\n *\n * If a number is provided, will immediately render fields _up to that index_.\n */\n forceRender?: boolean\n permissions?: SanitizedFieldPermissions\n readOnly?: boolean\n renderedBlocks?: RenderedField[]\n /**\n * Used to extract field configs from a schemaMap.\n * Does not include indexes.\n *\n * @default field.name\n **/\n schemaPath?: string\n}\n\n// TODO: maybe we can come up with a better name?\nexport type FieldPaths = {\n /**\n * @default ''\n */\n indexPath?: string\n /**\n * @default ''\n */\n parentPath?: string\n /**\n * The path built up to the point of the field\n * excluding the field name.\n *\n * @default ''\n */\n parentSchemaPath?: string\n /**\n * A built up path to access FieldState in the form state.\n * Nested fields will have a path that includes the parent field names\n * if they are nested within a group, array, block or named tab.\n *\n * Collapsibles and unnamed tabs will have arbitrary paths\n * that look like _index-0, _index-1, etc.\n *\n * Row fields will not have a path.\n *\n * @example 'parentGroupField.childTextField'\n *\n * @default field.name\n */\n path: string\n}\n\n/**\n * TODO: This should be renamed to `FieldComponentServerProps` or similar\n */\nexport type ServerComponentProps = {\n clientField: ClientFieldWithOptionalType\n clientFieldSchemaMap: ClientFieldSchemaMap\n collectionSlug: string\n data: Data\n field: Field\n /**\n * The fieldSchemaMap that is created before form state is built is made available here.\n */\n fieldSchemaMap: FieldSchemaMap\n /**\n * Server Components will also have available to the entire form state.\n * We cannot add it to ClientComponentProps as that would blow up the size of the props sent to the client.\n */\n formState: FormState\n i18n: I18nClient\n id?: number | string\n operation: Operation\n payload: Payload\n permissions: SanitizedFieldPermissions\n preferences: DocumentPreferences\n req: PayloadRequest\n siblingData: Data\n user: TypedUser\n value?: unknown\n}\n\nexport type ClientFieldBase<\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = {\n readonly field: TFieldClient\n} & Omit<ClientComponentProps, 'customComponents' | 'field'>\n\nexport type ServerFieldBase<\n TFieldServer extends Field = Field,\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = {\n readonly clientField: TFieldClient\n readonly field: TFieldServer\n} & Omit<ClientComponentProps, 'field'> &\n Omit<ServerComponentProps, 'clientField' | 'field'>\n\nexport type FieldClientComponent<\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n AdditionalProps extends Record<string, unknown> = Record<string, unknown>,\n> = React.ComponentType<AdditionalProps & ClientFieldBase<TFieldClient>>\n\nexport type FieldServerComponent<\n TFieldServer extends Field = Field,\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n AdditionalProps extends Record<string, unknown> = Record<string, unknown>,\n> = React.ComponentType<AdditionalProps & ServerFieldBase<TFieldServer, TFieldClient>>\n"],"names":[],"mappings":"AA+HA,WAIsF"}

View File

@@ -0,0 +1,13 @@
import { entityKind } from "../entity.js";
import { SingleStoreDatabase } from "../singlestore-core/db.js";
import type { DrizzleConfig } from "../utils.js";
import { type SingleStoreRemotePreparedQueryHKT, type SingleStoreRemoteQueryResultHKT } from "./session.js";
export declare class SingleStoreRemoteDatabase<TSchema extends Record<string, unknown> = Record<string, never>> extends SingleStoreDatabase<SingleStoreRemoteQueryResultHKT, SingleStoreRemotePreparedQueryHKT, TSchema> {
static readonly [entityKind]: string;
}
export type RemoteCallback = (sql: string, params: any[], method: 'all' | 'execute') => Promise<{
rows: any[];
insertId?: number;
affectedRows?: number;
}>;
export declare function drizzle<TSchema extends Record<string, unknown> = Record<string, never>>(callback: RemoteCallback, config?: DrizzleConfig<TSchema>): SingleStoreRemoteDatabase<TSchema>;

View File

@@ -0,0 +1,81 @@
'use strict'
const bench = require('fastbench')
const pino = require('../')
const bunyan = require('bunyan')
const bole = require('bole')('bench')
const winston = require('winston')
const fs = require('node:fs')
const dest = fs.createWriteStream('/dev/null')
const plogNodeStream = pino(dest)
delete require.cache[require.resolve('../')]
const plogDest = require('../')(pino.destination('/dev/null'))
delete require.cache[require.resolve('../')]
const plogMinLength = require('../')(pino.destination({ dest: '/dev/null', sync: false, minLength: 4096 }))
const crypto = require('crypto')
const longStr = crypto.randomBytes(2000).toString()
const max = 10
const blog = bunyan.createLogger({
name: 'myapp',
streams: [{
level: 'trace',
stream: dest
}]
})
require('bole').output({
level: 'info',
stream: dest
}).setFastTime(true)
const chill = winston.createLogger({
transports: [
new winston.transports.Stream({
stream: fs.createWriteStream('/dev/null')
})
]
})
const run = bench([
function benchBunyan (cb) {
for (var i = 0; i < max; i++) {
blog.info(longStr)
}
setImmediate(cb)
},
function benchWinston (cb) {
for (var i = 0; i < max; i++) {
chill.info(longStr)
}
setImmediate(cb)
},
function benchBole (cb) {
for (var i = 0; i < max; i++) {
bole.info(longStr)
}
setImmediate(cb)
},
function benchPino (cb) {
for (var i = 0; i < max; i++) {
plogDest.info(longStr)
}
setImmediate(cb)
},
function benchPinoMinLength (cb) {
for (var i = 0; i < max; i++) {
plogMinLength.info(longStr)
}
setImmediate(cb)
},
function benchPinoNodeStream (cb) {
for (var i = 0; i < max; i++) {
plogNodeStream.info(longStr)
}
setImmediate(cb)
}
], 1000)
run(run)

View File

@@ -0,0 +1,6 @@
import { browserTracingIntegrationShim, feedbackIntegrationShim } from '@sentry-internal/integration-shims';
export * from './index.bundle.base';
export { logger, consoleLoggingIntegration } from '@sentry/core';
export { replayIntegration, getReplay } from '@sentry-internal/replay';
export { browserTracingIntegrationShim as browserTracingIntegration, feedbackIntegrationShim as feedbackAsyncIntegration, feedbackIntegrationShim as feedbackIntegration, };
//# sourceMappingURL=index.bundle.replay.logs.metrics.d.ts.map

View File

@@ -0,0 +1,90 @@
declare module "stream/promises" {
import {
FinishedOptions as _FinishedOptions,
PipelineDestination,
PipelineOptions,
PipelinePromise,
PipelineSource,
PipelineTransform,
} from "node:stream";
interface FinishedOptions extends _FinishedOptions {
/**
* If true, removes the listeners registered by this function before the promise is fulfilled.
* @default false
*/
cleanup?: boolean | undefined;
}
function finished(
stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream,
options?: FinishedOptions,
): Promise<void>;
function pipeline<A extends PipelineSource<any>, B extends PipelineDestination<A, any>>(
source: A,
destination: B,
options?: PipelineOptions,
): PipelinePromise<B>;
function pipeline<
A extends PipelineSource<any>,
T1 extends PipelineTransform<A, any>,
B extends PipelineDestination<T1, any>,
>(
source: A,
transform1: T1,
destination: B,
options?: PipelineOptions,
): PipelinePromise<B>;
function pipeline<
A extends PipelineSource<any>,
T1 extends PipelineTransform<A, any>,
T2 extends PipelineTransform<T1, any>,
B extends PipelineDestination<T2, any>,
>(
source: A,
transform1: T1,
transform2: T2,
destination: B,
options?: PipelineOptions,
): PipelinePromise<B>;
function pipeline<
A extends PipelineSource<any>,
T1 extends PipelineTransform<A, any>,
T2 extends PipelineTransform<T1, any>,
T3 extends PipelineTransform<T2, any>,
B extends PipelineDestination<T3, any>,
>(
source: A,
transform1: T1,
transform2: T2,
transform3: T3,
destination: B,
options?: PipelineOptions,
): PipelinePromise<B>;
function pipeline<
A extends PipelineSource<any>,
T1 extends PipelineTransform<A, any>,
T2 extends PipelineTransform<T1, any>,
T3 extends PipelineTransform<T2, any>,
T4 extends PipelineTransform<T3, any>,
B extends PipelineDestination<T4, any>,
>(
source: A,
transform1: T1,
transform2: T2,
transform3: T3,
transform4: T4,
destination: B,
options?: PipelineOptions,
): PipelinePromise<B>;
function pipeline(
streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>,
options?: PipelineOptions,
): Promise<void>;
function pipeline(
stream1: NodeJS.ReadableStream,
stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | PipelineOptions>
): Promise<void>;
}
declare module "node:stream/promises" {
export * from "stream/promises";
}

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 School = createLucideIcon("School", [
["path", { d: "M14 22v-4a2 2 0 1 0-4 0v4", key: "hhkicm" }],
["path", { d: "m18 10 4 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-8l4-2", key: "1vwozw" }],
["path", { d: "M18 5v17", key: "1sw6gf" }],
["path", { d: "m4 6 8-4 8 4", key: "1q0ilc" }],
["path", { d: "M6 5v17", key: "1xfsm0" }],
["circle", { cx: "12", cy: "9", r: "2", key: "1092wv" }]
]);
export { School as default };
//# sourceMappingURL=school.js.map

View File

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

View File

@@ -0,0 +1,158 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from 'react';
import './index.scss';
const baseClass = 'thumbnail';
import { File } from '../../graphics/File/index.js';
import { ShimmerEffect } from '../ShimmerEffect/index.js';
export const Thumbnail = props => {
const $ = _c(6);
const {
className: t0,
doc: t1,
fileSrc,
height,
imageCacheTag,
size,
width
} = props;
const className = t0 === undefined ? "" : t0;
const {
filename
} = t1 === undefined ? {} : t1;
const [fileExists, setFileExists] = React.useState(undefined);
const t2 = `${baseClass}--size-${size || "medium"}`;
let t3;
if ($[0] !== className || $[1] !== t2) {
t3 = [baseClass, t2, className];
$[0] = className;
$[1] = t2;
$[2] = t3;
} else {
t3 = $[2];
}
const classNames = t3.join(" ");
let t4;
let t5;
if ($[3] !== fileSrc) {
t4 = () => {
if (!fileSrc) {
setFileExists(false);
return;
}
setFileExists(undefined);
const img = new Image();
img.src = fileSrc;
img.onload = () => {
setFileExists(true);
};
img.onerror = () => {
setFileExists(false);
};
};
t5 = [fileSrc];
$[3] = fileSrc;
$[4] = t4;
$[5] = t5;
} else {
t4 = $[4];
t5 = $[5];
}
React.useEffect(t4, t5);
let src = null;
if (fileSrc) {
const queryChar = fileSrc?.includes("?") ? "&" : "?";
src = imageCacheTag ? `${fileSrc}${queryChar}${encodeURIComponent(imageCacheTag)}` : fileSrc;
}
return _jsxs("div", {
className: classNames,
children: [fileExists === undefined && _jsx(ShimmerEffect, {
height: "100%"
}), fileExists && _jsx("img", {
alt: filename,
height,
src,
width
}), fileExists === false && _jsx(File, {})]
});
};
export function ThumbnailComponent(props) {
const $ = _c(12);
const {
alt,
className: t0,
filename,
fileSrc,
imageCacheTag,
size
} = props;
const className = t0 === undefined ? "" : t0;
const [fileExists, setFileExists] = React.useState(undefined);
const t1 = `${baseClass}--size-${size || "medium"}`;
let t2;
if ($[0] !== className || $[1] !== t1) {
t2 = [baseClass, t1, className];
$[0] = className;
$[1] = t1;
$[2] = t2;
} else {
t2 = $[2];
}
const classNames = t2.join(" ");
let t3;
let t4;
if ($[3] !== fileSrc) {
t3 = () => {
if (!fileSrc) {
setFileExists(false);
return;
}
setFileExists(undefined);
const img = new Image();
img.src = fileSrc;
img.onload = () => {
setFileExists(true);
};
img.onerror = () => {
setFileExists(false);
};
};
t4 = [fileSrc];
$[3] = fileSrc;
$[4] = t3;
$[5] = t4;
} else {
t3 = $[4];
t4 = $[5];
}
React.useEffect(t3, t4);
let src = "";
if (fileSrc) {
const queryChar = fileSrc?.includes("?") ? "&" : "?";
src = imageCacheTag ? `${fileSrc}${queryChar}${encodeURIComponent(imageCacheTag)}` : fileSrc;
}
let t5;
if ($[6] !== alt || $[7] !== classNames || $[8] !== fileExists || $[9] !== filename || $[10] !== src) {
t5 = _jsxs("div", {
className: classNames,
children: [fileExists === undefined && _jsx(ShimmerEffect, {
height: "100%"
}), fileExists && _jsx("img", {
alt: alt || filename,
src
}), fileExists === false && _jsx(File, {})]
});
$[6] = alt;
$[7] = classNames;
$[8] = fileExists;
$[9] = filename;
$[10] = src;
$[11] = t5;
} else {
t5 = $[11];
}
return t5;
}
//# sourceMappingURL=index.js.map

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"NoopContextManager.js","sourceRoot":"","sources":["../../../src/context/NoopContextManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAGzC;IAAA;IAyBA,CAAC;IAxBC,mCAAM,GAAN;QACE,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,iCAAI,GAAJ,UACE,QAAuB,EACvB,EAAK,EACL,OAA8B;QAC9B,cAAU;aAAV,UAAU,EAAV,qBAAU,EAAV,IAAU;YAAV,6BAAU;;QAEV,OAAO,EAAE,CAAC,IAAI,OAAP,EAAE,iBAAM,OAAO,UAAK,IAAI,WAAE;IACnC,CAAC;IAED,iCAAI,GAAJ,UAAQ,QAAuB,EAAE,MAAS;QACxC,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,mCAAM,GAAN;QACE,OAAO,IAAI,CAAC;IACd,CAAC;IAED,oCAAO,GAAP;QACE,OAAO,IAAI,CAAC;IACd,CAAC;IACH,yBAAC;AAAD,CAAC,AAzBD,IAyBC","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 { ROOT_CONTEXT } from './context';\nimport * as types from './types';\n\nexport class NoopContextManager implements types.ContextManager {\n active(): types.Context {\n return ROOT_CONTEXT;\n }\n\n with<A extends unknown[], F extends (...args: A) => ReturnType<F>>(\n _context: types.Context,\n fn: F,\n thisArg?: ThisParameterType<F>,\n ...args: A\n ): ReturnType<F> {\n return fn.call(thisArg, ...args);\n }\n\n bind<T>(_context: types.Context, target: T): T {\n return target;\n }\n\n enable(): this {\n return this;\n }\n\n disable(): this {\n return this;\n }\n}\n"]}

View File

@@ -0,0 +1,298 @@
import { describe, it, expect } from 'vitest';
import { getLockedDocumentsCollection } from './config.js';
describe('getLockedDocumentsCollection', ()=>{
it('should return null when no lockable collections or globals exist', ()=>{
const config = {
collections: [
{
slug: 'posts',
lockDocuments: false,
fields: []
},
{
slug: 'pages',
lockDocuments: false,
fields: []
}
],
globals: [
{
slug: 'settings',
lockDocuments: false,
fields: []
}
]
};
const result = getLockedDocumentsCollection(config);
expect(result).toBeNull();
});
it('should return null when no auth collections exist', ()=>{
const config = {
collections: [
{
slug: 'posts',
lockDocuments: true,
fields: []
},
{
slug: 'pages',
lockDocuments: {
duration: 600
},
fields: []
}
]
};
const result = getLockedDocumentsCollection(config);
expect(result).toBeNull();
});
it('should return collection config when lockable and auth collections exist', ()=>{
const config = {
collections: [
{
slug: 'posts',
lockDocuments: true,
fields: []
},
{
slug: 'pages',
lockDocuments: {
duration: 600
},
fields: []
},
{
slug: 'users',
auth: true,
fields: []
}
]
};
const result = getLockedDocumentsCollection(config);
expect(result).not.toBeNull();
expect(result?.slug).toBe('payload-locked-documents');
expect(result?.fields).toHaveLength(3);
// Check document field
const documentField = result?.fields.find((f)=>'name' in f && f.name === 'document');
expect(documentField).toBeDefined();
expect(documentField?.type).toBe('relationship');
if (documentField?.type === 'relationship') {
expect(documentField.relationTo).toEqual([
'posts',
'pages',
'users'
]);
}
// Check user field
const userField = result?.fields.find((f)=>'name' in f && f.name === 'user');
expect(userField).toBeDefined();
expect(userField?.type).toBe('relationship');
if (userField?.type === 'relationship') {
expect(userField.relationTo).toEqual([
'users'
]);
}
});
it('should only include collections with lockDocuments !== false', ()=>{
const config = {
collections: [
{
slug: 'posts',
lockDocuments: true,
fields: []
},
{
slug: 'pages',
lockDocuments: false,
fields: []
},
{
slug: 'articles',
// lockDocuments undefined (defaults to true)
fields: []
},
{
slug: 'users',
auth: true,
fields: []
}
]
};
const result = getLockedDocumentsCollection(config);
expect(result).not.toBeNull();
const documentField = result?.fields.find((f)=>'name' in f && f.name === 'document');
if (documentField?.type === 'relationship') {
expect(documentField.relationTo).toEqual([
'posts',
'articles',
'users'
]);
expect(documentField.relationTo).not.toContain('pages');
}
});
it('should include multiple auth collections', ()=>{
const config = {
collections: [
{
slug: 'posts',
lockDocuments: true,
fields: []
},
{
slug: 'users',
auth: true,
fields: []
},
{
slug: 'admins',
auth: {
loginWithUsername: true
},
fields: []
}
]
};
const result = getLockedDocumentsCollection(config);
expect(result).not.toBeNull();
const userField = result?.fields.find((f)=>'name' in f && f.name === 'user');
if (userField?.type === 'relationship') {
expect(userField.relationTo).toEqual([
'users',
'admins'
]);
}
});
it('should set lockDocuments to false on the locked-documents collection itself', ()=>{
const config = {
collections: [
{
slug: 'posts',
lockDocuments: true,
fields: []
},
{
slug: 'users',
auth: true,
fields: []
}
]
};
const result = getLockedDocumentsCollection(config);
expect(result).not.toBeNull();
expect(result?.lockDocuments).toBe(false);
});
it('should create collection when only globals have lockDocuments enabled', ()=>{
const config = {
collections: [
{
slug: 'posts',
lockDocuments: false,
fields: []
},
{
slug: 'users',
auth: true,
lockDocuments: false,
fields: []
}
],
globals: [
{
slug: 'settings',
lockDocuments: true,
fields: []
},
{
slug: 'menu',
lockDocuments: {
duration: 600
},
fields: []
}
]
};
const result = getLockedDocumentsCollection(config);
expect(result).not.toBeNull();
expect(result?.slug).toBe('payload-locked-documents');
// Should NOT have a document field since no lockable collections
const documentField = result?.fields.find((f)=>'name' in f && f.name === 'document');
expect(documentField).toBeUndefined();
// Should have globalSlug field
const globalSlugField = result?.fields.find((f)=>'name' in f && f.name === 'globalSlug');
expect(globalSlugField).toBeDefined();
// Should have user field
const userField = result?.fields.find((f)=>'name' in f && f.name === 'user');
expect(userField).toBeDefined();
});
it('should include document field when lockable collections exist', ()=>{
const config = {
collections: [
{
slug: 'posts',
lockDocuments: true,
fields: []
},
{
slug: 'users',
auth: true,
fields: []
}
],
globals: [
{
slug: 'settings',
lockDocuments: false,
fields: []
}
]
};
const result = getLockedDocumentsCollection(config);
expect(result).not.toBeNull();
// Should have document field
const documentField = result?.fields.find((f)=>'name' in f && f.name === 'document');
expect(documentField).toBeDefined();
expect(documentField?.type).toBe('relationship');
if (documentField?.type === 'relationship') {
expect(documentField.relationTo).toEqual([
'posts',
'users'
]);
}
// Should have globalSlug field
const globalSlugField = result?.fields.find((f)=>'name' in f && f.name === 'globalSlug');
expect(globalSlugField).toBeDefined();
});
it('should include document field when both lockable collections and globals exist', ()=>{
const config = {
collections: [
{
slug: 'posts',
lockDocuments: true,
fields: []
},
{
slug: 'users',
auth: true,
fields: []
}
],
globals: [
{
slug: 'settings',
lockDocuments: true,
fields: []
}
]
};
const result = getLockedDocumentsCollection(config);
expect(result).not.toBeNull();
// Should have document field for collections
const documentField = result?.fields.find((f)=>'name' in f && f.name === 'document');
expect(documentField).toBeDefined();
// Should have globalSlug field for globals
const globalSlugField = result?.fields.find((f)=>'name' in f && f.name === 'globalSlug');
expect(globalSlugField).toBeDefined();
});
});
//# sourceMappingURL=config.spec.js.map

View File

@@ -0,0 +1,4 @@
import type { MigrationConfig } from "../migrator.js";
import type { MySqlRemoteDatabase } from "./driver.js";
export type ProxyMigrator = (migrationQueries: string[]) => Promise<void>;
export declare function migrate<TSchema extends Record<string, unknown>>(db: MySqlRemoteDatabase<TSchema>, callback: ProxyMigrator, config: MigrationConfig): Promise<void>;

View File

@@ -0,0 +1,101 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateSecret = generateSecret;
exports.generateKeyPair = generateKeyPair;
const node_crypto_1 = require("node:crypto");
const node_util_1 = require("node:util");
const random_js_1 = require("./random.js");
const errors_js_1 = require("../util/errors.js");
const generate = (0, node_util_1.promisify)(node_crypto_1.generateKeyPair);
async function generateSecret(alg, options) {
let length;
switch (alg) {
case 'HS256':
case 'HS384':
case 'HS512':
case 'A128CBC-HS256':
case 'A192CBC-HS384':
case 'A256CBC-HS512':
length = parseInt(alg.slice(-3), 10);
break;
case 'A128KW':
case 'A192KW':
case 'A256KW':
case 'A128GCMKW':
case 'A192GCMKW':
case 'A256GCMKW':
case 'A128GCM':
case 'A192GCM':
case 'A256GCM':
length = parseInt(alg.slice(1, 4), 10);
break;
default:
throw new errors_js_1.JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
}
return (0, node_crypto_1.createSecretKey)((0, random_js_1.default)(new Uint8Array(length >> 3)));
}
async function generateKeyPair(alg, options) {
switch (alg) {
case 'RS256':
case 'RS384':
case 'RS512':
case 'PS256':
case 'PS384':
case 'PS512':
case 'RSA-OAEP':
case 'RSA-OAEP-256':
case 'RSA-OAEP-384':
case 'RSA-OAEP-512':
case 'RSA1_5': {
const modulusLength = options?.modulusLength ?? 2048;
if (typeof modulusLength !== 'number' || modulusLength < 2048) {
throw new errors_js_1.JOSENotSupported('Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used');
}
const keypair = await generate('rsa', {
modulusLength,
publicExponent: 0x10001,
});
return keypair;
}
case 'ES256':
return generate('ec', { namedCurve: 'P-256' });
case 'ES256K':
return generate('ec', { namedCurve: 'secp256k1' });
case 'ES384':
return generate('ec', { namedCurve: 'P-384' });
case 'ES512':
return generate('ec', { namedCurve: 'P-521' });
case 'EdDSA': {
switch (options?.crv) {
case undefined:
case 'Ed25519':
return generate('ed25519');
case 'Ed448':
return generate('ed448');
default:
throw new errors_js_1.JOSENotSupported('Invalid or unsupported crv option provided, supported values are Ed25519 and Ed448');
}
}
case 'ECDH-ES':
case 'ECDH-ES+A128KW':
case 'ECDH-ES+A192KW':
case 'ECDH-ES+A256KW': {
const crv = options?.crv ?? 'P-256';
switch (crv) {
case undefined:
case 'P-256':
case 'P-384':
case 'P-521':
return generate('ec', { namedCurve: crv });
case 'X25519':
return generate('x25519');
case 'X448':
return generate('x448');
default:
throw new errors_js_1.JOSENotSupported('Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448');
}
}
default:
throw new errors_js_1.JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
}
}

View File

@@ -0,0 +1,51 @@
'use strict';
const c = require('kleur');
const figures = require('./figures'); // rendering user input.
const styles = Object.freeze({
password: {
scale: 1,
render: input => '*'.repeat(input.length)
},
emoji: {
scale: 2,
render: input => '😃'.repeat(input.length)
},
invisible: {
scale: 0,
render: input => ''
},
default: {
scale: 1,
render: input => `${input}`
}
});
const render = type => styles[type] || styles.default; // icon to signalize a prompt.
const symbols = Object.freeze({
aborted: c.red(figures.cross),
done: c.green(figures.tick),
exited: c.yellow(figures.cross),
default: c.cyan('?')
});
const symbol = (done, aborted, exited) => aborted ? symbols.aborted : exited ? symbols.exited : done ? symbols.done : symbols.default; // between the question and the user's input.
const delimiter = completing => c.gray(completing ? figures.ellipsis : figures.pointerSmall);
const item = (expandable, expanded) => c.gray(expandable ? expanded ? figures.pointerSmall : '+' : figures.line);
module.exports = {
styles,
render,
symbols,
symbol,
delimiter,
item
};

View File

@@ -0,0 +1,14 @@
import { Buffer } from 'node:buffer';
import { decoder } from '../lib/buffer_utils.js';
function normalize(input) {
let encoded = input;
if (encoded instanceof Uint8Array) {
encoded = decoder.decode(encoded);
}
return encoded;
}
const encode = (input) => Buffer.from(input).toString('base64url');
export const decodeBase64 = (input) => new Uint8Array(Buffer.from(input, 'base64'));
export const encodeBase64 = (input) => Buffer.from(input).toString('base64');
export { encode };
export const decode = (input) => new Uint8Array(Buffer.from(normalize(input), 'base64url'));

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 CircleChevronUp = createLucideIcon("CircleChevronUp", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["path", { d: "m8 14 4-4 4 4", key: "fy2ptz" }]
]);
export { CircleChevronUp as default };
//# sourceMappingURL=circle-chevron-up.js.map

View File

@@ -0,0 +1,17 @@
export async function optionallyAppendMetadata({ req, sharpFile, withMetadata }) {
const metadata = await sharpFile.metadata();
if (withMetadata === true) {
return sharpFile.withMetadata();
} else if (typeof withMetadata === 'function') {
const useMetadata = await withMetadata({
metadata,
req
});
if (useMetadata) {
return sharpFile.withMetadata();
}
}
return sharpFile;
}
//# sourceMappingURL=optionallyAppendMetadata.js.map

View File

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

View File

@@ -0,0 +1,51 @@
import { getClient } from '../currentScopes.js';
import { defineIntegration } from '../integration.js';
import { getOriginalFunction } from '../utils/object.js';
let originalFunctionToString;
const INTEGRATION_NAME = 'FunctionToString';
const SETUP_CLIENTS = new WeakMap();
const _functionToStringIntegration = (() => {
return {
name: INTEGRATION_NAME,
setupOnce() {
// eslint-disable-next-line @typescript-eslint/unbound-method
originalFunctionToString = Function.prototype.toString;
// intrinsics (like Function.prototype) might be immutable in some environments
// e.g. Node with --frozen-intrinsics, XS (an embedded JavaScript engine) or SES (a JavaScript proposal)
try {
Function.prototype.toString = function ( ...args) {
const originalFunction = getOriginalFunction(this);
const context =
SETUP_CLIENTS.has(getClient() ) && originalFunction !== undefined ? originalFunction : this;
return originalFunctionToString.apply(context, args);
};
} catch {
// ignore errors here, just don't patch this
}
},
setup(client) {
SETUP_CLIENTS.set(client, true);
},
};
}) ;
/**
* Patch toString calls to return proper name for wrapped functions.
*
* ```js
* Sentry.init({
* integrations: [
* functionToStringIntegration(),
* ],
* });
* ```
*/
const functionToStringIntegration = defineIntegration(_functionToStringIntegration);
export { functionToStringIntegration };
//# sourceMappingURL=functiontostring.js.map

View File

@@ -0,0 +1,15 @@
{
"pkg": {
"assets": [
"../custom-worker.js",
"../to-file.js"
],
"targets": [
"node14",
"node16",
"node18",
"node20"
],
"outputPath": "test/pkg"
}
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"video-off.js","sources":["../../../src/icons/video-off.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name VideoOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTAuNjYgNkgxNGEyIDIgMCAwIDEgMiAydjIuNWw1LjI0OC0zLjA2MkEuNS41IDAgMCAxIDIyIDcuODd2OC4xOTYiIC8+CiAgPHBhdGggZD0iTTE2IDE2YTIgMiAwIDAgMS0yIDJINGEyIDIgMCAwIDEtMi0yVjhhMiAyIDAgMCAxIDItMmgyIiAvPgogIDxwYXRoIGQ9Im0yIDIgMjAgMjAiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/video-off\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 VideoOff = createLucideIcon('VideoOff', [\n [\n 'path',\n { d: 'M10.66 6H14a2 2 0 0 1 2 2v2.5l5.248-3.062A.5.5 0 0 1 22 7.87v8.196', key: 'w8jjjt' },\n ],\n ['path', { d: 'M16 16a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2', key: '1xawa7' }],\n ['path', { d: 'm2 2 20 20', key: '1ooewy' }],\n]);\n\nexport default VideoOff;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAC5C,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,CAAA,CAAA,CAAsE,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAS,CAAA,CAAA;AAAA,CAC3F,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"CreatedAtCell.js","names":["useConfig","useModal","useRouteTransition","useTranslation","formatDate","usePathname","useRouter","useSearchParams","VersionDrawerCreatedAtCell","t0","rowData","t1","id","updatedAt","undefined","config","t2","admin","t3","dateFormat","closeAllModals","router","pathname","searchParams","startRouteTransition","i18n","_jsx","className","onClick","current","URLSearchParams","Array","from","entries","set","String","search","toString","query","push","type","children","date","pattern"],"sources":["../../../../../src/views/Version/SelectComparison/VersionDrawer/CreatedAtCell.tsx"],"sourcesContent":["'use client'\nimport { useConfig, useModal, useRouteTransition, useTranslation } from '@payloadcms/ui'\nimport { formatDate } from '@payloadcms/ui/shared'\nimport { usePathname, useRouter, useSearchParams } from 'next/navigation.js'\n\nimport type { CreatedAtCellProps } from '../../../Versions/cells/CreatedAt/index.js'\n\nexport const VersionDrawerCreatedAtCell: React.FC<CreatedAtCellProps> = ({\n rowData: { id, updatedAt } = {},\n}) => {\n const {\n config: {\n admin: { dateFormat },\n },\n } = useConfig()\n const { closeAllModals } = useModal()\n const router = useRouter()\n const pathname = usePathname()\n const searchParams = useSearchParams()\n const { startRouteTransition } = useRouteTransition()\n\n const { i18n } = useTranslation()\n\n return (\n <button\n className=\"created-at-cell\"\n onClick={() => {\n closeAllModals()\n const current = new URLSearchParams(Array.from(searchParams.entries()))\n\n if (id) {\n current.set('versionFrom', String(id))\n }\n\n const search = current.toString()\n const query = search ? `?${search}` : ''\n\n startRouteTransition(() => router.push(`${pathname}${query}`))\n }}\n type=\"button\"\n >\n {formatDate({ date: updatedAt, i18n, pattern: dateFormat })}\n </button>\n )\n}\n"],"mappings":"AAAA;;;AACA,SAASA,SAAS,EAAEC,QAAQ,EAAEC,kBAAkB,EAAEC,cAAc,QAAQ;AACxE,SAASC,UAAU,QAAQ;AAC3B,SAASC,WAAW,EAAEC,SAAS,EAAEC,eAAe,QAAQ;AAIxD,OAAO,MAAMC,0BAAA,GAA2DC,EAAA;EAAC;IAAAC,OAAA,EAAAC;EAAA,IAAAF,EAExE;EADU;IAAAG,EAAA;IAAAC;EAAA,IAAAF,EAAsB,KAAAG,SAAA,QAAtBH,EAAsB;EAE/B;IAAAI,MAAA,EAAAC;EAAA,IAIIhB,SAAA;EAHM;IAAAiB,KAAA,EAAAC;EAAA,IAAAF,EAEP;EADQ;IAAAG;EAAA,IAAAD,EAAc;EAGzB;IAAAE;EAAA,IAA2BnB,QAAA;EAC3B,MAAAoB,MAAA,GAAef,SAAA;EACf,MAAAgB,QAAA,GAAiBjB,WAAA;EACjB,MAAAkB,YAAA,GAAqBhB,eAAA;EACrB;IAAAiB;EAAA,IAAiCtB,kBAAA;EAEjC;IAAAuB;EAAA,IAAiBtB,cAAA;EAAA,OAGfuB,IAAA,CAAC;IAAAC,SAAA,EACW;IAAAC,OAAA,EAAAA,CAAA;MAERR,cAAA;MACA,MAAAS,OAAA,OAAAC,eAAA,CAAoCC,KAAA,CAAAC,IAAA,CAAWT,YAAA,CAAAU,OAAA,CAAoB;MAAA,IAE/DrB,EAAA;QACFiB,OAAA,CAAAK,GAAA,CAAY,eAAeC,MAAA,CAAOvB,EAAA;MAAA;MAGpC,MAAAwB,MAAA,GAAeP,OAAA,CAAAQ,QAAA,CAAgB;MAC/B,MAAAC,KAAA,GAAcF,MAAA,GAAS,IAAIA,MAAA,EAAQ,GAAG;MAEtCZ,oBAAA,OAA2BH,MAAA,CAAAkB,IAAA,CAAY,GAAGjB,QAAA,GAAWgB,KAAA,EAAO;IAAA;IAAAE,IAAA,EAEzD;IAAAC,QAAA,EAEJrC,UAAA;MAAAsC,IAAA,EAAmB7B,SAAA;MAAAY,IAAA;MAAAkB,OAAA,EAA0BxB;IAAA,CAAW;EAAA,C;CAG/D","ignoreList":[]}

View File

@@ -0,0 +1,26 @@
"use strict";
exports.__esModule = true;
exports.default = insertAfter;
/**
* Inserts a node after a given reference node.
*
* @param node the node to insert
* @param refNode the reference node
*/
function insertAfter(node, refNode) {
if (node && refNode && refNode.parentNode) {
if (refNode.nextSibling) {
refNode.parentNode.insertBefore(node, refNode.nextSibling);
} else {
refNode.parentNode.appendChild(node);
}
return node;
}
return null;
}
module.exports = exports["default"];

View File

@@ -0,0 +1,13 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import BaseWorkerPool from './base/BaseWorkerPool';
import type { ChildMessage, OnCustomMessage, OnEnd, OnStart, WorkerInterface, WorkerOptions, WorkerPoolInterface } from './types';
declare class WorkerPool extends BaseWorkerPool implements WorkerPoolInterface {
send(workerId: number, request: ChildMessage, onStart: OnStart, onEnd: OnEnd, onCustomMessage: OnCustomMessage): void;
createWorker(workerOptions: WorkerOptions): WorkerInterface;
}
export default WorkerPool;

View File

@@ -0,0 +1,267 @@
import fs from 'fs';
import { createRequire } from 'module';
import path from 'path';
import { getFormatExtension } from '../extractor/format/index.js';
import SourceFileFilter from '../extractor/source/SourceFileFilter.js';
import { isDevelopmentOrNextBuild } from './config.js';
import { isNextJs16OrHigher, hasStableTurboConfig } from './nextFlags.js';
import { throwError } from './utils.js';
const require$1 = createRequire(import.meta.url);
function withExtensions(localPath) {
return [`${localPath}.ts`, `${localPath}.tsx`, `${localPath}.js`, `${localPath}.jsx`];
}
function normalizeTurbopackAliasPath(pathname) {
// Turbopack alias targets should use forward slashes; Windows backslashes can
// break resolution in dev (see `next-intl/config` alias path style).
return pathname.replace(/\\/g, '/');
}
function resolveI18nPath(providedPath, cwd) {
function resolvePath(pathname) {
const parts = [];
if (cwd) parts.push(cwd);
parts.push(pathname);
return path.resolve(...parts);
}
function pathExists(pathname) {
return fs.existsSync(resolvePath(pathname));
}
if (providedPath) {
// We use the `isNextDevOrBuild` condition to avoid throwing errors
// if `next.config.ts` is read by a non-Next.js process.
// https://github.com/amannn/next-intl/discussions/2209#discussioncomment-15650927
if (isDevelopmentOrNextBuild && !pathExists(providedPath)) {
throwError(`Could not find i18n config at ${providedPath}, please provide a valid path.`);
}
return providedPath;
} else {
for (const candidate of [...withExtensions('./i18n/request'), ...withExtensions('./src/i18n/request')]) {
if (pathExists(candidate)) {
return candidate;
}
}
if (isDevelopmentOrNextBuild) {
throwError(`Could not locate request configuration module.\n\nThis path is supported by default: ./(src/)i18n/request.{js,jsx,ts,tsx}\n\nAlternatively, you can specify a custom location in your Next.js config:\n\nconst withNextIntl = createNextIntlPlugin(\n './path/to/i18n/request.tsx'\n);`);
}
// Default as fallback
if (pathExists('./src')) {
return './src/i18n/request.ts';
} else {
return './i18n/request.ts';
}
}
}
function getNextConfig(pluginConfig, nextConfig) {
const useTurbo = process.env.TURBOPACK != null;
// `experimental-analyze` doesnt set the TURBOPACK env param. Since Next.js
// 16 doesn't print a warning when we configure both Turbo- and Webpack, just
// always configure Turbopack just in case.
const shouldConfigureTurbo = useTurbo || isNextJs16OrHigher();
const nextIntlConfig = {};
function getExtractMessagesLoaderConfig() {
const experimental = pluginConfig.experimental;
if (!experimental.srcPath || !pluginConfig.experimental?.messages) {
throwError('`srcPath` and `messages` are required when using `extractor`.');
}
return {
loader: 'next-intl/extractor/extractionLoader',
options: {
srcPath: experimental.srcPath,
sourceLocale: experimental.extract.sourceLocale,
messages: pluginConfig.experimental.messages
}
};
}
function getCatalogLoaderConfig() {
return {
loader: 'next-intl/extractor/catalogLoader',
options: {
messages: pluginConfig.experimental.messages
}
};
}
function getTurboRules() {
return nextConfig?.turbopack?.rules ||
// @ts-expect-error -- For Next.js <16
nextConfig?.experimental?.turbo?.rules || {};
}
function addTurboRule(rules, glob, rule) {
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (rules[glob]) {
if (Array.isArray(rules[glob])) {
rules[glob].push(rule);
} else {
rules[glob] = [rules[glob], rule];
}
} else {
rules[glob] = rule;
}
}
// Validate messages config
if (pluginConfig.experimental?.messages) {
const messages = pluginConfig.experimental.messages;
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- For non-TS consumers
if (!messages.format) {
throwError('`format` is required when using `messages`.');
}
if (!messages.path) {
throwError('`path` is required when using `messages`.');
}
}
if (shouldConfigureTurbo) {
if (pluginConfig.requestConfig && path.isAbsolute(pluginConfig.requestConfig)) {
throwError("Turbopack support for next-intl currently does not support absolute paths, please provide a relative one (e.g. './src/i18n/config.ts').\n\nFound: " + pluginConfig.requestConfig);
}
// Assign alias for `next-intl/config`
const resolveAlias = {
// Turbo aliases don't work with absolute
// paths (see error handling above)
'next-intl/config': resolveI18nPath(pluginConfig.requestConfig)
};
// Add alias for precompiled message formatting
if (pluginConfig.experimental?.messages?.precompile) {
// Workaround for https://github.com/vercel/next.js/issues/88540
let formatOnlyPath = path.relative(process.cwd(), require$1.resolve('use-intl/format-message/format-only'));
// Turbopack seems to require this, otherwise `use-intl/format-message` is
// still bundled (despite the code correctly calling into `format-only`).
// Note that in this monorepo this is not necessary, because we'll end
// up with a path like `../…` — but for actual consumers this is required.
if (!formatOnlyPath.startsWith('.')) {
formatOnlyPath = `./${formatOnlyPath}`;
}
resolveAlias['use-intl/format-message'] = normalizeTurbopackAliasPath(formatOnlyPath);
}
// Add loaders
let rules;
// Add loader for extractor
if (pluginConfig.experimental?.extract) {
if (!isNextJs16OrHigher()) {
throwError('Message extraction requires Next.js 16 or higher.');
}
rules ??= getTurboRules();
const srcPaths = (Array.isArray(pluginConfig.experimental.srcPath) ? pluginConfig.experimental.srcPath : [pluginConfig.experimental.srcPath]).map(srcPath => srcPath.endsWith('/') ? srcPath.slice(0, -1) : srcPath);
addTurboRule(rules, `*.{${SourceFileFilter.EXTENSIONS.join(',')}}`, {
loaders: [getExtractMessagesLoaderConfig()],
condition: {
// Note: We don't need `not: 'foreign'`, because this is
// implied by the filter based on `srcPath`.
path: `{${srcPaths.join(',')}}` + '/**/*',
content: /(useExtracted|getExtracted)/
}
});
}
// Add loader for catalog
if (pluginConfig.experimental?.messages) {
if (!isNextJs16OrHigher()) {
throwError('Message catalog loading requires Next.js 16 or higher.');
}
rules ??= getTurboRules();
const extension = getFormatExtension(pluginConfig.experimental.messages.format);
addTurboRule(rules, `*${extension}`, {
loaders: [getCatalogLoaderConfig()],
condition: {
path: `${pluginConfig.experimental.messages.path}/**/*`
},
as: '*.js'
});
}
if (hasStableTurboConfig() &&
// @ts-expect-error -- For Next.js <16
!nextConfig?.experimental?.turbo) {
nextIntlConfig.turbopack = {
...nextConfig?.turbopack,
...(rules && {
rules
}),
resolveAlias: {
...nextConfig?.turbopack?.resolveAlias,
...resolveAlias
}
};
} else {
nextIntlConfig.experimental = {
...nextConfig?.experimental,
// @ts-expect-error -- For Next.js <16
turbo: {
// @ts-expect-error -- For Next.js <16
...nextConfig?.experimental?.turbo,
...(rules && {
rules
}),
resolveAlias: {
// @ts-expect-error -- For Next.js <16
...nextConfig?.experimental?.turbo?.resolveAlias,
...resolveAlias
}
}
};
}
}
if (!useTurbo) {
nextIntlConfig.webpack = function webpack(config, context) {
if (!config.resolve) config.resolve = {};
if (!config.resolve.alias) config.resolve.alias = {};
// Assign alias for `next-intl/config`
// (Webpack requires absolute paths)
config.resolve.alias['next-intl/config'] = path.resolve(config.context, resolveI18nPath(pluginConfig.requestConfig, config.context));
// Add alias for precompiled message formatting
if (pluginConfig.experimental?.messages?.precompile) {
// Use require.resolve to get the actual file path, since
// bundlers don't properly resolve package subpath exports
// when used as alias targets
config.resolve.alias['use-intl/format-message'] = require$1.resolve('use-intl/format-message/format-only');
}
// Add loader for extractor
if (pluginConfig.experimental?.extract) {
if (!config.module) config.module = {};
if (!config.module.rules) config.module.rules = [];
const srcPath = pluginConfig.experimental.srcPath;
config.module.rules.push({
test: new RegExp(`\\.(${SourceFileFilter.EXTENSIONS.join('|')})$`),
include: Array.isArray(srcPath) ? srcPath.map(cur => path.resolve(config.context, cur)) : path.resolve(config.context, srcPath || ''),
use: [getExtractMessagesLoaderConfig()]
});
}
// Add loader for catalog
if (pluginConfig.experimental?.messages) {
if (!config.module) config.module = {};
if (!config.module.rules) config.module.rules = [];
const extension = getFormatExtension(pluginConfig.experimental.messages.format);
config.module.rules.push({
test: new RegExp(`${extension.replace(/\./g, '\\.')}$`),
include: path.resolve(config.context, pluginConfig.experimental.messages.path),
use: [getCatalogLoaderConfig()],
type: 'javascript/auto'
});
}
if (typeof nextConfig?.webpack === 'function') {
return nextConfig.webpack(config, context);
}
return config;
};
}
// Forward config
if (nextConfig?.trailingSlash) {
nextIntlConfig.env = {
...nextConfig.env,
_next_intl_trailing_slash: 'true'
};
}
return Object.assign({}, nextConfig, nextIntlConfig);
}
export { getNextConfig as default };

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"square-arrow-up-right.js","sources":["../../../src/icons/square-arrow-up-right.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SquareArrowUpRight\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik04IDhoOHY4IiAvPgogIDxwYXRoIGQ9Im04IDE2IDgtOCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/square-arrow-up-right\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 SquareArrowUpRight = createLucideIcon('SquareArrowUpRight', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'M8 8h8v8', key: 'b65dnt' }],\n ['path', { d: 'm8 16 8-8', key: '13b9ih' }],\n]);\n\nexport default SquareArrowUpRight;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAqB,iBAAiB,oBAAsB,CAAA,CAAA,CAAA;AAAA,CAAA,CAChE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
module.exports={C:{"48":0.00474,"52":0.00474,"60":0.00949,"78":0.00949,"101":0.00474,"102":0.00949,"115":0.12334,"122":0.00474,"123":0.01423,"125":0.00949,"128":0.00474,"132":0.00474,"136":0.00474,"138":0.00474,"139":0.00474,"140":0.10911,"141":0.00474,"142":0.02372,"143":0.01423,"144":0.02846,"145":0.80648,"146":1.39474,"147":0.01423,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 49 50 51 53 54 55 56 57 58 59 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 121 124 126 127 129 130 131 133 134 135 137 148 149 3.5 3.6"},D:{"39":0.01898,"40":0.01898,"41":0.01898,"42":0.01898,"43":0.01898,"44":0.01898,"45":0.01898,"46":0.01898,"47":0.01898,"48":0.01898,"49":0.02846,"50":0.01898,"51":0.01898,"52":0.01898,"53":0.01898,"54":0.01898,"55":0.01898,"56":0.01898,"57":0.01898,"58":0.01898,"59":0.01898,"60":0.01898,"74":0.00949,"78":0.00474,"79":0.01898,"80":0.00949,"81":0.00474,"85":0.00474,"87":0.01898,"90":0.00474,"96":0.00474,"99":0.00474,"100":0.00474,"101":0.00949,"102":0.01423,"103":0.03321,"104":0.01423,"105":0.00474,"107":0.00474,"108":0.00474,"109":0.30836,"110":0.00474,"111":0.00949,"112":0.00474,"114":0.00949,"115":0.00474,"116":0.09014,"117":0.14706,"118":0.00474,"119":0.00949,"120":0.01898,"121":0.03795,"122":0.09962,"123":0.01423,"124":0.01898,"125":0.16604,"126":0.02846,"127":0.00949,"128":0.0759,"129":0.00949,"130":0.12809,"131":0.04744,"132":0.03795,"133":0.04744,"134":0.03795,"135":0.02846,"136":0.0427,"137":0.06642,"138":0.22297,"139":0.12809,"140":0.15655,"141":0.29413,"142":7.13498,"143":10.81158,"144":0.00474,"145":0.00474,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 61 62 63 64 65 66 67 68 69 70 71 72 73 75 76 77 83 84 86 88 89 91 92 93 94 95 97 98 106 113 146"},F:{"46":0.00474,"87":0.00474,"93":0.02372,"95":0.00474,"107":0.00474,"122":0.00474,"123":0.01423,"124":0.73532,"125":0.34631,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 88 89 90 91 92 94 96 97 98 99 100 101 102 103 104 105 106 108 109 110 111 112 113 114 115 116 117 118 119 120 121 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"109":0.03321,"121":0.00474,"122":0.00949,"125":0.00474,"126":0.00474,"128":0.00474,"130":0.00474,"131":0.00474,"132":0.00474,"133":0.00474,"134":0.00474,"135":0.00949,"136":0.00949,"137":0.00474,"138":0.01423,"139":0.00949,"140":0.02372,"141":0.0427,"142":1.56078,"143":4.72977,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 119 120 123 124 127 129"},E:{"14":0.00949,_:"0 4 5 6 7 8 9 10 11 12 13 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 15.1","11.1":0.00474,"12.1":0.00949,"13.1":0.03321,"14.1":0.03795,"15.2-15.3":0.00474,"15.4":0.01423,"15.5":0.01898,"15.6":0.24194,"16.0":0.02372,"16.1":0.0427,"16.2":0.01898,"16.3":0.05693,"16.4":0.03321,"16.5":0.04744,"16.6":0.31785,"17.0":0.03321,"17.1":0.34157,"17.2":0.09488,"17.3":0.11386,"17.4":0.17078,"17.5":0.35106,"17.6":0.77327,"18.0":0.1186,"18.1":0.18976,"18.2":0.09962,"18.3":0.30362,"18.4":0.22297,"18.5-18.6":0.84443,"26.0":0.41273,"26.1":2.40046,"26.2":0.30362,"26.3":0.00474},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00512,"5.0-5.1":0,"6.0-6.1":0.01023,"7.0-7.1":0.00767,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.02046,"10.0-10.2":0.00256,"10.3":0.03581,"11.0-11.2":0.4399,"11.3-11.4":0.01279,"12.0-12.1":0.01023,"12.2-12.5":0.11509,"13.0-13.1":0.00256,"13.2":0.0179,"13.3":0.00512,"13.4-13.7":0.0179,"14.0-14.4":0.03581,"14.5-14.8":0.03836,"15.0-15.1":0.04092,"15.2-15.3":0.03069,"15.4":0.03325,"15.5":0.03581,"15.6-15.8":0.55499,"16.0":0.06394,"16.1":0.12276,"16.2":0.06394,"16.3":0.11509,"16.4":0.02813,"16.5":0.04859,"16.6-16.7":0.72123,"17.0":0.04092,"17.1":0.0665,"17.2":0.04859,"17.3":0.07417,"17.4":0.12532,"17.5":0.24553,"17.6-17.7":0.56778,"18.0":0.12788,"18.1":0.26599,"18.2":0.14067,"18.3":0.4578,"18.4":0.2353,"18.5-18.7":16.8953,"26.0":0.32993,"26.1":2.74427,"26.2":0.52174,"26.3":0.02302},P:{"4":0.01048,"21":0.01048,"22":0.01048,"23":0.03143,"24":0.01048,"25":0.01048,"26":0.08381,"27":0.07334,"28":0.08381,"29":2.76582,_:"20 5.0-5.4 6.2-6.4 8.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","7.2-7.4":0.01048,"9.2":0.01048},I:{"0":0.03673,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00001,"4.4":0,"4.4.3-4.4.4":0.00003},A:{"11":0.02372,_:"6 7 8 9 10 5.5"},K:{"0":0.12089,_:"10 11 12 11.1 11.5 12.1"},N:{_:"10 11"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},Q:{_:"14.9"},O:{"0":0.00526},H:{"0":0},L:{"0":25.78222},R:{_:"0"},M:{"0":0.3101}};

View File

@@ -0,0 +1 @@
{"version":3,"file":"table-cells-merge.js","sources":["../../../src/icons/table-cells-merge.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name TableCellsMerge\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMjF2LTYiIC8+CiAgPHBhdGggZD0iTTEyIDlWMyIgLz4KICA8cGF0aCBkPSJNMyAxNWgxOCIgLz4KICA8cGF0aCBkPSJNMyA5aDE4IiAvPgogIDxyZWN0IHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgeD0iMyIgeT0iMyIgcng9IjIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/table-cells-merge\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 TableCellsMerge = createLucideIcon('TableCellsMerge', [\n ['path', { d: 'M12 21v-6', key: 'lihzve' }],\n ['path', { d: 'M12 9V3', key: 'da5inc' }],\n ['path', { d: 'M3 15h18', key: '5xshup' }],\n ['path', { d: 'M3 9h18', key: '1pudct' }],\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n]);\n\nexport default TableCellsMerge;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkB,iBAAiB,iBAAmB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAChF,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,348 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const constants = require('../constants.js');
const eventProcessors = require('../eventProcessors.js');
const scope = require('../scope.js');
const debugIds = require('./debug-ids.js');
const misc = require('./misc.js');
const normalize = require('./normalize.js');
const scopeData = require('./scopeData.js');
const string = require('./string.js');
const syncpromise = require('./syncpromise.js');
const time = require('./time.js');
/**
* This type makes sure that we get either a CaptureContext, OR an EventHint.
* It does not allow mixing them, which could lead to unexpected outcomes, e.g. this is disallowed:
* { user: { id: '123' }, mechanism: { handled: false } }
*/
/**
* Adds common information to events.
*
* The information includes release and environment from `options`,
* breadcrumbs and context (extra, tags and user) from the scope.
*
* Information that is already present in the event is never overwritten. For
* nested objects, such as the context, keys are merged.
*
* @param event The original event.
* @param hint May contain additional information about the original exception.
* @param scope A scope containing event metadata.
* @returns A new event with more information.
* @hidden
*/
function prepareEvent(
options,
event,
hint,
scope,
client,
isolationScope,
) {
const { normalizeDepth = 3, normalizeMaxBreadth = 1000 } = options;
const prepared = {
...event,
event_id: event.event_id || hint.event_id || misc.uuid4(),
timestamp: event.timestamp || time.dateTimestampInSeconds(),
};
const integrations = hint.integrations || options.integrations.map(i => i.name);
applyClientOptions(prepared, options);
applyIntegrationsMetadata(prepared, integrations);
if (client) {
client.emit('applyFrameMetadata', event);
}
// Only put debug IDs onto frames for error events.
if (event.type === undefined) {
applyDebugIds(prepared, options.stackParser);
}
// If we have scope given to us, use it as the base for further modifications.
// This allows us to prevent unnecessary copying of data if `captureContext` is not provided.
const finalScope = getFinalScope(scope, hint.captureContext);
if (hint.mechanism) {
misc.addExceptionMechanism(prepared, hint.mechanism);
}
const clientEventProcessors = client ? client.getEventProcessors() : [];
// This should be the last thing called, since we want that
// {@link Scope.addEventProcessor} gets the finished prepared event.
// Merge scope data together
const data = scopeData.getCombinedScopeData(isolationScope, finalScope);
const attachments = [...(hint.attachments || []), ...data.attachments];
if (attachments.length) {
hint.attachments = attachments;
}
scopeData.applyScopeDataToEvent(prepared, data);
const eventProcessors$1 = [
...clientEventProcessors,
// Run scope event processors _after_ all other processors
...data.eventProcessors,
];
// Skip event processors for internal exceptions to prevent recursion
const isInternalException = hint.data && (hint.data ).__sentry__ === true;
const result = isInternalException
? syncpromise.resolvedSyncPromise(prepared)
: eventProcessors.notifyEventProcessors(eventProcessors$1, prepared, hint);
return result.then(evt => {
if (evt) {
// We apply the debug_meta field only after all event processors have ran, so that if any event processors modified
// file names (e.g.the RewriteFrames integration) the filename -> debug ID relationship isn't destroyed.
// This should not cause any PII issues, since we're only moving data that is already on the event and not adding
// any new data
applyDebugMeta(evt);
}
if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {
return normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);
}
return evt;
});
}
/**
* Enhances event using the client configuration.
* It takes care of all "static" values like environment, release and `dist`,
* as well as truncating overly long values.
*
* Only exported for tests.
*
* @param event event instance to be enhanced
*/
function applyClientOptions(event, options) {
const { environment, release, dist, maxValueLength } = options;
// empty strings do not make sense for environment, release, and dist
// so we handle them the same as if they were not provided
event.environment = event.environment || environment || constants.DEFAULT_ENVIRONMENT;
if (!event.release && release) {
event.release = release;
}
if (!event.dist && dist) {
event.dist = dist;
}
const request = event.request;
if (request?.url && maxValueLength) {
request.url = string.truncate(request.url, maxValueLength);
}
if (maxValueLength) {
event.exception?.values?.forEach(exception => {
if (exception.value) {
// Truncates error messages
exception.value = string.truncate(exception.value, maxValueLength);
}
});
}
}
/**
* Puts debug IDs into the stack frames of an error event.
*/
function applyDebugIds(event, stackParser) {
// Build a map of filename -> debug_id
const filenameDebugIdMap = debugIds.getFilenameToDebugIdMap(stackParser);
event.exception?.values?.forEach(exception => {
exception.stacktrace?.frames?.forEach(frame => {
if (frame.filename) {
frame.debug_id = filenameDebugIdMap[frame.filename];
}
});
});
}
/**
* Moves debug IDs from the stack frames of an error event into the debug_meta field.
*/
function applyDebugMeta(event) {
// Extract debug IDs and filenames from the stack frames on the event.
const filenameDebugIdMap = {};
event.exception?.values?.forEach(exception => {
exception.stacktrace?.frames?.forEach(frame => {
if (frame.debug_id) {
if (frame.abs_path) {
filenameDebugIdMap[frame.abs_path] = frame.debug_id;
} else if (frame.filename) {
filenameDebugIdMap[frame.filename] = frame.debug_id;
}
delete frame.debug_id;
}
});
});
if (Object.keys(filenameDebugIdMap).length === 0) {
return;
}
// Fill debug_meta information
event.debug_meta = event.debug_meta || {};
event.debug_meta.images = event.debug_meta.images || [];
const images = event.debug_meta.images;
Object.entries(filenameDebugIdMap).forEach(([filename, debug_id]) => {
images.push({
type: 'sourcemap',
code_file: filename,
debug_id,
});
});
}
/**
* This function adds all used integrations to the SDK info in the event.
* @param event The event that will be filled with all integrations.
*/
function applyIntegrationsMetadata(event, integrationNames) {
if (integrationNames.length > 0) {
event.sdk = event.sdk || {};
event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationNames];
}
}
/**
* Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.
* Normalized keys:
* - `breadcrumbs.data`
* - `user`
* - `contexts`
* - `extra`
* @param event Event
* @returns Normalized event
*/
function normalizeEvent(event, depth, maxBreadth) {
if (!event) {
return null;
}
const normalized = {
...event,
...(event.breadcrumbs && {
breadcrumbs: event.breadcrumbs.map(b => ({
...b,
...(b.data && {
data: normalize.normalize(b.data, depth, maxBreadth),
}),
})),
}),
...(event.user && {
user: normalize.normalize(event.user, depth, maxBreadth),
}),
...(event.contexts && {
contexts: normalize.normalize(event.contexts, depth, maxBreadth),
}),
...(event.extra && {
extra: normalize.normalize(event.extra, depth, maxBreadth),
}),
};
// event.contexts.trace stores information about a Transaction. Similarly,
// event.spans[] stores information about child Spans. Given that a
// Transaction is conceptually a Span, normalization should apply to both
// Transactions and Spans consistently.
// For now the decision is to skip normalization of Transactions and Spans,
// so this block overwrites the normalized event to add back the original
// Transaction information prior to normalization.
if (event.contexts?.trace && normalized.contexts) {
normalized.contexts.trace = event.contexts.trace;
// event.contexts.trace.data may contain circular/dangerous data so we need to normalize it
if (event.contexts.trace.data) {
normalized.contexts.trace.data = normalize.normalize(event.contexts.trace.data, depth, maxBreadth);
}
}
// event.spans[].data may contain circular/dangerous data so we need to normalize it
if (event.spans) {
normalized.spans = event.spans.map(span => {
return {
...span,
...(span.data && {
data: normalize.normalize(span.data, depth, maxBreadth),
}),
};
});
}
// event.contexts.flags (FeatureFlagContext) stores context for our feature
// flag integrations. It has a greater nesting depth than our other typed
// Contexts, so we re-normalize with a fixed depth of 3 here. We do not want
// to skip this in case of conflicting, user-provided context.
if (event.contexts?.flags && normalized.contexts) {
normalized.contexts.flags = normalize.normalize(event.contexts.flags, 3, maxBreadth);
}
return normalized;
}
function getFinalScope(scope$1, captureContext) {
if (!captureContext) {
return scope$1;
}
const finalScope = scope$1 ? scope$1.clone() : new scope.Scope();
finalScope.update(captureContext);
return finalScope;
}
/**
* Parse either an `EventHint` directly, or convert a `CaptureContext` to an `EventHint`.
* This is used to allow to update method signatures that used to accept a `CaptureContext` but should now accept an `EventHint`.
*/
function parseEventHintOrCaptureContext(
hint,
) {
if (!hint) {
return undefined;
}
// If you pass a Scope or `() => Scope` as CaptureContext, we just return this as captureContext
if (hintIsScopeOrFunction(hint)) {
return { captureContext: hint };
}
if (hintIsScopeContext(hint)) {
return {
captureContext: hint,
};
}
return hint;
}
function hintIsScopeOrFunction(hint) {
return hint instanceof scope.Scope || typeof hint === 'function';
}
const captureContextKeys = [
'user',
'level',
'extra',
'contexts',
'tags',
'fingerprint',
'propagationContext',
] ;
function hintIsScopeContext(hint) {
return Object.keys(hint).some(key => captureContextKeys.includes(key ));
}
exports.applyClientOptions = applyClientOptions;
exports.applyDebugIds = applyDebugIds;
exports.applyDebugMeta = applyDebugMeta;
exports.parseEventHintOrCaptureContext = parseEventHintOrCaptureContext;
exports.prepareEvent = prepareEvent;
//# sourceMappingURL=prepareEvent.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/singlestore-core/unique-constraint.ts"],"sourcesContent":["import { entityKind } from '~/entity.ts';\nimport { TableName } from '~/table.utils.ts';\nimport type { SingleStoreColumn } from './columns/index.ts';\nimport type { SingleStoreTable } from './table.ts';\n\nexport function unique(name?: string): UniqueOnConstraintBuilder {\n\treturn new UniqueOnConstraintBuilder(name);\n}\n\nexport function uniqueKeyName(table: SingleStoreTable, columns: string[]) {\n\treturn `${table[TableName]}_${columns.join('_')}_unique`;\n}\n\nexport class UniqueConstraintBuilder {\n\tstatic readonly [entityKind]: string = 'SingleStoreUniqueConstraintBuilder';\n\n\t/** @internal */\n\tcolumns: SingleStoreColumn[];\n\n\tconstructor(\n\t\tcolumns: SingleStoreColumn[],\n\t\tprivate name?: string,\n\t) {\n\t\tthis.columns = columns;\n\t}\n\n\t/** @internal */\n\tbuild(table: SingleStoreTable): UniqueConstraint {\n\t\treturn new UniqueConstraint(table, this.columns, this.name);\n\t}\n}\n\nexport class UniqueOnConstraintBuilder {\n\tstatic readonly [entityKind]: string = 'SingleStoreUniqueOnConstraintBuilder';\n\n\t/** @internal */\n\tname?: string;\n\n\tconstructor(\n\t\tname?: string,\n\t) {\n\t\tthis.name = name;\n\t}\n\n\ton(...columns: [SingleStoreColumn, ...SingleStoreColumn[]]) {\n\t\treturn new UniqueConstraintBuilder(columns, this.name);\n\t}\n}\n\nexport class UniqueConstraint {\n\tstatic readonly [entityKind]: string = 'SingleStoreUniqueConstraint';\n\n\treadonly columns: SingleStoreColumn[];\n\treadonly name?: string;\n\treadonly nullsNotDistinct: boolean = false;\n\n\tconstructor(readonly table: SingleStoreTable, columns: SingleStoreColumn[], name?: string) {\n\t\tthis.columns = columns;\n\t\tthis.name = name ?? uniqueKeyName(this.table, this.columns.map((column) => column.name));\n\t}\n\n\tgetName() {\n\t\treturn this.name;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA2B;AAC3B,yBAA0B;AAInB,SAAS,OAAO,MAA0C;AAChE,SAAO,IAAI,0BAA0B,IAAI;AAC1C;AAEO,SAAS,cAAc,OAAyB,SAAmB;AACzE,SAAO,GAAG,MAAM,4BAAS,CAAC,IAAI,QAAQ,KAAK,GAAG,CAAC;AAChD;AAEO,MAAM,wBAAwB;AAAA,EAMpC,YACC,SACQ,MACP;AADO;AAER,SAAK,UAAU;AAAA,EAChB;AAAA,EAVA,QAAiB,wBAAU,IAAY;AAAA;AAAA,EAGvC;AAAA;AAAA,EAUA,MAAM,OAA2C;AAChD,WAAO,IAAI,iBAAiB,OAAO,KAAK,SAAS,KAAK,IAAI;AAAA,EAC3D;AACD;AAEO,MAAM,0BAA0B;AAAA,EACtC,QAAiB,wBAAU,IAAY;AAAA;AAAA,EAGvC;AAAA,EAEA,YACC,MACC;AACD,SAAK,OAAO;AAAA,EACb;AAAA,EAEA,MAAM,SAAsD;AAC3D,WAAO,IAAI,wBAAwB,SAAS,KAAK,IAAI;AAAA,EACtD;AACD;AAEO,MAAM,iBAAiB;AAAA,EAO7B,YAAqB,OAAyB,SAA8B,MAAe;AAAtE;AACpB,SAAK,UAAU;AACf,SAAK,OAAO,QAAQ,cAAc,KAAK,OAAO,KAAK,QAAQ,IAAI,CAAC,WAAW,OAAO,IAAI,CAAC;AAAA,EACxF;AAAA,EATA,QAAiB,wBAAU,IAAY;AAAA,EAE9B;AAAA,EACA;AAAA,EACA,mBAA4B;AAAA,EAOrC,UAAU;AACT,WAAO,KAAK;AAAA,EACb;AACD;","names":[]}

View File

@@ -0,0 +1,41 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.js");
const dateFormats = {
full: "EEEE do MMMM y",
long: "do MMMM y",
medium: "d MMM y",
short: "yyyy/MM/dd",
};
const timeFormats = {
full: "h:mm:ss a zzzz",
long: "h:mm:ss a z",
medium: "h:mm:ss a",
short: "h:mm a",
};
const dateTimeFormats = {
full: "{{date}} 'در' {{time}}",
long: "{{date}} 'در' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}",
};
const formatLong = (exports.formatLong = {
date: (0, _index.buildFormatLongFn)({
formats: dateFormats,
defaultWidth: "full",
}),
time: (0, _index.buildFormatLongFn)({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: (0, _index.buildFormatLongFn)({
formats: dateTimeFormats,
defaultWidth: "full",
}),
});

View File

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

View File

@@ -0,0 +1 @@
module.exports={C:{"5":0.00447,"78":0.02234,"115":0.01787,"128":0.00447,"137":0.00447,"138":0.00447,"140":0.00447,"141":0.14294,"143":0.00447,"144":0.07594,"145":1.7868,"146":1.65279,_:"2 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 121 122 123 124 125 126 127 129 130 131 132 133 134 135 136 139 142 147 148 149 3.5 3.6"},D:{"69":0.00447,"75":0.00447,"79":0.02234,"86":0.00447,"87":0.0268,"93":0.00447,"94":0.00447,"96":0.00447,"98":0.13848,"99":0.04467,"103":0.11168,"106":0.03574,"108":0.00447,"109":0.16081,"111":0.00447,"116":0.01787,"118":0.00447,"120":0.00447,"122":0.01787,"123":0.00893,"124":0.00447,"125":0.09381,"126":0.05807,"127":0.0134,"128":0.04467,"129":0.00447,"130":0.00447,"131":0.07147,"132":0.00893,"133":0.0268,"134":0.08041,"135":0.03127,"136":0.04467,"137":0.06701,"138":0.21888,"139":0.11614,"140":0.13401,"141":0.55838,"142":7.37502,"143":8.60791,"144":0.0134,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 70 71 72 73 74 76 77 78 80 81 83 84 85 88 89 90 91 92 95 97 100 101 102 104 105 107 110 112 113 114 115 117 119 121 145 146"},F:{"93":0.0134,"124":1.21949,"125":0.15188,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"98":0.01787,"109":0.00447,"133":0.00447,"134":0.00447,"135":0.00447,"138":0.04914,"140":0.07594,"141":0.07147,"142":1.83594,"143":4.4938,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 99 100 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 136 137 139"},E:{"14":0.0134,_:"0 4 5 6 7 8 9 10 11 12 13 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 15.4 16.0 17.0 26.3","13.1":0.03127,"14.1":0.02234,"15.1":0.00447,"15.2-15.3":0.01787,"15.5":0.0134,"15.6":0.52264,"16.1":0.09381,"16.2":0.00447,"16.3":0.0402,"16.4":0.02234,"16.5":0.04467,"16.6":0.38416,"17.1":0.33503,"17.2":0.02234,"17.3":0.03127,"17.4":0.14741,"17.5":0.04914,"17.6":1.18376,"18.0":0.02234,"18.1":0.0536,"18.2":0.02234,"18.3":0.20995,"18.4":0.06254,"18.5-18.6":0.29482,"26.0":0.10274,"26.1":0.38416,"26.2":0.10721},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00413,"5.0-5.1":0,"6.0-6.1":0.00826,"7.0-7.1":0.0062,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.01652,"10.0-10.2":0.00207,"10.3":0.02892,"11.0-11.2":0.35526,"11.3-11.4":0.01033,"12.0-12.1":0.00826,"12.2-12.5":0.09295,"13.0-13.1":0.00207,"13.2":0.01446,"13.3":0.00413,"13.4-13.7":0.01446,"14.0-14.4":0.02892,"14.5-14.8":0.03098,"15.0-15.1":0.03305,"15.2-15.3":0.02479,"15.4":0.02685,"15.5":0.02892,"15.6-15.8":0.44821,"16.0":0.05164,"16.1":0.09914,"16.2":0.05164,"16.3":0.09295,"16.4":0.02272,"16.5":0.03924,"16.6-16.7":0.58246,"17.0":0.03305,"17.1":0.0537,"17.2":0.03924,"17.3":0.0599,"17.4":0.10121,"17.5":0.19829,"17.6-17.7":0.45853,"18.0":0.10327,"18.1":0.21481,"18.2":0.1136,"18.3":0.36972,"18.4":0.19002,"18.5-18.7":13.64449,"26.0":0.26645,"26.1":2.21625,"26.2":0.42136,"26.3":0.01859},P:{"4":0.17533,"22":0.02063,"23":0.02063,"25":0.01031,"26":0.04125,"27":0.03094,"28":0.37129,"29":3.9914,_:"20 21 24 5.0-5.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 13.0 14.0 15.0 16.0 17.0 18.0 19.0","6.2-6.4":0.03094,"12.0":0.01031},I:{"0":0.04972,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00001,"4.4":0,"4.4.3-4.4.4":0.00004},A:{_:"6 7 8 9 10 11 5.5"},K:{"0":0.0498,_:"10 11 12 11.1 11.5 12.1"},N:{_:"10 11"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},Q:{_:"14.9"},O:{_:"0"},H:{"0":0},L:{"0":31.89733},R:{_:"0"},M:{"0":0.34858}};

View File

@@ -0,0 +1,121 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useModal } from '@faceless-ui/modal';
import React from 'react';
import { useAuth } from '../../providers/Auth/index.js';
import { SelectAllStatus, useSelection } from '../../providers/Selection/index.js';
import { useTranslation } from '../../providers/Translation/index.js';
import { ListSelectionButton } from '../ListSelection/index.js';
import { UnpublishManyDrawerContent } from './DrawerContent.js';
export const UnpublishMany = props => {
const $ = _c(8);
const {
count,
selectAll,
selectedIDs,
toggleAll
} = useSelection();
let t0;
if ($[0] !== toggleAll) {
t0 = () => toggleAll();
$[0] = toggleAll;
$[1] = t0;
} else {
t0 = $[1];
}
const t1 = selectAll === SelectAllStatus.AllAvailable;
let t2;
if ($[2] !== count || $[3] !== props || $[4] !== selectedIDs || $[5] !== t0 || $[6] !== t1) {
t2 = _jsx(UnpublishMany_v4, {
...props,
count,
ids: selectedIDs,
onSuccess: t0,
selectAll: t1
});
$[2] = count;
$[3] = props;
$[4] = selectedIDs;
$[5] = t0;
$[6] = t1;
$[7] = t2;
} else {
t2 = $[7];
}
return t2;
};
export const UnpublishMany_v4 = props => {
const $ = _c(12);
const {
collection,
collection: t0,
count,
ids,
modalPrefix,
onSuccess,
selectAll,
where
} = props;
const {
slug,
versions
} = t0 === undefined ? {} : t0;
const {
t
} = useTranslation();
const {
permissions
} = useAuth();
const {
toggleModal
} = useModal();
const collectionPermissions = permissions?.collections?.[slug];
const hasPermission = collectionPermissions?.update;
const drawerSlug = `${modalPrefix ? `${modalPrefix}-` : ""}unpublish-${slug}`;
if (!versions?.drafts || count === 0 || !hasPermission) {
return null;
}
let t1;
if ($[0] !== collection || $[1] !== drawerSlug || $[2] !== ids || $[3] !== onSuccess || $[4] !== selectAll || $[5] !== t || $[6] !== toggleModal || $[7] !== where) {
let t2;
if ($[9] !== drawerSlug || $[10] !== toggleModal) {
t2 = () => {
toggleModal(drawerSlug);
};
$[9] = drawerSlug;
$[10] = toggleModal;
$[11] = t2;
} else {
t2 = $[11];
}
t1 = _jsxs(React.Fragment, {
children: [_jsx(ListSelectionButton, {
"aria-label": t("version:unpublish"),
onClick: t2,
children: t("version:unpublish")
}), _jsx(UnpublishManyDrawerContent, {
collection,
drawerSlug,
ids,
onSuccess,
selectAll,
where
})]
});
$[0] = collection;
$[1] = drawerSlug;
$[2] = ids;
$[3] = onSuccess;
$[4] = selectAll;
$[5] = t;
$[6] = toggleModal;
$[7] = where;
$[8] = t1;
} else {
t1 = $[8];
}
return t1;
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,57 @@
import { SDK_VERSION } from './utils/version.js';
import { GLOBAL_OBJ } from './utils/worldwide.js';
/**
* An object that contains globally accessible properties and maintains a scope stack.
* @hidden
*/
/**
* Returns the global shim registry.
*
* FIXME: This function is problematic, because despite always returning a valid Carrier,
* it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check
* at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.
**/
function getMainCarrier() {
// This ensures a Sentry carrier exists
getSentryCarrier(GLOBAL_OBJ);
return GLOBAL_OBJ;
}
/** Will either get the existing sentry carrier, or create a new one. */
function getSentryCarrier(carrier) {
const __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {});
// For now: First SDK that sets the .version property wins
__SENTRY__.version = __SENTRY__.version || SDK_VERSION;
// Intentionally populating and returning the version of "this" SDK instance
// rather than what's set in .version so that "this" SDK always gets its carrier
return (__SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {});
}
/**
* Returns a global singleton contained in the global `__SENTRY__[]` object.
*
* If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory
* function and added to the `__SENTRY__` object.
*
* @param name name of the global singleton on __SENTRY__
* @param creator creator Factory function to create the singleton if it doesn't already exist on `__SENTRY__`
* @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `GLOBAL_OBJ`'s return value
* @returns the singleton
*/
function getGlobalSingleton(
name,
creator,
obj = GLOBAL_OBJ,
) {
const __SENTRY__ = (obj.__SENTRY__ = obj.__SENTRY__ || {});
const carrier = (__SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {});
// Note: We do not want to set `carrier.version` here, as this may be called before any `init` is called, e.g. for the default scopes
return carrier[name] || (carrier[name] = creator());
}
export { getGlobalSingleton, getMainCarrier, getSentryCarrier };
//# sourceMappingURL=carrier.js.map

View File

@@ -0,0 +1,41 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.js");
const dateFormats = {
full: "y年M月d日EEEE",
long: "y年M月d日",
medium: "y/MM/dd",
short: "y/MM/dd",
};
const timeFormats = {
full: "H時mm分ss秒 zzzz",
long: "H:mm:ss z",
medium: "H:mm:ss",
short: "H:mm",
};
const dateTimeFormats = {
full: "{{date}} {{time}}",
long: "{{date}} {{time}}",
medium: "{{date}} {{time}}",
short: "{{date}} {{time}}",
};
const formatLong = (exports.formatLong = {
date: (0, _index.buildFormatLongFn)({
formats: dateFormats,
defaultWidth: "full",
}),
time: (0, _index.buildFormatLongFn)({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: (0, _index.buildFormatLongFn)({
formats: dateTimeFormats,
defaultWidth: "full",
}),
});

View File

@@ -0,0 +1,41 @@
import { validOperatorSet } from '../types/constants.js';
/**
* Validates that a "where" query is in a format in which the "where builder" can understand.
* Even though basic queries are valid, we need to hoist them into the "and" / "or" format.
* Use this function alongside `transformWhereQuery` to perform a transformation if the query is not valid.
* @example
* Inaccurate: [text][equals]=example%20post
* Accurate: [or][0][and][0][text][equals]=example%20post
*/ export const validateWhereQuery = (whereQuery)=>{
if (whereQuery?.or && (whereQuery?.or?.length === 0 || whereQuery?.or?.length > 0 && whereQuery?.or?.[0]?.and && whereQuery?.or?.[0]?.and?.length > 0)) {
// At this point we know that the whereQuery has 'or' and 'and' fields,
// now let's check the structure and content of these fields.
const isValid = whereQuery.or.every((orQuery)=>{
if (orQuery.and && Array.isArray(orQuery.and)) {
return orQuery.and.every((andQuery)=>{
if (typeof andQuery !== 'object') {
return false;
}
const andKeys = Object.keys(andQuery);
// If there are no keys, it's not a valid WhereField.
if (andKeys.length === 0) {
return false;
}
for (const key of andKeys){
const operator = Object.keys(andQuery[key])[0];
// Check if the key is a valid Operator.
if (!operator || !validOperatorSet.has(operator)) {
return false;
}
}
return true;
});
}
return false;
});
return isValid;
}
return false;
};
//# sourceMappingURL=validateWhereQuery.js.map

View File

@@ -0,0 +1,29 @@
import { formatDistance } from "./en-US/_lib/formatDistance.js";
import { formatRelative } from "./en-US/_lib/formatRelative.js";
import { localize } from "./en-US/_lib/localize.js";
import { match } from "./en-US/_lib/match.js";
import { formatLong } from "./en-GB/_lib/formatLong.js";
/**
* @category Locales
* @summary English locale (United Kingdom).
* @language English
* @iso-639-2 eng
* @author Alex [@glintik](https://github.com/glintik)
*/
export const enGB = {
code: "en-GB",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 4,
},
};
// Fallback for modularized imports:
export default enGB;

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/gel-core/alias.ts"],"sourcesContent":["import { TableAliasProxyHandler } from '~/alias.ts';\nimport type { BuildAliasTable } from './query-builders/select.types.ts';\n\nimport type { GelTable } from './table.ts';\nimport type { GelViewBase } from './view-base.ts';\n\nexport function alias<TTable extends GelTable | GelViewBase, TAlias extends string>(\n\ttable: TTable,\n\talias: TAlias,\n): BuildAliasTable<TTable, TAlias> {\n\treturn new Proxy(table, new TableAliasProxyHandler(alias, false)) as any;\n}\n"],"mappings":"AAAA,SAAS,8BAA8B;AAMhC,SAAS,MACf,OACAA,QACkC;AAClC,SAAO,IAAI,MAAM,OAAO,IAAI,uBAAuBA,QAAO,KAAK,CAAC;AACjE;","names":["alias"]}

View File

@@ -0,0 +1,60 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.BatchSpanProcessor = void 0;
const BatchSpanProcessorBase_1 = require("../../../export/BatchSpanProcessorBase");
const core_1 = require("@opentelemetry/core");
class BatchSpanProcessor extends BatchSpanProcessorBase_1.BatchSpanProcessorBase {
_visibilityChangeListener;
_pageHideListener;
constructor(_exporter, config) {
super(_exporter, config);
this.onInit(config);
}
onInit(config) {
if (config?.disableAutoFlushOnDocumentHide !== true &&
typeof document !== 'undefined') {
this._visibilityChangeListener = () => {
if (document.visibilityState === 'hidden') {
this.forceFlush().catch(error => {
(0, core_1.globalErrorHandler)(error);
});
}
};
this._pageHideListener = () => {
this.forceFlush().catch(error => {
(0, core_1.globalErrorHandler)(error);
});
};
document.addEventListener('visibilitychange', this._visibilityChangeListener);
// use 'pagehide' event as a fallback for Safari; see https://bugs.webkit.org/show_bug.cgi?id=116769
document.addEventListener('pagehide', this._pageHideListener);
}
}
onShutdown() {
if (typeof document !== 'undefined') {
if (this._visibilityChangeListener) {
document.removeEventListener('visibilitychange', this._visibilityChangeListener);
}
if (this._pageHideListener) {
document.removeEventListener('pagehide', this._pageHideListener);
}
}
}
}
exports.BatchSpanProcessor = BatchSpanProcessor;
//# sourceMappingURL=BatchSpanProcessor.js.map

View File

@@ -0,0 +1,105 @@
"use strict";
exports.formatDistance = void 0;
const formatDistanceLocale = {
lessThanXSeconds: {
one: "کەمتر لە یەک چرکە",
other: "کەمتر لە {{count}} چرکە",
},
xSeconds: {
one: "1 چرکە",
other: "{{count}} چرکە",
},
halfAMinute: "نیو کاتژمێر",
lessThanXMinutes: {
one: "کەمتر لە یەک خولەک",
other: "کەمتر لە {{count}} خولەک",
},
xMinutes: {
one: "1 خولەک",
other: "{{count}} خولەک",
},
aboutXHours: {
one: "دەوروبەری 1 کاتژمێر",
other: "دەوروبەری {{count}} کاتژمێر",
},
xHours: {
one: "1 کاتژمێر",
other: "{{count}} کاتژمێر",
},
xDays: {
one: "1 ڕۆژ",
other: "{{count}} ژۆژ",
},
aboutXWeeks: {
one: "دەوروبەری 1 هەفتە",
other: "دوروبەری {{count}} هەفتە",
},
xWeeks: {
one: "1 هەفتە",
other: "{{count}} هەفتە",
},
aboutXMonths: {
one: "داوروبەری 1 مانگ",
other: "دەوروبەری {{count}} مانگ",
},
xMonths: {
one: "1 مانگ",
other: "{{count}} مانگ",
},
aboutXYears: {
one: "دەوروبەری 1 ساڵ",
other: "دەوروبەری {{count}} ساڵ",
},
xYears: {
one: "1 ساڵ",
other: "{{count}} ساڵ",
},
overXYears: {
one: "زیاتر لە ساڵێک",
other: "زیاتر لە {{count}} ساڵ",
},
almostXYears: {
one: "بەنزیکەیی ساڵێک ",
other: "بەنزیکەیی {{count}} ساڵ",
},
};
const formatDistance = (token, count, options) => {
let result;
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", count.toString());
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "لە ماوەی " + result + "دا";
} else {
return result + "پێش ئێستا";
}
}
return result;
};
exports.formatDistance = formatDistance;

View File

@@ -0,0 +1,115 @@
import Document from './document.js'
import LazyResult from './lazy-result.js'
import NoWorkResult from './no-work-result.js'
import {
AcceptedPlugin,
Plugin,
ProcessOptions,
TransformCallback,
Transformer
} from './postcss.js'
import Result from './result.js'
import Root from './root.js'
declare namespace Processor {
// eslint-disable-next-line @typescript-eslint/no-use-before-define
export { Processor_ as default }
}
/**
* Contains plugins to process CSS. Create one `Processor` instance,
* initialize its plugins, and then use that instance on numerous CSS files.
*
* ```js
* const processor = postcss([autoprefixer, postcssNested])
* processor.process(css1).then(result => console.log(result.css))
* processor.process(css2).then(result => console.log(result.css))
* ```
*/
declare class Processor_ {
/**
* Plugins added to this processor.
*
* ```js
* const processor = postcss([autoprefixer, postcssNested])
* processor.plugins.length //=> 2
* ```
*/
plugins: (Plugin | TransformCallback | Transformer)[]
/**
* Current PostCSS version.
*
* ```js
* if (result.processor.version.split('.')[0] !== '6') {
* throw new Error('This plugin works only with PostCSS 6')
* }
* ```
*/
version: string
/**
* @param plugins PostCSS plugins
*/
constructor(plugins?: AcceptedPlugin[])
/**
* Parses source CSS and returns a `LazyResult` Promise proxy.
* Because some plugins can be asynchronous it doesnt make
* any transformations. Transformations will be applied
* in the `LazyResult` methods.
*
* ```js
* processor.process(css, { from: 'a.css', to: 'a.out.css' })
* .then(result => {
* console.log(result.css)
* })
* ```
*
* @param css String with input CSS or any object with a `toString()` method,
* like a Buffer. Optionally, send a `Result` instance
* and the processor will take the `Root` from it.
* @param opts Options.
* @return Promise proxy.
*/
process(
css: { toString(): string } | LazyResult | Result | Root | string
): LazyResult | NoWorkResult
process<RootNode extends Document | Root = Root>(
css: { toString(): string } | LazyResult | Result | Root | string,
options: ProcessOptions<RootNode>
): LazyResult<RootNode>
/**
* Adds a plugin to be used as a CSS processor.
*
* PostCSS plugin can be in 4 formats:
* * A plugin in `Plugin` format.
* * A plugin creator function with `pluginCreator.postcss = true`.
* PostCSS will call this function without argument to get plugin.
* * A function. PostCSS will pass the function a {@link Root}
* as the first argument and current `Result` instance
* as the second.
* * Another `Processor` instance. PostCSS will copy plugins
* from that instance into this one.
*
* Plugins can also be added by passing them as arguments when creating
* a `postcss` instance (see [`postcss(plugins)`]).
*
* Asynchronous plugins should return a `Promise` instance.
*
* ```js
* const processor = postcss()
* .use(autoprefixer)
* .use(postcssNested)
* ```
*
* @param plugin PostCSS plugin or `Processor` with plugins.
* @return Current processor to make methods chain.
*/
use(plugin: AcceptedPlugin): this
}
declare class Processor extends Processor_ {}
export = Processor

View File

@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _superPropSet;
var _set = require("./set.js");
var _getPrototypeOf = require("./getPrototypeOf.js");
function _superPropSet(classArg, property, value, receiver, isStrict, prototype) {
return (0, _set.default)((0, _getPrototypeOf.default)(prototype ? classArg.prototype : classArg), property, value, receiver, isStrict);
}
//# sourceMappingURL=superPropSet.js.map

View File

@@ -0,0 +1,529 @@
function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}(function (_window$dateFns) {var __defProp = Object.defineProperty;
var __export = function __export(target, all) {
for (var name in all)
__defProp(target, name, {
get: all[name],
enumerable: true,
configurable: true,
set: function set(newValue) {return all[name] = function () {return newValue;};}
});
};
// lib/locale/en-US/_lib/formatRelative.mjs
var formatRelativeLocale = {
lastWeek: "'last' eeee 'at' p",
yesterday: "'yesterday at' p",
today: "'today at' p",
tomorrow: "'tomorrow at' p",
nextWeek: "eeee 'at' p",
other: "P"
};
var formatRelative = function formatRelative(token, _date, _baseDate, _options) {return formatRelativeLocale[token];};
// lib/locale/_lib/buildLocalizeFn.mjs
function buildLocalizeFn(args) {
return function (value, options) {
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
var valuesArray;
if (context === "formatting" && args.formattingValues) {
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
} else {
var _defaultWidth = args.defaultWidth;
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
valuesArray = args.values[_width] || args.values[_defaultWidth];
}
var index = args.argumentCallback ? args.argumentCallback(value) : value;
return valuesArray[index];
};
}
// lib/locale/en-US/_lib/localize.mjs
var eraValues = {
narrow: ["B", "A"],
abbreviated: ["BC", "AD"],
wide: ["Before Christ", "Anno Domini"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
};
var monthValues = {
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
abbreviated: [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"],
wide: [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"]
};
var dayValues = {
narrow: ["S", "M", "T", "W", "T", "F", "S"],
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
wide: [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"]
};
var dayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "mi",
noon: "n",
morning: "morning",
afternoon: "afternoon",
evening: "evening",
night: "night"
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "midnight",
noon: "noon",
morning: "morning",
afternoon: "afternoon",
evening: "evening",
night: "night"
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "midnight",
noon: "noon",
morning: "morning",
afternoon: "afternoon",
evening: "evening",
night: "night"
}
};
var formattingDayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "mi",
noon: "n",
morning: "in the morning",
afternoon: "in the afternoon",
evening: "in the evening",
night: "at night"
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "midnight",
noon: "noon",
morning: "in the morning",
afternoon: "in the afternoon",
evening: "in the evening",
night: "at night"
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "midnight",
noon: "noon",
morning: "in the morning",
afternoon: "in the afternoon",
evening: "in the evening",
night: "at night"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
var number = Number(dirtyNumber);
var rem100 = number % 100;
if (rem100 > 20 || rem100 < 10) {
switch (rem100 % 10) {
case 1:
return number + "st";
case 2:
return number + "nd";
case 3:
return number + "rd";
}
}
return number + "th";
};
var localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide"
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: function argumentCallback(quarter) {return quarter - 1;}
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide"
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide"
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide"
})
};
// lib/locale/_lib/buildMatchFn.mjs
function buildMatchFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var width = options.width;
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
var matchResult = string.match(matchPattern);
if (!matchResult) {
return null;
}
var matchedString = matchResult[0];
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
var value;
value = args.valueCallback ? args.valueCallback(key) : key;
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
var findKey = function findKey(object, predicate) {
for (var key in object) {
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
return key;
}
}
return;
};
var findIndex = function findIndex(array, predicate) {
for (var key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return;
};
// lib/locale/_lib/buildMatchPatternFn.mjs
function buildMatchPatternFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var matchResult = string.match(args.matchPattern);
if (!matchResult)
return null;
var matchedString = matchResult[0];
var parseResult = string.match(args.parsePattern);
if (!parseResult)
return null;
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
// lib/locale/en-US/_lib/match.mjs
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^(b|a)/i,
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
wide: /^(before christ|before common era|anno domini|common era)/i
};
var parseEraPatterns = {
any: [/^b/i, /^(a|c)/i]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^q[1234]/i,
wide: /^[1234](th|st|nd|rd)? quarter/i
};
var parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i]
};
var matchMonthPatterns = {
narrow: /^[jfmasond]/i,
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
};
var parseMonthPatterns = {
narrow: [
/^j/i,
/^f/i,
/^m/i,
/^a/i,
/^m/i,
/^j/i,
/^j/i,
/^a/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i],
any: [
/^ja/i,
/^f/i,
/^mar/i,
/^ap/i,
/^may/i,
/^jun/i,
/^jul/i,
/^au/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i]
};
var matchDayPatterns = {
narrow: /^[smtwf]/i,
short: /^(su|mo|tu|we|th|fr|sa)/i,
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
};
var parseDayPatterns = {
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
};
var matchDayPeriodPatterns = {
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
};
var parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^mi/i,
noon: /^no/i,
morning: /morning/i,
afternoon: /afternoon/i,
evening: /evening/i,
night: /night/i
}
};
var match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function valueCallback(value) {return parseInt(value, 10);}
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any"
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: function valueCallback(index) {return index + 1;}
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any"
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any"
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any"
})
};
// lib/locale/en-CA/_lib/formatDistance.mjs
var formatDistanceLocale = {
lessThanXSeconds: {
one: "less than a second",
other: "less than {{count}} seconds"
},
xSeconds: {
one: "a second",
other: "{{count}} seconds"
},
halfAMinute: "half a minute",
lessThanXMinutes: {
one: "less than a minute",
other: "less than {{count}} minutes"
},
xMinutes: {
one: "a minute",
other: "{{count}} minutes"
},
aboutXHours: {
one: "about an hour",
other: "about {{count}} hours"
},
xHours: {
one: "an hour",
other: "{{count}} hours"
},
xDays: {
one: "a day",
other: "{{count}} days"
},
aboutXWeeks: {
one: "about a week",
other: "about {{count}} weeks"
},
xWeeks: {
one: "a week",
other: "{{count}} weeks"
},
aboutXMonths: {
one: "about a month",
other: "about {{count}} months"
},
xMonths: {
one: "a month",
other: "{{count}} months"
},
aboutXYears: {
one: "about a year",
other: "about {{count}} years"
},
xYears: {
one: "a year",
other: "{{count}} years"
},
overXYears: {
one: "over a year",
other: "over {{count}} years"
},
almostXYears: {
one: "almost a year",
other: "almost {{count}} years"
}
};
var formatDistance = function formatDistance(token, count, options) {
var result;
var tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", count.toString());
}
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "in " + result;
} else {
return result + " ago";
}
}
return result;
};
// lib/locale/_lib/buildFormatLongFn.mjs
function buildFormatLongFn(args) {
return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var width = options.width ? String(options.width) : args.defaultWidth;
var format = args.formats[width] || args.formats[args.defaultWidth];
return format;
};
}
// lib/locale/en-CA/_lib/formatLong.mjs
var dateFormats = {
full: "EEEE, MMMM do, yyyy",
long: "MMMM do, yyyy",
medium: "MMM d, yyyy",
short: "yyyy-MM-dd"
};
var timeFormats = {
full: "h:mm:ss a zzzz",
long: "h:mm:ss a z",
medium: "h:mm:ss a",
short: "h:mm a"
};
var dateTimeFormats = {
full: "{{date}} 'at' {{time}}",
long: "{{date}} 'at' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}"
};
var formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full"
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full"
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full"
})
};
// lib/locale/en-CA.mjs
var enCA = {
code: "en-CA",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 0,
firstWeekContainsDate: 1
}
};
// lib/locale/en-CA/cdn.js
window.dateFns = _objectSpread(_objectSpread({},
window.dateFns), {}, {
locale: _objectSpread(_objectSpread({}, (_window$dateFns =
window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
enCA: enCA }) });
//# debugId=F136CBB8CFA5002364756e2164756e21
})();
//# sourceMappingURL=cdn.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"move-3d.js","sources":["../../../src/icons/move-3d.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Move3d\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNSAzdjE2aDE2IiAvPgogIDxwYXRoIGQ9Im01IDE5IDYtNiIgLz4KICA8cGF0aCBkPSJtMiA2IDMtMyAzIDMiIC8+CiAgPHBhdGggZD0ibTE4IDE2IDMgMy0zIDMiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/move-3d\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 Move3d = createLucideIcon('Move3d', [\n ['path', { d: 'M5 3v16h16', key: '1mqmf9' }],\n ['path', { d: 'm5 19 6-6', key: 'jh6hbb' }],\n ['path', { d: 'm2 6 3-3 3 3', key: 'tkyvxa' }],\n ['path', { d: 'm18 16 3 3-3 3', key: '1d4glt' }],\n]);\n\nexport default Move3d;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC7C,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/alias.ts"],"sourcesContent":["import { TableAliasProxyHandler } from '~/alias.ts';\nimport type { BuildAliasTable } from './query-builders/select.types.ts';\n\nimport type { GelTable } from './table.ts';\nimport type { GelViewBase } from './view-base.ts';\n\nexport function alias<TTable extends GelTable | GelViewBase, TAlias extends string>(\n\ttable: TTable,\n\talias: TAlias,\n): BuildAliasTable<TTable, TAlias> {\n\treturn new Proxy(table, new TableAliasProxyHandler(alias, false)) as any;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAuC;AAMhC,SAAS,MACf,OACAA,QACkC;AAClC,SAAO,IAAI,MAAM,OAAO,IAAI,oCAAuBA,QAAO,KAAK,CAAC;AACjE;","names":["alias"]}

View File

@@ -0,0 +1,3 @@
import '__SENTRY_CONFIG_IMPORT_PATH__';
export * from '__SENTRY_WRAPPING_TARGET_FILE__';
export { default } from '__SENTRY_WRAPPING_TARGET_FILE__';

View File

@@ -0,0 +1,29 @@
/**
* @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 Atom = createLucideIcon("Atom", [
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
[
"path",
{
d: "M20.2 20.2c2.04-2.03.02-7.36-4.5-11.9-4.54-4.52-9.87-6.54-11.9-4.5-2.04 2.03-.02 7.36 4.5 11.9 4.54 4.52 9.87 6.54 11.9 4.5Z",
key: "1l2ple"
}
],
[
"path",
{
d: "M15.7 15.7c4.52-4.54 6.54-9.87 4.5-11.9-2.03-2.04-7.36-.02-11.9 4.5-4.52 4.54-6.54 9.87-4.5 11.9 2.03 2.04 7.36.02 11.9-4.5Z",
key: "1wam0m"
}
]
]);
export { Atom as default };
//# sourceMappingURL=atom.js.map

View File

@@ -0,0 +1,16 @@
import type { ErrorObject, Vocabulary } from "../../types";
import { LimitNumberError } from "./limitNumber";
import { MultipleOfError } from "./multipleOf";
import { PatternError } from "./pattern";
import { RequiredError } from "./required";
import { UniqueItemsError } from "./uniqueItems";
import { ConstError } from "./const";
import { EnumError } from "./enum";
declare const validation: Vocabulary;
export default validation;
type LimitError = ErrorObject<"maxItems" | "minItems" | "minProperties" | "maxProperties" | "minLength" | "maxLength", {
limit: number;
}, number | {
$data: string;
}>;
export type ValidationKeywordError = LimitError | LimitNumberError | MultipleOfError | PatternError | RequiredError | UniqueItemsError | ConstError | EnumError;

View File

@@ -0,0 +1,130 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.mjs";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.mjs";
const matchOrdinalNumberPattern = /^(第\s*)?\d+(日|時|分|秒)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(前)/i,
abbreviated: /^(前)/i,
wide: /^(公元前|公元)/i,
};
const parseEraPatterns = {
any: [/^(前)/i, /^(公元)/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^第[一二三四]季/i,
wide: /^第[一二三四]季度/i,
};
const parseQuarterPatterns = {
any: [/(1|一)/i, /(2|二)/i, /(3|三)/i, /(4|四)/i],
};
const matchMonthPatterns = {
narrow: /^(一|二|三|四|五|六|七|八|九|十[二一])/i,
abbreviated: /^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,
wide: /^(一|二|三|四|五|六|七|八|九|十[二一])月/i,
};
const parseMonthPatterns = {
narrow: [
/^一/i,
/^二/i,
/^三/i,
/^四/i,
/^五/i,
/^六/i,
/^七/i,
/^八/i,
/^九/i,
/^十(?!(一|二))/i,
/^十一/i,
/^十二/i,
],
any: [
/^一|1/i,
/^二|2/i,
/^三|3/i,
/^四|4/i,
/^五|5/i,
/^六|6/i,
/^七|7/i,
/^八|8/i,
/^九|9/i,
/^十(?!(一|二))|10/i,
/^十一|11/i,
/^十二|12/i,
],
};
const matchDayPatterns = {
narrow: /^[一二三四五六日]/i,
short: /^[一二三四五六日]/i,
abbreviated: /^週[一二三四五六日]/i,
wide: /^星期[一二三四五六日]/i,
};
const parseDayPatterns = {
any: [/日/i, /一/i, /二/i, /三/i, /四/i, /五/i, /六/i],
};
const matchDayPeriodPatterns = {
any: /^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨)/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^上午?/i,
pm: /^下午?/i,
midnight: /^午夜/i,
noon: /^[中正]午/i,
morning: /^早上/i,
afternoon: /^下午/i,
evening: /^晚上?/i,
night: /^凌晨/i,
},
};
export const match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/elements/ItemsDrawer/ItemSearch/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAgB,MAAM,OAAO,CAAA;AAGpC,OAAO,cAAc,CAAA;AAIrB,MAAM,MAAM,KAAK,GAAG;IAClB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CAC/C,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAwBtC,CAAA"}

View File

@@ -0,0 +1,38 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.cjs");
const dateFormats = {
full: "EEEE, do MMMM y 'ж.'",
long: "do MMMM y 'ж.'",
medium: "d MMM y 'ж.'",
short: "dd.MM.yyyy",
};
const timeFormats = {
full: "H:mm:ss zzzz",
long: "H:mm:ss z",
medium: "H:mm:ss",
short: "H:mm",
};
const dateTimeFormats = {
any: "{{date}}, {{time}}",
};
const formatLong = (exports.formatLong = {
date: (0, _index.buildFormatLongFn)({
formats: dateFormats,
defaultWidth: "full",
}),
time: (0, _index.buildFormatLongFn)({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: (0, _index.buildFormatLongFn)({
formats: dateTimeFormats,
defaultWidth: "any",
}),
});

View File

@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const CloudUpload = createLucideIcon("CloudUpload", [
["path", { d: "M12 13v8", key: "1l5pq0" }],
["path", { d: "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242", key: "1pljnt" }],
["path", { d: "m8 17 4-4 4 4", key: "1quai1" }]
]);
export { CloudUpload as default };
//# sourceMappingURL=cloud-upload.js.map

View File

@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Speaker = createLucideIcon("Speaker", [
["rect", { width: "16", height: "20", x: "4", y: "2", rx: "2", key: "1nb95v" }],
["path", { d: "M12 6h.01", key: "1vi96p" }],
["circle", { cx: "12", cy: "14", r: "4", key: "1jruaj" }],
["path", { d: "M12 14h.01", key: "1etili" }]
]);
export { Speaker as default };
//# sourceMappingURL=speaker.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"file-search.js","sources":["../../../src/icons/file-search.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FileSearch\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTQgMnY0YTIgMiAwIDAgMCAyIDJoNCIgLz4KICA8cGF0aCBkPSJNNC4yNjggMjFhMiAyIDAgMCAwIDEuNzI3IDFIMThhMiAyIDAgMCAwIDItMlY3bC01LTVINmEyIDIgMCAwIDAtMiAydjMiIC8+CiAgPHBhdGggZD0ibTkgMTgtMS41LTEuNSIgLz4KICA8Y2lyY2xlIGN4PSI1IiBjeT0iMTQiIHI9IjMiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/file-search\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 FileSearch = createLucideIcon('FileSearch', [\n ['path', { d: 'M14 2v4a2 2 0 0 0 2 2h4', key: 'tnqrlb' }],\n [\n 'path',\n { d: 'M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3', key: 'ms7g94' },\n ],\n ['path', { d: 'm9 18-1.5-1.5', key: '1j6qii' }],\n ['circle', { cx: '5', cy: '14', r: '3', key: 'ufru5t' }],\n]);\n\nexport default FileSearch;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACxD,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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAyE,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAS,CAAA,CAAA;AAAA,CAC9F,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,CAC9C,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AACzD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ArrowDownFromLine = createLucideIcon("ArrowDownFromLine", [
["path", { d: "M19 3H5", key: "1236rx" }],
["path", { d: "M12 21V7", key: "gj6g52" }],
["path", { d: "m6 15 6 6 6-6", key: "h15q88" }]
]);
export { ArrowDownFromLine as default };
//# sourceMappingURL=arrow-down-from-line.js.map

View File

@@ -0,0 +1,21 @@
/**
* @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 Badge = createLucideIcon("Badge", [
[
"path",
{
d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",
key: "3c2336"
}
]
]);
export { Badge as default };
//# sourceMappingURL=badge.js.map

View File

@@ -0,0 +1,86 @@
var once = require('once')
var eos = require('end-of-stream')
var fs
try {
fs = require('fs') // we only need fs to get the ReadStream and WriteStream prototypes
} catch (e) {}
var noop = function () {}
var ancient = typeof process === 'undefined' ? false : /^v?\.0/.test(process.version)
var isFn = function (fn) {
return typeof fn === 'function'
}
var isFS = function (stream) {
if (!ancient) return false // newer node version do not need to care about fs is a special way
if (!fs) return false // browser
return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close)
}
var isRequest = function (stream) {
return stream.setHeader && isFn(stream.abort)
}
var destroyer = function (stream, reading, writing, callback) {
callback = once(callback)
var closed = false
stream.on('close', function () {
closed = true
})
eos(stream, {readable: reading, writable: writing}, function (err) {
if (err) return callback(err)
closed = true
callback()
})
var destroyed = false
return function (err) {
if (closed) return
if (destroyed) return
destroyed = true
if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks
if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want
if (isFn(stream.destroy)) return stream.destroy()
callback(err || new Error('stream was destroyed'))
}
}
var call = function (fn) {
fn()
}
var pipe = function (from, to) {
return from.pipe(to)
}
var pump = function () {
var streams = Array.prototype.slice.call(arguments)
var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop
if (Array.isArray(streams[0])) streams = streams[0]
if (streams.length < 2) throw new Error('pump requires two streams per minimum')
var error
var destroys = streams.map(function (stream, i) {
var reading = i < streams.length - 1
var writing = i > 0
return destroyer(stream, reading, writing, function (err) {
if (!error) error = err
if (err) destroys.forEach(call)
if (reading) return
destroys.forEach(call)
callback(error)
})
})
return streams.reduce(pipe)
}
module.exports = pump

View File

@@ -0,0 +1,41 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.cjs");
const dateFormats = {
full: "EEEE MMMM d. 'b.' y",
long: "MMMM d. 'b.' y",
medium: "MMM d. 'b.' y",
short: "dd.MM.y",
};
const timeFormats = {
full: "'dii.' HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm",
};
const dateTimeFormats = {
full: "{{date}} 'dii.' {{time}}",
long: "{{date}} 'dii.' {{time}}",
medium: "{{date}} {{time}}",
short: "{{date}} {{time}}",
};
const formatLong = (exports.formatLong = {
date: (0, _index.buildFormatLongFn)({
formats: dateFormats,
defaultWidth: "full",
}),
time: (0, _index.buildFormatLongFn)({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: (0, _index.buildFormatLongFn)({
formats: dateTimeFormats,
defaultWidth: "full",
}),
});

View File

@@ -0,0 +1,315 @@
import $Ref from "./ref.js";
import Pointer from "./pointer.js";
import { ono } from "@jsdevtools/ono";
import * as url from "./util/url.js";
import type $Refs from "./refs.js";
import type { DereferenceOptions, ParserOptions } from "./options.js";
import type { JSONSchema } from "./types";
import type $RefParser from "./index";
import { TimeoutError } from "./util/errors";
export default dereference;
/**
* Crawls the JSON schema, finds all JSON references, and dereferences them.
* This method mutates the JSON schema object, replacing JSON references with their resolved value.
*
* @param parser
* @param options
*/
function dereference<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(
parser: $RefParser<S, O>,
options: O,
) {
const start = Date.now();
// console.log('Dereferencing $ref pointers in %s', parser.$refs._root$Ref.path);
const dereferenced = crawl<S, O>(
parser.schema,
parser.$refs._root$Ref.path!,
"#",
new Set(),
new Set(),
new Map(),
parser.$refs,
options,
start,
);
parser.$refs.circular = dereferenced.circular;
parser.schema = dereferenced.value;
}
/**
* Recursively crawls the given value, and dereferences any JSON references.
*
* @param obj - The value to crawl. If it's not an object or array, it will be ignored.
* @param path - The full path of `obj`, possibly with a JSON Pointer in the hash
* @param pathFromRoot - The path of `obj` from the schema root
* @param parents - An array of the parent objects that have already been dereferenced
* @param processedObjects - An array of all the objects that have already been processed
* @param dereferencedCache - An map of all the dereferenced objects
* @param $refs
* @param options
* @param startTime - The time when the dereferencing started
* @returns
*/
function crawl<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(
obj: any,
path: string,
pathFromRoot: string,
parents: Set<any>,
processedObjects: Set<any>,
dereferencedCache: any,
$refs: $Refs<S, O>,
options: O,
startTime: number,
) {
let dereferenced;
const result = {
value: obj,
circular: false,
};
if (options && options.timeoutMs) {
if (Date.now() - startTime > options.timeoutMs) {
throw new TimeoutError(options.timeoutMs);
}
}
const derefOptions = (options.dereference || {}) as DereferenceOptions;
const isExcludedPath = derefOptions.excludedPathMatcher || (() => false);
if (derefOptions?.circular === "ignore" || !processedObjects.has(obj)) {
if (obj && typeof obj === "object" && !ArrayBuffer.isView(obj) && !isExcludedPath(pathFromRoot)) {
parents.add(obj);
processedObjects.add(obj);
if ($Ref.isAllowed$Ref(obj, options)) {
dereferenced = dereference$Ref(
obj,
path,
pathFromRoot,
parents,
processedObjects,
dereferencedCache,
$refs,
options,
startTime,
);
result.circular = dereferenced.circular;
result.value = dereferenced.value;
} else {
for (const key of Object.keys(obj)) {
const keyPath = Pointer.join(path, key);
const keyPathFromRoot = Pointer.join(pathFromRoot, key);
if (isExcludedPath(keyPathFromRoot)) {
continue;
}
const value = obj[key];
let circular = false;
if ($Ref.isAllowed$Ref(value, options)) {
dereferenced = dereference$Ref(
value,
keyPath,
keyPathFromRoot,
parents,
processedObjects,
dereferencedCache,
$refs,
options,
startTime,
);
circular = dereferenced.circular;
// Avoid pointless mutations; breaks frozen objects to no profit
if (obj[key] !== dereferenced.value) {
// If we have properties we want to preserve from our dereferenced schema then we need
// to copy them over to our new object.
const preserved: Map<string, unknown> = new Map();
if (derefOptions?.preservedProperties) {
if (typeof obj[key] === "object" && !Array.isArray(obj[key])) {
derefOptions?.preservedProperties.forEach((prop) => {
if (prop in obj[key]) {
preserved.set(prop, obj[key][prop]);
}
});
}
}
obj[key] = dereferenced.value;
// If we have data to preserve and our dereferenced object is still an object then
// we need copy back our preserved data into our dereferenced schema.
if (derefOptions?.preservedProperties) {
if (preserved.size && typeof obj[key] === "object" && !Array.isArray(obj[key])) {
preserved.forEach((value, prop) => {
obj[key][prop] = value;
});
}
}
derefOptions?.onDereference?.(value.$ref, obj[key], obj, key);
}
} else {
if (!parents.has(value)) {
dereferenced = crawl(
value,
keyPath,
keyPathFromRoot,
parents,
processedObjects,
dereferencedCache,
$refs,
options,
startTime,
);
circular = dereferenced.circular;
// Avoid pointless mutations; breaks frozen objects to no profit
if (obj[key] !== dereferenced.value) {
obj[key] = dereferenced.value;
}
} else {
circular = foundCircularReference(keyPath, $refs, options);
}
}
// Set the "isCircular" flag if this or any other property is circular
result.circular = result.circular || circular;
}
}
parents.delete(obj);
}
}
return result;
}
/**
* Dereferences the given JSON Reference, and then crawls the resulting value.
*
* @param $ref - The JSON Reference to resolve
* @param path - The full path of `$ref`, possibly with a JSON Pointer in the hash
* @param pathFromRoot - The path of `$ref` from the schema root
* @param parents - An array of the parent objects that have already been dereferenced
* @param processedObjects - An array of all the objects that have already been dereferenced
* @param dereferencedCache - An map of all the dereferenced objects
* @param $refs
* @param options
* @returns
*/
function dereference$Ref<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(
$ref: any,
path: string,
pathFromRoot: string,
parents: Set<any>,
processedObjects: any,
dereferencedCache: any,
$refs: $Refs<S, O>,
options: O,
startTime: number,
) {
const isExternalRef = $Ref.isExternal$Ref($ref);
const shouldResolveOnCwd = isExternalRef && options?.dereference?.externalReferenceResolution === "root";
const $refPath = url.resolve(shouldResolveOnCwd ? url.cwd() : path, $ref.$ref);
const cache = dereferencedCache.get($refPath);
if (cache && !cache.circular) {
const refKeys = Object.keys($ref);
if (refKeys.length > 1) {
const extraKeys = {};
for (const key of refKeys) {
if (key !== "$ref" && !(key in cache.value)) {
// @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
extraKeys[key] = $ref[key];
}
}
return {
circular: cache.circular,
value: Object.assign({}, cache.value, extraKeys),
};
}
return cache;
}
const pointer = $refs._resolve($refPath, path, options);
if (pointer === null) {
return {
circular: false,
value: null,
};
}
// Check for circular references
const directCircular = pointer.circular;
let circular = directCircular || parents.has(pointer.value);
if (circular) {
foundCircularReference(path, $refs, options);
}
// Dereference the JSON reference
let dereferencedValue = $Ref.dereference($ref, pointer.value);
// Crawl the dereferenced value (unless it's circular)
if (!circular) {
// Determine if the dereferenced value is circular
const dereferenced = crawl(
dereferencedValue,
pointer.path,
pathFromRoot,
parents,
processedObjects,
dereferencedCache,
$refs,
options,
startTime,
);
circular = dereferenced.circular;
dereferencedValue = dereferenced.value;
}
if (circular && !directCircular && options.dereference?.circular === "ignore") {
// The user has chosen to "ignore" circular references, so don't change the value
dereferencedValue = $ref;
}
if (directCircular) {
// The pointer is a DIRECT circular reference (i.e. it references itself).
// So replace the $ref path with the absolute path from the JSON Schema root
dereferencedValue.$ref = pathFromRoot;
}
const dereferencedObject = {
circular,
value: dereferencedValue,
};
// only cache if no extra properties than $ref
if (Object.keys($ref).length === 1) {
dereferencedCache.set($refPath, dereferencedObject);
}
return dereferencedObject;
}
/**
* Called when a circular reference is found.
* It sets the {@link $Refs#circular} flag, executes the options.dereference.onCircular callback,
* and throws an error if options.dereference.circular is false.
*
* @param keyPath - The JSON Reference path of the circular reference
* @param $refs
* @param options
* @returns - always returns true, to indicate that a circular reference was found
*/
function foundCircularReference(keyPath: any, $refs: any, options: any) {
$refs.circular = true;
options?.dereference?.onCircular?.(keyPath);
if (!options.dereference.circular) {
throw ono.reference(`Circular $ref pointer found at ${keyPath}`);
}
return true;
}

View File

@@ -0,0 +1,29 @@
"use strict";
exports.endOfSecond = endOfSecond;
var _index = require("./toDate.js");
/**
* @name endOfSecond
* @category Second Helpers
* @summary Return the end of a second for the given date.
*
* @description
* Return the end of a second for the given date.
* The result will be in the local timezone.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The original date
*
* @returns The end of a second
*
* @example
* // The end of a second for 1 December 2014 22:15:45.400:
* const result = endOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400))
* //=> Mon Dec 01 2014 22:15:45.999
*/
function endOfSecond(date) {
const _date = (0, _index.toDate)(date);
_date.setMilliseconds(999);
return _date;
}

View File

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

View File

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

View File

@@ -0,0 +1,2 @@
// @generated from regex-gen.ts
export const S_UNICODE_REGEX = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD803[\uDD8E\uDD8F\uDED1-\uDED8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA]/;

View File

@@ -0,0 +1,31 @@
/**
* @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 LassoSelect = createLucideIcon("LassoSelect", [
["path", { d: "M7 22a5 5 0 0 1-2-4", key: "umushi" }],
["path", { d: "M7 16.93c.96.43 1.96.74 2.99.91", key: "ybbtv3" }],
[
"path",
{
d: "M3.34 14A6.8 6.8 0 0 1 2 10c0-4.42 4.48-8 10-8s10 3.58 10 8a7.19 7.19 0 0 1-.33 2",
key: "gt5e1w"
}
],
["path", { d: "M5 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4z", key: "bq3ynw" }],
[
"path",
{
d: "M14.33 22h-.09a.35.35 0 0 1-.24-.32v-10a.34.34 0 0 1 .33-.34c.08 0 .15.03.21.08l7.34 6a.33.33 0 0 1-.21.59h-4.49l-2.57 3.85a.35.35 0 0 1-.28.14z",
key: "72q637"
}
]
]);
export { LassoSelect as default };
//# sourceMappingURL=lasso-select.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/views/Version/RenderFieldsToDiff/fields/Text/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAA;AAI3D,OAAO,cAAc,CAAA;AAuCrB,eAAO,MAAM,IAAI,EAAE,4BA+ClB,CAAA"}

View File

@@ -0,0 +1,4 @@
export {
} from "./emotion-weak-memoize.cjs.js";
export { _default as default } from "./emotion-weak-memoize.cjs.default.js";

View File

@@ -0,0 +1 @@
{"version":3,"file":"span-attributes-with-logic-attached.js","sources":["../../../src/common/span-attributes-with-logic-attached.ts"],"sourcesContent":["/**\n * If this attribute is attached to a transaction, the Next.js SDK will drop that transaction.\n */\nexport const TRANSACTION_ATTR_SHOULD_DROP_TRANSACTION = 'sentry.drop_transaction';\n\nexport const TRANSACTION_ATTR_SENTRY_TRACE_BACKFILL = 'sentry.sentry_trace_backfill';\n\nexport const TRANSACTION_ATTR_SENTRY_ROUTE_BACKFILL = 'sentry.route_backfill';\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACO,MAAM,wCAAA,GAA2C;;AAEjD,MAAM,sCAAA,GAAyC;;AAE/C,MAAM,sCAAA,GAAyC;;;;"}

View File

@@ -0,0 +1,134 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.js";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.js";
const matchOrdinalNumberPattern = /^(\d+)(\.)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,
abbreviated: /^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,
wide: /^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i,
};
const parseEraPatterns = {
any: [/^v/i, /^n/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^q[1234]/i,
wide: /^[1234](\.)? Quartal/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[jfmasond]/i,
abbreviated:
/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,
wide: /^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i,
};
const parseMonthPatterns = {
narrow: [
/^j/i,
/^f/i,
/^m/i,
/^a/i,
/^m/i,
/^j/i,
/^j/i,
/^a/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
any: [
/^j[aä]/i,
/^f/i,
/^mär/i,
/^ap/i,
/^mai/i,
/^jun/i,
/^jul/i,
/^au/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
};
const matchDayPatterns = {
narrow: /^[smdmf]/i,
short: /^(so|mo|di|mi|do|fr|sa)/i,
abbreviated: /^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,
wide: /^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i,
};
const parseDayPatterns = {
any: [/^so/i, /^mo/i, /^di/i, /^mi/i, /^do/i, /^f/i, /^sa/i],
};
const matchDayPeriodPatterns = {
narrow: /^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,
abbreviated:
/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,
wide: /^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^v/i,
pm: /^n/i,
midnight: /^Mitte/i,
noon: /^Mitta/i,
morning: /morgens/i,
afternoon: /nachmittags/i, // will never be matched. Afternoon is matched by `pm`
evening: /abends/i,
night: /nachts/i, // will never be matched. Night is matched by `pm`
},
};
export const match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value),
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
};

View File

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

View File

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

View File

@@ -0,0 +1,42 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const codegen_1 = require("ajv/dist/compile/codegen");
const _util_1 = require("./_util");
const error = {
message: ({ params: { missingPattern } }) => (0, codegen_1.str) `should have property matching pattern '${missingPattern}'`,
params: ({ params: { missingPattern } }) => (0, codegen_1._) `{missingPattern: ${missingPattern}}`,
};
function getDef() {
return {
keyword: "patternRequired",
type: "object",
schemaType: "array",
error,
code(cxt) {
const { gen, schema, data } = cxt;
if (schema.length === 0)
return;
const valid = gen.let("valid", true);
for (const pat of schema)
validateProperties(pat);
function validateProperties(pattern) {
const matched = gen.let("matched", false);
gen.forIn("key", data, (key) => {
gen.assign(matched, (0, codegen_1._) `${(0, _util_1.usePattern)(cxt, pattern)}.test(${key})`);
gen.if(matched, () => gen.break());
});
cxt.setParams({ missingPattern: pattern });
gen.assign(valid, (0, codegen_1.and)(valid, matched));
cxt.pass(valid);
}
},
metaSchema: {
type: "array",
items: { type: "string", format: "regex" },
uniqueItems: true,
},
};
}
exports.default = getDef;
module.exports = getDef;
//# sourceMappingURL=patternRequired.js.map

View File

@@ -0,0 +1,12 @@
export interface HookOptions {
internals?: boolean;
}
export type OnRequireFn = <T>(exports: T, name: string, basedir?: string) => T;
export class Hook {
constructor(modules: string[] | null, options: HookOptions | null, onrequire: OnRequireFn);
constructor(modules: string[] | null, onrequire: OnRequireFn);
constructor(onrequire: OnRequireFn);
unhook(): void;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import type { Binding } from '.';
import type { ElementNode, NodeKey, NodeMap } from 'lexical';
import type { AbstractType, XmlText } from 'yjs';
import { CollabDecoratorNode } from './CollabDecoratorNode';
import { CollabLineBreakNode } from './CollabLineBreakNode';
import { CollabTextNode } from './CollabTextNode';
type IntentionallyMarkedAsDirtyElement = boolean;
export declare class CollabElementNode {
_key: NodeKey;
_children: Array<CollabElementNode | CollabTextNode | CollabDecoratorNode | CollabLineBreakNode>;
_xmlText: XmlText;
_type: string;
_parent: null | CollabElementNode;
constructor(xmlText: XmlText, parent: null | CollabElementNode, type: string);
getPrevNode(nodeMap: null | NodeMap): null | ElementNode;
getNode(): null | ElementNode;
getSharedType(): XmlText;
getType(): string;
getKey(): NodeKey;
isEmpty(): boolean;
getSize(): number;
getOffset(): number;
syncPropertiesFromYjs(binding: Binding, keysChanged: null | Set<string>): void;
applyChildrenYjsDelta(binding: Binding, deltas: Array<{
insert?: string | object | AbstractType<unknown>;
delete?: number;
retain?: number;
attributes?: {
[x: string]: unknown;
};
}>): void;
syncChildrenFromYjs(binding: Binding): void;
syncPropertiesFromLexical(binding: Binding, nextLexicalNode: ElementNode, prevNodeMap: null | NodeMap): void;
_syncChildFromLexical(binding: Binding, index: number, key: NodeKey, prevNodeMap: null | NodeMap, dirtyElements: null | Map<NodeKey, IntentionallyMarkedAsDirtyElement>, dirtyLeaves: null | Set<NodeKey>): void;
syncChildrenFromLexical(binding: Binding, nextLexicalNode: ElementNode, prevNodeMap: null | NodeMap, dirtyElements: null | Map<NodeKey, IntentionallyMarkedAsDirtyElement>, dirtyLeaves: null | Set<NodeKey>): void;
append(collabNode: CollabElementNode | CollabDecoratorNode | CollabTextNode | CollabLineBreakNode): void;
splice(binding: Binding, index: number, delCount: number, collabNode?: CollabElementNode | CollabDecoratorNode | CollabTextNode | CollabLineBreakNode): void;
getChildOffset(collabNode: CollabElementNode | CollabTextNode | CollabDecoratorNode | CollabLineBreakNode): number;
destroy(binding: Binding): void;
}
export declare function $createCollabElementNode(xmlText: XmlText, parent: null | CollabElementNode, type: string): CollabElementNode;
export {};

View File

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

View File

@@ -0,0 +1,23 @@
var path = require('path');
var test = require('tape');
var resolve = require('../');
test('precedence', function (t) {
t.plan(3);
var dir = path.join(__dirname, 'precedence/aaa');
resolve('./', { basedir: dir }, function (err, res, pkg) {
t.ifError(err);
t.equal(res, path.join(dir, 'index.js'));
t.equal(pkg.name, 'resolve');
});
});
test('./ should not load ${dir}.js', function (t) { // eslint-disable-line no-template-curly-in-string
t.plan(1);
var dir = path.join(__dirname, 'precedence/bbb');
resolve('./', { basedir: dir }, function (err, res, pkg) {
t.ok(err);
});
});

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