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,104 @@
import { type AnyColumn } from "../../column.cjs";
import { type SQL, type SQLWrapper } from "../sql.cjs";
/**
* Returns the number of values in `expression`.
*
* ## Examples
*
* ```ts
* // Number employees with null values
* db.select({ value: count() }).from(employees)
* // Number of employees where `name` is not null
* db.select({ value: count(employees.name) }).from(employees)
* ```
*
* @see countDistinct to get the number of non-duplicate values in `expression`
*/
export declare function count(expression?: SQLWrapper): SQL<number>;
/**
* Returns the number of non-duplicate values in `expression`.
*
* ## Examples
*
* ```ts
* // Number of employees where `name` is distinct
* db.select({ value: countDistinct(employees.name) }).from(employees)
* ```
*
* @see count to get the number of values in `expression`, including duplicates
*/
export declare function countDistinct(expression: SQLWrapper): SQL<number>;
/**
* Returns the average (arithmetic mean) of all non-null values in `expression`.
*
* ## Examples
*
* ```ts
* // Average salary of an employee
* db.select({ value: avg(employees.salary) }).from(employees)
* ```
*
* @see avgDistinct to get the average of all non-null and non-duplicate values in `expression`
*/
export declare function avg(expression: SQLWrapper): SQL<string | null>;
/**
* Returns the average (arithmetic mean) of all non-null and non-duplicate values in `expression`.
*
* ## Examples
*
* ```ts
* // Average salary of an employee where `salary` is distinct
* db.select({ value: avgDistinct(employees.salary) }).from(employees)
* ```
*
* @see avg to get the average of all non-null values in `expression`, including duplicates
*/
export declare function avgDistinct(expression: SQLWrapper): SQL<string | null>;
/**
* Returns the sum of all non-null values in `expression`.
*
* ## Examples
*
* ```ts
* // Sum of every employee's salary
* db.select({ value: sum(employees.salary) }).from(employees)
* ```
*
* @see sumDistinct to get the sum of all non-null and non-duplicate values in `expression`
*/
export declare function sum(expression: SQLWrapper): SQL<string | null>;
/**
* Returns the sum of all non-null and non-duplicate values in `expression`.
*
* ## Examples
*
* ```ts
* // Sum of every employee's salary where `salary` is distinct (no duplicates)
* db.select({ value: sumDistinct(employees.salary) }).from(employees)
* ```
*
* @see sum to get the sum of all non-null values in `expression`, including duplicates
*/
export declare function sumDistinct(expression: SQLWrapper): SQL<string | null>;
/**
* Returns the maximum value in `expression`.
*
* ## Examples
*
* ```ts
* // The employee with the highest salary
* db.select({ value: max(employees.salary) }).from(employees)
* ```
*/
export declare function max<T extends SQLWrapper>(expression: T): SQL<(T extends AnyColumn ? T['_']['data'] : string) | null>;
/**
* Returns the minimum value in `expression`.
*
* ## Examples
*
* ```ts
* // The employee with the lowest salary
* db.select({ value: min(employees.salary) }).from(employees)
* ```
*/
export declare function min<T extends SQLWrapper>(expression: T): SQL<(T extends AnyColumn ? T['_']['data'] : string) | null>;

View File

@@ -0,0 +1,690 @@
(() => {
var _window$dateFns;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);}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/sr-Latn/_lib/formatDistance.js
var formatDistanceLocale = {
lessThanXSeconds: {
one: {
standalone: "manje od 1 sekunde",
withPrepositionAgo: "manje od 1 sekunde",
withPrepositionIn: "manje od 1 sekundu"
},
dual: "manje od {{count}} sekunde",
other: "manje od {{count}} sekundi"
},
xSeconds: {
one: {
standalone: "1 sekunda",
withPrepositionAgo: "1 sekunde",
withPrepositionIn: "1 sekundu"
},
dual: "{{count}} sekunde",
other: "{{count}} sekundi"
},
halfAMinute: "pola minute",
lessThanXMinutes: {
one: {
standalone: "manje od 1 minute",
withPrepositionAgo: "manje od 1 minute",
withPrepositionIn: "manje od 1 minutu"
},
dual: "manje od {{count}} minute",
other: "manje od {{count}} minuta"
},
xMinutes: {
one: {
standalone: "1 minuta",
withPrepositionAgo: "1 minute",
withPrepositionIn: "1 minutu"
},
dual: "{{count}} minute",
other: "{{count}} minuta"
},
aboutXHours: {
one: {
standalone: "oko 1 sat",
withPrepositionAgo: "oko 1 sat",
withPrepositionIn: "oko 1 sat"
},
dual: "oko {{count}} sata",
other: "oko {{count}} sati"
},
xHours: {
one: {
standalone: "1 sat",
withPrepositionAgo: "1 sat",
withPrepositionIn: "1 sat"
},
dual: "{{count}} sata",
other: "{{count}} sati"
},
xDays: {
one: {
standalone: "1 dan",
withPrepositionAgo: "1 dan",
withPrepositionIn: "1 dan"
},
dual: "{{count}} dana",
other: "{{count}} dana"
},
aboutXWeeks: {
one: {
standalone: "oko 1 nedelju",
withPrepositionAgo: "oko 1 nedelju",
withPrepositionIn: "oko 1 nedelju"
},
dual: "oko {{count}} nedelje",
other: "oko {{count}} nedelje"
},
xWeeks: {
one: {
standalone: "1 nedelju",
withPrepositionAgo: "1 nedelju",
withPrepositionIn: "1 nedelju"
},
dual: "{{count}} nedelje",
other: "{{count}} nedelje"
},
aboutXMonths: {
one: {
standalone: "oko 1 mesec",
withPrepositionAgo: "oko 1 mesec",
withPrepositionIn: "oko 1 mesec"
},
dual: "oko {{count}} meseca",
other: "oko {{count}} meseci"
},
xMonths: {
one: {
standalone: "1 mesec",
withPrepositionAgo: "1 mesec",
withPrepositionIn: "1 mesec"
},
dual: "{{count}} meseca",
other: "{{count}} meseci"
},
aboutXYears: {
one: {
standalone: "oko 1 godinu",
withPrepositionAgo: "oko 1 godinu",
withPrepositionIn: "oko 1 godinu"
},
dual: "oko {{count}} godine",
other: "oko {{count}} godina"
},
xYears: {
one: {
standalone: "1 godina",
withPrepositionAgo: "1 godine",
withPrepositionIn: "1 godinu"
},
dual: "{{count}} godine",
other: "{{count}} godina"
},
overXYears: {
one: {
standalone: "preko 1 godinu",
withPrepositionAgo: "preko 1 godinu",
withPrepositionIn: "preko 1 godinu"
},
dual: "preko {{count}} godine",
other: "preko {{count}} godina"
},
almostXYears: {
one: {
standalone: "gotovo 1 godinu",
withPrepositionAgo: "gotovo 1 godinu",
withPrepositionIn: "gotovo 1 godinu"
},
dual: "gotovo {{count}} godine",
other: "gotovo {{count}} godina"
}
};
var formatDistance = function formatDistance(token, count, options) {
var result;
var tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
result = tokenValue.one.withPrepositionIn;
} else {
result = tokenValue.one.withPrepositionAgo;
}
} else {
result = tokenValue.one.standalone;
}
} else if (count % 10 > 1 && count % 10 < 5 && String(count).substr(-2, 1) !== "1") {
result = tokenValue.dual.replace("{{count}}", String(count));
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "za " + result;
} else {
return "pre " + result;
}
}
return result;
};
// lib/locale/_lib/buildFormatLongFn.js
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/sr-Latn/_lib/formatLong.js
var dateFormats = {
full: "EEEE, d. MMMM yyyy.",
long: "d. MMMM yyyy.",
medium: "d. MMM yy.",
short: "dd. MM. yy."
};
var timeFormats = {
full: "HH:mm:ss (zzzz)",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm"
};
var dateTimeFormats = {
full: "{{date}} 'u' {{time}}",
long: "{{date}} 'u' {{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/sr-Latn/_lib/formatRelative.js
var formatRelativeLocale = {
lastWeek: function lastWeek(date) {
switch (date.getDay()) {
case 0:
return "'pro\u0161le nedelje u' p";
case 3:
return "'pro\u0161le srede u' p";
case 6:
return "'pro\u0161le subote u' p";
default:
return "'pro\u0161li' EEEE 'u' p";
}
},
yesterday: "'ju\u010De u' p",
today: "'danas u' p",
tomorrow: "'sutra u' p",
nextWeek: function nextWeek(date) {
switch (date.getDay()) {
case 0:
return "'slede\u0107e nedelje u' p";
case 3:
return "'slede\u0107u sredu u' p";
case 6:
return "'slede\u0107u subotu u' p";
default:
return "'slede\u0107i' EEEE 'u' p";
}
},
other: "P"
};
var formatRelative = function formatRelative(token, date, _baseDate, _options) {
var format = formatRelativeLocale[token];
if (typeof format === "function") {
return format(date);
}
return format;
};
// lib/locale/_lib/buildLocalizeFn.js
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/sr-Latn/_lib/localize.js
var eraValues = {
narrow: ["pr.n.e.", "AD"],
abbreviated: ["pr. Hr.", "po. Hr."],
wide: ["Pre Hrista", "Posle Hrista"]
};
var quarterValues = {
narrow: ["1.", "2.", "3.", "4."],
abbreviated: ["1. kv.", "2. kv.", "3. kv.", "4. kv."],
wide: ["1. kvartal", "2. kvartal", "3. kvartal", "4. kvartal"]
};
var monthValues = {
narrow: [
"1.",
"2.",
"3.",
"4.",
"5.",
"6.",
"7.",
"8.",
"9.",
"10.",
"11.",
"12."],
abbreviated: [
"jan",
"feb",
"mar",
"apr",
"maj",
"jun",
"jul",
"avg",
"sep",
"okt",
"nov",
"dec"],
wide: [
"januar",
"februar",
"mart",
"april",
"maj",
"jun",
"jul",
"avgust",
"septembar",
"oktobar",
"novembar",
"decembar"]
};
var formattingMonthValues = {
narrow: [
"1.",
"2.",
"3.",
"4.",
"5.",
"6.",
"7.",
"8.",
"9.",
"10.",
"11.",
"12."],
abbreviated: [
"jan",
"feb",
"mar",
"apr",
"maj",
"jun",
"jul",
"avg",
"sep",
"okt",
"nov",
"dec"],
wide: [
"januar",
"februar",
"mart",
"april",
"maj",
"jun",
"jul",
"avgust",
"septembar",
"oktobar",
"novembar",
"decembar"]
};
var dayValues = {
narrow: ["N", "P", "U", "S", "\u010C", "P", "S"],
short: ["ned", "pon", "uto", "sre", "\u010Det", "pet", "sub"],
abbreviated: ["ned", "pon", "uto", "sre", "\u010Det", "pet", "sub"],
wide: [
"nedelja",
"ponedeljak",
"utorak",
"sreda",
"\u010Detvrtak",
"petak",
"subota"]
};
var formattingDayPeriodValues = {
narrow: {
am: "AM",
pm: "PM",
midnight: "pono\u0107",
noon: "podne",
morning: "ujutru",
afternoon: "popodne",
evening: "uve\u010De",
night: "no\u0107u"
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "pono\u0107",
noon: "podne",
morning: "ujutru",
afternoon: "popodne",
evening: "uve\u010De",
night: "no\u0107u"
},
wide: {
am: "AM",
pm: "PM",
midnight: "pono\u0107",
noon: "podne",
morning: "ujutru",
afternoon: "posle podne",
evening: "uve\u010De",
night: "no\u0107u"
}
};
var dayPeriodValues = {
narrow: {
am: "AM",
pm: "PM",
midnight: "pono\u0107",
noon: "podne",
morning: "ujutru",
afternoon: "popodne",
evening: "uve\u010De",
night: "no\u0107u"
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "pono\u0107",
noon: "podne",
morning: "ujutru",
afternoon: "popodne",
evening: "uve\u010De",
night: "no\u0107u"
},
wide: {
am: "AM",
pm: "PM",
midnight: "pono\u0107",
noon: "podne",
morning: "ujutru",
afternoon: "posle podne",
evening: "uve\u010De",
night: "no\u0107u"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
var number = Number(dirtyNumber);
return number + ".";
};
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",
formattingValues: formattingMonthValues,
defaultFormattingWidth: "wide"
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide"
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide"
})
};
// lib/locale/_lib/buildMatchFn.js
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 };
};
}
function findKey(object, predicate) {
for (var key in object) {
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
return key;
}
}
return;
}
function findIndex(array, predicate) {
for (var key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return;
}
// lib/locale/_lib/buildMatchPatternFn.js
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/sr-Latn/_lib/match.js
var matchOrdinalNumberPattern = /^(\d+)\./i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^(pr\.n\.e\.|AD)/i,
abbreviated: /^(pr\.\s?Hr\.|po\.\s?Hr\.)/i,
wide: /^(Pre Hrista|pre nove ere|Posle Hrista|nova era)/i
};
var parseEraPatterns = {
any: [/^pr/i, /^(po|nova)/i]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^[1234]\.\s?kv\.?/i,
wide: /^[1234]\. kvartal/i
};
var parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i]
};
var matchMonthPatterns = {
narrow: /^(10|11|12|[123456789])\./i,
abbreviated: /^(jan|feb|mar|apr|maj|jun|jul|avg|sep|okt|nov|dec)/i,
wide: /^((januar|januara)|(februar|februara)|(mart|marta)|(april|aprila)|(maj|maja)|(jun|juna)|(jul|jula)|(avgust|avgusta)|(septembar|septembra)|(oktobar|oktobra)|(novembar|novembra)|(decembar|decembra))/i
};
var parseMonthPatterns = {
narrow: [
/^1/i,
/^2/i,
/^3/i,
/^4/i,
/^5/i,
/^6/i,
/^7/i,
/^8/i,
/^9/i,
/^10/i,
/^11/i,
/^12/i],
any: [
/^ja/i,
/^f/i,
/^mar/i,
/^ap/i,
/^maj/i,
/^jun/i,
/^jul/i,
/^avg/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i]
};
var matchDayPatterns = {
narrow: /^[npusčc]/i,
short: /^(ned|pon|uto|sre|(čet|cet)|pet|sub)/i,
abbreviated: /^(ned|pon|uto|sre|(čet|cet)|pet|sub)/i,
wide: /^(nedelja|ponedeljak|utorak|sreda|(četvrtak|cetvrtak)|petak|subota)/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 = {
any: /^(am|pm|ponoc|ponoć|(po)?podne|uvece|uveče|noću|posle podne|ujutru)/i
};
var parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^pono/i,
noon: /^pod/i,
morning: /jutro/i,
afternoon: /(posle\s|po)+podne/i,
evening: /(uvece|uveče)/i,
night: /(nocu|noću)/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/sr-Latn.js
var srLatn = {
code: "sr-Latn",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1,
firstWeekContainsDate: 1
}
};
// lib/locale/sr-Latn/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), {}, {
srLatn: srLatn }) });
//# debugId=DED8BC96DEFEADFE64756E2164756E21
//# sourceMappingURL=cdn.js.map
})();

View File

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

View File

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

View File

@@ -0,0 +1,38 @@
import { millisecondsInWeek } from "./constants.mjs";
import { startOfISOWeek } from "./startOfISOWeek.mjs";
import { startOfISOWeekYear } from "./startOfISOWeekYear.mjs";
import { toDate } from "./toDate.mjs";
/**
* @name getISOWeek
* @category ISO Week Helpers
* @summary Get the ISO week of the given date.
*
* @description
* Get the ISO week of the given date.
*
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The given date
*
* @returns The ISO week
*
* @example
* // Which week of the ISO-week numbering year is 2 January 2005?
* const result = getISOWeek(new Date(2005, 0, 2))
* //=> 53
*/
export function getISOWeek(date) {
const _date = toDate(date);
const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);
// Round the number of weeks to the nearest integer because the number of
// milliseconds in a week is not constant (e.g. it's different in the week of
// the daylight saving time clock shift).
return Math.round(diff / millisecondsInWeek) + 1;
}
// Fallback for modularized imports:
export default getISOWeek;

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/providers/ListQuery/context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAEnD,eAAO,MAAM,gBAAgB,4CAAyC,CAAA;AAEtE,eAAO,MAAM,YAAY,QAAO,iBAA0C,CAAA;AAE1E,eAAO,MAAM,wBAAwB,kCAAuB,CAAA;AAE5D,eAAO,MAAM,oBAAoB,QAAO,OAAwC,CAAA"}

View File

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

View File

@@ -0,0 +1,56 @@
/*
* 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 { ExportResultCode } from '@opentelemetry/core';
/**
* This class can be used for testing purposes. It stores the exported spans
* in a list in memory that can be retrieved using the `getFinishedSpans()`
* method.
*/
export class InMemorySpanExporter {
_finishedSpans = [];
/**
* Indicates if the exporter has been "shutdown."
* When false, exported spans will not be stored in-memory.
*/
_stopped = false;
export(spans, resultCallback) {
if (this._stopped)
return resultCallback({
code: ExportResultCode.FAILED,
error: new Error('Exporter has been stopped'),
});
this._finishedSpans.push(...spans);
setTimeout(() => resultCallback({ code: ExportResultCode.SUCCESS }), 0);
}
shutdown() {
this._stopped = true;
this._finishedSpans = [];
return this.forceFlush();
}
/**
* Exports any pending spans in the exporter
*/
forceFlush() {
return Promise.resolve();
}
reset() {
this._finishedSpans = [];
}
getFinishedSpans() {
return this._finishedSpans;
}
}
//# sourceMappingURL=InMemorySpanExporter.js.map

View File

@@ -0,0 +1,206 @@
import {
secondsInDay,
secondsInHour,
secondsInMinute,
secondsInMonth,
secondsInQuarter,
secondsInWeek,
secondsInYear,
} from "./constants.mjs";
import { differenceInCalendarDays } from "./differenceInCalendarDays.mjs";
import { differenceInCalendarMonths } from "./differenceInCalendarMonths.mjs";
import { differenceInCalendarQuarters } from "./differenceInCalendarQuarters.mjs";
import { differenceInCalendarWeeks } from "./differenceInCalendarWeeks.mjs";
import { differenceInCalendarYears } from "./differenceInCalendarYears.mjs";
import { differenceInHours } from "./differenceInHours.mjs";
import { differenceInMinutes } from "./differenceInMinutes.mjs";
import { differenceInSeconds } from "./differenceInSeconds.mjs";
import { toDate } from "./toDate.mjs";
/**
* The {@link intlFormatDistance} function options.
*/
/**
* The unit used to format the distance in {@link intlFormatDistance}.
*/
/**
* @name intlFormatDistance
* @category Common Helpers
* @summary Formats distance between two dates in a human-readable format
* @description
* The function calculates the difference between two dates and formats it as a human-readable string.
*
* The function will pick the most appropriate unit depending on the distance between dates. For example, if the distance is a few hours, it might return `x hours`. If the distance is a few months, it might return `x months`.
*
* You can also specify a unit to force using it regardless of the distance to get a result like `123456 hours`.
*
* See the table below for the unit picking logic:
*
* | Distance between dates | Result (past) | Result (future) |
* | ---------------------- | -------------- | --------------- |
* | 0 seconds | now | now |
* | 1-59 seconds | X seconds ago | in X seconds |
* | 1-59 minutes | X minutes ago | in X minutes |
* | 1-23 hours | X hours ago | in X hours |
* | 1 day | yesterday | tomorrow |
* | 2-6 days | X days ago | in X days |
* | 7 days | last week | next week |
* | 8 days-1 month | X weeks ago | in X weeks |
* | 1 month | last month | next month |
* | 2-3 months | X months ago | in X months |
* | 1 quarter | last quarter | next quarter |
* | 2-3 quarters | X quarters ago | in X quarters |
* | 1 year | last year | next year |
* | 2+ years | X years ago | in X years |
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The date
* @param baseDate - The date to compare with.
* @param options - An object with options.
* See MDN for details [Locale identification and negotiation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation)
* The narrow one could be similar to the short one for some locales.
*
* @returns The distance in words according to language-sensitive relative time formatting.
*
* @throws `date` must not be Invalid Date
* @throws `baseDate` must not be Invalid Date
* @throws `options.unit` must not be invalid Unit
* @throws `options.locale` must not be invalid locale
* @throws `options.localeMatcher` must not be invalid localeMatcher
* @throws `options.numeric` must not be invalid numeric
* @throws `options.style` must not be invalid style
*
* @example
* // What is the distance between the dates when the fist date is after the second?
* intlFormatDistance(
* new Date(1986, 3, 4, 11, 30, 0),
* new Date(1986, 3, 4, 10, 30, 0)
* )
* //=> 'in 1 hour'
*
* // What is the distance between the dates when the fist date is before the second?
* intlFormatDistance(
* new Date(1986, 3, 4, 10, 30, 0),
* new Date(1986, 3, 4, 11, 30, 0)
* )
* //=> '1 hour ago'
*
* @example
* // Use the unit option to force the function to output the result in quarters. Without setting it, the example would return "next year"
* intlFormatDistance(
* new Date(1987, 6, 4, 10, 30, 0),
* new Date(1986, 3, 4, 10, 30, 0),
* { unit: 'quarter' }
* )
* //=> 'in 5 quarters'
*
* @example
* // Use the locale option to get the result in Spanish. Without setting it, the example would return "in 1 hour".
* intlFormatDistance(
* new Date(1986, 3, 4, 11, 30, 0),
* new Date(1986, 3, 4, 10, 30, 0),
* { locale: 'es' }
* )
* //=> 'dentro de 1 hora'
*
* @example
* // Use the numeric option to force the function to use numeric values. Without setting it, the example would return "tomorrow".
* intlFormatDistance(
* new Date(1986, 3, 5, 11, 30, 0),
* new Date(1986, 3, 4, 11, 30, 0),
* { numeric: 'always' }
* )
* //=> 'in 1 day'
*
* @example
* // Use the style option to force the function to use short values. Without setting it, the example would return "in 2 years".
* intlFormatDistance(
* new Date(1988, 3, 4, 11, 30, 0),
* new Date(1986, 3, 4, 11, 30, 0),
* { style: 'short' }
* )
* //=> 'in 2 yr'
*/
export function intlFormatDistance(date, baseDate, options) {
let value = 0;
let unit;
const dateLeft = toDate(date);
const dateRight = toDate(baseDate);
if (!options?.unit) {
// Get the unit based on diffInSeconds calculations if no unit is specified
const diffInSeconds = differenceInSeconds(dateLeft, dateRight); // The smallest unit
if (Math.abs(diffInSeconds) < secondsInMinute) {
value = differenceInSeconds(dateLeft, dateRight);
unit = "second";
} else if (Math.abs(diffInSeconds) < secondsInHour) {
value = differenceInMinutes(dateLeft, dateRight);
unit = "minute";
} else if (
Math.abs(diffInSeconds) < secondsInDay &&
Math.abs(differenceInCalendarDays(dateLeft, dateRight)) < 1
) {
value = differenceInHours(dateLeft, dateRight);
unit = "hour";
} else if (
Math.abs(diffInSeconds) < secondsInWeek &&
(value = differenceInCalendarDays(dateLeft, dateRight)) &&
Math.abs(value) < 7
) {
unit = "day";
} else if (Math.abs(diffInSeconds) < secondsInMonth) {
value = differenceInCalendarWeeks(dateLeft, dateRight);
unit = "week";
} else if (Math.abs(diffInSeconds) < secondsInQuarter) {
value = differenceInCalendarMonths(dateLeft, dateRight);
unit = "month";
} else if (Math.abs(diffInSeconds) < secondsInYear) {
if (differenceInCalendarQuarters(dateLeft, dateRight) < 4) {
// To filter out cases that are less than a year but match 4 quarters
value = differenceInCalendarQuarters(dateLeft, dateRight);
unit = "quarter";
} else {
value = differenceInCalendarYears(dateLeft, dateRight);
unit = "year";
}
} else {
value = differenceInCalendarYears(dateLeft, dateRight);
unit = "year";
}
} else {
// Get the value if unit is specified
unit = options?.unit;
if (unit === "second") {
value = differenceInSeconds(dateLeft, dateRight);
} else if (unit === "minute") {
value = differenceInMinutes(dateLeft, dateRight);
} else if (unit === "hour") {
value = differenceInHours(dateLeft, dateRight);
} else if (unit === "day") {
value = differenceInCalendarDays(dateLeft, dateRight);
} else if (unit === "week") {
value = differenceInCalendarWeeks(dateLeft, dateRight);
} else if (unit === "month") {
value = differenceInCalendarMonths(dateLeft, dateRight);
} else if (unit === "quarter") {
value = differenceInCalendarQuarters(dateLeft, dateRight);
} else if (unit === "year") {
value = differenceInCalendarYears(dateLeft, dateRight);
}
}
const rtf = new Intl.RelativeTimeFormat(options?.locale, {
localeMatcher: options?.localeMatcher,
numeric: options?.numeric || "auto",
style: options?.style,
});
return rtf.format(value, unit);
}
// Fallback for modularized imports:
export default intlFormatDistance;

View File

@@ -0,0 +1,22 @@
const formatRelativeLocale = {
lastWeek: (date) => {
const weekday = date.getDay();
const last = weekday === 0 || weekday === 6 ? "último" : "última";
return "'" + last + "' eeee 'às' p";
},
yesterday: "'ontem às' p",
today: "'hoje às' p",
tomorrow: "'amanhã às' p",
nextWeek: "eeee 'às' p",
other: "P",
};
export const formatRelative = (token, date, _baseDate, _options) => {
const format = formatRelativeLocale[token];
if (typeof format === "function") {
return format(date);
}
return format;
};

View File

@@ -0,0 +1,37 @@
export interface Interaction {
_latency: number;
id: number;
entries: PerformanceEventTiming[];
}
/**
*
*/
export declare class InteractionManager {
/**
* A list of longest interactions on the page (by latency) sorted so the
* longest one is first. The list is at most MAX_INTERACTIONS_TO_CONSIDER
* long.
*/
_longestInteractionList: Interaction[];
/**
* A mapping of longest interactions by their interaction ID.
* This is used for faster lookup.
*/
_longestInteractionMap: Map<number, Interaction>;
_onBeforeProcessingEntry?: (entry: PerformanceEventTiming) => void;
_onAfterProcessingINPCandidate?: (interaction: Interaction) => void;
_resetInteractions(): void;
/**
* Returns the estimated p98 longest interaction based on the stored
* interaction candidates and the interaction count for the current page.
*/
_estimateP98LongestInteraction(): Interaction | undefined;
/**
* Takes a performance entry and adds it to the list of worst interactions
* if its duration is long enough to make it among the worst. If the
* entry is part of an existing interaction, it is merged and the latency
* and entries list is updated as needed.
*/
_processEntry(entry: PerformanceEventTiming): void;
}
//# sourceMappingURL=InteractionManager.d.ts.map

View File

@@ -0,0 +1,3 @@
import { GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql';
export declare const GraphQLHexadecimalConfig: GraphQLScalarTypeConfig<string, string>;
export declare const GraphQLHexadecimal: GraphQLScalarType<string, string>;

View File

@@ -0,0 +1 @@
{"version":3,"file":"resolveAllFilterOptions.js","names":["resolveFilterOptions","fieldAffectsData","fieldHasSubFields","fieldIsHiddenOrDisabled","tabHasName","resolveAllFilterOptions","fields","pathPrefix","req","result","resolvedFilterOptions","Map","Promise","all","map","field","fieldPath","name","type","filterOptions","options","id","undefined","blockData","data","relationTo","siblingData","user","set","tabs","tab","tabPath"],"sources":["../../../src/views/List/resolveAllFilterOptions.ts"],"sourcesContent":["import type { Field, PayloadRequest, ResolvedFilterOptions } from 'payload'\n\nimport { resolveFilterOptions } from '@payloadcms/ui/rsc'\nimport {\n fieldAffectsData,\n fieldHasSubFields,\n fieldIsHiddenOrDisabled,\n tabHasName,\n} from 'payload/shared'\n\nexport const resolveAllFilterOptions = async ({\n fields,\n pathPrefix,\n req,\n result,\n}: {\n fields: Field[]\n pathPrefix?: string\n req: PayloadRequest\n result?: Map<string, ResolvedFilterOptions>\n}): Promise<Map<string, ResolvedFilterOptions>> => {\n const resolvedFilterOptions = !result ? new Map<string, ResolvedFilterOptions>() : result\n\n await Promise.all(\n fields.map(async (field) => {\n if (fieldIsHiddenOrDisabled(field)) {\n return\n }\n\n const fieldPath = fieldAffectsData(field)\n ? pathPrefix\n ? `${pathPrefix}.${field.name}`\n : field.name\n : pathPrefix\n\n if (\n (field.type === 'relationship' || field.type === 'upload') &&\n 'filterOptions' in field &&\n field.filterOptions\n ) {\n const options = await resolveFilterOptions(field.filterOptions, {\n id: undefined,\n blockData: undefined,\n data: {}, // use empty object to prevent breaking queries when accessing properties of `data`\n relationTo: field.relationTo,\n req,\n siblingData: {}, // use empty object to prevent breaking queries when accessing properties of `siblingData`\n user: req.user,\n })\n\n resolvedFilterOptions.set(fieldPath, options)\n }\n\n if (fieldHasSubFields(field)) {\n await resolveAllFilterOptions({\n fields: field.fields,\n pathPrefix: fieldPath,\n req,\n result: resolvedFilterOptions,\n })\n }\n\n if (field.type === 'tabs') {\n await Promise.all(\n field.tabs.map(async (tab) => {\n const tabPath = tabHasName(tab)\n ? fieldPath\n ? `${fieldPath}.${tab.name}`\n : tab.name\n : fieldPath\n\n await resolveAllFilterOptions({\n fields: tab.fields,\n pathPrefix: tabPath,\n req,\n result: resolvedFilterOptions,\n })\n }),\n )\n }\n }),\n )\n\n return resolvedFilterOptions\n}\n"],"mappings":"AAEA,SAASA,oBAAoB,QAAQ;AACrC,SACEC,gBAAgB,EAChBC,iBAAiB,EACjBC,uBAAuB,EACvBC,UAAU,QACL;AAEP,OAAO,MAAMC,uBAAA,GAA0B,MAAAA,CAAO;EAC5CC,MAAM;EACNC,UAAU;EACVC,GAAG;EACHC;AAAM,CAMP;EACC,MAAMC,qBAAA,GAAwB,CAACD,MAAA,GAAS,IAAIE,GAAA,KAAuCF,MAAA;EAEnF,MAAMG,OAAA,CAAQC,GAAG,CACfP,MAAA,CAAOQ,GAAG,CAAC,MAAOC,KAAA;IAChB,IAAIZ,uBAAA,CAAwBY,KAAA,GAAQ;MAClC;IACF;IAEA,MAAMC,SAAA,GAAYf,gBAAA,CAAiBc,KAAA,IAC/BR,UAAA,GACE,GAAGA,UAAA,IAAcQ,KAAA,CAAME,IAAI,EAAE,GAC7BF,KAAA,CAAME,IAAI,GACZV,UAAA;IAEJ,IACE,CAACQ,KAAA,CAAMG,IAAI,KAAK,kBAAkBH,KAAA,CAAMG,IAAI,KAAK,QAAO,KACxD,mBAAmBH,KAAA,IACnBA,KAAA,CAAMI,aAAa,EACnB;MACA,MAAMC,OAAA,GAAU,MAAMpB,oBAAA,CAAqBe,KAAA,CAAMI,aAAa,EAAE;QAC9DE,EAAA,EAAIC,SAAA;QACJC,SAAA,EAAWD,SAAA;QACXE,IAAA,EAAM,CAAC;QACPC,UAAA,EAAYV,KAAA,CAAMU,UAAU;QAC5BjB,GAAA;QACAkB,WAAA,EAAa,CAAC;QACdC,IAAA,EAAMnB,GAAA,CAAImB;MACZ;MAEAjB,qBAAA,CAAsBkB,GAAG,CAACZ,SAAA,EAAWI,OAAA;IACvC;IAEA,IAAIlB,iBAAA,CAAkBa,KAAA,GAAQ;MAC5B,MAAMV,uBAAA,CAAwB;QAC5BC,MAAA,EAAQS,KAAA,CAAMT,MAAM;QACpBC,UAAA,EAAYS,SAAA;QACZR,GAAA;QACAC,MAAA,EAAQC;MACV;IACF;IAEA,IAAIK,KAAA,CAAMG,IAAI,KAAK,QAAQ;MACzB,MAAMN,OAAA,CAAQC,GAAG,CACfE,KAAA,CAAMc,IAAI,CAACf,GAAG,CAAC,MAAOgB,GAAA;QACpB,MAAMC,OAAA,GAAU3B,UAAA,CAAW0B,GAAA,IACvBd,SAAA,GACE,GAAGA,SAAA,IAAac,GAAA,CAAIb,IAAI,EAAE,GAC1Ba,GAAA,CAAIb,IAAI,GACVD,SAAA;QAEJ,MAAMX,uBAAA,CAAwB;UAC5BC,MAAA,EAAQwB,GAAA,CAAIxB,MAAM;UAClBC,UAAA,EAAYwB,OAAA;UACZvB,GAAA;UACAC,MAAA,EAAQC;QACV;MACF;IAEJ;EACF;EAGF,OAAOA,qBAAA;AACT","ignoreList":[]}

View File

@@ -0,0 +1,41 @@
import type { ClientUser, Data, SanitizedCollectionConfig, SanitizedCollectionPermission, SanitizedGlobalPermission } from 'payload';
import React from 'react';
import type { DocumentDrawerContextType } from '../DocumentDrawer/Provider.js';
import './index.scss';
export declare const DocumentControls: React.FC<{
readonly apiURL: string;
readonly BeforeDocumentControls?: React.ReactNode;
readonly customComponents?: {
readonly PreviewButton?: React.ReactNode;
readonly PublishButton?: React.ReactNode;
readonly SaveButton?: React.ReactNode;
readonly SaveDraftButton?: React.ReactNode;
readonly Status?: React.ReactNode;
readonly UnpublishButton?: React.ReactNode;
};
readonly data?: Data;
readonly disableActions?: boolean;
readonly disableCreate?: boolean;
readonly EditMenuItems?: React.ReactNode;
readonly hasPublishPermission?: boolean;
readonly hasSavePermission?: boolean;
readonly id?: number | string;
readonly isAccountView?: boolean;
readonly isEditing?: boolean;
readonly isInDrawer?: boolean;
readonly isTrashed?: boolean;
readonly onDelete?: DocumentDrawerContextType['onDelete'];
readonly onDrawerCreateNew?: () => void;
readonly onDuplicate?: DocumentDrawerContextType['onDuplicate'];
readonly onRestore?: DocumentDrawerContextType['onRestore'];
readonly onSave?: DocumentDrawerContextType['onSave'];
readonly onTakeOver?: () => void;
readonly permissions: null | SanitizedCollectionPermission | SanitizedGlobalPermission;
readonly readOnlyForIncomingUser?: boolean;
readonly redirectAfterDelete?: boolean;
readonly redirectAfterDuplicate?: boolean;
readonly redirectAfterRestore?: boolean;
readonly slug: SanitizedCollectionConfig['slug'];
readonly user?: ClientUser;
}>;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,334 @@
'use strict'
// A linked list to keep track of recently-used-ness
const Yallist = require('yallist')
const MAX = Symbol('max')
const LENGTH = Symbol('length')
const LENGTH_CALCULATOR = Symbol('lengthCalculator')
const ALLOW_STALE = Symbol('allowStale')
const MAX_AGE = Symbol('maxAge')
const DISPOSE = Symbol('dispose')
const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')
const LRU_LIST = Symbol('lruList')
const CACHE = Symbol('cache')
const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')
const naiveLength = () => 1
// lruList is a yallist where the head is the youngest
// item, and the tail is the oldest. the list contains the Hit
// objects as the entries.
// Each Hit object has a reference to its Yallist.Node. This
// never changes.
//
// cache is a Map (or PseudoMap) that matches the keys to
// the Yallist.Node object.
class LRUCache {
constructor (options) {
if (typeof options === 'number')
options = { max: options }
if (!options)
options = {}
if (options.max && (typeof options.max !== 'number' || options.max < 0))
throw new TypeError('max must be a non-negative number')
// Kind of weird to have a default max of Infinity, but oh well.
const max = this[MAX] = options.max || Infinity
const lc = options.length || naiveLength
this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc
this[ALLOW_STALE] = options.stale || false
if (options.maxAge && typeof options.maxAge !== 'number')
throw new TypeError('maxAge must be a number')
this[MAX_AGE] = options.maxAge || 0
this[DISPOSE] = options.dispose
this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false
this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false
this.reset()
}
// resize the cache when the max changes.
set max (mL) {
if (typeof mL !== 'number' || mL < 0)
throw new TypeError('max must be a non-negative number')
this[MAX] = mL || Infinity
trim(this)
}
get max () {
return this[MAX]
}
set allowStale (allowStale) {
this[ALLOW_STALE] = !!allowStale
}
get allowStale () {
return this[ALLOW_STALE]
}
set maxAge (mA) {
if (typeof mA !== 'number')
throw new TypeError('maxAge must be a non-negative number')
this[MAX_AGE] = mA
trim(this)
}
get maxAge () {
return this[MAX_AGE]
}
// resize the cache when the lengthCalculator changes.
set lengthCalculator (lC) {
if (typeof lC !== 'function')
lC = naiveLength
if (lC !== this[LENGTH_CALCULATOR]) {
this[LENGTH_CALCULATOR] = lC
this[LENGTH] = 0
this[LRU_LIST].forEach(hit => {
hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)
this[LENGTH] += hit.length
})
}
trim(this)
}
get lengthCalculator () { return this[LENGTH_CALCULATOR] }
get length () { return this[LENGTH] }
get itemCount () { return this[LRU_LIST].length }
rforEach (fn, thisp) {
thisp = thisp || this
for (let walker = this[LRU_LIST].tail; walker !== null;) {
const prev = walker.prev
forEachStep(this, fn, walker, thisp)
walker = prev
}
}
forEach (fn, thisp) {
thisp = thisp || this
for (let walker = this[LRU_LIST].head; walker !== null;) {
const next = walker.next
forEachStep(this, fn, walker, thisp)
walker = next
}
}
keys () {
return this[LRU_LIST].toArray().map(k => k.key)
}
values () {
return this[LRU_LIST].toArray().map(k => k.value)
}
reset () {
if (this[DISPOSE] &&
this[LRU_LIST] &&
this[LRU_LIST].length) {
this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))
}
this[CACHE] = new Map() // hash of items by key
this[LRU_LIST] = new Yallist() // list of items in order of use recency
this[LENGTH] = 0 // length of items in the list
}
dump () {
return this[LRU_LIST].map(hit =>
isStale(this, hit) ? false : {
k: hit.key,
v: hit.value,
e: hit.now + (hit.maxAge || 0)
}).toArray().filter(h => h)
}
dumpLru () {
return this[LRU_LIST]
}
set (key, value, maxAge) {
maxAge = maxAge || this[MAX_AGE]
if (maxAge && typeof maxAge !== 'number')
throw new TypeError('maxAge must be a number')
const now = maxAge ? Date.now() : 0
const len = this[LENGTH_CALCULATOR](value, key)
if (this[CACHE].has(key)) {
if (len > this[MAX]) {
del(this, this[CACHE].get(key))
return false
}
const node = this[CACHE].get(key)
const item = node.value
// dispose of the old one before overwriting
// split out into 2 ifs for better coverage tracking
if (this[DISPOSE]) {
if (!this[NO_DISPOSE_ON_SET])
this[DISPOSE](key, item.value)
}
item.now = now
item.maxAge = maxAge
item.value = value
this[LENGTH] += len - item.length
item.length = len
this.get(key)
trim(this)
return true
}
const hit = new Entry(key, value, len, now, maxAge)
// oversized objects fall out of cache automatically.
if (hit.length > this[MAX]) {
if (this[DISPOSE])
this[DISPOSE](key, value)
return false
}
this[LENGTH] += hit.length
this[LRU_LIST].unshift(hit)
this[CACHE].set(key, this[LRU_LIST].head)
trim(this)
return true
}
has (key) {
if (!this[CACHE].has(key)) return false
const hit = this[CACHE].get(key).value
return !isStale(this, hit)
}
get (key) {
return get(this, key, true)
}
peek (key) {
return get(this, key, false)
}
pop () {
const node = this[LRU_LIST].tail
if (!node)
return null
del(this, node)
return node.value
}
del (key) {
del(this, this[CACHE].get(key))
}
load (arr) {
// reset the cache
this.reset()
const now = Date.now()
// A previous serialized cache has the most recent items first
for (let l = arr.length - 1; l >= 0; l--) {
const hit = arr[l]
const expiresAt = hit.e || 0
if (expiresAt === 0)
// the item was created without expiration in a non aged cache
this.set(hit.k, hit.v)
else {
const maxAge = expiresAt - now
// dont add already expired items
if (maxAge > 0) {
this.set(hit.k, hit.v, maxAge)
}
}
}
}
prune () {
this[CACHE].forEach((value, key) => get(this, key, false))
}
}
const get = (self, key, doUse) => {
const node = self[CACHE].get(key)
if (node) {
const hit = node.value
if (isStale(self, hit)) {
del(self, node)
if (!self[ALLOW_STALE])
return undefined
} else {
if (doUse) {
if (self[UPDATE_AGE_ON_GET])
node.value.now = Date.now()
self[LRU_LIST].unshiftNode(node)
}
}
return hit.value
}
}
const isStale = (self, hit) => {
if (!hit || (!hit.maxAge && !self[MAX_AGE]))
return false
const diff = Date.now() - hit.now
return hit.maxAge ? diff > hit.maxAge
: self[MAX_AGE] && (diff > self[MAX_AGE])
}
const trim = self => {
if (self[LENGTH] > self[MAX]) {
for (let walker = self[LRU_LIST].tail;
self[LENGTH] > self[MAX] && walker !== null;) {
// We know that we're about to delete this one, and also
// what the next least recently used key will be, so just
// go ahead and set it now.
const prev = walker.prev
del(self, walker)
walker = prev
}
}
}
const del = (self, node) => {
if (node) {
const hit = node.value
if (self[DISPOSE])
self[DISPOSE](hit.key, hit.value)
self[LENGTH] -= hit.length
self[CACHE].delete(hit.key)
self[LRU_LIST].removeNode(node)
}
}
class Entry {
constructor (key, value, length, now, maxAge) {
this.key = key
this.value = value
this.length = length
this.now = now
this.maxAge = maxAge || 0
}
}
const forEachStep = (self, fn, node, thisp) => {
let hit = node.value
if (isStale(self, hit)) {
del(self, node)
if (!self[ALLOW_STALE])
hit = undefined
}
if (hit)
fn.call(thisp, hit.value, hit.key, self)
}
module.exports = LRUCache

View File

@@ -0,0 +1 @@
{"version":3,"file":"scan-search.js","sources":["../../../src/icons/scan-search.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ScanSearch\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMyA3VjVhMiAyIDAgMCAxIDItMmgyIiAvPgogIDxwYXRoIGQ9Ik0xNyAzaDJhMiAyIDAgMCAxIDIgMnYyIiAvPgogIDxwYXRoIGQ9Ik0yMSAxN3YyYTIgMiAwIDAgMS0yIDJoLTIiIC8+CiAgPHBhdGggZD0iTTcgMjFINWEyIDIgMCAwIDEtMi0ydi0yIiAvPgogIDxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjMiIC8+CiAgPHBhdGggZD0ibTE2IDE2LTEuOS0xLjkiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/scan-search\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ScanSearch = createLucideIcon('ScanSearch', [\n ['path', { d: 'M3 7V5a2 2 0 0 1 2-2h2', key: 'aa7l1z' }],\n ['path', { d: 'M17 3h2a2 2 0 0 1 2 2v2', key: '4qcy5o' }],\n ['path', { d: 'M21 17v2a2 2 0 0 1-2 2h-2', key: '6vwrx8' }],\n ['path', { d: 'M7 21H5a2 2 0 0 1-2-2v-2', key: 'ioqczr' }],\n ['circle', { cx: '12', cy: '12', r: '3', key: '1v7zrd' }],\n ['path', { d: 'm16 16-1.9-1.9', key: '1dq9hf' }],\n]);\n\nexport default ScanSearch;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACzD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,8 @@
import type { TextFieldClient } from 'payload';
import type { DefaultFilterProps } from '../types.js';
export type TextFilterProps = {
readonly field: TextFieldClient;
readonly onChange: (val: string) => void;
readonly value: string | string[];
} & DefaultFilterProps;
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1,622 @@
(() => {
var _window$dateFns;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);}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/et/_lib/formatDistance.js
var formatDistanceLocale = {
lessThanXSeconds: {
standalone: {
one: "v\xE4hem kui \xFCks sekund",
other: "v\xE4hem kui {{count}} sekundit"
},
withPreposition: {
one: "v\xE4hem kui \xFChe sekundi",
other: "v\xE4hem kui {{count}} sekundi"
}
},
xSeconds: {
standalone: {
one: "\xFCks sekund",
other: "{{count}} sekundit"
},
withPreposition: {
one: "\xFChe sekundi",
other: "{{count}} sekundi"
}
},
halfAMinute: {
standalone: "pool minutit",
withPreposition: "poole minuti"
},
lessThanXMinutes: {
standalone: {
one: "v\xE4hem kui \xFCks minut",
other: "v\xE4hem kui {{count}} minutit"
},
withPreposition: {
one: "v\xE4hem kui \xFChe minuti",
other: "v\xE4hem kui {{count}} minuti"
}
},
xMinutes: {
standalone: {
one: "\xFCks minut",
other: "{{count}} minutit"
},
withPreposition: {
one: "\xFChe minuti",
other: "{{count}} minuti"
}
},
aboutXHours: {
standalone: {
one: "umbes \xFCks tund",
other: "umbes {{count}} tundi"
},
withPreposition: {
one: "umbes \xFChe tunni",
other: "umbes {{count}} tunni"
}
},
xHours: {
standalone: {
one: "\xFCks tund",
other: "{{count}} tundi"
},
withPreposition: {
one: "\xFChe tunni",
other: "{{count}} tunni"
}
},
xDays: {
standalone: {
one: "\xFCks p\xE4ev",
other: "{{count}} p\xE4eva"
},
withPreposition: {
one: "\xFChe p\xE4eva",
other: "{{count}} p\xE4eva"
}
},
aboutXWeeks: {
standalone: {
one: "umbes \xFCks n\xE4dal",
other: "umbes {{count}} n\xE4dalat"
},
withPreposition: {
one: "umbes \xFChe n\xE4dala",
other: "umbes {{count}} n\xE4dala"
}
},
xWeeks: {
standalone: {
one: "\xFCks n\xE4dal",
other: "{{count}} n\xE4dalat"
},
withPreposition: {
one: "\xFChe n\xE4dala",
other: "{{count}} n\xE4dala"
}
},
aboutXMonths: {
standalone: {
one: "umbes \xFCks kuu",
other: "umbes {{count}} kuud"
},
withPreposition: {
one: "umbes \xFChe kuu",
other: "umbes {{count}} kuu"
}
},
xMonths: {
standalone: {
one: "\xFCks kuu",
other: "{{count}} kuud"
},
withPreposition: {
one: "\xFChe kuu",
other: "{{count}} kuu"
}
},
aboutXYears: {
standalone: {
one: "umbes \xFCks aasta",
other: "umbes {{count}} aastat"
},
withPreposition: {
one: "umbes \xFChe aasta",
other: "umbes {{count}} aasta"
}
},
xYears: {
standalone: {
one: "\xFCks aasta",
other: "{{count}} aastat"
},
withPreposition: {
one: "\xFChe aasta",
other: "{{count}} aasta"
}
},
overXYears: {
standalone: {
one: "rohkem kui \xFCks aasta",
other: "rohkem kui {{count}} aastat"
},
withPreposition: {
one: "rohkem kui \xFChe aasta",
other: "rohkem kui {{count}} aasta"
}
},
almostXYears: {
standalone: {
one: "peaaegu \xFCks aasta",
other: "peaaegu {{count}} aastat"
},
withPreposition: {
one: "peaaegu \xFChe aasta",
other: "peaaegu {{count}} aasta"
}
}
};
var formatDistance = function formatDistance(token, count, options) {
var usageGroup = options !== null && options !== void 0 && options.addSuffix ? formatDistanceLocale[token].withPreposition : formatDistanceLocale[token].standalone;
var result;
if (typeof usageGroup === "string") {
result = usageGroup;
} else if (count === 1) {
result = usageGroup.one;
} else {
result = usageGroup.other.replace("{{count}}", String(count));
}
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return result + " p\xE4rast";
} else {
return result + " eest";
}
}
return result;
};
// lib/locale/_lib/buildFormatLongFn.js
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/et/_lib/formatLong.js
var dateFormats = {
full: "EEEE, d. MMMM y",
long: "d. MMMM y",
medium: "d. MMM y",
short: "dd.MM.y"
};
var timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm"
};
var dateTimeFormats = {
full: "{{date}} 'kell' {{time}}",
long: "{{date}} 'kell' {{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/et/_lib/formatRelative.js
var formatRelativeLocale = {
lastWeek: "'eelmine' eeee 'kell' p",
yesterday: "'eile kell' p",
today: "'t\xE4na kell' p",
tomorrow: "'homme kell' p",
nextWeek: "'j\xE4rgmine' eeee 'kell' p",
other: "P"
};
var formatRelative = function formatRelative(token, _date, _baseDate, _options) {return formatRelativeLocale[token];};
// lib/locale/_lib/buildLocalizeFn.js
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/et/_lib/localize.js
var eraValues = {
narrow: ["e.m.a", "m.a.j"],
abbreviated: ["e.m.a", "m.a.j"],
wide: ["enne meie ajaarvamist", "meie ajaarvamise j\xE4rgi"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["K1", "K2", "K3", "K4"],
wide: ["1. kvartal", "2. kvartal", "3. kvartal", "4. kvartal"]
};
var monthValues = {
narrow: ["J", "V", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
abbreviated: [
"jaan",
"veebr",
"m\xE4rts",
"apr",
"mai",
"juuni",
"juuli",
"aug",
"sept",
"okt",
"nov",
"dets"],
wide: [
"jaanuar",
"veebruar",
"m\xE4rts",
"aprill",
"mai",
"juuni",
"juuli",
"august",
"september",
"oktoober",
"november",
"detsember"]
};
var dayValues = {
narrow: ["P", "E", "T", "K", "N", "R", "L"],
short: ["P", "E", "T", "K", "N", "R", "L"],
abbreviated: [
"p\xFChap.",
"esmasp.",
"teisip.",
"kolmap.",
"neljap.",
"reede.",
"laup."],
wide: [
"p\xFChap\xE4ev",
"esmasp\xE4ev",
"teisip\xE4ev",
"kolmap\xE4ev",
"neljap\xE4ev",
"reede",
"laup\xE4ev"]
};
var dayPeriodValues = {
narrow: {
am: "AM",
pm: "PM",
midnight: "kesk\xF6\xF6",
noon: "keskp\xE4ev",
morning: "hommik",
afternoon: "p\xE4rastl\xF5una",
evening: "\xF5htu",
night: "\xF6\xF6"
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "kesk\xF6\xF6",
noon: "keskp\xE4ev",
morning: "hommik",
afternoon: "p\xE4rastl\xF5una",
evening: "\xF5htu",
night: "\xF6\xF6"
},
wide: {
am: "AM",
pm: "PM",
midnight: "kesk\xF6\xF6",
noon: "keskp\xE4ev",
morning: "hommik",
afternoon: "p\xE4rastl\xF5una",
evening: "\xF5htu",
night: "\xF6\xF6"
}
};
var formattingDayPeriodValues = {
narrow: {
am: "AM",
pm: "PM",
midnight: "kesk\xF6\xF6l",
noon: "keskp\xE4eval",
morning: "hommikul",
afternoon: "p\xE4rastl\xF5unal",
evening: "\xF5htul",
night: "\xF6\xF6sel"
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "kesk\xF6\xF6l",
noon: "keskp\xE4eval",
morning: "hommikul",
afternoon: "p\xE4rastl\xF5unal",
evening: "\xF5htul",
night: "\xF6\xF6sel"
},
wide: {
am: "AM",
pm: "PM",
midnight: "kesk\xF6\xF6l",
noon: "keskp\xE4eval",
morning: "hommikul",
afternoon: "p\xE4rastl\xF5unal",
evening: "\xF5htul",
night: "\xF6\xF6sel"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
var number = Number(dirtyNumber);
return number + ".";
};
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",
formattingValues: monthValues,
defaultFormattingWidth: "wide"
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
formattingValues: dayValues,
defaultFormattingWidth: "wide"
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide"
})
};
// lib/locale/_lib/buildMatchFn.js
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 };
};
}
function findKey(object, predicate) {
for (var key in object) {
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
return key;
}
}
return;
}
function findIndex(array, predicate) {
for (var key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return;
}
// lib/locale/_lib/buildMatchPatternFn.js
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/et/_lib/match.js
var matchOrdinalNumberPattern = /^\d+\./i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^(e\.m\.a|m\.a\.j|eKr|pKr)/i,
abbreviated: /^(e\.m\.a|m\.a\.j|eKr|pKr)/i,
wide: /^(enne meie ajaarvamist|meie ajaarvamise järgi|enne Kristust|pärast Kristust)/i
};
var parseEraPatterns = {
any: [/^e/i, /^(m|p)/i]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^K[1234]/i,
wide: /^[1234](\.)? kvartal/i
};
var parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i]
};
var matchMonthPatterns = {
narrow: /^[jvmasond]/i,
abbreviated: /^(jaan|veebr|märts|apr|mai|juuni|juuli|aug|sept|okt|nov|dets)/i,
wide: /^(jaanuar|veebruar|märts|aprill|mai|juuni|juuli|august|september|oktoober|november|detsember)/i
};
var parseMonthPatterns = {
narrow: [
/^j/i,
/^v/i,
/^m/i,
/^a/i,
/^m/i,
/^j/i,
/^j/i,
/^a/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i],
any: [
/^ja/i,
/^v/i,
/^mär/i,
/^ap/i,
/^mai/i,
/^juun/i,
/^juul/i,
/^au/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i]
};
var matchDayPatterns = {
narrow: /^[petknrl]/i,
short: /^[petknrl]/i,
abbreviated: /^(püh?|esm?|tei?|kolm?|nel?|ree?|laup?)\.?/i,
wide: /^(pühapäev|esmaspäev|teisipäev|kolmapäev|neljapäev|reede|laupäev)/i
};
var parseDayPatterns = {
any: [/^p/i, /^e/i, /^t/i, /^k/i, /^n/i, /^r/i, /^l/i]
};
var matchDayPeriodPatterns = {
any: /^(am|pm|keskööl?|keskpäev(al)?|hommik(ul)?|pärastlõunal?|õhtul?|öö(sel)?)/i
};
var parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^keskö/i,
noon: /^keskp/i,
morning: /hommik/i,
afternoon: /pärastlõuna/i,
evening: /õhtu/i,
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/et.js
var et = {
code: "et",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1,
firstWeekContainsDate: 4
}
};
// lib/locale/et/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), {}, {
et: et }) });
//# debugId=6B2AC2413AC3C80264756E2164756E21
//# sourceMappingURL=cdn.js.map
})();

View File

@@ -0,0 +1,3 @@
'use strict';
module.exports = require('./async').detectLimit;

View File

@@ -0,0 +1 @@
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../../../src/metrics/public-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,KAAK,EAAE,MAAM,EAAc,MAAM,uBAAuB,CAAC;AAGhE;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;IAElC;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAiBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,GAAE,MAAU,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAEpF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAEhF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAEvF"}

View File

@@ -0,0 +1,96 @@
import { SeverityLevel } from './severity';
/**
* Sentry uses breadcrumbs to create a trail of events that happened prior to an issue.
* These events are very similar to traditional logs but can record more rich structured data.
*
* @link https://develop.sentry.dev/sdk/event-payloads/breadcrumbs/
*/
export interface Breadcrumb {
/**
* By default, all breadcrumbs are recorded as default, which makes them appear as a Debug entry, but Sentry provides
* other types that influence how the breadcrumbs are rendered. For more information, see the description of
* recognized breadcrumb types.
*
* @summary The type of breadcrumb.
* @link https://develop.sentry.dev/sdk/event-payloads/breadcrumbs/#breadcrumb-types
*/
type?: string;
/**
* Allowed values are, from highest to lowest:
* `fatal`, `error`, `warning`, `info`, and `debug`.
* Levels are used in the UI to emphasize and deemphasize the crumb. The default is `info`.
*
* @summary This defines the severity level of the breadcrumb.
*/
level?: SeverityLevel;
event_id?: string;
/**
* Typically it is a module name or a descriptive string. For instance, `ui.click` could be used to
* indicate that a click happened in the UI or flask could be used to indicate that the event originated in
* the Flask framework.
* @private Internally we render some crumbs' color and icon based on the provided category.
* For more information, see the description of recognized breadcrumb types.
* @summary A dotted string indicating what the crumb is or from where it comes.
* @link https://develop.sentry.dev/sdk/event-payloads/breadcrumbs/#breadcrumb-types
*/
category?: string;
/**
* If a message is provided, it is rendered as text with all whitespace preserved.
*
* @summary Human-readable message for the breadcrumb.
*/
message?: string;
/**
* Contains a dictionary whose contents depend on the breadcrumb type.
* Additional parameters that are unsupported by the type are rendered as a key/value table.
*
* @summary Arbitrary data associated with this breadcrumb.
*/
data?: {
[key: string]: any;
};
/**
* The format is a numeric (integer or float) value representing
* the number of seconds that have elapsed since the Unixepoch.
* Breadcrumbs are most useful when they include a timestamp, as it creates a timeline
* leading up to an event expection/error.
*
* @note The API supports a string as defined in RFC 3339, but the SDKs only support a numeric value for now.
*
* @summary A timestamp representing when the breadcrumb occurred.
* @link https://develop.sentry.dev/sdk/event-payloads/breadcrumbs/#:~:text=is%20info.-,timestamp,-(recommended)
*/
timestamp?: number;
}
/** JSDoc */
export interface BreadcrumbHint {
[key: string]: any;
}
export interface FetchBreadcrumbData {
method: string;
url: string;
status_code?: number;
request_body_size?: number;
response_body_size?: number;
}
export interface XhrBreadcrumbData {
method?: string;
url?: string;
status_code?: number;
request_body_size?: number;
response_body_size?: number;
}
export interface FetchBreadcrumbHint {
input: any[];
data?: unknown;
response?: unknown;
startTimestamp: number;
endTimestamp?: number;
}
export interface XhrBreadcrumbHint {
xhr: unknown;
input: unknown;
startTimestamp: number;
endTimestamp: number;
}
//# sourceMappingURL=breadcrumb.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"globalListeners.d.ts","sourceRoot":"","sources":["../../../../../src/metrics/web-vitals/lib/globalListeners.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,QAIjH;AACD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,QAIpH"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"SamplingResult.js","sourceRoot":"","sources":["../../../src/trace/SamplingResult.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH;;;;GAIG;AACH,MAAM,CAAN,IAAY,gBAgBX;AAhBD,WAAY,gBAAgB;IAC1B;;;OAGG;IACH,mEAAU,CAAA;IACV;;;OAGG;IACH,2DAAM,CAAA;IACN;;;OAGG;IACH,mFAAkB,CAAA;AACpB,CAAC,EAhBW,gBAAgB,KAAhB,gBAAgB,QAgB3B","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 { SpanAttributes } from './attributes';\nimport { TraceState } from './trace_state';\n\n/**\n * @deprecated use the one declared in @opentelemetry/sdk-trace-base instead.\n * A sampling decision that determines how a {@link Span} will be recorded\n * and collected.\n */\nexport enum SamplingDecision {\n /**\n * `Span.isRecording() === false`, span will not be recorded and all events\n * and attributes will be dropped.\n */\n NOT_RECORD,\n /**\n * `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags}\n * MUST NOT be set.\n */\n RECORD,\n /**\n * `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags}\n * MUST be set.\n */\n RECORD_AND_SAMPLED,\n}\n\n/**\n * @deprecated use the one declared in @opentelemetry/sdk-trace-base instead.\n * A sampling result contains a decision for a {@link Span} and additional\n * attributes the sampler would like to added to the Span.\n */\nexport interface SamplingResult {\n /**\n * A sampling decision, refer to {@link SamplingDecision} for details.\n */\n decision: SamplingDecision;\n /**\n * The list of attributes returned by SamplingResult MUST be immutable.\n * Caller may call {@link Sampler}.shouldSample any number of times and\n * can safely cache the returned value.\n */\n attributes?: Readonly<SpanAttributes>;\n /**\n * A {@link TraceState} that will be associated with the {@link Span} through\n * the new {@link SpanContext}. Samplers SHOULD return the TraceState from\n * the passed-in {@link Context} if they do not intend to change it. Leaving\n * the value undefined will also leave the TraceState unchanged.\n */\n traceState?: TraceState;\n}\n"]}

View File

@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Tv = createLucideIcon("Tv", [
["rect", { width: "20", height: "15", x: "2", y: "7", rx: "2", ry: "2", key: "10ag99" }],
["polyline", { points: "17 2 12 7 7 2", key: "11pgbg" }]
]);
export { Tv as default };
//# sourceMappingURL=tv.js.map

View File

@@ -0,0 +1,12 @@
import type { Event, EventHint } from './event';
/**
* Event processors are used to change the event before it will be sent.
* We strongly advise to make this function sync.
* Returning a PromiseLike<Event | null> will work just fine, but better be sure that you know what you are doing.
* Event processing will be deferred until your Promise is resolved.
*/
export interface EventProcessor {
(event: Event, hint: EventHint): PromiseLike<Event | null> | Event | null;
id?: string;
}
//# sourceMappingURL=eventprocessor.d.ts.map

View File

@@ -0,0 +1,211 @@
# escalade [![CI](https://github.com/lukeed/escalade/workflows/CI/badge.svg)](https://github.com/lukeed/escalade/actions) [![licenses](https://licenses.dev/b/npm/escalade)](https://licenses.dev/npm/escalade) [![codecov](https://badgen.now.sh/codecov/c/github/lukeed/escalade)](https://codecov.io/gh/lukeed/escalade)
> A tiny (183B to 210B) and [fast](#benchmarks) utility to ascend parent directories
With [escalade](https://en.wikipedia.org/wiki/Escalade), you can scale parent directories until you've found what you're looking for.<br>Given an input file or directory, `escalade` will continue executing your callback function until either:
1) the callback returns a truthy value
2) `escalade` has reached the system root directory (eg, `/`)
> **Important:**<br>Please note that `escalade` only deals with direct ancestry it will not dive into parents' sibling directories.
---
**Notice:** As of v3.1.0, `escalade` now includes [Deno support](http://deno.land/x/escalade)! Please see [Deno Usage](#deno) below.
---
## Install
```
$ npm install --save escalade
```
## Modes
There are two "versions" of `escalade` available:
#### "async"
> **Node.js:** >= 8.x<br>
> **Size (gzip):** 210 bytes<br>
> **Availability:** [CommonJS](https://unpkg.com/escalade/dist/index.js), [ES Module](https://unpkg.com/escalade/dist/index.mjs)
This is the primary/default mode. It makes use of `async`/`await` and [`util.promisify`](https://nodejs.org/api/util.html#util_util_promisify_original).
#### "sync"
> **Node.js:** >= 6.x<br>
> **Size (gzip):** 183 bytes<br>
> **Availability:** [CommonJS](https://unpkg.com/escalade/sync/index.js), [ES Module](https://unpkg.com/escalade/sync/index.mjs)
This is the opt-in mode, ideal for scenarios where `async` usage cannot be supported.
## Usage
***Example Structure***
```
/Users/lukeed
└── oss
├── license
└── escalade
├── package.json
└── test
└── fixtures
├── index.js
└── foobar
└── demo.js
```
***Example Usage***
```js
//~> demo.js
import { join } from 'path';
import escalade from 'escalade';
const input = join(__dirname, 'demo.js');
// or: const input = __dirname;
const pkg = await escalade(input, (dir, names) => {
console.log('~> dir:', dir);
console.log('~> names:', names);
console.log('---');
if (names.includes('package.json')) {
// will be resolved into absolute
return 'package.json';
}
});
//~> dir: /Users/lukeed/oss/escalade/test/fixtures/foobar
//~> names: ['demo.js']
//---
//~> dir: /Users/lukeed/oss/escalade/test/fixtures
//~> names: ['index.js', 'foobar']
//---
//~> dir: /Users/lukeed/oss/escalade/test
//~> names: ['fixtures']
//---
//~> dir: /Users/lukeed/oss/escalade
//~> names: ['package.json', 'test']
//---
console.log(pkg);
//=> /Users/lukeed/oss/escalade/package.json
// Now search for "missing123.txt"
// (Assume it doesn't exist anywhere!)
const missing = await escalade(input, (dir, names) => {
console.log('~> dir:', dir);
return names.includes('missing123.txt') && 'missing123.txt';
});
//~> dir: /Users/lukeed/oss/escalade/test/fixtures/foobar
//~> dir: /Users/lukeed/oss/escalade/test/fixtures
//~> dir: /Users/lukeed/oss/escalade/test
//~> dir: /Users/lukeed/oss/escalade
//~> dir: /Users/lukeed/oss
//~> dir: /Users/lukeed
//~> dir: /Users
//~> dir: /
console.log(missing);
//=> undefined
```
> **Note:** To run the above example with "sync" mode, import from `escalade/sync` and remove the `await` keyword.
## API
### escalade(input, callback)
Returns: `string|void` or `Promise<string|void>`
When your `callback` locates a file, `escalade` will resolve/return with an absolute path.<br>
If your `callback` was never satisfied, then `escalade` will resolve/return with nothing (undefined).
> **Important:**<br>The `sync` and `async` versions share the same API.<br>The **only** difference is that `sync` is not Promise-based.
#### input
Type: `string`
The path from which to start ascending.
This may be a file or a directory path.<br>However, when `input` is a file, `escalade` will begin with its parent directory.
> **Important:** Unless given an absolute path, `input` will be resolved from `process.cwd()` location.
#### callback
Type: `Function`
The callback to execute for each ancestry level. It always is given two arguments:
1) `dir` - an absolute path of the current parent directory
2) `names` - a list (`string[]`) of contents _relative to_ the `dir` parent
> **Note:** The `names` list can contain names of files _and_ directories.
When your callback returns a _falsey_ value, then `escalade` will continue with `dir`'s parent directory, re-invoking your callback with new argument values.
When your callback returns a string, then `escalade` stops iteration immediately.<br>
If the string is an absolute path, then it's left as is. Otherwise, the string is resolved into an absolute path _from_ the `dir` that housed the satisfying condition.
> **Important:** Your `callback` can be a `Promise/AsyncFunction` when using the "async" version of `escalade`.
## Benchmarks
> Running on Node.js v10.13.0
```
# Load Time
find-up 3.891ms
escalade 0.485ms
escalade/sync 0.309ms
# Levels: 6 (target = "foo.txt"):
find-up x 24,856 ops/sec ±6.46% (55 runs sampled)
escalade x 73,084 ops/sec ±4.23% (73 runs sampled)
find-up.sync x 3,663 ops/sec ±1.12% (83 runs sampled)
escalade/sync x 9,360 ops/sec ±0.62% (88 runs sampled)
# Levels: 12 (target = "package.json"):
find-up x 29,300 ops/sec ±10.68% (70 runs sampled)
escalade x 73,685 ops/sec ± 5.66% (66 runs sampled)
find-up.sync x 1,707 ops/sec ± 0.58% (91 runs sampled)
escalade/sync x 4,667 ops/sec ± 0.68% (94 runs sampled)
# Levels: 18 (target = "missing123.txt"):
find-up x 21,818 ops/sec ±17.37% (14 runs sampled)
escalade x 67,101 ops/sec ±21.60% (20 runs sampled)
find-up.sync x 1,037 ops/sec ± 2.86% (88 runs sampled)
escalade/sync x 1,248 ops/sec ± 0.50% (93 runs sampled)
```
## Deno
As of v3.1.0, `escalade` is available on the Deno registry.
Please note that the [API](#api) is identical and that there are still [two modes](#modes) from which to choose:
```ts
// Choose "async" mode
import escalade from 'https://deno.land/escalade/async.ts';
// Choose "sync" mode
import escalade from 'https://deno.land/escalade/sync.ts';
```
> **Important:** The `allow-read` permission is required!
## Related
- [premove](https://github.com/lukeed/premove) - A tiny (247B) utility to remove items recursively
- [totalist](https://github.com/lukeed/totalist) - A tiny (195B to 224B) utility to recursively list all (total) files in a directory
- [mk-dirs](https://github.com/lukeed/mk-dirs) - A tiny (420B) utility to make a directory and its parents, recursively
## License
MIT © [Luke Edwards](https://lukeed.com)

View File

@@ -0,0 +1,51 @@
"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.ProxyLoggerProvider = void 0;
const NoopLoggerProvider_1 = require("./NoopLoggerProvider");
const ProxyLogger_1 = require("./ProxyLogger");
class ProxyLoggerProvider {
getLogger(name, version, options) {
var _a;
return ((_a = this._getDelegateLogger(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyLogger_1.ProxyLogger(this, name, version, options));
}
/**
* Get the delegate logger provider.
* Used by tests only.
* @internal
*/
_getDelegate() {
var _a;
return (_a = this._delegate) !== null && _a !== void 0 ? _a : NoopLoggerProvider_1.NOOP_LOGGER_PROVIDER;
}
/**
* Set the delegate logger provider
* @internal
*/
_setDelegate(delegate) {
this._delegate = delegate;
}
/**
* @internal
*/
_getDelegateLogger(name, version, options) {
var _a;
return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getLogger(name, version, options);
}
}
exports.ProxyLoggerProvider = ProxyLoggerProvider;
//# sourceMappingURL=ProxyLoggerProvider.js.map

View File

@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.usePattern = exports.metaSchemaRef = void 0;
const codegen_1 = require("ajv/dist/compile/codegen");
const META_SCHEMA_ID = "http://json-schema.org/schema";
function metaSchemaRef({ defaultMeta } = {}) {
return defaultMeta === false ? {} : { $ref: defaultMeta || META_SCHEMA_ID };
}
exports.metaSchemaRef = metaSchemaRef;
function usePattern({ gen, it: { opts } }, pattern, flags = opts.unicodeRegExp ? "u" : "") {
const rx = new RegExp(pattern, flags);
return gen.scopeValue("pattern", {
key: rx.toString(),
ref: rx,
code: (0, codegen_1._) `new RegExp(${pattern}, ${flags})`,
});
}
exports.usePattern = usePattern;
//# sourceMappingURL=_util.js.map

View File

@@ -0,0 +1,33 @@
/**
* Formats the given values into a string.
*
* @param values - The values to format.
* @param normalizeDepth - The depth to normalize the values.
* @param normalizeMaxBreadth - The max breadth to normalize the values.
* @returns The formatted string.
*/
export declare function formatConsoleArgs(values: unknown[], normalizeDepth: number, normalizeMaxBreadth: number): string;
/**
* Joins the given values into a string.
*
* @param values - The values to join.
* @param normalizeDepth - The depth to normalize the values.
* @param normalizeMaxBreadth - The max breadth to normalize the values.
* @returns The joined string.
*/
export declare function safeJoinConsoleArgs(values: unknown[], normalizeDepth: number, normalizeMaxBreadth: number): string;
/**
* Checks if a string contains console substitution patterns like %s, %d, %i, %f, %o, %O, %c.
*
* @param str - The string to check
* @returns true if the string contains console substitution patterns
*/
export declare function hasConsoleSubstitutions(str: string): boolean;
/**
* Creates template attributes for multiple console arguments.
*
* @param args - The console arguments
* @returns An object with template and parameter attributes
*/
export declare function createConsoleTemplateAttributes(firstArg: unknown, followingArgs: unknown[]): Record<string, unknown>;
//# sourceMappingURL=utils.d.ts.map

View File

@@ -0,0 +1,111 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
import { util } from "../helpers/util.js";
const fish = z.object({
name: z.string(),
age: z.number(),
nested: z.object({}),
});
test("pick type inference", () => {
const nameonlyFish = fish.pick({ name: true });
type nameonlyFish = z.infer<typeof nameonlyFish>;
util.assertEqual<nameonlyFish, { name: string }>(true);
});
test("pick parse - success", () => {
const nameonlyFish = fish.pick({ name: true });
nameonlyFish.parse({ name: "bob" });
// @ts-expect-error checking runtime picks `name` only.
const anotherNameonlyFish = fish.pick({ name: true, age: false });
anotherNameonlyFish.parse({ name: "bob" });
});
test("pick parse - fail", () => {
fish.pick({ name: true }).parse({ name: "12" } as any);
fish.pick({ name: true }).parse({ name: "bob", age: 12 } as any);
fish.pick({ age: true }).parse({ age: 12 } as any);
const nameonlyFish = fish.pick({ name: true }).strict();
const bad1 = () => nameonlyFish.parse({ name: 12 } as any);
const bad2 = () => nameonlyFish.parse({ name: "bob", age: 12 } as any);
const bad3 = () => nameonlyFish.parse({ age: 12 } as any);
// @ts-expect-error checking runtime picks `name` only.
const anotherNameonlyFish = fish.pick({ name: true, age: false }).strict();
const bad4 = () => anotherNameonlyFish.parse({ name: "bob", age: 12 } as any);
expect(bad1).toThrow();
expect(bad2).toThrow();
expect(bad3).toThrow();
expect(bad4).toThrow();
});
test("omit type inference", () => {
const nonameFish = fish.omit({ name: true });
type nonameFish = z.infer<typeof nonameFish>;
util.assertEqual<nonameFish, { age: number; nested: {} }>(true);
});
test("omit parse - success", () => {
const nonameFish = fish.omit({ name: true });
nonameFish.parse({ age: 12, nested: {} });
// @ts-expect-error checking runtime omits `name` only.
const anotherNonameFish = fish.omit({ name: true, age: false });
anotherNonameFish.parse({ age: 12, nested: {} });
});
test("omit parse - fail", () => {
const nonameFish = fish.omit({ name: true });
const bad1 = () => nonameFish.parse({ name: 12 } as any);
const bad2 = () => nonameFish.parse({ age: 12 } as any);
const bad3 = () => nonameFish.parse({} as any);
// @ts-expect-error checking runtime omits `name` only.
const anotherNonameFish = fish.omit({ name: true, age: false });
const bad4 = () => anotherNonameFish.parse({ nested: {} } as any);
expect(bad1).toThrow();
expect(bad2).toThrow();
expect(bad3).toThrow();
expect(bad4).toThrow();
});
test("nonstrict inference", () => {
const laxfish = fish.pick({ name: true }).catchall(z.any());
type laxfish = z.infer<typeof laxfish>;
util.assertEqual<laxfish, { name: string } & { [k: string]: any }>(true);
});
test("nonstrict parsing - pass", () => {
const laxfish = fish.passthrough().pick({ name: true });
laxfish.parse({ name: "asdf", whatever: "asdf" });
laxfish.parse({ name: "asdf", age: 12, nested: {} });
});
test("nonstrict parsing - fail", () => {
const laxfish = fish.passthrough().pick({ name: true });
const bad = () => laxfish.parse({ whatever: "asdf" } as any);
expect(bad).toThrow();
});
test("pick/omit/required/partial - do not allow unknown keys", () => {
const schema = z.object({
name: z.string(),
age: z.number(),
});
// @ts-expect-error
schema.pick({ $unknown: true });
// @ts-expect-error
schema.omit({ $unknown: true });
// @ts-expect-error
schema.required({ $unknown: true });
// @ts-expect-error
schema.partial({ $unknown: true });
});

View File

@@ -0,0 +1 @@
{"version":3,"file":"amqplib.js","sources":["../../../../src/integrations/tracing/amqplib.ts"],"sourcesContent":["import type { Span } from '@opentelemetry/api';\nimport { AmqplibInstrumentation, type AmqplibInstrumentationConfig } from '@opentelemetry/instrumentation-amqplib';\nimport type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration } from '@sentry/core';\nimport { addOriginToSpan, generateInstrumentOnce } from '@sentry/node-core';\n\nconst INTEGRATION_NAME = 'Amqplib';\n\nconst config: AmqplibInstrumentationConfig = {\n consumeEndHook: (span: Span) => {\n addOriginToSpan(span, 'auto.amqplib.otel.consumer');\n },\n publishHook: (span: Span) => {\n addOriginToSpan(span, 'auto.amqplib.otel.publisher');\n },\n};\n\nexport const instrumentAmqplib = generateInstrumentOnce(INTEGRATION_NAME, () => new AmqplibInstrumentation(config));\n\nconst _amqplibIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentAmqplib();\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [amqplib](https://www.npmjs.com/package/amqplib) library.\n *\n * For more information, see the [`amqplibIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/amqplib/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.amqplibIntegration()],\n * });\n * ```\n */\nexport const amqplibIntegration = defineIntegration(_amqplibIntegration);\n"],"names":[],"mappings":";;;;AAMA,MAAM,gBAAA,GAAmB,SAAS;;AAElC,MAAM,MAAM,GAAiC;AAC7C,EAAE,cAAc,EAAE,CAAC,IAAI,KAAW;AAClC,IAAI,eAAe,CAAC,IAAI,EAAE,4BAA4B,CAAC;AACvD,EAAE,CAAC;AACH,EAAE,WAAW,EAAE,CAAC,IAAI,KAAW;AAC/B,IAAI,eAAe,CAAC,IAAI,EAAE,6BAA6B,CAAC;AACxD,EAAE,CAAC;AACH,CAAC;;AAEM,MAAM,iBAAA,GAAoB,sBAAsB,CAAC,gBAAgB,EAAE,MAAM,IAAI,sBAAsB,CAAC,MAAM,CAAC;;AAElH,MAAM,mBAAA,IAAuB,MAAM;AACnC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,gBAAgB;AAC1B,IAAI,SAAS,GAAG;AAChB,MAAM,iBAAiB,EAAE;AACzB,IAAI,CAAC;AACL,GAAG;AACH,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACa,kBAAA,GAAqB,iBAAiB,CAAC,mBAAmB;;;;"}

View File

@@ -0,0 +1,23 @@
var baseAt = require('./_baseAt'),
flatRest = require('./_flatRest');
/**
* Creates an array of values corresponding to `paths` of `object`.
*
* @static
* @memberOf _
* @since 1.0.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {...(string|string[])} [paths] The property paths to pick.
* @returns {Array} Returns the picked values.
* @example
*
* var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
*
* _.at(object, ['a[0].b.c', 'a[1]']);
* // => [3, 4]
*/
var at = flatRest(baseAt);
module.exports = at;

View File

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

View File

@@ -0,0 +1,4 @@
import React from 'react';
import './index.scss';
export declare const CopyLocaleData: React.FC;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,105 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
'use strict';
var devtoolsCore = require('@lexical/devtools-core');
var utils = require('@lexical/utils');
var React = require('react');
var jsxRuntime = require('react/jsx-runtime');
function _interopNamespaceDefault(e) {
var n = Object.create(null);
if (e) {
for (var k in e) {
n[k] = e[k];
}
}
n.default = e;
return n;
}
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
/**
* 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.
*
*/
function TreeView({
treeTypeButtonClassName,
timeTravelButtonClassName,
timeTravelPanelSliderClassName,
timeTravelPanelButtonClassName,
timeTravelPanelClassName,
viewClassName,
editor,
customPrintNode
}) {
const treeElementRef = /*#__PURE__*/React__namespace.createRef();
const [editorCurrentState, setEditorCurrentState] = React.useState(editor.getEditorState());
const commandsLog = devtoolsCore.useLexicalCommandsLog(editor);
React.useEffect(() => {
// Registers listeners to update the tree view when the editor state changes
return utils.mergeRegister(editor.registerUpdateListener(({
editorState
}) => {
setEditorCurrentState(editorState);
}), editor.registerEditableListener(() => {
setEditorCurrentState(editor.getEditorState());
}));
}, [editor]);
React.useEffect(() => {
const element = treeElementRef.current;
if (element !== null) {
// Assigns the editor instance to the tree view DOM element for internal tracking
// @ts-ignore Internal field used by Lexical
element.__lexicalEditor = editor;
return () => {
// Cleans up the reference when the component is unmounted
// @ts-ignore Internal field used by Lexical
element.__lexicalEditor = null;
};
}
}, [editor, treeElementRef]);
/**
* Handles toggling the readonly state of the editor.
*
* @param {boolean} isReadonly - Whether the editor should be set to readonly.
*/
const handleEditorReadOnly = isReadonly => {
const rootElement = editor.getRootElement();
if (rootElement == null) {
return;
}
rootElement.contentEditable = isReadonly ? 'false' : 'true';
};
return /*#__PURE__*/jsxRuntime.jsx(devtoolsCore.TreeView, {
treeTypeButtonClassName: treeTypeButtonClassName,
timeTravelButtonClassName: timeTravelButtonClassName,
timeTravelPanelSliderClassName: timeTravelPanelSliderClassName,
timeTravelPanelButtonClassName: timeTravelPanelButtonClassName,
viewClassName: viewClassName,
timeTravelPanelClassName: timeTravelPanelClassName,
setEditorReadOnly: handleEditorReadOnly,
editorState: editorCurrentState,
setEditorState: state => editor.setEditorState(state),
generateContent: async function (exportDOM) {
// Generates the content for the tree view, allowing customization with exportDOM and customPrintNode
return devtoolsCore.generateContent(editor, commandsLog, exportDOM, customPrintNode);
},
ref: treeElementRef,
commandsLog: commandsLog
});
}
exports.TreeView = TreeView;

View File

@@ -0,0 +1,79 @@
{
"name": "@faceless-ui/scroll-info",
"version": "2.0.0",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"homepage:": "https://facelessui.com/docs/scroll-info",
"repository": "git@github.com:faceless-ui/scroll-info.git",
"description": "A React library for subscribing to scroll events",
"author": {
"email": "jacobsfletch@gmail.com",
"name": "Jacob Fletcher",
"url": "https://jacobsfletch.com"
},
"bugs": {
"url": "https://github.com/faceless-ui/scroll-info/issues",
"email": "dev@facelessui.com"
},
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/jacobsfletch"
}
],
"contributors": [],
"license": "MIT",
"keywords": [
"react",
"react-component",
"scroll",
"position",
"ui",
"ux"
],
"scripts": {
"build": "yarn lint:src && tsc --project tsconfig.build.json",
"build:demo": "webpack --config webpack.build-demo.config.js",
"dev": "webpack serve --config webpack.dev.config.js",
"lint:src": "eslint ./src",
"lint:demo": "eslint ./demo",
"test": "jest"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
},
"devDependencies": {
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.5",
"@types/node": "^14.14.22",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.3.1",
"@types/webpack": "^5.28.5",
"eslint": "^8.56.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^26.1.5",
"eslint-plugin-jest-dom": "^4.0.1",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.5.0",
"eslint-webpack-plugin": "^3.1.1",
"html-webpack-plugin": "^5.5.0",
"jest": "^28.0.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-refresh": "^0.13.0",
"react-refresh-typescript": "^2.0.4",
"ts-loader": "^9.5.1",
"typescript": "^5.4.5",
"webpack": "^5.91.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.4"
},
"files": [
"dist"
]
}

View File

@@ -0,0 +1,180 @@
import { createClientFields } from '../../fields/config/client.js';
const serverOnlyCollectionProperties = [
'hooks',
'access',
'endpoints',
'custom',
'joins',
'polymorphicJoins',
'flattenedFields',
'indexes',
'sanitizedIndexes'
];
const serverOnlyUploadProperties = [
'adminThumbnail',
'externalFileHeaderFilter',
'handlers',
'modifyResponseHeaders',
'withMetadata'
];
const serverOnlyCollectionAdminProperties = [
'hidden',
'baseFilter',
'baseListFilter',
'components',
'formatDocURL'
];
export const createClientCollectionConfig = ({ collection, defaultIDType, i18n, importMap })=>{
const clientCollection = {};
for(const key in collection){
if (serverOnlyCollectionProperties.includes(key)) {
continue;
}
switch(key){
case 'admin':
if (!collection.admin) {
break;
}
clientCollection.admin = {};
for(const adminKey in collection.admin){
if (serverOnlyCollectionAdminProperties.includes(adminKey)) {
continue;
}
switch(adminKey){
case 'description':
if (typeof collection.admin.description === 'string' || typeof collection.admin.description === 'object') {
if (collection.admin.description) {
clientCollection.admin.description = collection.admin.description;
}
} else if (typeof collection.admin.description === 'function') {
const description = collection.admin.description({
t: i18n.t
});
if (description) {
clientCollection.admin.description = description;
}
}
break;
case 'livePreview':
clientCollection.admin.livePreview = {};
if (collection.admin.livePreview?.breakpoints) {
clientCollection.admin.livePreview.breakpoints = collection.admin.livePreview.breakpoints;
}
break;
case 'preview':
if (collection.admin.preview) {
clientCollection.admin.preview = true;
}
break;
default:
;
clientCollection.admin[adminKey] = collection.admin[adminKey];
}
}
break;
case 'auth':
if (!collection.auth) {
break;
}
clientCollection.auth = {};
if (collection.auth.cookies) {
clientCollection.auth.cookies = collection.auth.cookies;
}
if (collection.auth.depth !== undefined) {
// Check for undefined as it can be a number (0)
clientCollection.auth.depth = collection.auth.depth;
}
if (collection.auth.disableLocalStrategy) {
clientCollection.auth.disableLocalStrategy = collection.auth.disableLocalStrategy;
}
if (collection.auth.lockTime !== undefined) {
// Check for undefined as it can be a number (0)
clientCollection.auth.lockTime = collection.auth.lockTime;
}
if (collection.auth.loginWithUsername) {
clientCollection.auth.loginWithUsername = collection.auth.loginWithUsername;
}
if (collection.auth.maxLoginAttempts !== undefined) {
// Check for undefined as it can be a number (0)
clientCollection.auth.maxLoginAttempts = collection.auth.maxLoginAttempts;
}
if (collection.auth.removeTokenFromResponses) {
clientCollection.auth.removeTokenFromResponses = collection.auth.removeTokenFromResponses;
}
if (collection.auth.useAPIKey) {
clientCollection.auth.useAPIKey = collection.auth.useAPIKey;
}
if (collection.auth.tokenExpiration) {
clientCollection.auth.tokenExpiration = collection.auth.tokenExpiration;
}
if (collection.auth.verify) {
clientCollection.auth.verify = true;
}
break;
case 'fields':
clientCollection.fields = createClientFields({
defaultIDType,
fields: collection.fields,
i18n,
importMap
});
break;
case 'labels':
clientCollection.labels = {
plural: typeof collection.labels.plural === 'function' ? collection.labels.plural({
i18n,
t: i18n.t
}) : collection.labels.plural,
singular: typeof collection.labels.singular === 'function' ? collection.labels.singular({
i18n,
t: i18n.t
}) : collection.labels.singular
};
break;
case 'upload':
if (!collection.upload) {
break;
}
clientCollection.upload = {};
for(const uploadKey in collection.upload){
if (serverOnlyUploadProperties.includes(uploadKey)) {
continue;
}
if (uploadKey === 'imageSizes') {
clientCollection.upload.imageSizes = collection.upload.imageSizes?.map((size)=>{
const sanitizedSize = {
...size
};
if ('generateImageName' in sanitizedSize) {
delete sanitizedSize.generateImageName;
}
return sanitizedSize;
});
} else {
;
clientCollection.upload[uploadKey] = collection.upload[uploadKey];
}
}
break;
default:
;
clientCollection[key] = collection[key];
}
}
return clientCollection;
};
export const createClientCollectionConfigs = ({ collections, defaultIDType, i18n, importMap })=>{
const clientCollections = new Array(collections.length);
for(let i = 0; i < collections.length; i++){
const collection = collections[i];
clientCollections[i] = createClientCollectionConfig({
collection,
defaultIDType,
i18n,
importMap
});
}
return clientCollections;
};
//# sourceMappingURL=client.js.map

View File

@@ -0,0 +1,504 @@
(() => {
var _window$dateFns;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);}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/ko/_lib/formatDistance.js
var formatDistanceLocale = {
lessThanXSeconds: {
one: "1\uCD08 \uBBF8\uB9CC",
other: "{{count}}\uCD08 \uBBF8\uB9CC"
},
xSeconds: {
one: "1\uCD08",
other: "{{count}}\uCD08"
},
halfAMinute: "30\uCD08",
lessThanXMinutes: {
one: "1\uBD84 \uBBF8\uB9CC",
other: "{{count}}\uBD84 \uBBF8\uB9CC"
},
xMinutes: {
one: "1\uBD84",
other: "{{count}}\uBD84"
},
aboutXHours: {
one: "\uC57D 1\uC2DC\uAC04",
other: "\uC57D {{count}}\uC2DC\uAC04"
},
xHours: {
one: "1\uC2DC\uAC04",
other: "{{count}}\uC2DC\uAC04"
},
xDays: {
one: "1\uC77C",
other: "{{count}}\uC77C"
},
aboutXWeeks: {
one: "\uC57D 1\uC8FC",
other: "\uC57D {{count}}\uC8FC"
},
xWeeks: {
one: "1\uC8FC",
other: "{{count}}\uC8FC"
},
aboutXMonths: {
one: "\uC57D 1\uAC1C\uC6D4",
other: "\uC57D {{count}}\uAC1C\uC6D4"
},
xMonths: {
one: "1\uAC1C\uC6D4",
other: "{{count}}\uAC1C\uC6D4"
},
aboutXYears: {
one: "\uC57D 1\uB144",
other: "\uC57D {{count}}\uB144"
},
xYears: {
one: "1\uB144",
other: "{{count}}\uB144"
},
overXYears: {
one: "1\uB144 \uC774\uC0C1",
other: "{{count}}\uB144 \uC774\uC0C1"
},
almostXYears: {
one: "\uAC70\uC758 1\uB144",
other: "\uAC70\uC758 {{count}}\uB144"
}
};
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 result + " \uD6C4";
} else {
return result + " \uC804";
}
}
return result;
};
// lib/locale/_lib/buildFormatLongFn.js
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/ko/_lib/formatLong.js
var dateFormats = {
full: "y\uB144 M\uC6D4 d\uC77C EEEE",
long: "y\uB144 M\uC6D4 d\uC77C",
medium: "y.MM.dd",
short: "y.MM.dd"
};
var timeFormats = {
full: "a H\uC2DC mm\uBD84 ss\uCD08 zzzz",
long: "a H:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm"
};
var dateTimeFormats = {
full: "{{date}} {{time}}",
long: "{{date}} {{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/ko/_lib/formatRelative.js
var formatRelativeLocale = {
lastWeek: "'\uC9C0\uB09C' eeee p",
yesterday: "'\uC5B4\uC81C' p",
today: "'\uC624\uB298' p",
tomorrow: "'\uB0B4\uC77C' p",
nextWeek: "'\uB2E4\uC74C' eeee p",
other: "P"
};
var formatRelative = function formatRelative(token, _date, _baseDate, _options) {return formatRelativeLocale[token];};
// lib/locale/_lib/buildLocalizeFn.js
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/ko/_lib/localize.js
var eraValues = {
narrow: ["BC", "AD"],
abbreviated: ["BC", "AD"],
wide: ["\uAE30\uC6D0\uC804", "\uC11C\uAE30"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
wide: ["1\uBD84\uAE30", "2\uBD84\uAE30", "3\uBD84\uAE30", "4\uBD84\uAE30"]
};
var monthValues = {
narrow: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
abbreviated: [
"1\uC6D4",
"2\uC6D4",
"3\uC6D4",
"4\uC6D4",
"5\uC6D4",
"6\uC6D4",
"7\uC6D4",
"8\uC6D4",
"9\uC6D4",
"10\uC6D4",
"11\uC6D4",
"12\uC6D4"],
wide: [
"1\uC6D4",
"2\uC6D4",
"3\uC6D4",
"4\uC6D4",
"5\uC6D4",
"6\uC6D4",
"7\uC6D4",
"8\uC6D4",
"9\uC6D4",
"10\uC6D4",
"11\uC6D4",
"12\uC6D4"]
};
var dayValues = {
narrow: ["\uC77C", "\uC6D4", "\uD654", "\uC218", "\uBAA9", "\uAE08", "\uD1A0"],
short: ["\uC77C", "\uC6D4", "\uD654", "\uC218", "\uBAA9", "\uAE08", "\uD1A0"],
abbreviated: ["\uC77C", "\uC6D4", "\uD654", "\uC218", "\uBAA9", "\uAE08", "\uD1A0"],
wide: ["\uC77C\uC694\uC77C", "\uC6D4\uC694\uC77C", "\uD654\uC694\uC77C", "\uC218\uC694\uC77C", "\uBAA9\uC694\uC77C", "\uAE08\uC694\uC77C", "\uD1A0\uC694\uC77C"]
};
var dayPeriodValues = {
narrow: {
am: "\uC624\uC804",
pm: "\uC624\uD6C4",
midnight: "\uC790\uC815",
noon: "\uC815\uC624",
morning: "\uC544\uCE68",
afternoon: "\uC624\uD6C4",
evening: "\uC800\uB141",
night: "\uBC24"
},
abbreviated: {
am: "\uC624\uC804",
pm: "\uC624\uD6C4",
midnight: "\uC790\uC815",
noon: "\uC815\uC624",
morning: "\uC544\uCE68",
afternoon: "\uC624\uD6C4",
evening: "\uC800\uB141",
night: "\uBC24"
},
wide: {
am: "\uC624\uC804",
pm: "\uC624\uD6C4",
midnight: "\uC790\uC815",
noon: "\uC815\uC624",
morning: "\uC544\uCE68",
afternoon: "\uC624\uD6C4",
evening: "\uC800\uB141",
night: "\uBC24"
}
};
var formattingDayPeriodValues = {
narrow: {
am: "\uC624\uC804",
pm: "\uC624\uD6C4",
midnight: "\uC790\uC815",
noon: "\uC815\uC624",
morning: "\uC544\uCE68",
afternoon: "\uC624\uD6C4",
evening: "\uC800\uB141",
night: "\uBC24"
},
abbreviated: {
am: "\uC624\uC804",
pm: "\uC624\uD6C4",
midnight: "\uC790\uC815",
noon: "\uC815\uC624",
morning: "\uC544\uCE68",
afternoon: "\uC624\uD6C4",
evening: "\uC800\uB141",
night: "\uBC24"
},
wide: {
am: "\uC624\uC804",
pm: "\uC624\uD6C4",
midnight: "\uC790\uC815",
noon: "\uC815\uC624",
morning: "\uC544\uCE68",
afternoon: "\uC624\uD6C4",
evening: "\uC800\uB141",
night: "\uBC24"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber, options) {
var number = Number(dirtyNumber);
var unit = String(options === null || options === void 0 ? void 0 : options.unit);
switch (unit) {
case "minute":
case "second":
return String(number);
case "date":
return number + "\uC77C";
default:
return number + "\uBC88\uC9F8";
}
};
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.js
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 };
};
}
function findKey(object, predicate) {
for (var key in object) {
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
return key;
}
}
return;
}
function findIndex(array, predicate) {
for (var key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return;
}
// lib/locale/_lib/buildMatchPatternFn.js
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/ko/_lib/match.js
var matchOrdinalNumberPattern = /^(\d+)(일|번째)?/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
wide: /^(기원전|서기)/i
};
var parseEraPatterns = {
any: [/^(bc|기원전)/i, /^(ad|서기)/i]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^q[1234]/i,
wide: /^[1234]사?분기/i
};
var parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i]
};
var matchMonthPatterns = {
narrow: /^(1[012]|[123456789])/,
abbreviated: /^(1[012]|[123456789])월/i,
wide: /^(1[012]|[123456789])월/i
};
var parseMonthPatterns = {
any: [
/^1월?$/,
/^2/,
/^3/,
/^4/,
/^5/,
/^6/,
/^7/,
/^8/,
/^9/,
/^10/,
/^11/,
/^12/]
};
var matchDayPatterns = {
narrow: /^[일월화수목금토]/,
short: /^[일월화수목금토]/,
abbreviated: /^[일월화수목금토]/,
wide: /^[일월화수목금토]요일/
};
var parseDayPatterns = {
any: [/^일/, /^월/, /^화/, /^수/, /^목/, /^금/, /^토/]
};
var matchDayPeriodPatterns = {
any: /^(am|pm|오전|오후|자정|정오|아침|저녁|밤)/i
};
var parseDayPeriodPatterns = {
any: {
am: /^(am|오전)/i,
pm: /^(pm|오후)/i,
midnight: /^자정/i,
noon: /^정오/i,
morning: /^아침/i,
afternoon: /^오후/i,
evening: /^저녁/i,
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/ko.js
var ko = {
code: "ko",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 0,
firstWeekContainsDate: 1
}
};
// lib/locale/ko/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), {}, {
ko: ko }) });
//# debugId=6A07962C81B4D75B64756E2164756E21
//# sourceMappingURL=cdn.js.map
})();

View File

@@ -0,0 +1 @@
{"version":3,"file":"findOne.d.ts","sourceRoot":"","sources":["../../../src/preferences/operations/findOne.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAErD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAIpD,wBAAsB,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC,CA8B9F"}

View File

@@ -0,0 +1,4 @@
export declare const quartersToMonths: import("./types.js").FPFn1<
number,
number
>;

View File

@@ -0,0 +1,157 @@
import { assert } from 'ts-essentials';
import { describe, it, expect } from 'vitest';
import { flattenAllFields } from './flattenAllFields.js';
import { getFieldByPath } from './getFieldByPath.js';
const fields = flattenAllFields({
fields: [
{
type: 'text',
name: 'text'
},
{
type: 'text',
name: 'textLocalized',
localized: true
},
{
type: 'array',
name: 'array',
fields: [
{
name: 'text',
type: 'text'
},
{
name: 'textLocalized',
localized: true,
type: 'text'
},
{
name: 'group',
type: 'group',
fields: [
{
name: 'text',
type: 'text'
}
]
}
]
},
{
type: 'tabs',
tabs: [
{
name: 'tab',
fields: [
{
type: 'array',
name: 'localizedArray',
localized: true,
fields: [
{
name: 'text',
type: 'text'
}
]
}
]
}
]
},
{
type: 'blocks',
name: 'blocks',
blocks: [
{
slug: 'block1',
fields: [
{
name: 'text1',
type: 'text'
}
]
},
{
slug: 'block2',
fields: [
{
name: 'text2',
type: 'text'
}
]
}
]
}
]
});
describe('getFieldByPath', ()=>{
it('asserts getFieldByPath', ()=>{
const assert_1 = getFieldByPath({
fields,
path: 'text'
});
assert(assert_1);
expect(assert_1.field).toBe(fields[0]);
expect(assert_1.pathHasLocalized).toBe(false);
const assert_2 = getFieldByPath({
fields,
path: 'textLocalized'
});
assert(assert_2);
expect(assert_2.field).toBe(fields[1]);
expect(assert_2.pathHasLocalized).toBe(true);
expect(assert_2.localizedPath).toBe('textLocalized.<locale>');
const arrayField = fields[2];
const assert_3 = getFieldByPath({
fields,
path: 'array'
});
assert(assert_3);
expect(assert_3.field).toBe(arrayField);
expect(assert_3.pathHasLocalized).toBe(false);
const assert_4 = getFieldByPath({
fields,
path: 'array.text'
});
assert(assert_4);
expect(assert_4.field).toBe(arrayField.flattenedFields[0]);
expect(assert_4.pathHasLocalized).toBe(false);
const assert_5 = getFieldByPath({
fields,
path: 'array.textLocalized'
});
assert(assert_5);
expect(assert_5.field).toBe(arrayField.flattenedFields[1]);
expect(assert_5.pathHasLocalized).toBe(true);
expect(assert_5.localizedPath).toBe('array.textLocalized.<locale>');
const groupWithinArray = arrayField.flattenedFields[2];
const assert_6 = getFieldByPath({
fields,
path: 'array.group.text'
});
assert(assert_6);
expect(assert_6.field).toBe(groupWithinArray.flattenedFields[0]);
expect(assert_6.pathHasLocalized).toBe(false);
const assert_7 = getFieldByPath({
fields,
path: 'tab.localizedArray.text'
});
assert(assert_7);
expect(assert_7.field).toBe(fields[3].flattenedFields[0].flattenedFields[0]);
expect(assert_7.pathHasLocalized).toBe(true);
expect(assert_7.localizedPath).toBe('tab.localizedArray.<locale>.text');
});
it('gets field nested within block', ()=>{
const fieldInBlock = getFieldByPath({
fields,
path: 'blocks.block2.text2'
});
expect(fieldInBlock?.field).toBeDefined();
const sourceField = fields[4].blocks?.[1].flattenedFields?.[0];
expect(sourceField).toBeDefined();
expect(fieldInBlock?.field).toBe(sourceField);
});
});
//# sourceMappingURL=getFieldByPath.spec.js.map

View File

@@ -0,0 +1,4 @@
var x=String;
var create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x,blackBright:x,redBright:x,greenBright:x,yellowBright:x,blueBright:x,magentaBright:x,cyanBright:x,whiteBright:x,bgBlackBright:x,bgRedBright:x,bgGreenBright:x,bgYellowBright:x,bgBlueBright:x,bgMagentaBright:x,bgCyanBright:x,bgWhiteBright:x}};
module.exports=create();
module.exports.createColors = create;

View File

@@ -0,0 +1,168 @@
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
require('./common');
var assert = require('assert');
var events = require('../');
var util = require('util');
function listener() {}
function listener2() {}
function listener3() {
return 0;
}
function listener4() {
return 1;
}
function TestStream() {}
util.inherits(TestStream, events.EventEmitter);
{
var ee = new events.EventEmitter();
ee.on('foo', listener);
var fooListeners = ee.listeners('foo');
var listeners = ee.listeners('foo');
assert.ok(Array.isArray(listeners));
assert.strictEqual(listeners.length, 1);
assert.strictEqual(listeners[0], listener);
ee.removeAllListeners('foo');
listeners = ee.listeners('foo');
assert.ok(Array.isArray(listeners));
assert.strictEqual(listeners.length, 0);
assert.ok(Array.isArray(fooListeners));
assert.strictEqual(fooListeners.length, 1);
assert.strictEqual(fooListeners[0], listener);
}
{
var ee = new events.EventEmitter();
ee.on('foo', listener);
var eeListenersCopy = ee.listeners('foo');
assert.ok(Array.isArray(eeListenersCopy));
assert.strictEqual(eeListenersCopy.length, 1);
assert.strictEqual(eeListenersCopy[0], listener);
var listeners = ee.listeners('foo');
assert.ok(Array.isArray(listeners));
assert.strictEqual(listeners.length, 1);
assert.strictEqual(listeners[0], listener);
eeListenersCopy.push(listener2);
listeners = ee.listeners('foo');
assert.ok(Array.isArray(listeners));
assert.strictEqual(listeners.length, 1);
assert.strictEqual(listeners[0], listener);
assert.strictEqual(eeListenersCopy.length, 2);
assert.strictEqual(eeListenersCopy[0], listener);
assert.strictEqual(eeListenersCopy[1], listener2);
}
{
var ee = new events.EventEmitter();
ee.on('foo', listener);
var eeListenersCopy = ee.listeners('foo');
ee.on('foo', listener2);
var listeners = ee.listeners('foo');
assert.ok(Array.isArray(listeners));
assert.strictEqual(listeners.length, 2);
assert.strictEqual(listeners[0], listener);
assert.strictEqual(listeners[1], listener2);
assert.ok(Array.isArray(eeListenersCopy));
assert.strictEqual(eeListenersCopy.length, 1);
assert.strictEqual(eeListenersCopy[0], listener);
}
{
var ee = new events.EventEmitter();
ee.once('foo', listener);
var listeners = ee.listeners('foo');
assert.ok(Array.isArray(listeners));
assert.strictEqual(listeners.length, 1);
assert.strictEqual(listeners[0], listener);
}
{
var ee = new events.EventEmitter();
ee.on('foo', listener);
ee.once('foo', listener2);
var listeners = ee.listeners('foo');
assert.ok(Array.isArray(listeners));
assert.strictEqual(listeners.length, 2);
assert.strictEqual(listeners[0], listener);
assert.strictEqual(listeners[1], listener2);
}
{
var ee = new events.EventEmitter();
ee._events = undefined;
var listeners = ee.listeners('foo');
assert.ok(Array.isArray(listeners));
assert.strictEqual(listeners.length, 0);
}
{
var s = new TestStream();
var listeners = s.listeners('foo');
assert.ok(Array.isArray(listeners));
assert.strictEqual(listeners.length, 0);
}
{
var ee = new events.EventEmitter();
ee.on('foo', listener);
var wrappedListener = ee.rawListeners('foo');
assert.strictEqual(wrappedListener.length, 1);
assert.strictEqual(wrappedListener[0], listener);
assert.notStrictEqual(wrappedListener, ee.rawListeners('foo'));
ee.once('foo', listener);
var wrappedListeners = ee.rawListeners('foo');
assert.strictEqual(wrappedListeners.length, 2);
assert.strictEqual(wrappedListeners[0], listener);
assert.notStrictEqual(wrappedListeners[1], listener);
assert.strictEqual(wrappedListeners[1].listener, listener);
assert.notStrictEqual(wrappedListeners, ee.rawListeners('foo'));
ee.emit('foo');
assert.strictEqual(wrappedListeners.length, 2);
assert.strictEqual(wrappedListeners[1].listener, listener);
}
{
var ee = new events.EventEmitter();
ee.once('foo', listener3);
ee.on('foo', listener4);
var rawListeners = ee.rawListeners('foo');
assert.strictEqual(rawListeners.length, 2);
assert.strictEqual(rawListeners[0](), 0);
var rawListener = ee.rawListeners('foo');
assert.strictEqual(rawListener.length, 1);
assert.strictEqual(rawListener[0](), 1);
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"squirrel.js","sources":["../../../src/icons/squirrel.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Squirrel\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTUuMjM2IDIyYTMgMyAwIDAgMC0yLjItNSIgLz4KICA8cGF0aCBkPSJNMTYgMjBhMyAzIDAgMCAxIDMtM2gxYTIgMiAwIDAgMCAyLTJ2LTJhNCA0IDAgMCAwLTQtNFY0IiAvPgogIDxwYXRoIGQ9Ik0xOCAxM2guMDEiIC8+CiAgPHBhdGggZD0iTTE4IDZhNCA0IDAgMCAwLTQgNCA3IDcgMCAwIDAtNyA3YzAtNSA0LTUgNC0xMC41YTQuNSA0LjUgMCAxIDAtOSAwIDIuNSAyLjUgMCAwIDAgNSAwQzcgMTAgMyAxMSAzIDE3YzAgMi44IDIuMiA1IDUgNWgxMCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/squirrel\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 Squirrel = createLucideIcon('Squirrel', [\n ['path', { d: 'M15.236 22a3 3 0 0 0-2.2-5', key: '21bitc' }],\n ['path', { d: 'M16 20a3 3 0 0 1 3-3h1a2 2 0 0 0 2-2v-2a4 4 0 0 0-4-4V4', key: 'oh0fg0' }],\n ['path', { d: 'M18 13h.01', key: '9veqaj' }],\n [\n 'path',\n {\n d: 'M18 6a4 4 0 0 0-4 4 7 7 0 0 0-7 7c0-5 4-5 4-10.5a4.5 4.5 0 1 0-9 0 2.5 2.5 0 0 0 5 0C7 10 3 11 3 17c0 2.8 2.2 5 5 5h10',\n key: '980v8a',\n },\n ],\n]);\n\nexport default Squirrel;\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,CAAA,CAC5C,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,CAAA;AAAA,CAAA,CAC3D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACxF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC3C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,43 @@
1.0.2 - October 25, 2016
------------------------
* fix separator logic to avoid false positives
1.0.1 - March 31, 2016
----------------------
* fix broken uppercase handling
1.0.0 - January 21, 2016
------------------------
* drop component support
* cleanup readme
* add travis ci
* update coding style
0.1.3 - September 29, 2014
--------------------------
* fix non-latin characters
0.1.2 - October 24, 2013
------------------------
* fix camel/pascal case detection
0.1.1 - October 1, 2013
-----------------------
* typo :blush:
0.1.0 - September 18, 2013
--------------------------
* fix camel case bug
0.0.3 - September 18, 2013
--------------------------
* handle unknown cases
0.0.2 - September 18, 2013
--------------------------
* support acronyms at the end of a string
0.0.1 - September 18, 2013
--------------------------
:sparkles:

View File

@@ -0,0 +1,20 @@
import { DecisionTreeNode, ValueContainer } from './Ast';
/**
* A function that turn a decision tree into a usable form.
*
* @typeParam V - the type of associated value.
*
* @typeParam R - return type for this builder
* (Consider using {@link Picker}.)
*/
export declare type BuilderFunction<V, R> = (nodes: DecisionTreeNode<V>[]) => R;
/**
* Recommended matcher function shape to implement
* in builders.
*
* The elements stack is represented as the arguments array.
*
* @typeParam L - the type of elements in a particular DOM AST.
* @typeParam V - the type of associated value.
*/
export declare type MatcherFunction<L, V> = (el: L, ...tail: L[]) => ValueContainer<V>[];

View File

@@ -0,0 +1,3 @@
"use strict";var c=Object.defineProperty;var s=(e,r)=>c(e,"name",{value:r,configurable:!0});var l=require("node:repl"),u=require("./package-Dxt5kIHw.cjs"),q=require("./index-gckBtVBf.cjs");require("node:url"),require("esbuild"),require("node:crypto"),require("node:fs"),require("node:path"),require("node:os"),require("./temporary-directory-B83uKxJF.cjs"),console.log(`Welcome to tsx v${u.version} (Node.js ${process.version}).
Type ".help" for more information.`);const t=l.start(),{eval:p}=t,v=s(async function(e,r,o,i){const a=await q.transform(e,o,{loader:"ts",tsconfigRaw:{compilerOptions:{preserveValueImports:!0}},define:{require:"global.require"}}).catch(n=>(console.log(n.message),{code:`
`}));return p.call(this,a.code,r,o,i)},"preEval");t.eval=v;

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/gel-core/columns/smallint.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 } from './common.ts';\nimport { GelIntColumnBaseBuilder } from './int.common.ts';\n\nexport type GelSmallIntBuilderInitial<TName extends string> = GelSmallIntBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'GelSmallInt';\n\tdata: number;\n\tdriverParam: number;\n\tenumValues: undefined;\n}>;\n\nexport class GelSmallIntBuilder<T extends ColumnBuilderBaseConfig<'number', 'GelSmallInt'>>\n\textends GelIntColumnBaseBuilder<T>\n{\n\tstatic override readonly [entityKind]: string = 'GelSmallIntBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'GelSmallInt');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyGelTable<{ name: TTableName }>,\n\t): GelSmallInt<MakeColumnConfig<T, TTableName>> {\n\t\treturn new GelSmallInt<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class GelSmallInt<T extends ColumnBaseConfig<'number', 'GelSmallInt'>> extends GelColumn<T> {\n\tstatic override readonly [entityKind]: string = 'GelSmallInt';\n\n\tgetSQLType(): string {\n\t\treturn 'smallint';\n\t}\n}\n\nexport function smallint(): GelSmallIntBuilderInitial<''>;\nexport function smallint<TName extends string>(name: TName): GelSmallIntBuilderInitial<TName>;\nexport function smallint(name?: string) {\n\treturn new GelSmallIntBuilder(name ?? '');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,oBAA0B;AAC1B,wBAAwC;AAWjC,MAAM,2BACJ,0CACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,aAAa;AAAA,EACpC;AAAA;AAAA,EAGS,MACR,OAC+C;AAC/C,WAAO,IAAI,YAA6C,OAAO,KAAK,MAA8C;AAAA,EACnH;AACD;AAEO,MAAM,oBAAyE,wBAAa;AAAA,EAClG,QAA0B,wBAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAIO,SAAS,SAAS,MAAe;AACvC,SAAO,IAAI,mBAAmB,QAAQ,EAAE;AACzC;","names":[]}

View File

@@ -0,0 +1,17 @@
var baseIsNative = require('./_baseIsNative'),
getValue = require('./_getValue');
/**
* Gets the native function at `key` of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {string} key The key of the method to get.
* @returns {*} Returns the function if it's native, else `undefined`.
*/
function getNative(object, key) {
var value = getValue(object, key);
return baseIsNative(value) ? value : undefined;
}
module.exports = getNative;

View File

@@ -0,0 +1,24 @@
import {$RefParser, ParserOptions as $RefOptions} from '@apidevtools/json-schema-ref-parser'
import {JSONSchema} from './types/JSONSchema'
import {log} from './utils'
export type DereferencedPaths = WeakMap<JSONSchema, string>
export async function dereference(
schema: JSONSchema,
{cwd, $refOptions}: {cwd: string; $refOptions: $RefOptions},
): Promise<{dereferencedPaths: DereferencedPaths; dereferencedSchema: JSONSchema}> {
log('green', 'dereferencer', 'Dereferencing input schema:', cwd, schema)
const parser = new $RefParser()
const dereferencedPaths: DereferencedPaths = new WeakMap()
const dereferencedSchema = (await parser.dereference(cwd, schema, {
...$refOptions,
dereference: {
...$refOptions.dereference,
onDereference($ref: string, schema: JSONSchema) {
dereferencedPaths.set(schema, $ref)
},
},
})) as any // TODO: fix types
return {dereferencedPaths, dereferencedSchema}
}

View File

@@ -0,0 +1,49 @@
declare type FilePath = string;
declare type GlobPattern = string;
declare namespace ParcelWatcher {
export type BackendType =
| 'fs-events'
| 'watchman'
| 'inotify'
| 'windows'
| 'brute-force';
export type EventType = 'create' | 'update' | 'delete';
export interface Options {
ignore?: (FilePath|GlobPattern)[];
backend?: BackendType;
}
export type SubscribeCallback = (
err: Error | null,
events: Event[]
) => unknown;
export interface AsyncSubscription {
unsubscribe(): Promise<void>;
}
export interface Event {
path: FilePath;
type: EventType;
}
export function getEventsSince(
dir: FilePath,
snapshot: FilePath,
opts?: Options
): Promise<Event[]>;
export function subscribe(
dir: FilePath,
fn: SubscribeCallback,
opts?: Options
): Promise<AsyncSubscription>;
export function unsubscribe(
dir: FilePath,
fn: SubscribeCallback,
opts?: Options
): Promise<void>;
export function writeSnapshot(
dir: FilePath,
snapshot: FilePath,
opts?: Options
): Promise<FilePath>;
}
export = ParcelWatcher;

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/smallint.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '~/pg-core/table.ts';\nimport { PgColumn } from './common.ts';\nimport { PgIntColumnBaseBuilder } from './int.common.ts';\n\nexport type PgSmallIntBuilderInitial<TName extends string> = PgSmallIntBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'PgSmallInt';\n\tdata: number;\n\tdriverParam: number | string;\n\tenumValues: undefined;\n}>;\n\nexport class PgSmallIntBuilder<T extends ColumnBuilderBaseConfig<'number', 'PgSmallInt'>>\n\textends PgIntColumnBaseBuilder<T>\n{\n\tstatic override readonly [entityKind]: string = 'PgSmallIntBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'PgSmallInt');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgSmallInt<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgSmallInt<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class PgSmallInt<T extends ColumnBaseConfig<'number', 'PgSmallInt'>> extends PgColumn<T> {\n\tstatic override readonly [entityKind]: string = 'PgSmallInt';\n\n\tgetSQLType(): string {\n\t\treturn 'smallint';\n\t}\n\n\toverride mapFromDriverValue = (value: number | string): number => {\n\t\tif (typeof value === 'string') {\n\t\t\treturn Number(value);\n\t\t}\n\t\treturn value;\n\t};\n}\n\nexport function smallint(): PgSmallIntBuilderInitial<''>;\nexport function smallint<TName extends string>(name: TName): PgSmallIntBuilderInitial<TName>;\nexport function smallint(name?: string) {\n\treturn new PgSmallIntBuilder(name ?? '');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,oBAAyB;AACzB,wBAAuC;AAWhC,MAAM,0BACJ,yCACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,YAAY;AAAA,EACnC;AAAA;AAAA,EAGS,MACR,OAC8C;AAC9C,WAAO,IAAI,WAA4C,OAAO,KAAK,MAA8C;AAAA,EAClH;AACD;AAEO,MAAM,mBAAuE,uBAAY;AAAA,EAC/F,QAA0B,wBAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AAAA,EAES,qBAAqB,CAAC,UAAmC;AACjE,QAAI,OAAO,UAAU,UAAU;AAC9B,aAAO,OAAO,KAAK;AAAA,IACpB;AACA,WAAO;AAAA,EACR;AACD;AAIO,SAAS,SAAS,MAAe;AACvC,SAAO,IAAI,kBAAkB,QAAQ,EAAE;AACxC;","names":[]}

View File

@@ -0,0 +1,604 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */
/** @typedef {string | number} VersionValue */
/** @typedef {VersionValue | undefined} SemVerRangeItem */
/** @typedef {(SemVerRangeItem | SemVerRangeItem[])[]} SemVerRange */
/**
* @param {string} str version string
* @returns {SemVerRange} parsed version
*/
const parseVersion = (str) => {
/**
* @param {str} str str
* @returns {VersionValue[]} result
*/
var splitAndConvert = function (str) {
return str.split(".").map(function (item) {
// eslint-disable-next-line eqeqeq
return +item == /** @type {string | number} */ (item) ? +item : item;
});
};
var match =
/** @type {RegExpExecArray} */
(/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(str));
/** @type {(VersionValue | undefined | [])[]} */
var ver = match[1] ? splitAndConvert(match[1]) : [];
if (match[2]) {
ver.length++;
ver.push.apply(ver, splitAndConvert(match[2]));
}
if (match[3]) {
ver.push([]);
ver.push.apply(ver, splitAndConvert(match[3]));
}
return ver;
};
module.exports.parseVersion = parseVersion;
/* eslint-disable eqeqeq */
/**
* @param {string} a version
* @param {string} b version
* @returns {boolean} true, iff a < b
*/
const versionLt = (a, b) => {
// @ts-expect-error
a = parseVersion(a);
// @ts-expect-error
b = parseVersion(b);
var i = 0;
for (;;) {
// a b EOA object undefined number string
// EOA a == b a < b b < a a < b a < b
// object b < a (0) b < a a < b a < b
// undefined a < b a < b (0) a < b a < b
// number b < a b < a b < a (1) a < b
// string b < a b < a b < a b < a (1)
// EOA end of array
// (0) continue on
// (1) compare them via "<"
// Handles first row in table
if (i >= a.length) return i < b.length && (typeof b[i])[0] != "u";
var aValue = a[i];
var aType = (typeof aValue)[0];
// Handles first column in table
if (i >= b.length) return aType == "u";
var bValue = b[i];
var bType = (typeof bValue)[0];
if (aType == bType) {
if (aType != "o" && aType != "u" && aValue != bValue) {
return aValue < bValue;
}
i++;
} else {
// Handles remaining cases
if (aType == "o" && bType == "n") return true;
return bType == "s" || aType == "u";
}
}
};
/* eslint-enable eqeqeq */
module.exports.versionLt = versionLt;
/**
* @param {string} str range string
* @returns {SemVerRange} parsed range
*/
module.exports.parseRange = (str) => {
/**
* @param {string} str str
* @returns {VersionValue[]} result
*/
const splitAndConvert = (str) => {
return str
.split(".")
.map((item) => (item !== "NaN" && `${+item}` === item ? +item : item));
};
// see https://docs.npmjs.com/misc/semver#range-grammar for grammar
/**
* @param {string} str str
* @returns {SemVerRangeItem[]}
*/
const parsePartial = (str) => {
const match =
/** @type {RegExpExecArray} */
(/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(str));
/** @type {SemVerRangeItem[]} */
const ver = match[1] ? [0, ...splitAndConvert(match[1])] : [0];
if (match[2]) {
ver.length++;
ver.push.apply(ver, splitAndConvert(match[2]));
}
// remove trailing any matchers
let last = ver[ver.length - 1];
while (
ver.length &&
(last === undefined || /^[*xX]$/.test(/** @type {string} */ (last)))
) {
ver.pop();
last = ver[ver.length - 1];
}
return ver;
};
/**
*
* @param {SemVerRangeItem[]} range range
* @returns {SemVerRangeItem[]}
*/
const toFixed = (range) => {
if (range.length === 1) {
// Special case for "*" is "x.x.x" instead of "="
return [0];
} else if (range.length === 2) {
// Special case for "1" is "1.x.x" instead of "=1"
return [1, ...range.slice(1)];
} else if (range.length === 3) {
// Special case for "1.2" is "1.2.x" instead of "=1.2"
return [2, ...range.slice(1)];
}
return [range.length, ...range.slice(1)];
};
/**
*
* @param {SemVerRangeItem[]} range
* @returns {SemVerRangeItem[]} result
*/
const negate = (range) => {
return [-(/** @type { [number]} */ (range)[0]) - 1, ...range.slice(1)];
};
/**
* @param {string} str str
* @returns {SemVerRange}
*/
const parseSimple = (str) => {
// simple ::= primitive | partial | tilde | caret
// primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | '!' ) ( ' ' ) * partial
// tilde ::= '~' ( ' ' ) * partial
// caret ::= '^' ( ' ' ) * partial
const match = /^(\^|~|<=|<|>=|>|=|v|!)/.exec(str);
const start = match ? match[0] : "";
const remainder = parsePartial(
start.length ? str.slice(start.length).trim() : str.trim()
);
switch (start) {
case "^":
if (remainder.length > 1 && remainder[1] === 0) {
if (remainder.length > 2 && remainder[2] === 0) {
return [3, ...remainder.slice(1)];
}
return [2, ...remainder.slice(1)];
}
return [1, ...remainder.slice(1)];
case "~":
if (remainder.length === 2 && remainder[0] === 0) {
return [1, ...remainder.slice(1)];
}
return [2, ...remainder.slice(1)];
case ">=":
return remainder;
case "=":
case "v":
case "":
return toFixed(remainder);
case "<":
return negate(remainder);
case ">": {
// and( >=, not( = ) ) => >=, =, not, and
const fixed = toFixed(remainder);
// eslint-disable-next-line no-sparse-arrays
return [, fixed, 0, remainder, 2];
}
case "<=":
// or( <, = ) => <, =, or
// eslint-disable-next-line no-sparse-arrays
return [, toFixed(remainder), negate(remainder), 1];
case "!": {
// not =
const fixed = toFixed(remainder);
// eslint-disable-next-line no-sparse-arrays
return [, fixed, 0];
}
default:
throw new Error("Unexpected start value");
}
};
/**
*
* @param {SemVerRangeItem[][]} items items
* @param {number} fn fn
* @returns {SemVerRange} result
*/
const combine = (items, fn) => {
if (items.length === 1) return items[0];
const arr = [];
for (const item of items.slice().reverse()) {
if (0 in item) {
arr.push(item);
} else {
arr.push(...item.slice(1));
}
}
// eslint-disable-next-line no-sparse-arrays
return [, ...arr, ...items.slice(1).map(() => fn)];
};
/**
* @param {string} str str
* @returns {SemVerRange}
*/
const parseRange = (str) => {
// range ::= hyphen | simple ( ' ' ( ' ' ) * simple ) * | ''
// hyphen ::= partial ( ' ' ) * ' - ' ( ' ' ) * partial
const items = str.split(/\s+-\s+/);
if (items.length === 1) {
str = str.trim();
/** @type {SemVerRangeItem[][]} */
const items = [];
const r = /[-0-9A-Za-z]\s+/g;
var start = 0;
/** @type {RegExpExecArray | null} */
var match;
while ((match = r.exec(str))) {
const end = match.index + 1;
items.push(
/** @type {SemVerRangeItem[]} */
(parseSimple(str.slice(start, end).trim()))
);
start = end;
}
items.push(
/** @type {SemVerRangeItem[]} */
(parseSimple(str.slice(start).trim()))
);
return combine(items, 2);
}
const a = parsePartial(items[0]);
const b = parsePartial(items[1]);
// >=a <=b => and( >=a, or( <b, =b ) ) => >=a, <b, =b, or, and
// eslint-disable-next-line no-sparse-arrays
return [, toFixed(b), negate(b), 1, a, 2];
};
/**
* @param {string} str str
* @returns {SemVerRange}
*/
const parseLogicalOr = (str) => {
// range-set ::= range ( logical-or range ) *
// logical-or ::= ( ' ' ) * '||' ( ' ' ) *
const items =
/** @type {SemVerRangeItem[][]} */
(str.split(/\s*\|\|\s*/).map(parseRange));
return combine(items, 1);
};
return parseLogicalOr(str);
};
/* eslint-disable eqeqeq */
/**
* @param {SemVerRange} range
* @returns {string}
*/
const rangeToString = (range) => {
var fixCount = /** @type {number} */ (range[0]);
var str = "";
if (range.length === 1) {
return "*";
} else if (fixCount + 0.5) {
str +=
fixCount == 0
? ">="
: fixCount == -1
? "<"
: fixCount == 1
? "^"
: fixCount == 2
? "~"
: fixCount > 0
? "="
: "!=";
var needDot = 1;
for (var i = 1; i < range.length; i++) {
var item = range[i];
var t = (typeof item)[0];
needDot--;
str +=
t == "u"
? // undefined: prerelease marker, add an "-"
"-"
: // number or string: add the item, set flag to add an "." between two of them
(needDot > 0 ? "." : "") + ((needDot = 2), item);
}
return str;
}
/** @type {string[]} */
var stack = [];
// eslint-disable-next-line no-redeclare
for (var i = 1; i < range.length; i++) {
// eslint-disable-next-line no-redeclare
var item = range[i];
stack.push(
item === 0
? "not(" + pop() + ")"
: item === 1
? "(" + pop() + " || " + pop() + ")"
: item === 2
? stack.pop() + " " + stack.pop()
: rangeToString(/** @type {SemVerRange} */ (item))
);
}
return pop();
function pop() {
return /** @type {string} */ (stack.pop()).replace(/^\((.+)\)$/, "$1");
}
};
module.exports.rangeToString = rangeToString;
/**
* @param {SemVerRange} range version range
* @param {string} version the version
* @returns {boolean} if version satisfy the range
*/
const satisfy = (range, version) => {
if (0 in range) {
// @ts-expect-error
version = parseVersion(version);
var fixCount = /** @type {number} */ (range[0]);
// when negated is set it swill set for < instead of >=
var negated = fixCount < 0;
if (negated) fixCount = -fixCount - 1;
for (var i = 0, j = 1, isEqual = true; ; j++, i++) {
// cspell:word nequal nequ
// when isEqual = true:
// range version: EOA/object undefined number string
// EOA equal block big-ver big-ver
// undefined bigger next big-ver big-ver
// number smaller block cmp big-cmp
// fixed number smaller block cmp-fix differ
// string smaller block differ cmp
// fixed string smaller block small-cmp cmp-fix
// when isEqual = false:
// range version: EOA/object undefined number string
// EOA nequal block next-ver next-ver
// undefined nequal block next-ver next-ver
// number nequal block next next
// fixed number nequal block next next (this never happens)
// string nequal block next next
// fixed string nequal block next next (this never happens)
// EOA end of array
// equal (version is equal range):
// when !negated: return true,
// when negated: return false
// bigger (version is bigger as range):
// when fixed: return false,
// when !negated: return true,
// when negated: return false,
// smaller (version is smaller as range):
// when !negated: return false,
// when negated: return true
// nequal (version is not equal range (> resp <)): return true
// block (version is in different prerelease area): return false
// differ (version is different from fixed range (string vs. number)): return false
// next: continues to the next items
// next-ver: when fixed: return false, continues to the next item only for the version, sets isEqual=false
// big-ver: when fixed || negated: return false, continues to the next item only for the version, sets isEqual=false
// next-nequ: continues to the next items, sets isEqual=false
// cmp (negated === false): version < range => return false, version > range => next-nequ, else => next
// cmp (negated === true): version > range => return false, version < range => next-nequ, else => next
// cmp-fix: version == range => next, else => return false
// big-cmp: when negated => return false, else => next-nequ
// small-cmp: when negated => next-nequ, else => return false
var rangeType =
/** @type {"s" | "n" | "u" | ""} */
(j < range.length ? (typeof range[j])[0] : "");
/** @type {VersionValue | undefined} */
var versionValue;
/** @type {"n" | "s" | "u" | "o" | undefined} */
var versionType;
// Handles first column in both tables (end of version or object)
if (
i >= version.length ||
((versionValue = version[i]),
(versionType = /** @type {"n" | "s" | "u" | "o"} */ (
(typeof versionValue)[0]
)) == "o")
) {
// Handles nequal
if (!isEqual) return true;
// Handles bigger
if (rangeType == "u") return j > fixCount && !negated;
// Handles equal and smaller: (range === EOA) XOR negated
return (rangeType == "") != negated; // equal + smaller
}
// Handles second column in both tables (version = undefined)
if (versionType == "u") {
if (!isEqual || rangeType != "u") {
return false;
}
}
// switch between first and second table
else if (isEqual) {
// Handle diagonal
if (rangeType == versionType) {
if (j <= fixCount) {
// Handles "cmp-fix" cases
if (versionValue != range[j]) {
return false;
}
} else {
// Handles "cmp" cases
if (
negated
? versionValue > /** @type {VersionValue[]} */ (range)[j]
: versionValue < /** @type {VersionValue[]} */ (range)[j]
) {
return false;
}
if (versionValue != range[j]) isEqual = false;
}
}
// Handle big-ver
else if (rangeType != "s" && rangeType != "n") {
if (negated || j <= fixCount) return false;
isEqual = false;
j--;
}
// Handle differ, big-cmp and small-cmp
else if (j <= fixCount || versionType < rangeType != negated) {
return false;
} else {
isEqual = false;
}
} else {
// Handles all "next-ver" cases in the second table
// eslint-disable-next-line no-lonely-if
if (rangeType != "s" && rangeType != "n") {
isEqual = false;
j--;
}
// next is applied by default
}
}
}
/** @type {(boolean | number)[]} */
var stack = [];
var p = stack.pop.bind(stack);
// eslint-disable-next-line no-redeclare
for (var i = 1; i < range.length; i++) {
var item = /** @type {SemVerRangeItem[] | 0 | 1 | 2} */ (range[i]);
stack.push(
item == 1
? /** @type {() => number} */ (p)() | /** @type {() => number} */ (p)()
: item == 2
? /** @type {() => number} */ (p)() &
/** @type {() => number} */ (p)()
: item
? satisfy(item, version)
: !p()
);
}
return !!p();
};
/* eslint-enable eqeqeq */
module.exports.satisfy = satisfy;
/**
* @param {SemVerRange | string | number | false | undefined} json
* @returns {string}
*/
module.exports.stringifyHoley = (json) => {
switch (typeof json) {
case "undefined":
return "";
case "object":
if (Array.isArray(json)) {
let str = "[";
for (let i = 0; i < json.length; i++) {
if (i !== 0) str += ",";
str += this.stringifyHoley(json[i]);
}
str += "]";
return str;
}
return JSON.stringify(json);
default:
return JSON.stringify(json);
}
};
//#region runtime code: parseVersion
/**
* @param {RuntimeTemplate} runtimeTemplate
* @returns {string}
*/
exports.parseVersionRuntimeCode = (runtimeTemplate) =>
`var parseVersion = ${runtimeTemplate.basicFunction("str", [
"// see webpack/lib/util/semver.js for original code",
`var p=${runtimeTemplate.supportsArrowFunction() ? "p=>" : "function(p)"}{return p.split(".").map(${runtimeTemplate.supportsArrowFunction() ? "p=>" : "function(p)"}{return+p==p?+p:p})},n=/^([^-+]+)?(?:-([^+]+))?(?:\\+(.+))?$/.exec(str),r=n[1]?p(n[1]):[];return n[2]&&(r.length++,r.push.apply(r,p(n[2]))),n[3]&&(r.push([]),r.push.apply(r,p(n[3]))),r;`
])}`;
//#endregion
//#region runtime code: versionLt
/**
* @param {RuntimeTemplate} runtimeTemplate
* @returns {string}
*/
exports.versionLtRuntimeCode = (runtimeTemplate) =>
`var versionLt = ${runtimeTemplate.basicFunction("a, b", [
"// see webpack/lib/util/semver.js for original code",
'a=parseVersion(a),b=parseVersion(b);for(var r=0;;){if(r>=a.length)return r<b.length&&"u"!=(typeof b[r])[0];var e=a[r],n=(typeof e)[0];if(r>=b.length)return"u"==n;var t=b[r],f=(typeof t)[0];if(n!=f)return"o"==n&&"n"==f||("s"==f||"u"==n);if("o"!=n&&"u"!=n&&e!=t)return e<t;r++}'
])}`;
//#endregion
//#region runtime code: rangeToString
/**
* @param {RuntimeTemplate} runtimeTemplate
* @returns {string}
*/
exports.rangeToStringRuntimeCode = (runtimeTemplate) =>
`var rangeToString = ${runtimeTemplate.basicFunction("range", [
"// see webpack/lib/util/semver.js for original code",
'var r=range[0],n="";if(1===range.length)return"*";if(r+.5){n+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var e=1,a=1;a<range.length;a++){e--,n+="u"==(typeof(t=range[a]))[0]?"-":(e>0?".":"")+(e=2,t)}return n}var g=[];for(a=1;a<range.length;a++){var t=range[a];g.push(0===t?"not("+o()+")":1===t?"("+o()+" || "+o()+")":2===t?g.pop()+" "+g.pop():rangeToString(t))}return o();function o(){return g.pop().replace(/^\\((.+)\\)$/,"$1")}'
])}`;
//#endregion
//#region runtime code: satisfy
/**
* @param {RuntimeTemplate} runtimeTemplate
* @returns {string}
*/
exports.satisfyRuntimeCode = (runtimeTemplate) =>
`var satisfy = ${runtimeTemplate.basicFunction("range, version", [
"// see webpack/lib/util/semver.js for original code",
'if(0 in range){version=parseVersion(version);var e=range[0],r=e<0;r&&(e=-e-1);for(var n=0,i=1,a=!0;;i++,n++){var f,s,g=i<range.length?(typeof range[i])[0]:"";if(n>=version.length||"o"==(s=(typeof(f=version[n]))[0]))return!a||("u"==g?i>e&&!r:""==g!=r);if("u"==s){if(!a||"u"!=g)return!1}else if(a)if(g==s)if(i<=e){if(f!=range[i])return!1}else{if(r?f>range[i]:f<range[i])return!1;f!=range[i]&&(a=!1)}else if("s"!=g&&"n"!=g){if(r||i<=e)return!1;a=!1,i--}else{if(i<=e||s<g!=r)return!1;a=!1}else"s"!=g&&"n"!=g&&(a=!1,i--)}}var t=[],o=t.pop.bind(t);for(n=1;n<range.length;n++){var u=range[n];t.push(1==u?o()|o():2==u?o()&o():u?satisfy(u,version):!o())}return!!o();'
])}`;
//#endregion

View File

@@ -0,0 +1 @@
{"version":3,"file":"info.cjs","names":[],"sources":["../../../../src/rest/commands/server/info.ts"],"sourcesContent":["import type { WebSocketAuthModes } from '../../../index.js';\nimport type { RestCommand } from '../../types.js';\n\nexport type ServerInfoOutput = {\n\tproject: {\n\t\tproject_name: string;\n\t\tdefault_language: string;\n\t\tpublic_registration: boolean;\n\t\tpublic_registration_verify_email: boolean;\n\t};\n\tmcp_enabled?: boolean;\n\tai_enabled?: boolean;\n\trateLimit?:\n\t\t| {\n\t\t\t\tpoints: number;\n\t\t\t\tduration: number;\n\t\t }\n\t\t| false;\n\trateLimitGlobal?:\n\t\t| {\n\t\t\t\tpoints: number;\n\t\t\t\tduration: number;\n\t\t }\n\t\t| false;\n\tqueryLimit?: {\n\t\tdefault: number;\n\t\tmax: number;\n\t};\n\twebsocket?:\n\t\t| {\n\t\t\t\trest:\n\t\t\t\t\t| {\n\t\t\t\t\t\t\tauthentication: WebSocketAuthModes;\n\t\t\t\t\t\t\tpath: string;\n\t\t\t\t\t }\n\t\t\t\t\t| false;\n\t\t\t\tgraphql:\n\t\t\t\t\t| {\n\t\t\t\t\t\t\tauthentication: WebSocketAuthModes;\n\t\t\t\t\t\t\tpath: string;\n\t\t\t\t\t }\n\t\t\t\t\t| false;\n\t\t\t\theartbeat: number | false;\n\t\t }\n\t\t| false;\n};\n\n/**\n * Get information about the current installation.\n * @returns Information about the current installation.\n */\nexport const serverInfo =\n\t<Schema>(): RestCommand<ServerInfoOutput, Schema> =>\n\t() => ({\n\t\tmethod: 'GET',\n\t\tpath: '/server/info',\n\t});\n"],"mappings":"AAmDA,MAAa,WAEL,CACN,OAAQ,MACR,KAAM,eACN"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"circle-chevron-down.js","sources":["../../../src/icons/circle-chevron-down.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CircleChevronDown\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cGF0aCBkPSJtMTYgMTAtNCA0LTQtNCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/circle-chevron-down\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 CircleChevronDown = createLucideIcon('CircleChevronDown', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['path', { d: 'm16 10-4 4-4-4', key: '894hmk' }],\n]);\n\nexport default CircleChevronDown;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAoB,iBAAiB,mBAAqB,CAAA,CAAA,CAAA;AAAA,CAC9D,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,CAAA,CAAM,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"importHandlerPath.d.ts","sourceRoot":"","sources":["../../../../../src/queues/operations/runJobs/runJob/importHandlerPath.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAY,MAAM,oCAAoC,CAAA;AAI3F;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CA6BnE;AAED;;;;GAIG;AACH,wBAAsB,wBAAwB,CAAC,UAAU,CAAC,EAAE,UAAU,wCASrE"}

View File

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

View File

@@ -0,0 +1,21 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Book = createLucideIcon("Book", [
[
"path",
{
d: "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",
key: "k3hazp"
}
]
]);
export { Book as default };
//# sourceMappingURL=book.js.map

View File

@@ -0,0 +1,16 @@
export declare const eachWeekendOfIntervalWithOptions: import("./types.js").FPFn2<
import("../eachWeekendOfInterval.js").EachWeekendOfIntervalResult<
import("../fp.js").Interval<
import("../fp.js").DateArg<Date>,
import("../fp.js").DateArg<Date>
>,
| import("../eachWeekendOfInterval.js").EachWeekendOfIntervalOptions<Date>
| undefined
>,
| import("../eachWeekendOfInterval.js").EachWeekendOfIntervalOptions<Date>
| undefined,
import("../fp.js").Interval<
import("../fp.js").DateArg<Date>,
import("../fp.js").DateArg<Date>
>
>;

View File

@@ -0,0 +1,25 @@
import { entityKind } from "../../entity.cjs";
import { SQL, type SQLWrapper } from "../../sql/sql.cjs";
import type { GelSession } from "../session.cjs";
import type { GelTable } from "../table.cjs";
export declare class GelCountBuilder<TSession extends GelSession<any, any, any>> extends SQL<number> implements Promise<number>, SQLWrapper {
readonly params: {
source: GelTable | SQL | SQLWrapper;
filters?: SQL<unknown>;
session: TSession;
};
private sql;
static readonly [entityKind] = "GelCountBuilder";
[Symbol.toStringTag]: string;
private session;
private static buildEmbeddedCount;
private static buildCount;
constructor(params: {
source: GelTable | SQL | SQLWrapper;
filters?: SQL<unknown>;
session: TSession;
});
then<TResult1 = number, TResult2 = never>(onfulfilled?: ((value: number) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
catch(onRejected?: ((reason: any) => any) | null | undefined): Promise<number>;
finally(onFinally?: (() => void) | null | undefined): Promise<number>;
}

View File

@@ -0,0 +1,172 @@
import { Column } from "./column.js";
import { is } from "./entity.js";
import { Param, SQL, View } from "./sql/sql.js";
import { Subquery } from "./subquery.js";
import { getTableName, Table } from "./table.js";
import { ViewBaseConfig } from "./view-common.js";
function mapResultRow(columns, row, joinsNotNullableMap) {
const nullifyMap = {};
const result = columns.reduce(
(result2, { path, field }, columnIndex) => {
let decoder;
if (is(field, Column)) {
decoder = field;
} else if (is(field, SQL)) {
decoder = field.decoder;
} else {
decoder = field.sql.decoder;
}
let node = result2;
for (const [pathChunkIndex, pathChunk] of path.entries()) {
if (pathChunkIndex < path.length - 1) {
if (!(pathChunk in node)) {
node[pathChunk] = {};
}
node = node[pathChunk];
} else {
const rawValue = row[columnIndex];
const value = node[pathChunk] = rawValue === null ? null : decoder.mapFromDriverValue(rawValue);
if (joinsNotNullableMap && is(field, Column) && path.length === 2) {
const objectName = path[0];
if (!(objectName in nullifyMap)) {
nullifyMap[objectName] = value === null ? getTableName(field.table) : false;
} else if (typeof nullifyMap[objectName] === "string" && nullifyMap[objectName] !== getTableName(field.table)) {
nullifyMap[objectName] = false;
}
}
}
}
return result2;
},
{}
);
if (joinsNotNullableMap && Object.keys(nullifyMap).length > 0) {
for (const [objectName, tableName] of Object.entries(nullifyMap)) {
if (typeof tableName === "string" && !joinsNotNullableMap[tableName]) {
result[objectName] = null;
}
}
}
return result;
}
function orderSelectedFields(fields, pathPrefix) {
return Object.entries(fields).reduce((result, [name, field]) => {
if (typeof name !== "string") {
return result;
}
const newPath = pathPrefix ? [...pathPrefix, name] : [name];
if (is(field, Column) || is(field, SQL) || is(field, SQL.Aliased)) {
result.push({ path: newPath, field });
} else if (is(field, Table)) {
result.push(...orderSelectedFields(field[Table.Symbol.Columns], newPath));
} else {
result.push(...orderSelectedFields(field, newPath));
}
return result;
}, []);
}
function haveSameKeys(left, right) {
const leftKeys = Object.keys(left);
const rightKeys = Object.keys(right);
if (leftKeys.length !== rightKeys.length) {
return false;
}
for (const [index, key] of leftKeys.entries()) {
if (key !== rightKeys[index]) {
return false;
}
}
return true;
}
function mapUpdateSet(table, values) {
const entries = Object.entries(values).filter(([, value]) => value !== void 0).map(([key, value]) => {
if (is(value, SQL) || is(value, Column)) {
return [key, value];
} else {
return [key, new Param(value, table[Table.Symbol.Columns][key])];
}
});
if (entries.length === 0) {
throw new Error("No values to set");
}
return Object.fromEntries(entries);
}
function applyMixins(baseClass, extendedClasses) {
for (const extendedClass of extendedClasses) {
for (const name of Object.getOwnPropertyNames(extendedClass.prototype)) {
if (name === "constructor") continue;
Object.defineProperty(
baseClass.prototype,
name,
Object.getOwnPropertyDescriptor(extendedClass.prototype, name) || /* @__PURE__ */ Object.create(null)
);
}
}
}
function getTableColumns(table) {
return table[Table.Symbol.Columns];
}
function getViewSelectedFields(view) {
return view[ViewBaseConfig].selectedFields;
}
function getTableLikeName(table) {
return is(table, Subquery) ? table._.alias : is(table, View) ? table[ViewBaseConfig].name : is(table, SQL) ? void 0 : table[Table.Symbol.IsAlias] ? table[Table.Symbol.Name] : table[Table.Symbol.BaseName];
}
function getColumnNameAndConfig(a, b) {
return {
name: typeof a === "string" && a.length > 0 ? a : "",
config: typeof a === "object" ? a : b
};
}
const _ = {};
const __ = {};
function isConfig(data) {
if (typeof data !== "object" || data === null) return false;
if (data.constructor.name !== "Object") return false;
if ("logger" in data) {
const type = typeof data["logger"];
if (type !== "boolean" && (type !== "object" || typeof data["logger"]["logQuery"] !== "function") && type !== "undefined") return false;
return true;
}
if ("schema" in data) {
const type = typeof data["schema"];
if (type !== "object" && type !== "undefined") return false;
return true;
}
if ("casing" in data) {
const type = typeof data["casing"];
if (type !== "string" && type !== "undefined") return false;
return true;
}
if ("mode" in data) {
if (data["mode"] !== "default" || data["mode"] !== "planetscale" || data["mode"] !== void 0) return false;
return true;
}
if ("connection" in data) {
const type = typeof data["connection"];
if (type !== "string" && type !== "object" && type !== "undefined") return false;
return true;
}
if ("client" in data) {
const type = typeof data["client"];
if (type !== "object" && type !== "function" && type !== "undefined") return false;
return true;
}
if (Object.keys(data).length === 0) return true;
return false;
}
const textDecoder = typeof TextDecoder === "undefined" ? null : new TextDecoder();
export {
applyMixins,
getColumnNameAndConfig,
getTableColumns,
getTableLikeName,
getViewSelectedFields,
haveSameKeys,
isConfig,
mapResultRow,
mapUpdateSet,
orderSelectedFields,
textDecoder
};
//# sourceMappingURL=utils.js.map

View File

@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Bed = createLucideIcon("Bed", [
["path", { d: "M2 4v16", key: "vw9hq8" }],
["path", { d: "M2 8h18a2 2 0 0 1 2 2v10", key: "1dgv2r" }],
["path", { d: "M2 17h20", key: "18nfp3" }],
["path", { d: "M6 8v9", key: "1yriud" }]
]);
export { Bed as default };
//# sourceMappingURL=bed.js.map

View File

@@ -0,0 +1,54 @@
Prism.languages.turtle = {
'comment': {
pattern: /#.*/,
greedy: true
},
'multiline-string': {
pattern: /"""(?:(?:""?)?(?:[^"\\]|\\.))*"""|'''(?:(?:''?)?(?:[^'\\]|\\.))*'''/,
greedy: true,
alias: 'string',
inside: {
'comment': /#.*/
}
},
'string': {
pattern: /"(?:[^\\"\r\n]|\\.)*"|'(?:[^\\'\r\n]|\\.)*'/,
greedy: true
},
'url': {
pattern: /<(?:[^\x00-\x20<>"{}|^`\\]|\\(?:u[\da-fA-F]{4}|U[\da-fA-F]{8}))*>/,
greedy: true,
inside: {
'punctuation': /[<>]/
}
},
'function': {
pattern: /(?:(?![-.\d\xB7])[-.\w\xB7\xC0-\uFFFD]+)?:(?:(?![-.])(?:[-.:\w\xC0-\uFFFD]|%[\da-f]{2}|\\.)+)?/i,
inside: {
'local-name': {
pattern: /([^:]*:)[\s\S]+/,
lookbehind: true
},
'prefix': {
pattern: /[\s\S]+/,
inside: {
'punctuation': /:/
}
}
}
},
'number': /[+-]?\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,
'punctuation': /[{}.,;()[\]]|\^\^/,
'boolean': /\b(?:false|true)\b/,
'keyword': [
/(?:\ba|@prefix|@base)\b|=/,
/\b(?:base|graph|prefix)\b/i
],
'tag': {
pattern: /@[a-z]+(?:-[a-z\d]+)*/i,
inside: {
'punctuation': /@/
}
}
};
Prism.languages.trig = Prism.languages['turtle'];

View File

@@ -0,0 +1,18 @@
import { px } from '../../../value/types/numbers/units.mjs';
function calcOrigin(origin, offset, size) {
return typeof origin === "string"
? origin
: px.transform(offset + size * origin);
}
/**
* The SVG transform origin defaults are different to CSS and is less intuitive,
* so we use the measured dimensions of the SVG to reconcile these.
*/
function calcSVGTransformOrigin(dimensions, originX, originY) {
const pxOriginX = calcOrigin(originX, dimensions.x, dimensions.width);
const pxOriginY = calcOrigin(originY, dimensions.y, dimensions.height);
return `${pxOriginX} ${pxOriginY}`;
}
export { calcSVGTransformOrigin };

View File

@@ -0,0 +1,53 @@
import { getWeek } from "./getWeek.mjs";
import { toDate } from "./toDate.mjs";
/**
* The {@link setWeek} function options.
*/
/**
* @name setWeek
* @category Week Helpers
* @summary Set the local week to the given date.
*
* @description
* Set the local week to the given date, saving the weekday number.
* The exact calculation depends on the values of
* `options.weekStartsOn` (which is the index of the first day of the week)
* and `options.firstWeekContainsDate` (which is the day of January, which is always in
* the first week of the week-numbering year)
*
* Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The date to be changed
* @param week - The week of the new date
* @param options - An object with options
*
* @returns The new date with the local week set
*
* @example
* // Set the 1st week to 2 January 2005 with default options:
* const result = setWeek(new Date(2005, 0, 2), 1)
* //=> Sun Dec 26 2004 00:00:00
*
* @example
* // Set the 1st week to 2 January 2005,
* // if Monday is the first day of the week,
* // and the first week of the year always contains 4 January:
* const result = setWeek(new Date(2005, 0, 2), 1, {
* weekStartsOn: 1,
* firstWeekContainsDate: 4
* })
* //=> Sun Jan 4 2004 00:00:00
*/
export function setWeek(date, week, options) {
const _date = toDate(date);
const diff = getWeek(_date, options) - week;
_date.setDate(_date.getDate() - diff * 7);
return _date;
}
// Fallback for modularized imports:
export default setWeek;

View File

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

View File

@@ -0,0 +1,56 @@
![React Email Head cover](https://react.email/static/covers/head.png)
<div align="center"><strong>@react-email/head</strong></div>
<div align="center">Contains head components such as style and meta elements.</div>
<br />
<div align="center">
<a href="https://react.email">Website</a>
<span> · </span>
<a href="https://github.com/resend/react-email">GitHub</a>
<span> · </span>
<a href="https://react.email/discord">Discord</a>
</div>
## Install
Install component from your command line.
#### With yarn
```sh
yarn add @react-email/head -E
```
#### With npm
```sh
npm install @react-email/head -E
```
## Getting started
Add the component to your email template. Include children tags where needed.
```jsx
import { Head } from "@react-email/head";
const Email = () => {
return (
<Head>
<title>My email title</title>
</Head>
);
};
```
## Support
This component was tested using the most popular email clients.
| <img src="https://react.email/static/icons/gmail.svg" width="48px" height="48px" alt="Gmail logo"> | <img src="https://react.email/static/icons/apple-mail.svg" width="48px" height="48px" alt="Apple Mail"> | <img src="https://react.email/static/icons/outlook.svg" width="48px" height="48px" alt="Outlook logo"> | <img src="https://react.email/static/icons/yahoo-mail.svg" width="48px" height="48px" alt="Yahoo! Mail logo"> | <img src="https://react.email/static/icons/hey.svg" width="48px" height="48px" alt="HEY logo"> | <img src="https://react.email/static/icons/superhuman.svg" width="48px" height="48px" alt="Superhuman logo"> |
| -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| Gmail ✔ | Apple Mail ✔ | Outlook ✔ | Yahoo! Mail ✔ | HEY ✔ | Superhuman ✔ |
## License
MIT License

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"exporter.js","sourceRoot":"","sources":["../../../src/internal/exporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAM5D;;;GAGG;AACH,MAAM,UAAU,OAAO,CACrB,QAAqB,EACrB,GAAM;IAEN,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;QAC3B,0DAA0D;QAC1D,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE;YACnD,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QAChC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,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 { context } from '@opentelemetry/api';\nimport { ExportResult } from '../ExportResult';\nimport { suppressTracing } from '../trace/suppress-tracing';\n\nexport interface Exporter<T> {\n export(arg: T, resultCallback: (result: ExportResult) => void): void;\n}\n\n/**\n * @internal\n * Shared functionality used by Exporters while exporting data, including suppression of Traces.\n */\nexport function _export<T>(\n exporter: Exporter<T>,\n arg: T\n): Promise<ExportResult> {\n return new Promise(resolve => {\n // prevent downstream exporter calls from generating spans\n context.with(suppressTracing(context.active()), () => {\n exporter.export(arg, resolve);\n });\n });\n}\n"]}

View File

@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ListTree = createLucideIcon("ListTree", [
["path", { d: "M21 12h-8", key: "1bmf0i" }],
["path", { d: "M21 6H8", key: "1pqkrb" }],
["path", { d: "M21 18h-8", key: "1tm79t" }],
["path", { d: "M3 6v4c0 1.1.9 2 2 2h3", key: "1ywdgy" }],
["path", { d: "M3 10v6c0 1.1.9 2 2 2h3", key: "2wc746" }]
]);
export { ListTree as default };
//# sourceMappingURL=list-tree.js.map

View File

@@ -0,0 +1,5 @@
import type { ServerProps } from '../../config/types.js';
export type UnpublishButtonClientProps = {};
export type UnpublishButtonServerPropsOnly = {} & ServerProps;
export type UnpublishButtonServerProps = UnpublishButtonServerPropsOnly;
//# sourceMappingURL=UnpublishButton.d.ts.map

View File

@@ -0,0 +1,231 @@
'use strict'
//Parse method copied from https://github.com/brianc/node-postgres
//Copyright (c) 2010-2014 Brian Carlson (brian.m.carlson@gmail.com)
//MIT License
//parses a connection string
function parse(str, options = {}) {
//unix socket
if (str.charAt(0) === '/') {
const config = str.split(' ')
return { host: config[0], database: config[1] }
}
// Check for empty host in URL
const config = {}
let result
let dummyHost = false
if (/ |%[^a-f0-9]|%[a-f0-9][^a-f0-9]/i.test(str)) {
// Ensure spaces are encoded as %20
str = encodeURI(str).replace(/%25(\d\d)/g, '%$1')
}
try {
try {
result = new URL(str, 'postgres://base')
} catch (e) {
// The URL is invalid so try again with a dummy host
result = new URL(str.replace('@/', '@___DUMMY___/'), 'postgres://base')
dummyHost = true
}
} catch (err) {
// Remove the input from the error message to avoid leaking sensitive information
err.input && (err.input = '*****REDACTED*****')
throw err
}
// We'd like to use Object.fromEntries() here but Node.js 10 does not support it
for (const entry of result.searchParams.entries()) {
config[entry[0]] = entry[1]
}
config.user = config.user || decodeURIComponent(result.username)
config.password = config.password || decodeURIComponent(result.password)
if (result.protocol == 'socket:') {
config.host = decodeURI(result.pathname)
config.database = result.searchParams.get('db')
config.client_encoding = result.searchParams.get('encoding')
return config
}
const hostname = dummyHost ? '' : result.hostname
if (!config.host) {
// Only set the host if there is no equivalent query param.
config.host = decodeURIComponent(hostname)
} else if (hostname && /^%2f/i.test(hostname)) {
// Only prepend the hostname to the pathname if it is not a URL encoded Unix socket host.
result.pathname = hostname + result.pathname
}
if (!config.port) {
// Only set the port if there is no equivalent query param.
config.port = result.port
}
const pathname = result.pathname.slice(1) || null
config.database = pathname ? decodeURI(pathname) : null
if (config.ssl === 'true' || config.ssl === '1') {
config.ssl = true
}
if (config.ssl === '0') {
config.ssl = false
}
if (config.sslcert || config.sslkey || config.sslrootcert || config.sslmode) {
config.ssl = {}
}
// Only try to load fs if we expect to read from the disk
const fs = config.sslcert || config.sslkey || config.sslrootcert ? require('fs') : null
if (config.sslcert) {
config.ssl.cert = fs.readFileSync(config.sslcert).toString()
}
if (config.sslkey) {
config.ssl.key = fs.readFileSync(config.sslkey).toString()
}
if (config.sslrootcert) {
config.ssl.ca = fs.readFileSync(config.sslrootcert).toString()
}
if (options.useLibpqCompat && config.uselibpqcompat) {
throw new Error('Both useLibpqCompat and uselibpqcompat are set. Please use only one of them.')
}
if (config.uselibpqcompat === 'true' || options.useLibpqCompat) {
switch (config.sslmode) {
case 'disable': {
config.ssl = false
break
}
case 'prefer': {
config.ssl.rejectUnauthorized = false
break
}
case 'require': {
if (config.sslrootcert) {
// If a root CA is specified, behavior of `sslmode=require` will be the same as that of `verify-ca`
config.ssl.checkServerIdentity = function () {}
} else {
config.ssl.rejectUnauthorized = false
}
break
}
case 'verify-ca': {
if (!config.ssl.ca) {
throw new Error(
'SECURITY WARNING: Using sslmode=verify-ca requires specifying a CA with sslrootcert. If a public CA is used, verify-ca allows connections to a server that somebody else may have registered with the CA, making you vulnerable to Man-in-the-Middle attacks. Either specify a custom CA certificate with sslrootcert parameter or use sslmode=verify-full for proper security.'
)
}
config.ssl.checkServerIdentity = function () {}
break
}
case 'verify-full': {
break
}
}
} else {
switch (config.sslmode) {
case 'disable': {
config.ssl = false
break
}
case 'prefer':
case 'require':
case 'verify-ca':
case 'verify-full': {
if (config.sslmode !== 'verify-full') {
deprecatedSslModeWarning(config.sslmode)
}
break
}
case 'no-verify': {
config.ssl.rejectUnauthorized = false
break
}
}
}
return config
}
// convert pg-connection-string ssl config to a ClientConfig.ConnectionOptions
function toConnectionOptions(sslConfig) {
const connectionOptions = Object.entries(sslConfig).reduce((c, [key, value]) => {
// we explicitly check for undefined and null instead of `if (value)` because some
// options accept falsy values. Example: `ssl.rejectUnauthorized = false`
if (value !== undefined && value !== null) {
c[key] = value
}
return c
}, {})
return connectionOptions
}
// convert pg-connection-string config to a ClientConfig
function toClientConfig(config) {
const poolConfig = Object.entries(config).reduce((c, [key, value]) => {
if (key === 'ssl') {
const sslConfig = value
if (typeof sslConfig === 'boolean') {
c[key] = sslConfig
}
if (typeof sslConfig === 'object') {
c[key] = toConnectionOptions(sslConfig)
}
} else if (value !== undefined && value !== null) {
if (key === 'port') {
// when port is not specified, it is converted into an empty string
// we want to avoid NaN or empty string as a values in ClientConfig
if (value !== '') {
const v = parseInt(value, 10)
if (isNaN(v)) {
throw new Error(`Invalid ${key}: ${value}`)
}
c[key] = v
}
} else {
c[key] = value
}
}
return c
}, {})
return poolConfig
}
// parses a connection string into ClientConfig
function parseIntoClientConfig(str) {
return toClientConfig(parse(str))
}
function deprecatedSslModeWarning(sslmode) {
if (!deprecatedSslModeWarning.warned && typeof process !== 'undefined' && process.emitWarning) {
deprecatedSslModeWarning.warned = true
process.emitWarning(`SECURITY WARNING: The SSL modes 'prefer', 'require', and 'verify-ca' are treated as aliases for 'verify-full'.
In the next major version (pg-connection-string v3.0.0 and pg v9.0.0), these modes will adopt standard libpq semantics, which have weaker security guarantees.
To prepare for this change:
- If you want the current behavior, explicitly use 'sslmode=verify-full'
- If you want libpq compatibility now, use 'uselibpqcompat=true&sslmode=${sslmode}'
See https://www.postgresql.org/docs/current/libpq-ssl.html for libpq SSL mode definitions.`)
}
}
module.exports = parse
parse.parse = parse
parse.toClientConfig = toClientConfig
parse.parseIntoClientConfig = parseIntoClientConfig

View File

@@ -0,0 +1,306 @@
export const extensions = [
'jpg',
'png',
'apng',
'gif',
'webp',
'flif',
'xcf',
'cr2',
'cr3',
'orf',
'arw',
'dng',
'nef',
'rw2',
'raf',
'tif',
'bmp',
'icns',
'jxr',
'psd',
'indd',
'zip',
'tar',
'rar',
'gz',
'bz2',
'7z',
'dmg',
'mp4',
'mid',
'mkv',
'webm',
'mov',
'avi',
'mpg',
'mp2',
'mp3',
'm4a',
'oga',
'ogg',
'ogv',
'opus',
'flac',
'wav',
'spx',
'amr',
'pdf',
'epub',
'elf',
'macho',
'exe',
'swf',
'rtf',
'wasm',
'woff',
'woff2',
'eot',
'ttf',
'otf',
'ico',
'flv',
'ps',
'xz',
'sqlite',
'nes',
'crx',
'xpi',
'cab',
'deb',
'ar',
'rpm',
'Z',
'lz',
'cfb',
'mxf',
'mts',
'blend',
'bpg',
'docx',
'pptx',
'xlsx',
'3gp',
'3g2',
'j2c',
'jp2',
'jpm',
'jpx',
'mj2',
'aif',
'qcp',
'odt',
'ods',
'odp',
'xml',
'mobi',
'heic',
'cur',
'ktx',
'ape',
'wv',
'dcm',
'ics',
'glb',
'pcap',
'dsf',
'lnk',
'alias',
'voc',
'ac3',
'm4v',
'm4p',
'm4b',
'f4v',
'f4p',
'f4b',
'f4a',
'mie',
'asf',
'ogm',
'ogx',
'mpc',
'arrow',
'shp',
'aac',
'mp1',
'it',
's3m',
'xm',
'ai',
'skp',
'avif',
'eps',
'lzh',
'pgp',
'asar',
'stl',
'chm',
'3mf',
'zst',
'jxl',
'vcf',
'jls',
'pst',
'dwg',
'parquet',
'class',
'arj',
'cpio',
'ace',
'avro',
'icc',
'fbx',
'vsdx',
];
export const mimeTypes = [
'image/jpeg',
'image/png',
'image/gif',
'image/webp',
'image/flif',
'image/x-xcf',
'image/x-canon-cr2',
'image/x-canon-cr3',
'image/tiff',
'image/bmp',
'image/vnd.ms-photo',
'image/vnd.adobe.photoshop',
'application/x-indesign',
'application/epub+zip',
'application/x-xpinstall',
'application/vnd.oasis.opendocument.text',
'application/vnd.oasis.opendocument.spreadsheet',
'application/vnd.oasis.opendocument.presentation',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'application/zip',
'application/x-tar',
'application/x-rar-compressed',
'application/gzip',
'application/x-bzip2',
'application/x-7z-compressed',
'application/x-apple-diskimage',
'application/x-apache-arrow',
'video/mp4',
'audio/midi',
'video/x-matroska',
'video/webm',
'video/quicktime',
'video/vnd.avi',
'audio/wav',
'audio/qcelp',
'audio/x-ms-asf',
'video/x-ms-asf',
'application/vnd.ms-asf',
'video/mpeg',
'video/3gpp',
'audio/mpeg',
'audio/mp4', // RFC 4337
'audio/opus',
'video/ogg',
'audio/ogg',
'application/ogg',
'audio/x-flac',
'audio/ape',
'audio/wavpack',
'audio/amr',
'application/pdf',
'application/x-elf',
'application/x-mach-binary',
'application/x-msdownload',
'application/x-shockwave-flash',
'application/rtf',
'application/wasm',
'font/woff',
'font/woff2',
'application/vnd.ms-fontobject',
'font/ttf',
'font/otf',
'image/x-icon',
'video/x-flv',
'application/postscript',
'application/eps',
'application/x-xz',
'application/x-sqlite3',
'application/x-nintendo-nes-rom',
'application/x-google-chrome-extension',
'application/vnd.ms-cab-compressed',
'application/x-deb',
'application/x-unix-archive',
'application/x-rpm',
'application/x-compress',
'application/x-lzip',
'application/x-cfb',
'application/x-mie',
'application/mxf',
'video/mp2t',
'application/x-blender',
'image/bpg',
'image/j2c',
'image/jp2',
'image/jpx',
'image/jpm',
'image/mj2',
'audio/aiff',
'application/xml',
'application/x-mobipocket-ebook',
'image/heif',
'image/heif-sequence',
'image/heic',
'image/heic-sequence',
'image/icns',
'image/ktx',
'application/dicom',
'audio/x-musepack',
'text/calendar',
'text/vcard',
'model/gltf-binary',
'application/vnd.tcpdump.pcap',
'audio/x-dsf', // Non-standard
'application/x.ms.shortcut', // Invented by us
'application/x.apple.alias', // Invented by us
'audio/x-voc',
'audio/vnd.dolby.dd-raw',
'audio/x-m4a',
'image/apng',
'image/x-olympus-orf',
'image/x-sony-arw',
'image/x-adobe-dng',
'image/x-nikon-nef',
'image/x-panasonic-rw2',
'image/x-fujifilm-raf',
'video/x-m4v',
'video/3gpp2',
'application/x-esri-shape',
'audio/aac',
'audio/x-it',
'audio/x-s3m',
'audio/x-xm',
'video/MP1S',
'video/MP2P',
'application/vnd.sketchup.skp',
'image/avif',
'application/x-lzh-compressed',
'application/pgp-encrypted',
'application/x-asar',
'model/stl',
'application/vnd.ms-htmlhelp',
'model/3mf',
'image/jxl',
'application/zstd',
'image/jls',
'application/vnd.ms-outlook',
'image/vnd.dwg',
'application/x-parquet',
'application/java-vm',
'application/x-arj',
'application/x-cpio',
'application/x-ace-compressed',
'application/avro',
'application/vnd.iccprofile',
'application/x.autodesk.fbx', // Invented by us
'application/vnd.visio',
];

View File

@@ -0,0 +1 @@
{"version":3,"file":"mergeLocalizedData.d.ts","sourceRoot":"","sources":["../../src/utilities/mergeLocalizedData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAS,KAAK,EAAkB,MAAM,2BAA2B,CAAA;AAC7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAInD,KAAK,8BAA8B,GAAG;IACpC,qBAAqB,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAA;IAChD,eAAe,EAAE,UAAU,CAAA;IAC3B,cAAc,EAAE,UAAU,CAAA;IAC1B,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,eAAe,EAAE,MAAM,EAAE,CAAA;CAC1B,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,MAAM,EACN,iBAAyB,EACzB,eAAe,GAChB,EAAE,8BAA8B,GAAG,UAAU,CAuR7C"}

View File

@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const UserRoundPlus = createLucideIcon("UserRoundPlus", [
["path", { d: "M2 21a8 8 0 0 1 13.292-6", key: "bjp14o" }],
["circle", { cx: "10", cy: "8", r: "5", key: "o932ke" }],
["path", { d: "M19 16v6", key: "tddt3s" }],
["path", { d: "M22 19h-6", key: "vcuq98" }]
]);
export { UserRoundPlus as default };
//# sourceMappingURL=user-round-plus.js.map

View File

@@ -0,0 +1,8 @@
import type { PgColumn } from "./columns/index.cjs";
import type { Placeholder, SQL, SQLWrapper } from "../sql/sql.cjs";
export * from "../sql/expressions/index.cjs";
export declare function concat(column: PgColumn | SQL.Aliased, value: string | Placeholder | SQLWrapper): SQL;
export declare function substring(column: PgColumn | SQL.Aliased, { from, for: _for }: {
from?: number | Placeholder | SQLWrapper;
for?: number | Placeholder | SQLWrapper;
}): SQL;

View File

@@ -0,0 +1 @@
{"version":3,"names":["_index","require","_default","exports","default","createTypeAnnotationBasedOnTypeof","type","stringTypeAnnotation","numberTypeAnnotation","voidTypeAnnotation","booleanTypeAnnotation","genericTypeAnnotation","identifier","anyTypeAnnotation","Error"],"sources":["../../../src/builders/flow/createTypeAnnotationBasedOnTypeof.ts"],"sourcesContent":["import {\n anyTypeAnnotation,\n stringTypeAnnotation,\n numberTypeAnnotation,\n voidTypeAnnotation,\n booleanTypeAnnotation,\n genericTypeAnnotation,\n identifier,\n} from \"../generated/index.ts\";\nimport type * as t from \"../../index.ts\";\n\nexport default createTypeAnnotationBasedOnTypeof as {\n (type: \"string\"): t.StringTypeAnnotation;\n (type: \"number\"): t.NumberTypeAnnotation;\n (type: \"undefined\"): t.VoidTypeAnnotation;\n (type: \"boolean\"): t.BooleanTypeAnnotation;\n (type: \"function\"): t.GenericTypeAnnotation;\n (type: \"object\"): t.GenericTypeAnnotation;\n (type: \"symbol\"): t.GenericTypeAnnotation;\n (type: \"bigint\"): t.AnyTypeAnnotation;\n};\n\n/**\n * Create a type annotation based on typeof expression.\n */\nfunction createTypeAnnotationBasedOnTypeof(type: string): t.FlowType {\n switch (type) {\n case \"string\":\n return stringTypeAnnotation();\n case \"number\":\n return numberTypeAnnotation();\n case \"undefined\":\n return voidTypeAnnotation();\n case \"boolean\":\n return booleanTypeAnnotation();\n case \"function\":\n return genericTypeAnnotation(identifier(\"Function\"));\n case \"object\":\n return genericTypeAnnotation(identifier(\"Object\"));\n case \"symbol\":\n return genericTypeAnnotation(identifier(\"Symbol\"));\n case \"bigint\":\n // todo: use BigInt annotation when Flow supports BigInt\n // https://github.com/facebook/flow/issues/6639\n return anyTypeAnnotation();\n }\n throw new Error(\"Invalid typeof value: \" + type);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAQ+B,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAGhBC,iCAAiC;AAchD,SAASA,iCAAiCA,CAACC,IAAY,EAAc;EACnE,QAAQA,IAAI;IACV,KAAK,QAAQ;MACX,OAAO,IAAAC,2BAAoB,EAAC,CAAC;IAC/B,KAAK,QAAQ;MACX,OAAO,IAAAC,2BAAoB,EAAC,CAAC;IAC/B,KAAK,WAAW;MACd,OAAO,IAAAC,yBAAkB,EAAC,CAAC;IAC7B,KAAK,SAAS;MACZ,OAAO,IAAAC,4BAAqB,EAAC,CAAC;IAChC,KAAK,UAAU;MACb,OAAO,IAAAC,4BAAqB,EAAC,IAAAC,iBAAU,EAAC,UAAU,CAAC,CAAC;IACtD,KAAK,QAAQ;MACX,OAAO,IAAAD,4BAAqB,EAAC,IAAAC,iBAAU,EAAC,QAAQ,CAAC,CAAC;IACpD,KAAK,QAAQ;MACX,OAAO,IAAAD,4BAAqB,EAAC,IAAAC,iBAAU,EAAC,QAAQ,CAAC,CAAC;IACpD,KAAK,QAAQ;MAGX,OAAO,IAAAC,wBAAiB,EAAC,CAAC;EAC9B;EACA,MAAM,IAAIC,KAAK,CAAC,wBAAwB,GAAGR,IAAI,CAAC;AAClD","ignoreList":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"mergeListSearchAndWhere.d.ts","sourceRoot":"","sources":["../../src/utilities/mergeListSearchAndWhere.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAA;AAC7E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAA;AAC/E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAI9C,eAAO,MAAM,qBAAqB,iBAAkB,KAAK,iBAAiB,KAAK,UAsB9E,CAAA;AAED,KAAK,IAAI,GAAG;IACV,gBAAgB,EAAE,sBAAsB,GAAG,yBAAyB,CAAA;IACpE,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,CAAA;AAED,eAAO,MAAM,uBAAuB,wCAA8C,IAAI,KAAG,KAwBxF,CAAA"}

View File

@@ -0,0 +1,15 @@
import type { ReadableStream as NodeReadableStream } from 'node:stream/web';
export { EndOfStreamError } from './EndOfStreamError.js';
import { AbstractStreamReader } from "./AbstractStreamReader.js";
export type AnyWebByteStream = NodeReadableStream<Uint8Array> | ReadableStream<Uint8Array>;
/**
* Read from a WebStream
* Reference: https://nodejs.org/api/webstreams.html#class-readablestreambyobreader
*/
export declare class WebStreamReader extends AbstractStreamReader {
private reader;
constructor(stream: AnyWebByteStream);
protected readFromStream(buffer: Uint8Array, offset: number, length: number): Promise<number>;
abort(): Promise<void>;
close(): Promise<void>;
}

View File

@@ -0,0 +1,88 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const breadcrumbs = require('../breadcrumbs.js');
const currentScopes = require('../currentScopes.js');
const console = require('../instrument/console.js');
const integration = require('../integration.js');
const debugLogger = require('../utils/debug-logger.js');
const severity = require('../utils/severity.js');
const string = require('../utils/string.js');
const worldwide = require('../utils/worldwide.js');
const INTEGRATION_NAME = 'Console';
/**
* Captures calls to the `console` API as breadcrumbs in Sentry.
*
* By default the integration instruments `console.debug`, `console.info`, `console.warn`, `console.error`,
* `console.log`, `console.trace`, and `console.assert`. You can use the `levels` option to customize which
* levels are captured.
*
* @example
*
* ```js
* Sentry.init({
* integrations: [Sentry.consoleIntegration({ levels: ['error', 'warn'] })],
* });
* ```
*/
const consoleIntegration = integration.defineIntegration((options = {}) => {
const levels = new Set(options.levels || debugLogger.CONSOLE_LEVELS);
return {
name: INTEGRATION_NAME,
setup(client) {
console.addConsoleInstrumentationHandler(({ args, level }) => {
if (currentScopes.getClient() !== client || !levels.has(level)) {
return;
}
addConsoleBreadcrumb(level, args);
});
},
};
});
/**
* Capture a console breadcrumb.
*
* Exported just for tests.
*/
function addConsoleBreadcrumb(level, args) {
const breadcrumb = {
category: 'console',
data: {
arguments: args,
logger: 'console',
},
level: severity.severityLevelFromString(level),
message: formatConsoleArgs(args),
};
if (level === 'assert') {
if (args[0] === false) {
const assertionArgs = args.slice(1);
breadcrumb.message =
assertionArgs.length > 0 ? `Assertion failed: ${formatConsoleArgs(assertionArgs)}` : 'Assertion failed';
breadcrumb.data.arguments = assertionArgs;
} else {
// Don't capture a breadcrumb for passed assertions
return;
}
}
breadcrumbs.addBreadcrumb(breadcrumb, {
input: args,
level,
});
}
function formatConsoleArgs(values) {
return 'util' in worldwide.GLOBAL_OBJ && typeof (worldwide.GLOBAL_OBJ ).util.format === 'function'
? (worldwide.GLOBAL_OBJ ).util.format(...values)
: string.safeJoin(values, ' ');
}
exports.addConsoleBreadcrumb = addConsoleBreadcrumb;
exports.consoleIntegration = consoleIntegration;
//# sourceMappingURL=console.js.map

View File

@@ -0,0 +1,56 @@
"use strict";
exports.eachWeekendOfInterval = eachWeekendOfInterval;
var _index = require("./_lib/normalizeInterval.cjs");
var _index2 = require("./constructFrom.cjs");
var _index3 = require("./eachDayOfInterval.cjs");
var _index4 = require("./isWeekend.cjs");
/**
* The {@link eachWeekendOfInterval} function options.
*/
/**
* The {@link eachWeekendOfInterval} function result type.
*/
/**
* @name eachWeekendOfInterval
* @category Interval Helpers
* @summary List all the Saturdays and Sundays in the given date interval.
*
* @description
* Get all the Saturdays and Sundays in the given date interval.
*
* @typeParam IntervalType - Interval type.
* @typeParam Options - Options type.
*
* @param interval - The given interval
* @param options - An object with options
*
* @returns An array containing all the Saturdays and Sundays
*
* @example
* // Lists all Saturdays and Sundays in the given date interval
* const result = eachWeekendOfInterval({
* start: new Date(2018, 8, 17),
* end: new Date(2018, 8, 30)
* })
* //=> [
* // Sat Sep 22 2018 00:00:00,
* // Sun Sep 23 2018 00:00:00,
* // Sat Sep 29 2018 00:00:00,
* // Sun Sep 30 2018 00:00:00
* // ]
*/
function eachWeekendOfInterval(interval, options) {
const { start, end } = (0, _index.normalizeInterval)(options?.in, interval);
const dateInterval = (0, _index3.eachDayOfInterval)({ start, end }, options);
const weekends = [];
let index = 0;
while (index < dateInterval.length) {
const date = dateInterval[index++];
if ((0, _index4.isWeekend)(date))
weekends.push((0, _index2.constructFrom)(start, date));
}
return weekends;
}

View File

@@ -0,0 +1,23 @@
"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.AttributeNames = exports.HapiInstrumentation = void 0;
var instrumentation_1 = require("./instrumentation");
Object.defineProperty(exports, "HapiInstrumentation", { enumerable: true, get: function () { return instrumentation_1.HapiInstrumentation; } });
var AttributeNames_1 = require("./enums/AttributeNames");
Object.defineProperty(exports, "AttributeNames", { enumerable: true, get: function () { return AttributeNames_1.AttributeNames; } });
//# sourceMappingURL=index.js.map

View File

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

View File

@@ -0,0 +1 @@
Prism.languages.kusto={comment:{pattern:/\/\/.*/,greedy:!0},string:{pattern:/```[\s\S]*?```|[hH]?(?:"(?:[^\r\n\\"]|\\.)*"|'(?:[^\r\n\\']|\\.)*'|@(?:"[^\r\n"]*"|'[^\r\n']*'))/,greedy:!0},verb:{pattern:/(\|\s*)[a-z][\w-]*/i,lookbehind:!0,alias:"keyword"},command:{pattern:/\.[a-z][a-z\d-]*\b/,alias:"keyword"},"class-name":/\b(?:bool|datetime|decimal|dynamic|guid|int|long|real|string|timespan)\b/,keyword:/\b(?:access|alias|and|anti|as|asc|auto|between|by|(?:contains|(?:ends|starts)with|has(?:perfix|suffix)?)(?:_cs)?|database|declare|desc|external|from|fullouter|has_all|in|ingestion|inline|inner|innerunique|into|(?:left|right)(?:anti(?:semi)?|inner|outer|semi)?|let|like|local|not|of|on|or|pattern|print|query_parameters|range|restrict|schema|set|step|table|tables|to|view|where|with|matches\s+regex|nulls\s+(?:first|last))(?![\w-])/,boolean:/\b(?:false|null|true)\b/,function:/\b[a-z_]\w*(?=\s*\()/,datetime:[{pattern:/\b(?:(?:Fri|Friday|Mon|Monday|Sat|Saturday|Sun|Sunday|Thu|Thursday|Tue|Tuesday|Wed|Wednesday)\s*,\s*)?\d{1,2}(?:\s+|-)(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)(?:\s+|-)\d{2}\s+\d{2}:\d{2}(?::\d{2})?(?:\s*(?:\b(?:[A-Z]|(?:[ECMT][DS]|GM|U)T)|[+-]\d{4}))?\b/,alias:"number"},{pattern:/[+-]?\b(?:\d{4}-\d{2}-\d{2}(?:[ T]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)?|\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)Z?/,alias:"number"}],number:/\b(?:0x[0-9A-Fa-f]+|\d+(?:\.\d+)?(?:[Ee][+-]?\d+)?)(?:(?:min|sec|[mnµ]s|[dhms]|microsecond|tick)\b)?|[+-]?\binf\b/,operator:/=>|[!=]~|[!=<>]=?|[-+*/%|]|\.\./,punctuation:/[()\[\]{},;.:]/};

View File

@@ -0,0 +1 @@
{"version":3,"file":"Sampler.js","sourceRoot":"","sources":["../../../src/trace/Sampler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Context } from '../context/types';\nimport { SpanAttributes } from './attributes';\nimport { Link } from './link';\nimport { SamplingResult } from './SamplingResult';\nimport { SpanKind } from './span_kind';\n\n/**\n * @deprecated use the one declared in @opentelemetry/sdk-trace-base instead.\n * This interface represent a sampler. Sampling is a mechanism to control the\n * noise and overhead introduced by OpenTelemetry by reducing the number of\n * samples of traces collected and sent to the backend.\n */\nexport interface Sampler {\n /**\n * Checks whether span needs to be created and tracked.\n *\n * @param context Parent Context which may contain a span.\n * @param traceId of the span to be created. It can be different from the\n * traceId in the {@link SpanContext}. Typically in situations when the\n * span to be created starts a new trace.\n * @param spanName of the span to be created.\n * @param spanKind of the span to be created.\n * @param attributes Initial set of SpanAttributes for the Span being constructed.\n * @param links Collection of links that will be associated with the Span to\n * be created. Typically useful for batch operations.\n * @returns a {@link SamplingResult}.\n */\n shouldSample(\n context: Context,\n traceId: string,\n spanName: string,\n spanKind: SpanKind,\n attributes: SpanAttributes,\n links: Link[]\n ): SamplingResult;\n\n /** Returns the sampler name or short description with the configuration. */\n toString(): string;\n}\n"]}

View File

@@ -0,0 +1,7 @@
# ECMA402 Abstract
Implementation for various ECMAScript 402 abstract operations.
[![npm Version](https://img.shields.io/npm/v/@formatjs/ecma402-abstract.svg?style=flat-square)](https://www.npmjs.org/package/@formatjs/ecma402-abstract)
**IMPORTANT: This does not follow semver so please pin the version to the exact one that you need.**

View File

@@ -0,0 +1,28 @@
import { type MonitorConfig } from '@sentry/core';
export interface NodeCronOptions {
name: string;
timezone?: string;
}
export interface NodeCron {
schedule: (cronExpression: string, callback: (context?: unknown) => void, options: NodeCronOptions | undefined) => unknown;
}
/**
* Wraps the `node-cron` library with check-in monitoring.
*
* ```ts
* import * as Sentry from "@sentry/node";
* import * as cron from "node-cron";
*
* const cronWithCheckIn = Sentry.cron.instrumentNodeCron(cron);
*
* cronWithCheckIn.schedule(
* "* * * * *",
* () => {
* console.log("running a task every minute");
* },
* { name: "my-cron-job" },
* );
* ```
*/
export declare function instrumentNodeCron<T>(lib: Partial<NodeCron> & T, monitorConfig?: Pick<MonitorConfig, 'isolateTrace'>): T;
//# sourceMappingURL=node-cron.d.ts.map

View File

@@ -0,0 +1,22 @@
'use strict'
const build = require('../..')
module.exports = async function (threadStreamOpts) {
const { port, opts = {} } = threadStreamOpts
return build(
function (source) {
source.on('data', function (line) {
port.postMessage({
data: line,
pinoConfig: {
levels: source.levels,
messageKey: source.messageKey,
errorKey: source.errorKey
}
})
})
},
opts
)
}

View File

@@ -0,0 +1,39 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.mjs";
const dateFormats = {
full: "EEEE، do MMMM y",
long: "do MMMM y",
medium: "d MMM y",
short: "dd/MM/yyyy",
};
const timeFormats = {
full: "HH:mm:ss",
long: "HH:mm:ss",
medium: "HH:mm:ss",
short: "HH:mm",
};
const dateTimeFormats = {
full: "{{date}} 'مع' {{time}}",
long: "{{date}} 'مع' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}",
};
export const formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full",
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full",
}),
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"isPathMatchingRoute.js","names":["pathToRegexp","isPathMatchingRoute","currentRoute","exact","path","viewPath","sensitive","strict","keys","regex","match","exec","viewRoute","startsWith"],"sources":["../../../src/views/Root/isPathMatchingRoute.ts"],"sourcesContent":["import { pathToRegexp } from 'path-to-regexp'\n\nexport const isPathMatchingRoute = ({\n currentRoute,\n exact,\n path: viewPath,\n sensitive,\n strict,\n}: {\n currentRoute: string\n exact?: boolean\n path?: string\n sensitive?: boolean\n strict?: boolean\n}) => {\n // if no path is defined, we cannot match it so return false early\n if (!viewPath) {\n return false\n }\n\n const keys = []\n\n // run the view path through `pathToRegexp` to resolve any dynamic segments\n // i.e. `/admin/custom-view/:id` -> `/admin/custom-view/123`\n const regex = pathToRegexp(viewPath, keys, {\n sensitive,\n strict,\n })\n\n const match = regex.exec(currentRoute)\n const viewRoute = match?.[0] || viewPath\n\n if (exact) {\n return currentRoute === viewRoute\n }\n\n if (!exact) {\n return viewRoute.startsWith(currentRoute)\n }\n}\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ;AAE7B,OAAO,MAAMC,mBAAA,GAAsBA,CAAC;EAClCC,YAAY;EACZC,KAAK;EACLC,IAAA,EAAMC,QAAQ;EACdC,SAAS;EACTC;AAAM,CAOP;EACC;EACA,IAAI,CAACF,QAAA,EAAU;IACb,OAAO;EACT;EAEA,MAAMG,IAAA,GAAO,EAAE;EAEf;EACA;EACA,MAAMC,KAAA,GAAQT,YAAA,CAAaK,QAAA,EAAUG,IAAA,EAAM;IACzCF,SAAA;IACAC;EACF;EAEA,MAAMG,KAAA,GAAQD,KAAA,CAAME,IAAI,CAACT,YAAA;EACzB,MAAMU,SAAA,GAAYF,KAAA,GAAQ,EAAE,IAAIL,QAAA;EAEhC,IAAIF,KAAA,EAAO;IACT,OAAOD,YAAA,KAAiBU,SAAA;EAC1B;EAEA,IAAI,CAACT,KAAA,EAAO;IACV,OAAOS,SAAA,CAAUC,UAAU,CAACX,YAAA;EAC9B;AACF","ignoreList":[]}

View File

@@ -0,0 +1,3 @@
import type { Plugin } from "../types/index.js";
declare const _default: Plugin;
export default _default;

View File

@@ -0,0 +1,53 @@
"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 macaddr_exports = {};
__export(macaddr_exports, {
PgMacaddr: () => PgMacaddr,
PgMacaddrBuilder: () => PgMacaddrBuilder,
macaddr: () => macaddr
});
module.exports = __toCommonJS(macaddr_exports);
var import_entity = require("../../entity.cjs");
var import_common = require("./common.cjs");
class PgMacaddrBuilder extends import_common.PgColumnBuilder {
static [import_entity.entityKind] = "PgMacaddrBuilder";
constructor(name) {
super(name, "string", "PgMacaddr");
}
/** @internal */
build(table) {
return new PgMacaddr(table, this.config);
}
}
class PgMacaddr extends import_common.PgColumn {
static [import_entity.entityKind] = "PgMacaddr";
getSQLType() {
return "macaddr";
}
}
function macaddr(name) {
return new PgMacaddrBuilder(name ?? "");
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
PgMacaddr,
PgMacaddrBuilder,
macaddr
});
//# sourceMappingURL=macaddr.cjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mergeQuery.js","names":["mergeQuery","currentQuery","newQuery","options","page","shouldResetPage","some","key","includes","shouldResetQueryByGroup","mergedQueryByGroup","undefined","queryByGroup","Object","fromEntries","entries","map","value","mergedQuery","columns","groupBy","defaults","limit","preset","search","sort","where"],"sources":["../../../src/providers/ListQuery/mergeQuery.ts"],"sourcesContent":["import type { ListQuery } from 'payload'\n\nexport const mergeQuery = (\n currentQuery: ListQuery,\n newQuery: ListQuery,\n options?: {\n defaults?: ListQuery\n },\n): ListQuery => {\n let page = 'page' in newQuery ? newQuery.page : currentQuery?.page\n\n const shouldResetPage = ['where', 'search', 'groupBy']?.some(\n (key) => key in newQuery && !['limit', 'page'].includes(key),\n )\n\n if (shouldResetPage) {\n page = 1\n }\n\n const shouldResetQueryByGroup = ['where', 'search', 'page', 'limit', 'groupBy', 'sort'].some(\n (key) => key in newQuery,\n )\n\n let mergedQueryByGroup = undefined\n\n if (!shouldResetQueryByGroup) {\n // Deeply merge queryByGroup so we can send a partial update for a specific group\n mergedQueryByGroup = {\n ...(currentQuery?.queryByGroup || {}),\n ...(newQuery.queryByGroup\n ? Object.fromEntries(\n Object.entries(newQuery.queryByGroup).map(([key, value]) => [\n key,\n {\n ...(currentQuery?.queryByGroup?.[key] || {}),\n ...value,\n },\n ]),\n )\n : {}),\n }\n }\n\n const mergedQuery: ListQuery = {\n ...currentQuery,\n ...newQuery,\n columns: 'columns' in newQuery ? newQuery.columns : currentQuery.columns,\n groupBy:\n 'groupBy' in newQuery\n ? newQuery.groupBy\n : (currentQuery?.groupBy ?? options?.defaults?.groupBy),\n limit: 'limit' in newQuery ? newQuery.limit : (currentQuery?.limit ?? options?.defaults?.limit),\n page,\n preset: 'preset' in newQuery ? newQuery.preset : currentQuery?.preset,\n queryByGroup: mergedQueryByGroup,\n search: 'search' in newQuery ? newQuery.search : currentQuery?.search,\n sort:\n 'sort' in newQuery\n ? newQuery.sort\n : ((currentQuery?.sort as string) ?? options?.defaults?.sort),\n where: 'where' in newQuery ? newQuery.where : currentQuery?.where,\n }\n\n return mergedQuery\n}\n"],"mappings":"AAEA,OAAO,MAAMA,UAAA,GAAaA,CACxBC,YAAA,EACAC,QAAA,EACAC,OAAA;EAIA,IAAIC,IAAA,GAAO,UAAUF,QAAA,GAAWA,QAAA,CAASE,IAAI,GAAGH,YAAA,EAAcG,IAAA;EAE9D,MAAMC,eAAA,GAAkB,CAAC,SAAS,UAAU,UAAU,EAAEC,IAAA,CACrDC,GAAA,IAAQA,GAAA,IAAOL,QAAA,IAAY,CAAC,CAAC,SAAS,OAAO,CAACM,QAAQ,CAACD,GAAA;EAG1D,IAAIF,eAAA,EAAiB;IACnBD,IAAA,GAAO;EACT;EAEA,MAAMK,uBAAA,GAA0B,CAAC,SAAS,UAAU,QAAQ,SAAS,WAAW,OAAO,CAACH,IAAI,CACzFC,GAAA,IAAQA,GAAA,IAAOL,QAAA;EAGlB,IAAIQ,kBAAA,GAAqBC,SAAA;EAEzB,IAAI,CAACF,uBAAA,EAAyB;IAC5B;IACAC,kBAAA,GAAqB;MACnB,IAAIT,YAAA,EAAcW,YAAA,IAAgB,CAAC,CAAC;MACpC,IAAIV,QAAA,CAASU,YAAY,GACrBC,MAAA,CAAOC,WAAW,CAChBD,MAAA,CAAOE,OAAO,CAACb,QAAA,CAASU,YAAY,EAAEI,GAAG,CAAC,CAAC,CAACT,GAAA,EAAKU,KAAA,CAAM,KAAK,CAC1DV,GAAA,EACA;QACE,IAAIN,YAAA,EAAcW,YAAA,GAAeL,GAAA,CAAI,IAAI,CAAC,CAAC;QAC3C,GAAGU;MACL,EACD,KAEH,CAAC,CAAC;IACR;EACF;EAEA,MAAMC,WAAA,GAAyB;IAC7B,GAAGjB,YAAY;IACf,GAAGC,QAAQ;IACXiB,OAAA,EAAS,aAAajB,QAAA,GAAWA,QAAA,CAASiB,OAAO,GAAGlB,YAAA,CAAakB,OAAO;IACxEC,OAAA,EACE,aAAalB,QAAA,GACTA,QAAA,CAASkB,OAAO,GACfnB,YAAA,EAAcmB,OAAA,IAAWjB,OAAA,EAASkB,QAAA,EAAUD,OAAA;IACnDE,KAAA,EAAO,WAAWpB,QAAA,GAAWA,QAAA,CAASoB,KAAK,GAAIrB,YAAA,EAAcqB,KAAA,IAASnB,OAAA,EAASkB,QAAA,EAAUC,KAAA;IACzFlB,IAAA;IACAmB,MAAA,EAAQ,YAAYrB,QAAA,GAAWA,QAAA,CAASqB,MAAM,GAAGtB,YAAA,EAAcsB,MAAA;IAC/DX,YAAA,EAAcF,kBAAA;IACdc,MAAA,EAAQ,YAAYtB,QAAA,GAAWA,QAAA,CAASsB,MAAM,GAAGvB,YAAA,EAAcuB,MAAA;IAC/DC,IAAA,EACE,UAAUvB,QAAA,GACNA,QAAA,CAASuB,IAAI,GACZxB,YAAC,EAAcwB,IAAA,IAAmBtB,OAAA,EAASkB,QAAA,EAAUI,IAAA;IAC5DC,KAAA,EAAO,WAAWxB,QAAA,GAAWA,QAAA,CAASwB,KAAK,GAAGzB,YAAA,EAAcyB;EAC9D;EAEA,OAAOR,WAAA;AACT","ignoreList":[]}

View File

@@ -0,0 +1,193 @@
"use strict";
var punycode = require("punycode");
var mappingTable = require("./lib/mappingTable.json");
var PROCESSING_OPTIONS = {
TRANSITIONAL: 0,
NONTRANSITIONAL: 1
};
function normalize(str) { // fix bug in v8
return str.split('\u0000').map(function (s) { return s.normalize('NFC'); }).join('\u0000');
}
function findStatus(val) {
var start = 0;
var end = mappingTable.length - 1;
while (start <= end) {
var mid = Math.floor((start + end) / 2);
var target = mappingTable[mid];
if (target[0][0] <= val && target[0][1] >= val) {
return target;
} else if (target[0][0] > val) {
end = mid - 1;
} else {
start = mid + 1;
}
}
return null;
}
var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
function countSymbols(string) {
return string
// replace every surrogate pair with a BMP symbol
.replace(regexAstralSymbols, '_')
// then get the length
.length;
}
function mapChars(domain_name, useSTD3, processing_option) {
var hasError = false;
var processed = "";
var len = countSymbols(domain_name);
for (var i = 0; i < len; ++i) {
var codePoint = domain_name.codePointAt(i);
var status = findStatus(codePoint);
switch (status[1]) {
case "disallowed":
hasError = true;
processed += String.fromCodePoint(codePoint);
break;
case "ignored":
break;
case "mapped":
processed += String.fromCodePoint.apply(String, status[2]);
break;
case "deviation":
if (processing_option === PROCESSING_OPTIONS.TRANSITIONAL) {
processed += String.fromCodePoint.apply(String, status[2]);
} else {
processed += String.fromCodePoint(codePoint);
}
break;
case "valid":
processed += String.fromCodePoint(codePoint);
break;
case "disallowed_STD3_mapped":
if (useSTD3) {
hasError = true;
processed += String.fromCodePoint(codePoint);
} else {
processed += String.fromCodePoint.apply(String, status[2]);
}
break;
case "disallowed_STD3_valid":
if (useSTD3) {
hasError = true;
}
processed += String.fromCodePoint(codePoint);
break;
}
}
return {
string: processed,
error: hasError
};
}
var combiningMarksRegex = /[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2D]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDE2C-\uDE37\uDEDF-\uDEEA\uDF01-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDE30-\uDE40\uDEAB-\uDEB7]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]/;
function validateLabel(label, processing_option) {
if (label.substr(0, 4) === "xn--") {
label = punycode.toUnicode(label);
processing_option = PROCESSING_OPTIONS.NONTRANSITIONAL;
}
var error = false;
if (normalize(label) !== label ||
(label[3] === "-" && label[4] === "-") ||
label[0] === "-" || label[label.length - 1] === "-" ||
label.indexOf(".") !== -1 ||
label.search(combiningMarksRegex) === 0) {
error = true;
}
var len = countSymbols(label);
for (var i = 0; i < len; ++i) {
var status = findStatus(label.codePointAt(i));
if ((processing === PROCESSING_OPTIONS.TRANSITIONAL && status[1] !== "valid") ||
(processing === PROCESSING_OPTIONS.NONTRANSITIONAL &&
status[1] !== "valid" && status[1] !== "deviation")) {
error = true;
break;
}
}
return {
label: label,
error: error
};
}
function processing(domain_name, useSTD3, processing_option) {
var result = mapChars(domain_name, useSTD3, processing_option);
result.string = normalize(result.string);
var labels = result.string.split(".");
for (var i = 0; i < labels.length; ++i) {
try {
var validation = validateLabel(labels[i]);
labels[i] = validation.label;
result.error = result.error || validation.error;
} catch(e) {
result.error = true;
}
}
return {
string: labels.join("."),
error: result.error
};
}
module.exports.toASCII = function(domain_name, useSTD3, processing_option, verifyDnsLength) {
var result = processing(domain_name, useSTD3, processing_option);
var labels = result.string.split(".");
labels = labels.map(function(l) {
try {
return punycode.toASCII(l);
} catch(e) {
result.error = true;
return l;
}
});
if (verifyDnsLength) {
var total = labels.slice(0, labels.length - 1).join(".").length;
if (total.length > 253 || total.length === 0) {
result.error = true;
}
for (var i=0; i < labels.length; ++i) {
if (labels.length > 63 || labels.length === 0) {
result.error = true;
break;
}
}
}
if (result.error) return null;
return labels.join(".");
};
module.exports.toUnicode = function(domain_name, useSTD3) {
var result = processing(domain_name, useSTD3, PROCESSING_OPTIONS.NONTRANSITIONAL);
return {
domain: result.string,
error: result.error
};
};
module.exports.PROCESSING_OPTIONS = PROCESSING_OPTIONS;

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