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 @@
function n(n){return function(n){return"object"==typeof n?null==n.host&&null==n.hostname:!/^[a-z]+:/i.test(n)}(n)&&!function(n){const t="object"==typeof n?n.pathname:n;return null!=t&&!t.startsWith("/")}(n)}function t(n,t){return n.replace(new RegExp(`^${t}`),"")||"/"}function e(n,t){let e=n;return/^\/(\?.*)?$/.test(t)&&(t=t.slice(1)),e+=t,e}function r(n,t){return t===n||t.startsWith(`${n}/`)}function u(n,t,e){return"string"==typeof n?n:n[t]||e}function i(n){const t=function(){try{return"true"===process.env._next_intl_trailing_slash}catch{return!1}}(),[e,...r]=n.split("#"),u=r.join("#");let i=e;if("/"!==i){const n=i.endsWith("/");t&&!n?i+="/":!t&&n&&(i=i.slice(0,-1))}return u&&(i+="#"+u),i}function c(n,t){const e=i(n),r=i(t);return s(e).test(r)}function o(n,t){return"never"!==t.mode&&t.prefixes?.[n]||f(n)}function f(n){return"/"+n}function s(n){const t=n.replace(/\/\[\[(\.\.\.[^\]]+)\]\]/g,"(?:/(.*))?").replace(/\[\[(\.\.\.[^\]]+)\]\]/g,"(?:/(.*))?").replace(/\[(\.\.\.[^\]]+)\]/g,"(.+)").replace(/\[([^\]]+)\]/g,"([^/]+)");return new RegExp(`^${t}$`)}function l(n){return n.includes("[[...")}function p(n){return n.includes("[...")}function a(n){return n.includes("[")}function h(n,t){const e=n.split("/"),r=t.split("/"),u=Math.max(e.length,r.length);for(let n=0;n<u;n++){const t=e[n],u=r[n];if(!t&&u)return-1;if(t&&!u)return 1;if(t||u){if(!a(t)&&a(u))return-1;if(a(t)&&!a(u))return 1;if(!p(t)&&p(u))return-1;if(p(t)&&!p(u))return 1;if(!l(t)&&l(u))return-1;if(l(t)&&!l(u))return 1}}return 0}function g(n){return n.sort(h)}function x(n){return"function"==typeof n.then}export{f as getLocaleAsPrefix,o as getLocalePrefix,u as getLocalizedTemplate,g as getSortedPathnames,r as hasPathnamePrefixed,n as isLocalizableHref,x as isPromise,c as matchesPathname,i as normalizeTrailingSlash,e as prefixPathname,s as templateToRegex,t as unprefixPathname};

View File

@@ -0,0 +1,154 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { otperformance as performance } from '../platform';
const NANOSECOND_DIGITS = 9;
const NANOSECOND_DIGITS_IN_MILLIS = 6;
const MILLISECONDS_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS_IN_MILLIS);
const SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS);
/**
* Converts a number of milliseconds from epoch to HrTime([seconds, remainder in nanoseconds]).
* @param epochMillis
*/
export function millisToHrTime(epochMillis) {
const epochSeconds = epochMillis / 1000;
// Decimals only.
const seconds = Math.trunc(epochSeconds);
// Round sub-nanosecond accuracy to nanosecond.
const nanos = Math.round((epochMillis % 1000) * MILLISECONDS_TO_NANOSECONDS);
return [seconds, nanos];
}
/**
* @deprecated Use `performance.timeOrigin` directly.
*/
export function getTimeOrigin() {
return performance.timeOrigin;
}
/**
* Returns an hrtime calculated via performance component.
* @param performanceNow
*/
export function hrTime(performanceNow) {
const timeOrigin = millisToHrTime(performance.timeOrigin);
const now = millisToHrTime(typeof performanceNow === 'number' ? performanceNow : performance.now());
return addHrTimes(timeOrigin, now);
}
/**
*
* Converts a TimeInput to an HrTime, defaults to _hrtime().
* @param time
*/
export function timeInputToHrTime(time) {
// process.hrtime
if (isTimeInputHrTime(time)) {
return time;
}
else if (typeof time === 'number') {
// Must be a performance.now() if it's smaller than process start time.
if (time < performance.timeOrigin) {
return hrTime(time);
}
else {
// epoch milliseconds or performance.timeOrigin
return millisToHrTime(time);
}
}
else if (time instanceof Date) {
return millisToHrTime(time.getTime());
}
else {
throw TypeError('Invalid input type');
}
}
/**
* Returns a duration of two hrTime.
* @param startTime
* @param endTime
*/
export function hrTimeDuration(startTime, endTime) {
let seconds = endTime[0] - startTime[0];
let nanos = endTime[1] - startTime[1];
// overflow
if (nanos < 0) {
seconds -= 1;
// negate
nanos += SECOND_TO_NANOSECONDS;
}
return [seconds, nanos];
}
/**
* Convert hrTime to timestamp, for example "2019-05-14T17:00:00.000123456Z"
* @param time
*/
export function hrTimeToTimeStamp(time) {
const precision = NANOSECOND_DIGITS;
const tmp = `${'0'.repeat(precision)}${time[1]}Z`;
const nanoString = tmp.substring(tmp.length - precision - 1);
const date = new Date(time[0] * 1000).toISOString();
return date.replace('000Z', nanoString);
}
/**
* Convert hrTime to nanoseconds.
* @param time
*/
export function hrTimeToNanoseconds(time) {
return time[0] * SECOND_TO_NANOSECONDS + time[1];
}
/**
* Convert hrTime to milliseconds.
* @param time
*/
export function hrTimeToMilliseconds(time) {
return time[0] * 1e3 + time[1] / 1e6;
}
/**
* Convert hrTime to microseconds.
* @param time
*/
export function hrTimeToMicroseconds(time) {
return time[0] * 1e6 + time[1] / 1e3;
}
/**
* check if time is HrTime
* @param value
*/
export function isTimeInputHrTime(value) {
return (Array.isArray(value) &&
value.length === 2 &&
typeof value[0] === 'number' &&
typeof value[1] === 'number');
}
/**
* check if input value is a correct types.TimeInput
* @param value
*/
export function isTimeInput(value) {
return (isTimeInputHrTime(value) ||
typeof value === 'number' ||
value instanceof Date);
}
/**
* Given 2 HrTime formatted times, return their sum as an HrTime.
*/
export function addHrTimes(time1, time2) {
const out = [time1[0] + time2[0], time1[1] + time2[1]];
// Nanoseconds
if (out[1] >= SECOND_TO_NANOSECONDS) {
out[1] -= SECOND_TO_NANOSECONDS;
out[0] += 1;
}
return out;
}
//# sourceMappingURL=time.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"checkFileAccess.d.ts","sourceRoot":"","sources":["../../src/uploads/checkFileAccess.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAS,MAAM,mBAAmB,CAAA;AAK9D,eAAO,MAAM,eAAe,mCAIzB;IACD,UAAU,EAAE,UAAU,CAAA;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE,cAAc,CAAA;CACpB,KAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAiDjC,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"base64-arraybuffer.es5.js","sources":["../../src/index.ts"],"sourcesContent":["const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\n// Use a lookup table to find the index.\nconst lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (let i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\n\nexport const encode = (arraybuffer: ArrayBuffer): string => {\n let bytes = new Uint8Array(arraybuffer),\n i,\n len = bytes.length,\n base64 = '';\n\n for (i = 0; i < len; i += 3) {\n base64 += chars[bytes[i] >> 2];\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\n base64 += chars[bytes[i + 2] & 63];\n }\n\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + '=';\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + '==';\n }\n\n return base64;\n};\n\nexport const decode = (base64: string): ArrayBuffer => {\n let bufferLength = base64.length * 0.75,\n len = base64.length,\n i,\n p = 0,\n encoded1,\n encoded2,\n encoded3,\n encoded4;\n\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n const arraybuffer = new ArrayBuffer(bufferLength),\n bytes = new Uint8Array(arraybuffer);\n\n for (i = 0; i < len; i += 4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i + 1)];\n encoded3 = lookup[base64.charCodeAt(i + 2)];\n encoded4 = lookup[base64.charCodeAt(i + 3)];\n\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n\n return arraybuffer;\n};\n"],"names":[],"mappings":";;;;;AAAA,IAAM,KAAK,GAAG,kEAAkE,CAAC;AAEjF;AACA,IAAM,MAAM,GAAG,OAAO,UAAU,KAAK,WAAW,GAAG,EAAE,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;AAC5E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACnC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CACnC;IAEY,MAAM,GAAG,UAAC,WAAwB;IAC3C,IAAI,KAAK,GAAG,IAAI,UAAU,CAAC,WAAW,CAAC,EACnC,CAAC,EACD,GAAG,GAAG,KAAK,CAAC,MAAM,EAClB,MAAM,GAAG,EAAE,CAAC;IAEhB,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE;QACzB,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC7D,MAAM,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClE,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;KACtC;IAED,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,EAAE;QACf,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;KACzD;SAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,EAAE;QACtB,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC;KAC1D;IAED,OAAO,MAAM,CAAC;AAClB,EAAE;IAEW,MAAM,GAAG,UAAC,MAAc;IACjC,IAAI,YAAY,GAAG,MAAM,CAAC,MAAM,GAAG,IAAI,EACnC,GAAG,GAAG,MAAM,CAAC,MAAM,EACnB,CAAC,EACD,CAAC,GAAG,CAAC,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,CAAC;IAEb,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE;QACnC,YAAY,EAAE,CAAC;QACf,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE;YACnC,YAAY,EAAE,CAAC;SAClB;KACJ;IAED,IAAM,WAAW,GAAG,IAAI,WAAW,CAAC,YAAY,CAAC,EAC7C,KAAK,GAAG,IAAI,UAAU,CAAC,WAAW,CAAC,CAAC;IAExC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE;QACzB,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;QACxC,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC5C,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC5C,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAE5C,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,QAAQ,IAAI,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,CAAC;QAC/C,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,QAAQ,GAAG,EAAE,KAAK,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,CAAC;QACtD,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,QAAQ,GAAG,CAAC,KAAK,CAAC,KAAK,QAAQ,GAAG,EAAE,CAAC,CAAC;KACxD;IAED,OAAO,WAAW,CAAC;AACvB;;;;"}

View File

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

View File

@@ -0,0 +1,27 @@
'use strict'
const SemVer = require('../classes/semver')
const Range = require('../classes/range')
const maxSatisfying = (versions, range, options) => {
let max = null
let maxSV = null
let rangeObj = null
try {
rangeObj = new Range(range, options)
} catch (er) {
return null
}
versions.forEach((v) => {
if (rangeObj.test(v)) {
// satisfies(v, range, options)
if (!max || maxSV.compare(v) === -1) {
// compare(max, v, true)
max = v
maxSV = new SemVer(max, options)
}
}
})
return max
}
module.exports = maxSatisfying

View File

@@ -0,0 +1 @@
{"version":3,"file":"execAsync.js","sourceRoot":"","sources":["../../../../../../src/detectors/platform/node/machine-id/execAsync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,aAAa,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as child_process from 'child_process';\nimport * as util from 'util';\n\nexport const execAsync = util.promisify(child_process.exec);\n"]}

View File

@@ -0,0 +1,77 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var custom_exports = {};
__export(custom_exports, {
SingleStoreCustomColumn: () => SingleStoreCustomColumn,
SingleStoreCustomColumnBuilder: () => SingleStoreCustomColumnBuilder,
customType: () => customType
});
module.exports = __toCommonJS(custom_exports);
var import_entity = require("../../entity.cjs");
var import_utils = require("../../utils.cjs");
var import_common = require("./common.cjs");
class SingleStoreCustomColumnBuilder extends import_common.SingleStoreColumnBuilder {
static [import_entity.entityKind] = "SingleStoreCustomColumnBuilder";
constructor(name, fieldConfig, customTypeParams) {
super(name, "custom", "SingleStoreCustomColumn");
this.config.fieldConfig = fieldConfig;
this.config.customTypeParams = customTypeParams;
}
/** @internal */
build(table) {
return new SingleStoreCustomColumn(
table,
this.config
);
}
}
class SingleStoreCustomColumn extends import_common.SingleStoreColumn {
static [import_entity.entityKind] = "SingleStoreCustomColumn";
sqlName;
mapTo;
mapFrom;
constructor(table, config) {
super(table, config);
this.sqlName = config.customTypeParams.dataType(config.fieldConfig);
this.mapTo = config.customTypeParams.toDriver;
this.mapFrom = config.customTypeParams.fromDriver;
}
getSQLType() {
return this.sqlName;
}
mapFromDriverValue(value) {
return typeof this.mapFrom === "function" ? this.mapFrom(value) : value;
}
mapToDriverValue(value) {
return typeof this.mapTo === "function" ? this.mapTo(value) : value;
}
}
function customType(customTypeParams) {
return (a, b) => {
const { name, config } = (0, import_utils.getColumnNameAndConfig)(a, b);
return new SingleStoreCustomColumnBuilder(name, config, customTypeParams);
};
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
SingleStoreCustomColumn,
SingleStoreCustomColumnBuilder,
customType
});
//# sourceMappingURL=custom.cjs.map

View File

@@ -0,0 +1,8 @@
import { number } from '../../../value/types/numbers/index.mjs';
const int = {
...number,
transform: Math.round,
};
export { int };

View File

@@ -0,0 +1,24 @@
import { unflatten as flatleyUnflatten } from './unflatten.js';
/**
* Reduce flattened form fields (Fields) to just map to the respective values instead of the full FormField object
*
* @param unflatten This also unflattens the data if `unflatten` is true. The unflattened data should match the original data structure
* @param ignoreDisableFormData - if true, will include fields that have `disableFormData` set to true, for example, blocks or arrays fields.
*
*/ export const reduceFieldsToValues = (fields, unflatten, ignoreDisableFormData)=>{
let data = {};
if (!fields) {
return data;
}
Object.keys(fields).forEach((key)=>{
if (ignoreDisableFormData === true || !fields[key]?.disableFormData) {
data[key] = fields[key]?.value;
}
});
if (unflatten) {
data = flatleyUnflatten(data);
}
return data;
};
//# sourceMappingURL=reduceFieldsToValues.js.map

View File

@@ -0,0 +1 @@
module.exports={C:{"5":0.04545,"95":0.0101,"115":0.11615,"127":0.00505,"128":0.01515,"135":0.0202,"138":0.00505,"139":0.00505,"140":0.06565,"141":0.00505,"142":0.00505,"143":0.0101,"144":0.02525,"145":0.56055,"146":0.6868,_:"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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 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 129 130 131 132 133 134 136 137 147 148 149 3.5 3.6"},D:{"56":0.00505,"63":0.00505,"64":0.00505,"65":0.00505,"66":0.00505,"68":0.00505,"69":0.0505,"70":0.0101,"72":0.00505,"75":0.00505,"77":0.0202,"79":0.0303,"81":0.0101,"83":0.01515,"86":0.0101,"87":0.0404,"90":0.00505,"91":0.00505,"92":0.00505,"93":0.0101,"94":0.00505,"95":0.00505,"98":0.03535,"103":0.3838,"104":0.3333,"105":0.32825,"106":0.3333,"107":0.32825,"108":0.3636,"109":0.606,"110":0.3434,"111":0.37875,"112":12.1099,"113":0.00505,"114":0.0404,"116":0.7373,"117":0.3333,"119":0.03535,"120":0.3434,"121":0.01515,"122":0.0808,"123":0.00505,"124":0.33835,"125":0.2626,"126":5.252,"127":0.0101,"128":0.05555,"129":0.0202,"130":0.00505,"131":0.6868,"132":0.0707,"133":0.67165,"134":0.0202,"135":0.0303,"136":0.0303,"137":0.02525,"138":0.3535,"139":0.0808,"140":0.06565,"141":0.25755,"142":5.03485,"143":5.51965,"144":0.00505,_:"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 57 58 59 60 61 62 67 71 73 74 76 78 80 84 85 88 89 96 97 99 100 101 102 115 118 145 146"},F:{"46":0.00505,"56":0.00505,"86":0.00505,"92":0.00505,"93":0.08585,"95":0.0101,"122":0.00505,"123":0.00505,"124":0.3131,"125":0.26765,_:"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 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 87 88 89 90 91 94 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 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"18":0.01515,"84":0.00505,"90":0.00505,"92":0.0202,"100":0.00505,"109":0.02525,"122":0.00505,"123":0.00505,"128":0.01515,"130":0.00505,"133":0.00505,"134":0.0101,"136":0.00505,"137":0.0202,"138":0.01515,"139":0.01515,"140":0.01515,"141":0.04545,"142":1.10595,"143":2.4745,_:"12 13 14 15 16 17 79 80 81 83 85 86 87 88 89 91 93 94 95 96 97 98 99 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 119 120 121 124 125 126 127 129 131 132 135"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 15.1 15.2-15.3 15.4 15.5 16.0 16.4 16.5 17.0 17.2 17.3 26.3","11.1":0.00505,"12.1":0.00505,"13.1":0.02525,"14.1":0.01515,"15.6":0.07575,"16.1":0.00505,"16.2":0.00505,"16.3":0.00505,"16.6":0.0404,"17.1":0.0202,"17.4":0.00505,"17.5":0.0101,"17.6":0.0909,"18.0":0.00505,"18.1":0.00505,"18.2":0.00505,"18.3":0.0101,"18.4":0.0101,"18.5-18.6":0.03535,"26.0":0.04545,"26.1":0.19695,"26.2":0.0505},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00193,"5.0-5.1":0,"6.0-6.1":0.00386,"7.0-7.1":0.00289,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00772,"10.0-10.2":0.00096,"10.3":0.01351,"11.0-11.2":0.16594,"11.3-11.4":0.00482,"12.0-12.1":0.00386,"12.2-12.5":0.04341,"13.0-13.1":0.00096,"13.2":0.00675,"13.3":0.00193,"13.4-13.7":0.00675,"14.0-14.4":0.01351,"14.5-14.8":0.01447,"15.0-15.1":0.01544,"15.2-15.3":0.01158,"15.4":0.01254,"15.5":0.01351,"15.6-15.8":0.20935,"16.0":0.02412,"16.1":0.04631,"16.2":0.02412,"16.3":0.04341,"16.4":0.01061,"16.5":0.01833,"16.6-16.7":0.27206,"17.0":0.01544,"17.1":0.02508,"17.2":0.01833,"17.3":0.02798,"17.4":0.04727,"17.5":0.09262,"17.6-17.7":0.21418,"18.0":0.04824,"18.1":0.10033,"18.2":0.05306,"18.3":0.17269,"18.4":0.08876,"18.5-18.7":6.37317,"26.0":0.12445,"26.1":1.03518,"26.2":0.19681,"26.3":0.00868},P:{"4":0.03057,"20":0.01019,"21":0.01019,"22":0.03057,"23":0.02038,"24":0.06113,"25":0.05094,"26":0.05094,"27":0.10188,"28":0.20377,"29":1.3958,"5.0-5.4":0.01019,_:"6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 18.0","7.2-7.4":0.0917,"17.0":0.01019,"19.0":0.02038},I:{"0":0.05436,"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.21285,_:"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.0297},H:{"0":0},L:{"0":43.52925},R:{_:"0"},M:{"0":0.10395}};

View File

@@ -0,0 +1,10 @@
import { ReactElement, RefAttributes } from 'react';
import Select from './Select';
import { GroupBase } from './types';
import { AsyncAdditionalProps } from './useAsync';
import { StateManagerProps } from './useStateManager';
import { CreatableAdditionalProps } from './useCreatable';
export declare type AsyncCreatableProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = StateManagerProps<Option, IsMulti, Group> & CreatableAdditionalProps<Option, Group> & AsyncAdditionalProps<Option, Group>;
declare type AsyncCreatableSelect = <Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: AsyncCreatableProps<Option, IsMulti, Group> & RefAttributes<Select<Option, IsMulti, Group>>) => ReactElement;
declare const AsyncCreatableSelect: AsyncCreatableSelect;
export default AsyncCreatableSelect;

View File

@@ -0,0 +1,43 @@
{
"name": "@directus/sdk",
"version": "21.1.0",
"description": "Directus JavaScript SDK",
"homepage": "https://directus.io",
"repository": {
"type": "git",
"url": "https://github.com/directus/directus.git",
"directory": "sdk"
},
"funding": "https://github.com/directus/directus?sponsor=1",
"license": "MIT",
"type": "module",
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"./package.json": "./package.json"
},
"main": "./dist/index.js",
"files": [
"dist"
],
"devDependencies": {
"@directus/tsconfig": "3.0.0",
"@vitest/coverage-v8": "3.2.4",
"esbuild-plugin-replace": "1.4.0",
"tsdown": "0.15.11",
"typescript": "5.9.3",
"vitest": "3.2.4",
"@directus/system-data": "4.1.0"
},
"engines": {
"node": ">=22"
},
"scripts": {
"build": "NODE_ENV=production tsdown",
"dev": "NODE_ENV=development tsdown",
"test": "vitest run",
"test:coverage": "vitest run --coverage"
}
}

View File

@@ -0,0 +1,29 @@
import { formatDistance } from "./ckb/_lib/formatDistance.js";
import { formatLong } from "./ckb/_lib/formatLong.js";
import { formatRelative } from "./ckb/_lib/formatRelative.js";
import { localize } from "./ckb/_lib/localize.js";
import { match } from "./ckb/_lib/match.js";
/**
* @type {Locale}
* @category Locales
* @summary Central Kurdish locale.
* @language Central Kurdish
* @iso-639-2 kur
* @author Revan Sarbast [@Revan99]{@link https://github.com/Revan99}
*/
export const ckb = {
code: "ckb",
formatDistance,
formatLong,
formatRelative,
localize,
match,
options: {
weekStartsOn: 0 /* Sunday */,
firstWeekContainsDate: 1,
},
};
// Fallback for modularized imports:
export default ckb;

View File

@@ -0,0 +1,24 @@
"use strict";
var _unsupported_iterable_to_array = require("./_unsupported_iterable_to_array.cjs");
function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
if (it) return (it = it.call(o)).next.bind(it);
// Fallback for engines without symbol support
if (Array.isArray(o) || (it = _unsupported_iterable_to_array._(o)) || allowArrayLike && o && typeof o.length === "number") {
if (it) o = it;
var i = 0;
return function() {
if (i >= o.length) return { done: true };
return { done: false, value: o[i++] };
};
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
exports._ = _create_for_of_iterator_helper_loose;

View File

@@ -0,0 +1 @@
{"version":3,"file":"square-dot.js","sources":["../../../src/icons/square-dot.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SquareDot\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/square-dot\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 SquareDot = createLucideIcon('SquareDot', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['circle', { cx: '12', cy: '12', r: '1', key: '41hilf' }],\n]);\n\nexport default SquareDot;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC9E,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AAC1D,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,6 @@
var root = require('./_root');
/** Built-in value references. */
var Symbol = root.Symbol;
module.exports = Symbol;

View File

@@ -0,0 +1 @@
{"version":3,"file":"feather.js","sources":["../../../src/icons/feather.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Feather\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIuNjcgMTlhMiAyIDAgMCAwIDEuNDE2LS41ODhsNi4xNTQtNi4xNzJhNiA2IDAgMCAwLTguNDktOC40OUw1LjU4NiA5LjkxNEEyIDIgMCAwIDAgNSAxMS4zMjhWMThhMSAxIDAgMCAwIDEgMXoiIC8+CiAgPHBhdGggZD0iTTE2IDggMiAyMiIgLz4KICA8cGF0aCBkPSJNMTcuNSAxNUg5IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/feather\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 Feather = createLucideIcon('Feather', [\n [\n 'path',\n {\n d: 'M12.67 19a2 2 0 0 0 1.416-.588l6.154-6.172a6 6 0 0 0-8.49-8.49L5.586 9.914A2 2 0 0 0 5 11.328V18a1 1 0 0 0 1 1z',\n key: '18jl4k',\n },\n ],\n ['path', { d: 'M16 8 2 22', key: 'vp34q' }],\n ['path', { d: 'M17.5 15H9', key: '1oz8nu' }],\n]);\n\nexport default Feather;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAC1C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,SAAS,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,31 @@
import type { Options } from 'focus-trap';
import React, { ElementType, HTMLProps } from 'react';
import { IModalContext } from '../ModalProvider/context.js';
export type ModalPropsWithContext = ModalProps & {
modal?: IModalContext;
};
export type ChildFunction = (propsWithContext: ModalPropsWithContext) => React.ReactNode;
export interface ModalProps extends Omit<HTMLProps<HTMLElement>, 'children'> {
slug: string;
closeOnBlur?: boolean;
lockBodyScroll?: boolean;
htmlElement?: ElementType;
classPrefix?: string;
onOpen?: () => void;
onClose?: () => void;
onEnter?: () => void;
onEntered?: () => void;
onEntering?: () => void;
onExit?: () => void;
onExiting?: () => void;
onExited?: () => void;
openOnInit?: boolean;
children?: React.ReactNode | ChildFunction;
trapFocus?: boolean;
focusTrapOptions?: Options;
}
export declare const Modal: React.FC<ModalProps & {
modal?: IModalContext;
} & {
children?: React.ReactNode | ChildFunction;
}>;

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/formatDistance.mjs
var formatDistanceLocale = {
lessThanXSeconds: {
one: "less than a second",
other: "less than {{count}} seconds"
},
xSeconds: {
one: "1 second",
other: "{{count}} seconds"
},
halfAMinute: "half a minute",
lessThanXMinutes: {
one: "less than a minute",
other: "less than {{count}} minutes"
},
xMinutes: {
one: "1 minute",
other: "{{count}} minutes"
},
aboutXHours: {
one: "about 1 hour",
other: "about {{count}} hours"
},
xHours: {
one: "1 hour",
other: "{{count}} hours"
},
xDays: {
one: "1 day",
other: "{{count}} days"
},
aboutXWeeks: {
one: "about 1 week",
other: "about {{count}} weeks"
},
xWeeks: {
one: "1 week",
other: "{{count}} weeks"
},
aboutXMonths: {
one: "about 1 month",
other: "about {{count}} months"
},
xMonths: {
one: "1 month",
other: "{{count}} months"
},
aboutXYears: {
one: "about 1 year",
other: "about {{count}} years"
},
xYears: {
one: "1 year",
other: "{{count}} years"
},
overXYears: {
one: "over 1 year",
other: "over {{count}} years"
},
almostXYears: {
one: "almost 1 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-AU/_lib/formatLong.mjs
var dateFormats = {
full: "EEEE, d MMMM yyyy",
long: "d MMMM yyyy",
medium: "d MMM yyyy",
short: "dd/MM/yyyy"
};
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-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-AU.mjs
var enAU = {
code: "en-AU",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1,
firstWeekContainsDate: 4
}
};
// lib/locale/en-AU/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), {}, {
enAU: enAU }) });
//# debugId=DF1B4B4F4EB23B0564756e2164756e21
})();
//# sourceMappingURL=cdn.js.map

View File

@@ -0,0 +1,27 @@
"use strict";
exports.arTN = void 0;
var _index = require("./ar-TN/_lib/formatDistance.cjs");
var _index2 = require("./ar-TN/_lib/formatLong.cjs");
var _index3 = require("./ar-TN/_lib/formatRelative.cjs");
var _index4 = require("./ar-TN/_lib/localize.cjs");
var _index5 = require("./ar-TN/_lib/match.cjs");
/**
* @category Locales
* @summary Arabic locale (Tunisian Arabic).
* @language Arabic
* @iso-639-2 ara
* @author Koussay Haj Kacem [@essana3](https://github.com/essana3)
*/
const arTN = (exports.arTN = {
code: "ar-TN",
formatDistance: _index.formatDistance,
formatLong: _index2.formatLong,
formatRelative: _index3.formatRelative,
localize: _index4.localize,
match: _index5.match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 1,
},
});

View File

@@ -0,0 +1,63 @@
/**
* 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 './Bindings';
import type { LexicalCommand } from 'lexical';
import type { Doc, RelativePosition, UndoManager, XmlText } from 'yjs';
export type UserState = {
anchorPos: null | RelativePosition;
color: string;
focusing: boolean;
focusPos: null | RelativePosition;
name: string;
awarenessData: object;
[key: string]: unknown;
};
export declare const CONNECTED_COMMAND: LexicalCommand<boolean>;
export declare const TOGGLE_CONNECT_COMMAND: LexicalCommand<boolean>;
export type ProviderAwareness = {
getLocalState: () => UserState | null;
getStates: () => Map<number, UserState>;
off: (type: 'update', cb: () => void) => void;
on: (type: 'update', cb: () => void) => void;
setLocalState: (arg0: UserState) => void;
setLocalStateField: (field: string, value: unknown) => void;
};
declare interface Provider {
awareness: ProviderAwareness;
connect(): void | Promise<void>;
disconnect(): void;
off(type: 'sync', cb: (isSynced: boolean) => void): void;
off(type: 'update', cb: (arg0: unknown) => void): void;
off(type: 'status', cb: (arg0: {
status: string;
}) => void): void;
off(type: 'reload', cb: (doc: Doc) => void): void;
on(type: 'sync', cb: (isSynced: boolean) => void): void;
on(type: 'status', cb: (arg0: {
status: string;
}) => void): void;
on(type: 'update', cb: (arg0: unknown) => void): void;
on(type: 'reload', cb: (doc: Doc) => void): void;
}
export type Operation = {
attributes: {
__type: string;
};
insert: string | Record<string, unknown>;
};
export type Delta = Array<Operation>;
export type YjsNode = Record<string, unknown>;
export type YjsEvent = Record<string, unknown>;
export type { Provider };
export type { Binding, ClientID, ExcludedProperties } from './Bindings';
export { createBinding } from './Bindings';
export declare function createUndoManager(binding: Binding, root: XmlText): UndoManager;
export declare function initLocalState(provider: Provider, name: string, color: string, focusing: boolean, awarenessData: object): void;
export declare function setLocalStateFocus(provider: Provider, name: string, color: string, focusing: boolean, awarenessData: object): void;
export { getAnchorAndFocusCollabNodesForUserState, syncCursorPositions, type SyncCursorPositionsFn, } from './SyncCursors';
export { syncLexicalUpdateToYjs, syncYjsChangesToLexical, } from './SyncEditorStates';

View File

@@ -0,0 +1,47 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var ReactJSXRuntimeDev = require('react/jsx-dev-runtime');
var emotionElement = require('../../dist/emotion-element-e8f4cc37.development.cjs.js');
require('react');
require('@emotion/cache');
require('@babel/runtime/helpers/extends');
require('@emotion/weak-memoize');
require('../../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.cjs.js');
require('hoist-non-react-statics');
require('@emotion/utils');
require('@emotion/serialize');
require('@emotion/use-insertion-effect-with-fallbacks');
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var ReactJSXRuntimeDev__namespace = /*#__PURE__*/_interopNamespace(ReactJSXRuntimeDev);
var Fragment = ReactJSXRuntimeDev__namespace.Fragment;
var jsxDEV = function jsxDEV(type, props, key, isStaticChildren, source, self) {
if (!emotionElement.hasOwn.call(props, 'css')) {
return ReactJSXRuntimeDev__namespace.jsxDEV(type, props, key, isStaticChildren, source, self);
}
return ReactJSXRuntimeDev__namespace.jsxDEV(emotionElement.Emotion, emotionElement.createEmotionProps(type, props), key, isStaticChildren, source, self);
};
exports.Fragment = Fragment;
exports.jsxDEV = jsxDEV;

View File

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

View File

@@ -0,0 +1 @@
import{getMessagesFromConfig as e}from"../server/react-server/getMessages.js";import s from"./useConfig.js";function r(){const r=s("useMessages");return e(r)}export{r as default};

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"delete.js","sources":["../../../src/icons/delete.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Delete\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTAgNWEyIDIgMCAwIDAtMS4zNDQuNTE5bC02LjMyOCA1Ljc0YTEgMSAwIDAgMCAwIDEuNDgxbDYuMzI4IDUuNzQxQTIgMiAwIDAgMCAxMCAxOWgxMGEyIDIgMCAwIDAgMi0yVjdhMiAyIDAgMCAwLTItMnoiIC8+CiAgPHBhdGggZD0ibTEyIDkgNiA2IiAvPgogIDxwYXRoIGQ9Im0xOCA5LTYgNiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/delete\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 Delete = createLucideIcon('Delete', [\n [\n 'path',\n {\n d: 'M10 5a2 2 0 0 0-1.344.519l-6.328 5.74a1 1 0 0 0 0 1.481l6.328 5.741A2 2 0 0 0 10 19h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2z',\n key: '1yo7s0',\n },\n ],\n ['path', { d: 'm12 9 6 6', key: 'anjzzh' }],\n ['path', { d: 'm18 9-6 6', key: '1fp51s' }],\n]);\n\nexport default Delete;\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,CACxC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5C,CAAC,CAAA,CAAA;;"}

View File

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

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/uploads/fetchAPI-multipart/index.ts"],"sourcesContent":["import path from 'path'\n\nimport type { FetchAPIFileUploadOptions } from '../../config/types.js'\n\nimport { APIError } from '../../errors/APIError.js'\nimport { isEligibleRequest } from './isEligibleRequest.js'\nimport { processMultipart } from './processMultipart.js'\nimport { debugLog } from './utilities.js'\n\nconst DEFAULT_UPLOAD_OPTIONS: FetchAPIFileUploadOptions = {\n abortOnLimit: false,\n createParentPath: false,\n debug: false,\n defParamCharset: 'utf8',\n limitHandler: false,\n parseNested: false,\n preserveExtension: false,\n responseOnLimit: 'File size limit has been reached',\n safeFileNames: false,\n tempFileDir: 'tmp', // Relative path is created inside current workdir.\n uploadTimeout: 60000,\n uriDecodeFileNames: false,\n useTempFiles: false,\n}\n\nexport type FileShape = {\n data: Buffer\n encoding: string\n md5: Buffer | string\n mimetype: string\n mv: (filePath: string, callback: () => void) => Promise<void> | void\n name: string\n size: number\n tempFilePath: string\n truncated: boolean\n}\n\ntype FetchAPIFileUploadResponseFile = {\n data: Buffer\n mimetype: string\n name: string\n size: number\n tempFilePath?: string\n}\n\nexport type FetchAPIFileUploadResponse = {\n error?: APIError\n fields: Record<string, string>\n files: Record<string, FetchAPIFileUploadResponseFile>\n}\n\ntype FetchAPIFileUpload = (args: {\n options?: FetchAPIFileUploadOptions\n request: Request\n}) => Promise<FetchAPIFileUploadResponse>\n\nexport const processMultipartFormdata: FetchAPIFileUpload = async ({\n options: incomingOptions,\n request,\n}) => {\n const options: FetchAPIFileUploadOptions = { ...DEFAULT_UPLOAD_OPTIONS, ...incomingOptions }\n\n if (!isEligibleRequest(request)) {\n debugLog(options, 'Request is not eligible for file upload!')\n\n return {\n error: new APIError('Request is not eligible for file upload', 500),\n fields: undefined!,\n files: undefined!,\n }\n } else {\n return processMultipart({ options, request })\n }\n}\n"],"names":["APIError","isEligibleRequest","processMultipart","debugLog","DEFAULT_UPLOAD_OPTIONS","abortOnLimit","createParentPath","debug","defParamCharset","limitHandler","parseNested","preserveExtension","responseOnLimit","safeFileNames","tempFileDir","uploadTimeout","uriDecodeFileNames","useTempFiles","processMultipartFormdata","options","incomingOptions","request","error","fields","undefined","files"],"mappings":"AAIA,SAASA,QAAQ,QAAQ,2BAA0B;AACnD,SAASC,iBAAiB,QAAQ,yBAAwB;AAC1D,SAASC,gBAAgB,QAAQ,wBAAuB;AACxD,SAASC,QAAQ,QAAQ,iBAAgB;AAEzC,MAAMC,yBAAoD;IACxDC,cAAc;IACdC,kBAAkB;IAClBC,OAAO;IACPC,iBAAiB;IACjBC,cAAc;IACdC,aAAa;IACbC,mBAAmB;IACnBC,iBAAiB;IACjBC,eAAe;IACfC,aAAa;IACbC,eAAe;IACfC,oBAAoB;IACpBC,cAAc;AAChB;AAiCA,OAAO,MAAMC,2BAA+C,OAAO,EACjEC,SAASC,eAAe,EACxBC,OAAO,EACR;IACC,MAAMF,UAAqC;QAAE,GAAGf,sBAAsB;QAAE,GAAGgB,eAAe;IAAC;IAE3F,IAAI,CAACnB,kBAAkBoB,UAAU;QAC/BlB,SAASgB,SAAS;QAElB,OAAO;YACLG,OAAO,IAAItB,SAAS,2CAA2C;YAC/DuB,QAAQC;YACRC,OAAOD;QACT;IACF,OAAO;QACL,OAAOtB,iBAAiB;YAAEiB;YAASE;QAAQ;IAC7C;AACF,EAAC"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"file-key.js","sources":["../../../src/icons/file-key.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FileKey\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTUgMkg2YTIgMiAwIDAgMC0yIDJ2MTZhMiAyIDAgMCAwIDIgMmgxMmEyIDIgMCAwIDAgMi0yVjdaIiAvPgogIDxjaXJjbGUgY3g9IjEwIiBjeT0iMTYiIHI9IjIiIC8+CiAgPHBhdGggZD0ibTE2IDEwLTQuNSA0LjUiIC8+CiAgPHBhdGggZD0ibTE1IDExIDEgMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/file-key\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 FileKey = createLucideIcon('FileKey', [\n ['path', { d: 'M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z', key: '1rqfz7' }],\n ['circle', { cx: '10', cy: '16', r: '2', key: '4ckbqe' }],\n ['path', { d: 'm16 10-4.5 4.5', key: '7p3ebg' }],\n ['path', { d: 'm15 11 1 1', key: '1bsyx3' }],\n]);\n\nexport default FileKey;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA8D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC3F,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC/C,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,53 @@
import digest from '../runtime/digest.js';
import { encode as base64url } from '../runtime/base64url.js';
import { JOSENotSupported, JWKInvalid } from '../util/errors.js';
import { encoder } from '../lib/buffer_utils.js';
import isObject from '../lib/is_object.js';
const check = (value, description) => {
if (typeof value !== 'string' || !value) {
throw new JWKInvalid(`${description} missing or invalid`);
}
};
export async function calculateJwkThumbprint(jwk, digestAlgorithm) {
if (!isObject(jwk)) {
throw new TypeError('JWK must be an object');
}
digestAlgorithm ?? (digestAlgorithm = 'sha256');
if (digestAlgorithm !== 'sha256' &&
digestAlgorithm !== 'sha384' &&
digestAlgorithm !== 'sha512') {
throw new TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"');
}
let components;
switch (jwk.kty) {
case 'EC':
check(jwk.crv, '"crv" (Curve) Parameter');
check(jwk.x, '"x" (X Coordinate) Parameter');
check(jwk.y, '"y" (Y Coordinate) Parameter');
components = { crv: jwk.crv, kty: jwk.kty, x: jwk.x, y: jwk.y };
break;
case 'OKP':
check(jwk.crv, '"crv" (Subtype of Key Pair) Parameter');
check(jwk.x, '"x" (Public Key) Parameter');
components = { crv: jwk.crv, kty: jwk.kty, x: jwk.x };
break;
case 'RSA':
check(jwk.e, '"e" (Exponent) Parameter');
check(jwk.n, '"n" (Modulus) Parameter');
components = { e: jwk.e, kty: jwk.kty, n: jwk.n };
break;
case 'oct':
check(jwk.k, '"k" (Key Value) Parameter');
components = { k: jwk.k, kty: jwk.kty };
break;
default:
throw new JOSENotSupported('"kty" (Key Type) Parameter missing or unsupported');
}
const data = encoder.encode(JSON.stringify(components));
return base64url(await digest(digestAlgorithm, data));
}
export async function calculateJwkThumbprintUri(jwk, digestAlgorithm) {
digestAlgorithm ?? (digestAlgorithm = 'sha256');
const thumbprint = await calculateJwkThumbprint(jwk, digestAlgorithm);
return `urn:ietf:params:oauth:jwk-thumbprint:sha-${digestAlgorithm.slice(-3)}:${thumbprint}`;
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"textarea-element-container.js","sourceRoot":"","sources":["../../../../src/dom/elements/textarea-element-container.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,0DAAsD;AAEtD;IAA8C,4CAAgB;IAE1D,kCAAY,OAAgB,EAAE,OAA4B;QAA1D,YACI,kBAAM,OAAO,EAAE,OAAO,CAAC,SAE1B;QADG,KAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;;IAC/B,CAAC;IACL,+BAAC;AAAD,CAAC,AAND,CAA8C,oCAAgB,GAM7D;AANY,4DAAwB"}

View File

@@ -0,0 +1,2 @@
import type { ClientRect } from '../../types';
export declare function useRect(element: HTMLElement | null, measure?: (element: HTMLElement) => ClientRect, fallbackRect?: ClientRect | null): ClientRect | null;

View File

@@ -0,0 +1,22 @@
/**
* @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 KeyRound = createLucideIcon("KeyRound", [
[
"path",
{
d: "M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",
key: "1s6t7t"
}
],
["circle", { cx: "16.5", cy: "7.5", r: ".5", fill: "currentColor", key: "w0ekpg" }]
]);
export { KeyRound as default };
//# sourceMappingURL=key-round.js.map

View File

@@ -0,0 +1,8 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Alexander Akait @akexander-akait
*/
"use strict";
// TODO remove this file in the next major release
module.exports = require("./index");

View File

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

View File

@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LookupMatcher = LookupMatcher;
var BestAvailableLocale_1 = require("./BestAvailableLocale");
var utils_1 = require("./utils");
/**
* https://tc39.es/ecma402/#sec-lookupmatcher
* @param availableLocales
* @param requestedLocales
* @param getDefaultLocale
*/
function LookupMatcher(availableLocales, requestedLocales, getDefaultLocale) {
var result = { locale: '' };
for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) {
var locale = requestedLocales_1[_i];
var noExtensionLocale = locale.replace(utils_1.UNICODE_EXTENSION_SEQUENCE_REGEX, '');
var availableLocale = (0, BestAvailableLocale_1.BestAvailableLocale)(availableLocales, noExtensionLocale);
if (availableLocale) {
result.locale = availableLocale;
if (locale !== noExtensionLocale) {
result.extension = locale.slice(noExtensionLocale.length, locale.length);
}
return result;
}
}
result.locale = getDefaultLocale();
return result;
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../src/collections/config/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AACrF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAIlD;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,OAAO,CAAC,gBAAgB,CA8C9C,CAAA;AAED,eAAO,MAAM,6BAA6B,eAAgB,gBAAgB,KAAG,gBA0D5E,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,gBAY1B,CAAA;AAED,eAAO,MAAM,uBAAuB,SAAU,gBAAgB,KAAG,gBAqBhE,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,wBAIvC,CAAA;AAED,eAAO,MAAM,oCAAoC,sBAC5B,wBAAwB,KAC1C,wBAM6B,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"OSDetector.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/browser/OSDetector.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,qDAAkD;AAErC,QAAA,UAAU,GAAG,2BAAY,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { noopDetector } from '../../NoopDetector';\n\nexport const osDetector = noopDetector;\n"]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"getFieldByPath.d.ts","sourceRoot":"","sources":["../../src/utilities/getFieldByPath.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE/D;;;;GAIG;AACH,eAAO,MAAM,cAAc,mEAMxB;IACD,MAAM,CAAC,EAAE,eAAe,CAAA;IACxB,MAAM,EAAE,cAAc,EAAE,CAAA;IACxB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;CACb,KAAG;IACF,KAAK,EAAE,cAAc,CAAA;IACrB,aAAa,EAAE,MAAM,CAAA;IACrB,gBAAgB,EAAE,OAAO,CAAA;CAC1B,GAAG,IA4EH,CAAA"}

View File

@@ -0,0 +1,18 @@
import { isolateObjectProperty, unlockOperation } from 'payload';
export function unlock(collection) {
async function resolver(_, args, context) {
const options = {
collection,
data: {
email: args.email,
username: args.username
},
req: isolateObjectProperty(context.req, 'transactionID')
};
const result = await unlockOperation(options);
return result;
}
return resolver;
}
//# sourceMappingURL=unlock.js.map

View File

@@ -0,0 +1,144 @@
import { expect, test } from "vitest";
import * as z from "../index.js";
// lt;
test("z.lt", () => {
const a = z.number().check(z.lt(10));
expect(z.safeParse(a, 9).success).toEqual(true);
expect(z.safeParse(a, 9).data).toEqual(9);
expect(z.safeParse(a, 10).success).toEqual(false);
});
// lte;
test("z.lte", () => {
const a = z.number().check(z.lte(10));
expect(z.safeParse(a, 10).success).toEqual(true);
expect(z.safeParse(a, 10).data).toEqual(10);
expect(z.safeParse(a, 11).success).toEqual(false);
});
// min;
test("z.max", () => {
const a = z.number().check(z.maximum(10));
expect(z.safeParse(a, 10).success).toEqual(true);
expect(z.safeParse(a, 10).data).toEqual(10);
expect(z.safeParse(a, 11).success).toEqual(false);
});
// gt;
test("z.gt", () => {
const a = z.number().check(z.gt(10));
expect(z.safeParse(a, 11).success).toEqual(true);
expect(z.safeParse(a, 11).data).toEqual(11);
expect(z.safeParse(a, 10).success).toEqual(false);
});
// gte;
test("z.gte", () => {
const a = z.number().check(z.gte(10));
expect(z.safeParse(a, 10).success).toEqual(true);
expect(z.safeParse(a, 10).data).toEqual(10);
expect(z.safeParse(a, 9).success).toEqual(false);
});
// min;
test("z.min", () => {
const a = z.number().check(z.minimum(10));
expect(z.safeParse(a, 10).success).toEqual(true);
expect(z.safeParse(a, 10).data).toEqual(10);
expect(z.safeParse(a, 9).success).toEqual(false);
});
// maxSize;
test("z.maxLength", () => {
const a = z.array(z.string()).check(z.maxLength(3));
expect(z.safeParse(a, ["a", "b", "c"]).success).toEqual(true);
expect(z.safeParse(a, ["a", "b", "c", "d"]).success).toEqual(false);
});
// minSize;
test("z.minLength", () => {
const a = z.array(z.string()).check(z.minLength(3));
expect(z.safeParse(a, ["a", "b"]).success).toEqual(false);
expect(z.safeParse(a, ["a", "b", "c"]).success).toEqual(true);
});
// size;
test("z.length", () => {
const a = z.array(z.string()).check(z.length(3));
expect(z.safeParse(a, ["a", "b"]).success).toEqual(false);
expect(z.safeParse(a, ["a", "b", "c"]).success).toEqual(true);
expect(z.safeParse(a, ["a", "b", "c", "d"]).success).toEqual(false);
});
// regex;
test("z.regex", () => {
const a = z.string().check(z.regex(/^aaa$/));
expect(z.safeParse(a, "aaa")).toMatchObject({ success: true, data: "aaa" });
expect(z.safeParse(a, "aa")).toMatchObject({ success: false });
});
// includes;
test("z.includes", () => {
const a = z.string().check(z.includes("asdf"));
z.parse(a, "qqqasdfqqq");
z.parse(a, "asdf");
z.parse(a, "qqqasdf");
z.parse(a, "asdfqqq");
expect(z.safeParse(a, "qqq")).toMatchObject({ success: false });
});
// startsWith;
test("z.startsWith", () => {
const a = z.string().check(z.startsWith("asdf"));
z.parse(a, "asdf");
z.parse(a, "asdfqqq");
expect(z.safeParse(a, "qqq")).toMatchObject({ success: false });
});
// endsWith;
test("z.endsWith", () => {
const a = z.string().check(z.endsWith("asdf"));
z.parse(a, "asdf");
z.parse(a, "qqqasdf");
expect(z.safeParse(a, "asdfqqq")).toMatchObject({ success: false });
});
// lowercase;
test("z.lowercase", () => {
const a = z.string().check(z.lowercase());
z.parse(a, "asdf");
expect(z.safeParse(a, "ASDF")).toMatchObject({ success: false });
});
// uppercase;
test("z.uppercase", () => {
const a = z.string().check(z.uppercase());
z.parse(a, "ASDF");
expect(z.safeParse(a, "asdf")).toMatchObject({ success: false });
});
// filename;
// fileType;
// overwrite;
test("z.overwrite", () => {
const a = z.string().check(z.overwrite((val) => val.toUpperCase()));
expect(z.safeParse(a, "asdf")).toMatchObject({ data: "ASDF" });
});
// normalize;
// trim;
// toLowerCase;
// toUpperCase;
// property
test("abort early", () => {
const schema = z.string().check(
z.refine((val) => val.length > 1),
z.refine((val) => val.length > 2, { abort: true }),
z.refine((val) => val.length > 3)
);
const data = "";
const result = z.safeParse(schema, data);
expect(result.error!.issues.length).toEqual(2);
});

View File

@@ -0,0 +1,27 @@
import type { DateArg } from "./types.js";
/**
* @name differenceInMilliseconds
* @category Millisecond Helpers
* @summary Get the number of milliseconds between the given dates.
*
* @description
* Get the number of milliseconds between the given dates.
*
* @param laterDate - The later date
* @param earlierDate - The earlier date
*
* @returns The number of milliseconds
*
* @example
* // How many milliseconds are between
* // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?
* const result = differenceInMilliseconds(
* new Date(2014, 6, 2, 12, 30, 21, 700),
* new Date(2014, 6, 2, 12, 30, 20, 600)
* )
* //=> 1100
*/
export declare function differenceInMilliseconds(
laterDate: DateArg<Date> & {},
earlierDate: DateArg<Date> & {},
): number;

View File

@@ -0,0 +1 @@
{"version":3,"file":"mechanism.d.ts","sourceRoot":"","sources":["../../../src/types-hoist/mechanism.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,IAAI,CAAC,EAAE;QACL,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;KACjC,CAAC;IAEF;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}

View File

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

View File

@@ -0,0 +1,40 @@
import { entityKind } from "../../entity.js";
import { getColumnNameAndConfig } from "../../utils.js";
import { MySqlColumn, MySqlColumnBuilder } from "./common.js";
class MySqlBinaryBuilder extends MySqlColumnBuilder {
static [entityKind] = "MySqlBinaryBuilder";
constructor(name, length) {
super(name, "string", "MySqlBinary");
this.config.length = length;
}
/** @internal */
build(table) {
return new MySqlBinary(table, this.config);
}
}
class MySqlBinary extends MySqlColumn {
static [entityKind] = "MySqlBinary";
length = this.config.length;
mapFromDriverValue(value) {
if (typeof value === "string") return value;
if (Buffer.isBuffer(value)) return value.toString();
const str = [];
for (const v of value) {
str.push(v === 49 ? "1" : "0");
}
return str.join("");
}
getSQLType() {
return this.length === void 0 ? `binary` : `binary(${this.length})`;
}
}
function binary(a, b = {}) {
const { name, config } = getColumnNameAndConfig(a, b);
return new MySqlBinaryBuilder(name, config.length);
}
export {
MySqlBinary,
MySqlBinaryBuilder,
binary
};
//# sourceMappingURL=binary.js.map

View File

@@ -0,0 +1,33 @@
import { toDate } from "./toDate.mjs";
/**
* @name isEqual
* @category Common Helpers
* @summary Are the given dates equal?
*
* @description
* Are the given dates equal?
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param dateLeft - The first date to compare
* @param dateRight - The second date to compare
*
* @returns The dates are equal
*
* @example
* // Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal?
* const result = isEqual(
* new Date(2014, 6, 2, 6, 30, 45, 0),
* new Date(2014, 6, 2, 6, 30, 45, 500)
* )
* //=> false
*/
export function isEqual(leftDate, rightDate) {
const _dateLeft = toDate(leftDate);
const _dateRight = toDate(rightDate);
return +_dateLeft === +_dateRight;
}
// Fallback for modularized imports:
export default isEqual;

View File

@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const codegen_1 = require("ajv/dist/compile/codegen");
function getDef() {
return {
keyword: "deepRequired",
type: "object",
schemaType: "array",
code(ctx) {
const { schema, data } = ctx;
const props = schema.map((jp) => (0, codegen_1._) `(${getData(jp)}) === undefined`);
ctx.fail((0, codegen_1.or)(...props));
function getData(jsonPointer) {
if (jsonPointer === "")
throw new Error("empty JSON pointer not allowed");
const segments = jsonPointer.split("/");
let x = data;
const xs = segments.map((s, i) => i ? (x = (0, codegen_1._) `${x}${(0, codegen_1.getProperty)(unescapeJPSegment(s))}`) : x);
return (0, codegen_1.and)(...xs);
}
},
metaSchema: {
type: "array",
items: { type: "string", format: "json-pointer" },
},
};
}
exports.default = getDef;
function unescapeJPSegment(s) {
return s.replace(/~1/g, "/").replace(/~0/g, "~");
}
module.exports = getDef;
//# sourceMappingURL=deepRequired.js.map

View File

@@ -0,0 +1,39 @@
{
"name": "pg-cloudflare",
"version": "1.3.0",
"description": "A socket implementation that can run on Cloudflare Workers using native TCP connections.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"license": "MIT",
"devDependencies": {
"ts-node": "^8.5.4",
"typescript": "^4.0.3"
},
"exports": {
".": {
"workerd": {
"import": "./esm/index.mjs",
"require": "./dist/index.js"
},
"default": "./dist/empty.js"
},
"./package.json": "./package.json"
},
"scripts": {
"build": "tsc",
"build:watch": "tsc --watch",
"prepublish": "yarn build",
"test": "echo e2e test in pg package"
},
"repository": {
"type": "git",
"url": "git://github.com/brianc/node-postgres.git",
"directory": "packages/pg-cloudflare"
},
"files": [
"/dist/*{js,ts,map}",
"/src",
"/esm"
],
"gitHead": "d10e09c888f94abf77382aba6f353ca665a1cf09"
}

View File

@@ -0,0 +1,32 @@
import { getDefaultOptions as getInternalDefaultOptions } from "./_lib/defaultOptions.mjs";
/**
* @name getDefaultOptions
* @category Common Helpers
* @summary Get default options.
* @pure false
*
* @description
* Returns an object that contains defaults for
* `options.locale`, `options.weekStartsOn` and `options.firstWeekContainsDate`
* arguments for all functions.
*
* You can change these with [setDefaultOptions](https://date-fns.org/docs/setDefaultOptions).
*
* @returns The default options
*
* @example
* const result = getDefaultOptions()
* //=> {}
*
* @example
* setDefaultOptions({ weekStarsOn: 1, firstWeekContainsDate: 4 })
* const result = getDefaultOptions()
* //=> { weekStarsOn: 1, firstWeekContainsDate: 4 }
*/
export function getDefaultOptions() {
return Object.assign({}, getInternalDefaultOptions());
}
// Fallback for modularized imports:
export default getDefaultOptions;

View File

@@ -0,0 +1,100 @@
declare const AUTH_OPERATIONS_TO_INSTRUMENT: string[];
declare const AUTH_ADMIN_OPERATIONS_TO_INSTRUMENT: string[];
export declare const FILTER_MAPPINGS: {
eq: string;
neq: string;
gt: string;
gte: string;
lt: string;
lte: string;
like: string;
'like(all)': string;
'like(any)': string;
ilike: string;
'ilike(all)': string;
'ilike(any)': string;
is: string;
in: string;
cs: string;
cd: string;
sr: string;
nxl: string;
sl: string;
nxr: string;
adj: string;
ov: string;
fts: string;
plfts: string;
phfts: string;
wfts: string;
not: string;
};
export declare const DB_OPERATIONS_TO_INSTRUMENT: string[];
type AuthOperationFn = (...args: unknown[]) => Promise<unknown>;
type AuthOperationName = (typeof AUTH_OPERATIONS_TO_INSTRUMENT)[number];
type AuthAdminOperationName = (typeof AUTH_ADMIN_OPERATIONS_TO_INSTRUMENT)[number];
type PostgRESTQueryOperationFn = (...args: unknown[]) => PostgRESTFilterBuilder;
export interface SupabaseClientInstance {
auth: {
admin: Record<AuthAdminOperationName, AuthOperationFn>;
} & Record<AuthOperationName, AuthOperationFn>;
}
export interface PostgRESTQueryBuilder {
[key: string]: PostgRESTQueryOperationFn;
}
export interface PostgRESTFilterBuilder {
method: string;
headers: Record<string, string>;
url: URL;
schema: string;
body: any;
}
export interface SupabaseResponse {
status?: number;
error?: {
message: string;
code?: string;
details?: unknown;
};
}
export interface SupabaseError extends Error {
code?: string;
details?: unknown;
}
export interface SupabaseBreadcrumb {
type: string;
category: string;
message: string;
data?: {
query?: string[];
body?: Record<string, unknown>;
};
}
export interface SupabaseClientConstructor {
prototype: {
from: (table: string) => PostgRESTQueryBuilder;
};
}
export interface PostgRESTProtoThenable {
then: <T>(onfulfilled?: ((value: T) => T | PromiseLike<T>) | null, onrejected?: ((reason: any) => T | PromiseLike<T>) | null) => Promise<T>;
}
/**
* Extracts the database operation type from the HTTP method and headers
* @param method - The HTTP method of the request
* @param headers - The request headers
* @returns The database operation type ('select', 'insert', 'upsert', 'update', or 'delete')
*/
export declare function extractOperation(method: string, headers?: Record<string, string>): string;
/**
* Translates Supabase filter parameters into readable method names for tracing
* @param key - The filter key from the URL search parameters
* @param query - The filter value from the URL search parameters
* @returns A string representation of the filter as a method call
*/
export declare function translateFiltersIntoMethods(key: string, query: string): string;
export declare const instrumentSupabaseClient: (supabaseClient: unknown) => void;
export declare const supabaseIntegration: (options: {
supabaseClient: any;
}) => import("../types-hoist/integration").Integration;
export {};
//# sourceMappingURL=supabase.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["c","_c","getTranslation","React","useTranslation","isComponent","description","isValidElement","ViewDescription","props","$","i18n","t0","_jsx","className","children"],"sources":["../../../src/elements/ViewDescription/index.tsx"],"sourcesContent":["'use client'\nimport type { DescriptionFunction, StaticDescription, ViewDescriptionClientProps } from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport React from 'react'\n\nimport { useTranslation } from '../../providers/Translation/index.js'\n\nexport type ViewDescriptionComponent = React.ComponentType<any>\n\ntype Description = DescriptionFunction | StaticDescription | string | ViewDescriptionComponent\n\nexport function isComponent(description: Description): description is ViewDescriptionComponent {\n return React.isValidElement(description)\n}\n\nexport function ViewDescription(props: ViewDescriptionClientProps) {\n const { i18n } = useTranslation()\n const { description } = props\n\n if (description) {\n return <div className=\"custom-view-description\">{getTranslation(description, i18n)}</div>\n }\n\n return null\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,MAAW;AAElB,SAASC,cAAc,QAAQ;AAM/B,OAAO,SAASC,YAAYC,WAAwB;EAClD,oBAAOH,KAAA,CAAMI,cAAc,CAACD,WAAA;AAC9B;AAEA,OAAO,SAAAE,gBAAAC,KAAA;EAAA,MAAAC,CAAA,GAAAT,EAAA;EACL;IAAAU;EAAA,IAAiBP,cAAA;EACjB;IAAAE;EAAA,IAAwBG,KAAA;EAAA,IAEpBH,WAAA;IAAA,IAAAM,EAAA;IAAA,IAAAF,CAAA,QAAAJ,WAAA,IAAAI,CAAA,QAAAC,IAAA;MACKC,EAAA,GAAAC,IAAA,CAAC;QAAAC,SAAA,EAAc;QAAAC,QAAA,EAA2Bb,cAAA,CAAeI,WAAA,EAAaK,IAAA;MAAA,C;;;;;;;WAAtEC,E","ignoreList":[]}

View File

@@ -0,0 +1,165 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const misc = require('./utils/misc.js');
const time = require('./utils/time.js');
/**
* Creates a new `Session` object by setting certain default parameters. If optional @param context
* is passed, the passed properties are applied to the session object.
*
* @param context (optional) additional properties to be applied to the returned session object
*
* @returns a new `Session` object
*/
function makeSession(context) {
// Both timestamp and started are in seconds since the UNIX epoch.
const startingTime = time.timestampInSeconds();
const session = {
sid: misc.uuid4(),
init: true,
timestamp: startingTime,
started: startingTime,
duration: 0,
status: 'ok',
errors: 0,
ignoreDuration: false,
toJSON: () => sessionToJSON(session),
};
if (context) {
updateSession(session, context);
}
return session;
}
/**
* Updates a session object with the properties passed in the context.
*
* Note that this function mutates the passed object and returns void.
* (Had to do this instead of returning a new and updated session because closing and sending a session
* makes an update to the session after it was passed to the sending logic.
* @see Client.captureSession )
*
* @param session the `Session` to update
* @param context the `SessionContext` holding the properties that should be updated in @param session
*/
// eslint-disable-next-line complexity
function updateSession(session, context = {}) {
if (context.user) {
if (!session.ipAddress && context.user.ip_address) {
session.ipAddress = context.user.ip_address;
}
if (!session.did && !context.did) {
session.did = context.user.id || context.user.email || context.user.username;
}
}
session.timestamp = context.timestamp || time.timestampInSeconds();
if (context.abnormal_mechanism) {
session.abnormal_mechanism = context.abnormal_mechanism;
}
if (context.ignoreDuration) {
session.ignoreDuration = context.ignoreDuration;
}
if (context.sid) {
// Good enough uuid validation. — Kamil
session.sid = context.sid.length === 32 ? context.sid : misc.uuid4();
}
if (context.init !== undefined) {
session.init = context.init;
}
if (!session.did && context.did) {
session.did = `${context.did}`;
}
if (typeof context.started === 'number') {
session.started = context.started;
}
if (session.ignoreDuration) {
session.duration = undefined;
} else if (typeof context.duration === 'number') {
session.duration = context.duration;
} else {
const duration = session.timestamp - session.started;
session.duration = duration >= 0 ? duration : 0;
}
if (context.release) {
session.release = context.release;
}
if (context.environment) {
session.environment = context.environment;
}
if (!session.ipAddress && context.ipAddress) {
session.ipAddress = context.ipAddress;
}
if (!session.userAgent && context.userAgent) {
session.userAgent = context.userAgent;
}
if (typeof context.errors === 'number') {
session.errors = context.errors;
}
if (context.status) {
session.status = context.status;
}
}
/**
* Closes a session by setting its status and updating the session object with it.
* Internally calls `updateSession` to update the passed session object.
*
* Note that this function mutates the passed session (@see updateSession for explanation).
*
* @param session the `Session` object to be closed
* @param status the `SessionStatus` with which the session was closed. If you don't pass a status,
* this function will keep the previously set status, unless it was `'ok'` in which case
* it is changed to `'exited'`.
*/
function closeSession(session, status) {
let context = {};
if (status) {
context = { status };
} else if (session.status === 'ok') {
context = { status: 'exited' };
}
updateSession(session, context);
}
/**
* Serializes a passed session object to a JSON object with a slightly different structure.
* This is necessary because the Sentry backend requires a slightly different schema of a session
* than the one the JS SDKs use internally.
*
* @param session the session to be converted
*
* @returns a JSON object of the passed session
*/
function sessionToJSON(session) {
return {
sid: `${session.sid}`,
init: session.init,
// Make sure that sec is converted to ms for date constructor
started: new Date(session.started * 1000).toISOString(),
timestamp: new Date(session.timestamp * 1000).toISOString(),
status: session.status,
errors: session.errors,
did: typeof session.did === 'number' || typeof session.did === 'string' ? `${session.did}` : undefined,
duration: session.duration,
abnormal_mechanism: session.abnormal_mechanism,
attrs: {
release: session.release,
environment: session.environment,
ip_address: session.ipAddress,
user_agent: session.userAgent,
},
};
}
exports.closeSession = closeSession;
exports.makeSession = makeSession;
exports.updateSession = updateSession;
//# sourceMappingURL=session.js.map

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 Dock = createLucideIcon("Dock", [
["path", { d: "M2 8h20", key: "d11cs7" }],
["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2", key: "18n3k1" }],
["path", { d: "M6 16h12", key: "u522kt" }]
]);
export { Dock as default };
//# sourceMappingURL=dock.js.map

View File

@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _awaitAsyncGenerator;
var _OverloadYield = require("./OverloadYield.js");
function _awaitAsyncGenerator(value) {
return new _OverloadYield.default(value, 0);
}
//# sourceMappingURL=awaitAsyncGenerator.js.map

View File

@@ -0,0 +1,3 @@
import type { CollapsibleFieldDiffClientComponent } from 'payload';
export declare const Collapsible: CollapsibleFieldDiffClientComponent;
//# sourceMappingURL=index.d.ts.map

View File

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

View File

@@ -0,0 +1,242 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const Cache = require("../Cache");
const ProgressPlugin = require("../ProgressPlugin");
/** @typedef {import("../Compiler")} Compiler */
/** @typedef {import("./PackFileCacheStrategy")} PackFileCacheStrategy */
const BUILD_DEPENDENCIES_KEY = Symbol("build dependencies key");
const PLUGIN_NAME = "IdleFileCachePlugin";
class IdleFileCachePlugin {
/**
* @param {PackFileCacheStrategy} strategy cache strategy
* @param {number} idleTimeout timeout
* @param {number} idleTimeoutForInitialStore initial timeout
* @param {number} idleTimeoutAfterLargeChanges timeout after changes
*/
constructor(
strategy,
idleTimeout,
idleTimeoutForInitialStore,
idleTimeoutAfterLargeChanges
) {
this.strategy = strategy;
this.idleTimeout = idleTimeout;
this.idleTimeoutForInitialStore = idleTimeoutForInitialStore;
this.idleTimeoutAfterLargeChanges = idleTimeoutAfterLargeChanges;
}
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply(compiler) {
const strategy = this.strategy;
const idleTimeout = this.idleTimeout;
const idleTimeoutForInitialStore = Math.min(
idleTimeout,
this.idleTimeoutForInitialStore
);
const idleTimeoutAfterLargeChanges = this.idleTimeoutAfterLargeChanges;
const resolvedPromise = Promise.resolve();
let timeSpendInBuild = 0;
let timeSpendInStore = 0;
let avgTimeSpendInStore = 0;
/** @type {Map<string | typeof BUILD_DEPENDENCIES_KEY, () => Promise<void | void[]>>} */
const pendingIdleTasks = new Map();
compiler.cache.hooks.store.tap(
{ name: PLUGIN_NAME, stage: Cache.STAGE_DISK },
(identifier, etag, data) => {
pendingIdleTasks.set(identifier, () =>
strategy.store(identifier, etag, data)
);
}
);
compiler.cache.hooks.get.tapPromise(
{ name: PLUGIN_NAME, stage: Cache.STAGE_DISK },
(identifier, etag, gotHandlers) => {
const restore = () =>
strategy.restore(identifier, etag).then((cacheEntry) => {
if (cacheEntry === undefined) {
gotHandlers.push((result, callback) => {
if (result !== undefined) {
pendingIdleTasks.set(identifier, () =>
strategy.store(identifier, etag, result)
);
}
callback();
});
} else {
return cacheEntry;
}
});
const pendingTask = pendingIdleTasks.get(identifier);
if (pendingTask !== undefined) {
pendingIdleTasks.delete(identifier);
return pendingTask().then(restore);
}
return restore();
}
);
compiler.cache.hooks.storeBuildDependencies.tap(
{ name: PLUGIN_NAME, stage: Cache.STAGE_DISK },
(dependencies) => {
pendingIdleTasks.set(BUILD_DEPENDENCIES_KEY, () =>
Promise.resolve().then(() =>
strategy.storeBuildDependencies(dependencies)
)
);
}
);
compiler.cache.hooks.shutdown.tapPromise(
{ name: PLUGIN_NAME, stage: Cache.STAGE_DISK },
() => {
if (idleTimer) {
clearTimeout(idleTimer);
idleTimer = undefined;
}
isIdle = false;
const reportProgress = ProgressPlugin.getReporter(compiler);
const jobs = [...pendingIdleTasks.values()];
if (reportProgress) reportProgress(0, "process pending cache items");
const promises = jobs.map((fn) => fn());
pendingIdleTasks.clear();
promises.push(currentIdlePromise);
const promise = Promise.all(promises);
currentIdlePromise = promise.then(() => strategy.afterAllStored());
if (reportProgress) {
currentIdlePromise = currentIdlePromise.then(() => {
reportProgress(1, "stored");
});
}
return currentIdlePromise.then(() => {
// Reset strategy
if (strategy.clear) strategy.clear();
});
}
);
/** @type {Promise<void | void[]>} */
let currentIdlePromise = resolvedPromise;
let isIdle = false;
let isInitialStore = true;
const processIdleTasks = () => {
if (isIdle) {
const startTime = Date.now();
if (pendingIdleTasks.size > 0) {
const promises = [currentIdlePromise];
const maxTime = startTime + 100;
let maxCount = 100;
for (const [filename, factory] of pendingIdleTasks) {
pendingIdleTasks.delete(filename);
promises.push(factory());
if (maxCount-- <= 0 || Date.now() > maxTime) break;
}
currentIdlePromise = Promise.all(
/** @type {Promise<void>[]} */
(promises)
);
currentIdlePromise.then(() => {
timeSpendInStore += Date.now() - startTime;
// Allow to exit the process between
idleTimer = setTimeout(processIdleTasks, 0);
idleTimer.unref();
});
return;
}
currentIdlePromise = currentIdlePromise
.then(async () => {
await strategy.afterAllStored();
timeSpendInStore += Date.now() - startTime;
avgTimeSpendInStore =
Math.max(avgTimeSpendInStore, timeSpendInStore) * 0.9 +
timeSpendInStore * 0.1;
timeSpendInStore = 0;
timeSpendInBuild = 0;
})
.catch((err) => {
const logger = compiler.getInfrastructureLogger(PLUGIN_NAME);
logger.warn(`Background tasks during idle failed: ${err.message}`);
logger.debug(err.stack);
});
isInitialStore = false;
}
};
/** @type {ReturnType<typeof setTimeout> | undefined} */
let idleTimer;
compiler.cache.hooks.beginIdle.tap(
{ name: PLUGIN_NAME, stage: Cache.STAGE_DISK },
() => {
const isLargeChange = timeSpendInBuild > avgTimeSpendInStore * 2;
if (isInitialStore && idleTimeoutForInitialStore < idleTimeout) {
compiler
.getInfrastructureLogger(PLUGIN_NAME)
.log(
`Initial cache was generated and cache will be persisted in ${
idleTimeoutForInitialStore / 1000
}s.`
);
} else if (
isLargeChange &&
idleTimeoutAfterLargeChanges < idleTimeout
) {
compiler
.getInfrastructureLogger(PLUGIN_NAME)
.log(
`Spend ${Math.round(timeSpendInBuild) / 1000}s in build and ${
Math.round(avgTimeSpendInStore) / 1000
}s in average in cache store. This is considered as large change and cache will be persisted in ${
idleTimeoutAfterLargeChanges / 1000
}s.`
);
}
idleTimer = setTimeout(
() => {
idleTimer = undefined;
isIdle = true;
resolvedPromise.then(processIdleTasks);
},
Math.min(
isInitialStore ? idleTimeoutForInitialStore : Infinity,
isLargeChange ? idleTimeoutAfterLargeChanges : Infinity,
idleTimeout
)
);
idleTimer.unref();
}
);
compiler.cache.hooks.endIdle.tap(
{ name: PLUGIN_NAME, stage: Cache.STAGE_DISK },
() => {
if (idleTimer) {
clearTimeout(idleTimer);
idleTimer = undefined;
}
isIdle = false;
}
);
compiler.hooks.done.tap(PLUGIN_NAME, (stats) => {
// 10% build overhead is ignored, as it's not cacheable
timeSpendInBuild *= 0.9;
timeSpendInBuild +=
/** @type {number} */ (stats.endTime) -
/** @type {number} */ (stats.startTime);
});
}
}
module.exports = IdleFileCachePlugin;

View File

@@ -0,0 +1,406 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GraphQLIBAN = void 0;
// Based on https://github.com/arhs/iban.js
const graphql_1 = require("graphql");
const error_js_1 = require("../error.js");
/* These are IBAN the specifications for all countries using IBAN
The key is the countrycode, the second item is the length of the IBAN,
The third item is the structure of the underlying BBAN (for validation and formatting)
*/
const IBAN_SPECIFICATIONS = {
AD: {
length: 24,
structure: 'F04F04A12',
example: 'AD1200012030200359100100',
},
AE: { length: 23, structure: 'F03F16', example: 'AE070331234567890123456' },
AL: {
length: 28,
structure: 'F08A16',
example: 'AL47212110090000000235698741',
},
AO: { length: 25, structure: 'F21', example: 'AO69123456789012345678901' },
AT: { length: 20, structure: 'F05F11', example: 'AT611904300234573201' },
AZ: {
length: 28,
structure: 'U04A20',
example: 'AZ21NABZ00000000137010001944',
},
BA: {
length: 20,
structure: 'F03F03F08F02',
example: 'BA391290079401028494',
},
BE: { length: 16, structure: 'F03F07F02', example: 'BE68539007547034' },
BF: { length: 27, structure: 'F23', example: 'BF2312345678901234567890123' },
BG: {
length: 22,
structure: 'U04F04F02A08',
example: 'BG80BNBG96611020345678',
},
BH: { length: 22, structure: 'U04A14', example: 'BH67BMAG00001299123456' },
BI: { length: 16, structure: 'F12', example: 'BI41123456789012' },
BJ: { length: 28, structure: 'F24', example: 'BJ39123456789012345678901234' },
BR: {
length: 29,
structure: 'F08F05F10U01A01',
example: 'BR9700360305000010009795493P1',
},
BY: {
length: 28,
structure: 'A04F04A16',
example: 'BY13NBRB3600900000002Z00AB00',
},
CH: { length: 21, structure: 'F05A12', example: 'CH9300762011623852957' },
CI: {
length: 28,
structure: 'U02F22',
example: 'CI70CI1234567890123456789012',
},
CM: { length: 27, structure: 'F23', example: 'CM9012345678901234567890123' },
CR: { length: 22, structure: 'F04F14', example: 'CR72012300000171549015' },
CV: { length: 25, structure: 'F21', example: 'CV30123456789012345678901' },
CY: {
length: 28,
structure: 'F03F05A16',
example: 'CY17002001280000001200527600',
},
CZ: {
length: 24,
structure: 'F04F06F10',
example: 'CZ6508000000192000145399',
},
DE: { length: 22, structure: 'F08F10', example: 'DE89370400440532013000' },
DK: { length: 18, structure: 'F04F09F01', example: 'DK5000400440116243' },
DO: {
length: 28,
structure: 'U04F20',
example: 'DO28BAGR00000001212453611324',
},
DZ: { length: 24, structure: 'F20', example: 'DZ8612345678901234567890' },
EE: {
length: 20,
structure: 'F02F02F11F01',
example: 'EE382200221020145685',
},
ES: {
length: 24,
structure: 'F04F04F01F01F10',
example: 'ES9121000418450200051332',
},
FI: { length: 18, structure: 'F06F07F01', example: 'FI2112345600000785' },
FO: { length: 18, structure: 'F04F09F01', example: 'FO6264600001631634' },
FR: {
length: 27,
structure: 'F05F05A11F02',
example: 'FR1420041010050500013M02606',
},
GB: { length: 22, structure: 'U04F06F08', example: 'GB29NWBK60161331926819' },
GE: { length: 22, structure: 'U02F16', example: 'GE29NB0000000101904917' },
GI: { length: 23, structure: 'U04A15', example: 'GI75NWBK000000007099453' },
GL: { length: 18, structure: 'F04F09F01', example: 'GL8964710001000206' },
GR: {
length: 27,
structure: 'F03F04A16',
example: 'GR1601101250000000012300695',
},
GT: {
length: 28,
structure: 'A04A20',
example: 'GT82TRAJ01020000001210029690',
},
HR: { length: 21, structure: 'F07F10', example: 'HR1210010051863000160' },
HU: {
length: 28,
structure: 'F03F04F01F15F01',
example: 'HU42117730161111101800000000',
},
IE: { length: 22, structure: 'U04F06F08', example: 'IE29AIBK93115212345678' },
IL: {
length: 23,
structure: 'F03F03F13',
example: 'IL620108000000099999999',
},
IS: {
length: 26,
structure: 'F04F02F06F10',
example: 'IS140159260076545510730339',
},
IT: {
length: 27,
structure: 'U01F05F05A12',
example: 'IT60X0542811101000000123456',
},
IQ: {
length: 23,
structure: 'U04F03A12',
example: 'IQ98NBIQ850123456789012',
},
IR: { length: 26, structure: 'F22', example: 'IR861234568790123456789012' },
JO: {
length: 30,
structure: 'A04F22',
example: 'JO15AAAA1234567890123456789012',
},
KW: {
length: 30,
structure: 'U04A22',
example: 'KW81CBKU0000000000001234560101',
},
KZ: { length: 20, structure: 'F03A13', example: 'KZ86125KZT5004100100' },
LB: {
length: 28,
structure: 'F04A20',
example: 'LB62099900000001001901229114',
},
LC: {
length: 32,
structure: 'U04F24',
example: 'LC07HEMM000100010012001200013015',
},
LI: { length: 21, structure: 'F05A12', example: 'LI21088100002324013AA' },
LT: { length: 20, structure: 'F05F11', example: 'LT121000011101001000' },
LU: { length: 20, structure: 'F03A13', example: 'LU280019400644750000' },
LV: { length: 21, structure: 'U04A13', example: 'LV80BANK0000435195001' },
MC: {
length: 27,
structure: 'F05F05A11F02',
example: 'MC5811222000010123456789030',
},
MD: { length: 24, structure: 'U02A18', example: 'MD24AG000225100013104168' },
ME: { length: 22, structure: 'F03F13F02', example: 'ME25505000012345678951' },
MG: { length: 27, structure: 'F23', example: 'MG1812345678901234567890123' },
MK: { length: 19, structure: 'F03A10F02', example: 'MK07250120000058984' },
ML: {
length: 28,
structure: 'U01F23',
example: 'ML15A12345678901234567890123',
},
MR: {
length: 27,
structure: 'F05F05F11F02',
example: 'MR1300020001010000123456753',
},
MT: {
length: 31,
structure: 'U04F05A18',
example: 'MT84MALT011000012345MTLCAST001S',
},
MU: {
length: 30,
structure: 'U04F02F02F12F03U03',
example: 'MU17BOMM0101101030300200000MUR',
},
MZ: { length: 25, structure: 'F21', example: 'MZ25123456789012345678901' },
NL: { length: 18, structure: 'U04F10', example: 'NL91ABNA0417164300' },
NO: { length: 15, structure: 'F04F06F01', example: 'NO9386011117947' },
PK: { length: 24, structure: 'U04A16', example: 'PK36SCBL0000001123456702' },
PL: {
length: 28,
structure: 'F08F16',
example: 'PL61109010140000071219812874',
},
PS: {
length: 29,
structure: 'U04A21',
example: 'PS92PALS000000000400123456702',
},
PT: {
length: 25,
structure: 'F04F04F11F02',
example: 'PT50000201231234567890154',
},
QA: {
length: 29,
structure: 'U04A21',
example: 'QA30AAAA123456789012345678901',
},
RO: { length: 24, structure: 'U04A16', example: 'RO49AAAA1B31007593840000' },
RS: { length: 22, structure: 'F03F13F02', example: 'RS35260005601001611379' },
SA: { length: 24, structure: 'F02A18', example: 'SA0380000000608010167519' },
SC: {
length: 31,
structure: 'U04F04F16U03',
example: 'SC18SSCB11010000000000001497USD',
},
SE: {
length: 24,
structure: 'F03F16F01',
example: 'SE4550000000058398257466',
},
SI: { length: 19, structure: 'F05F08F02', example: 'SI56263300012039086' },
SK: {
length: 24,
structure: 'F04F06F10',
example: 'SK3112000000198742637541',
},
SM: {
length: 27,
structure: 'U01F05F05A12',
example: 'SM86U0322509800000000270100',
},
SN: {
length: 28,
structure: 'U01F23',
example: 'SN52A12345678901234567890123',
},
ST: {
length: 25,
structure: 'F08F11F02',
example: 'ST68000100010051845310112',
},
SV: {
length: 28,
structure: 'U04F20',
example: 'SV62CENR00000000000000700025',
},
TL: {
length: 23,
structure: 'F03F14F02',
example: 'TL380080012345678910157',
},
TN: {
length: 24,
structure: 'F02F03F13F02',
example: 'TN5910006035183598478831',
},
TR: {
length: 26,
structure: 'F05F01A16',
example: 'TR330006100519786457841326',
},
UA: {
length: 29,
structure: 'F25',
example: 'UA511234567890123456789012345',
},
VA: { length: 22, structure: 'F18', example: 'VA59001123000012345678' },
VG: { length: 24, structure: 'U04F16', example: 'VG96VPVG0000012345678901' },
XK: { length: 20, structure: 'F04F10F02', example: 'XK051212012345678906' },
};
const A = 'A'.charCodeAt(0);
const Z = 'Z'.charCodeAt(0);
function parseStructure(structure) {
// split in blocks of 3 chars
const regex = structure.match(/(.{3})/g).map(function (block) {
// parse each structure block (1-char + 2-digits)
let format;
const pattern = block.slice(0, 1);
const repeats = parseInt(block.slice(1), 10);
switch (pattern) {
case 'A':
format = '0-9A-Za-z';
break;
case 'B':
format = '0-9A-Z';
break;
case 'C':
format = 'A-Za-z';
break;
case 'F':
format = '0-9';
break;
case 'L':
format = 'a-z';
break;
case 'U':
format = 'A-Z';
break;
case 'W':
format = '0-9a-z';
break;
}
return '([' + format + ']{' + repeats + '})';
});
return /*#__PURE__*/ new RegExp('^' + regex.join('') + '$');
}
/**
* Prepare an IBAN for mod 97 computation by moving the first 4 chars to the end and transforming the letters to
* numbers (A = 10, B = 11, ..., Z = 35), as specified in ISO13616.
*
*/
function iso13616Prepare(iban) {
iban = iban.toUpperCase();
iban = iban.substr(4) + iban.substr(0, 4);
return iban
.split('')
.map(function (n) {
const code = n.charCodeAt(0);
if (code >= A && code <= Z) {
// A = 10, B = 11, ... Z = 35
return code - A + 10;
}
else {
return n;
}
})
.join('');
}
/**
* Calculates the MOD 97 10 of the passed IBAN as specified in ISO7064.
*
* @param iban
* @returns {number}
*/
function iso7064Mod97_10(iban) {
let remainder = iban;
let block;
while (remainder.length > 2) {
block = remainder.slice(0, 9);
remainder = (parseInt(block, 10) % 97) + remainder.slice(block.length);
}
return parseInt(remainder, 10) % 97;
}
function _testIBAN(iban, countryCode, structure) {
return (structure.length === iban.length &&
countryCode === iban.slice(0, 2) &&
parseStructure(structure.structure).test(iban.slice(4)) &&
iso7064Mod97_10(iso13616Prepare(iban)) === 1);
}
function validate(iban) {
// Make uppercase and remove whitespace for matching
iban = iban.toUpperCase().replace(/\s+/g, '');
const countryCode = iban.slice(0, 2);
const countryStructure = IBAN_SPECIFICATIONS[countryCode];
return !!countryStructure && _testIBAN(iban, countryCode, countryStructure);
}
exports.GraphQLIBAN = new graphql_1.GraphQLScalarType({
name: `IBAN`,
description: `A field whose value is an International Bank Account Number (IBAN): https://en.wikipedia.org/wiki/International_Bank_Account_Number.`,
serialize(value) {
if (typeof value !== 'string') {
throw (0, error_js_1.createGraphQLError)(`Value is not string: ${value}`);
}
if (!validate(value)) {
throw (0, error_js_1.createGraphQLError)(`Value is not a valid IBAN: ${value}`);
}
return value;
},
parseValue(value) {
if (typeof value !== 'string') {
throw (0, error_js_1.createGraphQLError)(`Value is not string: ${value}`);
}
if (!validate(value)) {
throw (0, error_js_1.createGraphQLError)(`Value is not a valid IBAN: ${value}`);
}
return value;
},
parseLiteral(ast) {
if (ast.kind !== graphql_1.Kind.STRING) {
throw (0, error_js_1.createGraphQLError)(`Can only validate strings as IBANs but got a: ${ast.kind}`, {
nodes: ast,
});
}
if (!validate(ast.value)) {
throw (0, error_js_1.createGraphQLError)(`Value is not a valid IBAN: ${ast.value}`);
}
return ast.value;
},
extensions: {
codegenScalarType: 'string',
jsonSchema: {
type: 'string',
},
},
});

View File

@@ -0,0 +1,31 @@
"use strict";
var _utils = require("./utils.js");
var _placeholders = require("./placeholders.js");
var _core = require("./core.js");
const defineType = (0, _utils.defineAliasedType)("Miscellaneous");
defineType("Noop", {
visitor: []
});
defineType("Placeholder", {
visitor: [],
builder: ["expectedNode", "name"],
fields: Object.assign({
name: {
validate: (0, _utils.assertNodeType)("Identifier")
},
expectedNode: {
validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS)
}
}, (0, _core.patternLikeCommon)())
});
defineType("V8IntrinsicIdentifier", {
builder: ["name"],
fields: {
name: {
validate: (0, _utils.assertValueType)("string")
}
}
});
//# sourceMappingURL=misc.js.map

View File

@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createUnionType = createUnionType;
var _t = require("@babel/types");
const {
createFlowUnionType,
createTSUnionType,
createUnionTypeAnnotation,
isFlowType,
isTSType
} = _t;
function createUnionType(types) {
if (types.every(v => isFlowType(v))) {
if (createFlowUnionType) {
return createFlowUnionType(types);
}
return createUnionTypeAnnotation(types);
} else if (types.every(v => isTSType(v))) {
if (createTSUnionType) {
return createTSUnionType(types);
}
}
}
//# sourceMappingURL=util.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/SearchFilter/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAE1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAGnD,OAAO,cAAc,CAAA;AAIrB,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBAyDpD"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"injectLoader.js","sources":["../../../src/sdk/injectLoader.ts"],"sourcesContent":["import type { InstrumentationConfig } from '@apm-js-collab/code-transformer';\nimport ModulePatch from '@apm-js-collab/tracing-hooks';\nimport { debug, GLOBAL_OBJ } from '@sentry/core';\nimport * as moduleModule from 'module';\nimport { supportsEsmLoaderHooks } from '../utils/detection';\n\nlet instrumentationConfigs: InstrumentationConfig[] | undefined;\n\n/**\n * Add an instrumentation config to be used by the injection loader.\n */\nexport function addInstrumentationConfig(config: InstrumentationConfig): void {\n if (!supportsEsmLoaderHooks()) {\n return;\n }\n\n if (!instrumentationConfigs) {\n instrumentationConfigs = [];\n }\n\n instrumentationConfigs.push(config);\n\n GLOBAL_OBJ._sentryInjectLoaderHookRegister = () => {\n if (GLOBAL_OBJ._sentryInjectLoaderHookRegistered) {\n return;\n }\n\n GLOBAL_OBJ._sentryInjectLoaderHookRegistered = true;\n\n const instrumentations = instrumentationConfigs || [];\n\n // Patch require to support CJS modules\n const requirePatch = new ModulePatch({ instrumentations });\n requirePatch.patch();\n\n // Add ESM loader to support ESM modules\n try {\n // @ts-expect-error register is available in these versions\n moduleModule.register('@apm-js-collab/tracing-hooks/hook.mjs', import.meta.url, {\n data: { instrumentations },\n });\n } catch (error) {\n debug.warn(\"Failed to register '@apm-js-collab/tracing-hooks' hook\", error);\n }\n };\n}\n"],"names":["supportsEsmLoaderHooks","GLOBAL_OBJ","ModulePatch","debug"],"mappings":";;;;;;;;AAMA,IAAI,sBAAsB;;AAE1B;AACA;AACA;AACO,SAAS,wBAAwB,CAAC,MAAM,EAA+B;AAC9E,EAAE,IAAI,CAACA,gCAAsB,EAAE,EAAE;AACjC,IAAI;AACJ,EAAE;;AAEF,EAAE,IAAI,CAAC,sBAAsB,EAAE;AAC/B,IAAI,sBAAA,GAAyB,EAAE;AAC/B,EAAE;;AAEF,EAAE,sBAAsB,CAAC,IAAI,CAAC,MAAM,CAAC;;AAErC,EAAEC,eAAU,CAAC,+BAAA,GAAkC,MAAM;AACrD,IAAI,IAAIA,eAAU,CAAC,iCAAiC,EAAE;AACtD,MAAM;AACN,IAAI;;AAEJ,IAAIA,eAAU,CAAC,iCAAA,GAAoC,IAAI;;AAEvD,IAAI,MAAM,gBAAA,GAAmB,sBAAA,IAA0B,EAAE;;AAEzD;AACA,IAAI,MAAM,eAAe,IAAIC,mBAAW,CAAC,EAAE,gBAAA,EAAkB,CAAC;AAC9D,IAAI,YAAY,CAAC,KAAK,EAAE;;AAExB;AACA,IAAI,IAAI;AACR;AACA,MAAM,YAAY,CAAC,QAAQ,CAAC,uCAAuC,EAAE,qQAAe,EAAE;AACtF,QAAQ,IAAI,EAAE,EAAE,gBAAA,EAAkB;AAClC,OAAO,CAAC;AACR,IAAI,CAAA,CAAE,OAAO,KAAK,EAAE;AACpB,MAAMC,UAAK,CAAC,IAAI,CAAC,wDAAwD,EAAE,KAAK,CAAC;AACjF,IAAI;AACJ,EAAE,CAAC;AACH;;;;"}

View File

@@ -0,0 +1,34 @@
import { addMinutes } from "./addMinutes.js";
/**
* The {@link subMinutes} function options.
*/
/**
* @name subMinutes
* @category Minute Helpers
* @summary Subtract the specified number of minutes from the given date.
*
* @description
* Subtract the specified number of minutes from the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param amount - The amount of minutes to be subtracted.
* @param options - An object with options
*
* @returns The new date with the minutes subtracted
*
* @example
* // Subtract 30 minutes from 10 July 2014 12:00:00:
* const result = subMinutes(new Date(2014, 6, 10, 12, 0), 30)
* //=> Thu Jul 10 2014 11:30:00
*/
export function subMinutes(date, amount, options) {
return addMinutes(date, -amount, options);
}
// Fallback for modularized imports:
export default subMinutes;

View File

@@ -0,0 +1 @@
{"version":3,"file":"with-options.js","names":["options"],"sources":["../../../src/rest/helpers/with-options.ts"],"sourcesContent":["import type { RequestTransformer } from '../../index.js';\nimport type { RestCommand } from '../types.js';\n\n/**\n * Add arbitrary options to a fetch request\n *\n * @param getOptions\n * @param onRequest\n *\n * @returns\n */\nexport function withOptions<Schema, Output>(\n\tgetOptions: RestCommand<Output, Schema>,\n\textraOptions: RequestTransformer | Partial<RequestInit>,\n): RestCommand<Output, Schema> {\n\treturn () => {\n\t\tconst options = getOptions();\n\n\t\tif (typeof extraOptions === 'function') {\n\t\t\toptions.onRequest = extraOptions;\n\t\t} else {\n\t\t\toptions.onRequest = (options) => ({\n\t\t\t\t...options,\n\t\t\t\t...extraOptions,\n\t\t\t});\n\t\t}\n\n\t\treturn options;\n\t};\n}\n"],"mappings":"AAWA,SAAgB,EACf,EACA,EAC8B,CAC9B,UAAa,CACZ,IAAM,EAAU,GAAY,CAW5B,OATI,OAAO,GAAiB,WAC3B,EAAQ,UAAY,EAEpB,EAAQ,UAAa,IAAa,CACjC,GAAGA,EACH,GAAG,EACH,EAGK"}

View File

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

View File

@@ -0,0 +1,206 @@
'use strict';
const $ = exports;
const el = require('./elements');
const noop = v => v;
function toPrompt(type, args, opts={}) {
return new Promise((res, rej) => {
const p = new el[type](args);
const onAbort = opts.onAbort || noop;
const onSubmit = opts.onSubmit || noop;
const onExit = opts.onExit || noop;
p.on('state', args.onState || noop);
p.on('submit', x => res(onSubmit(x)));
p.on('exit', x => res(onExit(x)));
p.on('abort', x => rej(onAbort(x)));
});
}
/**
* Text prompt
* @param {string} args.message Prompt message to display
* @param {string} [args.initial] Default string value
* @param {string} [args.style="default"] Render style ('default', 'password', 'invisible')
* @param {function} [args.onState] On state change callback
* @param {function} [args.validate] Function to validate user input
* @param {Stream} [args.stdin] The Readable stream to listen to
* @param {Stream} [args.stdout] The Writable stream to write readline data to
* @returns {Promise} Promise with user input
*/
$.text = args => toPrompt('TextPrompt', args);
/**
* Password prompt with masked input
* @param {string} args.message Prompt message to display
* @param {string} [args.initial] Default string value
* @param {function} [args.onState] On state change callback
* @param {function} [args.validate] Function to validate user input
* @param {Stream} [args.stdin] The Readable stream to listen to
* @param {Stream} [args.stdout] The Writable stream to write readline data to
* @returns {Promise} Promise with user input
*/
$.password = args => {
args.style = 'password';
return $.text(args);
};
/**
* Prompt where input is invisible, like sudo
* @param {string} args.message Prompt message to display
* @param {string} [args.initial] Default string value
* @param {function} [args.onState] On state change callback
* @param {function} [args.validate] Function to validate user input
* @param {Stream} [args.stdin] The Readable stream to listen to
* @param {Stream} [args.stdout] The Writable stream to write readline data to
* @returns {Promise} Promise with user input
*/
$.invisible = args => {
args.style = 'invisible';
return $.text(args);
};
/**
* Number prompt
* @param {string} args.message Prompt message to display
* @param {number} args.initial Default number value
* @param {function} [args.onState] On state change callback
* @param {number} [args.max] Max value
* @param {number} [args.min] Min value
* @param {string} [args.style="default"] Render style ('default', 'password', 'invisible')
* @param {Boolean} [opts.float=false] Parse input as floats
* @param {Number} [opts.round=2] Round floats to x decimals
* @param {Number} [opts.increment=1] Number to increment by when using arrow-keys
* @param {function} [args.validate] Function to validate user input
* @param {Stream} [args.stdin] The Readable stream to listen to
* @param {Stream} [args.stdout] The Writable stream to write readline data to
* @returns {Promise} Promise with user input
*/
$.number = args => toPrompt('NumberPrompt', args);
/**
* Date prompt
* @param {string} args.message Prompt message to display
* @param {number} args.initial Default number value
* @param {function} [args.onState] On state change callback
* @param {number} [args.max] Max value
* @param {number} [args.min] Min value
* @param {string} [args.style="default"] Render style ('default', 'password', 'invisible')
* @param {Boolean} [opts.float=false] Parse input as floats
* @param {Number} [opts.round=2] Round floats to x decimals
* @param {Number} [opts.increment=1] Number to increment by when using arrow-keys
* @param {function} [args.validate] Function to validate user input
* @param {Stream} [args.stdin] The Readable stream to listen to
* @param {Stream} [args.stdout] The Writable stream to write readline data to
* @returns {Promise} Promise with user input
*/
$.date = args => toPrompt('DatePrompt', args);
/**
* Classic yes/no prompt
* @param {string} args.message Prompt message to display
* @param {boolean} [args.initial=false] Default value
* @param {function} [args.onState] On state change callback
* @param {Stream} [args.stdin] The Readable stream to listen to
* @param {Stream} [args.stdout] The Writable stream to write readline data to
* @returns {Promise} Promise with user input
*/
$.confirm = args => toPrompt('ConfirmPrompt', args);
/**
* List prompt, split intput string by `seperator`
* @param {string} args.message Prompt message to display
* @param {string} [args.initial] Default string value
* @param {string} [args.style="default"] Render style ('default', 'password', 'invisible')
* @param {string} [args.separator] String separator
* @param {function} [args.onState] On state change callback
* @param {Stream} [args.stdin] The Readable stream to listen to
* @param {Stream} [args.stdout] The Writable stream to write readline data to
* @returns {Promise} Promise with user input, in form of an `Array`
*/
$.list = args => {
const sep = args.separator || ',';
return toPrompt('TextPrompt', args, {
onSubmit: str => str.split(sep).map(s => s.trim())
});
};
/**
* Toggle/switch prompt
* @param {string} args.message Prompt message to display
* @param {boolean} [args.initial=false] Default value
* @param {string} [args.active="on"] Text for `active` state
* @param {string} [args.inactive="off"] Text for `inactive` state
* @param {function} [args.onState] On state change callback
* @param {Stream} [args.stdin] The Readable stream to listen to
* @param {Stream} [args.stdout] The Writable stream to write readline data to
* @returns {Promise} Promise with user input
*/
$.toggle = args => toPrompt('TogglePrompt', args);
/**
* Interactive select prompt
* @param {string} args.message Prompt message to display
* @param {Array} args.choices Array of choices objects `[{ title, value }, ...]`
* @param {number} [args.initial] Index of default value
* @param {String} [args.hint] Hint to display
* @param {function} [args.onState] On state change callback
* @param {Stream} [args.stdin] The Readable stream to listen to
* @param {Stream} [args.stdout] The Writable stream to write readline data to
* @returns {Promise} Promise with user input
*/
$.select = args => toPrompt('SelectPrompt', args);
/**
* Interactive multi-select / autocompleteMultiselect prompt
* @param {string} args.message Prompt message to display
* @param {Array} args.choices Array of choices objects `[{ title, value, [selected] }, ...]`
* @param {number} [args.max] Max select
* @param {string} [args.hint] Hint to display user
* @param {Number} [args.cursor=0] Cursor start position
* @param {function} [args.onState] On state change callback
* @param {Stream} [args.stdin] The Readable stream to listen to
* @param {Stream} [args.stdout] The Writable stream to write readline data to
* @returns {Promise} Promise with user input
*/
$.multiselect = args => {
args.choices = [].concat(args.choices || []);
const toSelected = items => items.filter(item => item.selected).map(item => item.value);
return toPrompt('MultiselectPrompt', args, {
onAbort: toSelected,
onSubmit: toSelected
});
};
$.autocompleteMultiselect = args => {
args.choices = [].concat(args.choices || []);
const toSelected = items => items.filter(item => item.selected).map(item => item.value);
return toPrompt('AutocompleteMultiselectPrompt', args, {
onAbort: toSelected,
onSubmit: toSelected
});
};
const byTitle = (input, choices) => Promise.resolve(
choices.filter(item => item.title.slice(0, input.length).toLowerCase() === input.toLowerCase())
);
/**
* Interactive auto-complete prompt
* @param {string} args.message Prompt message to display
* @param {Array} args.choices Array of auto-complete choices objects `[{ title, value }, ...]`
* @param {Function} [args.suggest] Function to filter results based on user input. Defaults to sort by `title`
* @param {number} [args.limit=10] Max number of results to show
* @param {string} [args.style="default"] Render style ('default', 'password', 'invisible')
* @param {String} [args.initial] Index of the default value
* @param {boolean} [opts.clearFirst] The first ESCAPE keypress will clear the input
* @param {String} [args.fallback] Fallback message - defaults to initial value
* @param {function} [args.onState] On state change callback
* @param {Stream} [args.stdin] The Readable stream to listen to
* @param {Stream} [args.stdout] The Writable stream to write readline data to
* @returns {Promise} Promise with user input
*/
$.autocomplete = args => {
args.suggest = args.suggest || byTitle;
args.choices = [].concat(args.choices || []);
return toPrompt('AutocompletePrompt', args);
};

View File

@@ -0,0 +1,22 @@
/**
* @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 PictureInPicture = createLucideIcon("PictureInPicture", [
[
"path",
{
d: "M8 4.5v5H3m-1-6 6 6m13 0v-3c0-1.16-.84-2-2-2h-7m-9 9v2c0 1.05.95 2 2 2h3",
key: "bcd8fb"
}
],
["rect", { width: "10", height: "7", x: "12", y: "13.5", ry: "2", key: "136fx3" }]
]);
export { PictureInPicture as default };
//# sourceMappingURL=picture-in-picture.js.map

View File

@@ -0,0 +1,63 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var varchar_exports = {};
__export(varchar_exports, {
MySqlVarChar: () => MySqlVarChar,
MySqlVarCharBuilder: () => MySqlVarCharBuilder,
varchar: () => varchar
});
module.exports = __toCommonJS(varchar_exports);
var import_entity = require("../../entity.cjs");
var import_utils = require("../../utils.cjs");
var import_common = require("./common.cjs");
class MySqlVarCharBuilder extends import_common.MySqlColumnBuilder {
static [import_entity.entityKind] = "MySqlVarCharBuilder";
/** @internal */
constructor(name, config) {
super(name, "string", "MySqlVarChar");
this.config.length = config.length;
this.config.enum = config.enum;
}
/** @internal */
build(table) {
return new MySqlVarChar(
table,
this.config
);
}
}
class MySqlVarChar extends import_common.MySqlColumn {
static [import_entity.entityKind] = "MySqlVarChar";
length = this.config.length;
enumValues = this.config.enum;
getSQLType() {
return this.length === void 0 ? `varchar` : `varchar(${this.length})`;
}
}
function varchar(a, b) {
const { name, config } = (0, import_utils.getColumnNameAndConfig)(a, b);
return new MySqlVarCharBuilder(name, config);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
MySqlVarChar,
MySqlVarCharBuilder,
varchar
});
//# sourceMappingURL=varchar.cjs.map

View File

@@ -0,0 +1,6 @@
import type AjvCore from "../core";
import type { AnyValidateFunction } from "../types";
declare function standaloneCode(ajv: AjvCore, refsOrFunc?: {
[K in string]?: string;
} | AnyValidateFunction): string;
export default standaloneCode;

View File

@@ -0,0 +1,132 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.mjs";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.mjs";
const matchOrdinalNumberPattern = /^(\d+)\.?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,
abbreviated: /^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,
wide: /^(før Kristus|før vår tid|etter Kristus|vår tid)/i,
};
const parseEraPatterns = {
any: [/^f/i, /^e/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^q[1234]/i,
wide: /^[1234](\.)? kvartal/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[jfmasond]/i,
abbreviated: /^(jan|feb|mars?|apr|mai|juni?|juli?|aug|sep|okt|nov|des)\.?/i,
wide: /^(januar|februar|mars|april|mai|juni|juli|august|september|oktober|november|desember)/i,
};
const parseMonthPatterns = {
narrow: [
/^j/i,
/^f/i,
/^m/i,
/^a/i,
/^m/i,
/^j/i,
/^j/i,
/^a/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
any: [
/^ja/i,
/^f/i,
/^mar/i,
/^ap/i,
/^mai/i,
/^jun/i,
/^jul/i,
/^aug/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
};
const matchDayPatterns = {
narrow: /^[smtofl]/i,
short: /^(sø|ma|ti|on|to|fr|lø)/i,
abbreviated: /^(søn|man|tir|ons|tor|fre|lør)/i,
wide: /^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i,
};
const parseDayPatterns = {
any: [/^s/i, /^m/i, /^ti/i, /^o/i, /^to/i, /^f/i, /^l/i],
};
const matchDayPeriodPatterns = {
narrow:
/^(midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten)|[ap])/i,
any: /^([ap]\.?\s?m\.?|midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^a(\.?\s?m\.?)?$/i,
pm: /^p(\.?\s?m\.?)?$/i,
midnight: /^midn/i,
noon: /^midd/i,
morning: /morgen/i,
afternoon: /ettermiddag/i,
evening: /kveld/i,
night: /natt/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,142 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const util = __importStar(require("../core/util.cjs"));
const error = () => {
const Sizable = {
string: { unit: "حرف", verb: "أن يحوي" },
file: { unit: "بايت", verb: "أن يحوي" },
array: { unit: "عنصر", verb: "أن يحوي" },
set: { unit: "عنصر", verb: "أن يحوي" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "number";
}
case "object": {
if (Array.isArray(data)) {
return "array";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "مدخل",
email: "بريد إلكتروني",
url: "رابط",
emoji: "إيموجي",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "تاريخ ووقت بمعيار ISO",
date: "تاريخ بمعيار ISO",
time: "وقت بمعيار ISO",
duration: "مدة بمعيار ISO",
ipv4: "عنوان IPv4",
ipv6: "عنوان IPv6",
cidrv4: "مدى عناوين بصيغة IPv4",
cidrv6: "مدى عناوين بصيغة IPv6",
base64: "نَص بترميز base64-encoded",
base64url: "نَص بترميز base64url-encoded",
json_string: "نَص على هيئة JSON",
e164: "رقم هاتف بمعيار E.164",
jwt: "JWT",
template_literal: "مدخل",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `مدخلات غير مقبولة: يفترض إدخال ${issue.expected}، ولكن تم إدخال ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `مدخلات غير مقبولة: يفترض إدخال ${util.stringifyPrimitive(issue.values[0])}`;
return `اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return ` أكبر من اللازم: يفترض أن تكون ${issue.origin ?? "القيمة"} ${adj} ${issue.maximum.toString()} ${sizing.unit ?? "عنصر"}`;
return `أكبر من اللازم: يفترض أن تكون ${issue.origin ?? "القيمة"} ${adj} ${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `أصغر من اللازم: يفترض لـ ${issue.origin} أن يكون ${adj} ${issue.minimum.toString()} ${sizing.unit}`;
}
return `أصغر من اللازم: يفترض لـ ${issue.origin} أن يكون ${adj} ${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `نَص غير مقبول: يجب أن يبدأ بـ "${issue.prefix}"`;
if (_issue.format === "ends_with")
return `نَص غير مقبول: يجب أن ينتهي بـ "${_issue.suffix}"`;
if (_issue.format === "includes")
return `نَص غير مقبول: يجب أن يتضمَّن "${_issue.includes}"`;
if (_issue.format === "regex")
return `نَص غير مقبول: يجب أن يطابق النمط ${_issue.pattern}`;
return `${Nouns[_issue.format] ?? issue.format} غير مقبول`;
}
case "not_multiple_of":
return `رقم غير مقبول: يجب أن يكون من مضاعفات ${issue.divisor}`;
case "unrecognized_keys":
return `معرف${issue.keys.length > 1 ? "ات" : ""} غريب${issue.keys.length > 1 ? "ة" : ""}: ${util.joinValues(issue.keys, "، ")}`;
case "invalid_key":
return `معرف غير مقبول في ${issue.origin}`;
case "invalid_union":
return "مدخل غير مقبول";
case "invalid_element":
return `مدخل غير مقبول في ${issue.origin}`;
default:
return "مدخل غير مقبول";
}
};
};
function default_1() {
return {
localeError: error(),
};
}

View File

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

View File

@@ -0,0 +1,25 @@
'use strict'
const { Suite } = require('benchmark')
const { createWarning } = require('..')
const err1 = createWarning({
name: 'TestWarning',
code: 'TST_ERROR_CODE_1',
message: 'message'
})
const err2 = createWarning({
name: 'TestWarning',
code: 'TST_ERROR_CODE_2',
message: 'message'
})
new Suite()
.add('warn', function () {
err1()
err2()
})
.on('cycle', function (event) {
console.log(String(event.target))
})
.run()

View File

@@ -0,0 +1 @@
{"version":3,"file":"virtual-stats.js","sourceRoot":"","sources":["../src/virtual-stats.ts"],"names":[],"mappings":";;;;;;AASA,0DAAkC;AAElC,MAAa,YAAY;IAMvB,YAAmB,MAAM;QACvB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;YACxB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE;gBACtD,SAAS;aACV;YACD,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;SACzB;IACH,CAAC;IAKO,kBAAkB,CAAC,QAAQ;QACjC,OAAO,CAAE,IAAY,CAAC,IAAI,GAAG,mBAAS,CAAC,MAAM,CAAC,KAAK,QAAQ,CAAC;IAC9D,CAAC;IAEM,WAAW;QAChB,OAAO,IAAI,CAAC,kBAAkB,CAAC,mBAAS,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC;IAEM,MAAM;QACX,OAAO,IAAI,CAAC,kBAAkB,CAAC,mBAAS,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC;IAEM,aAAa;QAClB,OAAO,IAAI,CAAC,kBAAkB,CAAC,mBAAS,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC;IAEM,iBAAiB;QACtB,OAAO,IAAI,CAAC,kBAAkB,CAAC,mBAAS,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC;IAEM,cAAc;QACnB,OAAO,IAAI,CAAC,kBAAkB,CAAC,mBAAS,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC;IAEM,MAAM;QACX,OAAO,IAAI,CAAC,kBAAkB,CAAC,mBAAS,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC;IAEM,QAAQ;QACb,OAAO,IAAI,CAAC,kBAAkB,CAAC,mBAAS,CAAC,QAAQ,CAAC,CAAC;IACrD,CAAC;CACF;AAjDD,oCAiDC"}

View File

@@ -0,0 +1,35 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.indexFs = exports.splitTwoLevels = void 0;
function splitTwoLevels(functionName) {
const memberParts = functionName.split('.');
if (memberParts.length > 1) {
if (memberParts.length !== 2)
throw Error(`Invalid member function name ${functionName}`);
return memberParts;
}
else {
return [functionName];
}
}
exports.splitTwoLevels = splitTwoLevels;
function indexFs(fs, member) {
if (!member)
throw new Error(JSON.stringify({ member }));
const splitResult = splitTwoLevels(member);
const [functionName1, functionName2] = splitResult;
if (functionName2) {
return {
objectToPatch: fs[functionName1],
functionNameToPatch: functionName2,
};
}
else {
return {
objectToPatch: fs,
functionNameToPatch: functionName1,
};
}
}
exports.indexFs = indexFs;
//# sourceMappingURL=utils.js.map

View File

@@ -0,0 +1 @@
module.exports={C:{"5":0.03614,"43":0.02008,"115":0.09636,"128":0.00803,"136":0.00402,"140":0.01606,"142":0.00402,"143":0.00402,"144":0.01606,"145":0.24492,"146":0.38143,"147":0.00402,_:"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 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 78 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 137 138 139 141 148 149 3.5 3.6"},D:{"45":0.00402,"47":0.00402,"48":0.00803,"49":0.00402,"52":0.00402,"53":0.00803,"55":0.00402,"56":0.00402,"57":0.00402,"58":0.00402,"69":0.04818,"70":0.00402,"73":0.00402,"78":0.00402,"79":0.02811,"80":0.00402,"81":0.00803,"83":0.00803,"85":0.00803,"86":0.01205,"87":0.02811,"91":0.00803,"92":0.00402,"93":0.00803,"97":0.01205,"98":0.04818,"99":0.01606,"101":0.01606,"102":0.00803,"103":0.08432,"104":0.04417,"105":0.42158,"106":0.18068,"107":0.30916,"108":0.12848,"109":0.81505,"110":0.14053,"111":0.20477,"112":0.89535,"113":0.01205,"114":0.18469,"115":0.04818,"116":0.10841,"117":0.07227,"118":0.06023,"119":0.02008,"120":0.40552,"121":0.05621,"122":0.24492,"123":0.15257,"124":0.15257,"125":0.47377,"126":0.63839,"127":0.22083,"128":0.0803,"129":0.10841,"130":0.16863,"131":0.22886,"132":0.07227,"133":0.25696,"134":0.20477,"135":0.06023,"136":0.03614,"137":0.07629,"138":0.1606,"139":6.03455,"140":0.14856,"141":0.16863,"142":4.15553,"143":6.51233,"144":0.05621,"145":0.00803,_:"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 46 50 51 54 59 60 61 62 63 64 65 66 67 68 71 72 74 75 76 77 84 88 89 90 94 95 96 100 146"},F:{"92":0.00803,"93":0.09636,"95":0.00803,"124":0.18068,"125":0.07629,_:"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 94 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:{"18":0.00402,"92":0.01606,"109":0.02008,"113":0.00402,"114":0.00803,"120":0.04015,"122":0.00803,"126":0.00803,"127":0.00803,"128":0.00402,"129":0.00402,"130":0.00803,"131":0.02008,"132":0.00803,"133":0.01205,"134":0.01205,"135":0.01205,"136":0.01205,"137":0.01205,"138":0.02409,"139":0.02409,"140":0.04417,"141":0.04417,"142":0.69058,"143":1.85092,_:"12 13 14 15 16 17 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 115 116 117 118 119 121 123 124 125"},E:{"14":0.00402,_:"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.1 15.2-15.3 15.4 15.5 16.0 16.4 17.0 26.3","13.1":0.00803,"14.1":0.01205,"15.6":0.03212,"16.1":0.00803,"16.2":0.00402,"16.3":0.00803,"16.5":0.00402,"16.6":0.04417,"17.1":0.02409,"17.2":0.00402,"17.3":0.00402,"17.4":0.00803,"17.5":0.01205,"17.6":0.03614,"18.0":0.00402,"18.1":0.00803,"18.2":0.00803,"18.3":0.02008,"18.4":0.01205,"18.5-18.6":0.04818,"26.0":0.02811,"26.1":0.12848,"26.2":0.03212},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00304,"5.0-5.1":0.00076,"6.0-6.1":0.00076,"7.0-7.1":0.00456,"8.1-8.4":0,"9.0-9.2":0.00152,"9.3":0.00532,"10.0-10.2":0,"10.3":0.01293,"11.0-11.2":0.09661,"11.3-11.4":0.00228,"12.0-12.1":0.00228,"12.2-12.5":0.04032,"13.0-13.1":0,"13.2":0.00913,"13.3":0.00228,"13.4-13.7":0.00913,"14.0-14.4":0.01902,"14.5-14.8":0.01902,"15.0-15.1":0.01521,"15.2-15.3":0.01521,"15.4":0.01978,"15.5":0.01978,"15.6-15.8":0.26852,"16.0":0.03347,"16.1":0.05401,"16.2":0.03119,"16.3":0.05173,"16.4":0.01445,"16.5":0.02358,"16.6-16.7":0.28906,"17.0":0.01826,"17.1":0.02662,"17.2":0.02434,"17.3":0.03423,"17.4":0.0639,"17.5":0.10117,"17.6-17.7":0.21604,"18.0":0.06466,"18.1":0.11106,"18.2":0.06998,"18.3":0.18485,"18.4":0.10726,"18.5-18.7":4.1861,"26.0":0.17952,"26.1":0.9425,"26.2":0.1993,"26.3":0.00761},P:{"23":0.01112,"24":0.01112,"25":0.02223,"26":0.03335,"27":0.05558,"28":0.13338,"29":1.20042,_:"4 20 21 22 5.0-5.4 6.2-6.4 8.2 9.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.01112},I:{"0":0.9985,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.0005},A:{"9":0.02698,"11":0.64754,_:"6 7 8 10 5.5"},K:{"0":0.94556,_:"10 11 12 11.1 11.5 12.1"},N:{_:"10 11"},S:{"2.5":0.02993,_:"3.0-3.1"},J:{_:"7 10"},Q:{"14.9":0.28728},O:{"0":0.91571},H:{"0":0.03},L:{"0":55.51593},R:{_:"0"},M:{"0":0.1616}};

View File

@@ -0,0 +1,69 @@
import type { BatchItem } from "../batch.js";
import { type Cache } from "../cache/core/index.js";
import type { WithCacheConfig } from "../cache/core/types.js";
import { entityKind } from "../entity.js";
import type { Logger } from "../logger.js";
import type { RelationalSchemaConfig, TablesRelationalConfig } from "../relations.js";
import { type Query } from "../sql/sql.js";
import type { SQLiteAsyncDialect } from "../sqlite-core/dialect.js";
import { SQLiteTransaction } from "../sqlite-core/index.js";
import type { SelectedFieldsOrdered } from "../sqlite-core/query-builders/select.types.js";
import type { PreparedQueryConfig as PreparedQueryConfigBase, SQLiteExecuteMethod, SQLiteTransactionConfig } from "../sqlite-core/session.js";
import { SQLitePreparedQuery, SQLiteSession } from "../sqlite-core/session.js";
import type { AsyncBatchRemoteCallback, RemoteCallback, SqliteRemoteResult } from "./driver.js";
export interface SQLiteRemoteSessionOptions {
logger?: Logger;
cache?: Cache;
}
export type PreparedQueryConfig = Omit<PreparedQueryConfigBase, 'statement' | 'run'>;
export declare class SQLiteRemoteSession<TFullSchema extends Record<string, unknown>, TSchema extends TablesRelationalConfig> extends SQLiteSession<'async', SqliteRemoteResult, TFullSchema, TSchema> {
private client;
private schema;
private batchCLient?;
static readonly [entityKind]: string;
private logger;
private cache;
constructor(client: RemoteCallback, dialect: SQLiteAsyncDialect, schema: RelationalSchemaConfig<TSchema> | undefined, batchCLient?: AsyncBatchRemoteCallback | undefined, options?: SQLiteRemoteSessionOptions);
prepareQuery<T extends Omit<PreparedQueryConfig, 'run'>>(query: Query, fields: SelectedFieldsOrdered | undefined, executeMethod: SQLiteExecuteMethod, isResponseInArrayMode: boolean, customResultMapper?: (rows: unknown[][]) => unknown, queryMetadata?: {
type: 'select' | 'update' | 'delete' | 'insert';
tables: string[];
}, cacheConfig?: WithCacheConfig): RemotePreparedQuery<T>;
batch<T extends BatchItem<'sqlite'>[] | readonly BatchItem<'sqlite'>[]>(queries: T): Promise<unknown[]>;
transaction<T>(transaction: (tx: SQLiteProxyTransaction<TFullSchema, TSchema>) => Promise<T>, config?: SQLiteTransactionConfig): Promise<T>;
extractRawAllValueFromBatchResult(result: unknown): unknown;
extractRawGetValueFromBatchResult(result: unknown): unknown;
extractRawValuesValueFromBatchResult(result: unknown): unknown;
}
export declare class SQLiteProxyTransaction<TFullSchema extends Record<string, unknown>, TSchema extends TablesRelationalConfig> extends SQLiteTransaction<'async', SqliteRemoteResult, TFullSchema, TSchema> {
static readonly [entityKind]: string;
transaction<T>(transaction: (tx: SQLiteProxyTransaction<TFullSchema, TSchema>) => Promise<T>): Promise<T>;
}
export declare class RemotePreparedQuery<T extends PreparedQueryConfig = PreparedQueryConfig> extends SQLitePreparedQuery<{
type: 'async';
run: SqliteRemoteResult;
all: T['all'];
get: T['get'];
values: T['values'];
execute: T['execute'];
}> {
private client;
private logger;
private fields;
private _isResponseInArrayMode;
static readonly [entityKind]: string;
private method;
constructor(client: RemoteCallback, query: Query, logger: Logger, cache: Cache, queryMetadata: {
type: 'select' | 'update' | 'delete' | 'insert';
tables: string[];
} | undefined, cacheConfig: WithCacheConfig | undefined, fields: SelectedFieldsOrdered | undefined, executeMethod: SQLiteExecuteMethod, _isResponseInArrayMode: boolean,
/** @internal */ customResultMapper?: ((rows: unknown[][], mapColumnValue?: (value: unknown) => unknown) => unknown) | undefined);
getQuery(): Query & {
method: SQLiteExecuteMethod;
};
run(placeholderValues?: Record<string, unknown>): Promise<SqliteRemoteResult>;
mapAllResult(rows: unknown, isFromBatch?: boolean): unknown;
all(placeholderValues?: Record<string, unknown>): Promise<T['all']>;
get(placeholderValues?: Record<string, unknown>): Promise<T['get']>;
mapGetResult(rows: unknown, isFromBatch?: boolean): unknown;
values<T extends any[] = unknown[]>(placeholderValues?: Record<string, unknown>): Promise<T[]>;
}

View File

@@ -0,0 +1,113 @@
{
"name": "@opentelemetry/api",
"version": "1.9.0",
"description": "Public API for OpenTelemetry",
"main": "build/src/index.js",
"module": "build/esm/index.js",
"esnext": "build/esnext/index.js",
"types": "build/src/index.d.ts",
"browser": {
"./src/platform/index.ts": "./src/platform/browser/index.ts",
"./build/esm/platform/index.js": "./build/esm/platform/browser/index.js",
"./build/esnext/platform/index.js": "./build/esnext/platform/browser/index.js",
"./build/src/platform/index.js": "./build/src/platform/browser/index.js"
},
"exports": {
".": {
"module": "./build/esm/index.js",
"esnext": "./build/esnext/index.js",
"types": "./build/src/index.d.ts",
"default": "./build/src/index.js"
},
"./experimental": {
"module": "./build/esm/experimental/index.js",
"esnext": "./build/esnext/experimental/index.js",
"types": "./build/src/experimental/index.d.ts",
"default": "./build/src/experimental/index.js"
}
},
"repository": "open-telemetry/opentelemetry-js",
"scripts": {
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
"codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../",
"codecov:webworker": "nyc report --reporter=json && codecov -f coverage/*.json -p ../",
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../",
"precompile": "cross-var lerna run version --scope $npm_package_name --include-dependencies",
"compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
"docs": "typedoc",
"docs:deploy": "gh-pages --dist docs/out",
"docs:test": "linkinator docs/out --silent && linkinator docs/*.md *.md --markdown --silent",
"lint:fix": "eslint . --ext .ts --fix",
"lint": "eslint . --ext .ts",
"test:browser": "karma start --single-run",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"test:eol": "ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"test:webworker": "karma start karma.worker.js --single-run",
"cycle-check": "dpdm --exit-code circular:1 src/index.ts",
"version": "node ../scripts/version-update.js",
"prewatch": "npm run precompile",
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
"peer-api-check": "node ../scripts/peer-api-check.js"
},
"keywords": [
"opentelemetry",
"nodejs",
"browser",
"tracing",
"profiling",
"stats",
"monitoring"
],
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=8.0.0"
},
"files": [
"build/esm/**/*.js",
"build/esm/**/*.js.map",
"build/esm/**/*.d.ts",
"build/esnext/**/*.js",
"build/esnext/**/*.js.map",
"build/esnext/**/*.d.ts",
"build/src/**/*.js",
"build/src/**/*.js.map",
"build/src/**/*.d.ts",
"LICENSE",
"README.md"
],
"publishConfig": {
"access": "public"
},
"devDependencies": {
"@types/mocha": "10.0.6",
"@types/node": "18.6.5",
"@types/sinon": "17.0.3",
"@types/webpack": "5.28.5",
"@types/webpack-env": "1.16.3",
"babel-plugin-istanbul": "6.1.1",
"codecov": "3.8.3",
"cross-var": "1.1.0",
"dpdm": "3.13.1",
"karma": "6.4.3",
"karma-chrome-launcher": "3.1.0",
"karma-coverage": "2.2.1",
"karma-mocha": "2.0.1",
"karma-mocha-webworker": "1.3.0",
"karma-spec-reporter": "0.0.36",
"karma-webpack": "5.0.1",
"lerna": "6.6.2",
"memfs": "3.5.3",
"mocha": "10.2.0",
"nyc": "15.1.0",
"sinon": "15.1.2",
"ts-loader": "9.5.1",
"ts-mocha": "10.0.0",
"typescript": "4.4.4",
"unionfs": "4.5.4",
"webpack": "5.89.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/api",
"sideEffects": false,
"gitHead": "c4d3351b6b3f5593c8d7cbfec97b45cea9fe1511"
}

View File

@@ -0,0 +1,37 @@
/**
* 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 { LexicalEditor } from 'lexical';
import type { JSX } from 'react';
import { CustomPrintNodeFn } from '@lexical/devtools-core';
/**
* TreeView is a React component that provides a visual representation of
* the Lexical editor's state and enables debugging features like time travel
* and custom tree node rendering.
*
* @param {Object} props - The properties passed to the TreeView component.
* @param {LexicalEditor} props.editor - The Lexical editor instance to be visualized and debugged.
* @param {string} [props.treeTypeButtonClassName] - Custom class name for the tree type toggle button.
* @param {string} [props.timeTravelButtonClassName] - Custom class name for the time travel toggle button.
* @param {string} [props.timeTravelPanelButtonClassName] - Custom class name for buttons inside the time travel panel.
* @param {string} [props.timeTravelPanelClassName] - Custom class name for the overall time travel panel container.
* @param {string} [props.timeTravelPanelSliderClassName] - Custom class name for the time travel slider in the panel.
* @param {string} [props.viewClassName] - Custom class name for the tree view container.
* @param {CustomPrintNodeFn} [props.customPrintNode] - A function for customizing the display of nodes in the tree.
*
* @returns {JSX.Element} - A React element that visualizes the editor's state and supports debugging interactions.
*/
export declare function TreeView({ treeTypeButtonClassName, timeTravelButtonClassName, timeTravelPanelSliderClassName, timeTravelPanelButtonClassName, timeTravelPanelClassName, viewClassName, editor, customPrintNode, }: {
editor: LexicalEditor;
treeTypeButtonClassName?: string;
timeTravelButtonClassName?: string;
timeTravelPanelButtonClassName?: string;
timeTravelPanelClassName?: string;
timeTravelPanelSliderClassName?: string;
viewClassName?: string;
customPrintNode?: CustomPrintNodeFn;
}): JSX.Element;

View File

@@ -0,0 +1,155 @@
'use strict';
// lib/utils/bit-reader.ts
var BitReader = class {
constructor(input, endianness) {
this.input = input;
this.endianness = endianness;
// Skip the first 16 bits (2 bytes) of signature
this.byteOffset = 2;
this.bitOffset = 0;
}
/** Reads a specified number of bits, and move the offset */
getBits(length = 1) {
let result = 0;
let bitsRead = 0;
while (bitsRead < length) {
if (this.byteOffset >= this.input.length) {
throw new Error("Reached end of input");
}
const currentByte = this.input[this.byteOffset];
const bitsLeft = 8 - this.bitOffset;
const bitsToRead = Math.min(length - bitsRead, bitsLeft);
if (this.endianness === "little-endian") {
const mask = (1 << bitsToRead) - 1;
const bits = currentByte >> this.bitOffset & mask;
result |= bits << bitsRead;
} else {
const mask = (1 << bitsToRead) - 1 << 8 - this.bitOffset - bitsToRead;
const bits = (currentByte & mask) >> 8 - this.bitOffset - bitsToRead;
result = result << bitsToRead | bits;
}
bitsRead += bitsToRead;
this.bitOffset += bitsToRead;
if (this.bitOffset === 8) {
this.byteOffset++;
this.bitOffset = 0;
}
}
return result;
}
};
// lib/types/utils.ts
var decoder = new TextDecoder();
var toUTF8String = (input, start = 0, end = input.length) => decoder.decode(input.slice(start, end));
var toHexString = (input, start = 0, end = input.length) => input.slice(start, end).reduce((memo, i) => memo + `0${i.toString(16)}`.slice(-2), "");
var getView = (input, offset) => new DataView(input.buffer, input.byteOffset + offset);
var readUInt32BE = (input, offset = 0) => getView(input, offset).getUint32(0, false);
function readBox(input, offset) {
if (input.length - offset < 4) return;
const boxSize = readUInt32BE(input, offset);
if (input.length - offset < boxSize) return;
return {
name: toUTF8String(input, 4 + offset, 8 + offset),
offset,
size: boxSize
};
}
function findBox(input, boxName, currentOffset) {
while (currentOffset < input.length) {
const box = readBox(input, currentOffset);
if (!box) break;
if (box.name === boxName) return box;
currentOffset += box.size > 0 ? box.size : 8;
}
}
// lib/types/jxl-stream.ts
function calculateImageDimension(reader, isSmallImage) {
if (isSmallImage) {
return 8 * (1 + reader.getBits(5));
}
const sizeClass = reader.getBits(2);
const extraBits = [9, 13, 18, 30][sizeClass];
return 1 + reader.getBits(extraBits);
}
function calculateImageWidth(reader, isSmallImage, widthMode, height) {
if (isSmallImage && widthMode === 0) {
return 8 * (1 + reader.getBits(5));
}
if (widthMode === 0) {
return calculateImageDimension(reader, false);
}
const aspectRatios = [1, 1.2, 4 / 3, 1.5, 16 / 9, 5 / 4, 2];
return Math.floor(height * aspectRatios[widthMode - 1]);
}
var JXLStream = {
validate: (input) => {
return toHexString(input, 0, 2) === "ff0a";
},
calculate(input) {
const reader = new BitReader(input, "little-endian");
const isSmallImage = reader.getBits(1) === 1;
const height = calculateImageDimension(reader, isSmallImage);
const widthMode = reader.getBits(3);
const width = calculateImageWidth(reader, isSmallImage, widthMode, height);
return { width, height };
}
};
// lib/types/jxl.ts
function extractCodestream(input) {
const jxlcBox = findBox(input, "jxlc", 0);
if (jxlcBox) {
return input.slice(jxlcBox.offset + 8, jxlcBox.offset + jxlcBox.size);
}
const partialStreams = extractPartialStreams(input);
if (partialStreams.length > 0) {
return concatenateCodestreams(partialStreams);
}
return void 0;
}
function extractPartialStreams(input) {
const partialStreams = [];
let offset = 0;
while (offset < input.length) {
const jxlpBox = findBox(input, "jxlp", offset);
if (!jxlpBox) break;
partialStreams.push(
input.slice(jxlpBox.offset + 12, jxlpBox.offset + jxlpBox.size)
);
offset = jxlpBox.offset + jxlpBox.size;
}
return partialStreams;
}
function concatenateCodestreams(partialCodestreams) {
const totalLength = partialCodestreams.reduce(
(acc, curr) => acc + curr.length,
0
);
const codestream = new Uint8Array(totalLength);
let position = 0;
for (const partial of partialCodestreams) {
codestream.set(partial, position);
position += partial.length;
}
return codestream;
}
var JXL = {
validate: (input) => {
const boxType = toUTF8String(input, 4, 8);
if (boxType !== "JXL ") return false;
const ftypBox = findBox(input, "ftyp", 0);
if (!ftypBox) return false;
const brand = toUTF8String(input, ftypBox.offset + 8, ftypBox.offset + 12);
return brand === "jxl ";
},
calculate(input) {
const codestream = extractCodestream(input);
if (codestream) return JXLStream.calculate(codestream);
throw new Error("No codestream found in JXL container");
}
};
exports.JXL = JXL;

View File

@@ -0,0 +1 @@
{"version":3,"file":"contextManager.js","sources":["../../../src/otel/contextManager.ts"],"sourcesContent":["import { AsyncLocalStorageContextManager } from '@opentelemetry/context-async-hooks';\nimport { wrapContextManagerClass } from '@sentry/opentelemetry';\n\n/**\n * This is a custom ContextManager for OpenTelemetry, which extends the default AsyncLocalStorageContextManager.\n * It ensures that we create a new hub per context, so that the OTEL Context & the Sentry Scopes are always in sync.\n *\n * Note that we currently only support AsyncHooks with this,\n * but since this should work for Node 14+ anyhow that should be good enough.\n */\nexport const SentryContextManager = wrapContextManagerClass(AsyncLocalStorageContextManager);\n"],"names":[],"mappings":";;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;MACa,oBAAA,GAAuB,uBAAuB,CAAC,+BAA+B;;;;"}

View File

@@ -0,0 +1,4 @@
import crypto from 'node:crypto';
export default {
randomUUID: crypto.randomUUID
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"lollipop.js","sources":["../../../src/icons/lollipop.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Lollipop\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMSIgY3k9IjExIiByPSI4IiAvPgogIDxwYXRoIGQ9Im0yMSAyMS00LjMtNC4zIiAvPgogIDxwYXRoIGQ9Ik0xMSAxMWEyIDIgMCAwIDAgNCAwIDQgNCAwIDAgMC04IDAgNiA2IDAgMCAwIDEyIDAiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/lollipop\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 Lollipop = createLucideIcon('Lollipop', [\n ['circle', { cx: '11', cy: '11', r: '8', key: '4ej97u' }],\n ['path', { d: 'm21 21-4.3-4.3', key: '1qie3q' }],\n ['path', { d: 'M11 11a2 2 0 0 0 4 0 4 4 0 0 0-8 0 6 6 0 0 0 12 0', key: '107gwy' }],\n]);\n\nexport default Lollipop;\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,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC/C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAqD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AACpF,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,26 @@
import { InstrumentationBase, type InstrumentationConfig, type InstrumentationModuleDefinition } from '@opentelemetry/instrumentation';
import type { Integration, OpenAiOptions } from '@sentry/core';
export interface OpenAiIntegration extends Integration {
options: OpenAiOptions;
}
type OpenAiInstrumentationOptions = InstrumentationConfig & OpenAiOptions;
/**
* Sentry OpenAI instrumentation using OpenTelemetry.
*/
export declare class SentryOpenAiInstrumentation extends InstrumentationBase<OpenAiInstrumentationOptions> {
constructor(config?: OpenAiInstrumentationOptions);
/**
* Initializes the instrumentation by defining the modules to be patched.
*/
init(): InstrumentationModuleDefinition;
/**
* Core patch logic applying instrumentation to the OpenAI and AzureOpenAI client constructors.
*/
private _patch;
/**
* Patch logic applying instrumentation to the specified client constructor.
*/
private _patchClient;
}
export {};
//# sourceMappingURL=instrumentation.d.ts.map

View File

@@ -0,0 +1,8 @@
/**
* Given a sample rate, returns true if replay should be sampled.
*
* 1.0 = 100% sampling
* 0.0 = 0% sampling
*/
export declare function isSampled(sampleRate?: number): boolean;
//# sourceMappingURL=isSampled.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"bird.js","sources":["../../../src/icons/bird.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Bird\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTYgN2guMDEiIC8+CiAgPHBhdGggZD0iTTMuNCAxOEgxMmE4IDggMCAwIDAgOC04VjdhNCA0IDAgMCAwLTcuMjgtMi4zTDIgMjAiIC8+CiAgPHBhdGggZD0ibTIwIDcgMiAuNS0yIC41IiAvPgogIDxwYXRoIGQ9Ik0xMCAxOHYzIiAvPgogIDxwYXRoIGQ9Ik0xNCAxNy43NVYyMSIgLz4KICA8cGF0aCBkPSJNNyAxOGE2IDYgMCAwIDAgMy44NC0xMC42MSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/bird\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 Bird = createLucideIcon('Bird', [\n ['path', { d: 'M16 7h.01', key: '1kdx03' }],\n ['path', { d: 'M3.4 18H12a8 8 0 0 0 8-8V7a4 4 0 0 0-7.28-2.3L2 20', key: 'oj1oa8' }],\n ['path', { d: 'm20 7 2 .5-2 .5', key: '12nv4d' }],\n ['path', { d: 'M10 18v3', key: '1yea0a' }],\n ['path', { d: 'M14 17.75V21', key: '1pymcb' }],\n ['path', { d: 'M7 18a6 6 0 0 0 3.84-10.61', key: '1npnn0' }],\n]);\n\nexport default Bird;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,iBAAiB,MAAQ,CAAA,CAAA,CAAA;AAAA,CAAA,CACpC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,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,CAAsD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACnF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAmB,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,CAChD,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,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,CAA8B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AAC7D,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,89 @@
"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.ATTR_MESSAGING_CONVERSATION_ID = exports.OLD_ATTR_MESSAGING_MESSAGE_ID = exports.MESSAGING_DESTINATION_KIND_VALUE_TOPIC = exports.ATTR_MESSAGING_URL = exports.ATTR_MESSAGING_PROTOCOL_VERSION = exports.ATTR_MESSAGING_PROTOCOL = exports.MESSAGING_OPERATION_VALUE_PROCESS = exports.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY = exports.ATTR_MESSAGING_DESTINATION_KIND = exports.ATTR_MESSAGING_DESTINATION = void 0;
/*
* This file contains constants for values that where replaced/removed from
* Semantic Conventions long enough ago that they do not have `ATTR_*`
* constants in the `@opentelemetry/semantic-conventions` package. Eventually
* it is expected that this instrumention will be updated to emit telemetry
* using modern Semantic Conventions, dropping the need for the constants in
* this file.
*/
/**
* The message destination name. This might be equal to the span name but is required nevertheless.
*
* @deprecated Use ATTR_MESSAGING_DESTINATION_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).
*/
exports.ATTR_MESSAGING_DESTINATION = 'messaging.destination';
/**
* The kind of message destination.
*
* @deprecated Removed in semconv v1.20.0.
*/
exports.ATTR_MESSAGING_DESTINATION_KIND = 'messaging.destination_kind';
/**
* RabbitMQ message routing key.
*
* @deprecated Use ATTR_MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).
*/
exports.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY = 'messaging.rabbitmq.routing_key';
/**
* A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is &#34;send&#34;, this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.
*
* @deprecated Use MESSAGING_OPERATION_TYPE_VALUE_PROCESS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).
*/
exports.MESSAGING_OPERATION_VALUE_PROCESS = 'process';
/**
* The name of the transport protocol.
*
* @deprecated Use ATTR_NETWORK_PROTOCOL_NAME.
*/
exports.ATTR_MESSAGING_PROTOCOL = 'messaging.protocol';
/**
* The version of the transport protocol.
*
* @deprecated Use ATTR_NETWORK_PROTOCOL_VERSION.
*/
exports.ATTR_MESSAGING_PROTOCOL_VERSION = 'messaging.protocol_version';
/**
* Connection string.
*
* @deprecated Removed in semconv v1.17.0.
*/
exports.ATTR_MESSAGING_URL = 'messaging.url';
/**
* The kind of message destination.
*
* @deprecated Removed in semconv v1.20.0.
*/
exports.MESSAGING_DESTINATION_KIND_VALUE_TOPIC = 'topic';
/**
* A value used by the messaging system as an identifier for the message, represented as a string.
*
* @deprecated Use ATTR_MESSAGING_MESSAGE_ID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).
*
* Note: changing to `ATTR_MESSAGING_MESSAGE_ID` means a change in value from `messaging.message_id` to `messaging.message.id`.
*/
exports.OLD_ATTR_MESSAGING_MESSAGE_ID = 'messaging.message_id';
/**
* The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called &#34;Correlation ID&#34;.
*
* @deprecated Use ATTR_MESSAGING_MESSAGE_CONVERSATION_ID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).
*/
exports.ATTR_MESSAGING_CONVERSATION_ID = 'messaging.conversation_id';
//# sourceMappingURL=semconv-obsolete.js.map

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