Preview: index.js
Size: 4.25 MB
//proc/thread-self/root/home/byroehnu/.trash/node_modules11/prisma/build/index.js
#!/usr/bin/env node
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __esm = (fn2, res) => function __init() {
return fn2 && (res = (0, fn2[__getOwnPropNames(fn2)[0]])(fn2 = 0)), res;
};
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var __publicField = (obj, key, value) => {
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
return value;
};
var __accessCheck = (obj, member, msg) => {
if (!member.has(obj))
throw TypeError("Cannot " + msg);
};
var __privateGet = (obj, member, getter) => {
__accessCheck(obj, member, "read from private field");
return getter ? getter.call(obj) : member.get(obj);
};
var __privateAdd = (obj, member, value) => {
if (member.has(obj))
throw TypeError("Cannot add the same private member more than once");
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
};
var __privateSet = (obj, member, value, setter) => {
__accessCheck(obj, member, "write to private field");
setter ? setter.call(obj, value) : member.set(obj, value);
return value;
};
var __privateWrapper = (obj, member, setter, getter) => ({
set _(value) {
__privateSet(obj, member, value, setter);
},
get _() {
return __privateGet(obj, member, getter);
}
});
// ../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js
var require_ms = __commonJS({
"../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js"(exports2, module2) {
var s3 = 1e3;
var m3 = s3 * 60;
var h3 = m3 * 60;
var d3 = h3 * 24;
var w3 = d3 * 7;
var y3 = d3 * 365.25;
module2.exports = function(val, options2) {
options2 = options2 || {};
var type = typeof val;
if (type === "string" && val.length > 0) {
return parse3(val);
} else if (type === "number" && isFinite(val)) {
return options2.long ? fmtLong2(val) : fmtShort2(val);
}
throw new Error(
"val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
);
};
function parse3(str) {
str = String(str);
if (str.length > 100) {
return;
}
var match4 = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
str
);
if (!match4) {
return;
}
var n2 = parseFloat(match4[1]);
var type = (match4[2] || "ms").toLowerCase();
switch (type) {
case "years":
case "year":
case "yrs":
case "yr":
case "y":
return n2 * y3;
case "weeks":
case "week":
case "w":
return n2 * w3;
case "days":
case "day":
case "d":
return n2 * d3;
case "hours":
case "hour":
case "hrs":
case "hr":
case "h":
return n2 * h3;
case "minutes":
case "minute":
case "mins":
case "min":
case "m":
return n2 * m3;
case "seconds":
case "second":
case "secs":
case "sec":
case "s":
return n2 * s3;
case "milliseconds":
case "millisecond":
case "msecs":
case "msec":
case "ms":
return n2;
default:
return void 0;
}
}
function fmtShort2(ms2) {
var msAbs = Math.abs(ms2);
if (msAbs >= d3) {
return Math.round(ms2 / d3) + "d";
}
if (msAbs >= h3) {
return Math.round(ms2 / h3) + "h";
}
if (msAbs >= m3) {
return Math.round(ms2 / m3) + "m";
}
if (msAbs >= s3) {
return Math.round(ms2 / s3) + "s";
}
return ms2 + "ms";
}
function fmtLong2(ms2) {
var msAbs = Math.abs(ms2);
if (msAbs >= d3) {
return plural2(ms2, msAbs, d3, "day");
}
if (msAbs >= h3) {
return plural2(ms2, msAbs, h3, "hour");
}
if (msAbs >= m3) {
return plural2(ms2, msAbs, m3, "minute");
}
if (msAbs >= s3) {
return plural2(ms2, msAbs, s3, "second");
}
return ms2 + " ms";
}
function plural2(ms2, msAbs, n2, name) {
var isPlural = msAbs >= n2 * 1.5;
return Math.round(ms2 / n2) + " " + name + (isPlural ? "s" : "");
}
}
});
// ../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js
var require_common = __commonJS({
"../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js"(exports2, module2) {
function setup(env3) {
createDebug.debug = createDebug;
createDebug.default = createDebug;
createDebug.coerce = coerce;
createDebug.disable = disable;
createDebug.enable = enable;
createDebug.enabled = enabled;
createDebug.humanize = require_ms();
createDebug.destroy = destroy;
Object.keys(env3).forEach((key) => {
createDebug[key] = env3[key];
});
createDebug.names = [];
createDebug.skips = [];
createDebug.formatters = {};
function selectColor(namespace) {
let hash = 0;
for (let i2 = 0; i2 < namespace.length; i2++) {
hash = (hash << 5) - hash + namespace.charCodeAt(i2);
hash |= 0;
}
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
}
createDebug.selectColor = selectColor;
function createDebug(namespace) {
let prevTime;
let enableOverride = null;
let namespacesCache;
let enabledCache;
function debug27(...args3) {
if (!debug27.enabled) {
return;
}
const self2 = debug27;
const curr = Number(new Date());
const ms2 = curr - (prevTime || curr);
self2.diff = ms2;
self2.prev = prevTime;
self2.curr = curr;
prevTime = curr;
args3[0] = createDebug.coerce(args3[0]);
if (typeof args3[0] !== "string") {
args3.unshift("%O");
}
let index2 = 0;
args3[0] = args3[0].replace(/%([a-zA-Z%])/g, (match4, format2) => {
if (match4 === "%%") {
return "%";
}
index2++;
const formatter = createDebug.formatters[format2];
if (typeof formatter === "function") {
const val = args3[index2];
match4 = formatter.call(self2, val);
args3.splice(index2, 1);
index2--;
}
return match4;
});
createDebug.formatArgs.call(self2, args3);
const logFn = self2.log || createDebug.log;
logFn.apply(self2, args3);
}
debug27.namespace = namespace;
debug27.useColors = createDebug.useColors();
debug27.color = createDebug.selectColor(namespace);
debug27.extend = extend;
debug27.destroy = createDebug.destroy;
Object.defineProperty(debug27, "enabled", {
enumerable: true,
configurable: false,
get: () => {
if (enableOverride !== null) {
return enableOverride;
}
if (namespacesCache !== createDebug.namespaces) {
namespacesCache = createDebug.namespaces;
enabledCache = createDebug.enabled(namespace);
}
return enabledCache;
},
set: (v2) => {
enableOverride = v2;
}
});
if (typeof createDebug.init === "function") {
createDebug.init(debug27);
}
return debug27;
}
function extend(namespace, delimiter2) {
const newDebug = createDebug(this.namespace + (typeof delimiter2 === "undefined" ? ":" : delimiter2) + namespace);
newDebug.log = this.log;
return newDebug;
}
function enable(namespaces) {
createDebug.save(namespaces);
createDebug.namespaces = namespaces;
createDebug.names = [];
createDebug.skips = [];
let i2;
const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
const len = split.length;
for (i2 = 0; i2 < len; i2++) {
if (!split[i2]) {
continue;
}
namespaces = split[i2].replace(/\*/g, ".*?");
if (namespaces[0] === "-") {
createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$"));
} else {
createDebug.names.push(new RegExp("^" + namespaces + "$"));
}
}
}
function disable() {
const namespaces = [
...createDebug.names.map(toNamespace),
...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace)
].join(",");
createDebug.enable("");
return namespaces;
}
function enabled(name) {
if (name[name.length - 1] === "*") {
return true;
}
let i2;
let len;
for (i2 = 0, len = createDebug.skips.length; i2 < len; i2++) {
if (createDebug.skips[i2].test(name)) {
return false;
}
}
for (i2 = 0, len = createDebug.names.length; i2 < len; i2++) {
if (createDebug.names[i2].test(name)) {
return true;
}
}
return false;
}
function toNamespace(regexp) {
return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
}
function coerce(val) {
if (val instanceof Error) {
return val.stack || val.message;
}
return val;
}
function destroy() {
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
}
createDebug.enable(createDebug.load());
return createDebug;
}
module2.exports = setup;
}
});
// ../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js
var require_browser = __commonJS({
"../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js"(exports2, module2) {
exports2.formatArgs = formatArgs;
exports2.save = save;
exports2.load = load;
exports2.useColors = useColors;
exports2.storage = localstorage();
exports2.destroy = (() => {
let warned = false;
return () => {
if (!warned) {
warned = true;
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
}
};
})();
exports2.colors = [
"#0000CC",
"#0000FF",
"#0033CC",
"#0033FF",
"#0066CC",
"#0066FF",
"#0099CC",
"#0099FF",
"#00CC00",
"#00CC33",
"#00CC66",
"#00CC99",
"#00CCCC",
"#00CCFF",
"#3300CC",
"#3300FF",
"#3333CC",
"#3333FF",
"#3366CC",
"#3366FF",
"#3399CC",
"#3399FF",
"#33CC00",
"#33CC33",
"#33CC66",
"#33CC99",
"#33CCCC",
"#33CCFF",
"#6600CC",
"#6600FF",
"#6633CC",
"#6633FF",
"#66CC00",
"#66CC33",
"#9900CC",
"#9900FF",
"#9933CC",
"#9933FF",
"#99CC00",
"#99CC33",
"#CC0000",
"#CC0033",
"#CC0066",
"#CC0099",
"#CC00CC",
"#CC00FF",
"#CC3300",
"#CC3333",
"#CC3366",
"#CC3399",
"#CC33CC",
"#CC33FF",
"#CC6600",
"#CC6633",
"#CC9900",
"#CC9933",
"#CCCC00",
"#CCCC33",
"#FF0000",
"#FF0033",
"#FF0066",
"#FF0099",
"#FF00CC",
"#FF00FF",
"#FF3300",
"#FF3333",
"#FF3366",
"#FF3399",
"#FF33CC",
"#FF33FF",
"#FF6600",
"#FF6633",
"#FF9900",
"#FF9933",
"#FFCC00",
"#FFCC33"
];
function useColors() {
if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
return true;
}
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
return false;
}
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
}
function formatArgs(args3) {
args3[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args3[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff);
if (!this.useColors) {
return;
}
const c3 = "color: " + this.color;
args3.splice(1, 0, c3, "color: inherit");
let index2 = 0;
let lastC = 0;
args3[0].replace(/%[a-zA-Z%]/g, (match4) => {
if (match4 === "%%") {
return;
}
index2++;
if (match4 === "%c") {
lastC = index2;
}
});
args3.splice(lastC, 0, c3);
}
exports2.log = console.debug || console.log || (() => {
});
function save(namespaces) {
try {
if (namespaces) {
exports2.storage.setItem("debug", namespaces);
} else {
exports2.storage.removeItem("debug");
}
} catch (error2) {
}
}
function load() {
let r2;
try {
r2 = exports2.storage.getItem("debug");
} catch (error2) {
}
if (!r2 && typeof process !== "undefined" && "env" in process) {
r2 = process.env.DEBUG;
}
return r2;
}
function localstorage() {
try {
return localStorage;
} catch (error2) {
}
}
module2.exports = require_common()(exports2);
var { formatters } = module2.exports;
formatters.j = function(v2) {
try {
return JSON.stringify(v2);
} catch (error2) {
return "[UnexpectedJSONParseError]: " + error2.message;
}
};
}
});
// ../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js
var require_has_flag = __commonJS({
"../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"(exports2, module2) {
"use strict";
module2.exports = (flag, argv = process.argv) => {
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
const position = argv.indexOf(prefix + flag);
const terminatorPosition = argv.indexOf("--");
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
};
}
});
// ../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js
var require_supports_color = __commonJS({
"../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports2, module2) {
"use strict";
var os7 = require("os");
var tty2 = require("tty");
var hasFlag2 = require_has_flag();
var { env: env3 } = process;
var forceColor2;
if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false") || hasFlag2("color=never")) {
forceColor2 = 0;
} else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) {
forceColor2 = 1;
}
if ("FORCE_COLOR" in env3) {
if (env3.FORCE_COLOR === "true") {
forceColor2 = 1;
} else if (env3.FORCE_COLOR === "false") {
forceColor2 = 0;
} else {
forceColor2 = env3.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env3.FORCE_COLOR, 10), 3);
}
}
function translateLevel2(level) {
if (level === 0) {
return false;
}
return {
level,
hasBasic: true,
has256: level >= 2,
has16m: level >= 3
};
}
function supportsColor2(haveStream, streamIsTTY) {
if (forceColor2 === 0) {
return 0;
}
if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor")) {
return 3;
}
if (hasFlag2("color=256")) {
return 2;
}
if (haveStream && !streamIsTTY && forceColor2 === void 0) {
return 0;
}
const min = forceColor2 || 0;
if (env3.TERM === "dumb") {
return min;
}
if (process.platform === "win32") {
const osRelease = os7.release().split(".");
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
return Number(osRelease[2]) >= 14931 ? 3 : 2;
}
return 1;
}
if ("CI" in env3) {
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env3) || env3.CI_NAME === "codeship") {
return 1;
}
return min;
}
if ("TEAMCITY_VERSION" in env3) {
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env3.TEAMCITY_VERSION) ? 1 : 0;
}
if (env3.COLORTERM === "truecolor") {
return 3;
}
if ("TERM_PROGRAM" in env3) {
const version3 = parseInt((env3.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
switch (env3.TERM_PROGRAM) {
case "iTerm.app":
return version3 >= 3 ? 3 : 2;
case "Apple_Terminal":
return 2;
}
}
if (/-256(color)?$/i.test(env3.TERM)) {
return 2;
}
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env3.TERM)) {
return 1;
}
if ("COLORTERM" in env3) {
return 1;
}
return min;
}
function getSupportLevel2(stream4) {
const level = supportsColor2(stream4, stream4 && stream4.isTTY);
return translateLevel2(level);
}
module2.exports = {
supportsColor: getSupportLevel2,
stdout: translateLevel2(supportsColor2(true, tty2.isatty(1))),
stderr: translateLevel2(supportsColor2(true, tty2.isatty(2)))
};
}
});
// ../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js
var require_node = __commonJS({
"../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js"(exports2, module2) {
var tty2 = require("tty");
var util5 = require("util");
exports2.init = init3;
exports2.log = log4;
exports2.formatArgs = formatArgs;
exports2.save = save;
exports2.load = load;
exports2.useColors = useColors;
exports2.destroy = util5.deprecate(
() => {
},
"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
);
exports2.colors = [6, 2, 3, 4, 5, 1];
try {
const supportsColor2 = require_supports_color();
if (supportsColor2 && (supportsColor2.stderr || supportsColor2).level >= 2) {
exports2.colors = [
20,
21,
26,
27,
32,
33,
38,
39,
40,
41,
42,
43,
44,
45,
56,
57,
62,
63,
68,
69,
74,
75,
76,
77,
78,
79,
80,
81,
92,
93,
98,
99,
112,
113,
128,
129,
134,
135,
148,
149,
160,
161,
162,
163,
164,
165,
166,
167,
168,
169,
170,
171,
172,
173,
178,
179,
184,
185,
196,
197,
198,
199,
200,
201,
202,
203,
204,
205,
206,
207,
208,
209,
214,
215,
220,
221
];
}
} catch (error2) {
}
exports2.inspectOpts = Object.keys(process.env).filter((key) => {
return /^debug_/i.test(key);
}).reduce((obj, key) => {
const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_2, k) => {
return k.toUpperCase();
});
let val = process.env[key];
if (/^(yes|on|true|enabled)$/i.test(val)) {
val = true;
} else if (/^(no|off|false|disabled)$/i.test(val)) {
val = false;
} else if (val === "null") {
val = null;
} else {
val = Number(val);
}
obj[prop] = val;
return obj;
}, {});
function useColors() {
return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty2.isatty(process.stderr.fd);
}
function formatArgs(args3) {
const { namespace: name, useColors: useColors2 } = this;
if (useColors2) {
const c3 = this.color;
const colorCode = "\x1B[3" + (c3 < 8 ? c3 : "8;5;" + c3);
const prefix = ` ${colorCode};1m${name} \x1B[0m`;
args3[0] = prefix + args3[0].split("\n").join("\n" + prefix);
args3.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
} else {
args3[0] = getDate() + name + " " + args3[0];
}
}
function getDate() {
if (exports2.inspectOpts.hideDate) {
return "";
}
return new Date().toISOString() + " ";
}
function log4(...args3) {
return process.stderr.write(util5.format(...args3) + "\n");
}
function save(namespaces) {
if (namespaces) {
process.env.DEBUG = namespaces;
} else {
delete process.env.DEBUG;
}
}
function load() {
return process.env.DEBUG;
}
function init3(debug27) {
debug27.inspectOpts = {};
const keys = Object.keys(exports2.inspectOpts);
for (let i2 = 0; i2 < keys.length; i2++) {
debug27.inspectOpts[keys[i2]] = exports2.inspectOpts[keys[i2]];
}
}
module2.exports = require_common()(exports2);
var { formatters } = module2.exports;
formatters.o = function(v2) {
this.inspectOpts.colors = this.useColors;
return util5.inspect(v2, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
};
formatters.O = function(v2) {
this.inspectOpts.colors = this.useColors;
return util5.inspect(v2, this.inspectOpts);
};
}
});
// ../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js
var require_src = __commonJS({
"../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js"(exports2, module2) {
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
module2.exports = require_browser();
} else {
module2.exports = require_node();
}
}
});
// ../../node_modules/.pnpm/yocto-queue@0.1.0/node_modules/yocto-queue/index.js
var require_yocto_queue = __commonJS({
"../../node_modules/.pnpm/yocto-queue@0.1.0/node_modules/yocto-queue/index.js"(exports2, module2) {
var Node2 = class {
constructor(value) {
this.value = value;
this.next = void 0;
}
};
var Queue2 = class {
constructor() {
this.clear();
}
enqueue(value) {
const node = new Node2(value);
if (this._head) {
this._tail.next = node;
this._tail = node;
} else {
this._head = node;
this._tail = node;
}
this._size++;
}
dequeue() {
const current = this._head;
if (!current) {
return;
}
this._head = this._head.next;
this._size--;
return current.value;
}
clear() {
this._head = void 0;
this._tail = void 0;
this._size = 0;
}
get size() {
return this._size;
}
*[Symbol.iterator]() {
let current = this._head;
while (current) {
yield current.value;
current = current.next;
}
}
};
module2.exports = Queue2;
}
});
// ../../node_modules/.pnpm/p-limit@3.1.0/node_modules/p-limit/index.js
var require_p_limit = __commonJS({
"../../node_modules/.pnpm/p-limit@3.1.0/node_modules/p-limit/index.js"(exports2, module2) {
"use strict";
var Queue2 = require_yocto_queue();
var pLimit2 = (concurrency) => {
if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) {
throw new TypeError("Expected `concurrency` to be a number from 1 and up");
}
const queue2 = new Queue2();
let activeCount = 0;
const next = () => {
activeCount--;
if (queue2.size > 0) {
queue2.dequeue()();
}
};
const run2 = async (fn2, resolve3, ...args3) => {
activeCount++;
const result = (async () => fn2(...args3))();
resolve3(result);
try {
await result;
} catch {
}
next();
};
const enqueue = (fn2, resolve3, ...args3) => {
queue2.enqueue(run2.bind(null, fn2, resolve3, ...args3));
(async () => {
await Promise.resolve();
if (activeCount < concurrency && queue2.size > 0) {
queue2.dequeue()();
}
})();
};
const generator = (fn2, ...args3) => new Promise((resolve3) => {
enqueue(fn2, resolve3, ...args3);
});
Object.defineProperties(generator, {
activeCount: {
get: () => activeCount
},
pendingCount: {
get: () => queue2.size
},
clearQueue: {
value: () => {
queue2.clear();
}
}
});
return generator;
};
module2.exports = pLimit2;
}
});
// ../../node_modules/.pnpm/p-locate@5.0.0/node_modules/p-locate/index.js
var require_p_locate = __commonJS({
"../../node_modules/.pnpm/p-locate@5.0.0/node_modules/p-locate/index.js"(exports2, module2) {
"use strict";
var pLimit2 = require_p_limit();
var EndError2 = class extends Error {
constructor(value) {
super();
this.value = value;
}
};
var testElement2 = async (element, tester) => tester(await element);
var finder2 = async (element) => {
const values = await Promise.all(element);
if (values[1] === true) {
throw new EndError2(values[0]);
}
return false;
};
var pLocate2 = async (iterable, tester, options2) => {
options2 = {
concurrency: Infinity,
preserveOrder: true,
...options2
};
const limit = pLimit2(options2.concurrency);
const items = [...iterable].map((element) => [element, limit(testElement2, element, tester)]);
const checkLimit = pLimit2(options2.preserveOrder ? 1 : Infinity);
try {
await Promise.all(items.map((element) => checkLimit(finder2, element)));
} catch (error2) {
if (error2 instanceof EndError2) {
return error2.value;
}
throw error2;
}
};
module2.exports = pLocate2;
}
});
// ../../node_modules/.pnpm/locate-path@6.0.0/node_modules/locate-path/index.js
var require_locate_path = __commonJS({
"../../node_modules/.pnpm/locate-path@6.0.0/node_modules/locate-path/index.js"(exports2, module2) {
"use strict";
var path38 = require("path");
var fs40 = require("fs");
var { promisify: promisify9 } = require("util");
var pLocate2 = require_p_locate();
var fsStat = promisify9(fs40.stat);
var fsLStat = promisify9(fs40.lstat);
var typeMappings2 = {
directory: "isDirectory",
file: "isFile"
};
function checkType2({ type }) {
if (type in typeMappings2) {
return;
}
throw new Error(`Invalid type specified: ${type}`);
}
var matchType2 = (type, stat) => type === void 0 || stat[typeMappings2[type]]();
module2.exports = async (paths2, options2) => {
options2 = {
cwd: process.cwd(),
type: "file",
allowSymlinks: true,
...options2
};
checkType2(options2);
const statFn = options2.allowSymlinks ? fsStat : fsLStat;
return pLocate2(paths2, async (path_) => {
try {
const stat = await statFn(path38.resolve(options2.cwd, path_));
return matchType2(options2.type, stat);
} catch {
return false;
}
}, options2);
};
module2.exports.sync = (paths2, options2) => {
options2 = {
cwd: process.cwd(),
allowSymlinks: true,
type: "file",
...options2
};
checkType2(options2);
const statFn = options2.allowSymlinks ? fs40.statSync : fs40.lstatSync;
for (const path_ of paths2) {
try {
const stat = statFn(path38.resolve(options2.cwd, path_));
if (matchType2(options2.type, stat)) {
return path_;
}
} catch {
}
}
};
}
});
// ../../node_modules/.pnpm/path-exists@4.0.0/node_modules/path-exists/index.js
var require_path_exists = __commonJS({
"../../node_modules/.pnpm/path-exists@4.0.0/node_modules/path-exists/index.js"(exports2, module2) {
"use strict";
var fs40 = require("fs");
var { promisify: promisify9 } = require("util");
var pAccess = promisify9(fs40.access);
module2.exports = async (path38) => {
try {
await pAccess(path38);
return true;
} catch (_2) {
return false;
}
};
module2.exports.sync = (path38) => {
try {
fs40.accessSync(path38);
return true;
} catch (_2) {
return false;
}
};
}
});
// ../../node_modules/.pnpm/find-up@5.0.0/node_modules/find-up/index.js
var require_find_up = __commonJS({
"../../node_modules/.pnpm/find-up@5.0.0/node_modules/find-up/index.js"(exports2, module2) {
"use strict";
var path38 = require("path");
var locatePath2 = require_locate_path();
var pathExists = require_path_exists();
var stop = Symbol("findUp.stop");
module2.exports = async (name, options2 = {}) => {
let directory = path38.resolve(options2.cwd || "");
const { root } = path38.parse(directory);
const paths2 = [].concat(name);
const runMatcher = async (locateOptions) => {
if (typeof name !== "function") {
return locatePath2(paths2, locateOptions);
}
const foundPath = await name(locateOptions.cwd);
if (typeof foundPath === "string") {
return locatePath2([foundPath], locateOptions);
}
return foundPath;
};
while (true) {
const foundPath = await runMatcher({ ...options2, cwd: directory });
if (foundPath === stop) {
return;
}
if (foundPath) {
return path38.resolve(directory, foundPath);
}
if (directory === root) {
return;
}
directory = path38.dirname(directory);
}
};
module2.exports.sync = (name, options2 = {}) => {
let directory = path38.resolve(options2.cwd || "");
const { root } = path38.parse(directory);
const paths2 = [].concat(name);
const runMatcher = (locateOptions) => {
if (typeof name !== "function") {
return locatePath2.sync(paths2, locateOptions);
}
const foundPath = name(locateOptions.cwd);
if (typeof foundPath === "string") {
return locatePath2.sync([foundPath], locateOptions);
}
return foundPath;
};
while (true) {
const foundPath = runMatcher({ ...options2, cwd: directory });
if (foundPath === stop) {
return;
}
if (foundPath) {
return path38.resolve(directory, foundPath);
}
if (directory === root) {
return;
}
directory = path38.dirname(directory);
}
};
module2.exports.exists = pathExists;
module2.exports.sync.exists = pathExists.sync;
module2.exports.stop = stop;
}
});
// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
var require_windows = __commonJS({
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports2, module2) {
module2.exports = isexe2;
isexe2.sync = sync2;
var fs40 = require("fs");
function checkPathExt(path38, options2) {
var pathext = options2.pathExt !== void 0 ? options2.pathExt : process.env.PATHEXT;
if (!pathext) {
return true;
}
pathext = pathext.split(";");
if (pathext.indexOf("") !== -1) {
return true;
}
for (var i2 = 0; i2 < pathext.length; i2++) {
var p2 = pathext[i2].toLowerCase();
if (p2 && path38.substr(-p2.length).toLowerCase() === p2) {
return true;
}
}
return false;
}
function checkStat(stat, path38, options2) {
if (!stat.isSymbolicLink() && !stat.isFile()) {
return false;
}
return checkPathExt(path38, options2);
}
function isexe2(path38, options2, cb) {
fs40.stat(path38, function(er, stat) {
cb(er, er ? false : checkStat(stat, path38, options2));
});
}
function sync2(path38, options2) {
return checkStat(fs40.statSync(path38), path38, options2);
}
}
});
// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
var require_mode = __commonJS({
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports2, module2) {
module2.exports = isexe2;
isexe2.sync = sync2;
var fs40 = require("fs");
function isexe2(path38, options2, cb) {
fs40.stat(path38, function(er, stat) {
cb(er, er ? false : checkStat(stat, options2));
});
}
function sync2(path38, options2) {
return checkStat(fs40.statSync(path38), options2);
}
function checkStat(stat, options2) {
return stat.isFile() && checkMode(stat, options2);
}
function checkMode(stat, options2) {
var mod = stat.mode;
var uid = stat.uid;
var gid = stat.gid;
var myUid = options2.uid !== void 0 ? options2.uid : process.getuid && process.getuid();
var myGid = options2.gid !== void 0 ? options2.gid : process.getgid && process.getgid();
var u2 = parseInt("100", 8);
var g2 = parseInt("010", 8);
var o2 = parseInt("001", 8);
var ug = u2 | g2;
var ret = mod & o2 || mod & g2 && gid === myGid || mod & u2 && uid === myUid || mod & ug && myUid === 0;
return ret;
}
}
});
// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
var require_isexe = __commonJS({
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports2, module2) {
var fs40 = require("fs");
var core2;
if (process.platform === "win32" || global.TESTING_WINDOWS) {
core2 = require_windows();
} else {
core2 = require_mode();
}
module2.exports = isexe2;
isexe2.sync = sync2;
function isexe2(path38, options2, cb) {
if (typeof options2 === "function") {
cb = options2;
options2 = {};
}
if (!cb) {
if (typeof Promise !== "function") {
throw new TypeError("callback not provided");
}
return new Promise(function(resolve3, reject2) {
isexe2(path38, options2 || {}, function(er, is) {
if (er) {
reject2(er);
} else {
resolve3(is);
}
});
});
}
core2(path38, options2 || {}, function(er, is) {
if (er) {
if (er.code === "EACCES" || options2 && options2.ignoreErrors) {
er = null;
is = false;
}
}
cb(er, is);
});
}
function sync2(path38, options2) {
try {
return core2.sync(path38, options2 || {});
} catch (er) {
if (options2 && options2.ignoreErrors || er.code === "EACCES") {
return false;
} else {
throw er;
}
}
}
}
});
// ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
var require_which = __commonJS({
"../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports2, module2) {
var isWindows3 = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
var path38 = require("path");
var COLON2 = isWindows3 ? ";" : ":";
var isexe2 = require_isexe();
var getNotFoundError2 = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
var getPathInfo2 = (cmd, opt) => {
const colon = opt.colon || COLON2;
const pathEnv = cmd.match(/\//) || isWindows3 && cmd.match(/\\/) ? [""] : [
...isWindows3 ? [process.cwd()] : [],
...(opt.path || process.env.PATH || "").split(colon)
];
const pathExtExe = isWindows3 ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
const pathExt = isWindows3 ? pathExtExe.split(colon) : [""];
if (isWindows3) {
if (cmd.indexOf(".") !== -1 && pathExt[0] !== "")
pathExt.unshift("");
}
return {
pathEnv,
pathExt,
pathExtExe
};
};
var which2 = (cmd, opt, cb) => {
if (typeof opt === "function") {
cb = opt;
opt = {};
}
if (!opt)
opt = {};
const { pathEnv, pathExt, pathExtExe } = getPathInfo2(cmd, opt);
const found = [];
const step = (i2) => new Promise((resolve3, reject2) => {
if (i2 === pathEnv.length)
return opt.all && found.length ? resolve3(found) : reject2(getNotFoundError2(cmd));
const ppRaw = pathEnv[i2];
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
const pCmd = path38.join(pathPart, cmd);
const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
resolve3(subStep(p2, i2, 0));
});
const subStep = (p2, i2, ii) => new Promise((resolve3, reject2) => {
if (ii === pathExt.length)
return resolve3(step(i2 + 1));
const ext = pathExt[ii];
isexe2(p2 + ext, { pathExt: pathExtExe }, (er, is) => {
if (!er && is) {
if (opt.all)
found.push(p2 + ext);
else
return resolve3(p2 + ext);
}
return resolve3(subStep(p2, i2, ii + 1));
});
});
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
};
var whichSync2 = (cmd, opt) => {
opt = opt || {};
const { pathEnv, pathExt, pathExtExe } = getPathInfo2(cmd, opt);
const found = [];
for (let i2 = 0; i2 < pathEnv.length; i2++) {
const ppRaw = pathEnv[i2];
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
const pCmd = path38.join(pathPart, cmd);
const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
for (let j = 0; j < pathExt.length; j++) {
const cur = p2 + pathExt[j];
try {
const is = isexe2.sync(cur, { pathExt: pathExtExe });
if (is) {
if (opt.all)
found.push(cur);
else
return cur;
}
} catch (ex) {
}
}
}
if (opt.all && found.length)
return found;
if (opt.nothrow)
return null;
throw getNotFoundError2(cmd);
};
module2.exports = which2;
which2.sync = whichSync2;
}
});
// ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
var require_path_key = __commonJS({
"../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports2, module2) {
"use strict";
var pathKey2 = (options2 = {}) => {
const environment = options2.env || process.env;
const platform2 = options2.platform || process.platform;
if (platform2 !== "win32") {
return "PATH";
}
return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
};
module2.exports = pathKey2;
module2.exports.default = pathKey2;
}
});
// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js
var require_resolveCommand = __commonJS({
"../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
"use strict";
var path38 = require("path");
var which2 = require_which();
var getPathKey2 = require_path_key();
function resolveCommandAttempt2(parsed, withoutPathExt) {
const env3 = parsed.options.env || process.env;
const cwd = process.cwd();
const hasCustomCwd = parsed.options.cwd != null;
const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
if (shouldSwitchCwd) {
try {
process.chdir(parsed.options.cwd);
} catch (err) {
}
}
let resolved;
try {
resolved = which2.sync(parsed.command, {
path: env3[getPathKey2({ env: env3 })],
pathExt: withoutPathExt ? path38.delimiter : void 0
});
} catch (e2) {
} finally {
if (shouldSwitchCwd) {
process.chdir(cwd);
}
}
if (resolved) {
resolved = path38.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
}
return resolved;
}
function resolveCommand2(parsed) {
return resolveCommandAttempt2(parsed) || resolveCommandAttempt2(parsed, true);
}
module2.exports = resolveCommand2;
}
});
// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js
var require_escape = __commonJS({
"../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js"(exports2, module2) {
"use strict";
var metaCharsRegExp2 = /([()\][%!^"`<>&|;, *?])/g;
function escapeCommand2(arg2) {
arg2 = arg2.replace(metaCharsRegExp2, "^$1");
return arg2;
}
function escapeArgument2(arg2, doubleEscapeMetaChars) {
arg2 = `${arg2}`;
arg2 = arg2.replace(/(\\*)"/g, '$1$1\\"');
arg2 = arg2.replace(/(\\*)$/, "$1$1");
arg2 = `"${arg2}"`;
arg2 = arg2.replace(metaCharsRegExp2, "^$1");
if (doubleEscapeMetaChars) {
arg2 = arg2.replace(metaCharsRegExp2, "^$1");
}
return arg2;
}
module2.exports.command = escapeCommand2;
module2.exports.argument = escapeArgument2;
}
});
// ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
var require_shebang_regex = __commonJS({
"../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports2, module2) {
"use strict";
module2.exports = /^#!(.*)/;
}
});
// ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
var require_shebang_command = __commonJS({
"../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports2, module2) {
"use strict";
var shebangRegex2 = require_shebang_regex();
module2.exports = (string = "") => {
const match4 = string.match(shebangRegex2);
if (!match4) {
return null;
}
const [path38, argument] = match4[0].replace(/#! ?/, "").split(" ");
const binary = path38.split("/").pop();
if (binary === "env") {
return argument;
}
return argument ? `${binary} ${argument}` : binary;
};
}
});
// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js
var require_readShebang = __commonJS({
"../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
"use strict";
var fs40 = require("fs");
var shebangCommand2 = require_shebang_command();
function readShebang2(command) {
const size = 150;
const buffer = Buffer.alloc(size);
let fd;
try {
fd = fs40.openSync(command, "r");
fs40.readSync(fd, buffer, 0, size, 0);
fs40.closeSync(fd);
} catch (e2) {
}
return shebangCommand2(buffer.toString());
}
module2.exports = readShebang2;
}
});
// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js
var require_parse = __commonJS({
"../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
"use strict";
var path38 = require("path");
var resolveCommand2 = require_resolveCommand();
var escape3 = require_escape();
var readShebang2 = require_readShebang();
var isWin = process.platform === "win32";
var isExecutableRegExp2 = /\.(?:com|exe)$/i;
var isCmdShimRegExp2 = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
function detectShebang2(parsed) {
parsed.file = resolveCommand2(parsed);
const shebang = parsed.file && readShebang2(parsed.file);
if (shebang) {
parsed.args.unshift(parsed.file);
parsed.command = shebang;
return resolveCommand2(parsed);
}
return parsed.file;
}
function parseNonShell2(parsed) {
if (!isWin) {
return parsed;
}
const commandFile = detectShebang2(parsed);
const needsShell = !isExecutableRegExp2.test(commandFile);
if (parsed.options.forceShell || needsShell) {
const needsDoubleEscapeMetaChars = isCmdShimRegExp2.test(commandFile);
parsed.command = path38.normalize(parsed.command);
parsed.command = escape3.command(parsed.command);
parsed.args = parsed.args.map((arg2) => escape3.argument(arg2, needsDoubleEscapeMetaChars));
const shellCommand = [parsed.command].concat(parsed.args).join(" ");
parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`];
parsed.command = process.env.comspec || "cmd.exe";
parsed.options.windowsVerbatimArguments = true;
}
return parsed;
}
function parse3(command, args3, options2) {
if (args3 && !Array.isArray(args3)) {
options2 = args3;
args3 = null;
}
args3 = args3 ? args3.slice(0) : [];
options2 = Object.assign({}, options2);
const parsed = {
command,
args: args3,
options: options2,
file: void 0,
original: {
command,
args: args3
}
};
return options2.shell ? parsed : parseNonShell2(parsed);
}
module2.exports = parse3;
}
});
// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js
var require_enoent = __commonJS({
"../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js"(exports2, module2) {
"use strict";
var isWin = process.platform === "win32";
function notFoundError2(original, syscall) {
return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
code: "ENOENT",
errno: "ENOENT",
syscall: `${syscall} ${original.command}`,
path: original.command,
spawnargs: original.args
});
}
function hookChildProcess2(cp3, parsed) {
if (!isWin) {
return;
}
const originalEmit = cp3.emit;
cp3.emit = function(name, arg1) {
if (name === "exit") {
const err = verifyENOENT2(arg1, parsed, "spawn");
if (err) {
return originalEmit.call(cp3, "error", err);
}
}
return originalEmit.apply(cp3, arguments);
};
}
function verifyENOENT2(status, parsed) {
if (isWin && status === 1 && !parsed.file) {
return notFoundError2(parsed.original, "spawn");
}
return null;
}
function verifyENOENTSync2(status, parsed) {
if (isWin && status === 1 && !parsed.file) {
return notFoundError2(parsed.original, "spawnSync");
}
return null;
}
module2.exports = {
hookChildProcess: hookChildProcess2,
verifyENOENT: verifyENOENT2,
verifyENOENTSync: verifyENOENTSync2,
notFoundError: notFoundError2
};
}
});
// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js
var require_cross_spawn = __commonJS({
"../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js"(exports2, module2) {
"use strict";
var cp3 = require("child_process");
var parse3 = require_parse();
var enoent2 = require_enoent();
function spawn5(command, args3, options2) {
const parsed = parse3(command, args3, options2);
const spawned = cp3.spawn(parsed.command, parsed.args, parsed.options);
enoent2.hookChildProcess(spawned, parsed);
return spawned;
}
function spawnSync2(command, args3, options2) {
const parsed = parse3(command, args3, options2);
const result = cp3.spawnSync(parsed.command, parsed.args, parsed.options);
result.error = result.error || enoent2.verifyENOENTSync(result.status, parsed);
return result;
}
module2.exports = spawn5;
module2.exports.spawn = spawn5;
module2.exports.sync = spawnSync2;
module2.exports._parse = parse3;
module2.exports._enoent = enoent2;
}
});
// ../../node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js
var require_strip_final_newline = __commonJS({
"../../node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js"(exports2, module2) {
"use strict";
module2.exports = (input) => {
const LF = typeof input === "string" ? "\n" : "\n".charCodeAt();
const CR = typeof input === "string" ? "\r" : "\r".charCodeAt();
if (input[input.length - 1] === LF) {
input = input.slice(0, input.length - 1);
}
if (input[input.length - 1] === CR) {
input = input.slice(0, input.length - 1);
}
return input;
};
}
});
// ../../node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js
var require_npm_run_path = __commonJS({
"../../node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js"(exports2, module2) {
"use strict";
var path38 = require("path");
var pathKey2 = require_path_key();
var npmRunPath2 = (options2) => {
options2 = {
cwd: process.cwd(),
path: process.env[pathKey2()],
execPath: process.execPath,
...options2
};
let previous;
let cwdPath = path38.resolve(options2.cwd);
const result = [];
while (previous !== cwdPath) {
result.push(path38.join(cwdPath, "node_modules/.bin"));
previous = cwdPath;
cwdPath = path38.resolve(cwdPath, "..");
}
const execPathDir = path38.resolve(options2.cwd, options2.execPath, "..");
result.push(execPathDir);
return result.concat(options2.path).join(path38.delimiter);
};
module2.exports = npmRunPath2;
module2.exports.default = npmRunPath2;
module2.exports.env = (options2) => {
options2 = {
env: process.env,
...options2
};
const env3 = { ...options2.env };
const path39 = pathKey2({ env: env3 });
options2.path = env3[path39];
env3[path39] = module2.exports(options2);
return env3;
};
}
});
// ../../node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js
var require_mimic_fn = __commonJS({
"../../node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js"(exports2, module2) {
"use strict";
var mimicFn = (to, from) => {
for (const prop of Reflect.ownKeys(from)) {
Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
}
return to;
};
module2.exports = mimicFn;
module2.exports.default = mimicFn;
}
});
// ../../node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js
var require_onetime = __commonJS({
"../../node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js"(exports2, module2) {
"use strict";
var mimicFn = require_mimic_fn();
var calledFunctions2 = /* @__PURE__ */ new WeakMap();
var onetime2 = (function_, options2 = {}) => {
if (typeof function_ !== "function") {
throw new TypeError("Expected a function");
}
let returnValue;
let callCount = 0;
const functionName = function_.displayName || function_.name || "<anonymous>";
const onetime3 = function(...arguments_) {
calledFunctions2.set(onetime3, ++callCount);
if (callCount === 1) {
returnValue = function_.apply(this, arguments_);
function_ = null;
} else if (options2.throw === true) {
throw new Error(`Function \`${functionName}\` can only be called once`);
}
return returnValue;
};
mimicFn(onetime3, function_);
calledFunctions2.set(onetime3, callCount);
return onetime3;
};
module2.exports = onetime2;
module2.exports.default = onetime2;
module2.exports.callCount = (function_) => {
if (!calledFunctions2.has(function_)) {
throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);
}
return calledFunctions2.get(function_);
};
}
});
// ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/core.js
var require_core = __commonJS({
"../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/core.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.SIGNALS = void 0;
var SIGNALS2 = [
{
name: "SIGHUP",
number: 1,
action: "terminate",
description: "Terminal closed",
standard: "posix"
},
{
name: "SIGINT",
number: 2,
action: "terminate",
description: "User interruption with CTRL-C",
standard: "ansi"
},
{
name: "SIGQUIT",
number: 3,
action: "core",
description: "User interruption with CTRL-\\",
standard: "posix"
},
{
name: "SIGILL",
number: 4,
action: "core",
description: "Invalid machine instruction",
standard: "ansi"
},
{
name: "SIGTRAP",
number: 5,
action: "core",
description: "Debugger breakpoint",
standard: "posix"
},
{
name: "SIGABRT",
number: 6,
action: "core",
description: "Aborted",
standard: "ansi"
},
{
name: "SIGIOT",
number: 6,
action: "core",
description: "Aborted",
standard: "bsd"
},
{
name: "SIGBUS",
number: 7,
action: "core",
description: "Bus error due to misaligned, non-existing address or paging error",
standard: "bsd"
},
{
name: "SIGEMT",
number: 7,
action: "terminate",
description: "Command should be emulated but is not implemented",
standard: "other"
},
{
name: "SIGFPE",
number: 8,
action: "core",
description: "Floating point arithmetic error",
standard: "ansi"
},
{
name: "SIGKILL",
number: 9,
action: "terminate",
description: "Forced termination",
standard: "posix",
forced: true
},
{
name: "SIGUSR1",
number: 10,
action: "terminate",
description: "Application-specific signal",
standard: "posix"
},
{
name: "SIGSEGV",
number: 11,
action: "core",
description: "Segmentation fault",
standard: "ansi"
},
{
name: "SIGUSR2",
number: 12,
action: "terminate",
description: "Application-specific signal",
standard: "posix"
},
{
name: "SIGPIPE",
number: 13,
action: "terminate",
description: "Broken pipe or socket",
standard: "posix"
},
{
name: "SIGALRM",
number: 14,
action: "terminate",
description: "Timeout or timer",
standard: "posix"
},
{
name: "SIGTERM",
number: 15,
action: "terminate",
description: "Termination",
standard: "ansi"
},
{
name: "SIGSTKFLT",
number: 16,
action: "terminate",
description: "Stack is empty or overflowed",
standard: "other"
},
{
name: "SIGCHLD",
number: 17,
action: "ignore",
description: "Child process terminated, paused or unpaused",
standard: "posix"
},
{
name: "SIGCLD",
number: 17,
action: "ignore",
description: "Child process terminated, paused or unpaused",
standard: "other"
},
{
name: "SIGCONT",
number: 18,
action: "unpause",
description: "Unpaused",
standard: "posix",
forced: true
},
{
name: "SIGSTOP",
number: 19,
action: "pause",
description: "Paused",
standard: "posix",
forced: true
},
{
name: "SIGTSTP",
number: 20,
action: "pause",
description: 'Paused using CTRL-Z or "suspend"',
standard: "posix"
},
{
name: "SIGTTIN",
number: 21,
action: "pause",
description: "Background process cannot read terminal input",
standard: "posix"
},
{
name: "SIGBREAK",
number: 21,
action: "terminate",
description: "User interruption with CTRL-BREAK",
standard: "other"
},
{
name: "SIGTTOU",
number: 22,
action: "pause",
description: "Background process cannot write to terminal output",
standard: "posix"
},
{
name: "SIGURG",
number: 23,
action: "ignore",
description: "Socket received out-of-band data",
standard: "bsd"
},
{
name: "SIGXCPU",
number: 24,
action: "core",
description: "Process timed out",
standard: "bsd"
},
{
name: "SIGXFSZ",
number: 25,
action: "core",
description: "File too big",
standard: "bsd"
},
{
name: "SIGVTALRM",
number: 26,
action: "terminate",
description: "Timeout or timer",
standard: "bsd"
},
{
name: "SIGPROF",
number: 27,
action: "terminate",
description: "Timeout or timer",
standard: "bsd"
},
{
name: "SIGWINCH",
number: 28,
action: "ignore",
description: "Terminal window size changed",
standard: "bsd"
},
{
name: "SIGIO",
number: 29,
action: "terminate",
description: "I/O is available",
standard: "other"
},
{
name: "SIGPOLL",
number: 29,
action: "terminate",
description: "Watched event",
standard: "other"
},
{
name: "SIGINFO",
number: 29,
action: "ignore",
description: "Request for process information",
standard: "other"
},
{
name: "SIGPWR",
number: 30,
action: "terminate",
description: "Device running out of power",
standard: "systemv"
},
{
name: "SIGSYS",
number: 31,
action: "core",
description: "Invalid system call",
standard: "other"
},
{
name: "SIGUNUSED",
number: 31,
action: "terminate",
description: "Invalid system call",
standard: "other"
}
];
exports2.SIGNALS = SIGNALS2;
}
});
// ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/realtime.js
var require_realtime = __commonJS({
"../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/realtime.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.SIGRTMAX = exports2.getRealtimeSignals = void 0;
var getRealtimeSignals2 = function() {
const length = SIGRTMAX2 - SIGRTMIN2 + 1;
return Array.from({ length }, getRealtimeSignal2);
};
exports2.getRealtimeSignals = getRealtimeSignals2;
var getRealtimeSignal2 = function(value, index2) {
return {
name: `SIGRT${index2 + 1}`,
number: SIGRTMIN2 + index2,
action: "terminate",
description: "Application-specific signal (realtime)",
standard: "posix"
};
};
var SIGRTMIN2 = 34;
var SIGRTMAX2 = 64;
exports2.SIGRTMAX = SIGRTMAX2;
}
});
// ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/signals.js
var require_signals = __commonJS({
"../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/signals.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.getSignals = void 0;
var _os = require("os");
var _core = require_core();
var _realtime = require_realtime();
var getSignals2 = function() {
const realtimeSignals = (0, _realtime.getRealtimeSignals)();
const signals = [..._core.SIGNALS, ...realtimeSignals].map(normalizeSignal2);
return signals;
};
exports2.getSignals = getSignals2;
var normalizeSignal2 = function({
name,
number: defaultNumber,
description,
action: action2,
forced = false,
standard
}) {
const {
signals: { [name]: constantSignal }
} = _os.constants;
const supported = constantSignal !== void 0;
const number2 = supported ? constantSignal : defaultNumber;
return { name, number: number2, description, supported, action: action2, forced, standard };
};
}
});
// ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js
var require_main = __commonJS({
"../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.signalsByNumber = exports2.signalsByName = void 0;
var _os = require("os");
var _signals = require_signals();
var _realtime = require_realtime();
var getSignalsByName2 = function() {
const signals = (0, _signals.getSignals)();
return signals.reduce(getSignalByName2, {});
};
var getSignalByName2 = function(signalByNameMemo, { name, number: number2, description, supported, action: action2, forced, standard }) {
return {
...signalByNameMemo,
[name]: { name, number: number2, description, supported, action: action2, forced, standard }
};
};
var signalsByName2 = getSignalsByName2();
exports2.signalsByName = signalsByName2;
var getSignalsByNumber2 = function() {
const signals = (0, _signals.getSignals)();
const length = _realtime.SIGRTMAX + 1;
const signalsA = Array.from({ length }, (value, number2) => getSignalByNumber2(number2, signals));
return Object.assign({}, ...signalsA);
};
var getSignalByNumber2 = function(number2, signals) {
const signal = findSignalByNumber2(number2, signals);
if (signal === void 0) {
return {};
}
const { name, description, supported, action: action2, forced, standard } = signal;
return {
[number2]: {
name,
number: number2,
description,
supported,
action: action2,
forced,
standard
}
};
};
var findSignalByNumber2 = function(number2, signals) {
const signal = signals.find(({ name }) => _os.constants.signals[name] === number2);
if (signal !== void 0) {
return signal;
}
return signals.find((signalA) => signalA.number === number2);
};
var signalsByNumber = getSignalsByNumber2();
exports2.signalsByNumber = signalsByNumber;
}
});
// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js
var require_error = __commonJS({
"../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js"(exports2, module2) {
"use strict";
var { signalsByName: signalsByName2 } = require_main();
var getErrorPrefix2 = ({ timedOut, timeout: timeout2, errorCode, signal, signalDescription, exitCode, isCanceled }) => {
if (timedOut) {
return `timed out after ${timeout2} milliseconds`;
}
if (isCanceled) {
return "was canceled";
}
if (errorCode !== void 0) {
return `failed with ${errorCode}`;
}
if (signal !== void 0) {
return `was killed with ${signal} (${signalDescription})`;
}
if (exitCode !== void 0) {
return `failed with exit code ${exitCode}`;
}
return "failed";
};
var makeError2 = ({
stdout,
stderr,
all,
error: error2,
signal,
exitCode,
command,
escapedCommand,
timedOut,
isCanceled,
killed,
parsed: { options: { timeout: timeout2 } }
}) => {
exitCode = exitCode === null ? void 0 : exitCode;
signal = signal === null ? void 0 : signal;
const signalDescription = signal === void 0 ? void 0 : signalsByName2[signal].description;
const errorCode = error2 && error2.code;
const prefix = getErrorPrefix2({ timedOut, timeout: timeout2, errorCode, signal, signalDescription, exitCode, isCanceled });
const execaMessage = `Command ${prefix}: ${command}`;
const isError3 = Object.prototype.toString.call(error2) === "[object Error]";
const shortMessage = isError3 ? `${execaMessage}
${error2.message}` : execaMessage;
const message2 = [shortMessage, stderr, stdout].filter(Boolean).join("\n");
if (isError3) {
error2.originalMessage = error2.message;
error2.message = message2;
} else {
error2 = new Error(message2);
}
error2.shortMessage = shortMessage;
error2.command = command;
error2.escapedCommand = escapedCommand;
error2.exitCode = exitCode;
error2.signal = signal;
error2.signalDescription = signalDescription;
error2.stdout = stdout;
error2.stderr = stderr;
if (all !== void 0) {
error2.all = all;
}
if ("bufferedData" in error2) {
delete error2.bufferedData;
}
error2.failed = true;
error2.timedOut = Boolean(timedOut);
error2.isCanceled = isCanceled;
error2.killed = killed && !timedOut;
return error2;
};
module2.exports = makeError2;
}
});
// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stdio.js
var require_stdio = __commonJS({
"../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stdio.js"(exports2, module2) {
"use strict";
var aliases3 = ["stdin", "stdout", "stderr"];
var hasAlias2 = (options2) => aliases3.some((alias) => options2[alias] !== void 0);
var normalizeStdio2 = (options2) => {
if (!options2) {
return;
}
const { stdio } = options2;
if (stdio === void 0) {
return aliases3.map((alias) => options2[alias]);
}
if (hasAlias2(options2)) {
throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases3.map((alias) => `\`${alias}\``).join(", ")}`);
}
if (typeof stdio === "string") {
return stdio;
}
if (!Array.isArray(stdio)) {
throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);
}
const length = Math.max(stdio.length, aliases3.length);
return Array.from({ length }, (value, index2) => stdio[index2]);
};
module2.exports = normalizeStdio2;
module2.exports.node = (options2) => {
const stdio = normalizeStdio2(options2);
if (stdio === "ipc") {
return "ipc";
}
if (stdio === void 0 || typeof stdio === "string") {
return [stdio, stdio, stdio, "ipc"];
}
if (stdio.includes("ipc")) {
return stdio;
}
return [...stdio, "ipc"];
};
}
});
// ../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js
var require_signals2 = __commonJS({
"../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js"(exports2, module2) {
module2.exports = [
"SIGABRT",
"SIGALRM",
"SIGHUP",
"SIGINT",
"SIGTERM"
];
if (process.platform !== "win32") {
module2.exports.push(
"SIGVTALRM",
"SIGXCPU",
"SIGXFSZ",
"SIGUSR2",
"SIGTRAP",
"SIGSYS",
"SIGQUIT",
"SIGIOT"
);
}
if (process.platform === "linux") {
module2.exports.push(
"SIGIO",
"SIGPOLL",
"SIGPWR",
"SIGSTKFLT",
"SIGUNUSED"
);
}
}
});
// ../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js
var require_signal_exit = __commonJS({
"../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports2, module2) {
var process2 = global.process;
var processOk2 = function(process3) {
return process3 && typeof process3 === "object" && typeof process3.removeListener === "function" && typeof process3.emit === "function" && typeof process3.reallyExit === "function" && typeof process3.listeners === "function" && typeof process3.kill === "function" && typeof process3.pid === "number" && typeof process3.on === "function";
};
if (!processOk2(process2)) {
module2.exports = function() {
return function() {
};
};
} else {
assert = require("assert");
signals = require_signals2();
isWin = /^win/i.test(process2.platform);
EE = require("events");
if (typeof EE !== "function") {
EE = EE.EventEmitter;
}
if (process2.__signal_exit_emitter__) {
emitter = process2.__signal_exit_emitter__;
} else {
emitter = process2.__signal_exit_emitter__ = new EE();
emitter.count = 0;
emitter.emitted = {};
}
if (!emitter.infinite) {
emitter.setMaxListeners(Infinity);
emitter.infinite = true;
}
module2.exports = function(cb, opts2) {
if (!processOk2(global.process)) {
return function() {
};
}
assert.equal(typeof cb, "function", "a callback must be provided for exit handler");
if (loaded === false) {
load();
}
var ev = "exit";
if (opts2 && opts2.alwaysLast) {
ev = "afterexit";
}
var remove2 = function() {
emitter.removeListener(ev, cb);
if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) {
unload();
}
};
emitter.on(ev, cb);
return remove2;
};
unload = function unload2() {
if (!loaded || !processOk2(global.process)) {
return;
}
loaded = false;
signals.forEach(function(sig) {
try {
process2.removeListener(sig, sigListeners[sig]);
} catch (er) {
}
});
process2.emit = originalProcessEmit;
process2.reallyExit = originalProcessReallyExit;
emitter.count -= 1;
};
module2.exports.unload = unload;
emit = function emit2(event, code, signal) {
if (emitter.emitted[event]) {
return;
}
emitter.emitted[event] = true;
emitter.emit(event, code, signal);
};
sigListeners = {};
signals.forEach(function(sig) {
sigListeners[sig] = function listener() {
if (!processOk2(global.process)) {
return;
}
var listeners = process2.listeners(sig);
if (listeners.length === emitter.count) {
unload();
emit("exit", null, sig);
emit("afterexit", null, sig);
if (isWin && sig === "SIGHUP") {
sig = "SIGINT";
}
process2.kill(process2.pid, sig);
}
};
});
module2.exports.signals = function() {
return signals;
};
loaded = false;
load = function load2() {
if (loaded || !processOk2(global.process)) {
return;
}
loaded = true;
emitter.count += 1;
signals = signals.filter(function(sig) {
try {
process2.on(sig, sigListeners[sig]);
return true;
} catch (er) {
return false;
}
});
process2.emit = processEmit;
process2.reallyExit = processReallyExit;
};
module2.exports.load = load;
originalProcessReallyExit = process2.reallyExit;
processReallyExit = function processReallyExit2(code) {
if (!processOk2(global.process)) {
return;
}
process2.exitCode = code || 0;
emit("exit", process2.exitCode, null);
emit("afterexit", process2.exitCode, null);
originalProcessReallyExit.call(process2, process2.exitCode);
};
originalProcessEmit = process2.emit;
processEmit = function processEmit2(ev, arg2) {
if (ev === "exit" && processOk2(global.process)) {
if (arg2 !== void 0) {
process2.exitCode = arg2;
}
var ret = originalProcessEmit.apply(this, arguments);
emit("exit", process2.exitCode, null);
emit("afterexit", process2.exitCode, null);
return ret;
} else {
return originalProcessEmit.apply(this, arguments);
}
};
}
var assert;
var signals;
var isWin;
var EE;
var emitter;
var unload;
var emit;
var sigListeners;
var loaded;
var load;
var originalProcessReallyExit;
var processReallyExit;
var originalProcessEmit;
var processEmit;
}
});
// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/kill.js
var require_kill = __commonJS({
"../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/kill.js"(exports2, module2) {
"use strict";
var os7 = require("os");
var onExit2 = require_signal_exit();
var DEFAULT_FORCE_KILL_TIMEOUT2 = 1e3 * 5;
var spawnedKill2 = (kill, signal = "SIGTERM", options2 = {}) => {
const killResult = kill(signal);
setKillTimeout2(kill, signal, options2, killResult);
return killResult;
};
var setKillTimeout2 = (kill, signal, options2, killResult) => {
if (!shouldForceKill2(signal, options2, killResult)) {
return;
}
const timeout2 = getForceKillAfterTimeout2(options2);
const t4 = setTimeout(() => {
kill("SIGKILL");
}, timeout2);
if (t4.unref) {
t4.unref();
}
};
var shouldForceKill2 = (signal, { forceKillAfterTimeout }, killResult) => {
return isSigterm2(signal) && forceKillAfterTimeout !== false && killResult;
};
var isSigterm2 = (signal) => {
return signal === os7.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM";
};
var getForceKillAfterTimeout2 = ({ forceKillAfterTimeout = true }) => {
if (forceKillAfterTimeout === true) {
return DEFAULT_FORCE_KILL_TIMEOUT2;
}
if (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0) {
throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`);
}
return forceKillAfterTimeout;
};
var spawnedCancel2 = (spawned, context) => {
const killResult = spawned.kill();
if (killResult) {
context.isCanceled = true;
}
};
var timeoutKill2 = (spawned, signal, reject2) => {
spawned.kill(signal);
reject2(Object.assign(new Error("Timed out"), { timedOut: true, signal }));
};
var setupTimeout2 = (spawned, { timeout: timeout2, killSignal = "SIGTERM" }, spawnedPromise) => {
if (timeout2 === 0 || timeout2 === void 0) {
return spawnedPromise;
}
let timeoutId;
const timeoutPromise = new Promise((resolve3, reject2) => {
timeoutId = setTimeout(() => {
timeoutKill2(spawned, killSignal, reject2);
}, timeout2);
});
const safeSpawnedPromise = spawnedPromise.finally(() => {
clearTimeout(timeoutId);
});
return Promise.race([timeoutPromise, safeSpawnedPromise]);
};
var validateTimeout2 = ({ timeout: timeout2 }) => {
if (timeout2 !== void 0 && (!Number.isFinite(timeout2) || timeout2 < 0)) {
throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout2}\` (${typeof timeout2})`);
}
};
var setExitHandler2 = async (spawned, { cleanup: cleanup2, detached }, timedPromise) => {
if (!cleanup2 || detached) {
return timedPromise;
}
const removeExitHandler = onExit2(() => {
spawned.kill();
});
return timedPromise.finally(() => {
removeExitHandler();
});
};
module2.exports = {
spawnedKill: spawnedKill2,
spawnedCancel: spawnedCancel2,
setupTimeout: setupTimeout2,
validateTimeout: validateTimeout2,
setExitHandler: setExitHandler2
};
}
});
// ../../node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js
var require_is_stream = __commonJS({
"../../node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js"(exports2, module2) {
"use strict";
var isStream2 = (stream4) => stream4 !== null && typeof stream4 === "object" && typeof stream4.pipe === "function";
isStream2.writable = (stream4) => isStream2(stream4) && stream4.writable !== false && typeof stream4._write === "function" && typeof stream4._writableState === "object";
isStream2.readable = (stream4) => isStream2(stream4) && stream4.readable !== false && typeof stream4._read === "function" && typeof stream4._readableState === "object";
isStream2.duplex = (stream4) => isStream2.writable(stream4) && isStream2.readable(stream4);
isStream2.transform = (stream4) => isStream2.duplex(stream4) && typeof stream4._transform === "function";
module2.exports = isStream2;
}
});
// ../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js
var require_buffer_stream = __commonJS({
"../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js"(exports2, module2) {
"use strict";
var { PassThrough: PassThroughStream2 } = require("stream");
module2.exports = (options2) => {
options2 = { ...options2 };
const { array } = options2;
let { encoding } = options2;
const isBuffer = encoding === "buffer";
let objectMode = false;
if (array) {
objectMode = !(encoding || isBuffer);
} else {
encoding = encoding || "utf8";
}
if (isBuffer) {
encoding = null;
}
const stream4 = new PassThroughStream2({ objectMode });
if (encoding) {
stream4.setEncoding(encoding);
}
let length = 0;
const chunks = [];
stream4.on("data", (chunk) => {
chunks.push(chunk);
if (objectMode) {
length = chunks.length;
} else {
length += chunk.length;
}
});
stream4.getBufferedValue = () => {
if (array) {
return chunks;
}
return isBuffer ? Buffer.concat(chunks, length) : chunks.join("");
};
stream4.getBufferedLength = () => length;
return stream4;
};
}
});
// ../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js
var require_get_stream = __commonJS({
"../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js"(exports2, module2) {
"use strict";
var { constants: BufferConstants2 } = require("buffer");
var stream4 = require("stream");
var { promisify: promisify9 } = require("util");
var bufferStream2 = require_buffer_stream();
var streamPipelinePromisified2 = promisify9(stream4.pipeline);
var MaxBufferError2 = class extends Error {
constructor() {
super("maxBuffer exceeded");
this.name = "MaxBufferError";
}
};
async function getStream2(inputStream, options2) {
if (!inputStream) {
throw new Error("Expected a stream");
}
options2 = {
maxBuffer: Infinity,
...options2
};
const { maxBuffer } = options2;
const stream5 = bufferStream2(options2);
await new Promise((resolve3, reject2) => {
const rejectPromise = (error2) => {
if (error2 && stream5.getBufferedLength() <= BufferConstants2.MAX_LENGTH) {
error2.bufferedData = stream5.getBufferedValue();
}
reject2(error2);
};
(async () => {
try {
await streamPipelinePromisified2(inputStream, stream5);
resolve3();
} catch (error2) {
rejectPromise(error2);
}
})();
stream5.on("data", () => {
if (stream5.getBufferedLength() > maxBuffer) {
rejectPromise(new MaxBufferError2());
}
});
});
return stream5.getBufferedValue();
}
module2.exports = getStream2;
module2.exports.buffer = (stream5, options2) => getStream2(stream5, { ...options2, encoding: "buffer" });
module2.exports.array = (stream5, options2) => getStream2(stream5, { ...options2, array: true });
module2.exports.MaxBufferError = MaxBufferError2;
}
});
// ../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js
var require_merge_stream = __commonJS({
"../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js"(exports2, module2) {
"use strict";
var { PassThrough: PassThrough3 } = require("stream");
module2.exports = function() {
var sources = [];
var output = new PassThrough3({ objectMode: true });
output.setMaxListeners(0);
output.add = add;
output.isEmpty = isEmpty;
output.on("unpipe", remove2);
Array.prototype.slice.call(arguments).forEach(add);
return output;
function add(source) {
if (Array.isArray(source)) {
source.forEach(add);
return this;
}
sources.push(source);
source.once("end", remove2.bind(null, source));
source.once("error", output.emit.bind(output, "error"));
source.pipe(output, { end: false });
return this;
}
function isEmpty() {
return sources.length == 0;
}
function remove2(source) {
sources = sources.filter(function(it) {
return it !== source;
});
if (!sources.length && output.readable) {
output.end();
}
}
};
}
});
// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stream.js
var require_stream = __commonJS({
"../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stream.js"(exports2, module2) {
"use strict";
var isStream2 = require_is_stream();
var getStream2 = require_get_stream();
var mergeStream2 = require_merge_stream();
var handleInput2 = (spawned, input) => {
if (input === void 0 || spawned.stdin === void 0) {
return;
}
if (isStream2(input)) {
input.pipe(spawned.stdin);
} else {
spawned.stdin.end(input);
}
};
var makeAllStream2 = (spawned, { all }) => {
if (!all || !spawned.stdout && !spawned.stderr) {
return;
}
const mixed = mergeStream2();
if (spawned.stdout) {
mixed.add(spawned.stdout);
}
if (spawned.stderr) {
mixed.add(spawned.stderr);
}
return mixed;
};
var getBufferedData2 = async (stream4, streamPromise) => {
if (!stream4) {
return;
}
stream4.destroy();
try {
return await streamPromise;
} catch (error2) {
return error2.bufferedData;
}
};
var getStreamPromise2 = (stream4, { encoding, buffer, maxBuffer }) => {
if (!stream4 || !buffer) {
return;
}
if (encoding) {
return getStream2(stream4, { encoding, maxBuffer });
}
return getStream2.buffer(stream4, { maxBuffer });
};
var getSpawnedResult2 = async ({ stdout, stderr, all }, { encoding, buffer, maxBuffer }, processDone) => {
const stdoutPromise = getStreamPromise2(stdout, { encoding, buffer, maxBuffer });
const stderrPromise = getStreamPromise2(stderr, { encoding, buffer, maxBuffer });
const allPromise = getStreamPromise2(all, { encoding, buffer, maxBuffer: maxBuffer * 2 });
try {
return await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]);
} catch (error2) {
return Promise.all([
{ error: error2, signal: error2.signal, timedOut: error2.timedOut },
getBufferedData2(stdout, stdoutPromise),
getBufferedData2(stderr, stderrPromise),
getBufferedData2(all, allPromise)
]);
}
};
var validateInputSync = ({ input }) => {
if (isStream2(input)) {
throw new TypeError("The `input` option cannot be a stream in sync mode");
}
};
module2.exports = {
handleInput: handleInput2,
makeAllStream: makeAllStream2,
getSpawnedResult: getSpawnedResult2,
validateInputSync
};
}
});
// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/promise.js
var require_promise = __commonJS({
"../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/promise.js"(exports2, module2) {
"use strict";
var nativePromisePrototype2 = (async () => {
})().constructor.prototype;
var descriptors2 = ["then", "catch", "finally"].map((property) => [
property,
Reflect.getOwnPropertyDescriptor(nativePromisePrototype2, property)
]);
var mergePromise2 = (spawned, promise) => {
for (const [property, descriptor] of descriptors2) {
const value = typeof promise === "function" ? (...args3) => Reflect.apply(descriptor.value, promise(), args3) : descriptor.value.bind(promise);
Reflect.defineProperty(spawned, property, { ...descriptor, value });
}
return spawned;
};
var getSpawnedPromise2 = (spawned) => {
return new Promise((resolve3, reject2) => {
spawned.on("exit", (exitCode, signal) => {
resolve3({ exitCode, signal });
});
spawned.on("error", (error2) => {
reject2(error2);
});
if (spawned.stdin) {
spawned.stdin.on("error", (error2) => {
reject2(error2);
});
}
});
};
module2.exports = {
mergePromise: mergePromise2,
getSpawnedPromise: getSpawnedPromise2
};
}
});
// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/command.js
var require_command = __commonJS({
"../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/command.js"(exports2, module2) {
"use strict";
var normalizeArgs2 = (file2, args3 = []) => {
if (!Array.isArray(args3)) {
return [file2];
}
return [file2, ...args3];
};
var NO_ESCAPE_REGEXP2 = /^[\w.-]+$/;
var DOUBLE_QUOTES_REGEXP2 = /"/g;
var escapeArg2 = (arg2) => {
if (typeof arg2 !== "string" || NO_ESCAPE_REGEXP2.test(arg2)) {
return arg2;
}
return `"${arg2.replace(DOUBLE_QUOTES_REGEXP2, '\\"')}"`;
};
var joinCommand2 = (file2, args3) => {
return normalizeArgs2(file2, args3).join(" ");
};
var getEscapedCommand2 = (file2, args3) => {
return normalizeArgs2(file2, args3).map((arg2) => escapeArg2(arg2)).join(" ");
};
var SPACES_REGEXP2 = / +/g;
var parseCommand2 = (command) => {
const tokens = [];
for (const token of command.trim().split(SPACES_REGEXP2)) {
const previousToken = tokens[tokens.length - 1];
if (previousToken && previousToken.endsWith("\\")) {
tokens[tokens.length - 1] = `${previousToken.slice(0, -1)} ${token}`;
} else {
tokens.push(token);
}
}
return tokens;
};
module2.exports = {
joinCommand: joinCommand2,
getEscapedCommand: getEscapedCommand2,
parseCommand: parseCommand2
};
}
});
// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/index.js
var require_execa = __commonJS({
"../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/index.js"(exports2, module2) {
"use strict";
var path38 = require("path");
var childProcess2 = require("child_process");
var crossSpawn2 = require_cross_spawn();
var stripFinalNewline2 = require_strip_final_newline();
var npmRunPath2 = require_npm_run_path();
var onetime2 = require_onetime();
var makeError2 = require_error();
var normalizeStdio2 = require_stdio();
var { spawnedKill: spawnedKill2, spawnedCancel: spawnedCancel2, setupTimeout: setupTimeout2, validateTimeout: validateTimeout2, setExitHandler: setExitHandler2 } = require_kill();
var { handleInput: handleInput2, getSpawnedResult: getSpawnedResult2, makeAllStream: makeAllStream2, validateInputSync } = require_stream();
var { mergePromise: mergePromise2, getSpawnedPromise: getSpawnedPromise2 } = require_promise();
var { joinCommand: joinCommand2, parseCommand: parseCommand2, getEscapedCommand: getEscapedCommand2 } = require_command();
var DEFAULT_MAX_BUFFER2 = 1e3 * 1e3 * 100;
var getEnv2 = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => {
const env3 = extendEnv ? { ...process.env, ...envOption } : envOption;
if (preferLocal) {
return npmRunPath2.env({ env: env3, cwd: localDir, execPath });
}
return env3;
};
var handleArguments2 = (file2, args3, options2 = {}) => {
const parsed = crossSpawn2._parse(file2, args3, options2);
file2 = parsed.command;
args3 = parsed.args;
options2 = parsed.options;
options2 = {
maxBuffer: DEFAULT_MAX_BUFFER2,
buffer: true,
stripFinalNewline: true,
extendEnv: true,
preferLocal: false,
localDir: options2.cwd || process.cwd(),
execPath: process.execPath,
encoding: "utf8",
reject: true,
cleanup: true,
all: false,
windowsHide: true,
...options2
};
options2.env = getEnv2(options2);
options2.stdio = normalizeStdio2(options2);
if (process.platform === "win32" && path38.basename(file2, ".exe") === "cmd") {
args3.unshift("/q");
}
return { file: file2, args: args3, options: options2, parsed };
};
var handleOutput2 = (options2, value, error2) => {
if (typeof value !== "string" && !Buffer.isBuffer(value)) {
return error2 === void 0 ? void 0 : "";
}
if (options2.stripFinalNewline) {
return stripFinalNewline2(value);
}
return value;
};
var execa8 = (file2, args3, options2) => {
const parsed = handleArguments2(file2, args3, options2);
const command = joinCommand2(file2, args3);
const escapedCommand = getEscapedCommand2(file2, args3);
validateTimeout2(parsed.options);
let spawned;
try {
spawned = childProcess2.spawn(parsed.file, parsed.args, parsed.options);
} catch (error2) {
const dummySpawned = new childProcess2.ChildProcess();
const errorPromise = Promise.reject(makeError2({
error: error2,
stdout: "",
stderr: "",
all: "",
command,
escapedCommand,
parsed,
timedOut: false,
isCanceled: false,
killed: false
}));
return mergePromise2(dummySpawned, errorPromise);
}
const spawnedPromise = getSpawnedPromise2(spawned);
const timedPromise = setupTimeout2(spawned, parsed.options, spawnedPromise);
const processDone = setExitHandler2(spawned, parsed.options, timedPromise);
const context = { isCanceled: false };
spawned.kill = spawnedKill2.bind(null, spawned.kill.bind(spawned));
spawned.cancel = spawnedCancel2.bind(null, spawned, context);
const handlePromise2 = async () => {
const [{ error: error2, exitCode, signal, timedOut }, stdoutResult, stderrResult, allResult] = await getSpawnedResult2(spawned, parsed.options, processDone);
const stdout = handleOutput2(parsed.options, stdoutResult);
const stderr = handleOutput2(parsed.options, stderrResult);
const all = handleOutput2(parsed.options, allResult);
if (error2 || exitCode !== 0 || signal !== null) {
const returnedError = makeError2({
error: error2,
exitCode,
signal,
stdout,
stderr,
all,
command,
escapedCommand,
parsed,
timedOut,
isCanceled: context.isCanceled,
killed: spawned.killed
});
if (!parsed.options.reject) {
return returnedError;
}
throw returnedError;
}
return {
command,
escapedCommand,
exitCode: 0,
stdout,
stderr,
all,
failed: false,
timedOut: false,
isCanceled: false,
killed: false
};
};
const handlePromiseOnce = onetime2(handlePromise2);
handleInput2(spawned, parsed.options.input);
spawned.all = makeAllStream2(spawned, parsed.options);
return mergePromise2(spawned, handlePromiseOnce);
};
module2.exports = execa8;
module2.exports.sync = (file2, args3, options2) => {
const parsed = handleArguments2(file2, args3, options2);
const command = joinCommand2(file2, args3);
const escapedCommand = getEscapedCommand2(file2, args3);
validateInputSync(parsed.options);
let result;
try {
result = childProcess2.spawnSync(parsed.file, parsed.args, parsed.options);
} catch (error2) {
throw makeError2({
error: error2,
stdout: "",
stderr: "",
all: "",
command,
escapedCommand,
parsed,
timedOut: false,
isCanceled: false,
killed: false
});
}
const stdout = handleOutput2(parsed.options, result.stdout, result.error);
const stderr = handleOutput2(parsed.options, result.stderr, result.error);
if (result.error || result.status !== 0 || result.signal !== null) {
const error2 = makeError2({
stdout,
stderr,
error: result.error,
signal: result.signal,
exitCode: result.status,
command,
escapedCommand,
parsed,
timedOut: result.error && result.error.code === "ETIMEDOUT",
isCanceled: false,
killed: result.signal !== null
});
if (!parsed.options.reject) {
return error2;
}
throw error2;
}
return {
command,
escapedCommand,
exitCode: 0,
stdout,
stderr,
failed: false,
timedOut: false,
isCanceled: false,
killed: false
};
};
module2.exports.command = (command, options2) => {
const [file2, ...args3] = parseCommand2(command);
return execa8(file2, args3, options2);
};
module2.exports.commandSync = (command, options2) => {
const [file2, ...args3] = parseCommand2(command);
return execa8.sync(file2, args3, options2);
};
module2.exports.node = (scriptPath, args3, options2 = {}) => {
if (args3 && !Array.isArray(args3) && typeof args3 === "object") {
options2 = args3;
args3 = [];
}
const stdio = normalizeStdio2.node(options2);
const defaultExecArgv = process.execArgv.filter((arg2) => !arg2.startsWith("--inspect"));
const {
nodePath = process.execPath,
nodeOptions = defaultExecArgv
} = options2;
return execa8(
nodePath,
[
...nodeOptions,
scriptPath,
...Array.isArray(args3) ? args3 : []
],
{
...options2,
stdin: void 0,
stdout: void 0,
stderr: void 0,
stdio,
shell: false
}
);
};
}
});
// ../../node_modules/.pnpm/p-try@2.2.0/node_modules/p-try/index.js
var require_p_try = __commonJS({
"../../node_modules/.pnpm/p-try@2.2.0/node_modules/p-try/index.js"(exports2, module2) {
"use strict";
var pTry = (fn2, ...arguments_) => new Promise((resolve3) => {
resolve3(fn2(...arguments_));
});
module2.exports = pTry;
module2.exports.default = pTry;
}
});
// ../../node_modules/.pnpm/p-limit@2.3.0/node_modules/p-limit/index.js
var require_p_limit2 = __commonJS({
"../../node_modules/.pnpm/p-limit@2.3.0/node_modules/p-limit/index.js"(exports2, module2) {
"use strict";
var pTry = require_p_try();
var pLimit2 = (concurrency) => {
if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) {
return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));
}
const queue2 = [];
let activeCount = 0;
const next = () => {
activeCount--;
if (queue2.length > 0) {
queue2.shift()();
}
};
const run2 = (fn2, resolve3, ...args3) => {
activeCount++;
const result = pTry(fn2, ...args3);
resolve3(result);
result.then(next, next);
};
const enqueue = (fn2, resolve3, ...args3) => {
if (activeCount < concurrency) {
run2(fn2, resolve3, ...args3);
} else {
queue2.push(run2.bind(null, fn2, resolve3, ...args3));
}
};
const generator = (fn2, ...args3) => new Promise((resolve3) => enqueue(fn2, resolve3, ...args3));
Object.defineProperties(generator, {
activeCount: {
get: () => activeCount
},
pendingCount: {
get: () => queue2.length
},
clearQueue: {
value: () => {
queue2.length = 0;
}
}
});
return generator;
};
module2.exports = pLimit2;
module2.exports.default = pLimit2;
}
});
// ../../node_modules/.pnpm/p-locate@4.1.0/node_modules/p-locate/index.js
var require_p_locate2 = __commonJS({
"../../node_modules/.pnpm/p-locate@4.1.0/node_modules/p-locate/index.js"(exports2, module2) {
"use strict";
var pLimit2 = require_p_limit2();
var EndError2 = class extends Error {
constructor(value) {
super();
this.value = value;
}
};
var testElement2 = async (element, tester) => tester(await element);
var finder2 = async (element) => {
const values = await Promise.all(element);
if (values[1] === true) {
throw new EndError2(values[0]);
}
return false;
};
var pLocate2 = async (iterable, tester, options2) => {
options2 = {
concurrency: Infinity,
preserveOrder: true,
...options2
};
const limit = pLimit2(options2.concurrency);
const items = [...iterable].map((element) => [element, limit(testElement2, element, tester)]);
const checkLimit = pLimit2(options2.preserveOrder ? 1 : Infinity);
try {
await Promise.all(items.map((element) => checkLimit(finder2, element)));
} catch (error2) {
if (error2 instanceof EndError2) {
return error2.value;
}
throw error2;
}
};
module2.exports = pLocate2;
module2.exports.default = pLocate2;
}
});
// ../../node_modules/.pnpm/locate-path@5.0.0/node_modules/locate-path/index.js
var require_locate_path2 = __commonJS({
"../../node_modules/.pnpm/locate-path@5.0.0/node_modules/locate-path/index.js"(exports2, module2) {
"use strict";
var path38 = require("path");
var fs40 = require("fs");
var { promisify: promisify9 } = require("util");
var pLocate2 = require_p_locate2();
var fsStat = promisify9(fs40.stat);
var fsLStat = promisify9(fs40.lstat);
var typeMappings2 = {
directory: "isDirectory",
file: "isFile"
};
function checkType2({ type }) {
if (type in typeMappings2) {
return;
}
throw new Error(`Invalid type specified: ${type}`);
}
var matchType2 = (type, stat) => type === void 0 || stat[typeMappings2[type]]();
module2.exports = async (paths2, options2) => {
options2 = {
cwd: process.cwd(),
type: "file",
allowSymlinks: true,
...options2
};
checkType2(options2);
const statFn = options2.allowSymlinks ? fsStat : fsLStat;
return pLocate2(paths2, async (path_) => {
try {
const stat = await statFn(path38.resolve(options2.cwd, path_));
return matchType2(options2.type, stat);
} catch (_2) {
return false;
}
}, options2);
};
module2.exports.sync = (paths2, options2) => {
options2 = {
cwd: process.cwd(),
allowSymlinks: true,
type: "file",
...options2
};
checkType2(options2);
const statFn = options2.allowSymlinks ? fs40.statSync : fs40.lstatSync;
for (const path_ of paths2) {
try {
const stat = statFn(path38.resolve(options2.cwd, path_));
if (matchType2(options2.type, stat)) {
return path_;
}
} catch (_2) {
}
}
};
}
});
// ../../node_modules/.pnpm/find-up@4.1.0/node_modules/find-up/index.js
var require_find_up2 = __commonJS({
"../../node_modules/.pnpm/find-up@4.1.0/node_modules/find-up/index.js"(exports2, module2) {
"use strict";
var path38 = require("path");
var locatePath2 = require_locate_path2();
var pathExists = require_path_exists();
var stop = Symbol("findUp.stop");
module2.exports = async (name, options2 = {}) => {
let directory = path38.resolve(options2.cwd || "");
const { root } = path38.parse(directory);
const paths2 = [].concat(name);
const runMatcher = async (locateOptions) => {
if (typeof name !== "function") {
return locatePath2(paths2, locateOptions);
}
const foundPath = await name(locateOptions.cwd);
if (typeof foundPath === "string") {
return locatePath2([foundPath], locateOptions);
}
return foundPath;
};
while (true) {
const foundPath = await runMatcher({ ...options2, cwd: directory });
if (foundPath === stop) {
return;
}
if (foundPath) {
return path38.resolve(directory, foundPath);
}
if (directory === root) {
return;
}
directory = path38.dirname(directory);
}
};
module2.exports.sync = (name, options2 = {}) => {
let directory = path38.resolve(options2.cwd || "");
const { root } = path38.parse(directory);
const paths2 = [].concat(name);
const runMatcher = (locateOptions) => {
if (typeof name !== "function") {
return locatePath2.sync(paths2, locateOptions);
}
const foundPath = name(locateOptions.cwd);
if (typeof foundPath === "string") {
return locatePath2.sync([foundPath], locateOptions);
}
return foundPath;
};
while (true) {
const foundPath = runMatcher({ ...options2, cwd: directory });
if (foundPath === stop) {
return;
}
if (foundPath) {
return path38.resolve(directory, foundPath);
}
if (directory === root) {
return;
}
directory = path38.dirname(directory);
}
};
module2.exports.exists = pathExists;
module2.exports.sync.exists = pathExists.sync;
module2.exports.stop = stop;
}
});
// ../../node_modules/.pnpm/is-arrayish@0.2.1/node_modules/is-arrayish/index.js
var require_is_arrayish = __commonJS({
"../../node_modules/.pnpm/is-arrayish@0.2.1/node_modules/is-arrayish/index.js"(exports2, module2) {
"use strict";
module2.exports = function isArrayish(obj) {
if (!obj) {
return false;
}
return obj instanceof Array || Array.isArray(obj) || obj.length >= 0 && obj.splice instanceof Function;
};
}
});
// ../../node_modules/.pnpm/error-ex@1.3.2/node_modules/error-ex/index.js
var require_error_ex = __commonJS({
"../../node_modules/.pnpm/error-ex@1.3.2/node_modules/error-ex/index.js"(exports2, module2) {
"use strict";
var util5 = require("util");
var isArrayish = require_is_arrayish();
var errorEx = function errorEx2(name, properties) {
if (!name || name.constructor !== String) {
properties = name || {};
name = Error.name;
}
var errorExError = function ErrorEXError(message2) {
if (!this) {
return new ErrorEXError(message2);
}
message2 = message2 instanceof Error ? message2.message : message2 || this.message;
Error.call(this, message2);
Error.captureStackTrace(this, errorExError);
this.name = name;
Object.defineProperty(this, "message", {
configurable: true,
enumerable: false,
get: function() {
var newMessage = message2.split(/\r?\n/g);
for (var key in properties) {
if (!properties.hasOwnProperty(key)) {
continue;
}
var modifier = properties[key];
if ("message" in modifier) {
newMessage = modifier.message(this[key], newMessage) || newMessage;
if (!isArrayish(newMessage)) {
newMessage = [newMessage];
}
}
}
return newMessage.join("\n");
},
set: function(v2) {
message2 = v2;
}
});
var overwrittenStack = null;
var stackDescriptor = Object.getOwnPropertyDescriptor(this, "stack");
var stackGetter = stackDescriptor.get;
var stackValue = stackDescriptor.value;
delete stackDescriptor.value;
delete stackDescriptor.writable;
stackDescriptor.set = function(newstack) {
overwrittenStack = newstack;
};
stackDescriptor.get = function() {
var stack2 = (overwrittenStack || (stackGetter ? stackGetter.call(this) : stackValue)).split(/\r?\n+/g);
if (!overwrittenStack) {
stack2[0] = this.name + ": " + this.message;
}
var lineCount = 1;
for (var key in properties) {
if (!properties.hasOwnProperty(key)) {
continue;
}
var modifier = properties[key];
if ("line" in modifier) {
var line = modifier.line(this[key]);
if (line) {
stack2.splice(lineCount++, 0, " " + line);
}
}
if ("stack" in modifier) {
modifier.stack(this[key], stack2);
}
}
return stack2.join("\n");
};
Object.defineProperty(this, "stack", stackDescriptor);
};
if (Object.setPrototypeOf) {
Object.setPrototypeOf(errorExError.prototype, Error.prototype);
Object.setPrototypeOf(errorExError, Error);
} else {
util5.inherits(errorExError, Error);
}
return errorExError;
};
errorEx.append = function(str, def) {
return {
message: function(v2, message2) {
v2 = v2 || def;
if (v2) {
message2[0] += " " + str.replace("%s", v2.toString());
}
return message2;
}
};
};
errorEx.line = function(str, def) {
return {
line: function(v2) {
v2 = v2 || def;
if (v2) {
return str.replace("%s", v2.toString());
}
return null;
}
};
};
module2.exports = errorEx;
}
});
// ../../node_modules/.pnpm/json-parse-even-better-errors@2.3.1/node_modules/json-parse-even-better-errors/index.js
var require_json_parse_even_better_errors = __commonJS({
"../../node_modules/.pnpm/json-parse-even-better-errors@2.3.1/node_modules/json-parse-even-better-errors/index.js"(exports2, module2) {
"use strict";
var hexify = (char) => {
const h3 = char.charCodeAt(0).toString(16).toUpperCase();
return "0x" + (h3.length % 2 ? "0" : "") + h3;
};
var parseError = (e2, txt, context) => {
if (!txt) {
return {
message: e2.message + " while parsing empty string",
position: 0
};
}
const badToken = e2.message.match(/^Unexpected token (.) .*position\s+(\d+)/i);
const errIdx = badToken ? +badToken[2] : e2.message.match(/^Unexpected end of JSON.*/i) ? txt.length - 1 : null;
const msg = badToken ? e2.message.replace(/^Unexpected token ./, `Unexpected token ${JSON.stringify(badToken[1])} (${hexify(badToken[1])})`) : e2.message;
if (errIdx !== null && errIdx !== void 0) {
const start = errIdx <= context ? 0 : errIdx - context;
const end = errIdx + context >= txt.length ? txt.length : errIdx + context;
const slice = (start === 0 ? "" : "...") + txt.slice(start, end) + (end === txt.length ? "" : "...");
const near = txt === slice ? "" : "near ";
return {
message: msg + ` while parsing ${near}${JSON.stringify(slice)}`,
position: errIdx
};
} else {
return {
message: msg + ` while parsing '${txt.slice(0, context * 2)}'`,
position: 0
};
}
};
var JSONParseError = class extends SyntaxError {
constructor(er, txt, context, caller) {
context = context || 20;
const metadata = parseError(er, txt, context);
super(metadata.message);
Object.assign(this, metadata);
this.code = "EJSONPARSE";
this.systemError = er;
Error.captureStackTrace(this, caller || this.constructor);
}
get name() {
return this.constructor.name;
}
set name(n2) {
}
get [Symbol.toStringTag]() {
return this.constructor.name;
}
};
var kIndent = Symbol.for("indent");
var kNewline = Symbol.for("newline");
var formatRE = /^\s*[{\[]((?:\r?\n)+)([\s\t]*)/;
var emptyRE = /^(?:\{\}|\[\])((?:\r?\n)+)?$/;
var parseJson = (txt, reviver, context) => {
const parseText = stripBOM(txt);
context = context || 20;
try {
const [, newline = "\n", indent4 = " "] = parseText.match(emptyRE) || parseText.match(formatRE) || [, "", ""];
const result = JSON.parse(parseText, reviver);
if (result && typeof result === "object") {
result[kNewline] = newline;
result[kIndent] = indent4;
}
return result;
} catch (e2) {
if (typeof txt !== "string" && !Buffer.isBuffer(txt)) {
const isEmptyArray = Array.isArray(txt) && txt.length === 0;
throw Object.assign(new TypeError(
`Cannot parse ${isEmptyArray ? "an empty array" : String(txt)}`
), {
code: "EJSONPARSE",
systemError: e2
});
}
throw new JSONParseError(e2, parseText, context, parseJson);
}
};
var stripBOM = (txt) => String(txt).replace(/^\uFEFF/, "");
module2.exports = parseJson;
parseJson.JSONParseError = JSONParseError;
parseJson.noExceptions = (txt, reviver) => {
try {
return JSON.parse(stripBOM(txt), reviver);
} catch (e2) {
}
};
}
});
// ../../node_modules/.pnpm/lines-and-columns@1.2.4/node_modules/lines-and-columns/build/index.js
var require_build = __commonJS({
"../../node_modules/.pnpm/lines-and-columns@1.2.4/node_modules/lines-and-columns/build/index.js"(exports2) {
"use strict";
exports2.__esModule = true;
exports2.LinesAndColumns = void 0;
var LF = "\n";
var CR = "\r";
var LinesAndColumns = function() {
function LinesAndColumns2(string) {
this.string = string;
var offsets = [0];
for (var offset = 0; offset < string.length; ) {
switch (string[offset]) {
case LF:
offset += LF.length;
offsets.push(offset);
break;
case CR:
offset += CR.length;
if (string[offset] === LF) {
offset += LF.length;
}
offsets.push(offset);
break;
default:
offset++;
break;
}
}
this.offsets = offsets;
}
LinesAndColumns2.prototype.locationForIndex = function(index2) {
if (index2 < 0 || index2 > this.string.length) {
return null;
}
var line = 0;
var offsets = this.offsets;
while (offsets[line + 1] <= index2) {
line++;
}
var column = index2 - offsets[line];
return { line, column };
};
LinesAndColumns2.prototype.indexForLocation = function(location) {
var line = location.line, column = location.column;
if (line < 0 || line >= this.offsets.length) {
return null;
}
if (column < 0 || column > this.lengthOfLine(line)) {
return null;
}
return this.offsets[line] + column;
};
LinesAndColumns2.prototype.lengthOfLine = function(line) {
var offset = this.offsets[line];
var nextOffset = line === this.offsets.length - 1 ? this.string.length : this.offsets[line + 1];
return nextOffset - offset;
};
return LinesAndColumns2;
}();
exports2.LinesAndColumns = LinesAndColumns;
exports2["default"] = LinesAndColumns;
}
});
// ../../node_modules/.pnpm/js-tokens@4.0.0/node_modules/js-tokens/index.js
var require_js_tokens = __commonJS({
"../../node_modules/.pnpm/js-tokens@4.0.0/node_modules/js-tokens/index.js"(exports2) {
Object.defineProperty(exports2, "__esModule", {
value: true
});
exports2.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;
exports2.matchToToken = function(match4) {
var token = { type: "invalid", value: match4[0], closed: void 0 };
if (match4[1])
token.type = "string", token.closed = !!(match4[3] || match4[4]);
else if (match4[5])
token.type = "comment";
else if (match4[6])
token.type = "comment", token.closed = !!match4[7];
else if (match4[8])
token.type = "regex";
else if (match4[9])
token.type = "number";
else if (match4[10])
token.type = "name";
else if (match4[11])
token.type = "punctuator";
else if (match4[12])
token.type = "whitespace";
return token;
};
}
});
// ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.19.1/node_modules/@babel/helper-validator-identifier/lib/identifier.js
var require_identifier = __commonJS({
"../../node_modules/.pnpm/@babel+helper-validator-identifier@7.19.1/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", {
value: true
});
exports2.isIdentifierChar = isIdentifierChar;
exports2.isIdentifierName = isIdentifierName;
exports2.isIdentifierStart = isIdentifierStart;
var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
var nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 757, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938, 6, 4191];
var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 81, 2, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
function isInAstralSet(code, set) {
let pos2 = 65536;
for (let i2 = 0, length = set.length; i2 < length; i2 += 2) {
pos2 += set[i2];
if (pos2 > code)
return false;
pos2 += set[i2 + 1];
if (pos2 >= code)
return true;
}
return false;
}
function isIdentifierStart(code) {
if (code < 65)
return code === 36;
if (code <= 90)
return true;
if (code < 97)
return code === 95;
if (code <= 122)
return true;
if (code <= 65535) {
return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code));
}
return isInAstralSet(code, astralIdentifierStartCodes);
}
function isIdentifierChar(code) {
if (code < 48)
return code === 36;
if (code < 58)
return true;
if (code < 65)
return false;
if (code <= 90)
return true;
if (code < 97)
return code === 95;
if (code <= 122)
return true;
if (code <= 65535) {
return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code));
}
return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
}
function isIdentifierName(name) {
let isFirst = true;
for (let i2 = 0; i2 < name.length; i2++) {
let cp3 = name.charCodeAt(i2);
if ((cp3 & 64512) === 55296 && i2 + 1 < name.length) {
const trail = name.charCodeAt(++i2);
if ((trail & 64512) === 56320) {
cp3 = 65536 + ((cp3 & 1023) << 10) + (trail & 1023);
}
}
if (isFirst) {
isFirst = false;
if (!isIdentifierStart(cp3)) {
return false;
}
} else if (!isIdentifierChar(cp3)) {
return false;
}
}
return !isFirst;
}
}
});
// ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.19.1/node_modules/@babel/helper-validator-identifier/lib/keyword.js
var require_keyword = __commonJS({
"../../node_modules/.pnpm/@babel+helper-validator-identifier@7.19.1/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", {
value: true
});
exports2.isKeyword = isKeyword;
exports2.isReservedWord = isReservedWord;
exports2.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
exports2.isStrictBindReservedWord = isStrictBindReservedWord;
exports2.isStrictReservedWord = isStrictReservedWord;
var reservedWords = {
keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
strictBind: ["eval", "arguments"]
};
var keywords = new Set(reservedWords.keyword);
var reservedWordsStrictSet = new Set(reservedWords.strict);
var reservedWordsStrictBindSet = new Set(reservedWords.strictBind);
function isReservedWord(word, inModule) {
return inModule && word === "await" || word === "enum";
}
function isStrictReservedWord(word, inModule) {
return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
}
function isStrictBindOnlyReservedWord(word) {
return reservedWordsStrictBindSet.has(word);
}
function isStrictBindReservedWord(word, inModule) {
return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
}
function isKeyword(word) {
return keywords.has(word);
}
}
});
// ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.19.1/node_modules/@babel/helper-validator-identifier/lib/index.js
var require_lib = __commonJS({
"../../node_modules/.pnpm/@babel+helper-validator-identifier@7.19.1/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", {
value: true
});
Object.defineProperty(exports2, "isIdentifierChar", {
enumerable: true,
get: function() {
return _identifier.isIdentifierChar;
}
});
Object.defineProperty(exports2, "isIdentifierName", {
enumerable: true,
get: function() {
return _identifier.isIdentifierName;
}
});
Object.defineProperty(exports2, "isIdentifierStart", {
enumerable: true,
get: function() {
return _identifier.isIdentifierStart;
}
});
Object.defineProperty(exports2, "isKeyword", {
enumerable: true,
get: function() {
return _keyword.isKeyword;
}
});
Object.defineProperty(exports2, "isReservedWord", {
enumerable: true,
get: function() {
return _keyword.isReservedWord;
}
});
Object.defineProperty(exports2, "isStrictBindOnlyReservedWord", {
enumerable: true,
get: function() {
return _keyword.isStrictBindOnlyReservedWord;
}
});
Object.defineProperty(exports2, "isStrictBindReservedWord", {
enumerable: true,
get: function() {
return _keyword.isStrictBindReservedWord;
}
});
Object.defineProperty(exports2, "isStrictReservedWord", {
enumerable: true,
get: function() {
return _keyword.isStrictReservedWord;
}
});
var _identifier = require_identifier();
var _keyword = require_keyword();
}
});
// ../../node_modules/.pnpm/escape-string-regexp@1.0.5/node_modules/escape-string-regexp/index.js
var require_escape_string_regexp = __commonJS({
"../../node_modules/.pnpm/escape-string-regexp@1.0.5/node_modules/escape-string-regexp/index.js"(exports2, module2) {
"use strict";
var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
module2.exports = function(str) {
if (typeof str !== "string") {
throw new TypeError("Expected a string");
}
return str.replace(matchOperatorsRe, "\\$&");
};
}
});
// ../../node_modules/.pnpm/color-name@1.1.3/node_modules/color-name/index.js
var require_color_name = __commonJS({
"../../node_modules/.pnpm/color-name@1.1.3/node_modules/color-name/index.js"(exports2, module2) {
"use strict";
module2.exports = {
"aliceblue": [240, 248, 255],
"antiquewhite": [250, 235, 215],
"aqua": [0, 255, 255],
"aquamarine": [127, 255, 212],
"azure": [240, 255, 255],
"beige": [245, 245, 220],
"bisque": [255, 228, 196],
"black": [0, 0, 0],
"blanchedalmond": [255, 235, 205],
"blue": [0, 0, 255],
"blueviolet": [138, 43, 226],
"brown": [165, 42, 42],
"burlywood": [222, 184, 135],
"cadetblue": [95, 158, 160],
"chartreuse": [127, 255, 0],
"chocolate": [210, 105, 30],
"coral": [255, 127, 80],
"cornflowerblue": [100, 149, 237],
"cornsilk": [255, 248, 220],
"crimson": [220, 20, 60],
"cyan": [0, 255, 255],
"darkblue": [0, 0, 139],
"darkcyan": [0, 139, 139],
"darkgoldenrod": [184, 134, 11],
"darkgray": [169, 169, 169],
"darkgreen": [0, 100, 0],
"darkgrey": [169, 169, 169],
"darkkhaki": [189, 183, 107],
"darkmagenta": [139, 0, 139],
"darkolivegreen": [85, 107, 47],
"darkorange": [255, 140, 0],
"darkorchid": [153, 50, 204],
"darkred": [139, 0, 0],
"darksalmon": [233, 150, 122],
"darkseagreen": [143, 188, 143],
"darkslateblue": [72, 61, 139],
"darkslategray": [47, 79, 79],
"darkslategrey": [47, 79, 79],
"darkturquoise": [0, 206, 209],
"darkviolet": [148, 0, 211],
"deeppink": [255, 20, 147],
"deepskyblue": [0, 191, 255],
"dimgray": [105, 105, 105],
"dimgrey": [105, 105, 105],
"dodgerblue": [30, 144, 255],
"firebrick": [178, 34, 34],
"floralwhite": [255, 250, 240],
"forestgreen": [34, 139, 34],
"fuchsia": [255, 0, 255],
"gainsboro": [220, 220, 220],
"ghostwhite": [248, 248, 255],
"gold": [255, 215, 0],
"goldenrod": [218, 165, 32],
"gray": [128, 128, 128],
"green": [0, 128, 0],
"greenyellow": [173, 255, 47],
"grey": [128, 128, 128],
"honeydew": [240, 255, 240],
"hotpink": [255, 105, 180],
"indianred": [205, 92, 92],
"indigo": [75, 0, 130],
"ivory": [255, 255, 240],
"khaki": [240, 230, 140],
"lavender": [230, 230, 250],
"lavenderblush": [255, 240, 245],
"lawngreen": [124, 252, 0],
"lemonchiffon": [255, 250, 205],
"lightblue": [173, 216, 230],
"lightcoral": [240, 128, 128],
"lightcyan": [224, 255, 255],
"lightgoldenrodyellow": [250, 250, 210],
"lightgray": [211, 211, 211],
"lightgreen": [144, 238, 144],
"lightgrey": [211, 211, 211],
"lightpink": [255, 182, 193],
"lightsalmon": [255, 160, 122],
"lightseagreen": [32, 178, 170],
"lightskyblue": [135, 206, 250],
"lightslategray": [119, 136, 153],
"lightslategrey": [119, 136, 153],
"lightsteelblue": [176, 196, 222],
"lightyellow": [255, 255, 224],
"lime": [0, 255, 0],
"limegreen": [50, 205, 50],
"linen": [250, 240, 230],
"magenta": [255, 0, 255],
"maroon": [128, 0, 0],
"mediumaquamarine": [102, 205, 170],
"mediumblue": [0, 0, 205],
"mediumorchid": [186, 85, 211],
"mediumpurple": [147, 112, 219],
"mediumseagreen": [60, 179, 113],
"mediumslateblue": [123, 104, 238],
"mediumspringgreen": [0, 250, 154],
"mediumturquoise": [72, 209, 204],
"mediumvioletred": [199, 21, 133],
"midnightblue": [25, 25, 112],
"mintcream": [245, 255, 250],
"mistyrose": [255, 228, 225],
"moccasin": [255, 228, 181],
"navajowhite": [255, 222, 173],
"navy": [0, 0, 128],
"oldlace": [253, 245, 230],
"olive": [128, 128, 0],
"olivedrab": [107, 142, 35],
"orange": [255, 165, 0],
"orangered": [255, 69, 0],
"orchid": [218, 112, 214],
"palegoldenrod": [238, 232, 170],
"palegreen": [152, 251, 152],
"paleturquoise": [175, 238, 238],
"palevioletred": [219, 112, 147],
"papayawhip": [255, 239, 213],
"peachpuff": [255, 218, 185],
"peru": [205, 133, 63],
"pink": [255, 192, 203],
"plum": [221, 160, 221],
"powderblue": [176, 224, 230],
"purple": [128, 0, 128],
"rebeccapurple": [102, 51, 153],
"red": [255, 0, 0],
"rosybrown": [188, 143, 143],
"royalblue": [65, 105, 225],
"saddlebrown": [139, 69, 19],
"salmon": [250, 128, 114],
"sandybrown": [244, 164, 96],
"seagreen": [46, 139, 87],
"seashell": [255, 245, 238],
"sienna": [160, 82, 45],
"silver": [192, 192, 192],
"skyblue": [135, 206, 235],
"slateblue": [106, 90, 205],
"slategray": [112, 128, 144],
"slategrey": [112, 128, 144],
"snow": [255, 250, 250],
"springgreen": [0, 255, 127],
"steelblue": [70, 130, 180],
"tan": [210, 180, 140],
"teal": [0, 128, 128],
"thistle": [216, 191, 216],
"tomato": [255, 99, 71],
"turquoise": [64, 224, 208],
"violet": [238, 130, 238],
"wheat": [245, 222, 179],
"white": [255, 255, 255],
"whitesmoke": [245, 245, 245],
"yellow": [255, 255, 0],
"yellowgreen": [154, 205, 50]
};
}
});
// ../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/conversions.js
var require_conversions = __commonJS({
"../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/conversions.js"(exports2, module2) {
var cssKeywords = require_color_name();
var reverseKeywords = {};
for (key in cssKeywords) {
if (cssKeywords.hasOwnProperty(key)) {
reverseKeywords[cssKeywords[key]] = key;
}
}
var key;
var convert2 = module2.exports = {
rgb: { channels: 3, labels: "rgb" },
hsl: { channels: 3, labels: "hsl" },
hsv: { channels: 3, labels: "hsv" },
hwb: { channels: 3, labels: "hwb" },
cmyk: { channels: 4, labels: "cmyk" },
xyz: { channels: 3, labels: "xyz" },
lab: { channels: 3, labels: "lab" },
lch: { channels: 3, labels: "lch" },
hex: { channels: 1, labels: ["hex"] },
keyword: { channels: 1, labels: ["keyword"] },
ansi16: { channels: 1, labels: ["ansi16"] },
ansi256: { channels: 1, labels: ["ansi256"] },
hcg: { channels: 3, labels: ["h", "c", "g"] },
apple: { channels: 3, labels: ["r16", "g16", "b16"] },
gray: { channels: 1, labels: ["gray"] }
};
for (model in convert2) {
if (convert2.hasOwnProperty(model)) {
if (!("channels" in convert2[model])) {
throw new Error("missing channels property: " + model);
}
if (!("labels" in convert2[model])) {
throw new Error("missing channel labels property: " + model);
}
if (convert2[model].labels.length !== convert2[model].channels) {
throw new Error("channel and label counts mismatch: " + model);
}
channels = convert2[model].channels;
labels = convert2[model].labels;
delete convert2[model].channels;
delete convert2[model].labels;
Object.defineProperty(convert2[model], "channels", { value: channels });
Object.defineProperty(convert2[model], "labels", { value: labels });
}
}
var channels;
var labels;
var model;
convert2.rgb.hsl = function(rgb) {
var r2 = rgb[0] / 255;
var g2 = rgb[1] / 255;
var b2 = rgb[2] / 255;
var min = Math.min(r2, g2, b2);
var max = Math.max(r2, g2, b2);
var delta = max - min;
var h3;
var s3;
var l2;
if (max === min) {
h3 = 0;
} else if (r2 === max) {
h3 = (g2 - b2) / delta;
} else if (g2 === max) {
h3 = 2 + (b2 - r2) / delta;
} else if (b2 === max) {
h3 = 4 + (r2 - g2) / delta;
}
h3 = Math.min(h3 * 60, 360);
if (h3 < 0) {
h3 += 360;
}
l2 = (min + max) / 2;
if (max === min) {
s3 = 0;
} else if (l2 <= 0.5) {
s3 = delta / (max + min);
} else {
s3 = delta / (2 - max - min);
}
return [h3, s3 * 100, l2 * 100];
};
convert2.rgb.hsv = function(rgb) {
var rdif;
var gdif;
var bdif;
var h3;
var s3;
var r2 = rgb[0] / 255;
var g2 = rgb[1] / 255;
var b2 = rgb[2] / 255;
var v2 = Math.max(r2, g2, b2);
var diff = v2 - Math.min(r2, g2, b2);
var diffc = function(c3) {
return (v2 - c3) / 6 / diff + 1 / 2;
};
if (diff === 0) {
h3 = s3 = 0;
} else {
s3 = diff / v2;
rdif = diffc(r2);
gdif = diffc(g2);
bdif = diffc(b2);
if (r2 === v2) {
h3 = bdif - gdif;
} else if (g2 === v2) {
h3 = 1 / 3 + rdif - bdif;
} else if (b2 === v2) {
h3 = 2 / 3 + gdif - rdif;
}
if (h3 < 0) {
h3 += 1;
} else if (h3 > 1) {
h3 -= 1;
}
}
return [
h3 * 360,
s3 * 100,
v2 * 100
];
};
convert2.rgb.hwb = function(rgb) {
var r2 = rgb[0];
var g2 = rgb[1];
var b2 = rgb[2];
var h3 = convert2.rgb.hsl(rgb)[0];
var w3 = 1 / 255 * Math.min(r2, Math.min(g2, b2));
b2 = 1 - 1 / 255 * Math.max(r2, Math.max(g2, b2));
return [h3, w3 * 100, b2 * 100];
};
convert2.rgb.cmyk = function(rgb) {
var r2 = rgb[0] / 255;
var g2 = rgb[1] / 255;
var b2 = rgb[2] / 255;
var c3;
var m3;
var y3;
var k;
k = Math.min(1 - r2, 1 - g2, 1 - b2);
c3 = (1 - r2 - k) / (1 - k) || 0;
m3 = (1 - g2 - k) / (1 - k) || 0;
y3 = (1 - b2 - k) / (1 - k) || 0;
return [c3 * 100, m3 * 100, y3 * 100, k * 100];
};
function comparativeDistance(x, y3) {
return Math.pow(x[0] - y3[0], 2) + Math.pow(x[1] - y3[1], 2) + Math.pow(x[2] - y3[2], 2);
}
convert2.rgb.keyword = function(rgb) {
var reversed = reverseKeywords[rgb];
if (reversed) {
return reversed;
}
var currentClosestDistance = Infinity;
var currentClosestKeyword;
for (var keyword in cssKeywords) {
if (cssKeywords.hasOwnProperty(keyword)) {
var value = cssKeywords[keyword];
var distance = comparativeDistance(rgb, value);
if (distance < currentClosestDistance) {
currentClosestDistance = distance;
currentClosestKeyword = keyword;
}
}
}
return currentClosestKeyword;
};
convert2.keyword.rgb = function(keyword) {
return cssKeywords[keyword];
};
convert2.rgb.xyz = function(rgb) {
var r2 = rgb[0] / 255;
var g2 = rgb[1] / 255;
var b2 = rgb[2] / 255;
r2 = r2 > 0.04045 ? Math.pow((r2 + 0.055) / 1.055, 2.4) : r2 / 12.92;
g2 = g2 > 0.04045 ? Math.pow((g2 + 0.055) / 1.055, 2.4) : g2 / 12.92;
b2 = b2 > 0.04045 ? Math.pow((b2 + 0.055) / 1.055, 2.4) : b2 / 12.92;
var x = r2 * 0.4124 + g2 * 0.3576 + b2 * 0.1805;
var y3 = r2 * 0.2126 + g2 * 0.7152 + b2 * 0.0722;
var z = r2 * 0.0193 + g2 * 0.1192 + b2 * 0.9505;
return [x * 100, y3 * 100, z * 100];
};
convert2.rgb.lab = function(rgb) {
var xyz = convert2.rgb.xyz(rgb);
var x = xyz[0];
var y3 = xyz[1];
var z = xyz[2];
var l2;
var a2;
var b2;
x /= 95.047;
y3 /= 100;
z /= 108.883;
x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
y3 = y3 > 8856e-6 ? Math.pow(y3, 1 / 3) : 7.787 * y3 + 16 / 116;
z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
l2 = 116 * y3 - 16;
a2 = 500 * (x - y3);
b2 = 200 * (y3 - z);
return [l2, a2, b2];
};
convert2.hsl.rgb = function(hsl) {
var h3 = hsl[0] / 360;
var s3 = hsl[1] / 100;
var l2 = hsl[2] / 100;
var t1;
var t22;
var t32;
var rgb;
var val;
if (s3 === 0) {
val = l2 * 255;
return [val, val, val];
}
if (l2 < 0.5) {
t22 = l2 * (1 + s3);
} else {
t22 = l2 + s3 - l2 * s3;
}
t1 = 2 * l2 - t22;
rgb = [0, 0, 0];
for (var i2 = 0; i2 < 3; i2++) {
t32 = h3 + 1 / 3 * -(i2 - 1);
if (t32 < 0) {
t32++;
}
if (t32 > 1) {
t32--;
}
if (6 * t32 < 1) {
val = t1 + (t22 - t1) * 6 * t32;
} else if (2 * t32 < 1) {
val = t22;
} else if (3 * t32 < 2) {
val = t1 + (t22 - t1) * (2 / 3 - t32) * 6;
} else {
val = t1;
}
rgb[i2] = val * 255;
}
return rgb;
};
convert2.hsl.hsv = function(hsl) {
var h3 = hsl[0];
var s3 = hsl[1] / 100;
var l2 = hsl[2] / 100;
var smin = s3;
var lmin = Math.max(l2, 0.01);
var sv;
var v2;
l2 *= 2;
s3 *= l2 <= 1 ? l2 : 2 - l2;
smin *= lmin <= 1 ? lmin : 2 - lmin;
v2 = (l2 + s3) / 2;
sv = l2 === 0 ? 2 * smin / (lmin + smin) : 2 * s3 / (l2 + s3);
return [h3, sv * 100, v2 * 100];
};
convert2.hsv.rgb = function(hsv) {
var h3 = hsv[0] / 60;
var s3 = hsv[1] / 100;
var v2 = hsv[2] / 100;
var hi = Math.floor(h3) % 6;
var f2 = h3 - Math.floor(h3);
var p2 = 255 * v2 * (1 - s3);
var q = 255 * v2 * (1 - s3 * f2);
var t4 = 255 * v2 * (1 - s3 * (1 - f2));
v2 *= 255;
switch (hi) {
case 0:
return [v2, t4, p2];
case 1:
return [q, v2, p2];
case 2:
return [p2, v2, t4];
case 3:
return [p2, q, v2];
case 4:
return [t4, p2, v2];
case 5:
return [v2, p2, q];
}
};
convert2.hsv.hsl = function(hsv) {
var h3 = hsv[0];
var s3 = hsv[1] / 100;
var v2 = hsv[2] / 100;
var vmin = Math.max(v2, 0.01);
var lmin;
var sl;
var l2;
l2 = (2 - s3) * v2;
lmin = (2 - s3) * vmin;
sl = s3 * vmin;
sl /= lmin <= 1 ? lmin : 2 - lmin;
sl = sl || 0;
l2 /= 2;
return [h3, sl * 100, l2 * 100];
};
convert2.hwb.rgb = function(hwb) {
var h3 = hwb[0] / 360;
var wh = hwb[1] / 100;
var bl = hwb[2] / 100;
var ratio = wh + bl;
var i2;
var v2;
var f2;
var n2;
if (ratio > 1) {
wh /= ratio;
bl /= ratio;
}
i2 = Math.floor(6 * h3);
v2 = 1 - bl;
f2 = 6 * h3 - i2;
if ((i2 & 1) !== 0) {
f2 = 1 - f2;
}
n2 = wh + f2 * (v2 - wh);
var r2;
var g2;
var b2;
switch (i2) {
default:
case 6:
case 0:
r2 = v2;
g2 = n2;
b2 = wh;
break;
case 1:
r2 = n2;
g2 = v2;
b2 = wh;
break;
case 2:
r2 = wh;
g2 = v2;
b2 = n2;
break;
case 3:
r2 = wh;
g2 = n2;
b2 = v2;
break;
case 4:
r2 = n2;
g2 = wh;
b2 = v2;
break;
case 5:
r2 = v2;
g2 = wh;
b2 = n2;
break;
}
return [r2 * 255, g2 * 255, b2 * 255];
};
convert2.cmyk.rgb = function(cmyk) {
var c3 = cmyk[0] / 100;
var m3 = cmyk[1] / 100;
var y3 = cmyk[2] / 100;
var k = cmyk[3] / 100;
var r2;
var g2;
var b2;
r2 = 1 - Math.min(1, c3 * (1 - k) + k);
g2 = 1 - Math.min(1, m3 * (1 - k) + k);
b2 = 1 - Math.min(1, y3 * (1 - k) + k);
return [r2 * 255, g2 * 255, b2 * 255];
};
convert2.xyz.rgb = function(xyz) {
var x = xyz[0] / 100;
var y3 = xyz[1] / 100;
var z = xyz[2] / 100;
var r2;
var g2;
var b2;
r2 = x * 3.2406 + y3 * -1.5372 + z * -0.4986;
g2 = x * -0.9689 + y3 * 1.8758 + z * 0.0415;
b2 = x * 0.0557 + y3 * -0.204 + z * 1.057;
r2 = r2 > 31308e-7 ? 1.055 * Math.pow(r2, 1 / 2.4) - 0.055 : r2 * 12.92;
g2 = g2 > 31308e-7 ? 1.055 * Math.pow(g2, 1 / 2.4) - 0.055 : g2 * 12.92;
b2 = b2 > 31308e-7 ? 1.055 * Math.pow(b2, 1 / 2.4) - 0.055 : b2 * 12.92;
r2 = Math.min(Math.max(0, r2), 1);
g2 = Math.min(Math.max(0, g2), 1);
b2 = Math.min(Math.max(0, b2), 1);
return [r2 * 255, g2 * 255, b2 * 255];
};
convert2.xyz.lab = function(xyz) {
var x = xyz[0];
var y3 = xyz[1];
var z = xyz[2];
var l2;
var a2;
var b2;
x /= 95.047;
y3 /= 100;
z /= 108.883;
x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
y3 = y3 > 8856e-6 ? Math.pow(y3, 1 / 3) : 7.787 * y3 + 16 / 116;
z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
l2 = 116 * y3 - 16;
a2 = 500 * (x - y3);
b2 = 200 * (y3 - z);
return [l2, a2, b2];
};
convert2.lab.xyz = function(lab) {
var l2 = lab[0];
var a2 = lab[1];
var b2 = lab[2];
var x;
var y3;
var z;
y3 = (l2 + 16) / 116;
x = a2 / 500 + y3;
z = y3 - b2 / 200;
var y22 = Math.pow(y3, 3);
var x2 = Math.pow(x, 3);
var z2 = Math.pow(z, 3);
y3 = y22 > 8856e-6 ? y22 : (y3 - 16 / 116) / 7.787;
x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
x *= 95.047;
y3 *= 100;
z *= 108.883;
return [x, y3, z];
};
convert2.lab.lch = function(lab) {
var l2 = lab[0];
var a2 = lab[1];
var b2 = lab[2];
var hr;
var h3;
var c3;
hr = Math.atan2(b2, a2);
h3 = hr * 360 / 2 / Math.PI;
if (h3 < 0) {
h3 += 360;
}
c3 = Math.sqrt(a2 * a2 + b2 * b2);
return [l2, c3, h3];
};
convert2.lch.lab = function(lch) {
var l2 = lch[0];
var c3 = lch[1];
var h3 = lch[2];
var a2;
var b2;
var hr;
hr = h3 / 360 * 2 * Math.PI;
a2 = c3 * Math.cos(hr);
b2 = c3 * Math.sin(hr);
return [l2, a2, b2];
};
convert2.rgb.ansi16 = function(args3) {
var r2 = args3[0];
var g2 = args3[1];
var b2 = args3[2];
var value = 1 in arguments ? arguments[1] : convert2.rgb.hsv(args3)[2];
value = Math.round(value / 50);
if (value === 0) {
return 30;
}
var ansi = 30 + (Math.round(b2 / 255) << 2 | Math.round(g2 / 255) << 1 | Math.round(r2 / 255));
if (value === 2) {
ansi += 60;
}
return ansi;
};
convert2.hsv.ansi16 = function(args3) {
return convert2.rgb.ansi16(convert2.hsv.rgb(args3), args3[2]);
};
convert2.rgb.ansi256 = function(args3) {
var r2 = args3[0];
var g2 = args3[1];
var b2 = args3[2];
if (r2 === g2 && g2 === b2) {
if (r2 < 8) {
return 16;
}
if (r2 > 248) {
return 231;
}
return Math.round((r2 - 8) / 247 * 24) + 232;
}
var ansi = 16 + 36 * Math.round(r2 / 255 * 5) + 6 * Math.round(g2 / 255 * 5) + Math.round(b2 / 255 * 5);
return ansi;
};
convert2.ansi16.rgb = function(args3) {
var color2 = args3 % 10;
if (color2 === 0 || color2 === 7) {
if (args3 > 50) {
color2 += 3.5;
}
color2 = color2 / 10.5 * 255;
return [color2, color2, color2];
}
var mult = (~~(args3 > 50) + 1) * 0.5;
var r2 = (color2 & 1) * mult * 255;
var g2 = (color2 >> 1 & 1) * mult * 255;
var b2 = (color2 >> 2 & 1) * mult * 255;
return [r2, g2, b2];
};
convert2.ansi256.rgb = function(args3) {
if (args3 >= 232) {
var c3 = (args3 - 232) * 10 + 8;
return [c3, c3, c3];
}
args3 -= 16;
var rem;
var r2 = Math.floor(args3 / 36) / 5 * 255;
var g2 = Math.floor((rem = args3 % 36) / 6) / 5 * 255;
var b2 = rem % 6 / 5 * 255;
return [r2, g2, b2];
};
convert2.rgb.hex = function(args3) {
var integer = ((Math.round(args3[0]) & 255) << 16) + ((Math.round(args3[1]) & 255) << 8) + (Math.round(args3[2]) & 255);
var string = integer.toString(16).toUpperCase();
return "000000".substring(string.length) + string;
};
convert2.hex.rgb = function(args3) {
var match4 = args3.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
if (!match4) {
return [0, 0, 0];
}
var colorString = match4[0];
if (match4[0].length === 3) {
colorString = colorString.split("").map(function(char) {
return char + char;
}).join("");
}
var integer = parseInt(colorString, 16);
var r2 = integer >> 16 & 255;
var g2 = integer >> 8 & 255;
var b2 = integer & 255;
return [r2, g2, b2];
};
convert2.rgb.hcg = function(rgb) {
var r2 = rgb[0] / 255;
var g2 = rgb[1] / 255;
var b2 = rgb[2] / 255;
var max = Math.max(Math.max(r2, g2), b2);
var min = Math.min(Math.min(r2, g2), b2);
var chroma = max - min;
var grayscale;
var hue;
if (chroma < 1) {
grayscale = min / (1 - chroma);
} else {
grayscale = 0;
}
if (chroma <= 0) {
hue = 0;
} else if (max === r2) {
hue = (g2 - b2) / chroma % 6;
} else if (max === g2) {
hue = 2 + (b2 - r2) / chroma;
} else {
hue = 4 + (r2 - g2) / chroma + 4;
}
hue /= 6;
hue %= 1;
return [hue * 360, chroma * 100, grayscale * 100];
};
convert2.hsl.hcg = function(hsl) {
var s3 = hsl[1] / 100;
var l2 = hsl[2] / 100;
var c3 = 1;
var f2 = 0;
if (l2 < 0.5) {
c3 = 2 * s3 * l2;
} else {
c3 = 2 * s3 * (1 - l2);
}
if (c3 < 1) {
f2 = (l2 - 0.5 * c3) / (1 - c3);
}
return [hsl[0], c3 * 100, f2 * 100];
};
convert2.hsv.hcg = function(hsv) {
var s3 = hsv[1] / 100;
var v2 = hsv[2] / 100;
var c3 = s3 * v2;
var f2 = 0;
if (c3 < 1) {
f2 = (v2 - c3) / (1 - c3);
}
return [hsv[0], c3 * 100, f2 * 100];
};
convert2.hcg.rgb = function(hcg) {
var h3 = hcg[0] / 360;
var c3 = hcg[1] / 100;
var g2 = hcg[2] / 100;
if (c3 === 0) {
return [g2 * 255, g2 * 255, g2 * 255];
}
var pure = [0, 0, 0];
var hi = h3 % 1 * 6;
var v2 = hi % 1;
var w3 = 1 - v2;
var mg = 0;
switch (Math.floor(hi)) {
case 0:
pure[0] = 1;
pure[1] = v2;
pure[2] = 0;
break;
case 1:
pure[0] = w3;
pure[1] = 1;
pure[2] = 0;
break;
case 2:
pure[0] = 0;
pure[1] = 1;
pure[2] = v2;
break;
case 3:
pure[0] = 0;
pure[1] = w3;
pure[2] = 1;
break;
case 4:
pure[0] = v2;
pure[1] = 0;
pure[2] = 1;
break;
default:
pure[0] = 1;
pure[1] = 0;
pure[2] = w3;
}
mg = (1 - c3) * g2;
return [
(c3 * pure[0] + mg) * 255,
(c3 * pure[1] + mg) * 255,
(c3 * pure[2] + mg) * 255
];
};
convert2.hcg.hsv = function(hcg) {
var c3 = hcg[1] / 100;
var g2 = hcg[2] / 100;
var v2 = c3 + g2 * (1 - c3);
var f2 = 0;
if (v2 > 0) {
f2 = c3 / v2;
}
return [hcg[0], f2 * 100, v2 * 100];
};
convert2.hcg.hsl = function(hcg) {
var c3 = hcg[1] / 100;
var g2 = hcg[2] / 100;
var l2 = g2 * (1 - c3) + 0.5 * c3;
var s3 = 0;
if (l2 > 0 && l2 < 0.5) {
s3 = c3 / (2 * l2);
} else if (l2 >= 0.5 && l2 < 1) {
s3 = c3 / (2 * (1 - l2));
}
return [hcg[0], s3 * 100, l2 * 100];
};
convert2.hcg.hwb = function(hcg) {
var c3 = hcg[1] / 100;
var g2 = hcg[2] / 100;
var v2 = c3 + g2 * (1 - c3);
return [hcg[0], (v2 - c3) * 100, (1 - v2) * 100];
};
convert2.hwb.hcg = function(hwb) {
var w3 = hwb[1] / 100;
var b2 = hwb[2] / 100;
var v2 = 1 - b2;
var c3 = v2 - w3;
var g2 = 0;
if (c3 < 1) {
g2 = (v2 - c3) / (1 - c3);
}
return [hwb[0], c3 * 100, g2 * 100];
};
convert2.apple.rgb = function(apple) {
return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
};
convert2.rgb.apple = function(rgb) {
return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
};
convert2.gray.rgb = function(args3) {
return [args3[0] / 100 * 255, args3[0] / 100 * 255, args3[0] / 100 * 255];
};
convert2.gray.hsl = convert2.gray.hsv = function(args3) {
return [0, 0, args3[0]];
};
convert2.gray.hwb = function(gray2) {
return [0, 100, gray2[0]];
};
convert2.gray.cmyk = function(gray2) {
return [0, 0, 0, gray2[0]];
};
convert2.gray.lab = function(gray2) {
return [gray2[0], 0, 0];
};
convert2.gray.hex = function(gray2) {
var val = Math.round(gray2[0] / 100 * 255) & 255;
var integer = (val << 16) + (val << 8) + val;
var string = integer.toString(16).toUpperCase();
return "000000".substring(string.length) + string;
};
convert2.rgb.gray = function(rgb) {
var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
return [val / 255 * 100];
};
}
});
// ../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/route.js
var require_route = __commonJS({
"../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/route.js"(exports2, module2) {
var conversions = require_conversions();
function buildGraph() {
var graph = {};
var models = Object.keys(conversions);
for (var len = models.length, i2 = 0; i2 < len; i2++) {
graph[models[i2]] = {
distance: -1,
parent: null
};
}
return graph;
}
function deriveBFS(fromModel) {
var graph = buildGraph();
var queue2 = [fromModel];
graph[fromModel].distance = 0;
while (queue2.length) {
var current = queue2.pop();
var adjacents = Object.keys(conversions[current]);
for (var len = adjacents.length, i2 = 0; i2 < len; i2++) {
var adjacent = adjacents[i2];
var node = graph[adjacent];
if (node.distance === -1) {
node.distance = graph[current].distance + 1;
node.parent = current;
queue2.unshift(adjacent);
}
}
}
return graph;
}
function link3(from, to) {
return function(args3) {
return to(from(args3));
};
}
function wrapConversion(toModel, graph) {
var path38 = [graph[toModel].parent, toModel];
var fn2 = conversions[graph[toModel].parent][toModel];
var cur = graph[toModel].parent;
while (graph[cur].parent) {
path38.unshift(graph[cur].parent);
fn2 = link3(conversions[graph[cur].parent][cur], fn2);
cur = graph[cur].parent;
}
fn2.conversion = path38;
return fn2;
}
module2.exports = function(fromModel) {
var graph = deriveBFS(fromModel);
var conversion = {};
var models = Object.keys(graph);
for (var len = models.length, i2 = 0; i2 < len; i2++) {
var toModel = models[i2];
var node = graph[toModel];
if (node.parent === null) {
continue;
}
conversion[toModel] = wrapConversion(toModel, graph);
}
return conversion;
};
}
});
// ../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/index.js
var require_color_convert = __commonJS({
"../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/index.js"(exports2, module2) {
var conversions = require_conversions();
var route = require_route();
var convert2 = {};
var models = Object.keys(conversions);
function wrapRaw(fn2) {
var wrappedFn = function(args3) {
if (args3 === void 0 || args3 === null) {
return args3;
}
if (arguments.length > 1) {
args3 = Array.prototype.slice.call(arguments);
}
return fn2(args3);
};
if ("conversion" in fn2) {
wrappedFn.conversion = fn2.conversion;
}
return wrappedFn;
}
function wrapRounded(fn2) {
var wrappedFn = function(args3) {
if (args3 === void 0 || args3 === null) {
return args3;
}
if (arguments.length > 1) {
args3 = Array.prototype.slice.call(arguments);
}
var result = fn2(args3);
if (typeof result === "object") {
for (var len = result.length, i2 = 0; i2 < len; i2++) {
result[i2] = Math.round(result[i2]);
}
}
return result;
};
if ("conversion" in fn2) {
wrappedFn.conversion = fn2.conversion;
}
return wrappedFn;
}
models.forEach(function(fromModel) {
convert2[fromModel] = {};
Object.defineProperty(convert2[fromModel], "channels", { value: conversions[fromModel].channels });
Object.defineProperty(convert2[fromModel], "labels", { value: conversions[fromModel].labels });
var routes = route(fromModel);
var routeModels = Object.keys(routes);
routeModels.forEach(function(toModel) {
var fn2 = routes[toModel];
convert2[fromModel][toModel] = wrapRounded(fn2);
convert2[fromModel][toModel].raw = wrapRaw(fn2);
});
});
module2.exports = convert2;
}
});
// ../../node_modules/.pnpm/ansi-styles@3.2.1/node_modules/ansi-styles/index.js
var require_ansi_styles = __commonJS({
"../../node_modules/.pnpm/ansi-styles@3.2.1/node_modules/ansi-styles/index.js"(exports2, module2) {
"use strict";
var colorConvert = require_color_convert();
var wrapAnsi16 = (fn2, offset) => function() {
const code = fn2.apply(colorConvert, arguments);
return `\x1B[${code + offset}m`;
};
var wrapAnsi256 = (fn2, offset) => function() {
const code = fn2.apply(colorConvert, arguments);
return `\x1B[${38 + offset};5;${code}m`;
};
var wrapAnsi16m = (fn2, offset) => function() {
const rgb = fn2.apply(colorConvert, arguments);
return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
};
function assembleStyles() {
const codes = /* @__PURE__ */ new Map();
const styles2 = {
modifier: {
reset: [0, 0],
bold: [1, 22],
dim: [2, 22],
italic: [3, 23],
underline: [4, 24],
inverse: [7, 27],
hidden: [8, 28],
strikethrough: [9, 29]
},
color: {
black: [30, 39],
red: [31, 39],
green: [32, 39],
yellow: [33, 39],
blue: [34, 39],
magenta: [35, 39],
cyan: [36, 39],
white: [37, 39],
gray: [90, 39],
redBright: [91, 39],
greenBright: [92, 39],
yellowBright: [93, 39],
blueBright: [94, 39],
magentaBright: [95, 39],
cyanBright: [96, 39],
whiteBright: [97, 39]
},
bgColor: {
bgBlack: [40, 49],
bgRed: [41, 49],
bgGreen: [42, 49],
bgYellow: [43, 49],
bgBlue: [44, 49],
bgMagenta: [45, 49],
bgCyan: [46, 49],
bgWhite: [47, 49],
bgBlackBright: [100, 49],
bgRedBright: [101, 49],
bgGreenBright: [102, 49],
bgYellowBright: [103, 49],
bgBlueBright: [104, 49],
bgMagentaBright: [105, 49],
bgCyanBright: [106, 49],
bgWhiteBright: [107, 49]
}
};
styles2.color.grey = styles2.color.gray;
for (const groupName of Object.keys(styles2)) {
const group = styles2[groupName];
for (const styleName of Object.keys(group)) {
const style2 = group[styleName];
styles2[styleName] = {
open: `\x1B[${style2[0]}m`,
close: `\x1B[${style2[1]}m`
};
group[styleName] = styles2[styleName];
codes.set(style2[0], style2[1]);
}
Object.defineProperty(styles2, groupName, {
value: group,
enumerable: false
});
Object.defineProperty(styles2, "codes", {
value: codes,
enumerable: false
});
}
const ansi2ansi = (n2) => n2;
const rgb2rgb = (r2, g2, b2) => [r2, g2, b2];
styles2.color.close = "\x1B[39m";
styles2.bgColor.close = "\x1B[49m";
styles2.color.ansi = {
ansi: wrapAnsi16(ansi2ansi, 0)
};
styles2.color.ansi256 = {
ansi256: wrapAnsi256(ansi2ansi, 0)
};
styles2.color.ansi16m = {
rgb: wrapAnsi16m(rgb2rgb, 0)
};
styles2.bgColor.ansi = {
ansi: wrapAnsi16(ansi2ansi, 10)
};
styles2.bgColor.ansi256 = {
ansi256: wrapAnsi256(ansi2ansi, 10)
};
styles2.bgColor.ansi16m = {
rgb: wrapAnsi16m(rgb2rgb, 10)
};
for (let key of Object.keys(colorConvert)) {
if (typeof colorConvert[key] !== "object") {
continue;
}
const suite = colorConvert[key];
if (key === "ansi16") {
key = "ansi";
}
if ("ansi16" in suite) {
styles2.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
styles2.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
}
if ("ansi256" in suite) {
styles2.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
styles2.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
}
if ("rgb" in suite) {
styles2.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
styles2.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
}
}
return styles2;
}
Object.defineProperty(module2, "exports", {
enumerable: true,
get: assembleStyles
});
}
});
// ../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js
var require_has_flag2 = __commonJS({
"../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js"(exports2, module2) {
"use strict";
module2.exports = (flag, argv) => {
argv = argv || process.argv;
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
const pos2 = argv.indexOf(prefix + flag);
const terminatorPos = argv.indexOf("--");
return pos2 !== -1 && (terminatorPos === -1 ? true : pos2 < terminatorPos);
};
}
});
// ../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js
var require_supports_color2 = __commonJS({
"../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js"(exports2, module2) {
"use strict";
var os7 = require("os");
var hasFlag2 = require_has_flag2();
var env3 = process.env;
var forceColor2;
if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false")) {
forceColor2 = false;
} else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) {
forceColor2 = true;
}
if ("FORCE_COLOR" in env3) {
forceColor2 = env3.FORCE_COLOR.length === 0 || parseInt(env3.FORCE_COLOR, 10) !== 0;
}
function translateLevel2(level) {
if (level === 0) {
return false;
}
return {
level,
hasBasic: true,
has256: level >= 2,
has16m: level >= 3
};
}
function supportsColor2(stream4) {
if (forceColor2 === false) {
return 0;
}
if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor")) {
return 3;
}
if (hasFlag2("color=256")) {
return 2;
}
if (stream4 && !stream4.isTTY && forceColor2 !== true) {
return 0;
}
const min = forceColor2 ? 1 : 0;
if (process.platform === "win32") {
const osRelease = os7.release().split(".");
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
return Number(osRelease[2]) >= 14931 ? 3 : 2;
}
return 1;
}
if ("CI" in env3) {
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env3) || env3.CI_NAME === "codeship") {
return 1;
}
return min;
}
if ("TEAMCITY_VERSION" in env3) {
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env3.TEAMCITY_VERSION) ? 1 : 0;
}
if (env3.COLORTERM === "truecolor") {
return 3;
}
if ("TERM_PROGRAM" in env3) {
const version3 = parseInt((env3.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
switch (env3.TERM_PROGRAM) {
case "iTerm.app":
return version3 >= 3 ? 3 : 2;
case "Apple_Terminal":
return 2;
}
}
if (/-256(color)?$/i.test(env3.TERM)) {
return 2;
}
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env3.TERM)) {
return 1;
}
if ("COLORTERM" in env3) {
return 1;
}
if (env3.TERM === "dumb") {
return min;
}
return min;
}
function getSupportLevel2(stream4) {
const level = supportsColor2(stream4);
return translateLevel2(level);
}
module2.exports = {
supportsColor: getSupportLevel2,
stdout: getSupportLevel2(process.stdout),
stderr: getSupportLevel2(process.stderr)
};
}
});
// ../../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/templates.js
var require_templates = __commonJS({
"../../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/templates.js"(exports2, module2) {
"use strict";
var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;
var ESCAPES = /* @__PURE__ */ new Map([
["n", "\n"],
["r", "\r"],
["t", " "],
["b", "\b"],
["f", "\f"],
["v", "\v"],
["0", "\0"],
["\\", "\\"],
["e", "\x1B"],
["a", "\x07"]
]);
function unescape2(c3) {
if (c3[0] === "u" && c3.length === 5 || c3[0] === "x" && c3.length === 3) {
return String.fromCharCode(parseInt(c3.slice(1), 16));
}
return ESCAPES.get(c3) || c3;
}
function parseArguments(name, args3) {
const results = [];
const chunks = args3.trim().split(/\s*,\s*/g);
let matches;
for (const chunk of chunks) {
if (!isNaN(chunk)) {
results.push(Number(chunk));
} else if (matches = chunk.match(STRING_REGEX)) {
results.push(matches[2].replace(ESCAPE_REGEX, (m3, escape3, chr) => escape3 ? unescape2(escape3) : chr));
} else {
throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
}
}
return results;
}
function parseStyle(style2) {
STYLE_REGEX.lastIndex = 0;
const results = [];
let matches;
while ((matches = STYLE_REGEX.exec(style2)) !== null) {
const name = matches[1];
if (matches[2]) {
const args3 = parseArguments(name, matches[2]);
results.push([name].concat(args3));
} else {
results.push([name]);
}
}
return results;
}
function buildStyle(chalk, styles2) {
const enabled = {};
for (const layer of styles2) {
for (const style2 of layer.styles) {
enabled[style2[0]] = layer.inverse ? null : style2.slice(1);
}
}
let current = chalk;
for (const styleName of Object.keys(enabled)) {
if (Array.isArray(enabled[styleName])) {
if (!(styleName in current)) {
throw new Error(`Unknown Chalk style: ${styleName}`);
}
if (enabled[styleName].length > 0) {
current = current[styleName].apply(current, enabled[styleName]);
} else {
current = current[styleName];
}
}
}
return current;
}
module2.exports = (chalk, tmp2) => {
const styles2 = [];
const chunks = [];
let chunk = [];
tmp2.replace(TEMPLATE_REGEX, (m3, escapeChar, inverse2, style2, close2, chr) => {
if (escapeChar) {
chunk.push(unescape2(escapeChar));
} else if (style2) {
const str = chunk.join("");
chunk = [];
chunks.push(styles2.length === 0 ? str : buildStyle(chalk, styles2)(str));
styles2.push({ inverse: inverse2, styles: parseStyle(style2) });
} else if (close2) {
if (styles2.length === 0) {
throw new Error("Found extraneous } in Chalk template literal");
}
chunks.push(buildStyle(chalk, styles2)(chunk.join("")));
chunk = [];
styles2.pop();
} else {
chunk.push(chr);
}
});
chunks.push(chunk.join(""));
if (styles2.length > 0) {
const errMsg = `Chalk template literal is missing ${styles2.length} closing bracket${styles2.length === 1 ? "" : "s"} (\`}\`)`;
throw new Error(errMsg);
}
return chunks.join("");
};
}
});
// ../../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/index.js
var require_chalk = __commonJS({
"../../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/index.js"(exports2, module2) {
"use strict";
var escapeStringRegexp = require_escape_string_regexp();
var ansiStyles = require_ansi_styles();
var stdoutColor = require_supports_color2().stdout;
var template = require_templates();
var isSimpleWindowsTerm = process.platform === "win32" && !(process.env.TERM || "").toLowerCase().startsWith("xterm");
var levelMapping = ["ansi", "ansi", "ansi256", "ansi16m"];
var skipModels = /* @__PURE__ */ new Set(["gray"]);
var styles2 = /* @__PURE__ */ Object.create(null);
function applyOptions(obj, options2) {
options2 = options2 || {};
const scLevel = stdoutColor ? stdoutColor.level : 0;
obj.level = options2.level === void 0 ? scLevel : options2.level;
obj.enabled = "enabled" in options2 ? options2.enabled : obj.level > 0;
}
function Chalk(options2) {
if (!this || !(this instanceof Chalk) || this.template) {
const chalk = {};
applyOptions(chalk, options2);
chalk.template = function() {
const args3 = [].slice.call(arguments);
return chalkTag.apply(null, [chalk.template].concat(args3));
};
Object.setPrototypeOf(chalk, Chalk.prototype);
Object.setPrototypeOf(chalk.template, chalk);
chalk.template.constructor = Chalk;
return chalk.template;
}
applyOptions(this, options2);
}
if (isSimpleWindowsTerm) {
ansiStyles.blue.open = "\x1B[94m";
}
for (const key of Object.keys(ansiStyles)) {
ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g");
styles2[key] = {
get() {
const codes = ansiStyles[key];
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
}
};
}
styles2.visible = {
get() {
return build.call(this, this._styles || [], true, "visible");
}
};
ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), "g");
for (const model of Object.keys(ansiStyles.color.ansi)) {
if (skipModels.has(model)) {
continue;
}
styles2[model] = {
get() {
const level = this.level;
return function() {
const open4 = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
const codes = {
open: open4,
close: ansiStyles.color.close,
closeRe: ansiStyles.color.closeRe
};
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
};
}
};
}
ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), "g");
for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
if (skipModels.has(model)) {
continue;
}
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
styles2[bgModel] = {
get() {
const level = this.level;
return function() {
const open4 = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
const codes = {
open: open4,
close: ansiStyles.bgColor.close,
closeRe: ansiStyles.bgColor.closeRe
};
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
};
}
};
}
var proto = Object.defineProperties(() => {
}, styles2);
function build(_styles, _empty, key) {
const builder = function() {
return applyStyle.apply(builder, arguments);
};
builder._styles = _styles;
builder._empty = _empty;
const self2 = this;
Object.defineProperty(builder, "level", {
enumerable: true,
get() {
return self2.level;
},
set(level) {
self2.level = level;
}
});
Object.defineProperty(builder, "enabled", {
enumerable: true,
get() {
return self2.enabled;
},
set(enabled) {
self2.enabled = enabled;
}
});
builder.hasGrey = this.hasGrey || key === "gray" || key === "grey";
builder.__proto__ = proto;
return builder;
}
function applyStyle() {
const args3 = arguments;
const argsLen = args3.length;
let str = String(arguments[0]);
if (argsLen === 0) {
return "";
}
if (argsLen > 1) {
for (let a2 = 1; a2 < argsLen; a2++) {
str += " " + args3[a2];
}
}
if (!this.enabled || this.level <= 0 || !str) {
return this._empty ? "" : str;
}
const originalDim = ansiStyles.dim.open;
if (isSimpleWindowsTerm && this.hasGrey) {
ansiStyles.dim.open = "";
}
for (const code of this._styles.slice().reverse()) {
str = code.open + str.replace(code.closeRe, code.open) + code.close;
str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`);
}
ansiStyles.dim.open = originalDim;
return str;
}
function chalkTag(chalk, strings) {
if (!Array.isArray(strings)) {
return [].slice.call(arguments, 1).join(" ");
}
const args3 = [].slice.call(arguments, 2);
const parts = [strings.raw[0]];
for (let i2 = 1; i2 < strings.length; i2++) {
parts.push(String(args3[i2 - 1]).replace(/[{}\\]/g, "\\$&"));
parts.push(String(strings.raw[i2]));
}
return template(chalk, parts.join(""));
}
Object.defineProperties(Chalk.prototype, styles2);
module2.exports = Chalk();
module2.exports.supportsColor = stdoutColor;
module2.exports.default = module2.exports;
}
});
// ../../node_modules/.pnpm/@babel+highlight@7.18.6/node_modules/@babel/highlight/lib/index.js
var require_lib2 = __commonJS({
"../../node_modules/.pnpm/@babel+highlight@7.18.6/node_modules/@babel/highlight/lib/index.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", {
value: true
});
exports2.default = highlight2;
exports2.getChalk = getChalk;
exports2.shouldHighlight = shouldHighlight;
var _jsTokens = require_js_tokens();
var _helperValidatorIdentifier = require_lib();
var _chalk = require_chalk();
var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]);
function getDefs(chalk) {
return {
keyword: chalk.cyan,
capitalized: chalk.yellow,
jsxIdentifier: chalk.yellow,
punctuator: chalk.yellow,
number: chalk.magenta,
string: chalk.green,
regex: chalk.magenta,
comment: chalk.grey,
invalid: chalk.white.bgRed.bold
};
}
var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
var BRACKET = /^[()[\]{}]$/;
var tokenize;
{
const JSX_TAG = /^[a-z][\w-]*$/i;
const getTokenType = function(token, offset, text2) {
if (token.type === "name") {
if ((0, _helperValidatorIdentifier.isKeyword)(token.value) || (0, _helperValidatorIdentifier.isStrictReservedWord)(token.value, true) || sometimesKeywords.has(token.value)) {
return "keyword";
}
if (JSX_TAG.test(token.value) && (text2[offset - 1] === "<" || text2.slice(offset - 2, offset) == "</")) {
return "jsxIdentifier";
}
if (token.value[0] !== token.value[0].toLowerCase()) {
return "capitalized";
}
}
if (token.type === "punctuator" && BRACKET.test(token.value)) {
return "bracket";
}
if (token.type === "invalid" && (token.value === "@" || token.value === "#")) {
return "punctuator";
}
return token.type;
};
tokenize = function* (text2) {
let match4;
while (match4 = _jsTokens.default.exec(text2)) {
const token = _jsTokens.matchToToken(match4);
yield {
type: getTokenType(token, match4.index, text2),
value: token.value
};
}
};
}
function highlightTokens(defs, text2) {
let highlighted = "";
for (const {
type,
value
} of tokenize(text2)) {
const colorize = defs[type];
if (colorize) {
highlighted += value.split(NEWLINE).map((str) => colorize(str)).join("\n");
} else {
highlighted += value;
}
}
return highlighted;
}
function shouldHighlight(options2) {
return !!_chalk.supportsColor || options2.forceColor;
}
function getChalk(options2) {
return options2.forceColor ? new _chalk.constructor({
enabled: true,
level: 1
}) : _chalk;
}
function highlight2(code, options2 = {}) {
if (code !== "" && shouldHighlight(options2)) {
const chalk = getChalk(options2);
const defs = getDefs(chalk);
return highlightTokens(defs, code);
} else {
return code;
}
}
}
});
// ../../node_modules/.pnpm/@babel+code-frame@7.21.4/node_modules/@babel/code-frame/lib/index.js
var require_lib3 = __commonJS({
"../../node_modules/.pnpm/@babel+code-frame@7.21.4/node_modules/@babel/code-frame/lib/index.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", {
value: true
});
exports2.codeFrameColumns = codeFrameColumns;
exports2.default = _default;
var _highlight = require_lib2();
var deprecationWarningShown = false;
function getDefs(chalk) {
return {
gutter: chalk.grey,
marker: chalk.red.bold,
message: chalk.red.bold
};
}
var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
function getMarkerLines(loc, source, opts2) {
const startLoc = Object.assign({
column: 0,
line: -1
}, loc.start);
const endLoc = Object.assign({}, startLoc, loc.end);
const {
linesAbove = 2,
linesBelow = 3
} = opts2 || {};
const startLine = startLoc.line;
const startColumn = startLoc.column;
const endLine = endLoc.line;
const endColumn = endLoc.column;
let start = Math.max(startLine - (linesAbove + 1), 0);
let end = Math.min(source.length, endLine + linesBelow);
if (startLine === -1) {
start = 0;
}
if (endLine === -1) {
end = source.length;
}
const lineDiff = endLine - startLine;
const markerLines = {};
if (lineDiff) {
for (let i2 = 0; i2 <= lineDiff; i2++) {
const lineNumber = i2 + startLine;
if (!startColumn) {
markerLines[lineNumber] = true;
} else if (i2 === 0) {
const sourceLength = source[lineNumber - 1].length;
markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];
} else if (i2 === lineDiff) {
markerLines[lineNumber] = [0, endColumn];
} else {
const sourceLength = source[lineNumber - i2].length;
markerLines[lineNumber] = [0, sourceLength];
}
}
} else {
if (startColumn === endColumn) {
if (startColumn) {
markerLines[startLine] = [startColumn, 0];
} else {
markerLines[startLine] = true;
}
} else {
markerLines[startLine] = [startColumn, endColumn - startColumn];
}
}
return {
start,
end,
markerLines
};
}
function codeFrameColumns(rawLines, loc, opts2 = {}) {
const highlighted = (opts2.highlightCode || opts2.forceColor) && (0, _highlight.shouldHighlight)(opts2);
const chalk = (0, _highlight.getChalk)(opts2);
const defs = getDefs(chalk);
const maybeHighlight = (chalkFn, string) => {
return highlighted ? chalkFn(string) : string;
};
const lines2 = rawLines.split(NEWLINE);
const {
start,
end,
markerLines
} = getMarkerLines(loc, lines2, opts2);
const hasColumns = loc.start && typeof loc.start.column === "number";
const numberMaxWidth = String(end).length;
const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts2) : rawLines;
let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index2) => {
const number2 = start + 1 + index2;
const paddedNumber = ` ${number2}`.slice(-numberMaxWidth);
const gutter = ` ${paddedNumber} |`;
const hasMarker = markerLines[number2];
const lastMarkerLine = !markerLines[number2 + 1];
if (hasMarker) {
let markerLine = "";
if (Array.isArray(hasMarker)) {
const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
const numberOfMarkers = hasMarker[1] || 1;
markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
if (lastMarkerLine && opts2.message) {
markerLine += " " + maybeHighlight(defs.message, opts2.message);
}
}
return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : "", markerLine].join("");
} else {
return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : ""}`;
}
}).join("\n");
if (opts2.message && !hasColumns) {
frame = `${" ".repeat(numberMaxWidth + 1)}${opts2.message}
${frame}`;
}
if (highlighted) {
return chalk.reset(frame);
} else {
return frame;
}
}
function _default(rawLines, lineNumber, colNumber, opts2 = {}) {
if (!deprecationWarningShown) {
deprecationWarningShown = true;
const message2 = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
if (process.emitWarning) {
process.emitWarning(message2, "DeprecationWarning");
} else {
const deprecationError = new Error(message2);
deprecationError.name = "DeprecationWarning";
console.warn(new Error(message2));
}
}
colNumber = Math.max(colNumber, 0);
const location = {
start: {
column: colNumber,
line: lineNumber
}
};
return codeFrameColumns(rawLines, location, opts2);
}
}
});
// ../../node_modules/.pnpm/parse-json@5.2.0/node_modules/parse-json/index.js
var require_parse_json = __commonJS({
"../../node_modules/.pnpm/parse-json@5.2.0/node_modules/parse-json/index.js"(exports2, module2) {
"use strict";
var errorEx = require_error_ex();
var fallback2 = require_json_parse_even_better_errors();
var { default: LinesAndColumns } = require_build();
var { codeFrameColumns } = require_lib3();
var JSONError = errorEx("JSONError", {
fileName: errorEx.append("in %s"),
codeFrame: errorEx.append("\n\n%s\n")
});
var parseJson = (string, reviver, filename) => {
if (typeof reviver === "string") {
filename = reviver;
reviver = null;
}
try {
try {
return JSON.parse(string, reviver);
} catch (error2) {
fallback2(string, reviver);
throw error2;
}
} catch (error2) {
error2.message = error2.message.replace(/\n/g, "");
const indexMatch = error2.message.match(/in JSON at position (\d+) while parsing/);
const jsonError = new JSONError(error2);
if (filename) {
jsonError.fileName = filename;
}
if (indexMatch && indexMatch.length > 0) {
const lines2 = new LinesAndColumns(string);
const index2 = Number(indexMatch[1]);
const location = lines2.locationForIndex(index2);
const codeFrame = codeFrameColumns(
string,
{ start: { line: location.line + 1, column: location.column + 1 } },
{ highlightCode: true }
);
jsonError.codeFrame = codeFrame;
}
throw jsonError;
}
};
parseJson.JSONError = JSONError;
module2.exports = parseJson;
}
});
// ../../node_modules/.pnpm/semver@5.7.1/node_modules/semver/semver.js
var require_semver = __commonJS({
"../../node_modules/.pnpm/semver@5.7.1/node_modules/semver/semver.js"(exports2, module2) {
exports2 = module2.exports = SemVer;
var debug27;
if (typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG)) {
debug27 = function() {
var args3 = Array.prototype.slice.call(arguments, 0);
args3.unshift("SEMVER");
console.log.apply(console, args3);
};
} else {
debug27 = function() {
};
}
exports2.SEMVER_SPEC_VERSION = "2.0.0";
var MAX_LENGTH = 256;
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
var MAX_SAFE_COMPONENT_LENGTH = 16;
var re = exports2.re = [];
var src2 = exports2.src = [];
var R = 0;
var NUMERICIDENTIFIER = R++;
src2[NUMERICIDENTIFIER] = "0|[1-9]\\d*";
var NUMERICIDENTIFIERLOOSE = R++;
src2[NUMERICIDENTIFIERLOOSE] = "[0-9]+";
var NONNUMERICIDENTIFIER = R++;
src2[NONNUMERICIDENTIFIER] = "\\d*[a-zA-Z-][a-zA-Z0-9-]*";
var MAINVERSION = R++;
src2[MAINVERSION] = "(" + src2[NUMERICIDENTIFIER] + ")\\.(" + src2[NUMERICIDENTIFIER] + ")\\.(" + src2[NUMERICIDENTIFIER] + ")";
var MAINVERSIONLOOSE = R++;
src2[MAINVERSIONLOOSE] = "(" + src2[NUMERICIDENTIFIERLOOSE] + ")\\.(" + src2[NUMERICIDENTIFIERLOOSE] + ")\\.(" + src2[NUMERICIDENTIFIERLOOSE] + ")";
var PRERELEASEIDENTIFIER = R++;
src2[PRERELEASEIDENTIFIER] = "(?:" + src2[NUMERICIDENTIFIER] + "|" + src2[NONNUMERICIDENTIFIER] + ")";
var PRERELEASEIDENTIFIERLOOSE = R++;
src2[PRERELEASEIDENTIFIERLOOSE] = "(?:" + src2[NUMERICIDENTIFIERLOOSE] + "|" + src2[NONNUMERICIDENTIFIER] + ")";
var PRERELEASE = R++;
src2[PRERELEASE] = "(?:-(" + src2[PRERELEASEIDENTIFIER] + "(?:\\." + src2[PRERELEASEIDENTIFIER] + ")*))";
var PRERELEASELOOSE = R++;
src2[PRERELEASELOOSE] = "(?:-?(" + src2[PRERELEASEIDENTIFIERLOOSE] + "(?:\\." + src2[PRERELEASEIDENTIFIERLOOSE] + ")*))";
var BUILDIDENTIFIER = R++;
src2[BUILDIDENTIFIER] = "[0-9A-Za-z-]+";
var BUILD = R++;
src2[BUILD] = "(?:\\+(" + src2[BUILDIDENTIFIER] + "(?:\\." + src2[BUILDIDENTIFIER] + ")*))";
var FULL = R++;
var FULLPLAIN = "v?" + src2[MAINVERSION] + src2[PRERELEASE] + "?" + src2[BUILD] + "?";
src2[FULL] = "^" + FULLPLAIN + "$";
var LOOSEPLAIN = "[v=\\s]*" + src2[MAINVERSIONLOOSE] + src2[PRERELEASELOOSE] + "?" + src2[BUILD] + "?";
var LOOSE = R++;
src2[LOOSE] = "^" + LOOSEPLAIN + "$";
var GTLT = R++;
src2[GTLT] = "((?:<|>)?=?)";
var XRANGEIDENTIFIERLOOSE = R++;
src2[XRANGEIDENTIFIERLOOSE] = src2[NUMERICIDENTIFIERLOOSE] + "|x|X|\\*";
var XRANGEIDENTIFIER = R++;
src2[XRANGEIDENTIFIER] = src2[NUMERICIDENTIFIER] + "|x|X|\\*";
var XRANGEPLAIN = R++;
src2[XRANGEPLAIN] = "[v=\\s]*(" + src2[XRANGEIDENTIFIER] + ")(?:\\.(" + src2[XRANGEIDENTIFIER] + ")(?:\\.(" + src2[XRANGEIDENTIFIER] + ")(?:" + src2[PRERELEASE] + ")?" + src2[BUILD] + "?)?)?";
var XRANGEPLAINLOOSE = R++;
src2[XRANGEPLAINLOOSE] = "[v=\\s]*(" + src2[XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src2[XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src2[XRANGEIDENTIFIERLOOSE] + ")(?:" + src2[PRERELEASELOOSE] + ")?" + src2[BUILD] + "?)?)?";
var XRANGE = R++;
src2[XRANGE] = "^" + src2[GTLT] + "\\s*" + src2[XRANGEPLAIN] + "$";
var XRANGELOOSE = R++;
src2[XRANGELOOSE] = "^" + src2[GTLT] + "\\s*" + src2[XRANGEPLAINLOOSE] + "$";
var COERCE = R++;
src2[COERCE] = "(?:^|[^\\d])(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "})(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:$|[^\\d])";
var LONETILDE = R++;
src2[LONETILDE] = "(?:~>?)";
var TILDETRIM = R++;
src2[TILDETRIM] = "(\\s*)" + src2[LONETILDE] + "\\s+";
re[TILDETRIM] = new RegExp(src2[TILDETRIM], "g");
var tildeTrimReplace = "$1~";
var TILDE = R++;
src2[TILDE] = "^" + src2[LONETILDE] + src2[XRANGEPLAIN] + "$";
var TILDELOOSE = R++;
src2[TILDELOOSE] = "^" + src2[LONETILDE] + src2[XRANGEPLAINLOOSE] + "$";
var LONECARET = R++;
src2[LONECARET] = "(?:\\^)";
var CARETTRIM = R++;
src2[CARETTRIM] = "(\\s*)" + src2[LONECARET] + "\\s+";
re[CARETTRIM] = new RegExp(src2[CARETTRIM], "g");
var caretTrimReplace = "$1^";
var CARET = R++;
src2[CARET] = "^" + src2[LONECARET] + src2[XRANGEPLAIN] + "$";
var CARETLOOSE = R++;
src2[CARETLOOSE] = "^" + src2[LONECARET] + src2[XRANGEPLAINLOOSE] + "$";
var COMPARATORLOOSE = R++;
src2[COMPARATORLOOSE] = "^" + src2[GTLT] + "\\s*(" + LOOSEPLAIN + ")$|^$";
var COMPARATOR = R++;
src2[COMPARATOR] = "^" + src2[GTLT] + "\\s*(" + FULLPLAIN + ")$|^$";
var COMPARATORTRIM = R++;
src2[COMPARATORTRIM] = "(\\s*)" + src2[GTLT] + "\\s*(" + LOOSEPLAIN + "|" + src2[XRANGEPLAIN] + ")";
re[COMPARATORTRIM] = new RegExp(src2[COMPARATORTRIM], "g");
var comparatorTrimReplace = "$1$2$3";
var HYPHENRANGE = R++;
src2[HYPHENRANGE] = "^\\s*(" + src2[XRANGEPLAIN] + ")\\s+-\\s+(" + src2[XRANGEPLAIN] + ")\\s*$";
var HYPHENRANGELOOSE = R++;
src2[HYPHENRANGELOOSE] = "^\\s*(" + src2[XRANGEPLAINLOOSE] + ")\\s+-\\s+(" + src2[XRANGEPLAINLOOSE] + ")\\s*$";
var STAR = R++;
src2[STAR] = "(<|>)?=?\\s*\\*";
for (i2 = 0; i2 < R; i2++) {
debug27(i2, src2[i2]);
if (!re[i2]) {
re[i2] = new RegExp(src2[i2]);
}
}
var i2;
exports2.parse = parse3;
function parse3(version3, options2) {
if (!options2 || typeof options2 !== "object") {
options2 = {
loose: !!options2,
includePrerelease: false
};
}
if (version3 instanceof SemVer) {
return version3;
}
if (typeof version3 !== "string") {
return null;
}
if (version3.length > MAX_LENGTH) {
return null;
}
var r2 = options2.loose ? re[LOOSE] : re[FULL];
if (!r2.test(version3)) {
return null;
}
try {
return new SemVer(version3, options2);
} catch (er) {
return null;
}
}
exports2.valid = valid;
function valid(version3, options2) {
var v2 = parse3(version3, options2);
return v2 ? v2.version : null;
}
exports2.clean = clean;
function clean(version3, options2) {
var s3 = parse3(version3.trim().replace(/^[=v]+/, ""), options2);
return s3 ? s3.version : null;
}
exports2.SemVer = SemVer;
function SemVer(version3, options2) {
if (!options2 || typeof options2 !== "object") {
options2 = {
loose: !!options2,
includePrerelease: false
};
}
if (version3 instanceof SemVer) {
if (version3.loose === options2.loose) {
return version3;
} else {
version3 = version3.version;
}
} else if (typeof version3 !== "string") {
throw new TypeError("Invalid Version: " + version3);
}
if (version3.length > MAX_LENGTH) {
throw new TypeError("version is longer than " + MAX_LENGTH + " characters");
}
if (!(this instanceof SemVer)) {
return new SemVer(version3, options2);
}
debug27("SemVer", version3, options2);
this.options = options2;
this.loose = !!options2.loose;
var m3 = version3.trim().match(options2.loose ? re[LOOSE] : re[FULL]);
if (!m3) {
throw new TypeError("Invalid Version: " + version3);
}
this.raw = version3;
this.major = +m3[1];
this.minor = +m3[2];
this.patch = +m3[3];
if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
throw new TypeError("Invalid major version");
}
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
throw new TypeError("Invalid minor version");
}
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
throw new TypeError("Invalid patch version");
}
if (!m3[4]) {
this.prerelease = [];
} else {
this.prerelease = m3[4].split(".").map(function(id) {
if (/^[0-9]+$/.test(id)) {
var num = +id;
if (num >= 0 && num < MAX_SAFE_INTEGER) {
return num;
}
}
return id;
});
}
this.build = m3[5] ? m3[5].split(".") : [];
this.format();
}
SemVer.prototype.format = function() {
this.version = this.major + "." + this.minor + "." + this.patch;
if (this.prerelease.length) {
this.version += "-" + this.prerelease.join(".");
}
return this.version;
};
SemVer.prototype.toString = function() {
return this.version;
};
SemVer.prototype.compare = function(other) {
debug27("SemVer.compare", this.version, this.options, other);
if (!(other instanceof SemVer)) {
other = new SemVer(other, this.options);
}
return this.compareMain(other) || this.comparePre(other);
};
SemVer.prototype.compareMain = function(other) {
if (!(other instanceof SemVer)) {
other = new SemVer(other, this.options);
}
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
};
SemVer.prototype.comparePre = function(other) {
if (!(other instanceof SemVer)) {
other = new SemVer(other, this.options);
}
if (this.prerelease.length && !other.prerelease.length) {
return -1;
} else if (!this.prerelease.length && other.prerelease.length) {
return 1;
} else if (!this.prerelease.length && !other.prerelease.length) {
return 0;
}
var i3 = 0;
do {
var a2 = this.prerelease[i3];
var b2 = other.prerelease[i3];
debug27("prerelease compare", i3, a2, b2);
if (a2 === void 0 && b2 === void 0) {
return 0;
} else if (b2 === void 0) {
return 1;
} else if (a2 === void 0) {
return -1;
} else if (a2 === b2) {
continue;
} else {
return compareIdentifiers(a2, b2);
}
} while (++i3);
};
SemVer.prototype.inc = function(release, identifier) {
switch (release) {
case "premajor":
this.prerelease.length = 0;
this.patch = 0;
this.minor = 0;
this.major++;
this.inc("pre", identifier);
break;
case "preminor":
this.prerelease.length = 0;
this.patch = 0;
this.minor++;
this.inc("pre", identifier);
break;
case "prepatch":
this.prerelease.length = 0;
this.inc("patch", identifier);
this.inc("pre", identifier);
break;
case "prerelease":
if (this.prerelease.length === 0) {
this.inc("patch", identifier);
}
this.inc("pre", identifier);
break;
case "major":
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
this.major++;
}
this.minor = 0;
this.patch = 0;
this.prerelease = [];
break;
case "minor":
if (this.patch !== 0 || this.prerelease.length === 0) {
this.minor++;
}
this.patch = 0;
this.prerelease = [];
break;
case "patch":
if (this.prerelease.length === 0) {
this.patch++;
}
this.prerelease = [];
break;
case "pre":
if (this.prerelease.length === 0) {
this.prerelease = [0];
} else {
var i3 = this.prerelease.length;
while (--i3 >= 0) {
if (typeof this.prerelease[i3] === "number") {
this.prerelease[i3]++;
i3 = -2;
}
}
if (i3 === -1) {
this.prerelease.push(0);
}
}
if (identifier) {
if (this.prerelease[0] === identifier) {
if (isNaN(this.prerelease[1])) {
this.prerelease = [identifier, 0];
}
} else {
this.prerelease = [identifier, 0];
}
}
break;
default:
throw new Error("invalid increment argument: " + release);
}
this.format();
this.raw = this.version;
return this;
};
exports2.inc = inc;
function inc(version3, release, loose, identifier) {
if (typeof loose === "string") {
identifier = loose;
loose = void 0;
}
try {
return new SemVer(version3, loose).inc(release, identifier).version;
} catch (er) {
return null;
}
}
exports2.diff = diff;
function diff(version1, version22) {
if (eq(version1, version22)) {
return null;
} else {
var v1 = parse3(version1);
var v2 = parse3(version22);
var prefix = "";
if (v1.prerelease.length || v2.prerelease.length) {
prefix = "pre";
var defaultResult = "prerelease";
}
for (var key in v1) {
if (key === "major" || key === "minor" || key === "patch") {
if (v1[key] !== v2[key]) {
return prefix + key;
}
}
}
return defaultResult;
}
}
exports2.compareIdentifiers = compareIdentifiers;
var numeric = /^[0-9]+$/;
function compareIdentifiers(a2, b2) {
var anum = numeric.test(a2);
var bnum = numeric.test(b2);
if (anum && bnum) {
a2 = +a2;
b2 = +b2;
}
return a2 === b2 ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a2 < b2 ? -1 : 1;
}
exports2.rcompareIdentifiers = rcompareIdentifiers;
function rcompareIdentifiers(a2, b2) {
return compareIdentifiers(b2, a2);
}
exports2.major = major;
function major(a2, loose) {
return new SemVer(a2, loose).major;
}
exports2.minor = minor;
function minor(a2, loose) {
return new SemVer(a2, loose).minor;
}
exports2.patch = patch;
function patch(a2, loose) {
return new SemVer(a2, loose).patch;
}
exports2.compare = compare;
function compare(a2, b2, loose) {
return new SemVer(a2, loose).compare(new SemVer(b2, loose));
}
exports2.compareLoose = compareLoose;
function compareLoose(a2, b2) {
return compare(a2, b2, true);
}
exports2.rcompare = rcompare;
function rcompare(a2, b2, loose) {
return compare(b2, a2, loose);
}
exports2.sort = sort;
function sort(list, loose) {
return list.sort(function(a2, b2) {
return exports2.compare(a2, b2, loose);
});
}
exports2.rsort = rsort;
function rsort(list, loose) {
return list.sort(function(a2, b2) {
return exports2.rcompare(a2, b2, loose);
});
}
exports2.gt = gt;
function gt(a2, b2, loose) {
return compare(a2, b2, loose) > 0;
}
exports2.lt = lt;
function lt(a2, b2, loose) {
return compare(a2, b2, loose) < 0;
}
exports2.eq = eq;
function eq(a2, b2, loose) {
return compare(a2, b2, loose) === 0;
}
exports2.neq = neq;
function neq(a2, b2, loose) {
return compare(a2, b2, loose) !== 0;
}
exports2.gte = gte;
function gte(a2, b2, loose) {
return compare(a2, b2, loose) >= 0;
}
exports2.lte = lte;
function lte(a2, b2, loose) {
return compare(a2, b2, loose) <= 0;
}
exports2.cmp = cmp;
function cmp(a2, op, b2, loose) {
switch (op) {
case "===":
if (typeof a2 === "object")
a2 = a2.version;
if (typeof b2 === "object")
b2 = b2.version;
return a2 === b2;
case "!==":
if (typeof a2 === "object")
a2 = a2.version;
if (typeof b2 === "object")
b2 = b2.version;
return a2 !== b2;
case "":
case "=":
case "==":
return eq(a2, b2, loose);
case "!=":
return neq(a2, b2, loose);
case ">":
return gt(a2, b2, loose);
case ">=":
return gte(a2, b2, loose);
case "<":
return lt(a2, b2, loose);
case "<=":
return lte(a2, b2, loose);
default:
throw new TypeError("Invalid operator: " + op);
}
}
exports2.Comparator = Comparator;
function Comparator(comp, options2) {
if (!options2 || typeof options2 !== "object") {
options2 = {
loose: !!options2,
includePrerelease: false
};
}
if (comp instanceof Comparator) {
if (comp.loose === !!options2.loose) {
return comp;
} else {
comp = comp.value;
}
}
if (!(this instanceof Comparator)) {
return new Comparator(comp, options2);
}
debug27("comparator", comp, options2);
this.options = options2;
this.loose = !!options2.loose;
this.parse(comp);
if (this.semver === ANY) {
this.value = "";
} else {
this.value = this.operator + this.semver.version;
}
debug27("comp", this);
}
var ANY = {};
Comparator.prototype.parse = function(comp) {
var r2 = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
var m3 = comp.match(r2);
if (!m3) {
throw new TypeError("Invalid comparator: " + comp);
}
this.operator = m3[1];
if (this.operator === "=") {
this.operator = "";
}
if (!m3[2]) {
this.semver = ANY;
} else {
this.semver = new SemVer(m3[2], this.options.loose);
}
};
Comparator.prototype.toString = function() {
return this.value;
};
Comparator.prototype.test = function(version3) {
debug27("Comparator.test", version3, this.options.loose);
if (this.semver === ANY) {
return true;
}
if (typeof version3 === "string") {
version3 = new SemVer(version3, this.options);
}
return cmp(version3, this.operator, this.semver, this.options);
};
Comparator.prototype.intersects = function(comp, options2) {
if (!(comp instanceof Comparator)) {
throw new TypeError("a Comparator is required");
}
if (!options2 || typeof options2 !== "object") {
options2 = {
loose: !!options2,
includePrerelease: false
};
}
var rangeTmp;
if (this.operator === "") {
rangeTmp = new Range(comp.value, options2);
return satisfies(this.value, rangeTmp, options2);
} else if (comp.operator === "") {
rangeTmp = new Range(this.value, options2);
return satisfies(comp.semver, rangeTmp, options2);
}
var sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">");
var sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<");
var sameSemVer = this.semver.version === comp.semver.version;
var differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<=");
var oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options2) && ((this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<"));
var oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options2) && ((this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">"));
return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
};
exports2.Range = Range;
function Range(range2, options2) {
if (!options2 || typeof options2 !== "object") {
options2 = {
loose: !!options2,
includePrerelease: false
};
}
if (range2 instanceof Range) {
if (range2.loose === !!options2.loose && range2.includePrerelease === !!options2.includePrerelease) {
return range2;
} else {
return new Range(range2.raw, options2);
}
}
if (range2 instanceof Comparator) {
return new Range(range2.value, options2);
}
if (!(this instanceof Range)) {
return new Range(range2, options2);
}
this.options = options2;
this.loose = !!options2.loose;
this.includePrerelease = !!options2.includePrerelease;
this.raw = range2;
this.set = range2.split(/\s*\|\|\s*/).map(function(range3) {
return this.parseRange(range3.trim());
}, this).filter(function(c3) {
return c3.length;
});
if (!this.set.length) {
throw new TypeError("Invalid SemVer Range: " + range2);
}
this.format();
}
Range.prototype.format = function() {
this.range = this.set.map(function(comps) {
return comps.join(" ").trim();
}).join("||").trim();
return this.range;
};
Range.prototype.toString = function() {
return this.range;
};
Range.prototype.parseRange = function(range2) {
var loose = this.options.loose;
range2 = range2.trim();
var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE];
range2 = range2.replace(hr, hyphenReplace);
debug27("hyphen replace", range2);
range2 = range2.replace(re[COMPARATORTRIM], comparatorTrimReplace);
debug27("comparator trim", range2, re[COMPARATORTRIM]);
range2 = range2.replace(re[TILDETRIM], tildeTrimReplace);
range2 = range2.replace(re[CARETTRIM], caretTrimReplace);
range2 = range2.split(/\s+/).join(" ");
var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
var set = range2.split(" ").map(function(comp) {
return parseComparator(comp, this.options);
}, this).join(" ").split(/\s+/);
if (this.options.loose) {
set = set.filter(function(comp) {
return !!comp.match(compRe);
});
}
set = set.map(function(comp) {
return new Comparator(comp, this.options);
}, this);
return set;
};
Range.prototype.intersects = function(range2, options2) {
if (!(range2 instanceof Range)) {
throw new TypeError("a Range is required");
}
return this.set.some(function(thisComparators) {
return thisComparators.every(function(thisComparator) {
return range2.set.some(function(rangeComparators) {
return rangeComparators.every(function(rangeComparator) {
return thisComparator.intersects(rangeComparator, options2);
});
});
});
});
};
exports2.toComparators = toComparators;
function toComparators(range2, options2) {
return new Range(range2, options2).set.map(function(comp) {
return comp.map(function(c3) {
return c3.value;
}).join(" ").trim().split(" ");
});
}
function parseComparator(comp, options2) {
debug27("comp", comp, options2);
comp = replaceCarets(comp, options2);
debug27("caret", comp);
comp = replaceTildes(comp, options2);
debug27("tildes", comp);
comp = replaceXRanges(comp, options2);
debug27("xrange", comp);
comp = replaceStars(comp, options2);
debug27("stars", comp);
return comp;
}
function isX(id) {
return !id || id.toLowerCase() === "x" || id === "*";
}
function replaceTildes(comp, options2) {
return comp.trim().split(/\s+/).map(function(comp2) {
return replaceTilde(comp2, options2);
}).join(" ");
}
function replaceTilde(comp, options2) {
var r2 = options2.loose ? re[TILDELOOSE] : re[TILDE];
return comp.replace(r2, function(_2, M, m3, p2, pr) {
debug27("tilde", comp, _2, M, m3, p2, pr);
var ret;
if (isX(M)) {
ret = "";
} else if (isX(m3)) {
ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0";
} else if (isX(p2)) {
ret = ">=" + M + "." + m3 + ".0 <" + M + "." + (+m3 + 1) + ".0";
} else if (pr) {
debug27("replaceTilde pr", pr);
ret = ">=" + M + "." + m3 + "." + p2 + "-" + pr + " <" + M + "." + (+m3 + 1) + ".0";
} else {
ret = ">=" + M + "." + m3 + "." + p2 + " <" + M + "." + (+m3 + 1) + ".0";
}
debug27("tilde return", ret);
return ret;
});
}
function replaceCarets(comp, options2) {
return comp.trim().split(/\s+/).map(function(comp2) {
return replaceCaret(comp2, options2);
}).join(" ");
}
function replaceCaret(comp, options2) {
debug27("caret", comp, options2);
var r2 = options2.loose ? re[CARETLOOSE] : re[CARET];
return comp.replace(r2, function(_2, M, m3, p2, pr) {
debug27("caret", comp, _2, M, m3, p2, pr);
var ret;
if (isX(M)) {
ret = "";
} else if (isX(m3)) {
ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0";
} else if (isX(p2)) {
if (M === "0") {
ret = ">=" + M + "." + m3 + ".0 <" + M + "." + (+m3 + 1) + ".0";
} else {
ret = ">=" + M + "." + m3 + ".0 <" + (+M + 1) + ".0.0";
}
} else if (pr) {
debug27("replaceCaret pr", pr);
if (M === "0") {
if (m3 === "0") {
ret = ">=" + M + "." + m3 + "." + p2 + "-" + pr + " <" + M + "." + m3 + "." + (+p2 + 1);
} else {
ret = ">=" + M + "." + m3 + "." + p2 + "-" + pr + " <" + M + "." + (+m3 + 1) + ".0";
}
} else {
ret = ">=" + M + "." + m3 + "." + p2 + "-" + pr + " <" + (+M + 1) + ".0.0";
}
} else {
debug27("no pr");
if (M === "0") {
if (m3 === "0") {
ret = ">=" + M + "." + m3 + "." + p2 + " <" + M + "." + m3 + "." + (+p2 + 1);
} else {
ret = ">=" + M + "." + m3 + "." + p2 + " <" + M + "." + (+m3 + 1) + ".0";
}
} else {
ret = ">=" + M + "." + m3 + "." + p2 + " <" + (+M + 1) + ".0.0";
}
}
debug27("caret return", ret);
return ret;
});
}
function replaceXRanges(comp, options2) {
debug27("replaceXRanges", comp, options2);
return comp.split(/\s+/).map(function(comp2) {
return replaceXRange(comp2, options2);
}).join(" ");
}
function replaceXRange(comp, options2) {
comp = comp.trim();
var r2 = options2.loose ? re[XRANGELOOSE] : re[XRANGE];
return comp.replace(r2, function(ret, gtlt, M, m3, p2, pr) {
debug27("xRange", comp, ret, gtlt, M, m3, p2, pr);
var xM = isX(M);
var xm = xM || isX(m3);
var xp = xm || isX(p2);
var anyX = xp;
if (gtlt === "=" && anyX) {
gtlt = "";
}
if (xM) {
if (gtlt === ">" || gtlt === "<") {
ret = "<0.0.0";
} else {
ret = "*";
}
} else if (gtlt && anyX) {
if (xm) {
m3 = 0;
}
p2 = 0;
if (gtlt === ">") {
gtlt = ">=";
if (xm) {
M = +M + 1;
m3 = 0;
p2 = 0;
} else {
m3 = +m3 + 1;
p2 = 0;
}
} else if (gtlt === "<=") {
gtlt = "<";
if (xm) {
M = +M + 1;
} else {
m3 = +m3 + 1;
}
}
ret = gtlt + M + "." + m3 + "." + p2;
} else if (xm) {
ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0";
} else if (xp) {
ret = ">=" + M + "." + m3 + ".0 <" + M + "." + (+m3 + 1) + ".0";
}
debug27("xRange return", ret);
return ret;
});
}
function replaceStars(comp, options2) {
debug27("replaceStars", comp, options2);
return comp.trim().replace(re[STAR], "");
}
function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) {
if (isX(fM)) {
from = "";
} else if (isX(fm)) {
from = ">=" + fM + ".0.0";
} else if (isX(fp)) {
from = ">=" + fM + "." + fm + ".0";
} else {
from = ">=" + from;
}
if (isX(tM)) {
to = "";
} else if (isX(tm)) {
to = "<" + (+tM + 1) + ".0.0";
} else if (isX(tp)) {
to = "<" + tM + "." + (+tm + 1) + ".0";
} else if (tpr) {
to = "<=" + tM + "." + tm + "." + tp + "-" + tpr;
} else {
to = "<=" + to;
}
return (from + " " + to).trim();
}
Range.prototype.test = function(version3) {
if (!version3) {
return false;
}
if (typeof version3 === "string") {
version3 = new SemVer(version3, this.options);
}
for (var i3 = 0; i3 < this.set.length; i3++) {
if (testSet(this.set[i3], version3, this.options)) {
return true;
}
}
return false;
};
function testSet(set, version3, options2) {
for (var i3 = 0; i3 < set.length; i3++) {
if (!set[i3].test(version3)) {
return false;
}
}
if (version3.prerelease.length && !options2.includePrerelease) {
for (i3 = 0; i3 < set.length; i3++) {
debug27(set[i3].semver);
if (set[i3].semver === ANY) {
continue;
}
if (set[i3].semver.prerelease.length > 0) {
var allowed = set[i3].semver;
if (allowed.major === version3.major && allowed.minor === version3.minor && allowed.patch === version3.patch) {
return true;
}
}
}
return false;
}
return true;
}
exports2.satisfies = satisfies;
function satisfies(version3, range2, options2) {
try {
range2 = new Range(range2, options2);
} catch (er) {
return false;
}
return range2.test(version3);
}
exports2.maxSatisfying = maxSatisfying;
function maxSatisfying(versions, range2, options2) {
var max = null;
var maxSV = null;
try {
var rangeObj = new Range(range2, options2);
} catch (er) {
return null;
}
versions.forEach(function(v2) {
if (rangeObj.test(v2)) {
if (!max || maxSV.compare(v2) === -1) {
max = v2;
maxSV = new SemVer(max, options2);
}
}
});
return max;
}
exports2.minSatisfying = minSatisfying;
function minSatisfying(versions, range2, options2) {
var min = null;
var minSV = null;
try {
var rangeObj = new Range(range2, options2);
} catch (er) {
return null;
}
versions.forEach(function(v2) {
if (rangeObj.test(v2)) {
if (!min || minSV.compare(v2) === 1) {
min = v2;
minSV = new SemVer(min, options2);
}
}
});
return min;
}
exports2.minVersion = minVersion;
function minVersion(range2, loose) {
range2 = new Range(range2, loose);
var minver = new SemVer("0.0.0");
if (range2.test(minver)) {
return minver;
}
minver = new SemVer("0.0.0-0");
if (range2.test(minver)) {
return minver;
}
minver = null;
for (var i3 = 0; i3 < range2.set.length; ++i3) {
var comparators = range2.set[i3];
comparators.forEach(function(comparator) {
var compver = new SemVer(comparator.semver.version);
switch (comparator.operator) {
case ">":
if (compver.prerelease.length === 0) {
compver.patch++;
} else {
compver.prerelease.push(0);
}
compver.raw = compver.format();
case "":
case ">=":
if (!minver || gt(minver, compver)) {
minver = compver;
}
break;
case "<":
case "<=":
break;
default:
throw new Error("Unexpected operation: " + comparator.operator);
}
});
}
if (minver && range2.test(minver)) {
return minver;
}
return null;
}
exports2.validRange = validRange;
function validRange(range2, options2) {
try {
return new Range(range2, options2).range || "*";
} catch (er) {
return null;
}
}
exports2.ltr = ltr;
function ltr(version3, range2, options2) {
return outside(version3, range2, "<", options2);
}
exports2.gtr = gtr;
function gtr(version3, range2, options2) {
return outside(version3, range2, ">", options2);
}
exports2.outside = outside;
function outside(version3, range2, hilo, options2) {
version3 = new SemVer(version3, options2);
range2 = new Range(range2, options2);
var gtfn, ltefn, ltfn, comp, ecomp;
switch (hilo) {
case ">":
gtfn = gt;
ltefn = lte;
ltfn = lt;
comp = ">";
ecomp = ">=";
break;
case "<":
gtfn = lt;
ltefn = gte;
ltfn = gt;
comp = "<";
ecomp = "<=";
break;
default:
throw new TypeError('Must provide a hilo val of "<" or ">"');
}
if (satisfies(version3, range2, options2)) {
return false;
}
for (var i3 = 0; i3 < range2.set.length; ++i3) {
var comparators = range2.set[i3];
var high = null;
var low = null;
comparators.forEach(function(comparator) {
if (comparator.semver === ANY) {
comparator = new Comparator(">=0.0.0");
}
high = high || comparator;
low = low || comparator;
if (gtfn(comparator.semver, high.semver, options2)) {
high = comparator;
} else if (ltfn(comparator.semver, low.semver, options2)) {
low = comparator;
}
});
if (high.operator === comp || high.operator === ecomp) {
return false;
}
if ((!low.operator || low.operator === comp) && ltefn(version3, low.semver)) {
return false;
} else if (low.operator === ecomp && ltfn(version3, low.semver)) {
return false;
}
}
return true;
}
exports2.prerelease = prerelease;
function prerelease(version3, options2) {
var parsed = parse3(version3, options2);
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
}
exports2.intersects = intersects;
function intersects(r1, r2, options2) {
r1 = new Range(r1, options2);
r2 = new Range(r2, options2);
return r1.intersects(r2);
}
exports2.coerce = coerce;
function coerce(version3) {
if (version3 instanceof SemVer) {
return version3;
}
if (typeof version3 !== "string") {
return null;
}
var match4 = version3.match(re[COERCE]);
if (match4 == null) {
return null;
}
return parse3(match4[1] + "." + (match4[2] || "0") + "." + (match4[3] || "0"));
}
}
});
// ../../node_modules/.pnpm/spdx-license-ids@3.0.13/node_modules/spdx-license-ids/index.json
var require_spdx_license_ids = __commonJS({
"../../node_modules/.pnpm/spdx-license-ids@3.0.13/node_modules/spdx-license-ids/index.json"(exports2, module2) {
module2.exports = [
"0BSD",
"AAL",
"ADSL",
"AFL-1.1",
"AFL-1.2",
"AFL-2.0",
"AFL-2.1",
"AFL-3.0",
"AGPL-1.0-only",
"AGPL-1.0-or-later",
"AGPL-3.0-only",
"AGPL-3.0-or-later",
"AMDPLPA",
"AML",
"AMPAS",
"ANTLR-PD",
"ANTLR-PD-fallback",
"APAFML",
"APL-1.0",
"APSL-1.0",
"APSL-1.1",
"APSL-1.2",
"APSL-2.0",
"Abstyles",
"AdaCore-doc",
"Adobe-2006",
"Adobe-Glyph",
"Afmparse",
"Aladdin",
"Apache-1.0",
"Apache-1.1",
"Apache-2.0",
"App-s2p",
"Arphic-1999",
"Artistic-1.0",
"Artistic-1.0-Perl",
"Artistic-1.0-cl8",
"Artistic-2.0",
"BSD-1-Clause",
"BSD-2-Clause",
"BSD-2-Clause-Patent",
"BSD-2-Clause-Views",
"BSD-3-Clause",
"BSD-3-Clause-Attribution",
"BSD-3-Clause-Clear",
"BSD-3-Clause-LBNL",
"BSD-3-Clause-Modification",
"BSD-3-Clause-No-Military-License",
"BSD-3-Clause-No-Nuclear-License",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause-No-Nuclear-Warranty",
"BSD-3-Clause-Open-MPI",
"BSD-4-Clause",
"BSD-4-Clause-Shortened",
"BSD-4-Clause-UC",
"BSD-4.3RENO",
"BSD-4.3TAHOE",
"BSD-Advertising-Acknowledgement",
"BSD-Attribution-HPND-disclaimer",
"BSD-Protection",
"BSD-Source-Code",
"BSL-1.0",
"BUSL-1.1",
"Baekmuk",
"Bahyph",
"Barr",
"Beerware",
"BitTorrent-1.0",
"BitTorrent-1.1",
"Bitstream-Charter",
"Bitstream-Vera",
"BlueOak-1.0.0",
"Borceux",
"Brian-Gladman-3-Clause",
"C-UDA-1.0",
"CAL-1.0",
"CAL-1.0-Combined-Work-Exception",
"CATOSL-1.1",
"CC-BY-1.0",
"CC-BY-2.0",
"CC-BY-2.5",
"CC-BY-2.5-AU",
"CC-BY-3.0",
"CC-BY-3.0-AT",
"CC-BY-3.0-DE",
"CC-BY-3.0-IGO",
"CC-BY-3.0-NL",
"CC-BY-3.0-US",
"CC-BY-4.0",
"CC-BY-NC-1.0",
"CC-BY-NC-2.0",
"CC-BY-NC-2.5",
"CC-BY-NC-3.0",
"CC-BY-NC-3.0-DE",
"CC-BY-NC-4.0",
"CC-BY-NC-ND-1.0",
"CC-BY-NC-ND-2.0",
"CC-BY-NC-ND-2.5",
"CC-BY-NC-ND-3.0",
"CC-BY-NC-ND-3.0-DE",
"CC-BY-NC-ND-3.0-IGO",
"CC-BY-NC-ND-4.0",
"CC-BY-NC-SA-1.0",
"CC-BY-NC-SA-2.0",
"CC-BY-NC-SA-2.0-DE",
"CC-BY-NC-SA-2.0-FR",
"CC-BY-NC-SA-2.0-UK",
"CC-BY-NC-SA-2.5",
"CC-BY-NC-SA-3.0",
"CC-BY-NC-SA-3.0-DE",
"CC-BY-NC-SA-3.0-IGO",
"CC-BY-NC-SA-4.0",
"CC-BY-ND-1.0",
"CC-BY-ND-2.0",
"CC-BY-ND-2.5",
"CC-BY-ND-3.0",
"CC-BY-ND-3.0-DE",
"CC-BY-ND-4.0",
"CC-BY-SA-1.0",
"CC-BY-SA-2.0",
"CC-BY-SA-2.0-UK",
"CC-BY-SA-2.1-JP",
"CC-BY-SA-2.5",
"CC-BY-SA-3.0",
"CC-BY-SA-3.0-AT",
"CC-BY-SA-3.0-DE",
"CC-BY-SA-4.0",
"CC-PDDC",
"CC0-1.0",
"CDDL-1.0",
"CDDL-1.1",
"CDL-1.0",
"CDLA-Permissive-1.0",
"CDLA-Permissive-2.0",
"CDLA-Sharing-1.0",
"CECILL-1.0",
"CECILL-1.1",
"CECILL-2.0",
"CECILL-2.1",
"CECILL-B",
"CECILL-C",
"CERN-OHL-1.1",
"CERN-OHL-1.2",
"CERN-OHL-P-2.0",
"CERN-OHL-S-2.0",
"CERN-OHL-W-2.0",
"CFITSIO",
"CMU-Mach",
"CNRI-Jython",
"CNRI-Python",
"CNRI-Python-GPL-Compatible",
"COIL-1.0",
"CPAL-1.0",
"CPL-1.0",
"CPOL-1.02",
"CUA-OPL-1.0",
"Caldera",
"ClArtistic",
"Clips",
"Community-Spec-1.0",
"Condor-1.1",
"Cornell-Lossless-JPEG",
"Crossword",
"CrystalStacker",
"Cube",
"D-FSL-1.0",
"DL-DE-BY-2.0",
"DOC",
"DRL-1.0",
"DSDP",
"Dotseqn",
"ECL-1.0",
"ECL-2.0",
"EFL-1.0",
"EFL-2.0",
"EPICS",
"EPL-1.0",
"EPL-2.0",
"EUDatagrid",
"EUPL-1.0",
"EUPL-1.1",
"EUPL-1.2",
"Elastic-2.0",
"Entessa",
"ErlPL-1.1",
"Eurosym",
"FDK-AAC",
"FSFAP",
"FSFUL",
"FSFULLR",
"FSFULLRWD",
"FTL",
"Fair",
"Frameworx-1.0",
"FreeBSD-DOC",
"FreeImage",
"GD",
"GFDL-1.1-invariants-only",
"GFDL-1.1-invariants-or-later",
"GFDL-1.1-no-invariants-only",
"GFDL-1.1-no-invariants-or-later",
"GFDL-1.1-only",
"GFDL-1.1-or-later",
"GFDL-1.2-invariants-only",
"GFDL-1.2-invariants-or-later",
"GFDL-1.2-no-invariants-only",
"GFDL-1.2-no-invariants-or-later",
"GFDL-1.2-only",
"GFDL-1.2-or-later",
"GFDL-1.3-invariants-only",
"GFDL-1.3-invariants-or-later",
"GFDL-1.3-no-invariants-only",
"GFDL-1.3-no-invariants-or-later",
"GFDL-1.3-only",
"GFDL-1.3-or-later",
"GL2PS",
"GLWTPL",
"GPL-1.0-only",
"GPL-1.0-or-later",
"GPL-2.0-only",
"GPL-2.0-or-later",
"GPL-3.0-only",
"GPL-3.0-or-later",
"Giftware",
"Glide",
"Glulxe",
"Graphics-Gems",
"HP-1986",
"HPND",
"HPND-Markus-Kuhn",
"HPND-export-US",
"HPND-sell-variant",
"HPND-sell-variant-MIT-disclaimer",
"HTMLTIDY",
"HaskellReport",
"Hippocratic-2.1",
"IBM-pibs",
"ICU",
"IEC-Code-Components-EULA",
"IJG",
"IJG-short",
"IPA",
"IPL-1.0",
"ISC",
"ImageMagick",
"Imlib2",
"Info-ZIP",
"Intel",
"Intel-ACPI",
"Interbase-1.0",
"JPL-image",
"JPNIC",
"JSON",
"Jam",
"JasPer-2.0",
"Kazlib",
"Knuth-CTAN",
"LAL-1.2",
"LAL-1.3",
"LGPL-2.0-only",
"LGPL-2.0-or-later",
"LGPL-2.1-only",
"LGPL-2.1-or-later",
"LGPL-3.0-only",
"LGPL-3.0-or-later",
"LGPLLR",
"LOOP",
"LPL-1.0",
"LPL-1.02",
"LPPL-1.0",
"LPPL-1.1",
"LPPL-1.2",
"LPPL-1.3a",
"LPPL-1.3c",
"LZMA-SDK-9.11-to-9.20",
"LZMA-SDK-9.22",
"Latex2e",
"Leptonica",
"LiLiQ-P-1.1",
"LiLiQ-R-1.1",
"LiLiQ-Rplus-1.1",
"Libpng",
"Linux-OpenIB",
"Linux-man-pages-copyleft",
"MIT",
"MIT-0",
"MIT-CMU",
"MIT-Modern-Variant",
"MIT-Wu",
"MIT-advertising",
"MIT-enna",
"MIT-feh",
"MIT-open-group",
"MITNFA",
"MPL-1.0",
"MPL-1.1",
"MPL-2.0",
"MPL-2.0-no-copyleft-exception",
"MS-LPL",
"MS-PL",
"MS-RL",
"MTLL",
"MakeIndex",
"Martin-Birgmeier",
"Minpack",
"MirOS",
"Motosoto",
"MulanPSL-1.0",
"MulanPSL-2.0",
"Multics",
"Mup",
"NAIST-2003",
"NASA-1.3",
"NBPL-1.0",
"NCGL-UK-2.0",
"NCSA",
"NGPL",
"NICTA-1.0",
"NIST-PD",
"NIST-PD-fallback",
"NLOD-1.0",
"NLOD-2.0",
"NLPL",
"NOSL",
"NPL-1.0",
"NPL-1.1",
"NPOSL-3.0",
"NRL",
"NTP",
"NTP-0",
"Naumen",
"Net-SNMP",
"NetCDF",
"Newsletr",
"Nokia",
"Noweb",
"O-UDA-1.0",
"OCCT-PL",
"OCLC-2.0",
"ODC-By-1.0",
"ODbL-1.0",
"OFFIS",
"OFL-1.0",
"OFL-1.0-RFN",
"OFL-1.0-no-RFN",
"OFL-1.1",
"OFL-1.1-RFN",
"OFL-1.1-no-RFN",
"OGC-1.0",
"OGDL-Taiwan-1.0",
"OGL-Canada-2.0",
"OGL-UK-1.0",
"OGL-UK-2.0",
"OGL-UK-3.0",
"OGTSL",
"OLDAP-1.1",
"OLDAP-1.2",
"OLDAP-1.3",
"OLDAP-1.4",
"OLDAP-2.0",
"OLDAP-2.0.1",
"OLDAP-2.1",
"OLDAP-2.2",
"OLDAP-2.2.1",
"OLDAP-2.2.2",
"OLDAP-2.3",
"OLDAP-2.4",
"OLDAP-2.5",
"OLDAP-2.6",
"OLDAP-2.7",
"OLDAP-2.8",
"OML",
"OPL-1.0",
"OPUBL-1.0",
"OSET-PL-2.1",
"OSL-1.0",
"OSL-1.1",
"OSL-2.0",
"OSL-2.1",
"OSL-3.0",
"OpenPBS-2.3",
"OpenSSL",
"PDDL-1.0",
"PHP-3.0",
"PHP-3.01",
"PSF-2.0",
"Parity-6.0.0",
"Parity-7.0.0",
"Plexus",
"PolyForm-Noncommercial-1.0.0",
"PolyForm-Small-Business-1.0.0",
"PostgreSQL",
"Python-2.0",
"Python-2.0.1",
"QPL-1.0",
"QPL-1.0-INRIA-2004",
"Qhull",
"RHeCos-1.1",
"RPL-1.1",
"RPL-1.5",
"RPSL-1.0",
"RSA-MD",
"RSCPL",
"Rdisc",
"Ruby",
"SAX-PD",
"SCEA",
"SGI-B-1.0",
"SGI-B-1.1",
"SGI-B-2.0",
"SHL-0.5",
"SHL-0.51",
"SISSL",
"SISSL-1.2",
"SMLNJ",
"SMPPL",
"SNIA",
"SPL-1.0",
"SSH-OpenSSH",
"SSH-short",
"SSPL-1.0",
"SWL",
"Saxpath",
"SchemeReport",
"Sendmail",
"Sendmail-8.23",
"SimPL-2.0",
"Sleepycat",
"Spencer-86",
"Spencer-94",
"Spencer-99",
"SugarCRM-1.1.3",
"SunPro",
"Symlinks",
"TAPR-OHL-1.0",
"TCL",
"TCP-wrappers",
"TMate",
"TORQUE-1.1",
"TOSL",
"TPDL",
"TPL-1.0",
"TTWL",
"TU-Berlin-1.0",
"TU-Berlin-2.0",
"UCAR",
"UCL-1.0",
"UPL-1.0",
"Unicode-DFS-2015",
"Unicode-DFS-2016",
"Unicode-TOU",
"Unlicense",
"VOSTROM",
"VSL-1.0",
"Vim",
"W3C",
"W3C-19980720",
"W3C-20150513",
"WTFPL",
"Watcom-1.0",
"Wsuipa",
"X11",
"X11-distribute-modifications-variant",
"XFree86-1.1",
"XSkat",
"Xerox",
"Xnet",
"YPL-1.0",
"YPL-1.1",
"ZPL-1.1",
"ZPL-2.0",
"ZPL-2.1",
"Zed",
"Zend-2.0",
"Zimbra-1.3",
"Zimbra-1.4",
"Zlib",
"blessing",
"bzip2-1.0.6",
"checkmk",
"copyleft-next-0.3.0",
"copyleft-next-0.3.1",
"curl",
"diffmark",
"dvipdfm",
"eGenix",
"etalab-2.0",
"gSOAP-1.3b",
"gnuplot",
"iMatix",
"libpng-2.0",
"libselinux-1.0",
"libtiff",
"libutil-David-Nugent",
"mpi-permissive",
"mpich2",
"mplus",
"psfrag",
"psutils",
"snprintf",
"w3m",
"xinetd",
"xlock",
"xpp",
"zlib-acknowledgement"
];
}
});
// ../../node_modules/.pnpm/spdx-exceptions@2.3.0/node_modules/spdx-exceptions/index.json
var require_spdx_exceptions = __commonJS({
"../../node_modules/.pnpm/spdx-exceptions@2.3.0/node_modules/spdx-exceptions/index.json"(exports2, module2) {
module2.exports = [
"389-exception",
"Autoconf-exception-2.0",
"Autoconf-exception-3.0",
"Bison-exception-2.2",
"Bootloader-exception",
"Classpath-exception-2.0",
"CLISP-exception-2.0",
"DigiRule-FOSS-exception",
"eCos-exception-2.0",
"Fawkes-Runtime-exception",
"FLTK-exception",
"Font-exception-2.0",
"freertos-exception-2.0",
"GCC-exception-2.0",
"GCC-exception-3.1",
"gnu-javamail-exception",
"GPL-3.0-linking-exception",
"GPL-3.0-linking-source-exception",
"GPL-CC-1.0",
"i2p-gpl-java-exception",
"Libtool-exception",
"Linux-syscall-note",
"LLVM-exception",
"LZMA-exception",
"mif-exception",
"Nokia-Qt-exception-1.1",
"OCaml-LGPL-linking-exception",
"OCCT-exception-1.0",
"OpenJDK-assembly-exception-1.0",
"openvpn-openssl-exception",
"PS-or-PDF-font-exception-20170817",
"Qt-GPL-exception-1.0",
"Qt-LGPL-exception-1.1",
"Qwt-exception-1.0",
"Swift-exception",
"u-boot-exception-2.0",
"Universal-FOSS-exception-1.0",
"WxWindows-exception-3.1"
];
}
});
// ../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/scan.js
var require_scan = __commonJS({
"../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/scan.js"(exports2, module2) {
"use strict";
var licenses = [].concat(require_spdx_license_ids()).concat(require_spdx_license_ids());
var exceptions = require_spdx_exceptions();
module2.exports = function(source) {
var index2 = 0;
function hasMore() {
return index2 < source.length;
}
function read(value) {
if (value instanceof RegExp) {
var chars2 = source.slice(index2);
var match4 = chars2.match(value);
if (match4) {
index2 += match4[0].length;
return match4[0];
}
} else {
if (source.indexOf(value, index2) === index2) {
index2 += value.length;
return value;
}
}
}
function skipWhitespace() {
read(/[ ]*/);
}
function operator() {
var string;
var possibilities = ["WITH", "AND", "OR", "(", ")", ":", "+"];
for (var i2 = 0; i2 < possibilities.length; i2++) {
string = read(possibilities[i2]);
if (string) {
break;
}
}
if (string === "+" && index2 > 1 && source[index2 - 2] === " ") {
throw new Error("Space before `+`");
}
return string && {
type: "OPERATOR",
string
};
}
function idstring() {
return read(/[A-Za-z0-9-.]+/);
}
function expectIdstring() {
var string = idstring();
if (!string) {
throw new Error("Expected idstring at offset " + index2);
}
return string;
}
function documentRef() {
if (read("DocumentRef-")) {
var string = expectIdstring();
return { type: "DOCUMENTREF", string };
}
}
function licenseRef() {
if (read("LicenseRef-")) {
var string = expectIdstring();
return { type: "LICENSEREF", string };
}
}
function identifier() {
var begin = index2;
var string = idstring();
if (licenses.indexOf(string) !== -1) {
return {
type: "LICENSE",
string
};
} else if (exceptions.indexOf(string) !== -1) {
return {
type: "EXCEPTION",
string
};
}
index2 = begin;
}
function parseToken() {
return operator() || documentRef() || licenseRef() || identifier();
}
var tokens = [];
while (hasMore()) {
skipWhitespace();
if (!hasMore()) {
break;
}
var token = parseToken();
if (!token) {
throw new Error("Unexpected `" + source[index2] + "` at offset " + index2);
}
tokens.push(token);
}
return tokens;
};
}
});
// ../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/parse.js
var require_parse2 = __commonJS({
"../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/parse.js"(exports2, module2) {
"use strict";
module2.exports = function(tokens) {
var index2 = 0;
function hasMore() {
return index2 < tokens.length;
}
function token() {
return hasMore() ? tokens[index2] : null;
}
function next() {
if (!hasMore()) {
throw new Error();
}
index2++;
}
function parseOperator(operator) {
var t4 = token();
if (t4 && t4.type === "OPERATOR" && operator === t4.string) {
next();
return t4.string;
}
}
function parseWith() {
if (parseOperator("WITH")) {
var t4 = token();
if (t4 && t4.type === "EXCEPTION") {
next();
return t4.string;
}
throw new Error("Expected exception after `WITH`");
}
}
function parseLicenseRef() {
var begin = index2;
var string = "";
var t4 = token();
if (t4.type === "DOCUMENTREF") {
next();
string += "DocumentRef-" + t4.string + ":";
if (!parseOperator(":")) {
throw new Error("Expected `:` after `DocumentRef-...`");
}
}
t4 = token();
if (t4.type === "LICENSEREF") {
next();
string += "LicenseRef-" + t4.string;
return { license: string };
}
index2 = begin;
}
function parseLicense() {
var t4 = token();
if (t4 && t4.type === "LICENSE") {
next();
var node2 = { license: t4.string };
if (parseOperator("+")) {
node2.plus = true;
}
var exception = parseWith();
if (exception) {
node2.exception = exception;
}
return node2;
}
}
function parseParenthesizedExpression() {
var left4 = parseOperator("(");
if (!left4) {
return;
}
var expr = parseExpression();
if (!parseOperator(")")) {
throw new Error("Expected `)`");
}
return expr;
}
function parseAtom() {
return parseParenthesizedExpression() || parseLicenseRef() || parseLicense();
}
function makeBinaryOpParser(operator, nextParser) {
return function parseBinaryOp() {
var left4 = nextParser();
if (!left4) {
return;
}
if (!parseOperator(operator)) {
return left4;
}
var right5 = parseBinaryOp();
if (!right5) {
throw new Error("Expected expression");
}
return {
left: left4,
conjunction: operator.toLowerCase(),
right: right5
};
};
}
var parseAnd = makeBinaryOpParser("AND", parseAtom);
var parseExpression = makeBinaryOpParser("OR", parseAnd);
var node = parseExpression();
if (!node || hasMore()) {
throw new Error("Syntax error");
}
return node;
};
}
});
// ../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/index.js
var require_spdx_expression_parse = __commonJS({
"../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/index.js"(exports2, module2) {
"use strict";
var scan = require_scan();
var parse3 = require_parse2();
module2.exports = function(source) {
return parse3(scan(source));
};
}
});
// ../../node_modules/.pnpm/spdx-correct@3.1.1/node_modules/spdx-correct/index.js
var require_spdx_correct = __commonJS({
"../../node_modules/.pnpm/spdx-correct@3.1.1/node_modules/spdx-correct/index.js"(exports2, module2) {
var parse3 = require_spdx_expression_parse();
var spdxLicenseIds = require_spdx_license_ids();
function valid(string) {
try {
parse3(string);
return true;
} catch (error2) {
return false;
}
}
var transpositions = [
["APGL", "AGPL"],
["Gpl", "GPL"],
["GLP", "GPL"],
["APL", "Apache"],
["ISD", "ISC"],
["GLP", "GPL"],
["IST", "ISC"],
["Claude", "Clause"],
[" or later", "+"],
[" International", ""],
["GNU", "GPL"],
["GUN", "GPL"],
["+", ""],
["GNU GPL", "GPL"],
["GNU/GPL", "GPL"],
["GNU GLP", "GPL"],
["GNU General Public License", "GPL"],
["Gnu public license", "GPL"],
["GNU Public License", "GPL"],
["GNU GENERAL PUBLIC LICENSE", "GPL"],
["MTI", "MIT"],
["Mozilla Public License", "MPL"],
["Universal Permissive License", "UPL"],
["WTH", "WTF"],
["-License", ""]
];
var TRANSPOSED = 0;
var CORRECT = 1;
var transforms = [
function(argument) {
return argument.toUpperCase();
},
function(argument) {
return argument.trim();
},
function(argument) {
return argument.replace(/\./g, "");
},
function(argument) {
return argument.replace(/\s+/g, "");
},
function(argument) {
return argument.replace(/\s+/g, "-");
},
function(argument) {
return argument.replace("v", "-");
},
function(argument) {
return argument.replace(/,?\s*(\d)/, "-$1");
},
function(argument) {
return argument.replace(/,?\s*(\d)/, "-$1.0");
},
function(argument) {
return argument.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, "-$2");
},
function(argument) {
return argument.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, "-$2.0");
},
function(argument) {
return argument[0].toUpperCase() + argument.slice(1);
},
function(argument) {
return argument.replace("/", "-");
},
function(argument) {
return argument.replace(/\s*V\s*(\d)/, "-$1").replace(/(\d)$/, "$1.0");
},
function(argument) {
if (argument.indexOf("3.0") !== -1) {
return argument + "-or-later";
} else {
return argument + "-only";
}
},
function(argument) {
return argument + "only";
},
function(argument) {
return argument.replace(/(\d)$/, "-$1.0");
},
function(argument) {
return argument.replace(/(-| )?(\d)$/, "-$2-Clause");
},
function(argument) {
return argument.replace(/(-| )clause(-| )(\d)/, "-$3-Clause");
},
function(argument) {
return argument.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i, "BSD-3-Clause");
},
function(argument) {
return argument.replace(/\bSimplified(-| )?BSD((-| )License)?/i, "BSD-2-Clause");
},
function(argument) {
return argument.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i, "BSD-2-Clause-$1BSD");
},
function(argument) {
return argument.replace(/\bClear(-| )?BSD((-| )License)?/i, "BSD-3-Clause-Clear");
},
function(argument) {
return argument.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i, "BSD-4-Clause");
},
function(argument) {
return "CC-" + argument;
},
function(argument) {
return "CC-" + argument + "-4.0";
},
function(argument) {
return argument.replace("Attribution", "BY").replace("NonCommercial", "NC").replace("NoDerivatives", "ND").replace(/ (\d)/, "-$1").replace(/ ?International/, "");
},
function(argument) {
return "CC-" + argument.replace("Attribution", "BY").replace("NonCommercial", "NC").replace("NoDerivatives", "ND").replace(/ (\d)/, "-$1").replace(/ ?International/, "") + "-4.0";
}
];
var licensesWithVersions = spdxLicenseIds.map(function(id) {
var match4 = /^(.*)-\d+\.\d+$/.exec(id);
return match4 ? [match4[0], match4[1]] : [id, null];
}).reduce(function(objectMap, item2) {
var key = item2[1];
objectMap[key] = objectMap[key] || [];
objectMap[key].push(item2[0]);
return objectMap;
}, {});
var licensesWithOneVersion = Object.keys(licensesWithVersions).map(function makeEntries(key) {
return [key, licensesWithVersions[key]];
}).filter(function identifySoleVersions(item2) {
return item2[1].length === 1 && item2[0] !== null && item2[0] !== "APL";
}).map(function createLastResorts(item2) {
return [item2[0], item2[1][0]];
});
licensesWithVersions = void 0;
var lastResorts = [
["UNLI", "Unlicense"],
["WTF", "WTFPL"],
["2 CLAUSE", "BSD-2-Clause"],
["2-CLAUSE", "BSD-2-Clause"],
["3 CLAUSE", "BSD-3-Clause"],
["3-CLAUSE", "BSD-3-Clause"],
["AFFERO", "AGPL-3.0-or-later"],
["AGPL", "AGPL-3.0-or-later"],
["APACHE", "Apache-2.0"],
["ARTISTIC", "Artistic-2.0"],
["Affero", "AGPL-3.0-or-later"],
["BEER", "Beerware"],
["BOOST", "BSL-1.0"],
["BSD", "BSD-2-Clause"],
["CDDL", "CDDL-1.1"],
["ECLIPSE", "EPL-1.0"],
["FUCK", "WTFPL"],
["GNU", "GPL-3.0-or-later"],
["LGPL", "LGPL-3.0-or-later"],
["GPLV1", "GPL-1.0-only"],
["GPL-1", "GPL-1.0-only"],
["GPLV2", "GPL-2.0-only"],
["GPL-2", "GPL-2.0-only"],
["GPL", "GPL-3.0-or-later"],
["MIT +NO-FALSE-ATTRIBS", "MITNFA"],
["MIT", "MIT"],
["MPL", "MPL-2.0"],
["X11", "X11"],
["ZLIB", "Zlib"]
].concat(licensesWithOneVersion);
var SUBSTRING = 0;
var IDENTIFIER = 1;
var validTransformation = function(identifier) {
for (var i2 = 0; i2 < transforms.length; i2++) {
var transformed = transforms[i2](identifier).trim();
if (transformed !== identifier && valid(transformed)) {
return transformed;
}
}
return null;
};
var validLastResort = function(identifier) {
var upperCased = identifier.toUpperCase();
for (var i2 = 0; i2 < lastResorts.length; i2++) {
var lastResort = lastResorts[i2];
if (upperCased.indexOf(lastResort[SUBSTRING]) > -1) {
return lastResort[IDENTIFIER];
}
}
return null;
};
var anyCorrection = function(identifier, check3) {
for (var i2 = 0; i2 < transpositions.length; i2++) {
var transposition = transpositions[i2];
var transposed = transposition[TRANSPOSED];
if (identifier.indexOf(transposed) > -1) {
var corrected = identifier.replace(
transposed,
transposition[CORRECT]
);
var checked = check3(corrected);
if (checked !== null) {
return checked;
}
}
}
return null;
};
module2.exports = function(identifier, options2) {
options2 = options2 || {};
var upgrade = options2.upgrade === void 0 ? true : !!options2.upgrade;
function postprocess(value) {
return upgrade ? upgradeGPLs(value) : value;
}
var validArugment = typeof identifier === "string" && identifier.trim().length !== 0;
if (!validArugment) {
throw Error("Invalid argument. Expected non-empty string.");
}
identifier = identifier.trim();
if (valid(identifier)) {
return postprocess(identifier);
}
var noPlus = identifier.replace(/\+$/, "").trim();
if (valid(noPlus)) {
return postprocess(noPlus);
}
var transformed = validTransformation(identifier);
if (transformed !== null) {
return postprocess(transformed);
}
transformed = anyCorrection(identifier, function(argument) {
if (valid(argument)) {
return argument;
}
return validTransformation(argument);
});
if (transformed !== null) {
return postprocess(transformed);
}
transformed = validLastResort(identifier);
if (transformed !== null) {
return postprocess(transformed);
}
transformed = anyCorrection(identifier, validLastResort);
if (transformed !== null) {
return postprocess(transformed);
}
return null;
};
function upgradeGPLs(value) {
if ([
"GPL-1.0",
"LGPL-1.0",
"AGPL-1.0",
"GPL-2.0",
"LGPL-2.0",
"AGPL-2.0",
"LGPL-2.1"
].indexOf(value) !== -1) {
return value + "-only";
} else if ([
"GPL-1.0+",
"GPL-2.0+",
"GPL-3.0+",
"LGPL-2.0+",
"LGPL-2.1+",
"LGPL-3.0+",
"AGPL-1.0+",
"AGPL-3.0+"
].indexOf(value) !== -1) {
return value.replace(/\+$/, "-or-later");
} else if (["GPL-3.0", "LGPL-3.0", "AGPL-3.0"].indexOf(value) !== -1) {
return value + "-or-later";
} else {
return value;
}
}
}
});
// ../../node_modules/.pnpm/validate-npm-package-license@3.0.4/node_modules/validate-npm-package-license/index.js
var require_validate_npm_package_license = __commonJS({
"../../node_modules/.pnpm/validate-npm-package-license@3.0.4/node_modules/validate-npm-package-license/index.js"(exports2, module2) {
var parse3 = require_spdx_expression_parse();
var correct = require_spdx_correct();
var genericWarning = 'license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN <filename>"';
var fileReferenceRE = /^SEE LICEN[CS]E IN (.+)$/;
function startsWith(prefix, string) {
return string.slice(0, prefix.length) === prefix;
}
function usesLicenseRef(ast) {
if (ast.hasOwnProperty("license")) {
var license = ast.license;
return startsWith("LicenseRef", license) || startsWith("DocumentRef", license);
} else {
return usesLicenseRef(ast.left) || usesLicenseRef(ast.right);
}
}
module2.exports = function(argument) {
var ast;
try {
ast = parse3(argument);
} catch (e2) {
var match4;
if (argument === "UNLICENSED" || argument === "UNLICENCED") {
return {
validForOldPackages: true,
validForNewPackages: true,
unlicensed: true
};
} else if (match4 = fileReferenceRE.exec(argument)) {
return {
validForOldPackages: true,
validForNewPackages: true,
inFile: match4[1]
};
} else {
var result = {
validForOldPackages: false,
validForNewPackages: false,
warnings: [genericWarning]
};
if (argument.trim().length !== 0) {
var corrected = correct(argument);
if (corrected) {
result.warnings.push(
'license is similar to the valid expression "' + corrected + '"'
);
}
}
return result;
}
}
if (usesLicenseRef(ast)) {
return {
validForNewPackages: false,
validForOldPackages: false,
spdx: true,
warnings: [genericWarning]
};
} else {
return {
validForNewPackages: true,
validForOldPackages: true,
spdx: true
};
}
};
}
});
// ../../node_modules/.pnpm/hosted-git-info@2.8.9/node_modules/hosted-git-info/git-host-info.js
var require_git_host_info = __commonJS({
"../../node_modules/.pnpm/hosted-git-info@2.8.9/node_modules/hosted-git-info/git-host-info.js"(exports2, module2) {
"use strict";
var gitHosts = module2.exports = {
github: {
"protocols": ["git", "http", "git+ssh", "git+https", "ssh", "https"],
"domain": "github.com",
"treepath": "tree",
"filetemplate": "https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}",
"bugstemplate": "https://{domain}/{user}/{project}/issues",
"gittemplate": "git://{auth@}{domain}/{user}/{project}.git{#committish}",
"tarballtemplate": "https://codeload.{domain}/{user}/{project}/tar.gz/{committish}"
},
bitbucket: {
"protocols": ["git+ssh", "git+https", "ssh", "https"],
"domain": "bitbucket.org",
"treepath": "src",
"tarballtemplate": "https://{domain}/{user}/{project}/get/{committish}.tar.gz"
},
gitlab: {
"protocols": ["git+ssh", "git+https", "ssh", "https"],
"domain": "gitlab.com",
"treepath": "tree",
"bugstemplate": "https://{domain}/{user}/{project}/issues",
"httpstemplate": "git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}",
"tarballtemplate": "https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}",
"pathmatch": /^[/]([^/]+)[/]((?!.*(\/-\/|\/repository\/archive\.tar\.gz\?=.*|\/repository\/[^/]+\/archive.tar.gz$)).*?)(?:[.]git|[/])?$/
},
gist: {
"protocols": ["git", "git+ssh", "git+https", "ssh", "https"],
"domain": "gist.github.com",
"pathmatch": /^[/](?:([^/]+)[/])?([a-z0-9]{32,})(?:[.]git)?$/,
"filetemplate": "https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}",
"bugstemplate": "https://{domain}/{project}",
"gittemplate": "git://{domain}/{project}.git{#committish}",
"sshtemplate": "git@{domain}:/{project}.git{#committish}",
"sshurltemplate": "git+ssh://git@{domain}/{project}.git{#committish}",
"browsetemplate": "https://{domain}/{project}{/committish}",
"browsefiletemplate": "https://{domain}/{project}{/committish}{#path}",
"docstemplate": "https://{domain}/{project}{/committish}",
"httpstemplate": "git+https://{domain}/{project}.git{#committish}",
"shortcuttemplate": "{type}:{project}{#committish}",
"pathtemplate": "{project}{#committish}",
"tarballtemplate": "https://codeload.github.com/gist/{project}/tar.gz/{committish}",
"hashformat": function(fragment) {
return "file-" + formatHashFragment(fragment);
}
}
};
var gitHostDefaults = {
"sshtemplate": "git@{domain}:{user}/{project}.git{#committish}",
"sshurltemplate": "git+ssh://git@{domain}/{user}/{project}.git{#committish}",
"browsetemplate": "https://{domain}/{user}/{project}{/tree/committish}",
"browsefiletemplate": "https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}",
"docstemplate": "https://{domain}/{user}/{project}{/tree/committish}#readme",
"httpstemplate": "git+https://{auth@}{domain}/{user}/{project}.git{#committish}",
"filetemplate": "https://{domain}/{user}/{project}/raw/{committish}/{path}",
"shortcuttemplate": "{type}:{user}/{project}{#committish}",
"pathtemplate": "{user}/{project}{#committish}",
"pathmatch": /^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/,
"hashformat": formatHashFragment
};
Object.keys(gitHosts).forEach(function(name) {
Object.keys(gitHostDefaults).forEach(function(key) {
if (gitHosts[name][key])
return;
gitHosts[name][key] = gitHostDefaults[key];
});
gitHosts[name].protocols_re = RegExp("^(" + gitHosts[name].protocols.map(function(protocol) {
return protocol.replace(/([\\+*{}()[\]$^|])/g, "\\$1");
}).join("|") + "):$");
});
function formatHashFragment(fragment) {
return fragment.toLowerCase().replace(/^\W+|\/|\W+$/g, "").replace(/\W+/g, "-");
}
}
});
// ../../node_modules/.pnpm/hosted-git-info@2.8.9/node_modules/hosted-git-info/git-host.js
var require_git_host = __commonJS({
"../../node_modules/.pnpm/hosted-git-info@2.8.9/node_modules/hosted-git-info/git-host.js"(exports2, module2) {
"use strict";
var gitHosts = require_git_host_info();
var extend = Object.assign || function _extend(target, source) {
if (source === null || typeof source !== "object")
return target;
var keys = Object.keys(source);
var i2 = keys.length;
while (i2--) {
target[keys[i2]] = source[keys[i2]];
}
return target;
};
module2.exports = GitHost;
function GitHost(type, user, auth, project, committish, defaultRepresentation, opts2) {
var gitHostInfo = this;
gitHostInfo.type = type;
Object.keys(gitHosts[type]).forEach(function(key) {
gitHostInfo[key] = gitHosts[type][key];
});
gitHostInfo.user = user;
gitHostInfo.auth = auth;
gitHostInfo.project = project;
gitHostInfo.committish = committish;
gitHostInfo.default = defaultRepresentation;
gitHostInfo.opts = opts2 || {};
}
GitHost.prototype.hash = function() {
return this.committish ? "#" + this.committish : "";
};
GitHost.prototype._fill = function(template, opts2) {
if (!template)
return;
var vars = extend({}, opts2);
vars.path = vars.path ? vars.path.replace(/^[/]+/g, "") : "";
opts2 = extend(extend({}, this.opts), opts2);
var self2 = this;
Object.keys(this).forEach(function(key) {
if (self2[key] != null && vars[key] == null)
vars[key] = self2[key];
});
var rawAuth = vars.auth;
var rawcommittish = vars.committish;
var rawFragment = vars.fragment;
var rawPath = vars.path;
var rawProject = vars.project;
Object.keys(vars).forEach(function(key) {
var value = vars[key];
if ((key === "path" || key === "project") && typeof value === "string") {
vars[key] = value.split("/").map(function(pathComponent) {
return encodeURIComponent(pathComponent);
}).join("/");
} else {
vars[key] = encodeURIComponent(value);
}
});
vars["auth@"] = rawAuth ? rawAuth + "@" : "";
vars["#fragment"] = rawFragment ? "#" + this.hashformat(rawFragment) : "";
vars.fragment = vars.fragment ? vars.fragment : "";
vars["#path"] = rawPath ? "#" + this.hashformat(rawPath) : "";
vars["/path"] = vars.path ? "/" + vars.path : "";
vars.projectPath = rawProject.split("/").map(encodeURIComponent).join("/");
if (opts2.noCommittish) {
vars["#committish"] = "";
vars["/tree/committish"] = "";
vars["/committish"] = "";
vars.committish = "";
} else {
vars["#committish"] = rawcommittish ? "#" + rawcommittish : "";
vars["/tree/committish"] = vars.committish ? "/" + vars.treepath + "/" + vars.committish : "";
vars["/committish"] = vars.committish ? "/" + vars.committish : "";
vars.committish = vars.committish || "master";
}
var res = template;
Object.keys(vars).forEach(function(key) {
res = res.replace(new RegExp("[{]" + key + "[}]", "g"), vars[key]);
});
if (opts2.noGitPlus) {
return res.replace(/^git[+]/, "");
} else {
return res;
}
};
GitHost.prototype.ssh = function(opts2) {
return this._fill(this.sshtemplate, opts2);
};
GitHost.prototype.sshurl = function(opts2) {
return this._fill(this.sshurltemplate, opts2);
};
GitHost.prototype.browse = function(P, F, opts2) {
if (typeof P === "string") {
if (typeof F !== "string") {
opts2 = F;
F = null;
}
return this._fill(this.browsefiletemplate, extend({
fragment: F,
path: P
}, opts2));
} else {
return this._fill(this.browsetemplate, P);
}
};
GitHost.prototype.docs = function(opts2) {
return this._fill(this.docstemplate, opts2);
};
GitHost.prototype.bugs = function(opts2) {
return this._fill(this.bugstemplate, opts2);
};
GitHost.prototype.https = function(opts2) {
return this._fill(this.httpstemplate, opts2);
};
GitHost.prototype.git = function(opts2) {
return this._fill(this.gittemplate, opts2);
};
GitHost.prototype.shortcut = function(opts2) {
return this._fill(this.shortcuttemplate, opts2);
};
GitHost.prototype.path = function(opts2) {
return this._fill(this.pathtemplate, opts2);
};
GitHost.prototype.tarball = function(opts_) {
var opts2 = extend({}, opts_, { noCommittish: false });
return this._fill(this.tarballtemplate, opts2);
};
GitHost.prototype.file = function(P, opts2) {
return this._fill(this.filetemplate, extend({ path: P }, opts2));
};
GitHost.prototype.getDefaultRepresentation = function() {
return this.default;
};
GitHost.prototype.toString = function(opts2) {
if (this.default && typeof this[this.default] === "function")
return this[this.default](opts2);
return this.sshurl(opts2);
};
}
});
// ../../node_modules/.pnpm/hosted-git-info@2.8.9/node_modules/hosted-git-info/index.js
var require_hosted_git_info = __commonJS({
"../../node_modules/.pnpm/hosted-git-info@2.8.9/node_modules/hosted-git-info/index.js"(exports2, module2) {
"use strict";
var url2 = require("url");
var gitHosts = require_git_host_info();
var GitHost = module2.exports = require_git_host();
var protocolToRepresentationMap = {
"git+ssh:": "sshurl",
"git+https:": "https",
"ssh:": "sshurl",
"git:": "git"
};
function protocolToRepresentation(protocol) {
return protocolToRepresentationMap[protocol] || protocol.slice(0, -1);
}
var authProtocols = {
"git:": true,
"https:": true,
"git+https:": true,
"http:": true,
"git+http:": true
};
var cache = {};
module2.exports.fromUrl = function(giturl, opts2) {
if (typeof giturl !== "string")
return;
var key = giturl + JSON.stringify(opts2 || {});
if (!(key in cache)) {
cache[key] = fromUrl(giturl, opts2);
}
return cache[key];
};
function fromUrl(giturl, opts2) {
if (giturl == null || giturl === "")
return;
var url3 = fixupUnqualifiedGist(
isGitHubShorthand(giturl) ? "github:" + giturl : giturl
);
var parsed = parseGitUrl(url3);
var shortcutMatch = url3.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/);
var matches = Object.keys(gitHosts).map(function(gitHostName) {
try {
var gitHostInfo = gitHosts[gitHostName];
var auth = null;
if (parsed.auth && authProtocols[parsed.protocol]) {
auth = parsed.auth;
}
var committish = parsed.hash ? decodeURIComponent(parsed.hash.substr(1)) : null;
var user = null;
var project = null;
var defaultRepresentation = null;
if (shortcutMatch && shortcutMatch[1] === gitHostName) {
user = shortcutMatch[2] && decodeURIComponent(shortcutMatch[2]);
project = decodeURIComponent(shortcutMatch[3].replace(/\.git$/, ""));
defaultRepresentation = "shortcut";
} else {
if (parsed.host && parsed.host !== gitHostInfo.domain && parsed.host.replace(/^www[.]/, "") !== gitHostInfo.domain)
return;
if (!gitHostInfo.protocols_re.test(parsed.protocol))
return;
if (!parsed.path)
return;
var pathmatch = gitHostInfo.pathmatch;
var matched = parsed.path.match(pathmatch);
if (!matched)
return;
if (matched[1] !== null && matched[1] !== void 0) {
user = decodeURIComponent(matched[1].replace(/^:/, ""));
}
project = decodeURIComponent(matched[2]);
defaultRepresentation = protocolToRepresentation(parsed.protocol);
}
return new GitHost(gitHostName, user, auth, project, committish, defaultRepresentation, opts2);
} catch (ex) {
if (ex instanceof URIError) {
} else
throw ex;
}
}).filter(function(gitHostInfo) {
return gitHostInfo;
});
if (matches.length !== 1)
return;
return matches[0];
}
function isGitHubShorthand(arg2) {
return /^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(arg2);
}
function fixupUnqualifiedGist(giturl) {
var parsed = url2.parse(giturl);
if (parsed.protocol === "gist:" && parsed.host && !parsed.path) {
return parsed.protocol + "/" + parsed.host;
} else {
return giturl;
}
}
function parseGitUrl(giturl) {
var matched = giturl.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/);
if (!matched) {
var legacy = url2.parse(giturl);
if (legacy.auth && typeof url2.URL === "function") {
var authmatch = giturl.match(/[^@]+@[^:/]+/);
if (authmatch) {
var whatwg = new url2.URL(authmatch[0]);
legacy.auth = whatwg.username || "";
if (whatwg.password)
legacy.auth += ":" + whatwg.password;
}
}
return legacy;
}
return {
protocol: "git+ssh:",
slashes: true,
auth: matched[1],
host: matched[2],
port: null,
hostname: matched[2],
hash: matched[4],
search: null,
query: null,
pathname: "/" + matched[3],
path: "/" + matched[3],
href: "git+ssh://" + matched[1] + "@" + matched[2] + "/" + matched[3] + (matched[4] || "")
};
}
}
});
// ../../node_modules/.pnpm/resolve@1.22.2/node_modules/resolve/lib/homedir.js
var require_homedir = __commonJS({
"../../node_modules/.pnpm/resolve@1.22.2/node_modules/resolve/lib/homedir.js"(exports2, module2) {
"use strict";
var os7 = require("os");
module2.exports = os7.homedir || function homedir2() {
var home2 = process.env.HOME;
var user = process.env.LOGNAME || process.env.USER || process.env.LNAME || process.env.USERNAME;
if (process.platform === "win32") {
return process.env.USERPROFILE || process.env.HOMEDRIVE + process.env.HOMEPATH || home2 || null;
}
if (process.platform === "darwin") {
return home2 || (user ? "/Users/" + user : null);
}
if (process.platform === "linux") {
return home2 || (process.getuid() === 0 ? "/root" : user ? "/home/" + user : null);
}
return home2 || null;
};
}
});
// ../../node_modules/.pnpm/resolve@1.22.2/node_modules/resolve/lib/caller.js
var require_caller = __commonJS({
"../../node_modules/.pnpm/resolve@1.22.2/node_modules/resolve/lib/caller.js"(exports2, module2) {
module2.exports = function() {
var origPrepareStackTrace = Error.prepareStackTrace;
Error.prepareStackTrace = function(_2, stack3) {
return stack3;
};
var stack2 = new Error().stack;
Error.prepareStackTrace = origPrepareStackTrace;
return stack2[2].getFileName();
};
}
});
// ../../node_modules/.pnpm/path-parse@1.0.7/node_modules/path-parse/index.js
var require_path_parse = __commonJS({
"../../node_modules/.pnpm/path-parse@1.0.7/node_modules/path-parse/index.js"(exports2, module2) {
"use strict";
var isWindows3 = process.platform === "win32";
var splitWindowsRe = /^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/;
var win32 = {};
function win32SplitPath(filename) {
return splitWindowsRe.exec(filename).slice(1);
}
win32.parse = function(pathString) {
if (typeof pathString !== "string") {
throw new TypeError(
"Parameter 'pathString' must be a string, not " + typeof pathString
);
}
var allParts = win32SplitPath(pathString);
if (!allParts || allParts.length !== 5) {
throw new TypeError("Invalid path '" + pathString + "'");
}
return {
root: allParts[1],
dir: allParts[0] === allParts[1] ? allParts[0] : allParts[0].slice(0, -1),
base: allParts[2],
ext: allParts[4],
name: allParts[3]
};
};
var splitPathRe = /^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/;
var posix2 = {};
function posixSplitPath(filename) {
return splitPathRe.exec(filename).slice(1);
}
posix2.parse = function(pathString) {
if (typeof pathString !== "string") {
throw new TypeError(
"Parameter 'pathString' must be a string, not " + typeof pathString
);
}
var allParts = posixSplitPath(pathString);
if (!allParts || allParts.length !== 5) {
throw new TypeError("Invalid path '" + pathString + "'");
}
return {
root: allParts[1],
dir: allParts[0].slice(0, -1),
base: allParts[2],
ext: allParts[4],
name: allParts[3]
};
};
if (isWindows3)
module2.exports = win32.parse;
else
module2.exports = posix2.parse;
module2.exports.posix = posix2.parse;
module2.exports.win32 = win32.parse;
}
});
// ../../node_modules/.pnpm/resolve@1.22.2/node_modules/resolve/lib/node-modules-paths.js
var require_node_modules_paths = __commonJS({
"../../node_modules/.pnpm/resolve@1.22.2/node_modules/resolve/lib/node-modules-paths.js"(exports2, module2) {
var path38 = require("path");
var parse3 = path38.parse || require_path_parse();
var getNodeModulesDirs = function getNodeModulesDirs2(absoluteStart, modules) {
var prefix = "/";
if (/^([A-Za-z]:)/.test(absoluteStart)) {
prefix = "";
} else if (/^\\\\/.test(absoluteStart)) {
prefix = "\\\\";
}
var paths2 = [absoluteStart];
var parsed = parse3(absoluteStart);
while (parsed.dir !== paths2[paths2.length - 1]) {
paths2.push(parsed.dir);
parsed = parse3(parsed.dir);
}
return paths2.reduce(function(dirs, aPath) {
return dirs.concat(modules.map(function(moduleDir) {
return path38.resolve(prefix, aPath, moduleDir);
}));
}, []);
};
module2.exports = function nodeModulesPaths(start, opts2, request2) {
var modules = opts2 && opts2.moduleDirectory ? [].concat(opts2.moduleDirectory) : ["node_modules"];
if (opts2 && typeof opts2.paths === "function") {
return opts2.paths(
request2,
start,
function() {
return getNodeModulesDirs(start, modules);
},
opts2
);
}
var dirs = getNodeModulesDirs(start, modules);
return opts2 && opts2.paths ? dirs.concat(opts2.paths) : dirs;
};
}
});
// ../../node_modules/.pnpm/resolve@1.22.2/node_modules/resolve/lib/normalize-options.js
var require_normalize_options = __commonJS({
"../../node_modules/.pnpm/resolve@1.22.2/node_modules/resolve/lib/normalize-options.js"(exports2, module2) {
module2.exports = function(x, opts2) {
return opts2 || {};
};
}
});
// ../../node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js
var require_implementation = __commonJS({
"../../node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js"(exports2, module2) {
"use strict";
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
var slice = Array.prototype.slice;
var toStr = Object.prototype.toString;
var funcType = "[object Function]";
module2.exports = function bind2(that) {
var target = this;
if (typeof target !== "function" || toStr.call(target) !== funcType) {
throw new TypeError(ERROR_MESSAGE + target);
}
var args3 = slice.call(arguments, 1);
var bound;
var binder = function() {
if (this instanceof bound) {
var result = target.apply(
this,
args3.concat(slice.call(arguments))
);
if (Object(result) === result) {
return result;
}
return this;
} else {
return target.apply(
that,
args3.concat(slice.call(arguments))
);
}
};
var boundLength = Math.max(0, target.length - args3.length);
var boundArgs = [];
for (var i2 = 0; i2 < boundLength; i2++) {
boundArgs.push("$" + i2);
}
bound = Function("binder", "return function (" + boundArgs.join(",") + "){ return binder.apply(this,arguments); }")(binder);
if (target.prototype) {
var Empty = function Empty2() {
};
Empty.prototype = target.prototype;
bound.prototype = new Empty();
Empty.prototype = null;
}
return bound;
};
}
});
// ../../node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js
var require_function_bind = __commonJS({
"../../node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js"(exports2, module2) {
"use strict";
var implementation = require_implementation();
module2.exports = Function.prototype.bind || implementation;
}
});
// ../../node_modules/.pnpm/has@1.0.3/node_modules/has/src/index.js
var require_src2 = __commonJS({
"../../node_modules/.pnpm/has@1.0.3/node_modules/has/src/index.js"(exports2, module2) {
"use strict";
var bind2 = require_function_bind();
module2.exports = bind2.call(Function.call, Object.prototype.hasOwnProperty);
}
});
// ../../node_modules/.pnpm/is-core-module@2.11.0/node_modules/is-core-module/core.json
var require_core2 = __commonJS({
"../../node_modules/.pnpm/is-core-module@2.11.0/node_modules/is-core-module/core.json"(exports2, module2) {
module2.exports = {
assert: true,
"node:assert": [">= 14.18 && < 15", ">= 16"],
"assert/strict": ">= 15",
"node:assert/strict": ">= 16",
async_hooks: ">= 8",
"node:async_hooks": [">= 14.18 && < 15", ">= 16"],
buffer_ieee754: ">= 0.5 && < 0.9.7",
buffer: true,
"node:buffer": [">= 14.18 && < 15", ">= 16"],
child_process: true,
"node:child_process": [">= 14.18 && < 15", ">= 16"],
cluster: ">= 0.5",
"node:cluster": [">= 14.18 && < 15", ">= 16"],
console: true,
"node:console": [">= 14.18 && < 15", ">= 16"],
constants: true,
"node:constants": [">= 14.18 && < 15", ">= 16"],
crypto: true,
"node:crypto": [">= 14.18 && < 15", ">= 16"],
_debug_agent: ">= 1 && < 8",
_debugger: "< 8",
dgram: true,
"node:dgram": [">= 14.18 && < 15", ">= 16"],
diagnostics_channel: [">= 14.17 && < 15", ">= 15.1"],
"node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"],
dns: true,
"node:dns": [">= 14.18 && < 15", ">= 16"],
"dns/promises": ">= 15",
"node:dns/promises": ">= 16",
domain: ">= 0.7.12",
"node:domain": [">= 14.18 && < 15", ">= 16"],
events: true,
"node:events": [">= 14.18 && < 15", ">= 16"],
freelist: "< 6",
fs: true,
"node:fs": [">= 14.18 && < 15", ">= 16"],
"fs/promises": [">= 10 && < 10.1", ">= 14"],
"node:fs/promises": [">= 14.18 && < 15", ">= 16"],
_http_agent: ">= 0.11.1",
"node:_http_agent": [">= 14.18 && < 15", ">= 16"],
_http_client: ">= 0.11.1",
"node:_http_client": [">= 14.18 && < 15", ">= 16"],
_http_common: ">= 0.11.1",
"node:_http_common": [">= 14.18 && < 15", ">= 16"],
_http_incoming: ">= 0.11.1",
"node:_http_incoming": [">= 14.18 && < 15", ">= 16"],
_http_outgoing: ">= 0.11.1",
"node:_http_outgoing": [">= 14.18 && < 15", ">= 16"],
_http_server: ">= 0.11.1",
"node:_http_server": [">= 14.18 && < 15", ">= 16"],
http: true,
"node:http": [">= 14.18 && < 15", ">= 16"],
http2: ">= 8.8",
"node:http2": [">= 14.18 && < 15", ">= 16"],
https: true,
"node:https": [">= 14.18 && < 15", ">= 16"],
inspector: ">= 8",
"node:inspector": [">= 14.18 && < 15", ">= 16"],
"inspector/promises": [">= 19"],
"node:inspector/promises": [">= 19"],
_linklist: "< 8",
module: true,
"node:module": [">= 14.18 && < 15", ">= 16"],
net: true,
"node:net": [">= 14.18 && < 15", ">= 16"],
"node-inspect/lib/_inspect": ">= 7.6 && < 12",
"node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12",
"node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12",
os: true,
"node:os": [">= 14.18 && < 15", ">= 16"],
path: true,
"node:path": [">= 14.18 && < 15", ">= 16"],
"path/posix": ">= 15.3",
"node:path/posix": ">= 16",
"path/win32": ">= 15.3",
"node:path/win32": ">= 16",
perf_hooks: ">= 8.5",
"node:perf_hooks": [">= 14.18 && < 15", ">= 16"],
process: ">= 1",
"node:process": [">= 14.18 && < 15", ">= 16"],
punycode: ">= 0.5",
"node:punycode": [">= 14.18 && < 15", ">= 16"],
querystring: true,
"node:querystring": [">= 14.18 && < 15", ">= 16"],
readline: true,
"node:readline": [">= 14.18 && < 15", ">= 16"],
"readline/promises": ">= 17",
"node:readline/promises": ">= 17",
repl: true,
"node:repl": [">= 14.18 && < 15", ">= 16"],
smalloc: ">= 0.11.5 && < 3",
_stream_duplex: ">= 0.9.4",
"node:_stream_duplex": [">= 14.18 && < 15", ">= 16"],
_stream_transform: ">= 0.9.4",
"node:_stream_transform": [">= 14.18 && < 15", ">= 16"],
_stream_wrap: ">= 1.4.1",
"node:_stream_wrap": [">= 14.18 && < 15", ">= 16"],
_stream_passthrough: ">= 0.9.4",
"node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"],
_stream_readable: ">= 0.9.4",
"node:_stream_readable": [">= 14.18 && < 15", ">= 16"],
_stream_writable: ">= 0.9.4",
"node:_stream_writable": [">= 14.18 && < 15", ">= 16"],
stream: true,
"node:stream": [">= 14.18 && < 15", ">= 16"],
"stream/consumers": ">= 16.7",
"node:stream/consumers": ">= 16.7",
"stream/promises": ">= 15",
"node:stream/promises": ">= 16",
"stream/web": ">= 16.5",
"node:stream/web": ">= 16.5",
string_decoder: true,
"node:string_decoder": [">= 14.18 && < 15", ">= 16"],
sys: [">= 0.4 && < 0.7", ">= 0.8"],
"node:sys": [">= 14.18 && < 15", ">= 16"],
"node:test": [">= 16.17 && < 17", ">= 18"],
timers: true,
"node:timers": [">= 14.18 && < 15", ">= 16"],
"timers/promises": ">= 15",
"node:timers/promises": ">= 16",
_tls_common: ">= 0.11.13",
"node:_tls_common": [">= 14.18 && < 15", ">= 16"],
_tls_legacy: ">= 0.11.3 && < 10",
_tls_wrap: ">= 0.11.3",
"node:_tls_wrap": [">= 14.18 && < 15", ">= 16"],
tls: true,
"node:tls": [">= 14.18 && < 15", ">= 16"],
trace_events: ">= 10",
"node:trace_events": [">= 14.18 && < 15", ">= 16"],
tty: true,
"node:tty": [">= 14.18 && < 15", ">= 16"],
url: true,
"node:url": [">= 14.18 && < 15", ">= 16"],
util: true,
"node:util": [">= 14.18 && < 15", ">= 16"],
"util/types": ">= 15.3",
"node:util/types": ">= 16",
"v8/tools/arguments": ">= 10 && < 12",
"v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"],
"v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"],
"v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"],
"v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"],
"v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"],
"v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"],
v8: ">= 1",
"node:v8": [">= 14.18 && < 15", ">= 16"],
vm: true,
"node:vm": [">= 14.18 && < 15", ">= 16"],
wasi: ">= 13.4 && < 13.5",
worker_threads: ">= 11.7",
"node:worker_threads": [">= 14.18 && < 15", ">= 16"],
zlib: ">= 0.5",
"node:zlib": [">= 14.18 && < 15", ">= 16"]
};
}
});
// ../../node_modules/.pnpm/is-core-module@2.11.0/node_modules/is-core-module/index.js
var require_is_core_module = __commonJS({
"../../node_modules/.pnpm/is-core-module@2.11.0/node_modules/is-core-module/index.js"(exports2, module2) {
"use strict";
var has = require_src2();
function specifierIncluded(current, specifier) {
var nodeParts = current.split(".");
var parts = specifier.split(" ");
var op = parts.length > 1 ? parts[0] : "=";
var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split(".");
for (var i2 = 0; i2 < 3; ++i2) {
var cur = parseInt(nodeParts[i2] || 0, 10);
var ver = parseInt(versionParts[i2] || 0, 10);
if (cur === ver) {
continue;
}
if (op === "<") {
return cur < ver;
}
if (op === ">=") {
return cur >= ver;
}
return false;
}
return op === ">=";
}
function matchesRange(current, range2) {
var specifiers = range2.split(/ ?&& ?/);
if (specifiers.length === 0) {
return false;
}
for (var i2 = 0; i2 < specifiers.length; ++i2) {
if (!specifierIncluded(current, specifiers[i2])) {
return false;
}
}
return true;
}
function versionIncluded(nodeVersion, specifierValue) {
if (typeof specifierValue === "boolean") {
return specifierValue;
}
var current = typeof nodeVersion === "undefined" ? process.versions && process.versions.node : nodeVersion;
if (typeof current !== "string") {
throw new TypeError(typeof nodeVersion === "undefined" ? "Unable to determine current node version" : "If provided, a valid node version is required");
}
if (specifierValue && typeof specifierValue === "object") {
for (var i2 = 0; i2 < specifierValue.length; ++i2) {
if (matchesRange(current, specifierValue[i2])) {
return true;
}
}
return false;
}
return matchesRange(current, specifierValue);
}
var data = require_core2();
module2.exports = function isCore(x, nodeVersion) {
return has(data, x) && versionIncluded(nodeVersion, data[x]);
};
}
});
// ../../node_modules/.pnpm/resolve@1.22.2/node_modules/resolve/lib/async.js
var require_async = __commonJS({
"../../node_modules/.pnpm/resolve@1.22.2/node_modules/resolve/lib/async.js"(exports2, module2) {
var fs40 = require("fs");
var getHomedir = require_homedir();
var path38 = require("path");
var caller = require_caller();
var nodeModulesPaths = require_node_modules_paths();
var normalizeOptions = require_normalize_options();
var isCore = require_is_core_module();
var realpathFS = process.platform !== "win32" && fs40.realpath && typeof fs40.realpath.native === "function" ? fs40.realpath.native : fs40.realpath;
var homedir2 = getHomedir();
var defaultPaths = function() {
return [
path38.join(homedir2, ".node_modules"),
path38.join(homedir2, ".node_libraries")
];
};
var defaultIsFile = function isFile(file2, cb) {
fs40.stat(file2, function(err, stat) {
if (!err) {
return cb(null, stat.isFile() || stat.isFIFO());
}
if (err.code === "ENOENT" || err.code === "ENOTDIR")
return cb(null, false);
return cb(err);
});
};
var defaultIsDir = function isDirectory(dir3, cb) {
fs40.stat(dir3, function(err, stat) {
if (!err) {
return cb(null, stat.isDirectory());
}
if (err.code === "ENOENT" || err.code === "ENOTDIR")
return cb(null, false);
return cb(err);
});
};
var defaultRealpath = function realpath(x, cb) {
realpathFS(x, function(realpathErr, realPath2) {
if (realpathErr && realpathErr.code !== "ENOENT")
cb(realpathErr);
else
cb(null, realpathErr ? x : realPath2);
});
};
var maybeRealpath = function maybeRealpath2(realpath, x, opts2, cb) {
if (opts2 && opts2.preserveSymlinks === false) {
realpath(x, cb);
} else {
cb(null, x);
}
};
var defaultReadPackage = function defaultReadPackage2(readFile2, pkgfile, cb) {
readFile2(pkgfile, function(readFileErr, body) {
if (readFileErr)
cb(readFileErr);
else {
try {
var pkg2 = JSON.parse(body);
cb(null, pkg2);
} catch (jsonErr) {
cb(null);
}
}
});
};
var getPackageCandidates = function getPackageCandidates2(x, start, opts2) {
var dirs = nodeModulesPaths(start, opts2, x);
for (var i2 = 0; i2 < dirs.length; i2++) {
dirs[i2] = path38.join(dirs[i2], x);
}
return dirs;
};
module2.exports = function resolve3(x, options2, callback) {
var cb = callback;
var opts2 = options2;
if (typeof options2 === "function") {
cb = opts2;
opts2 = {};
}
if (typeof x !== "string") {
var err = new TypeError("Path must be a string.");
return process.nextTick(function() {
cb(err);
});
}
opts2 = normalizeOptions(x, opts2);
var isFile = opts2.isFile || defaultIsFile;
var isDirectory = opts2.isDirectory || defaultIsDir;
var readFile2 = opts2.readFile || fs40.readFile;
var realpath = opts2.realpath || defaultRealpath;
var readPackage = opts2.readPackage || defaultReadPackage;
if (opts2.readFile && opts2.readPackage) {
var conflictErr = new TypeError("`readFile` and `readPackage` are mutually exclusive.");
return process.nextTick(function() {
cb(conflictErr);
});
}
var packageIterator = opts2.packageIterator;
var extensions = opts2.extensions || [".js"];
var includeCoreModules = opts2.includeCoreModules !== false;
var basedir = opts2.basedir || path38.dirname(caller());
var parent2 = opts2.filename || basedir;
opts2.paths = opts2.paths || defaultPaths();
var absoluteStart = path38.resolve(basedir);
maybeRealpath(
realpath,
absoluteStart,
opts2,
function(err2, realStart) {
if (err2)
cb(err2);
else
init3(realStart);
}
);
var res;
function init3(basedir2) {
if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) {
res = path38.resolve(basedir2, x);
if (x === "." || x === ".." || x.slice(-1) === "/")
res += "/";
if (/\/$/.test(x) && res === basedir2) {
loadAsDirectory(res, opts2.package, onfile);
} else
loadAsFile(res, opts2.package, onfile);
} else if (includeCoreModules && isCore(x)) {
return cb(null, x);
} else
loadNodeModules(x, basedir2, function(err2, n2, pkg2) {
if (err2)
cb(err2);
else if (n2) {
return maybeRealpath(realpath, n2, opts2, function(err3, realN) {
if (err3) {
cb(err3);
} else {
cb(null, realN, pkg2);
}
});
} else {
var moduleError = new Error("Cannot find module '" + x + "' from '" + parent2 + "'");
moduleError.code = "MODULE_NOT_FOUND";
cb(moduleError);
}
});
}
function onfile(err2, m3, pkg2) {
if (err2)
cb(err2);
else if (m3)
cb(null, m3, pkg2);
else
loadAsDirectory(res, function(err3, d3, pkg3) {
if (err3)
cb(err3);
else if (d3) {
maybeRealpath(realpath, d3, opts2, function(err4, realD) {
if (err4) {
cb(err4);
} else {
cb(null, realD, pkg3);
}
});
} else {
var moduleError = new Error("Cannot find module '" + x + "' from '" + parent2 + "'");
moduleError.code = "MODULE_NOT_FOUND";
cb(moduleError);
}
});
}
function loadAsFile(x2, thePackage, callback2) {
var loadAsFilePackage = thePackage;
var cb2 = callback2;
if (typeof loadAsFilePackage === "function") {
cb2 = loadAsFilePackage;
loadAsFilePackage = void 0;
}
var exts = [""].concat(extensions);
load(exts, x2, loadAsFilePackage);
function load(exts2, x3, loadPackage) {
if (exts2.length === 0)
return cb2(null, void 0, loadPackage);
var file2 = x3 + exts2[0];
var pkg2 = loadPackage;
if (pkg2)
onpkg(null, pkg2);
else
loadpkg(path38.dirname(file2), onpkg);
function onpkg(err2, pkg_, dir3) {
pkg2 = pkg_;
if (err2)
return cb2(err2);
if (dir3 && pkg2 && opts2.pathFilter) {
var rfile = path38.relative(dir3, file2);
var rel = rfile.slice(0, rfile.length - exts2[0].length);
var r2 = opts2.pathFilter(pkg2, x3, rel);
if (r2)
return load(
[""].concat(extensions.slice()),
path38.resolve(dir3, r2),
pkg2
);
}
isFile(file2, onex);
}
function onex(err2, ex) {
if (err2)
return cb2(err2);
if (ex)
return cb2(null, file2, pkg2);
load(exts2.slice(1), x3, pkg2);
}
}
}
function loadpkg(dir3, cb2) {
if (dir3 === "" || dir3 === "/")
return cb2(null);
if (process.platform === "win32" && /^\w:[/\\]*$/.test(dir3)) {
return cb2(null);
}
if (/[/\\]node_modules[/\\]*$/.test(dir3))
return cb2(null);
maybeRealpath(realpath, dir3, opts2, function(unwrapErr, pkgdir) {
if (unwrapErr)
return loadpkg(path38.dirname(dir3), cb2);
var pkgfile = path38.join(pkgdir, "package.json");
isFile(pkgfile, function(err2, ex) {
if (!ex)
return loadpkg(path38.dirname(dir3), cb2);
readPackage(readFile2, pkgfile, function(err3, pkgParam) {
if (err3)
cb2(err3);
var pkg2 = pkgParam;
if (pkg2 && opts2.packageFilter) {
pkg2 = opts2.packageFilter(pkg2, pkgfile);
}
cb2(null, pkg2, dir3);
});
});
});
}
function loadAsDirectory(x2, loadAsDirectoryPackage, callback2) {
var cb2 = callback2;
var fpkg = loadAsDirectoryPackage;
if (typeof fpkg === "function") {
cb2 = fpkg;
fpkg = opts2.package;
}
maybeRealpath(realpath, x2, opts2, function(unwrapErr, pkgdir) {
if (unwrapErr)
return cb2(unwrapErr);
var pkgfile = path38.join(pkgdir, "package.json");
isFile(pkgfile, function(err2, ex) {
if (err2)
return cb2(err2);
if (!ex)
return loadAsFile(path38.join(x2, "index"), fpkg, cb2);
readPackage(readFile2, pkgfile, function(err3, pkgParam) {
if (err3)
return cb2(err3);
var pkg2 = pkgParam;
if (pkg2 && opts2.packageFilter) {
pkg2 = opts2.packageFilter(pkg2, pkgfile);
}
if (pkg2 && pkg2.main) {
if (typeof pkg2.main !== "string") {
var mainError = new TypeError("package \u201C" + pkg2.name + "\u201D `main` must be a string");
mainError.code = "INVALID_PACKAGE_MAIN";
return cb2(mainError);
}
if (pkg2.main === "." || pkg2.main === "./") {
pkg2.main = "index";
}
loadAsFile(path38.resolve(x2, pkg2.main), pkg2, function(err4, m3, pkg3) {
if (err4)
return cb2(err4);
if (m3)
return cb2(null, m3, pkg3);
if (!pkg3)
return loadAsFile(path38.join(x2, "index"), pkg3, cb2);
var dir3 = path38.resolve(x2, pkg3.main);
loadAsDirectory(dir3, pkg3, function(err5, n2, pkg4) {
if (err5)
return cb2(err5);
if (n2)
return cb2(null, n2, pkg4);
loadAsFile(path38.join(x2, "index"), pkg4, cb2);
});
});
return;
}
loadAsFile(path38.join(x2, "/index"), pkg2, cb2);
});
});
});
}
function processDirs(cb2, dirs) {
if (dirs.length === 0)
return cb2(null, void 0);
var dir3 = dirs[0];
isDirectory(path38.dirname(dir3), isdir);
function isdir(err2, isdir2) {
if (err2)
return cb2(err2);
if (!isdir2)
return processDirs(cb2, dirs.slice(1));
loadAsFile(dir3, opts2.package, onfile2);
}
function onfile2(err2, m3, pkg2) {
if (err2)
return cb2(err2);
if (m3)
return cb2(null, m3, pkg2);
loadAsDirectory(dir3, opts2.package, ondir);
}
function ondir(err2, n2, pkg2) {
if (err2)
return cb2(err2);
if (n2)
return cb2(null, n2, pkg2);
processDirs(cb2, dirs.slice(1));
}
}
function loadNodeModules(x2, start, cb2) {
var thunk = function() {
return getPackageCandidates(x2, start, opts2);
};
processDirs(
cb2,
packageIterator ? packageIterator(x2, start, thunk, opts2) : thunk()
);
}
};
}
});
// ../../node_modules/.pnpm/resolve@1.22.2/node_modules/resolve/lib/core.json
var require_core3 = __commonJS({
"../../node_modules/.pnpm/resolve@1.22.2/node_modules/resolve/lib/core.json"(exports2, module2) {
module2.exports = {
assert: true,
"node:assert": [">= 14.18 && < 15", ">= 16"],
"assert/strict": ">= 15",
"node:assert/strict": ">= 16",
async_hooks: ">= 8",
"node:async_hooks": [">= 14.18 && < 15", ">= 16"],
buffer_ieee754: ">= 0.5 && < 0.9.7",
buffer: true,
"node:buffer": [">= 14.18 && < 15", ">= 16"],
child_process: true,
"node:child_process": [">= 14.18 && < 15", ">= 16"],
cluster: ">= 0.5",
"node:cluster": [">= 14.18 && < 15", ">= 16"],
console: true,
"node:console": [">= 14.18 && < 15", ">= 16"],
constants: true,
"node:constants": [">= 14.18 && < 15", ">= 16"],
crypto: true,
"node:crypto": [">= 14.18 && < 15", ">= 16"],
_debug_agent: ">= 1 && < 8",
_debugger: "< 8",
dgram: true,
"node:dgram": [">= 14.18 && < 15", ">= 16"],
diagnostics_channel: [">= 14.17 && < 15", ">= 15.1"],
"node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"],
dns: true,
"node:dns": [">= 14.18 && < 15", ">= 16"],
"dns/promises": ">= 15",
"node:dns/promises": ">= 16",
domain: ">= 0.7.12",
"node:domain": [">= 14.18 && < 15", ">= 16"],
events: true,
"node:events": [">= 14.18 && < 15", ">= 16"],
freelist: "< 6",
fs: true,
"node:fs": [">= 14.18 && < 15", ">= 16"],
"fs/promises": [">= 10 && < 10.1", ">= 14"],
"node:fs/promises": [">= 14.18 && < 15", ">= 16"],
_http_agent: ">= 0.11.1",
"node:_http_agent": [">= 14.18 && < 15", ">= 16"],
_http_client: ">= 0.11.1",
"node:_http_client": [">= 14.18 && < 15", ">= 16"],
_http_common: ">= 0.11.1",
"node:_http_common": [">= 14.18 && < 15", ">= 16"],
_http_incoming: ">= 0.11.1",
"node:_http_incoming": [">= 14.18 && < 15", ">= 16"],
_http_outgoing: ">= 0.11.1",
"node:_http_outgoing": [">= 14.18 && < 15", ">= 16"],
_http_server: ">= 0.11.1",
"node:_http_server": [">= 14.18 && < 15", ">= 16"],
http: true,
"node:http": [">= 14.18 && < 15", ">= 16"],
http2: ">= 8.8",
"node:http2": [">= 14.18 && < 15", ">= 16"],
https: true,
"node:https": [">= 14.18 && < 15", ">= 16"],
inspector: ">= 8",
"node:inspector": [">= 14.18 && < 15", ">= 16"],
"inspector/promises": [">= 19"],
"node:inspector/promises": [">= 19"],
_linklist: "< 8",
module: true,
"node:module": [">= 14.18 && < 15", ">= 16"],
net: true,
"node:net": [">= 14.18 && < 15", ">= 16"],
"node-inspect/lib/_inspect": ">= 7.6 && < 12",
"node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12",
"node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12",
os: true,
"node:os": [">= 14.18 && < 15", ">= 16"],
path: true,
"node:path": [">= 14.18 && < 15", ">= 16"],
"path/posix": ">= 15.3",
"node:path/posix": ">= 16",
"path/win32": ">= 15.3",
"node:path/win32": ">= 16",
perf_hooks: ">= 8.5",
"node:perf_hooks": [">= 14.18 && < 15", ">= 16"],
process: ">= 1",
"node:process": [">= 14.18 && < 15", ">= 16"],
punycode: ">= 0.5",
"node:punycode": [">= 14.18 && < 15", ">= 16"],
querystring: true,
"node:querystring": [">= 14.18 && < 15", ">= 16"],
readline: true,
"node:readline": [">= 14.18 && < 15", ">= 16"],
"readline/promises": ">= 17",
"node:readline/promises": ">= 17",
repl: true,
"node:repl": [">= 14.18 && < 15", ">= 16"],
smalloc: ">= 0.11.5 && < 3",
_stream_duplex: ">= 0.9.4",
"node:_stream_duplex": [">= 14.18 && < 15", ">= 16"],
_stream_transform: ">= 0.9.4",
"node:_stream_transform": [">= 14.18 && < 15", ">= 16"],
_stream_wrap: ">= 1.4.1",
"node:_stream_wrap": [">= 14.18 && < 15", ">= 16"],
_stream_passthrough: ">= 0.9.4",
"node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"],
_stream_readable: ">= 0.9.4",
"node:_stream_readable": [">= 14.18 && < 15", ">= 16"],
_stream_writable: ">= 0.9.4",
"node:_stream_writable": [">= 14.18 && < 15", ">= 16"],
stream: true,
"node:stream": [">= 14.18 && < 15", ">= 16"],
"stream/consumers": ">= 16.7",
"node:stream/consumers": ">= 16.7",
"stream/promises": ">= 15",
"node:stream/promises": ">= 16",
"stream/web": ">= 16.5",
"node:stream/web": ">= 16.5",
string_decoder: true,
"node:string_decoder": [">= 14.18 && < 15", ">= 16"],
sys: [">= 0.4 && < 0.7", ">= 0.8"],
"node:sys": [">= 14.18 && < 15", ">= 16"],
"node:test": [">= 16.17 && < 17", ">= 18"],
timers: true,
"node:timers": [">= 14.18 && < 15", ">= 16"],
"timers/promises": ">= 15",
"node:timers/promises": ">= 16",
_tls_common: ">= 0.11.13",
"node:_tls_common": [">= 14.18 && < 15", ">= 16"],
_tls_legacy: ">= 0.11.3 && < 10",
_tls_wrap: ">= 0.11.3",
"node:_tls_wrap": [">= 14.18 && < 15", ">= 16"],
tls: true,
"node:tls": [">= 14.18 && < 15", ">= 16"],
trace_events: ">= 10",
"node:trace_events": [">= 14.18 && < 15", ">= 16"],
tty: true,
"node:tty": [">= 14.18 && < 15", ">= 16"],
url: true,
"node:url": [">= 14.18 && < 15", ">= 16"],
util: true,
"node:util": [">= 14.18 && < 15", ">= 16"],
"util/types": ">= 15.3",
"node:util/types": ">= 16",
"v8/tools/arguments": ">= 10 && < 12",
"v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"],
"v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"],
"v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"],
"v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"],
"v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"],
"v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"],
v8: ">= 1",
"node:v8": [">= 14.18 && < 15", ">= 16"],
vm: true,
"node:vm": [">= 14.18 && < 15", ">= 16"],
wasi: ">= 13.4 && < 13.5",
worker_threads: ">= 11.7",
"node:worker_threads": [">= 14.18 && < 15", ">= 16"],
zlib: ">= 0.5",
"node:zlib": [">= 14.18 && < 15", ">= 16"]
};
}
});
// ../../node_modules/.pnpm/resolve@1.22.2/node_modules/resolve/lib/core.js
var require_core4 = __commonJS({
"../../node_modules/.pnpm/resolve@1.22.2/node_modules/resolve/lib/core.js"(exports2, module2) {
"use strict";
var isCoreModule = require_is_core_module();
var data = require_core3();
var core2 = {};
for (mod in data) {
if (Object.prototype.hasOwnProperty.call(data, mod)) {
core2[mod] = isCoreModule(mod);
}
}
var mod;
module2.exports = core2;
}
});
// ../../node_modules/.pnpm/resolve@1.22.2/node_modules/resolve/lib/is-core.js
var require_is_core = __commonJS({
"../../node_modules/.pnpm/resolve@1.22.2/node_modules/resolve/lib/is-core.js"(exports2, module2) {
var isCoreModule = require_is_core_module();
module2.exports = function isCore(x) {
return isCoreModule(x);
};
}
});
// ../../node_modules/.pnpm/resolve@1.22.2/node_modules/resolve/lib/sync.js
var require_sync = __commonJS({
"../../node_modules/.pnpm/resolve@1.22.2/node_modules/resolve/lib/sync.js"(exports2, module2) {
var isCore = require_is_core_module();
var fs40 = require("fs");
var path38 = require("path");
var getHomedir = require_homedir();
var caller = require_caller();
var nodeModulesPaths = require_node_modules_paths();
var normalizeOptions = require_normalize_options();
var realpathFS = process.platform !== "win32" && fs40.realpathSync && typeof fs40.realpathSync.native === "function" ? fs40.realpathSync.native : fs40.realpathSync;
var homedir2 = getHomedir();
var defaultPaths = function() {
return [
path38.join(homedir2, ".node_modules"),
path38.join(homedir2, ".node_libraries")
];
};
var defaultIsFile = function isFile(file2) {
try {
var stat = fs40.statSync(file2, { throwIfNoEntry: false });
} catch (e2) {
if (e2 && (e2.code === "ENOENT" || e2.code === "ENOTDIR"))
return false;
throw e2;
}
return !!stat && (stat.isFile() || stat.isFIFO());
};
var defaultIsDir = function isDirectory(dir3) {
try {
var stat = fs40.statSync(dir3, { throwIfNoEntry: false });
} catch (e2) {
if (e2 && (e2.code === "ENOENT" || e2.code === "ENOTDIR"))
return false;
throw e2;
}
return !!stat && stat.isDirectory();
};
var defaultRealpathSync = function realpathSync(x) {
try {
return realpathFS(x);
} catch (realpathErr) {
if (realpathErr.code !== "ENOENT") {
throw realpathErr;
}
}
return x;
};
var maybeRealpathSync = function maybeRealpathSync2(realpathSync, x, opts2) {
if (opts2 && opts2.preserveSymlinks === false) {
return realpathSync(x);
}
return x;
};
var defaultReadPackageSync = function defaultReadPackageSync2(readFileSync, pkgfile) {
var body = readFileSync(pkgfile);
try {
var pkg2 = JSON.parse(body);
return pkg2;
} catch (jsonErr) {
}
};
var getPackageCandidates = function getPackageCandidates2(x, start, opts2) {
var dirs = nodeModulesPaths(start, opts2, x);
for (var i2 = 0; i2 < dirs.length; i2++) {
dirs[i2] = path38.join(dirs[i2], x);
}
return dirs;
};
module2.exports = function resolveSync(x, options2) {
if (typeof x !== "string") {
throw new TypeError("Path must be a string.");
}
var opts2 = normalizeOptions(x, options2);
var isFile = opts2.isFile || defaultIsFile;
var readFileSync = opts2.readFileSync || fs40.readFileSync;
var isDirectory = opts2.isDirectory || defaultIsDir;
var realpathSync = opts2.realpathSync || defaultRealpathSync;
var readPackageSync = opts2.readPackageSync || defaultReadPackageSync;
if (opts2.readFileSync && opts2.readPackageSync) {
throw new TypeError("`readFileSync` and `readPackageSync` are mutually exclusive.");
}
var packageIterator = opts2.packageIterator;
var extensions = opts2.extensions || [".js"];
var includeCoreModules = opts2.includeCoreModules !== false;
var basedir = opts2.basedir || path38.dirname(caller());
var parent2 = opts2.filename || basedir;
opts2.paths = opts2.paths || defaultPaths();
var absoluteStart = maybeRealpathSync(realpathSync, path38.resolve(basedir), opts2);
if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) {
var res = path38.resolve(absoluteStart, x);
if (x === "." || x === ".." || x.slice(-1) === "/")
res += "/";
var m3 = loadAsFileSync(res) || loadAsDirectorySync(res);
if (m3)
return maybeRealpathSync(realpathSync, m3, opts2);
} else if (includeCoreModules && isCore(x)) {
return x;
} else {
var n2 = loadNodeModulesSync(x, absoluteStart);
if (n2)
return maybeRealpathSync(realpathSync, n2, opts2);
}
var err = new Error("Cannot find module '" + x + "' from '" + parent2 + "'");
err.code = "MODULE_NOT_FOUND";
throw err;
function loadAsFileSync(x2) {
var pkg2 = loadpkg(path38.dirname(x2));
if (pkg2 && pkg2.dir && pkg2.pkg && opts2.pathFilter) {
var rfile = path38.relative(pkg2.dir, x2);
var r2 = opts2.pathFilter(pkg2.pkg, x2, rfile);
if (r2) {
x2 = path38.resolve(pkg2.dir, r2);
}
}
if (isFile(x2)) {
return x2;
}
for (var i2 = 0; i2 < extensions.length; i2++) {
var file2 = x2 + extensions[i2];
if (isFile(file2)) {
return file2;
}
}
}
function loadpkg(dir3) {
if (dir3 === "" || dir3 === "/")
return;
if (process.platform === "win32" && /^\w:[/\\]*$/.test(dir3)) {
return;
}
if (/[/\\]node_modules[/\\]*$/.test(dir3))
return;
var pkgfile = path38.join(maybeRealpathSync(realpathSync, dir3, opts2), "package.json");
if (!isFile(pkgfile)) {
return loadpkg(path38.dirname(dir3));
}
var pkg2 = readPackageSync(readFileSync, pkgfile);
if (pkg2 && opts2.packageFilter) {
pkg2 = opts2.packageFilter(pkg2, dir3);
}
return { pkg: pkg2, dir: dir3 };
}
function loadAsDirectorySync(x2) {
var pkgfile = path38.join(maybeRealpathSync(realpathSync, x2, opts2), "/package.json");
if (isFile(pkgfile)) {
try {
var pkg2 = readPackageSync(readFileSync, pkgfile);
} catch (e2) {
}
if (pkg2 && opts2.packageFilter) {
pkg2 = opts2.packageFilter(pkg2, x2);
}
if (pkg2 && pkg2.main) {
if (typeof pkg2.main !== "string") {
var mainError = new TypeError("package \u201C" + pkg2.name + "\u201D `main` must be a string");
mainError.code = "INVALID_PACKAGE_MAIN";
throw mainError;
}
if (pkg2.main === "." || pkg2.main === "./") {
pkg2.main = "index";
}
try {
var m4 = loadAsFileSync(path38.resolve(x2, pkg2.main));
if (m4)
return m4;
var n3 = loadAsDirectorySync(path38.resolve(x2, pkg2.main));
if (n3)
return n3;
} catch (e2) {
}
}
}
return loadAsFileSync(path38.join(x2, "/index"));
}
function loadNodeModulesSync(x2, start) {
var thunk = function() {
return getPackageCandidates(x2, start, opts2);
};
var dirs = packageIterator ? packageIterator(x2, start, thunk, opts2) : thunk();
for (var i2 = 0; i2 < dirs.length; i2++) {
var dir3 = dirs[i2];
if (isDirectory(path38.dirname(dir3))) {
var m4 = loadAsFileSync(dir3);
if (m4)
return m4;
var n3 = loadAsDirectorySync(dir3);
if (n3)
return n3;
}
}
}
};
}
});
// ../../node_modules/.pnpm/resolve@1.22.2/node_modules/resolve/index.js
var require_resolve = __commonJS({
"../../node_modules/.pnpm/resolve@1.22.2/node_modules/resolve/index.js"(exports2, module2) {
var async = require_async();
async.core = require_core4();
async.isCore = require_is_core();
async.sync = require_sync();
module2.exports = async;
}
});
// ../../node_modules/.pnpm/normalize-package-data@2.5.0/node_modules/normalize-package-data/lib/extract_description.js
var require_extract_description = __commonJS({
"../../node_modules/.pnpm/normalize-package-data@2.5.0/node_modules/normalize-package-data/lib/extract_description.js"(exports2, module2) {
module2.exports = extractDescription;
function extractDescription(d3) {
if (!d3)
return;
if (d3 === "ERROR: No README data found!")
return;
d3 = d3.trim().split("\n");
for (var s3 = 0; d3[s3] && d3[s3].trim().match(/^(#|$)/); s3++)
;
var l2 = d3.length;
for (var e2 = s3 + 1; e2 < l2 && d3[e2].trim(); e2++)
;
return d3.slice(s3, e2).join(" ").trim();
}
}
});
// ../../node_modules/.pnpm/normalize-package-data@2.5.0/node_modules/normalize-package-data/lib/typos.json
var require_typos = __commonJS({
"../../node_modules/.pnpm/normalize-package-data@2.5.0/node_modules/normalize-package-data/lib/typos.json"(exports2, module2) {
module2.exports = {
topLevel: {
dependancies: "dependencies",
dependecies: "dependencies",
depdenencies: "dependencies",
devEependencies: "devDependencies",
depends: "dependencies",
"dev-dependencies": "devDependencies",
devDependences: "devDependencies",
devDepenencies: "devDependencies",
devdependencies: "devDependencies",
repostitory: "repository",
repo: "repository",
prefereGlobal: "preferGlobal",
hompage: "homepage",
hampage: "homepage",
autohr: "author",
autor: "author",
contributers: "contributors",
publicationConfig: "publishConfig",
script: "scripts"
},
bugs: { web: "url", name: "url" },
script: { server: "start", tests: "test" }
};
}
});
// ../../node_modules/.pnpm/normalize-package-data@2.5.0/node_modules/normalize-package-data/lib/fixer.js
var require_fixer = __commonJS({
"../../node_modules/.pnpm/normalize-package-data@2.5.0/node_modules/normalize-package-data/lib/fixer.js"(exports2, module2) {
var semver2 = require_semver();
var validateLicense = require_validate_npm_package_license();
var hostedGitInfo = require_hosted_git_info();
var isBuiltinModule = require_resolve().isCore;
var depTypes = ["dependencies", "devDependencies", "optionalDependencies"];
var extractDescription = require_extract_description();
var url2 = require("url");
var typos = require_typos();
var fixer = module2.exports = {
warn: function() {
},
fixRepositoryField: function(data) {
if (data.repositories) {
this.warn("repositories");
data.repository = data.repositories[0];
}
if (!data.repository)
return this.warn("missingRepository");
if (typeof data.repository === "string") {
data.repository = {
type: "git",
url: data.repository
};
}
var r2 = data.repository.url || "";
if (r2) {
var hosted = hostedGitInfo.fromUrl(r2);
if (hosted) {
r2 = data.repository.url = hosted.getDefaultRepresentation() == "shortcut" ? hosted.https() : hosted.toString();
}
}
if (r2.match(/github.com\/[^\/]+\/[^\/]+\.git\.git$/)) {
this.warn("brokenGitUrl", r2);
}
},
fixTypos: function(data) {
Object.keys(typos.topLevel).forEach(function(d3) {
if (data.hasOwnProperty(d3)) {
this.warn("typo", d3, typos.topLevel[d3]);
}
}, this);
},
fixScriptsField: function(data) {
if (!data.scripts)
return;
if (typeof data.scripts !== "object") {
this.warn("nonObjectScripts");
delete data.scripts;
return;
}
Object.keys(data.scripts).forEach(function(k) {
if (typeof data.scripts[k] !== "string") {
this.warn("nonStringScript");
delete data.scripts[k];
} else if (typos.script[k] && !data.scripts[typos.script[k]]) {
this.warn("typo", k, typos.script[k], "scripts");
}
}, this);
},
fixFilesField: function(data) {
var files = data.files;
if (files && !Array.isArray(files)) {
this.warn("nonArrayFiles");
delete data.files;
} else if (data.files) {
data.files = data.files.filter(function(file2) {
if (!file2 || typeof file2 !== "string") {
this.warn("invalidFilename", file2);
return false;
} else {
return true;
}
}, this);
}
},
fixBinField: function(data) {
if (!data.bin)
return;
if (typeof data.bin === "string") {
var b2 = {};
var match4;
if (match4 = data.name.match(/^@[^/]+[/](.*)$/)) {
b2[match4[1]] = data.bin;
} else {
b2[data.name] = data.bin;
}
data.bin = b2;
}
},
fixManField: function(data) {
if (!data.man)
return;
if (typeof data.man === "string") {
data.man = [data.man];
}
},
fixBundleDependenciesField: function(data) {
var bdd = "bundledDependencies";
var bd = "bundleDependencies";
if (data[bdd] && !data[bd]) {
data[bd] = data[bdd];
delete data[bdd];
}
if (data[bd] && !Array.isArray(data[bd])) {
this.warn("nonArrayBundleDependencies");
delete data[bd];
} else if (data[bd]) {
data[bd] = data[bd].filter(function(bd2) {
if (!bd2 || typeof bd2 !== "string") {
this.warn("nonStringBundleDependency", bd2);
return false;
} else {
if (!data.dependencies) {
data.dependencies = {};
}
if (!data.dependencies.hasOwnProperty(bd2)) {
this.warn("nonDependencyBundleDependency", bd2);
data.dependencies[bd2] = "*";
}
return true;
}
}, this);
}
},
fixDependencies: function(data, strict) {
var loose = !strict;
objectifyDeps(data, this.warn);
addOptionalDepsToDeps(data, this.warn);
this.fixBundleDependenciesField(data);
["dependencies", "devDependencies"].forEach(function(deps) {
if (!(deps in data))
return;
if (!data[deps] || typeof data[deps] !== "object") {
this.warn("nonObjectDependencies", deps);
delete data[deps];
return;
}
Object.keys(data[deps]).forEach(function(d3) {
var r2 = data[deps][d3];
if (typeof r2 !== "string") {
this.warn("nonStringDependency", d3, JSON.stringify(r2));
delete data[deps][d3];
}
var hosted = hostedGitInfo.fromUrl(data[deps][d3]);
if (hosted)
data[deps][d3] = hosted.toString();
}, this);
}, this);
},
fixModulesField: function(data) {
if (data.modules) {
this.warn("deprecatedModules");
delete data.modules;
}
},
fixKeywordsField: function(data) {
if (typeof data.keywords === "string") {
data.keywords = data.keywords.split(/,\s+/);
}
if (data.keywords && !Array.isArray(data.keywords)) {
delete data.keywords;
this.warn("nonArrayKeywords");
} else if (data.keywords) {
data.keywords = data.keywords.filter(function(kw) {
if (typeof kw !== "string" || !kw) {
this.warn("nonStringKeyword");
return false;
} else {
return true;
}
}, this);
}
},
fixVersionField: function(data, strict) {
var loose = !strict;
if (!data.version) {
data.version = "";
return true;
}
if (!semver2.valid(data.version, loose)) {
throw new Error('Invalid version: "' + data.version + '"');
}
data.version = semver2.clean(data.version, loose);
return true;
},
fixPeople: function(data) {
modifyPeople(data, unParsePerson);
modifyPeople(data, parsePerson);
},
fixNameField: function(data, options2) {
if (typeof options2 === "boolean")
options2 = { strict: options2 };
else if (typeof options2 === "undefined")
options2 = {};
var strict = options2.strict;
if (!data.name && !strict) {
data.name = "";
return;
}
if (typeof data.name !== "string") {
throw new Error("name field must be a string.");
}
if (!strict)
data.name = data.name.trim();
ensureValidName(data.name, strict, options2.allowLegacyCase);
if (isBuiltinModule(data.name))
this.warn("conflictingName", data.name);
},
fixDescriptionField: function(data) {
if (data.description && typeof data.description !== "string") {
this.warn("nonStringDescription");
delete data.description;
}
if (data.readme && !data.description)
data.description = extractDescription(data.readme);
if (data.description === void 0)
delete data.description;
if (!data.description)
this.warn("missingDescription");
},
fixReadmeField: function(data) {
if (!data.readme) {
this.warn("missingReadme");
data.readme = "ERROR: No README data found!";
}
},
fixBugsField: function(data) {
if (!data.bugs && data.repository && data.repository.url) {
var hosted = hostedGitInfo.fromUrl(data.repository.url);
if (hosted && hosted.bugs()) {
data.bugs = { url: hosted.bugs() };
}
} else if (data.bugs) {
var emailRe = /^.+@.*\..+$/;
if (typeof data.bugs == "string") {
if (emailRe.test(data.bugs))
data.bugs = { email: data.bugs };
else if (url2.parse(data.bugs).protocol)
data.bugs = { url: data.bugs };
else
this.warn("nonEmailUrlBugsString");
} else {
bugsTypos(data.bugs, this.warn);
var oldBugs = data.bugs;
data.bugs = {};
if (oldBugs.url) {
if (typeof oldBugs.url == "string" && url2.parse(oldBugs.url).protocol)
data.bugs.url = oldBugs.url;
else
this.warn("nonUrlBugsUrlField");
}
if (oldBugs.email) {
if (typeof oldBugs.email == "string" && emailRe.test(oldBugs.email))
data.bugs.email = oldBugs.email;
else
this.warn("nonEmailBugsEmailField");
}
}
if (!data.bugs.email && !data.bugs.url) {
delete data.bugs;
this.warn("emptyNormalizedBugs");
}
}
},
fixHomepageField: function(data) {
if (!data.homepage && data.repository && data.repository.url) {
var hosted = hostedGitInfo.fromUrl(data.repository.url);
if (hosted && hosted.docs())
data.homepage = hosted.docs();
}
if (!data.homepage)
return;
if (typeof data.homepage !== "string") {
this.warn("nonUrlHomepage");
return delete data.homepage;
}
if (!url2.parse(data.homepage).protocol) {
data.homepage = "http://" + data.homepage;
}
},
fixLicenseField: function(data) {
if (!data.license) {
return this.warn("missingLicense");
} else {
if (typeof data.license !== "string" || data.license.length < 1 || data.license.trim() === "") {
this.warn("invalidLicense");
} else {
if (!validateLicense(data.license).validForNewPackages)
this.warn("invalidLicense");
}
}
}
};
function isValidScopedPackageName(spec) {
if (spec.charAt(0) !== "@")
return false;
var rest = spec.slice(1).split("/");
if (rest.length !== 2)
return false;
return rest[0] && rest[1] && rest[0] === encodeURIComponent(rest[0]) && rest[1] === encodeURIComponent(rest[1]);
}
function isCorrectlyEncodedName(spec) {
return !spec.match(/[\/@\s\+%:]/) && spec === encodeURIComponent(spec);
}
function ensureValidName(name, strict, allowLegacyCase) {
if (name.charAt(0) === "." || !(isValidScopedPackageName(name) || isCorrectlyEncodedName(name)) || strict && !allowLegacyCase && name !== name.toLowerCase() || name.toLowerCase() === "node_modules" || name.toLowerCase() === "favicon.ico") {
throw new Error("Invalid name: " + JSON.stringify(name));
}
}
function modifyPeople(data, fn2) {
if (data.author)
data.author = fn2(data.author);
["maintainers", "contributors"].forEach(function(set) {
if (!Array.isArray(data[set]))
return;
data[set] = data[set].map(fn2);
});
return data;
}
function unParsePerson(person) {
if (typeof person === "string")
return person;
var name = person.name || "";
var u2 = person.url || person.web;
var url3 = u2 ? " (" + u2 + ")" : "";
var e2 = person.email || person.mail;
var email = e2 ? " <" + e2 + ">" : "";
return name + email + url3;
}
function parsePerson(person) {
if (typeof person !== "string")
return person;
var name = person.match(/^([^\(<]+)/);
var url3 = person.match(/\(([^\)]+)\)/);
var email = person.match(/<([^>]+)>/);
var obj = {};
if (name && name[0].trim())
obj.name = name[0].trim();
if (email)
obj.email = email[1];
if (url3)
obj.url = url3[1];
return obj;
}
function addOptionalDepsToDeps(data, warn3) {
var o2 = data.optionalDependencies;
if (!o2)
return;
var d3 = data.dependencies || {};
Object.keys(o2).forEach(function(k) {
d3[k] = o2[k];
});
data.dependencies = d3;
}
function depObjectify(deps, type, warn3) {
if (!deps)
return {};
if (typeof deps === "string") {
deps = deps.trim().split(/[\n\r\s\t ,]+/);
}
if (!Array.isArray(deps))
return deps;
warn3("deprecatedArrayDependencies", type);
var o2 = {};
deps.filter(function(d3) {
return typeof d3 === "string";
}).forEach(function(d3) {
d3 = d3.trim().split(/(:?[@\s><=])/);
var dn = d3.shift();
var dv = d3.join("");
dv = dv.trim();
dv = dv.replace(/^@/, "");
o2[dn] = dv;
});
return o2;
}
function objectifyDeps(data, warn3) {
depTypes.forEach(function(type) {
if (!data[type])
return;
data[type] = depObjectify(data[type], type, warn3);
});
}
function bugsTypos(bugs, warn3) {
if (!bugs)
return;
Object.keys(bugs).forEach(function(k) {
if (typos.bugs[k]) {
warn3("typo", k, typos.bugs[k], "bugs");
bugs[typos.bugs[k]] = bugs[k];
delete bugs[k];
}
});
}
}
});
// ../../node_modules/.pnpm/normalize-package-data@2.5.0/node_modules/normalize-package-data/lib/warning_messages.json
var require_warning_messages = __commonJS({
"../../node_modules/.pnpm/normalize-package-data@2.5.0/node_modules/normalize-package-data/lib/warning_messages.json"(exports2, module2) {
module2.exports = {
repositories: "'repositories' (plural) Not supported. Please pick one as the 'repository' field",
missingRepository: "No repository field.",
brokenGitUrl: "Probably broken git url: %s",
nonObjectScripts: "scripts must be an object",
nonStringScript: "script values must be string commands",
nonArrayFiles: "Invalid 'files' member",
invalidFilename: "Invalid filename in 'files' list: %s",
nonArrayBundleDependencies: "Invalid 'bundleDependencies' list. Must be array of package names",
nonStringBundleDependency: "Invalid bundleDependencies member: %s",
nonDependencyBundleDependency: "Non-dependency in bundleDependencies: %s",
nonObjectDependencies: "%s field must be an object",
nonStringDependency: "Invalid dependency: %s %s",
deprecatedArrayDependencies: "specifying %s as array is deprecated",
deprecatedModules: "modules field is deprecated",
nonArrayKeywords: "keywords should be an array of strings",
nonStringKeyword: "keywords should be an array of strings",
conflictingName: "%s is also the name of a node core module.",
nonStringDescription: "'description' field should be a string",
missingDescription: "No description",
missingReadme: "No README data",
missingLicense: "No license field.",
nonEmailUrlBugsString: "Bug string field must be url, email, or {email,url}",
nonUrlBugsUrlField: "bugs.url field must be a string url. Deleted.",
nonEmailBugsEmailField: "bugs.email field must be a string email. Deleted.",
emptyNormalizedBugs: "Normalized value of bugs field is an empty object. Deleted.",
nonUrlHomepage: "homepage field must be a string url. Deleted.",
invalidLicense: "license should be a valid SPDX license expression",
typo: "%s should probably be %s."
};
}
});
// ../../node_modules/.pnpm/normalize-package-data@2.5.0/node_modules/normalize-package-data/lib/make_warning.js
var require_make_warning = __commonJS({
"../../node_modules/.pnpm/normalize-package-data@2.5.0/node_modules/normalize-package-data/lib/make_warning.js"(exports2, module2) {
var util5 = require("util");
var messages = require_warning_messages();
module2.exports = function() {
var args3 = Array.prototype.slice.call(arguments, 0);
var warningName = args3.shift();
if (warningName == "typo") {
return makeTypoWarning.apply(null, args3);
} else {
var msgTemplate = messages[warningName] ? messages[warningName] : warningName + ": '%s'";
args3.unshift(msgTemplate);
return util5.format.apply(null, args3);
}
};
function makeTypoWarning(providedName, probableName, field) {
if (field) {
providedName = field + "['" + providedName + "']";
probableName = field + "['" + probableName + "']";
}
return util5.format(messages.typo, providedName, probableName);
}
}
});
// ../../node_modules/.pnpm/normalize-package-data@2.5.0/node_modules/normalize-package-data/lib/normalize.js
var require_normalize = __commonJS({
"../../node_modules/.pnpm/normalize-package-data@2.5.0/node_modules/normalize-package-data/lib/normalize.js"(exports2, module2) {
module2.exports = normalize;
var fixer = require_fixer();
normalize.fixer = fixer;
var makeWarning = require_make_warning();
var fieldsToFix = [
"name",
"version",
"description",
"repository",
"modules",
"scripts",
"files",
"bin",
"man",
"bugs",
"keywords",
"readme",
"homepage",
"license"
];
var otherThingsToFix = ["dependencies", "people", "typos"];
var thingsToFix = fieldsToFix.map(function(fieldName) {
return ucFirst(fieldName) + "Field";
});
thingsToFix = thingsToFix.concat(otherThingsToFix);
function normalize(data, warn3, strict) {
if (warn3 === true)
warn3 = null, strict = true;
if (!strict)
strict = false;
if (!warn3 || data.private)
warn3 = function(msg) {
};
if (data.scripts && data.scripts.install === "node-gyp rebuild" && !data.scripts.preinstall) {
data.gypfile = true;
}
fixer.warn = function() {
warn3(makeWarning.apply(null, arguments));
};
thingsToFix.forEach(function(thingName) {
fixer["fix" + ucFirst(thingName)](data, strict);
});
data._id = data.name + "@" + data.version;
}
function ucFirst(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
}
});
// ../../node_modules/.pnpm/read-pkg@5.2.0/node_modules/read-pkg/index.js
var require_read_pkg = __commonJS({
"../../node_modules/.pnpm/read-pkg@5.2.0/node_modules/read-pkg/index.js"(exports2, module2) {
"use strict";
var { promisify: promisify9 } = require("util");
var fs40 = require("fs");
var path38 = require("path");
var parseJson = require_parse_json();
var readFileAsync = promisify9(fs40.readFile);
module2.exports = async (options2) => {
options2 = {
cwd: process.cwd(),
normalize: true,
...options2
};
const filePath = path38.resolve(options2.cwd, "package.json");
const json = parseJson(await readFileAsync(filePath, "utf8"));
if (options2.normalize) {
require_normalize()(json);
}
return json;
};
module2.exports.sync = (options2) => {
options2 = {
cwd: process.cwd(),
normalize: true,
...options2
};
const filePath = path38.resolve(options2.cwd, "package.json");
const json = parseJson(fs40.readFileSync(filePath, "utf8"));
if (options2.normalize) {
require_normalize()(json);
}
return json;
};
}
});
// ../../node_modules/.pnpm/read-pkg-up@7.0.1/node_modules/read-pkg-up/index.js
var require_read_pkg_up = __commonJS({
"../../node_modules/.pnpm/read-pkg-up@7.0.1/node_modules/read-pkg-up/index.js"(exports2, module2) {
"use strict";
var path38 = require("path");
var findUp3 = require_find_up2();
var readPkg = require_read_pkg();
module2.exports = async (options2) => {
const filePath = await findUp3("package.json", options2);
if (!filePath) {
return;
}
return {
packageJson: await readPkg({ ...options2, cwd: path38.dirname(filePath) }),
path: filePath
};
};
module2.exports.sync = (options2) => {
const filePath = findUp3.sync("package.json", options2);
if (!filePath) {
return;
}
return {
packageJson: readPkg.sync({ ...options2, cwd: path38.dirname(filePath) }),
path: filePath
};
};
}
});
// ../../node_modules/.pnpm/dotenv@16.0.3/node_modules/dotenv/package.json
var require_package = __commonJS({
"../../node_modules/.pnpm/dotenv@16.0.3/node_modules/dotenv/package.json"(exports2, module2) {
module2.exports = {
name: "dotenv",
version: "16.0.3",
description: "Loads environment variables from .env file",
main: "lib/main.js",
types: "lib/main.d.ts",
exports: {
".": {
require: "./lib/main.js",
types: "./lib/main.d.ts",
default: "./lib/main.js"
},
"./config": "./config.js",
"./config.js": "./config.js",
"./lib/env-options": "./lib/env-options.js",
"./lib/env-options.js": "./lib/env-options.js",
"./lib/cli-options": "./lib/cli-options.js",
"./lib/cli-options.js": "./lib/cli-options.js",
"./package.json": "./package.json"
},
scripts: {
"dts-check": "tsc --project tests/types/tsconfig.json",
lint: "standard",
"lint-readme": "standard-markdown",
pretest: "npm run lint && npm run dts-check",
test: "tap tests/*.js --100 -Rspec",
prerelease: "npm test",
release: "standard-version"
},
repository: {
type: "git",
url: "git://github.com/motdotla/dotenv.git"
},
keywords: [
"dotenv",
"env",
".env",
"environment",
"variables",
"config",
"settings"
],
readmeFilename: "README.md",
license: "BSD-2-Clause",
devDependencies: {
"@types/node": "^17.0.9",
decache: "^4.6.1",
dtslint: "^3.7.0",
sinon: "^12.0.1",
standard: "^16.0.4",
"standard-markdown": "^7.1.0",
"standard-version": "^9.3.2",
tap: "^15.1.6",
tar: "^6.1.11",
typescript: "^4.5.4"
},
engines: {
node: ">=12"
}
};
}
});
// ../../node_modules/.pnpm/dotenv@16.0.3/node_modules/dotenv/lib/main.js
var require_main2 = __commonJS({
"../../node_modules/.pnpm/dotenv@16.0.3/node_modules/dotenv/lib/main.js"(exports2, module2) {
var fs40 = require("fs");
var path38 = require("path");
var os7 = require("os");
var packageJson6 = require_package();
var version3 = packageJson6.version;
var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;
function parse3(src2) {
const obj = {};
let lines2 = src2.toString();
lines2 = lines2.replace(/\r\n?/mg, "\n");
let match4;
while ((match4 = LINE.exec(lines2)) != null) {
const key = match4[1];
let value = match4[2] || "";
value = value.trim();
const maybeQuote = value[0];
value = value.replace(/^(['"`])([\s\S]*)\1$/mg, "$2");
if (maybeQuote === '"') {
value = value.replace(/\\n/g, "\n");
value = value.replace(/\\r/g, "\r");
}
obj[key] = value;
}
return obj;
}
function _log(message2) {
console.log(`[dotenv@${version3}][DEBUG] ${message2}`);
}
function _resolveHome(envPath) {
return envPath[0] === "~" ? path38.join(os7.homedir(), envPath.slice(1)) : envPath;
}
function config2(options2) {
let dotenvPath = path38.resolve(process.cwd(), ".env");
let encoding = "utf8";
const debug27 = Boolean(options2 && options2.debug);
const override2 = Boolean(options2 && options2.override);
if (options2) {
if (options2.path != null) {
dotenvPath = _resolveHome(options2.path);
}
if (options2.encoding != null) {
encoding = options2.encoding;
}
}
try {
const parsed = DotenvModule.parse(fs40.readFileSync(dotenvPath, { encoding }));
Object.keys(parsed).forEach(function(key) {
if (!Object.prototype.hasOwnProperty.call(process.env, key)) {
process.env[key] = parsed[key];
} else {
if (override2 === true) {
process.env[key] = parsed[key];
}
if (debug27) {
if (override2 === true) {
_log(`"${key}" is already defined in \`process.env\` and WAS overwritten`);
} else {
_log(`"${key}" is already defined in \`process.env\` and was NOT overwritten`);
}
}
}
});
return { parsed };
} catch (e2) {
if (debug27) {
_log(`Failed to load ${dotenvPath} ${e2.message}`);
}
return { error: e2 };
}
}
var DotenvModule = {
config: config2,
parse: parse3
};
module2.exports.config = DotenvModule.config;
module2.exports.parse = DotenvModule.parse;
module2.exports = DotenvModule;
}
});
// ../../node_modules/.pnpm/arg@5.0.2/node_modules/arg/index.js
var require_arg = __commonJS({
"../../node_modules/.pnpm/arg@5.0.2/node_modules/arg/index.js"(exports2, module2) {
var flagSymbol = Symbol("arg flag");
var ArgError2 = class extends Error {
constructor(msg, code) {
super(msg);
this.name = "ArgError";
this.code = code;
Object.setPrototypeOf(this, ArgError2.prototype);
}
};
function arg2(opts2, {
argv = process.argv.slice(2),
permissive = false,
stopAtPositional = false
} = {}) {
if (!opts2) {
throw new ArgError2(
"argument specification object is required",
"ARG_CONFIG_NO_SPEC"
);
}
const result = { _: [] };
const aliases3 = {};
const handlers = {};
for (const key of Object.keys(opts2)) {
if (!key) {
throw new ArgError2(
"argument key cannot be an empty string",
"ARG_CONFIG_EMPTY_KEY"
);
}
if (key[0] !== "-") {
throw new ArgError2(
`argument key must start with '-' but found: '${key}'`,
"ARG_CONFIG_NONOPT_KEY"
);
}
if (key.length === 1) {
throw new ArgError2(
`argument key must have a name; singular '-' keys are not allowed: ${key}`,
"ARG_CONFIG_NONAME_KEY"
);
}
if (typeof opts2[key] === "string") {
aliases3[key] = opts2[key];
continue;
}
let type = opts2[key];
let isFlag = false;
if (Array.isArray(type) && type.length === 1 && typeof type[0] === "function") {
const [fn2] = type;
type = (value, name, prev = []) => {
prev.push(fn2(value, name, prev[prev.length - 1]));
return prev;
};
isFlag = fn2 === Boolean || fn2[flagSymbol] === true;
} else if (typeof type === "function") {
isFlag = type === Boolean || type[flagSymbol] === true;
} else {
throw new ArgError2(
`type missing or not a function or valid array type: ${key}`,
"ARG_CONFIG_VAD_TYPE"
);
}
if (key[1] !== "-" && key.length > 2) {
throw new ArgError2(
`short argument keys (with a single hyphen) must have only one character: ${key}`,
"ARG_CONFIG_SHORTOPT_TOOLONG"
);
}
handlers[key] = [type, isFlag];
}
for (let i2 = 0, len = argv.length; i2 < len; i2++) {
const wholeArg = argv[i2];
if (stopAtPositional && result._.length > 0) {
result._ = result._.concat(argv.slice(i2));
break;
}
if (wholeArg === "--") {
result._ = result._.concat(argv.slice(i2 + 1));
break;
}
if (wholeArg.length > 1 && wholeArg[0] === "-") {
const separatedArguments = wholeArg[1] === "-" || wholeArg.length === 2 ? [wholeArg] : wholeArg.slice(1).split("").map((a2) => `-${a2}`);
for (let j = 0; j < separatedArguments.length; j++) {
const arg3 = separatedArguments[j];
const [originalArgName, argStr] = arg3[1] === "-" ? arg3.split(/=(.*)/, 2) : [arg3, void 0];
let argName = originalArgName;
while (argName in aliases3) {
argName = aliases3[argName];
}
if (!(argName in handlers)) {
if (permissive) {
result._.push(arg3);
continue;
} else {
throw new ArgError2(
`unknown or unexpected option: ${originalArgName}`,
"ARG_UNKNOWN_OPTION"
);
}
}
const [type, isFlag] = handlers[argName];
if (!isFlag && j + 1 < separatedArguments.length) {
throw new ArgError2(
`option requires argument (but was followed by another short argument): ${originalArgName}`,
"ARG_MISSING_REQUIRED_SHORTARG"
);
}
if (isFlag) {
result[argName] = type(true, argName, result[argName]);
} else if (argStr === void 0) {
if (argv.length < i2 + 2 || argv[i2 + 1].length > 1 && argv[i2 + 1][0] === "-" && !(argv[i2 + 1].match(/^-?\d*(\.(?=\d))?\d*$/) && (type === Number || typeof BigInt !== "undefined" && type === BigInt))) {
const extended = originalArgName === argName ? "" : ` (alias for ${argName})`;
throw new ArgError2(
`option requires argument: ${originalArgName}${extended}`,
"ARG_MISSING_REQUIRED_LONGARG"
);
}
result[argName] = type(argv[i2 + 1], argName, result[argName]);
++i2;
} else {
result[argName] = type(argStr, argName, result[argName]);
}
}
} else {
result._.push(wholeArg);
}
}
return result;
}
arg2.flag = (fn2) => {
fn2[flagSymbol] = true;
return fn2;
};
arg2.COUNT = arg2.flag((v2, name, existingCount) => (existingCount || 0) + 1);
arg2.ArgError = ArgError2;
module2.exports = arg2;
}
});
// ../../node_modules/.pnpm/min-indent@1.0.1/node_modules/min-indent/index.js
var require_min_indent = __commonJS({
"../../node_modules/.pnpm/min-indent@1.0.1/node_modules/min-indent/index.js"(exports2, module2) {
"use strict";
module2.exports = (string) => {
const match4 = string.match(/^[ \t]*(?=\S)/gm);
if (!match4) {
return 0;
}
return match4.reduce((r2, a2) => Math.min(r2, a2.length), Infinity);
};
}
});
// ../../node_modules/.pnpm/strip-indent@3.0.0/node_modules/strip-indent/index.js
var require_strip_indent = __commonJS({
"../../node_modules/.pnpm/strip-indent@3.0.0/node_modules/strip-indent/index.js"(exports2, module2) {
"use strict";
var minIndent = require_min_indent();
module2.exports = (string) => {
const indent4 = minIndent(string);
if (indent4 === 0) {
return string;
}
const regex2 = new RegExp(`^[ \\t]{${indent4}}`, "gm");
return string.replace(regex2, "");
};
}
});
// ../../node_modules/.pnpm/@prisma+prisma-schema-wasm@4.17.0-26.6b0aef69b7cdfc787f822ecd7cdc76d5f1991584/node_modules/@prisma/prisma-schema-wasm/src/prisma_schema_build.js
var require_prisma_schema_build = __commonJS({
"../../node_modules/.pnpm/@prisma+prisma-schema-wasm@4.17.0-26.6b0aef69b7cdfc787f822ecd7cdc76d5f1991584/node_modules/@prisma/prisma-schema-wasm/src/prisma_schema_build.js"(exports2, module2) {
var imports = {};
imports["__wbindgen_placeholder__"] = module2.exports;
var wasm;
var { TextDecoder, TextEncoder } = require("util");
var cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
cachedTextDecoder.decode();
var cachedUint8Memory0 = null;
function getUint8Memory0() {
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
}
return cachedUint8Memory0;
}
function getStringFromWasm0(ptr, len) {
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
}
var heap = new Array(128).fill(void 0);
heap.push(void 0, null, true, false);
var heap_next = heap.length;
function addHeapObject(obj) {
if (heap_next === heap.length)
heap.push(heap.length + 1);
const idx = heap_next;
heap_next = heap[idx];
heap[idx] = obj;
return idx;
}
var WASM_VECTOR_LEN = 0;
var cachedTextEncoder = new TextEncoder("utf-8");
var encodeString = typeof cachedTextEncoder.encodeInto === "function" ? function(arg2, view) {
return cachedTextEncoder.encodeInto(arg2, view);
} : function(arg2, view) {
const buf = cachedTextEncoder.encode(arg2);
view.set(buf);
return {
read: arg2.length,
written: buf.length
};
};
function passStringToWasm0(arg2, malloc, realloc) {
if (realloc === void 0) {
const buf = cachedTextEncoder.encode(arg2);
const ptr2 = malloc(buf.length);
getUint8Memory0().subarray(ptr2, ptr2 + buf.length).set(buf);
WASM_VECTOR_LEN = buf.length;
return ptr2;
}
let len = arg2.length;
let ptr = malloc(len);
const mem = getUint8Memory0();
let offset = 0;
for (; offset < len; offset++) {
const code = arg2.charCodeAt(offset);
if (code > 127)
break;
mem[ptr + offset] = code;
}
if (offset !== len) {
if (offset !== 0) {
arg2 = arg2.slice(offset);
}
ptr = realloc(ptr, len, len = offset + arg2.length * 3);
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
const ret = encodeString(arg2, view);
offset += ret.written;
}
WASM_VECTOR_LEN = offset;
return ptr;
}
var cachedInt32Memory0 = null;
function getInt32Memory0() {
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
}
return cachedInt32Memory0;
}
module2.exports.format = function(schema, params) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passStringToWasm0(schema, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
const ptr1 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len1 = WASM_VECTOR_LEN;
wasm.format(retptr, ptr0, len0, ptr1, len1);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
return getStringFromWasm0(r0, r1);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
wasm.__wbindgen_free(r0, r1);
}
};
function getObject(idx) {
return heap[idx];
}
function dropObject(idx) {
if (idx < 132)
return;
heap[idx] = heap_next;
heap_next = idx;
}
function takeObject(idx) {
const ret = getObject(idx);
dropObject(idx);
return ret;
}
module2.exports.get_config = function(params) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
wasm.get_config(retptr, ptr0, len0);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var r2 = getInt32Memory0()[retptr / 4 + 2];
var r3 = getInt32Memory0()[retptr / 4 + 3];
var ptr1 = r0;
var len1 = r1;
if (r3) {
ptr1 = 0;
len1 = 0;
throw takeObject(r2);
}
return getStringFromWasm0(ptr1, len1);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
wasm.__wbindgen_free(ptr1, len1);
}
};
module2.exports.get_dmmf = function(params) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
wasm.get_dmmf(retptr, ptr0, len0);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var r2 = getInt32Memory0()[retptr / 4 + 2];
var r3 = getInt32Memory0()[retptr / 4 + 3];
var ptr1 = r0;
var len1 = r1;
if (r3) {
ptr1 = 0;
len1 = 0;
throw takeObject(r2);
}
return getStringFromWasm0(ptr1, len1);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
wasm.__wbindgen_free(ptr1, len1);
}
};
module2.exports.lint = function(input) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
wasm.lint(retptr, ptr0, len0);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
return getStringFromWasm0(r0, r1);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
wasm.__wbindgen_free(r0, r1);
}
};
module2.exports.validate = function(params) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
wasm.validate(retptr, ptr0, len0);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
if (r1) {
throw takeObject(r0);
}
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
};
module2.exports.native_types = function(input) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
wasm.native_types(retptr, ptr0, len0);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
return getStringFromWasm0(r0, r1);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
wasm.__wbindgen_free(r0, r1);
}
};
module2.exports.referential_actions = function(input) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
wasm.referential_actions(retptr, ptr0, len0);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
return getStringFromWasm0(r0, r1);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
wasm.__wbindgen_free(r0, r1);
}
};
module2.exports.preview_features = function() {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
wasm.preview_features(retptr);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
return getStringFromWasm0(r0, r1);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
wasm.__wbindgen_free(r0, r1);
}
};
module2.exports.text_document_completion = function(schema, params) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passStringToWasm0(schema, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
const ptr1 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len1 = WASM_VECTOR_LEN;
wasm.text_document_completion(retptr, ptr0, len0, ptr1, len1);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
return getStringFromWasm0(r0, r1);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
wasm.__wbindgen_free(r0, r1);
}
};
module2.exports.code_actions = function(schema, params) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passStringToWasm0(schema, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
const ptr1 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len1 = WASM_VECTOR_LEN;
wasm.code_actions(retptr, ptr0, len0, ptr1, len1);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
return getStringFromWasm0(r0, r1);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
wasm.__wbindgen_free(r0, r1);
}
};
module2.exports.debug_panic = function() {
wasm.debug_panic();
};
module2.exports.__wbindgen_error_new = function(arg0, arg1) {
const ret = new Error(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);
};
module2.exports.__wbg_setmessage_e113e9fee2d41bd4 = function(arg0, arg1) {
global.PRISMA_WASM_PANIC_REGISTRY.set_message(getStringFromWasm0(arg0, arg1));
};
module2.exports.__wbindgen_throw = function(arg0, arg1) {
throw new Error(getStringFromWasm0(arg0, arg1));
};
var path38 = require("path").join(__dirname, "prisma_schema_build_bg.wasm");
var bytes = require("fs").readFileSync(path38);
var wasmModule = new WebAssembly.Module(bytes);
var wasmInstance = new WebAssembly.Instance(wasmModule, imports);
wasm = wasmInstance.exports;
module2.exports.__wasm = wasm;
}
});
// ../internals/package.json
var require_package2 = __commonJS({
"../internals/package.json"(exports2, module2) {
module2.exports = {
name: "@prisma/internals",
version: "5.0.0",
description: "This package is intended for Prisma's internal use",
main: "dist/index.js",
types: "dist/index.d.ts",
repository: {
type: "git",
url: "https://github.com/prisma/prisma.git",
directory: "packages/internals"
},
homepage: "https://www.prisma.io",
author: "Tim Suchanek <suchanek@prisma.io>",
bugs: "https://github.com/prisma/prisma/issues",
license: "Apache-2.0",
scripts: {
dev: "DEV=true node -r esbuild-register helpers/build.ts",
build: "node -r esbuild-register helpers/build.ts",
test: "jest --silent",
prepublishOnly: "pnpm run build"
},
files: [
"README.md",
"dist",
"!**/libquery_engine*",
"!dist/get-generators/engines/*",
"scripts"
],
devDependencies: {
"@swc/core": "1.2.204",
"@swc/jest": "0.2.26",
"@types/jest": "29.5.2",
"@types/node": "18.16.19",
"@types/resolve": "1.20.2",
esbuild: "0.15.13",
jest: "29.6.0",
"jest-junit": "16.0.0",
"mock-stdin": "1.0.0",
"ts-node": "10.9.1",
typescript: "4.9.5",
yarn: "1.22.19"
},
dependencies: {
"@antfu/ni": "0.21.4",
"@opentelemetry/api": "1.4.1",
"@prisma/debug": "workspace:*",
"@prisma/engines": "workspace:*",
"@prisma/fetch-engine": "workspace:*",
"@prisma/generator-helper": "workspace:*",
"@prisma/get-platform": "workspace:*",
"@prisma/prisma-schema-wasm": "4.17.0-26.6b0aef69b7cdfc787f822ecd7cdc76d5f1991584",
archiver: "5.3.1",
arg: "5.0.2",
"checkpoint-client": "1.1.24",
"cli-truncate": "2.1.0",
dotenv: "16.0.3",
"escape-string-regexp": "4.0.0",
execa: "5.1.1",
"find-up": "5.0.0",
"fp-ts": "2.16.0",
"fs-extra": "11.1.1",
"fs-jetpack": "5.1.0",
"global-dirs": "3.0.1",
globby: "11.1.0",
"indent-string": "4.0.0",
"is-windows": "1.0.2",
"is-wsl": "2.2.0",
kleur: "4.1.5",
"new-github-issue-url": "0.2.1",
"node-fetch": "2.6.12",
"npm-packlist": "5.1.3",
open: "7.4.2",
"p-map": "4.0.0",
prompts: "2.4.2",
"read-pkg-up": "7.0.1",
"replace-string": "3.1.0",
resolve: "1.22.2",
"string-width": "4.2.3",
"strip-ansi": "6.0.1",
"strip-indent": "3.0.0",
"temp-dir": "2.0.0",
"temp-write": "4.0.0",
tempy: "1.0.1",
"terminal-link": "2.1.1",
tmp: "0.2.1",
"ts-pattern": "4.3.0"
},
sideEffects: false
};
}
});
// ../../node_modules/.pnpm/ansi-escapes@4.3.2/node_modules/ansi-escapes/index.js
var require_ansi_escapes = __commonJS({
"../../node_modules/.pnpm/ansi-escapes@4.3.2/node_modules/ansi-escapes/index.js"(exports2, module2) {
"use strict";
var ansiEscapes2 = module2.exports;
module2.exports.default = ansiEscapes2;
var ESC2 = "\x1B[";
var OSC2 = "\x1B]";
var BEL2 = "\x07";
var SEP2 = ";";
var isTerminalApp2 = process.env.TERM_PROGRAM === "Apple_Terminal";
ansiEscapes2.cursorTo = (x, y3) => {
if (typeof x !== "number") {
throw new TypeError("The `x` argument is required");
}
if (typeof y3 !== "number") {
return ESC2 + (x + 1) + "G";
}
return ESC2 + (y3 + 1) + ";" + (x + 1) + "H";
};
ansiEscapes2.cursorMove = (x, y3) => {
if (typeof x !== "number") {
throw new TypeError("The `x` argument is required");
}
let ret = "";
if (x < 0) {
ret += ESC2 + -x + "D";
} else if (x > 0) {
ret += ESC2 + x + "C";
}
if (y3 < 0) {
ret += ESC2 + -y3 + "A";
} else if (y3 > 0) {
ret += ESC2 + y3 + "B";
}
return ret;
};
ansiEscapes2.cursorUp = (count = 1) => ESC2 + count + "A";
ansiEscapes2.cursorDown = (count = 1) => ESC2 + count + "B";
ansiEscapes2.cursorForward = (count = 1) => ESC2 + count + "C";
ansiEscapes2.cursorBackward = (count = 1) => ESC2 + count + "D";
ansiEscapes2.cursorLeft = ESC2 + "G";
ansiEscapes2.cursorSavePosition = isTerminalApp2 ? "\x1B7" : ESC2 + "s";
ansiEscapes2.cursorRestorePosition = isTerminalApp2 ? "\x1B8" : ESC2 + "u";
ansiEscapes2.cursorGetPosition = ESC2 + "6n";
ansiEscapes2.cursorNextLine = ESC2 + "E";
ansiEscapes2.cursorPrevLine = ESC2 + "F";
ansiEscapes2.cursorHide = ESC2 + "?25l";
ansiEscapes2.cursorShow = ESC2 + "?25h";
ansiEscapes2.eraseLines = (count) => {
let clear2 = "";
for (let i2 = 0; i2 < count; i2++) {
clear2 += ansiEscapes2.eraseLine + (i2 < count - 1 ? ansiEscapes2.cursorUp() : "");
}
if (count) {
clear2 += ansiEscapes2.cursorLeft;
}
return clear2;
};
ansiEscapes2.eraseEndLine = ESC2 + "K";
ansiEscapes2.eraseStartLine = ESC2 + "1K";
ansiEscapes2.eraseLine = ESC2 + "2K";
ansiEscapes2.eraseDown = ESC2 + "J";
ansiEscapes2.eraseUp = ESC2 + "1J";
ansiEscapes2.eraseScreen = ESC2 + "2J";
ansiEscapes2.scrollUp = ESC2 + "S";
ansiEscapes2.scrollDown = ESC2 + "T";
ansiEscapes2.clearScreen = "\x1Bc";
ansiEscapes2.clearTerminal = process.platform === "win32" ? `${ansiEscapes2.eraseScreen}${ESC2}0f` : `${ansiEscapes2.eraseScreen}${ESC2}3J${ESC2}H`;
ansiEscapes2.beep = BEL2;
ansiEscapes2.link = (text2, url2) => {
return [
OSC2,
"8",
SEP2,
SEP2,
url2,
BEL2,
text2,
OSC2,
"8",
SEP2,
SEP2,
BEL2
].join("");
};
ansiEscapes2.image = (buffer, options2 = {}) => {
let ret = `${OSC2}1337;File=inline=1`;
if (options2.width) {
ret += `;width=${options2.width}`;
}
if (options2.height) {
ret += `;height=${options2.height}`;
}
if (options2.preserveAspectRatio === false) {
ret += ";preserveAspectRatio=0";
}
return ret + ":" + buffer.toString("base64") + BEL2;
};
ansiEscapes2.iTerm = {
setCwd: (cwd = process.cwd()) => `${OSC2}50;CurrentDir=${cwd}${BEL2}`,
annotation: (message2, options2 = {}) => {
let ret = `${OSC2}1337;`;
const hasX = typeof options2.x !== "undefined";
const hasY = typeof options2.y !== "undefined";
if ((hasX || hasY) && !(hasX && hasY && typeof options2.length !== "undefined")) {
throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");
}
message2 = message2.replace(/\|/g, "");
ret += options2.isHidden ? "AddHiddenAnnotation=" : "AddAnnotation=";
if (options2.length > 0) {
ret += (hasX ? [message2, options2.length, options2.x, options2.y] : [options2.length, message2]).join("|");
} else {
ret += message2;
}
return ret + BEL2;
}
};
}
});
// ../../node_modules/.pnpm/supports-hyperlinks@2.3.0/node_modules/supports-hyperlinks/index.js
var require_supports_hyperlinks = __commonJS({
"../../node_modules/.pnpm/supports-hyperlinks@2.3.0/node_modules/supports-hyperlinks/index.js"(exports2, module2) {
"use strict";
var supportsColor2 = require_supports_color();
var hasFlag2 = require_has_flag();
function parseVersion2(versionString) {
if (/^\d{3,4}$/.test(versionString)) {
const m3 = /(\d{1,2})(\d{2})/.exec(versionString);
return {
major: 0,
minor: parseInt(m3[1], 10),
patch: parseInt(m3[2], 10)
};
}
const versions = (versionString || "").split(".").map((n2) => parseInt(n2, 10));
return {
major: versions[0],
minor: versions[1],
patch: versions[2]
};
}
function supportsHyperlink2(stream4) {
const { env: env3 } = process;
if ("FORCE_HYPERLINK" in env3) {
return !(env3.FORCE_HYPERLINK.length > 0 && parseInt(env3.FORCE_HYPERLINK, 10) === 0);
}
if (hasFlag2("no-hyperlink") || hasFlag2("no-hyperlinks") || hasFlag2("hyperlink=false") || hasFlag2("hyperlink=never")) {
return false;
}
if (hasFlag2("hyperlink=true") || hasFlag2("hyperlink=always")) {
return true;
}
if ("NETLIFY" in env3) {
return true;
}
if (!supportsColor2.supportsColor(stream4)) {
return false;
}
if (stream4 && !stream4.isTTY) {
return false;
}
if (process.platform === "win32") {
return false;
}
if ("CI" in env3) {
return false;
}
if ("TEAMCITY_VERSION" in env3) {
return false;
}
if ("TERM_PROGRAM" in env3) {
const version3 = parseVersion2(env3.TERM_PROGRAM_VERSION);
switch (env3.TERM_PROGRAM) {
case "iTerm.app":
if (version3.major === 3) {
return version3.minor >= 1;
}
return version3.major > 3;
case "WezTerm":
return version3.major >= 20200620;
case "vscode":
return version3.major > 1 || version3.major === 1 && version3.minor >= 72;
}
}
if ("VTE_VERSION" in env3) {
if (env3.VTE_VERSION === "0.50.0") {
return false;
}
const version3 = parseVersion2(env3.VTE_VERSION);
return version3.major > 0 || version3.minor >= 50;
}
return false;
}
module2.exports = {
supportsHyperlink: supportsHyperlink2,
stdout: supportsHyperlink2(process.stdout),
stderr: supportsHyperlink2(process.stderr)
};
}
});
// ../../node_modules/.pnpm/terminal-link@2.1.1/node_modules/terminal-link/index.js
var require_terminal_link = __commonJS({
"../../node_modules/.pnpm/terminal-link@2.1.1/node_modules/terminal-link/index.js"(exports2, module2) {
"use strict";
var ansiEscapes2 = require_ansi_escapes();
var supportsHyperlinks2 = require_supports_hyperlinks();
var terminalLink4 = (text2, url2, { target = "stdout", ...options2 } = {}) => {
if (!supportsHyperlinks2[target]) {
if (options2.fallback === false) {
return text2;
}
return typeof options2.fallback === "function" ? options2.fallback(text2, url2) : `${text2} (\u200B${url2}\u200B)`;
}
return ansiEscapes2.link(text2, url2);
};
module2.exports = (text2, url2, options2 = {}) => terminalLink4(text2, url2, options2);
module2.exports.stderr = (text2, url2, options2 = {}) => terminalLink4(text2, url2, { target: "stderr", ...options2 });
module2.exports.isSupported = supportsHyperlinks2.stdout;
module2.exports.stderr.isSupported = supportsHyperlinks2.stderr;
}
});
// ../../node_modules/.pnpm/crypto-random-string@2.0.0/node_modules/crypto-random-string/index.js
var require_crypto_random_string = __commonJS({
"../../node_modules/.pnpm/crypto-random-string@2.0.0/node_modules/crypto-random-string/index.js"(exports2, module2) {
"use strict";
var crypto4 = require("crypto");
module2.exports = (length) => {
if (!Number.isFinite(length)) {
throw new TypeError("Expected a finite number");
}
return crypto4.randomBytes(Math.ceil(length / 2)).toString("hex").slice(0, length);
};
}
});
// ../../node_modules/.pnpm/unique-string@2.0.0/node_modules/unique-string/index.js
var require_unique_string = __commonJS({
"../../node_modules/.pnpm/unique-string@2.0.0/node_modules/unique-string/index.js"(exports2, module2) {
"use strict";
var cryptoRandomString = require_crypto_random_string();
module2.exports = () => cryptoRandomString(32);
}
});
// ../../node_modules/.pnpm/temp-dir@2.0.0/node_modules/temp-dir/index.js
var require_temp_dir = __commonJS({
"../../node_modules/.pnpm/temp-dir@2.0.0/node_modules/temp-dir/index.js"(exports2, module2) {
"use strict";
var fs40 = require("fs");
var os7 = require("os");
var tempDirectorySymbol = Symbol.for("__RESOLVED_TEMP_DIRECTORY__");
if (!global[tempDirectorySymbol]) {
Object.defineProperty(global, tempDirectorySymbol, {
value: fs40.realpathSync(os7.tmpdir())
});
}
module2.exports = global[tempDirectorySymbol];
}
});
// ../../node_modules/.pnpm/array-union@2.1.0/node_modules/array-union/index.js
var require_array_union = __commonJS({
"../../node_modules/.pnpm/array-union@2.1.0/node_modules/array-union/index.js"(exports2, module2) {
"use strict";
module2.exports = (...arguments_) => {
return [...new Set([].concat(...arguments_))];
};
}
});
// ../../node_modules/.pnpm/merge2@1.4.1/node_modules/merge2/index.js
var require_merge2 = __commonJS({
"../../node_modules/.pnpm/merge2@1.4.1/node_modules/merge2/index.js"(exports2, module2) {
"use strict";
var Stream2 = require("stream");
var PassThrough3 = Stream2.PassThrough;
var slice = Array.prototype.slice;
module2.exports = merge2;
function merge2() {
const streamsQueue = [];
const args3 = slice.call(arguments);
let merging = false;
let options2 = args3[args3.length - 1];
if (options2 && !Array.isArray(options2) && options2.pipe == null) {
args3.pop();
} else {
options2 = {};
}
const doEnd = options2.end !== false;
const doPipeError = options2.pipeError === true;
if (options2.objectMode == null) {
options2.objectMode = true;
}
if (options2.highWaterMark == null) {
options2.highWaterMark = 64 * 1024;
}
const mergedStream = PassThrough3(options2);
function addStream() {
for (let i2 = 0, len = arguments.length; i2 < len; i2++) {
streamsQueue.push(pauseStreams(arguments[i2], options2));
}
mergeStream2();
return this;
}
function mergeStream2() {
if (merging) {
return;
}
merging = true;
let streams = streamsQueue.shift();
if (!streams) {
process.nextTick(endStream);
return;
}
if (!Array.isArray(streams)) {
streams = [streams];
}
let pipesCount = streams.length + 1;
function next() {
if (--pipesCount > 0) {
return;
}
merging = false;
mergeStream2();
}
function pipe9(stream4) {
function onend() {
stream4.removeListener("merge2UnpipeEnd", onend);
stream4.removeListener("end", onend);
if (doPipeError) {
stream4.removeListener("error", onerror);
}
next();
}
function onerror(err) {
mergedStream.emit("error", err);
}
if (stream4._readableState.endEmitted) {
return next();
}
stream4.on("merge2UnpipeEnd", onend);
stream4.on("end", onend);
if (doPipeError) {
stream4.on("error", onerror);
}
stream4.pipe(mergedStream, { end: false });
stream4.resume();
}
for (let i2 = 0; i2 < streams.length; i2++) {
pipe9(streams[i2]);
}
next();
}
function endStream() {
merging = false;
mergedStream.emit("queueDrain");
if (doEnd) {
mergedStream.end();
}
}
mergedStream.setMaxListeners(0);
mergedStream.add = addStream;
mergedStream.on("unpipe", function(stream4) {
stream4.emit("merge2UnpipeEnd");
});
if (args3.length) {
addStream.apply(null, args3);
}
return mergedStream;
}
function pauseStreams(streams, options2) {
if (!Array.isArray(streams)) {
if (!streams._readableState && streams.pipe) {
streams = streams.pipe(PassThrough3(options2));
}
if (!streams._readableState || !streams.pause || !streams.pipe) {
throw new Error("Only readable stream can be merged.");
}
streams.pause();
} else {
for (let i2 = 0, len = streams.length; i2 < len; i2++) {
streams[i2] = pauseStreams(streams[i2], options2);
}
}
return streams;
}
}
});
// ../../node_modules/.pnpm/fast-glob@3.3.0/node_modules/fast-glob/out/utils/array.js
var require_array = __commonJS({
"../../node_modules/.pnpm/fast-glob@3.3.0/node_modules/fast-glob/out/utils/array.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.splitWhen = exports2.flatten = void 0;
function flatten(items) {
return items.reduce((collection, item2) => [].concat(collection, item2), []);
}
exports2.flatten = flatten;
function splitWhen(items, predicate) {
const result = [[]];
let groupIndex = 0;
for (const item2 of items) {
if (predicate(item2)) {
groupIndex++;
result[groupIndex] = [];
} else {
result[groupIndex].push(item2);
}
}
return result;
}
exports2.splitWhen = splitWhen;
}
});
// ../../node_modules/.pnpm/fast-glob@3.3.0/node_modules/fast-glob/out/utils/errno.js
var require_errno = __commonJS({
"../../node_modules/.pnpm/fast-glob@3.3.0/node_modules/fast-glob/out/utils/errno.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.isEnoentCodeError = void 0;
function isEnoentCodeError(error2) {
return error2.code === "ENOENT";
}
exports2.isEnoentCodeError = isEnoentCodeError;
}
});
// ../../node_modules/.pnpm/fast-glob@3.3.0/node_modules/fast-glob/out/utils/fs.js
var require_fs = __commonJS({
"../../node_modules/.pnpm/fast-glob@3.3.0/node_modules/fast-glob/out/utils/fs.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.createDirentFromStats = void 0;
var DirentFromStats = class {
constructor(name, stats) {
this.name = name;
this.isBlockDevice = stats.isBlockDevice.bind(stats);
this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
this.isDirectory = stats.isDirectory.bind(stats);
this.isFIFO = stats.isFIFO.bind(stats);
this.isFile = stats.isFile.bind(stats);
this.isSocket = stats.isSocket.bind(stats);
this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
}
};
function createDirentFromStats(name, stats) {
return new DirentFromStats(name, stats);
}
exports2.createDirentFromStats = createDirentFromStats;
}
});
// ../../node_modules/.pnpm/fast-glob@3.3.0/node_modules/fast-glob/out/utils/path.js
var require_path = __commonJS({
"../../node_modules/.pnpm/fast-glob@3.3.0/node_modules/fast-glob/out/utils/path.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.convertPosixPathToPattern = exports2.convertWindowsPathToPattern = exports2.convertPathToPattern = exports2.escapePosixPath = exports2.escapeWindowsPath = exports2.escape = exports2.removeLeadingDotSegment = exports2.makeAbsolute = exports2.unixify = void 0;
var os7 = require("os");
var path38 = require("path");
var IS_WINDOWS_PLATFORM = os7.platform() === "win32";
var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
var WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([(){}]|^!|[!+@](?=\())/g;
var DOS_DEVICE_PATH_RE = /^\\\\([.?])/;
var WINDOWS_BACKSLASHES_RE = /\\(?![!()+@{}])/g;
function unixify(filepath) {
return filepath.replace(/\\/g, "/");
}
exports2.unixify = unixify;
function makeAbsolute(cwd, filepath) {
return path38.resolve(cwd, filepath);
}
exports2.makeAbsolute = makeAbsolute;
function removeLeadingDotSegment(entry) {
if (entry.charAt(0) === ".") {
const secondCharactery = entry.charAt(1);
if (secondCharactery === "/" || secondCharactery === "\\") {
return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT);
}
}
return entry;
}
exports2.removeLeadingDotSegment = removeLeadingDotSegment;
exports2.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath;
function escapeWindowsPath(pattern) {
return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
}
exports2.escapeWindowsPath = escapeWindowsPath;
function escapePosixPath(pattern) {
return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
}
exports2.escapePosixPath = escapePosixPath;
exports2.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern;
function convertWindowsPathToPattern(filepath) {
return escapeWindowsPath(filepath).replace(DOS_DEVICE_PATH_RE, "//$1").replace(WINDOWS_BACKSLASHES_RE, "/");
}
exports2.convertWindowsPathToPattern = convertWindowsPathToPattern;
function convertPosixPathToPattern(filepath) {
return escapePosixPath(filepath);
}
exports2.convertPosixPathToPattern = convertPosixPathToPattern;
}
});
// ../../node_modules/.pnpm/is-extglob@2.1.1/node_modules/is-extglob/index.js
var require_is_extglob = __commonJS({
"../../node_modules/.pnpm/is-extglob@2.1.1/node_modules/is-extglob/index.js"(exports2, module2) {
module2.exports = function isExtglob(str) {
if (typeof str !== "string" || str === "") {
return false;
}
var match4;
while (match4 = /(\\).|([@?!+*]\(.*\))/g.exec(str)) {
if (match4[2])
return true;
str = str.slice(match4.index + match4[0].length);
}
return false;
};
}
});
// ../../node_modules/.pnpm/is-glob@4.0.3/node_modules/is-glob/index.js
var require_is_glob = __commonJS({
"../../node_modules/.pnpm/is-glob@4.0.3/node_modules/is-glob/index.js"(exports2, module2) {
var isExtglob = require_is_extglob();
var chars2 = { "{": "}", "(": ")", "[": "]" };
var strictCheck = function(str) {
if (str[0] === "!") {
return true;
}
var index2 = 0;
var pipeIndex = -2;
var closeSquareIndex = -2;
var closeCurlyIndex = -2;
var closeParenIndex = -2;
var backSlashIndex = -2;
while (index2 < str.length) {
if (str[index2] === "*") {
return true;
}
if (str[index2 + 1] === "?" && /[\].+)]/.test(str[index2])) {
return true;
}
if (closeSquareIndex !== -1 && str[index2] === "[" && str[index2 + 1] !== "]") {
if (closeSquareIndex < index2) {
closeSquareIndex = str.indexOf("]", index2);
}
if (closeSquareIndex > index2) {
if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
return true;
}
backSlashIndex = str.indexOf("\\", index2);
if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
return true;
}
}
}
if (closeCurlyIndex !== -1 && str[index2] === "{" && str[index2 + 1] !== "}") {
closeCurlyIndex = str.indexOf("}", index2);
if (closeCurlyIndex > index2) {
backSlashIndex = str.indexOf("\\", index2);
if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) {
return true;
}
}
}
if (closeParenIndex !== -1 && str[index2] === "(" && str[index2 + 1] === "?" && /[:!=]/.test(str[index2 + 2]) && str[index2 + 3] !== ")") {
closeParenIndex = str.indexOf(")", index2);
if (closeParenIndex > index2) {
backSlashIndex = str.indexOf("\\", index2);
if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
return true;
}
}
}
if (pipeIndex !== -1 && str[index2] === "(" && str[index2 + 1] !== "|") {
if (pipeIndex < index2) {
pipeIndex = str.indexOf("|", index2);
}
if (pipeIndex !== -1 && str[pipeIndex + 1] !== ")") {
closeParenIndex = str.indexOf(")", pipeIndex);
if (closeParenIndex > pipeIndex) {
backSlashIndex = str.indexOf("\\", pipeIndex);
if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
return true;
}
}
}
}
if (str[index2] === "\\") {
var open4 = str[index2 + 1];
index2 += 2;
var close2 = chars2[open4];
if (close2) {
var n2 = str.indexOf(close2, index2);
if (n2 !== -1) {
index2 = n2 + 1;
}
}
if (str[index2] === "!") {
return true;
}
} else {
index2++;
}
}
return false;
};
var relaxedCheck = function(str) {
if (str[0] === "!") {
return true;
}
var index2 = 0;
while (index2 < str.length) {
if (/[*?{}()[\]]/.test(str[index2])) {
return true;
}
if (str[index2] === "\\") {
var open4 = str[index2 + 1];
index2 += 2;
var close2 = chars2[open4];
if (close2) {
var n2 = str.indexOf(close2, index2);
if (n2 !== -1) {
index2 = n2 + 1;
}
}
if (str[index2] === "!") {
return true;
}
} else {
index2++;
}
}
return false;
};
module2.exports = function isGlob(str, options2) {
if (typeof str !== "string" || str === "") {
return false;
}
if (isExtglob(str)) {
return true;
}
var check3 = strictCheck;
if (options2 && options2.strict === false) {
check3 = relaxedCheck;
}
return check3(str);
};
}
});
// ../../node_modules/.pnpm/glob-parent@5.1.2/node_modules/glob-parent/index.js
var require_glob_parent = __commonJS({
"../../node_modules/.pnpm/glob-parent@5.1.2/node_modules/glob-parent/index.js"(exports2, module2) {
"use strict";
var isGlob = require_is_glob();
var pathPosixDirname = require("path").posix.dirname;
var isWin32 = require("os").platform() === "win32";
var slash = "/";
var backslash = /\\/g;
var enclosure = /[\{\[].*[\}\]]$/;
var globby3 = /(^|[^\\])([\{\[]|\([^\)]+$)/;
var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g;
module2.exports = function globParent(str, opts2) {
var options2 = Object.assign({ flipBackslashes: true }, opts2);
if (options2.flipBackslashes && isWin32 && str.indexOf(slash) < 0) {
str = str.replace(backslash, slash);
}
if (enclosure.test(str)) {
str += slash;
}
str += "a";
do {
str = pathPosixDirname(str);
} while (isGlob(str) || globby3.test(str));
return str.replace(escaped, "$1");
};
}
});
// ../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/utils.js
var require_utils = __commonJS({
"../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/utils.js"(exports2) {
"use strict";
exports2.isInteger = (num) => {
if (typeof num === "number") {
return Number.isInteger(num);
}
if (typeof num === "string" && num.trim() !== "") {
return Number.isInteger(Number(num));
}
return false;
};
exports2.find = (node, type) => node.nodes.find((node2) => node2.type === type);
exports2.exceedsLimit = (min, max, step = 1, limit) => {
if (limit === false)
return false;
if (!exports2.isInteger(min) || !exports2.isInteger(max))
return false;
return (Number(max) - Number(min)) / Number(step) >= limit;
};
exports2.escapeNode = (block, n2 = 0, type) => {
let node = block.nodes[n2];
if (!node)
return;
if (type && node.type === type || node.type === "open" || node.type === "close") {
if (node.escaped !== true) {
node.value = "\\" + node.value;
node.escaped = true;
}
}
};
exports2.encloseBrace = (node) => {
if (node.type !== "brace")
return false;
if (node.commas >> 0 + node.ranges >> 0 === 0) {
node.invalid = true;
return true;
}
return false;
};
exports2.isInvalidBrace = (block) => {
if (block.type !== "brace")
return false;
if (block.invalid === true || block.dollar)
return true;
if (block.commas >> 0 + block.ranges >> 0 === 0) {
block.invalid = true;
return true;
}
if (block.open !== true || block.close !== true) {
block.invalid = true;
return true;
}
return false;
};
exports2.isOpenOrClose = (node) => {
if (node.type === "open" || node.type === "close") {
return true;
}
return node.open === true || node.close === true;
};
exports2.reduce = (nodes) => nodes.reduce((acc, node) => {
if (node.type === "text")
acc.push(node.value);
if (node.type === "range")
node.type = "text";
return acc;
}, []);
exports2.flatten = (...args3) => {
const result = [];
const flat = (arr) => {
for (let i2 = 0; i2 < arr.length; i2++) {
let ele = arr[i2];
Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele);
}
return result;
};
flat(args3);
return result;
};
}
});
// ../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/stringify.js
var require_stringify = __commonJS({
"../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/stringify.js"(exports2, module2) {
"use strict";
var utils = require_utils();
module2.exports = (ast, options2 = {}) => {
let stringify = (node, parent2 = {}) => {
let invalidBlock = options2.escapeInvalid && utils.isInvalidBrace(parent2);
let invalidNode = node.invalid === true && options2.escapeInvalid === true;
let output = "";
if (node.value) {
if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {
return "\\" + node.value;
}
return node.value;
}
if (node.value) {
return node.value;
}
if (node.nodes) {
for (let child of node.nodes) {
output += stringify(child);
}
}
return output;
};
return stringify(ast);
};
}
});
// ../../node_modules/.pnpm/is-number@7.0.0/node_modules/is-number/index.js
var require_is_number = __commonJS({
"../../node_modules/.pnpm/is-number@7.0.0/node_modules/is-number/index.js"(exports2, module2) {
"use strict";
module2.exports = function(num) {
if (typeof num === "number") {
return num - num === 0;
}
if (typeof num === "string" && num.trim() !== "") {
return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
}
return false;
};
}
});
// ../../node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.js
var require_to_regex_range = __commonJS({
"../../node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.js"(exports2, module2) {
"use strict";
var isNumber2 = require_is_number();
var toRegexRange = (min, max, options2) => {
if (isNumber2(min) === false) {
throw new TypeError("toRegexRange: expected the first argument to be a number");
}
if (max === void 0 || min === max) {
return String(min);
}
if (isNumber2(max) === false) {
throw new TypeError("toRegexRange: expected the second argument to be a number.");
}
let opts2 = { relaxZeros: true, ...options2 };
if (typeof opts2.strictZeros === "boolean") {
opts2.relaxZeros = opts2.strictZeros === false;
}
let relax = String(opts2.relaxZeros);
let shorthand = String(opts2.shorthand);
let capture = String(opts2.capture);
let wrap3 = String(opts2.wrap);
let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap3;
if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
return toRegexRange.cache[cacheKey].result;
}
let a2 = Math.min(min, max);
let b2 = Math.max(min, max);
if (Math.abs(a2 - b2) === 1) {
let result = min + "|" + max;
if (opts2.capture) {
return `(${result})`;
}
if (opts2.wrap === false) {
return result;
}
return `(?:${result})`;
}
let isPadded = hasPadding(min) || hasPadding(max);
let state = { min, max, a: a2, b: b2 };
let positives = [];
let negatives = [];
if (isPadded) {
state.isPadded = isPadded;
state.maxLen = String(state.max).length;
}
if (a2 < 0) {
let newMin = b2 < 0 ? Math.abs(b2) : 1;
negatives = splitToPatterns(newMin, Math.abs(a2), state, opts2);
a2 = state.a = 0;
}
if (b2 >= 0) {
positives = splitToPatterns(a2, b2, state, opts2);
}
state.negatives = negatives;
state.positives = positives;
state.result = collatePatterns(negatives, positives, opts2);
if (opts2.capture === true) {
state.result = `(${state.result})`;
} else if (opts2.wrap !== false && positives.length + negatives.length > 1) {
state.result = `(?:${state.result})`;
}
toRegexRange.cache[cacheKey] = state;
return state.result;
};
function collatePatterns(neg, pos2, options2) {
let onlyNegative = filterPatterns(neg, pos2, "-", false, options2) || [];
let onlyPositive = filterPatterns(pos2, neg, "", false, options2) || [];
let intersected = filterPatterns(neg, pos2, "-?", true, options2) || [];
let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
return subpatterns.join("|");
}
function splitToRanges(min, max) {
let nines = 1;
let zeros = 1;
let stop = countNines(min, nines);
let stops = /* @__PURE__ */ new Set([max]);
while (min <= stop && stop <= max) {
stops.add(stop);
nines += 1;
stop = countNines(min, nines);
}
stop = countZeros(max + 1, zeros) - 1;
while (min < stop && stop <= max) {
stops.add(stop);
zeros += 1;
stop = countZeros(max + 1, zeros) - 1;
}
stops = [...stops];
stops.sort(compare);
return stops;
}
function rangeToPattern(start, stop, options2) {
if (start === stop) {
return { pattern: start, count: [], digits: 0 };
}
let zipped = zip(start, stop);
let digits = zipped.length;
let pattern = "";
let count = 0;
for (let i2 = 0; i2 < digits; i2++) {
let [startDigit, stopDigit] = zipped[i2];
if (startDigit === stopDigit) {
pattern += startDigit;
} else if (startDigit !== "0" || stopDigit !== "9") {
pattern += toCharacterClass(startDigit, stopDigit, options2);
} else {
count++;
}
}
if (count) {
pattern += options2.shorthand === true ? "\\d" : "[0-9]";
}
return { pattern, count: [count], digits };
}
function splitToPatterns(min, max, tok, options2) {
let ranges = splitToRanges(min, max);
let tokens = [];
let start = min;
let prev;
for (let i2 = 0; i2 < ranges.length; i2++) {
let max2 = ranges[i2];
let obj = rangeToPattern(String(start), String(max2), options2);
let zeros = "";
if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
if (prev.count.length > 1) {
prev.count.pop();
}
prev.count.push(obj.count[0]);
prev.string = prev.pattern + toQuantifier(prev.count);
start = max2 + 1;
continue;
}
if (tok.isPadded) {
zeros = padZeros(max2, tok, options2);
}
obj.string = zeros + obj.pattern + toQuantifier(obj.count);
tokens.push(obj);
start = max2 + 1;
prev = obj;
}
return tokens;
}
function filterPatterns(arr, comparison, prefix, intersection, options2) {
let result = [];
for (let ele of arr) {
let { string } = ele;
if (!intersection && !contains(comparison, "string", string)) {
result.push(prefix + string);
}
if (intersection && contains(comparison, "string", string)) {
result.push(prefix + string);
}
}
return result;
}
function zip(a2, b2) {
let arr = [];
for (let i2 = 0; i2 < a2.length; i2++)
arr.push([a2[i2], b2[i2]]);
return arr;
}
function compare(a2, b2) {
return a2 > b2 ? 1 : b2 > a2 ? -1 : 0;
}
function contains(arr, key, val) {
return arr.some((ele) => ele[key] === val);
}
function countNines(min, len) {
return Number(String(min).slice(0, -len) + "9".repeat(len));
}
function countZeros(integer, zeros) {
return integer - integer % Math.pow(10, zeros);
}
function toQuantifier(digits) {
let [start = 0, stop = ""] = digits;
if (stop || start > 1) {
return `{${start + (stop ? "," + stop : "")}}`;
}
return "";
}
function toCharacterClass(a2, b2, options2) {
return `[${a2}${b2 - a2 === 1 ? "" : "-"}${b2}]`;
}
function hasPadding(str) {
return /^-?(0+)\d/.test(str);
}
function padZeros(value, tok, options2) {
if (!tok.isPadded) {
return value;
}
let diff = Math.abs(tok.maxLen - String(value).length);
let relax = options2.relaxZeros !== false;
switch (diff) {
case 0:
return "";
case 1:
return relax ? "0?" : "0";
case 2:
return relax ? "0{0,2}" : "00";
default: {
return relax ? `0{0,${diff}}` : `0{${diff}}`;
}
}
}
toRegexRange.cache = {};
toRegexRange.clearCache = () => toRegexRange.cache = {};
module2.exports = toRegexRange;
}
});
// ../../node_modules/.pnpm/fill-range@7.0.1/node_modules/fill-range/index.js
var require_fill_range = __commonJS({
"../../node_modules/.pnpm/fill-range@7.0.1/node_modules/fill-range/index.js"(exports2, module2) {
"use strict";
var util5 = require("util");
var toRegexRange = require_to_regex_range();
var isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
var transform2 = (toNumber) => {
return (value) => toNumber === true ? Number(value) : String(value);
};
var isValidValue = (value) => {
return typeof value === "number" || typeof value === "string" && value !== "";
};
var isNumber2 = (num) => Number.isInteger(+num);
var zeros = (input) => {
let value = `${input}`;
let index2 = -1;
if (value[0] === "-")
value = value.slice(1);
if (value === "0")
return false;
while (value[++index2] === "0")
;
return index2 > 0;
};
var stringify = (start, end, options2) => {
if (typeof start === "string" || typeof end === "string") {
return true;
}
return options2.stringify === true;
};
var pad = (input, maxLength, toNumber) => {
if (maxLength > 0) {
let dash = input[0] === "-" ? "-" : "";
if (dash)
input = input.slice(1);
input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0");
}
if (toNumber === false) {
return String(input);
}
return input;
};
var toMaxLen = (input, maxLength) => {
let negative = input[0] === "-" ? "-" : "";
if (negative) {
input = input.slice(1);
maxLength--;
}
while (input.length < maxLength)
input = "0" + input;
return negative ? "-" + input : input;
};
var toSequence = (parts, options2) => {
parts.negatives.sort((a2, b2) => a2 < b2 ? -1 : a2 > b2 ? 1 : 0);
parts.positives.sort((a2, b2) => a2 < b2 ? -1 : a2 > b2 ? 1 : 0);
let prefix = options2.capture ? "" : "?:";
let positives = "";
let negatives = "";
let result;
if (parts.positives.length) {
positives = parts.positives.join("|");
}
if (parts.negatives.length) {
negatives = `-(${prefix}${parts.negatives.join("|")})`;
}
if (positives && negatives) {
result = `${positives}|${negatives}`;
} else {
result = positives || negatives;
}
if (options2.wrap) {
return `(${prefix}${result})`;
}
return result;
};
var toRange = (a2, b2, isNumbers, options2) => {
if (isNumbers) {
return toRegexRange(a2, b2, { wrap: false, ...options2 });
}
let start = String.fromCharCode(a2);
if (a2 === b2)
return start;
let stop = String.fromCharCode(b2);
return `[${start}-${stop}]`;
};
var toRegex = (start, end, options2) => {
if (Array.isArray(start)) {
let wrap3 = options2.wrap === true;
let prefix = options2.capture ? "" : "?:";
return wrap3 ? `(${prefix}${start.join("|")})` : start.join("|");
}
return toRegexRange(start, end, options2);
};
var rangeError = (...args3) => {
return new RangeError("Invalid range arguments: " + util5.inspect(...args3));
};
var invalidRange = (start, end, options2) => {
if (options2.strictRanges === true)
throw rangeError([start, end]);
return [];
};
var invalidStep = (step, options2) => {
if (options2.strictRanges === true) {
throw new TypeError(`Expected step "${step}" to be a number`);
}
return [];
};
var fillNumbers = (start, end, step = 1, options2 = {}) => {
let a2 = Number(start);
let b2 = Number(end);
if (!Number.isInteger(a2) || !Number.isInteger(b2)) {
if (options2.strictRanges === true)
throw rangeError([start, end]);
return [];
}
if (a2 === 0)
a2 = 0;
if (b2 === 0)
b2 = 0;
let descending = a2 > b2;
let startString = String(start);
let endString = String(end);
let stepString = String(step);
step = Math.max(Math.abs(step), 1);
let padded = zeros(startString) || zeros(endString) || zeros(stepString);
let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
let toNumber = padded === false && stringify(start, end, options2) === false;
let format2 = options2.transform || transform2(toNumber);
if (options2.toRegex && step === 1) {
return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options2);
}
let parts = { negatives: [], positives: [] };
let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num));
let range2 = [];
let index2 = 0;
while (descending ? a2 >= b2 : a2 <= b2) {
if (options2.toRegex === true && step > 1) {
push(a2);
} else {
range2.push(pad(format2(a2, index2), maxLen, toNumber));
}
a2 = descending ? a2 - step : a2 + step;
index2++;
}
if (options2.toRegex === true) {
return step > 1 ? toSequence(parts, options2) : toRegex(range2, null, { wrap: false, ...options2 });
}
return range2;
};
var fillLetters = (start, end, step = 1, options2 = {}) => {
if (!isNumber2(start) && start.length > 1 || !isNumber2(end) && end.length > 1) {
return invalidRange(start, end, options2);
}
let format2 = options2.transform || ((val) => String.fromCharCode(val));
let a2 = `${start}`.charCodeAt(0);
let b2 = `${end}`.charCodeAt(0);
let descending = a2 > b2;
let min = Math.min(a2, b2);
let max = Math.max(a2, b2);
if (options2.toRegex && step === 1) {
return toRange(min, max, false, options2);
}
let range2 = [];
let index2 = 0;
while (descending ? a2 >= b2 : a2 <= b2) {
range2.push(format2(a2, index2));
a2 = descending ? a2 - step : a2 + step;
index2++;
}
if (options2.toRegex === true) {
return toRegex(range2, null, { wrap: false, options: options2 });
}
return range2;
};
var fill = (start, end, step, options2 = {}) => {
if (end == null && isValidValue(start)) {
return [start];
}
if (!isValidValue(start) || !isValidValue(end)) {
return invalidRange(start, end, options2);
}
if (typeof step === "function") {
return fill(start, end, 1, { transform: step });
}
if (isObject(step)) {
return fill(start, end, 0, step);
}
let opts2 = { ...options2 };
if (opts2.capture === true)
opts2.wrap = true;
step = step || opts2.step || 1;
if (!isNumber2(step)) {
if (step != null && !isObject(step))
return invalidStep(step, opts2);
return fill(start, end, 1, step);
}
if (isNumber2(start) && isNumber2(end)) {
return fillNumbers(start, end, step, opts2);
}
return fillLetters(start, end, Math.max(Math.abs(step), 1), opts2);
};
module2.exports = fill;
}
});
// ../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/compile.js
var require_compile = __commonJS({
"../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/compile.js"(exports2, module2) {
"use strict";
var fill = require_fill_range();
var utils = require_utils();
var compile = (ast, options2 = {}) => {
let walk = (node, parent2 = {}) => {
let invalidBlock = utils.isInvalidBrace(parent2);
let invalidNode = node.invalid === true && options2.escapeInvalid === true;
let invalid = invalidBlock === true || invalidNode === true;
let prefix = options2.escapeInvalid === true ? "\\" : "";
let output = "";
if (node.isOpen === true) {
return prefix + node.value;
}
if (node.isClose === true) {
return prefix + node.value;
}
if (node.type === "open") {
return invalid ? prefix + node.value : "(";
}
if (node.type === "close") {
return invalid ? prefix + node.value : ")";
}
if (node.type === "comma") {
return node.prev.type === "comma" ? "" : invalid ? node.value : "|";
}
if (node.value) {
return node.value;
}
if (node.nodes && node.ranges > 0) {
let args3 = utils.reduce(node.nodes);
let range2 = fill(...args3, { ...options2, wrap: false, toRegex: true });
if (range2.length !== 0) {
return args3.length > 1 && range2.length > 1 ? `(${range2})` : range2;
}
}
if (node.nodes) {
for (let child of node.nodes) {
output += walk(child, node);
}
}
return output;
};
return walk(ast);
};
module2.exports = compile;
}
});
// ../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/expand.js
var require_expand = __commonJS({
"../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/expand.js"(exports2, module2) {
"use strict";
var fill = require_fill_range();
var stringify = require_stringify();
var utils = require_utils();
var append = (queue2 = "", stash = "", enclose = false) => {
let result = [];
queue2 = [].concat(queue2);
stash = [].concat(stash);
if (!stash.length)
return queue2;
if (!queue2.length) {
return enclose ? utils.flatten(stash).map((ele) => `{${ele}}`) : stash;
}
for (let item2 of queue2) {
if (Array.isArray(item2)) {
for (let value of item2) {
result.push(append(value, stash, enclose));
}
} else {
for (let ele of stash) {
if (enclose === true && typeof ele === "string")
ele = `{${ele}}`;
result.push(Array.isArray(ele) ? append(item2, ele, enclose) : item2 + ele);
}
}
}
return utils.flatten(result);
};
var expand = (ast, options2 = {}) => {
let rangeLimit = options2.rangeLimit === void 0 ? 1e3 : options2.rangeLimit;
let walk = (node, parent2 = {}) => {
node.queue = [];
let p2 = parent2;
let q = parent2.queue;
while (p2.type !== "brace" && p2.type !== "root" && p2.parent) {
p2 = p2.parent;
q = p2.queue;
}
if (node.invalid || node.dollar) {
q.push(append(q.pop(), stringify(node, options2)));
return;
}
if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
q.push(append(q.pop(), ["{}"]));
return;
}
if (node.nodes && node.ranges > 0) {
let args3 = utils.reduce(node.nodes);
if (utils.exceedsLimit(...args3, options2.step, rangeLimit)) {
throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
}
let range2 = fill(...args3, options2);
if (range2.length === 0) {
range2 = stringify(node, options2);
}
q.push(append(q.pop(), range2));
node.nodes = [];
return;
}
let enclose = utils.encloseBrace(node);
let queue2 = node.queue;
let block = node;
while (block.type !== "brace" && block.type !== "root" && block.parent) {
block = block.parent;
queue2 = block.queue;
}
for (let i2 = 0; i2 < node.nodes.length; i2++) {
let child = node.nodes[i2];
if (child.type === "comma" && node.type === "brace") {
if (i2 === 1)
queue2.push("");
queue2.push("");
continue;
}
if (child.type === "close") {
q.push(append(q.pop(), queue2, enclose));
continue;
}
if (child.value && child.type !== "open") {
queue2.push(append(queue2.pop(), child.value));
continue;
}
if (child.nodes) {
walk(child, node);
}
}
return queue2;
};
return utils.flatten(walk(ast));
};
module2.exports = expand;
}
});
// ../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/constants.js
var require_constants = __commonJS({
"../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/constants.js"(exports2, module2) {
"use strict";
module2.exports = {
MAX_LENGTH: 1024 * 64,
CHAR_0: "0",
CHAR_9: "9",
CHAR_UPPERCASE_A: "A",
CHAR_LOWERCASE_A: "a",
CHAR_UPPERCASE_Z: "Z",
CHAR_LOWERCASE_Z: "z",
CHAR_LEFT_PARENTHESES: "(",
CHAR_RIGHT_PARENTHESES: ")",
CHAR_ASTERISK: "*",
CHAR_AMPERSAND: "&",
CHAR_AT: "@",
CHAR_BACKSLASH: "\\",
CHAR_BACKTICK: "`",
CHAR_CARRIAGE_RETURN: "\r",
CHAR_CIRCUMFLEX_ACCENT: "^",
CHAR_COLON: ":",
CHAR_COMMA: ",",
CHAR_DOLLAR: "$",
CHAR_DOT: ".",
CHAR_DOUBLE_QUOTE: '"',
CHAR_EQUAL: "=",
CHAR_EXCLAMATION_MARK: "!",
CHAR_FORM_FEED: "\f",
CHAR_FORWARD_SLASH: "/",
CHAR_HASH: "#",
CHAR_HYPHEN_MINUS: "-",
CHAR_LEFT_ANGLE_BRACKET: "<",
CHAR_LEFT_CURLY_BRACE: "{",
CHAR_LEFT_SQUARE_BRACKET: "[",
CHAR_LINE_FEED: "\n",
CHAR_NO_BREAK_SPACE: "\xA0",
CHAR_PERCENT: "%",
CHAR_PLUS: "+",
CHAR_QUESTION_MARK: "?",
CHAR_RIGHT_ANGLE_BRACKET: ">",
CHAR_RIGHT_CURLY_BRACE: "}",
CHAR_RIGHT_SQUARE_BRACKET: "]",
CHAR_SEMICOLON: ";",
CHAR_SINGLE_QUOTE: "'",
CHAR_SPACE: " ",
CHAR_TAB: " ",
CHAR_UNDERSCORE: "_",
CHAR_VERTICAL_LINE: "|",
CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF"
};
}
});
// ../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/parse.js
var require_parse3 = __commonJS({
"../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/parse.js"(exports2, module2) {
"use strict";
var stringify = require_stringify();
var {
MAX_LENGTH,
CHAR_BACKSLASH,
CHAR_BACKTICK,
CHAR_COMMA,
CHAR_DOT,
CHAR_LEFT_PARENTHESES,
CHAR_RIGHT_PARENTHESES,
CHAR_LEFT_CURLY_BRACE,
CHAR_RIGHT_CURLY_BRACE,
CHAR_LEFT_SQUARE_BRACKET,
CHAR_RIGHT_SQUARE_BRACKET,
CHAR_DOUBLE_QUOTE,
CHAR_SINGLE_QUOTE,
CHAR_NO_BREAK_SPACE,
CHAR_ZERO_WIDTH_NOBREAK_SPACE
} = require_constants();
var parse3 = (input, options2 = {}) => {
if (typeof input !== "string") {
throw new TypeError("Expected a string");
}
let opts2 = options2 || {};
let max = typeof opts2.maxLength === "number" ? Math.min(MAX_LENGTH, opts2.maxLength) : MAX_LENGTH;
if (input.length > max) {
throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
}
let ast = { type: "root", input, nodes: [] };
let stack2 = [ast];
let block = ast;
let prev = ast;
let brackets = 0;
let length = input.length;
let index2 = 0;
let depth = 0;
let value;
let memo = {};
const advance = () => input[index2++];
const push = (node) => {
if (node.type === "text" && prev.type === "dot") {
prev.type = "text";
}
if (prev && prev.type === "text" && node.type === "text") {
prev.value += node.value;
return;
}
block.nodes.push(node);
node.parent = block;
node.prev = prev;
prev = node;
return node;
};
push({ type: "bos" });
while (index2 < length) {
block = stack2[stack2.length - 1];
value = advance();
if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
continue;
}
if (value === CHAR_BACKSLASH) {
push({ type: "text", value: (options2.keepEscaping ? value : "") + advance() });
continue;
}
if (value === CHAR_RIGHT_SQUARE_BRACKET) {
push({ type: "text", value: "\\" + value });
continue;
}
if (value === CHAR_LEFT_SQUARE_BRACKET) {
brackets++;
let closed = true;
let next;
while (index2 < length && (next = advance())) {
value += next;
if (next === CHAR_LEFT_SQUARE_BRACKET) {
brackets++;
continue;
}
if (next === CHAR_BACKSLASH) {
value += advance();
continue;
}
if (next === CHAR_RIGHT_SQUARE_BRACKET) {
brackets--;
if (brackets === 0) {
break;
}
}
}
push({ type: "text", value });
continue;
}
if (value === CHAR_LEFT_PARENTHESES) {
block = push({ type: "paren", nodes: [] });
stack2.push(block);
push({ type: "text", value });
continue;
}
if (value === CHAR_RIGHT_PARENTHESES) {
if (block.type !== "paren") {
push({ type: "text", value });
continue;
}
block = stack2.pop();
push({ type: "text", value });
block = stack2[stack2.length - 1];
continue;
}
if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
let open4 = value;
let next;
if (options2.keepQuotes !== true) {
value = "";
}
while (index2 < length && (next = advance())) {
if (next === CHAR_BACKSLASH) {
value += next + advance();
continue;
}
if (next === open4) {
if (options2.keepQuotes === true)
value += next;
break;
}
value += next;
}
push({ type: "text", value });
continue;
}
if (value === CHAR_LEFT_CURLY_BRACE) {
depth++;
let dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true;
let brace = {
type: "brace",
open: true,
close: false,
dollar,
depth,
commas: 0,
ranges: 0,
nodes: []
};
block = push(brace);
stack2.push(block);
push({ type: "open", value });
continue;
}
if (value === CHAR_RIGHT_CURLY_BRACE) {
if (block.type !== "brace") {
push({ type: "text", value });
continue;
}
let type = "close";
block = stack2.pop();
block.close = true;
push({ type, value });
depth--;
block = stack2[stack2.length - 1];
continue;
}
if (value === CHAR_COMMA && depth > 0) {
if (block.ranges > 0) {
block.ranges = 0;
let open4 = block.nodes.shift();
block.nodes = [open4, { type: "text", value: stringify(block) }];
}
push({ type: "comma", value });
block.commas++;
continue;
}
if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
let siblings = block.nodes;
if (depth === 0 || siblings.length === 0) {
push({ type: "text", value });
continue;
}
if (prev.type === "dot") {
block.range = [];
prev.value += value;
prev.type = "range";
if (block.nodes.length !== 3 && block.nodes.length !== 5) {
block.invalid = true;
block.ranges = 0;
prev.type = "text";
continue;
}
block.ranges++;
block.args = [];
continue;
}
if (prev.type === "range") {
siblings.pop();
let before = siblings[siblings.length - 1];
before.value += prev.value + value;
prev = before;
block.ranges--;
continue;
}
push({ type: "dot", value });
continue;
}
push({ type: "text", value });
}
do {
block = stack2.pop();
if (block.type !== "root") {
block.nodes.forEach((node) => {
if (!node.nodes) {
if (node.type === "open")
node.isOpen = true;
if (node.type === "close")
node.isClose = true;
if (!node.nodes)
node.type = "text";
node.invalid = true;
}
});
let parent2 = stack2[stack2.length - 1];
let index3 = parent2.nodes.indexOf(block);
parent2.nodes.splice(index3, 1, ...block.nodes);
}
} while (stack2.length > 0);
push({ type: "eos" });
return ast;
};
module2.exports = parse3;
}
});
// ../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/index.js
var require_braces = __commonJS({
"../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/index.js"(exports2, module2) {
"use strict";
var stringify = require_stringify();
var compile = require_compile();
var expand = require_expand();
var parse3 = require_parse3();
var braces = (input, options2 = {}) => {
let output = [];
if (Array.isArray(input)) {
for (let pattern of input) {
let result = braces.create(pattern, options2);
if (Array.isArray(result)) {
output.push(...result);
} else {
output.push(result);
}
}
} else {
output = [].concat(braces.create(input, options2));
}
if (options2 && options2.expand === true && options2.nodupes === true) {
output = [...new Set(output)];
}
return output;
};
braces.parse = (input, options2 = {}) => parse3(input, options2);
braces.stringify = (input, options2 = {}) => {
if (typeof input === "string") {
return stringify(braces.parse(input, options2), options2);
}
return stringify(input, options2);
};
braces.compile = (input, options2 = {}) => {
if (typeof input === "string") {
input = braces.parse(input, options2);
}
return compile(input, options2);
};
braces.expand = (input, options2 = {}) => {
if (typeof input === "string") {
input = braces.parse(input, options2);
}
let result = expand(input, options2);
if (options2.noempty === true) {
result = result.filter(Boolean);
}
if (options2.nodupes === true) {
result = [...new Set(result)];
}
return result;
};
braces.create = (input, options2 = {}) => {
if (input === "" || input.length < 3) {
return [input];
}
return options2.expand !== true ? braces.compile(input, options2) : braces.expand(input, options2);
};
module2.exports = braces;
}
});
// ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js
var require_constants2 = __commonJS({
"../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js"(exports2, module2) {
"use strict";
var path38 = require("path");
var WIN_SLASH = "\\\\/";
var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
var DOT_LITERAL = "\\.";
var PLUS_LITERAL = "\\+";
var QMARK_LITERAL = "\\?";
var SLASH_LITERAL = "\\/";
var ONE_CHAR = "(?=.)";
var QMARK = "[^/]";
var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
var START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
var NO_DOT = `(?!${DOT_LITERAL})`;
var NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
var NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
var STAR = `${QMARK}*?`;
var POSIX_CHARS = {
DOT_LITERAL,
PLUS_LITERAL,
QMARK_LITERAL,
SLASH_LITERAL,
ONE_CHAR,
QMARK,
END_ANCHOR,
DOTS_SLASH,
NO_DOT,
NO_DOTS,
NO_DOT_SLASH,
NO_DOTS_SLASH,
QMARK_NO_DOT,
STAR,
START_ANCHOR
};
var WINDOWS_CHARS = {
...POSIX_CHARS,
SLASH_LITERAL: `[${WIN_SLASH}]`,
QMARK: WIN_NO_SLASH,
STAR: `${WIN_NO_SLASH}*?`,
DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
NO_DOT: `(?!${DOT_LITERAL})`,
NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
};
var POSIX_REGEX_SOURCE = {
alnum: "a-zA-Z0-9",
alpha: "a-zA-Z",
ascii: "\\x00-\\x7F",
blank: " \\t",
cntrl: "\\x00-\\x1F\\x7F",
digit: "0-9",
graph: "\\x21-\\x7E",
lower: "a-z",
print: "\\x20-\\x7E ",
punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
space: " \\t\\r\\n\\v\\f",
upper: "A-Z",
word: "A-Za-z0-9_",
xdigit: "A-Fa-f0-9"
};
module2.exports = {
MAX_LENGTH: 1024 * 64,
POSIX_REGEX_SOURCE,
REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
REPLACEMENTS: {
"***": "*",
"**/**": "**",
"**/**/**": "**"
},
CHAR_0: 48,
CHAR_9: 57,
CHAR_UPPERCASE_A: 65,
CHAR_LOWERCASE_A: 97,
CHAR_UPPERCASE_Z: 90,
CHAR_LOWERCASE_Z: 122,
CHAR_LEFT_PARENTHESES: 40,
CHAR_RIGHT_PARENTHESES: 41,
CHAR_ASTERISK: 42,
CHAR_AMPERSAND: 38,
CHAR_AT: 64,
CHAR_BACKWARD_SLASH: 92,
CHAR_CARRIAGE_RETURN: 13,
CHAR_CIRCUMFLEX_ACCENT: 94,
CHAR_COLON: 58,
CHAR_COMMA: 44,
CHAR_DOT: 46,
CHAR_DOUBLE_QUOTE: 34,
CHAR_EQUAL: 61,
CHAR_EXCLAMATION_MARK: 33,
CHAR_FORM_FEED: 12,
CHAR_FORWARD_SLASH: 47,
CHAR_GRAVE_ACCENT: 96,
CHAR_HASH: 35,
CHAR_HYPHEN_MINUS: 45,
CHAR_LEFT_ANGLE_BRACKET: 60,
CHAR_LEFT_CURLY_BRACE: 123,
CHAR_LEFT_SQUARE_BRACKET: 91,
CHAR_LINE_FEED: 10,
CHAR_NO_BREAK_SPACE: 160,
CHAR_PERCENT: 37,
CHAR_PLUS: 43,
CHAR_QUESTION_MARK: 63,
CHAR_RIGHT_ANGLE_BRACKET: 62,
CHAR_RIGHT_CURLY_BRACE: 125,
CHAR_RIGHT_SQUARE_BRACKET: 93,
CHAR_SEMICOLON: 59,
CHAR_SINGLE_QUOTE: 39,
CHAR_SPACE: 32,
CHAR_TAB: 9,
CHAR_UNDERSCORE: 95,
CHAR_VERTICAL_LINE: 124,
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
SEP: path38.sep,
extglobChars(chars2) {
return {
"!": { type: "negate", open: "(?:(?!(?:", close: `))${chars2.STAR})` },
"?": { type: "qmark", open: "(?:", close: ")?" },
"+": { type: "plus", open: "(?:", close: ")+" },
"*": { type: "star", open: "(?:", close: ")*" },
"@": { type: "at", open: "(?:", close: ")" }
};
},
globChars(win32) {
return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
}
};
}
});
// ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js
var require_utils2 = __commonJS({
"../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js"(exports2) {
"use strict";
var path38 = require("path");
var win32 = process.platform === "win32";
var {
REGEX_BACKSLASH,
REGEX_REMOVE_BACKSLASH,
REGEX_SPECIAL_CHARS,
REGEX_SPECIAL_CHARS_GLOBAL
} = require_constants2();
exports2.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
exports2.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str);
exports2.isRegexChar = (str) => str.length === 1 && exports2.hasRegexChars(str);
exports2.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1");
exports2.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
exports2.removeBackslashes = (str) => {
return str.replace(REGEX_REMOVE_BACKSLASH, (match4) => {
return match4 === "\\" ? "" : match4;
});
};
exports2.supportsLookbehinds = () => {
const segs = process.version.slice(1).split(".").map(Number);
if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) {
return true;
}
return false;
};
exports2.isWindows = (options2) => {
if (options2 && typeof options2.windows === "boolean") {
return options2.windows;
}
return win32 === true || path38.sep === "\\";
};
exports2.escapeLast = (input, char, lastIdx) => {
const idx = input.lastIndexOf(char, lastIdx);
if (idx === -1)
return input;
if (input[idx - 1] === "\\")
return exports2.escapeLast(input, char, idx - 1);
return `${input.slice(0, idx)}\\${input.slice(idx)}`;
};
exports2.removePrefix = (input, state = {}) => {
let output = input;
if (output.startsWith("./")) {
output = output.slice(2);
state.prefix = "./";
}
return output;
};
exports2.wrapOutput = (input, state = {}, options2 = {}) => {
const prepend = options2.contains ? "" : "^";
const append = options2.contains ? "" : "$";
let output = `${prepend}(?:${input})${append}`;
if (state.negated === true) {
output = `(?:^(?!${output}).*$)`;
}
return output;
};
}
});
// ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/scan.js
var require_scan2 = __commonJS({
"../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/scan.js"(exports2, module2) {
"use strict";
var utils = require_utils2();
var {
CHAR_ASTERISK,
CHAR_AT,
CHAR_BACKWARD_SLASH,
CHAR_COMMA,
CHAR_DOT,
CHAR_EXCLAMATION_MARK,
CHAR_FORWARD_SLASH,
CHAR_LEFT_CURLY_BRACE,
CHAR_LEFT_PARENTHESES,
CHAR_LEFT_SQUARE_BRACKET,
CHAR_PLUS,
CHAR_QUESTION_MARK,
CHAR_RIGHT_CURLY_BRACE,
CHAR_RIGHT_PARENTHESES,
CHAR_RIGHT_SQUARE_BRACKET
} = require_constants2();
var isPathSeparator = (code) => {
return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
};
var depth = (token) => {
if (token.isPrefix !== true) {
token.depth = token.isGlobstar ? Infinity : 1;
}
};
var scan = (input, options2) => {
const opts2 = options2 || {};
const length = input.length - 1;
const scanToEnd = opts2.parts === true || opts2.scanToEnd === true;
const slashes = [];
const tokens = [];
const parts = [];
let str = input;
let index2 = -1;
let start = 0;
let lastIndex = 0;
let isBrace = false;
let isBracket = false;
let isGlob = false;
let isExtglob = false;
let isGlobstar = false;
let braceEscaped = false;
let backslashes = false;
let negated = false;
let negatedExtglob = false;
let finished = false;
let braces = 0;
let prev;
let code;
let token = { value: "", depth: 0, isGlob: false };
const eos = () => index2 >= length;
const peek = () => str.charCodeAt(index2 + 1);
const advance = () => {
prev = code;
return str.charCodeAt(++index2);
};
while (index2 < length) {
code = advance();
let next;
if (code === CHAR_BACKWARD_SLASH) {
backslashes = token.backslashes = true;
code = advance();
if (code === CHAR_LEFT_CURLY_BRACE) {
braceEscaped = true;
}
continue;
}
if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
braces++;
while (eos() !== true && (code = advance())) {
if (code === CHAR_BACKWARD_SLASH) {
backslashes = token.backslashes = true;
advance();
continue;
}
if (code === CHAR_LEFT_CURLY_BRACE) {
braces++;
continue;
}
if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
isBrace = token.isBrace = true;
isGlob = token.isGlob = true;
finished = true;
if (scanToEnd === true) {
continue;
}
break;
}
if (braceEscaped !== true && code === CHAR_COMMA) {
isBrace = token.isBrace = true;
isGlob = token.isGlob = true;
finished = true;
if (scanToEnd === true) {
continue;
}
break;
}
if (code === CHAR_RIGHT_CURLY_BRACE) {
braces--;
if (braces === 0) {
braceEscaped = false;
isBrace = token.isBrace = true;
finished = true;
break;
}
}
}
if (scanToEnd === true) {
continue;
}
break;
}
if (code === CHAR_FORWARD_SLASH) {
slashes.push(index2);
tokens.push(token);
token = { value: "", depth: 0, isGlob: false };
if (finished === true)
continue;
if (prev === CHAR_DOT && index2 === start + 1) {
start += 2;
continue;
}
lastIndex = index2 + 1;
continue;
}
if (opts2.noext !== true) {
const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK;
if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
isGlob = token.isGlob = true;
isExtglob = token.isExtglob = true;
finished = true;
if (code === CHAR_EXCLAMATION_MARK && index2 === start) {
negatedExtglob = true;
}
if (scanToEnd === true) {
while (eos() !== true && (code = advance())) {
if (code === CHAR_BACKWARD_SLASH) {
backslashes = token.backslashes = true;
code = advance();
continue;
}
if (code === CHAR_RIGHT_PARENTHESES) {
isGlob = token.isGlob = true;
finished = true;
break;
}
}
continue;
}
break;
}
}
if (code === CHAR_ASTERISK) {
if (prev === CHAR_ASTERISK)
isGlobstar = token.isGlobstar = true;
isGlob = token.isGlob = true;
finished = true;
if (scanToEnd === true) {
continue;
}
break;
}
if (code === CHAR_QUESTION_MARK) {
isGlob = token.isGlob = true;
finished = true;
if (scanToEnd === true) {
continue;
}
break;
}
if (code === CHAR_LEFT_SQUARE_BRACKET) {
while (eos() !== true && (next = advance())) {
if (next === CHAR_BACKWARD_SLASH) {
backslashes = token.backslashes = true;
advance();
continue;
}
if (next === CHAR_RIGHT_SQUARE_BRACKET) {
isBracket = token.isBracket = true;
isGlob = token.isGlob = true;
finished = true;
break;
}
}
if (scanToEnd === true) {
continue;
}
break;
}
if (opts2.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index2 === start) {
negated = token.negated = true;
start++;
continue;
}
if (opts2.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
isGlob = token.isGlob = true;
if (scanToEnd === true) {
while (eos() !== true && (code = advance())) {
if (code === CHAR_LEFT_PARENTHESES) {
backslashes = token.backslashes = true;
code = advance();
continue;
}
if (code === CHAR_RIGHT_PARENTHESES) {
finished = true;
break;
}
}
continue;
}
break;
}
if (isGlob === true) {
finished = true;
if (scanToEnd === true) {
continue;
}
break;
}
}
if (opts2.noext === true) {
isExtglob = false;
isGlob = false;
}
let base = str;
let prefix = "";
let glob = "";
if (start > 0) {
prefix = str.slice(0, start);
str = str.slice(start);
lastIndex -= start;
}
if (base && isGlob === true && lastIndex > 0) {
base = str.slice(0, lastIndex);
glob = str.slice(lastIndex);
} else if (isGlob === true) {
base = "";
glob = str;
} else {
base = str;
}
if (base && base !== "" && base !== "/" && base !== str) {
if (isPathSeparator(base.charCodeAt(base.length - 1))) {
base = base.slice(0, -1);
}
}
if (opts2.unescape === true) {
if (glob)
glob = utils.removeBackslashes(glob);
if (base && backslashes === true) {
base = utils.removeBackslashes(base);
}
}
const state = {
prefix,
input,
start,
base,
glob,
isBrace,
isBracket,
isGlob,
isExtglob,
isGlobstar,
negated,
negatedExtglob
};
if (opts2.tokens === true) {
state.maxDepth = 0;
if (!isPathSeparator(code)) {
tokens.push(token);
}
state.tokens = tokens;
}
if (opts2.parts === true || opts2.tokens === true) {
let prevIndex;
for (let idx = 0; idx < slashes.length; idx++) {
const n2 = prevIndex ? prevIndex + 1 : start;
const i2 = slashes[idx];
const value = input.slice(n2, i2);
if (opts2.tokens) {
if (idx === 0 && start !== 0) {
tokens[idx].isPrefix = true;
tokens[idx].value = prefix;
} else {
tokens[idx].value = value;
}
depth(tokens[idx]);
state.maxDepth += tokens[idx].depth;
}
if (idx !== 0 || value !== "") {
parts.push(value);
}
prevIndex = i2;
}
if (prevIndex && prevIndex + 1 < input.length) {
const value = input.slice(prevIndex + 1);
parts.push(value);
if (opts2.tokens) {
tokens[tokens.length - 1].value = value;
depth(tokens[tokens.length - 1]);
state.maxDepth += tokens[tokens.length - 1].depth;
}
}
state.slashes = slashes;
state.parts = parts;
}
return state;
};
module2.exports = scan;
}
});
// ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.js
var require_parse4 = __commonJS({
"../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.js"(exports2, module2) {
"use strict";
var constants2 = require_constants2();
var utils = require_utils2();
var {
MAX_LENGTH,
POSIX_REGEX_SOURCE,
REGEX_NON_SPECIAL_CHARS,
REGEX_SPECIAL_CHARS_BACKREF,
REPLACEMENTS
} = constants2;
var expandRange = (args3, options2) => {
if (typeof options2.expandRange === "function") {
return options2.expandRange(...args3, options2);
}
args3.sort();
const value = `[${args3.join("-")}]`;
try {
new RegExp(value);
} catch (ex) {
return args3.map((v2) => utils.escapeRegex(v2)).join("..");
}
return value;
};
var syntaxError = (type, char) => {
return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
};
var parse3 = (input, options2) => {
if (typeof input !== "string") {
throw new TypeError("Expected a string");
}
input = REPLACEMENTS[input] || input;
const opts2 = { ...options2 };
const max = typeof opts2.maxLength === "number" ? Math.min(MAX_LENGTH, opts2.maxLength) : MAX_LENGTH;
let len = input.length;
if (len > max) {
throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
}
const bos = { type: "bos", value: "", output: opts2.prepend || "" };
const tokens = [bos];
const capture = opts2.capture ? "" : "?:";
const win32 = utils.isWindows(options2);
const PLATFORM_CHARS = constants2.globChars(win32);
const EXTGLOB_CHARS = constants2.extglobChars(PLATFORM_CHARS);
const {
DOT_LITERAL,
PLUS_LITERAL,
SLASH_LITERAL,
ONE_CHAR,
DOTS_SLASH,
NO_DOT,
NO_DOT_SLASH,
NO_DOTS_SLASH,
QMARK,
QMARK_NO_DOT,
STAR,
START_ANCHOR
} = PLATFORM_CHARS;
const globstar = (opts3) => {
return `(${capture}(?:(?!${START_ANCHOR}${opts3.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
};
const nodot = opts2.dot ? "" : NO_DOT;
const qmarkNoDot = opts2.dot ? QMARK : QMARK_NO_DOT;
let star = opts2.bash === true ? globstar(opts2) : STAR;
if (opts2.capture) {
star = `(${star})`;
}
if (typeof opts2.noext === "boolean") {
opts2.noextglob = opts2.noext;
}
const state = {
input,
index: -1,
start: 0,
dot: opts2.dot === true,
consumed: "",
output: "",
prefix: "",
backtrack: false,
negated: false,
brackets: 0,
braces: 0,
parens: 0,
quotes: 0,
globstar: false,
tokens
};
input = utils.removePrefix(input, state);
len = input.length;
const extglobs = [];
const braces = [];
const stack2 = [];
let prev = bos;
let value;
const eos = () => state.index === len - 1;
const peek = state.peek = (n2 = 1) => input[state.index + n2];
const advance = state.advance = () => input[++state.index] || "";
const remaining = () => input.slice(state.index + 1);
const consume = (value2 = "", num = 0) => {
state.consumed += value2;
state.index += num;
};
const append = (token) => {
state.output += token.output != null ? token.output : token.value;
consume(token.value);
};
const negate = () => {
let count = 1;
while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) {
advance();
state.start++;
count++;
}
if (count % 2 === 0) {
return false;
}
state.negated = true;
state.start++;
return true;
};
const increment = (type) => {
state[type]++;
stack2.push(type);
};
const decrement = (type) => {
state[type]--;
stack2.pop();
};
const push = (tok) => {
if (prev.type === "globstar") {
const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace");
const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren");
if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) {
state.output = state.output.slice(0, -prev.output.length);
prev.type = "star";
prev.value = "*";
prev.output = star;
state.output += prev.output;
}
}
if (extglobs.length && tok.type !== "paren") {
extglobs[extglobs.length - 1].inner += tok.value;
}
if (tok.value || tok.output)
append(tok);
if (prev && prev.type === "text" && tok.type === "text") {
prev.value += tok.value;
prev.output = (prev.output || "") + tok.value;
return;
}
tok.prev = prev;
tokens.push(tok);
prev = tok;
};
const extglobOpen = (type, value2) => {
const token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" };
token.prev = prev;
token.parens = state.parens;
token.output = state.output;
const output = (opts2.capture ? "(" : "") + token.open;
increment("parens");
push({ type, value: value2, output: state.output ? "" : ONE_CHAR });
push({ type: "paren", extglob: true, value: advance(), output });
extglobs.push(token);
};
const extglobClose = (token) => {
let output = token.close + (opts2.capture ? ")" : "");
let rest;
if (token.type === "negate") {
let extglobStar = star;
if (token.inner && token.inner.length > 1 && token.inner.includes("/")) {
extglobStar = globstar(opts2);
}
if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
output = token.close = `)$))${extglobStar}`;
}
if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
const expression = parse3(rest, { ...options2, fastpaths: false }).output;
output = token.close = `)${expression})${extglobStar})`;
}
if (token.prev.type === "bos") {
state.negatedExtglob = true;
}
}
push({ type: "paren", extglob: true, value, output });
decrement("parens");
};
if (opts2.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
let backslashes = false;
let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m3, esc, chars2, first, rest, index2) => {
if (first === "\\") {
backslashes = true;
return m3;
}
if (first === "?") {
if (esc) {
return esc + first + (rest ? QMARK.repeat(rest.length) : "");
}
if (index2 === 0) {
return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : "");
}
return QMARK.repeat(chars2.length);
}
if (first === ".") {
return DOT_LITERAL.repeat(chars2.length);
}
if (first === "*") {
if (esc) {
return esc + first + (rest ? star : "");
}
return star;
}
return esc ? m3 : `\\${m3}`;
});
if (backslashes === true) {
if (opts2.unescape === true) {
output = output.replace(/\\/g, "");
} else {
output = output.replace(/\\+/g, (m3) => {
return m3.length % 2 === 0 ? "\\\\" : m3 ? "\\" : "";
});
}
}
if (output === input && opts2.contains === true) {
state.output = input;
return state;
}
state.output = utils.wrapOutput(output, state, options2);
return state;
}
while (!eos()) {
value = advance();
if (value === "\0") {
continue;
}
if (value === "\\") {
const next = peek();
if (next === "/" && opts2.bash !== true) {
continue;
}
if (next === "." || next === ";") {
continue;
}
if (!next) {
value += "\\";
push({ type: "text", value });
continue;
}
const match4 = /^\\+/.exec(remaining());
let slashes = 0;
if (match4 && match4[0].length > 2) {
slashes = match4[0].length;
state.index += slashes;
if (slashes % 2 !== 0) {
value += "\\";
}
}
if (opts2.unescape === true) {
value = advance();
} else {
value += advance();
}
if (state.brackets === 0) {
push({ type: "text", value });
continue;
}
}
if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) {
if (opts2.posix !== false && value === ":") {
const inner = prev.value.slice(1);
if (inner.includes("[")) {
prev.posix = true;
if (inner.includes(":")) {
const idx = prev.value.lastIndexOf("[");
const pre = prev.value.slice(0, idx);
const rest2 = prev.value.slice(idx + 2);
const posix2 = POSIX_REGEX_SOURCE[rest2];
if (posix2) {
prev.value = pre + posix2;
state.backtrack = true;
advance();
if (!bos.output && tokens.indexOf(prev) === 1) {
bos.output = ONE_CHAR;
}
continue;
}
}
}
}
if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") {
value = `\\${value}`;
}
if (value === "]" && (prev.value === "[" || prev.value === "[^")) {
value = `\\${value}`;
}
if (opts2.posix === true && value === "!" && prev.value === "[") {
value = "^";
}
prev.value += value;
append({ value });
continue;
}
if (state.quotes === 1 && value !== '"') {
value = utils.escapeRegex(value);
prev.value += value;
append({ value });
continue;
}
if (value === '"') {
state.quotes = state.quotes === 1 ? 0 : 1;
if (opts2.keepQuotes === true) {
push({ type: "text", value });
}
continue;
}
if (value === "(") {
increment("parens");
push({ type: "paren", value });
continue;
}
if (value === ")") {
if (state.parens === 0 && opts2.strictBrackets === true) {
throw new SyntaxError(syntaxError("opening", "("));
}
const extglob = extglobs[extglobs.length - 1];
if (extglob && state.parens === extglob.parens + 1) {
extglobClose(extglobs.pop());
continue;
}
push({ type: "paren", value, output: state.parens ? ")" : "\\)" });
decrement("parens");
continue;
}
if (value === "[") {
if (opts2.nobracket === true || !remaining().includes("]")) {
if (opts2.nobracket !== true && opts2.strictBrackets === true) {
throw new SyntaxError(syntaxError("closing", "]"));
}
value = `\\${value}`;
} else {
increment("brackets");
}
push({ type: "bracket", value });
continue;
}
if (value === "]") {
if (opts2.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) {
push({ type: "text", value, output: `\\${value}` });
continue;
}
if (state.brackets === 0) {
if (opts2.strictBrackets === true) {
throw new SyntaxError(syntaxError("opening", "["));
}
push({ type: "text", value, output: `\\${value}` });
continue;
}
decrement("brackets");
const prevValue = prev.value.slice(1);
if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) {
value = `/${value}`;
}
prev.value += value;
append({ value });
if (opts2.literalBrackets === false || utils.hasRegexChars(prevValue)) {
continue;
}
const escaped = utils.escapeRegex(prev.value);
state.output = state.output.slice(0, -prev.value.length);
if (opts2.literalBrackets === true) {
state.output += escaped;
prev.value = escaped;
continue;
}
prev.value = `(${capture}${escaped}|${prev.value})`;
state.output += prev.value;
continue;
}
if (value === "{" && opts2.nobrace !== true) {
increment("braces");
const open4 = {
type: "brace",
value,
output: "(",
outputIndex: state.output.length,
tokensIndex: state.tokens.length
};
braces.push(open4);
push(open4);
continue;
}
if (value === "}") {
const brace = braces[braces.length - 1];
if (opts2.nobrace === true || !brace) {
push({ type: "text", value, output: value });
continue;
}
let output = ")";
if (brace.dots === true) {
const arr = tokens.slice();
const range2 = [];
for (let i2 = arr.length - 1; i2 >= 0; i2--) {
tokens.pop();
if (arr[i2].type === "brace") {
break;
}
if (arr[i2].type !== "dots") {
range2.unshift(arr[i2].value);
}
}
output = expandRange(range2, opts2);
state.backtrack = true;
}
if (brace.comma !== true && brace.dots !== true) {
const out = state.output.slice(0, brace.outputIndex);
const toks = state.tokens.slice(brace.tokensIndex);
brace.value = brace.output = "\\{";
value = output = "\\}";
state.output = out;
for (const t4 of toks) {
state.output += t4.output || t4.value;
}
}
push({ type: "brace", value, output });
decrement("braces");
braces.pop();
continue;
}
if (value === "|") {
if (extglobs.length > 0) {
extglobs[extglobs.length - 1].conditions++;
}
push({ type: "text", value });
continue;
}
if (value === ",") {
let output = value;
const brace = braces[braces.length - 1];
if (brace && stack2[stack2.length - 1] === "braces") {
brace.comma = true;
output = "|";
}
push({ type: "comma", value, output });
continue;
}
if (value === "/") {
if (prev.type === "dot" && state.index === state.start + 1) {
state.start = state.index + 1;
state.consumed = "";
state.output = "";
tokens.pop();
prev = bos;
continue;
}
push({ type: "slash", value, output: SLASH_LITERAL });
continue;
}
if (value === ".") {
if (state.braces > 0 && prev.type === "dot") {
if (prev.value === ".")
prev.output = DOT_LITERAL;
const brace = braces[braces.length - 1];
prev.type = "dots";
prev.output += value;
prev.value += value;
brace.dots = true;
continue;
}
if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") {
push({ type: "text", value, output: DOT_LITERAL });
continue;
}
push({ type: "dot", value, output: DOT_LITERAL });
continue;
}
if (value === "?") {
const isGroup = prev && prev.value === "(";
if (!isGroup && opts2.noextglob !== true && peek() === "(" && peek(2) !== "?") {
extglobOpen("qmark", value);
continue;
}
if (prev && prev.type === "paren") {
const next = peek();
let output = value;
if (next === "<" && !utils.supportsLookbehinds()) {
throw new Error("Node.js v10 or higher is required for regex lookbehinds");
}
if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) {
output = `\\${value}`;
}
push({ type: "text", value, output });
continue;
}
if (opts2.dot !== true && (prev.type === "slash" || prev.type === "bos")) {
push({ type: "qmark", value, output: QMARK_NO_DOT });
continue;
}
push({ type: "qmark", value, output: QMARK });
continue;
}
if (value === "!") {
if (opts2.noextglob !== true && peek() === "(") {
if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) {
extglobOpen("negate", value);
continue;
}
}
if (opts2.nonegate !== true && state.index === 0) {
negate();
continue;
}
}
if (value === "+") {
if (opts2.noextglob !== true && peek() === "(" && peek(2) !== "?") {
extglobOpen("plus", value);
continue;
}
if (prev && prev.value === "(" || opts2.regex === false) {
push({ type: "plus", value, output: PLUS_LITERAL });
continue;
}
if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) {
push({ type: "plus", value });
continue;
}
push({ type: "plus", value: PLUS_LITERAL });
continue;
}
if (value === "@") {
if (opts2.noextglob !== true && peek() === "(" && peek(2) !== "?") {
push({ type: "at", extglob: true, value, output: "" });
continue;
}
push({ type: "text", value });
continue;
}
if (value !== "*") {
if (value === "$" || value === "^") {
value = `\\${value}`;
}
const match4 = REGEX_NON_SPECIAL_CHARS.exec(remaining());
if (match4) {
value += match4[0];
state.index += match4[0].length;
}
push({ type: "text", value });
continue;
}
if (prev && (prev.type === "globstar" || prev.star === true)) {
prev.type = "star";
prev.star = true;
prev.value += value;
prev.output = star;
state.backtrack = true;
state.globstar = true;
consume(value);
continue;
}
let rest = remaining();
if (opts2.noextglob !== true && /^\([^?]/.test(rest)) {
extglobOpen("star", value);
continue;
}
if (prev.type === "star") {
if (opts2.noglobstar === true) {
consume(value);
continue;
}
const prior = prev.prev;
const before = prior.prev;
const isStart = prior.type === "slash" || prior.type === "bos";
const afterStar = before && (before.type === "star" || before.type === "globstar");
if (opts2.bash === true && (!isStart || rest[0] && rest[0] !== "/")) {
push({ type: "star", value, output: "" });
continue;
}
const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace");
const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren");
if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) {
push({ type: "star", value, output: "" });
continue;
}
while (rest.slice(0, 3) === "/**") {
const after = input[state.index + 4];
if (after && after !== "/") {
break;
}
rest = rest.slice(3);
consume("/**", 3);
}
if (prior.type === "bos" && eos()) {
prev.type = "globstar";
prev.value += value;
prev.output = globstar(opts2);
state.output = prev.output;
state.globstar = true;
consume(value);
continue;
}
if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) {
state.output = state.output.slice(0, -(prior.output + prev.output).length);
prior.output = `(?:${prior.output}`;
prev.type = "globstar";
prev.output = globstar(opts2) + (opts2.strictSlashes ? ")" : "|$)");
prev.value += value;
state.globstar = true;
state.output += prior.output + prev.output;
consume(value);
continue;
}
if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") {
const end = rest[1] !== void 0 ? "|$" : "";
state.output = state.output.slice(0, -(prior.output + prev.output).length);
prior.output = `(?:${prior.output}`;
prev.type = "globstar";
prev.output = `${globstar(opts2)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
prev.value += value;
state.output += prior.output + prev.output;
state.globstar = true;
consume(value + advance());
push({ type: "slash", value: "/", output: "" });
continue;
}
if (prior.type === "bos" && rest[0] === "/") {
prev.type = "globstar";
prev.value += value;
prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts2)}${SLASH_LITERAL})`;
state.output = prev.output;
state.globstar = true;
consume(value + advance());
push({ type: "slash", value: "/", output: "" });
continue;
}
state.output = state.output.slice(0, -prev.output.length);
prev.type = "globstar";
prev.output = globstar(opts2);
prev.value += value;
state.output += prev.output;
state.globstar = true;
consume(value);
continue;
}
const token = { type: "star", value, output: star };
if (opts2.bash === true) {
token.output = ".*?";
if (prev.type === "bos" || prev.type === "slash") {
token.output = nodot + token.output;
}
push(token);
continue;
}
if (prev && (prev.type === "bracket" || prev.type === "paren") && opts2.regex === true) {
token.output = value;
push(token);
continue;
}
if (state.index === state.start || prev.type === "slash" || prev.type === "dot") {
if (prev.type === "dot") {
state.output += NO_DOT_SLASH;
prev.output += NO_DOT_SLASH;
} else if (opts2.dot === true) {
state.output += NO_DOTS_SLASH;
prev.output += NO_DOTS_SLASH;
} else {
state.output += nodot;
prev.output += nodot;
}
if (peek() !== "*") {
state.output += ONE_CHAR;
prev.output += ONE_CHAR;
}
}
push(token);
}
while (state.brackets > 0) {
if (opts2.strictBrackets === true)
throw new SyntaxError(syntaxError("closing", "]"));
state.output = utils.escapeLast(state.output, "[");
decrement("brackets");
}
while (state.parens > 0) {
if (opts2.strictBrackets === true)
throw new SyntaxError(syntaxError("closing", ")"));
state.output = utils.escapeLast(state.output, "(");
decrement("parens");
}
while (state.braces > 0) {
if (opts2.strictBrackets === true)
throw new SyntaxError(syntaxError("closing", "}"));
state.output = utils.escapeLast(state.output, "{");
decrement("braces");
}
if (opts2.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) {
push({ type: "maybe_slash", value: "", output: `${SLASH_LITERAL}?` });
}
if (state.backtrack === true) {
state.output = "";
for (const token of state.tokens) {
state.output += token.output != null ? token.output : token.value;
if (token.suffix) {
state.output += token.suffix;
}
}
}
return state;
};
parse3.fastpaths = (input, options2) => {
const opts2 = { ...options2 };
const max = typeof opts2.maxLength === "number" ? Math.min(MAX_LENGTH, opts2.maxLength) : MAX_LENGTH;
const len = input.length;
if (len > max) {
throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
}
input = REPLACEMENTS[input] || input;
const win32 = utils.isWindows(options2);
const {
DOT_LITERAL,
SLASH_LITERAL,
ONE_CHAR,
DOTS_SLASH,
NO_DOT,
NO_DOTS,
NO_DOTS_SLASH,
STAR,
START_ANCHOR
} = constants2.globChars(win32);
const nodot = opts2.dot ? NO_DOTS : NO_DOT;
const slashDot = opts2.dot ? NO_DOTS_SLASH : NO_DOT;
const capture = opts2.capture ? "" : "?:";
const state = { negated: false, prefix: "" };
let star = opts2.bash === true ? ".*?" : STAR;
if (opts2.capture) {
star = `(${star})`;
}
const globstar = (opts3) => {
if (opts3.noglobstar === true)
return star;
return `(${capture}(?:(?!${START_ANCHOR}${opts3.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
};
const create = (str) => {
switch (str) {
case "*":
return `${nodot}${ONE_CHAR}${star}`;
case ".*":
return `${DOT_LITERAL}${ONE_CHAR}${star}`;
case "*.*":
return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
case "*/*":
return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
case "**":
return nodot + globstar(opts2);
case "**/*":
return `(?:${nodot}${globstar(opts2)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
case "**/*.*":
return `(?:${nodot}${globstar(opts2)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
case "**/.*":
return `(?:${nodot}${globstar(opts2)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
default: {
const match4 = /^(.*?)\.(\w+)$/.exec(str);
if (!match4)
return;
const source2 = create(match4[1]);
if (!source2)
return;
return source2 + DOT_LITERAL + match4[2];
}
}
};
const output = utils.removePrefix(input, state);
let source = create(output);
if (source && opts2.strictSlashes !== true) {
source += `${SLASH_LITERAL}?`;
}
return source;
};
module2.exports = parse3;
}
});
// ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js
var require_picomatch = __commonJS({
"../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js"(exports2, module2) {
"use strict";
var path38 = require("path");
var scan = require_scan2();
var parse3 = require_parse4();
var utils = require_utils2();
var constants2 = require_constants2();
var isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
var picomatch = (glob, options2, returnState = false) => {
if (Array.isArray(glob)) {
const fns = glob.map((input) => picomatch(input, options2, returnState));
const arrayMatcher = (str) => {
for (const isMatch of fns) {
const state2 = isMatch(str);
if (state2)
return state2;
}
return false;
};
return arrayMatcher;
}
const isState = isObject(glob) && glob.tokens && glob.input;
if (glob === "" || typeof glob !== "string" && !isState) {
throw new TypeError("Expected pattern to be a non-empty string");
}
const opts2 = options2 || {};
const posix2 = utils.isWindows(options2);
const regex2 = isState ? picomatch.compileRe(glob, options2) : picomatch.makeRe(glob, options2, false, true);
const state = regex2.state;
delete regex2.state;
let isIgnored = () => false;
if (opts2.ignore) {
const ignoreOpts = { ...options2, ignore: null, onMatch: null, onResult: null };
isIgnored = picomatch(opts2.ignore, ignoreOpts, returnState);
}
const matcher = (input, returnObject = false) => {
const { isMatch, match: match4, output } = picomatch.test(input, regex2, options2, { glob, posix: posix2 });
const result = { glob, state, regex: regex2, posix: posix2, input, output, match: match4, isMatch };
if (typeof opts2.onResult === "function") {
opts2.onResult(result);
}
if (isMatch === false) {
result.isMatch = false;
return returnObject ? result : false;
}
if (isIgnored(input)) {
if (typeof opts2.onIgnore === "function") {
opts2.onIgnore(result);
}
result.isMatch = false;
return returnObject ? result : false;
}
if (typeof opts2.onMatch === "function") {
opts2.onMatch(result);
}
return returnObject ? result : true;
};
if (returnState) {
matcher.state = state;
}
return matcher;
};
picomatch.test = (input, regex2, options2, { glob, posix: posix2 } = {}) => {
if (typeof input !== "string") {
throw new TypeError("Expected input to be a string");
}
if (input === "") {
return { isMatch: false, output: "" };
}
const opts2 = options2 || {};
const format2 = opts2.format || (posix2 ? utils.toPosixSlashes : null);
let match4 = input === glob;
let output = match4 && format2 ? format2(input) : input;
if (match4 === false) {
output = format2 ? format2(input) : input;
match4 = output === glob;
}
if (match4 === false || opts2.capture === true) {
if (opts2.matchBase === true || opts2.basename === true) {
match4 = picomatch.matchBase(input, regex2, options2, posix2);
} else {
match4 = regex2.exec(output);
}
}
return { isMatch: Boolean(match4), match: match4, output };
};
picomatch.matchBase = (input, glob, options2, posix2 = utils.isWindows(options2)) => {
const regex2 = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options2);
return regex2.test(path38.basename(input));
};
picomatch.isMatch = (str, patterns, options2) => picomatch(patterns, options2)(str);
picomatch.parse = (pattern, options2) => {
if (Array.isArray(pattern))
return pattern.map((p2) => picomatch.parse(p2, options2));
return parse3(pattern, { ...options2, fastpaths: false });
};
picomatch.scan = (input, options2) => scan(input, options2);
picomatch.compileRe = (state, options2, returnOutput = false, returnState = false) => {
if (returnOutput === true) {
return state.output;
}
const opts2 = options2 || {};
const prepend = opts2.contains ? "" : "^";
const append = opts2.contains ? "" : "$";
let source = `${prepend}(?:${state.output})${append}`;
if (state && state.negated === true) {
source = `^(?!${source}).*$`;
}
const regex2 = picomatch.toRegex(source, options2);
if (returnState === true) {
regex2.state = state;
}
return regex2;
};
picomatch.makeRe = (input, options2 = {}, returnOutput = false, returnState = false) => {
if (!input || typeof input !== "string") {
throw new TypeError("Expected a non-empty string");
}
let parsed = { negated: false, fastpaths: true };
if (options2.fastpaths !== false && (input[0] === "." || input[0] === "*")) {
parsed.output = parse3.fastpaths(input, options2);
}
if (!parsed.output) {
parsed = parse3(input, options2);
}
return picomatch.compileRe(parsed, options2, returnOutput, returnState);
};
picomatch.toRegex = (source, options2) => {
try {
const opts2 = options2 || {};
return new RegExp(source, opts2.flags || (opts2.nocase ? "i" : ""));
} catch (err) {
if (options2 && options2.debug === true)
throw err;
return /$^/;
}
};
picomatch.constants = constants2;
module2.exports = picomatch;
}
});
// ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/index.js
var require_picomatch2 = __commonJS({
"../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/index.js"(exports2, module2) {
"use strict";
module2.exports = require_picomatch();
}
});
// ../../node_modules/.pnpm/micromatch@4.0.5/node_modules/micromatch/index.js
var require_micromatch = __commonJS({
"../../node_modules/.pnpm/micromatch@4.0.5/node_modules/micromatch/index.js"(exports2, module2) {
"use strict";
var util5 = require("util");
var braces = require_braces();
var picomatch = require_picomatch2();
var utils = require_utils2();
var isEmptyString = (val) => val === "" || val === "./";
var micromatch = (list, patterns, options2) => {
patterns = [].concat(patterns);
list = [].concat(list);
let omit = /* @__PURE__ */ new Set();
let keep = /* @__PURE__ */ new Set();
let items = /* @__PURE__ */ new Set();
let negatives = 0;
let onResult = (state) => {
items.add(state.output);
if (options2 && options2.onResult) {
options2.onResult(state);
}
};
for (let i2 = 0; i2 < patterns.length; i2++) {
let isMatch = picomatch(String(patterns[i2]), { ...options2, onResult }, true);
let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
if (negated)
negatives++;
for (let item2 of list) {
let matched = isMatch(item2, true);
let match4 = negated ? !matched.isMatch : matched.isMatch;
if (!match4)
continue;
if (negated) {
omit.add(matched.output);
} else {
omit.delete(matched.output);
keep.add(matched.output);
}
}
}
let result = negatives === patterns.length ? [...items] : [...keep];
let matches = result.filter((item2) => !omit.has(item2));
if (options2 && matches.length === 0) {
if (options2.failglob === true) {
throw new Error(`No matches found for "${patterns.join(", ")}"`);
}
if (options2.nonull === true || options2.nullglob === true) {
return options2.unescape ? patterns.map((p2) => p2.replace(/\\/g, "")) : patterns;
}
}
return matches;
};
micromatch.match = micromatch;
micromatch.matcher = (pattern, options2) => picomatch(pattern, options2);
micromatch.isMatch = (str, patterns, options2) => picomatch(patterns, options2)(str);
micromatch.any = micromatch.isMatch;
micromatch.not = (list, patterns, options2 = {}) => {
patterns = [].concat(patterns).map(String);
let result = /* @__PURE__ */ new Set();
let items = [];
let onResult = (state) => {
if (options2.onResult)
options2.onResult(state);
items.push(state.output);
};
let matches = new Set(micromatch(list, patterns, { ...options2, onResult }));
for (let item2 of items) {
if (!matches.has(item2)) {
result.add(item2);
}
}
return [...result];
};
micromatch.contains = (str, pattern, options2) => {
if (typeof str !== "string") {
throw new TypeError(`Expected a string: "${util5.inspect(str)}"`);
}
if (Array.isArray(pattern)) {
return pattern.some((p2) => micromatch.contains(str, p2, options2));
}
if (typeof pattern === "string") {
if (isEmptyString(str) || isEmptyString(pattern)) {
return false;
}
if (str.includes(pattern) || str.startsWith("./") && str.slice(2).includes(pattern)) {
return true;
}
}
return micromatch.isMatch(str, pattern, { ...options2, contains: true });
};
micromatch.matchKeys = (obj, patterns, options2) => {
if (!utils.isObject(obj)) {
throw new TypeError("Expected the first argument to be an object");
}
let keys = micromatch(Object.keys(obj), patterns, options2);
let res = {};
for (let key of keys)
res[key] = obj[key];
return res;
};
micromatch.some = (list, patterns, options2) => {
let items = [].concat(list);
for (let pattern of [].concat(patterns)) {
let isMatch = picomatch(String(pattern), options2);
if (items.some((item2) => isMatch(item2))) {
return true;
}
}
return false;
};
micromatch.every = (list, patterns, options2) => {
let items = [].concat(list);
for (let pattern of [].concat(patterns)) {
let isMatch = picomatch(String(pattern), options2);
if (!items.every((item2) => isMatch(item2))) {
return false;
}
}
return true;
};
micromatch.all = (str, patterns, options2) => {
if (typeof str !== "string") {
throw new TypeError(`Expected a string: "${util5.inspect(str)}"`);
}
return [].concat(patterns).every((p2) => picomatch(p2, options2)(str));
};
micromatch.capture = (glob, input, options2) => {
let posix2 = utils.isWindows(options2);
let regex2 = picomatch.makeRe(String(glob), { ...options2, capture: true });
let match4 = regex2.exec(posix2 ? utils.toPosixSlashes(input) : input);
if (match4) {
return match4.slice(1).map((v2) => v2 === void 0 ? "" : v2);
}
};
micromatch.makeRe = (...args3) => picomatch.makeRe(...args3);
micromatch.scan = (...args3) => picomatch.scan(...args3);
micromatch.parse = (patterns, options2) => {
let res = [];
for (let pattern of [].concat(patterns || [])) {
for (let str of braces(String(pattern), options2)) {
res.push(picomatch.parse(str, options2));
}
}
return res;
};
micromatch.braces = (pattern, options2) => {
if (typeof pattern !== "string")
throw new TypeError("Expected a string");
if (options2 && options2.nobrace === true || !/\{.*\}/.test(pattern)) {
return [pattern];
}
return braces(pattern, options2);
};
micromatch.braceExpand = (pattern, options2) => {
if (typeof pattern !== "string")
throw new TypeError("Expected a string");
return micromatch.braces(pattern, { ...options2, expand: true });
};
module2.exports = micromatch;
}
});
// ../../node_modules/.pnpm/fast-glob@3.3.0/node_modules/fast-glob/out/utils/pattern.js
var require_pattern = __commonJS({
"../../node_modules/.pnpm/fast-glob@3.3.0/node_modules/fast-glob/out/utils/pattern.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.removeDuplicateSlashes = exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0;
var path38 = require("path");
var globParent = require_glob_parent();
var micromatch = require_micromatch();
var GLOBSTAR = "**";
var ESCAPE_SYMBOL = "\\";
var COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/;
var REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/;
var REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/;
var GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/;
var BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./;
var DOUBLE_SLASH_RE = /(?!^)\/{2,}/g;
function isStaticPattern(pattern, options2 = {}) {
return !isDynamicPattern(pattern, options2);
}
exports2.isStaticPattern = isStaticPattern;
function isDynamicPattern(pattern, options2 = {}) {
if (pattern === "") {
return false;
}
if (options2.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) {
return true;
}
if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) {
return true;
}
if (options2.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) {
return true;
}
if (options2.braceExpansion !== false && hasBraceExpansion(pattern)) {
return true;
}
return false;
}
exports2.isDynamicPattern = isDynamicPattern;
function hasBraceExpansion(pattern) {
const openingBraceIndex = pattern.indexOf("{");
if (openingBraceIndex === -1) {
return false;
}
const closingBraceIndex = pattern.indexOf("}", openingBraceIndex + 1);
if (closingBraceIndex === -1) {
return false;
}
const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex);
return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent);
}
function convertToPositivePattern(pattern) {
return isNegativePattern(pattern) ? pattern.slice(1) : pattern;
}
exports2.convertToPositivePattern = convertToPositivePattern;
function convertToNegativePattern(pattern) {
return "!" + pattern;
}
exports2.convertToNegativePattern = convertToNegativePattern;
function isNegativePattern(pattern) {
return pattern.startsWith("!") && pattern[1] !== "(";
}
exports2.isNegativePattern = isNegativePattern;
function isPositivePattern(pattern) {
return !isNegativePattern(pattern);
}
exports2.isPositivePattern = isPositivePattern;
function getNegativePatterns(patterns) {
return patterns.filter(isNegativePattern);
}
exports2.getNegativePatterns = getNegativePatterns;
function getPositivePatterns(patterns) {
return patterns.filter(isPositivePattern);
}
exports2.getPositivePatterns = getPositivePatterns;
function getPatternsInsideCurrentDirectory(patterns) {
return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern));
}
exports2.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory;
function getPatternsOutsideCurrentDirectory(patterns) {
return patterns.filter(isPatternRelatedToParentDirectory);
}
exports2.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory;
function isPatternRelatedToParentDirectory(pattern) {
return pattern.startsWith("..") || pattern.startsWith("./..");
}
exports2.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory;
function getBaseDirectory(pattern) {
return globParent(pattern, { flipBackslashes: false });
}
exports2.getBaseDirectory = getBaseDirectory;
function hasGlobStar(pattern) {
return pattern.includes(GLOBSTAR);
}
exports2.hasGlobStar = hasGlobStar;
function endsWithSlashGlobStar(pattern) {
return pattern.endsWith("/" + GLOBSTAR);
}
exports2.endsWithSlashGlobStar = endsWithSlashGlobStar;
function isAffectDepthOfReadingPattern(pattern) {
const basename = path38.basename(pattern);
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
}
exports2.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
function expandPatternsWithBraceExpansion(patterns) {
return patterns.reduce((collection, pattern) => {
return collection.concat(expandBraceExpansion(pattern));
}, []);
}
exports2.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
function expandBraceExpansion(pattern) {
const patterns = micromatch.braces(pattern, { expand: true, nodupes: true });
patterns.sort((a2, b2) => a2.length - b2.length);
return patterns.filter((pattern2) => pattern2 !== "");
}
exports2.expandBraceExpansion = expandBraceExpansion;
function getPatternParts(pattern, options2) {
let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options2), { parts: true }));
if (parts.length === 0) {
parts = [pattern];
}
if (parts[0].startsWith("/")) {
parts[0] = parts[0].slice(1);
parts.unshift("");
}
return parts;
}
exports2.getPatternParts = getPatternParts;
function makeRe(pattern, options2) {
return micromatch.makeRe(pattern, options2);
}
exports2.makeRe = makeRe;
function convertPatternsToRe(patterns, options2) {
return patterns.map((pattern) => makeRe(pattern, options2));
}
exports2.convertPatternsToRe = convertPatternsToRe;
function matchAny(entry, patternsRe) {
return patternsRe.some((patternRe) => patternRe.test(entry));
}
exports2.matchAny = matchAny;
function removeDuplicateSlashes(pattern) {
return pattern.replace(DOUBLE_SLASH_RE, "/");
}
exports2.removeDuplicateSlashes = removeDuplicateSlashes;
}
});
// ../../node_modules/.pnpm/fast-glob@3.3.0/node_modules/fast-glob/out/utils/stream.js
var require_stream2 = __commonJS({
"../../node_modules/.pnpm/fast-glob@3.3.0/node_modules/fast-glob/out/utils/stream.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.merge = void 0;
var merge2 = require_merge2();
function merge(streams) {
const mergedStream = merge2(streams);
streams.forEach((stream4) => {
stream4.once("error", (error2) => mergedStream.emit("error", error2));
});
mergedStream.once("close", () => propagateCloseEventToSources(streams));
mergedStream.once("end", () => propagateCloseEventToSources(streams));
return mergedStream;
}
exports2.merge = merge;
function propagateCloseEventToSources(streams) {
streams.forEach((stream4) => stream4.emit("close"));
}
}
});
// ../../node_modules/.pnpm/fast-glob@3.3.0/node_modules/fast-glob/out/utils/string.js
var require_string = __commonJS({
"../../node_modules/.pnpm/fast-glob@3.3.0/node_modules/fast-glob/out/utils/string.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.isEmpty = exports2.isString = void 0;
function isString(input) {
return typeof input === "string";
}
exports2.isString = isString;
function isEmpty(input) {
return input === "";
}
exports2.isEmpty = isEmpty;
}
});
// ../../node_modules/.pnpm/fast-glob@3.3.0/node_modules/fast-glob/out/utils/index.js
var require_utils3 = __commonJS({
"../../node_modules/.pnpm/fast-glob@3.3.0/node_modules/fast-glob/out/utils/index.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.string = exports2.stream = exports2.pattern = exports2.path = exports2.fs = exports2.errno = exports2.array = void 0;
var array = require_array();
exports2.array = array;
var errno = require_errno();
exports2.errno = errno;
var fs40 = require_fs();
exports2.fs = fs40;
var path38 = require_path();
exports2.path = path38;
var pattern = require_pattern();
exports2.pattern = pattern;
var stream4 = require_stream2();
exports2.stream = stream4;
var string = require_string();
exports2.string = string;
}
});
// ../../node_modules/.pnpm/fast-glob@3.3.0/node_modules/fast-glob/out/managers/tasks.js
var require_tasks = __commonJS({
"../../node_modules/.pnpm/fast-glob@3.3.0/node_modules/fast-glob/out/managers/tasks.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.convertPatternGroupToTask = exports2.convertPatternGroupsToTasks = exports2.groupPatternsByBaseDirectory = exports2.getNegativePatternsAsPositive = exports2.getPositivePatterns = exports2.convertPatternsToTasks = exports2.generate = void 0;
var utils = require_utils3();
function generate(input, settings) {
const patterns = processPatterns(input, settings);
const ignore = processPatterns(settings.ignore, settings);
const positivePatterns = getPositivePatterns(patterns);
const negativePatterns = getNegativePatternsAsPositive(patterns, ignore);
const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));
const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));
const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, false);
const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, true);
return staticTasks.concat(dynamicTasks);
}
exports2.generate = generate;
function processPatterns(input, settings) {
let patterns = input;
if (settings.braceExpansion) {
patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns);
}
if (settings.baseNameMatch) {
patterns = patterns.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`);
}
return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern));
}
function convertPatternsToTasks(positive, negative, dynamic) {
const tasks = [];
const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive);
const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive);
const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory);
const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory);
tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic));
if ("." in insideCurrentDirectoryGroup) {
tasks.push(convertPatternGroupToTask(".", patternsInsideCurrentDirectory, negative, dynamic));
} else {
tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic));
}
return tasks;
}
exports2.convertPatternsToTasks = convertPatternsToTasks;
function getPositivePatterns(patterns) {
return utils.pattern.getPositivePatterns(patterns);
}
exports2.getPositivePatterns = getPositivePatterns;
function getNegativePatternsAsPositive(patterns, ignore) {
const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore);
const positive = negative.map(utils.pattern.convertToPositivePattern);
return positive;
}
exports2.getNegativePatternsAsPositive = getNegativePatternsAsPositive;
function groupPatternsByBaseDirectory(patterns) {
const group = {};
return patterns.reduce((collection, pattern) => {
const base = utils.pattern.getBaseDirectory(pattern);
if (base in collection) {
collection[base].push(pattern);
} else {
collection[base] = [pattern];
}
return collection;
}, group);
}
exports2.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;
function convertPatternGroupsToTasks(positive, negative, dynamic) {
return Object.keys(positive).map((base) => {
return convertPatternGroupToTask(base, positive[base], negative, dynamic);
});
}
exports2.convertPatternGroupsToTasks = convertPatternGroupsToTasks;
function convertPatternGroupToTask(base, positive, negative, dynamic) {
return {
dynamic,
positive,
negative,
base,
patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern))
};
}
exports2.convertPatternGroupToTask = convertPatternGroupToTask;
}
});
// ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.js
var require_async2 = __commonJS({
"../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.read = void 0;
function read(path38, settings, callback) {
settings.fs.lstat(path38, (lstatError, lstat) => {
if (lstatError !== null) {
callFailureCallback(callback, lstatError);
return;
}
if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
callSuccessCallback(callback, lstat);
return;
}
settings.fs.stat(path38, (statError, stat) => {
if (statError !== null) {
if (settings.throwErrorOnBrokenSymbolicLink) {
callFailureCallback(callback, statError);
return;
}
callSuccessCallback(callback, lstat);
return;
}
if (settings.markSymbolicLink) {
stat.isSymbolicLink = () => true;
}
callSuccessCallback(callback, stat);
});
});
}
exports2.read = read;
function callFailureCallback(callback, error2) {
callback(error2);
}
function callSuccessCallback(callback, result) {
callback(null, result);
}
}
});
// ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.js
var require_sync2 = __commonJS({
"../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.read = void 0;
function read(path38, settings) {
const lstat = settings.fs.lstatSync(path38);
if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
return lstat;
}
try {
const stat = settings.fs.statSync(path38);
if (settings.markSymbolicLink) {
stat.isSymbolicLink = () => true;
}
return stat;
} catch (error2) {
if (!settings.throwErrorOnBrokenSymbolicLink) {
return lstat;
}
throw error2;
}
}
exports2.read = read;
}
});
// ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/adapters/fs.js
var require_fs2 = __commonJS({
"../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/adapters/fs.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
var fs40 = require("fs");
exports2.FILE_SYSTEM_ADAPTER = {
lstat: fs40.lstat,
stat: fs40.stat,
lstatSync: fs40.lstatSync,
statSync: fs40.statSync
};
function createFileSystemAdapter(fsMethods) {
if (fsMethods === void 0) {
return exports2.FILE_SYSTEM_ADAPTER;
}
return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods);
}
exports2.createFileSystemAdapter = createFileSystemAdapter;
}
});
// ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.js
var require_settings = __commonJS({
"../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
var fs40 = require_fs2();
var Settings = class {
constructor(_options = {}) {
this._options = _options;
this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
this.fs = fs40.createFileSystemAdapter(this._options.fs);
this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
}
_getValue(option, value) {
return option !== null && option !== void 0 ? option : value;
}
};
exports2.default = Settings;
}
});
// ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/index.js
var require_out = __commonJS({
"../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/index.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.statSync = exports2.stat = exports2.Settings = void 0;
var async = require_async2();
var sync2 = require_sync2();
var settings_1 = require_settings();
exports2.Settings = settings_1.default;
function stat(path38, optionsOrSettingsOrCallback, callback) {
if (typeof optionsOrSettingsOrCallback === "function") {
async.read(path38, getSettings(), optionsOrSettingsOrCallback);
return;
}
async.read(path38, getSettings(optionsOrSettingsOrCallback), callback);
}
exports2.stat = stat;
function statSync(path38, optionsOrSettings) {
const settings = getSettings(optionsOrSettings);
return sync2.read(path38, settings);
}
exports2.statSync = statSync;
function getSettings(settingsOrOptions = {}) {
if (settingsOrOptions instanceof settings_1.default) {
return settingsOrOptions;
}
return new settings_1.default(settingsOrOptions);
}
}
});
// ../../node_modules/.pnpm/queue-microtask@1.2.3/node_modules/queue-microtask/index.js
var require_queue_microtask = __commonJS({
"../../node_modules/.pnpm/queue-microtask@1.2.3/node_modules/queue-microtask/index.js"(exports2, module2) {
var promise;
module2.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((err) => setTimeout(() => {
throw err;
}, 0));
}
});
// ../../node_modules/.pnpm/run-parallel@1.2.0/node_modules/run-parallel/index.js
var require_run_parallel = __commonJS({
"../../node_modules/.pnpm/run-parallel@1.2.0/node_modules/run-parallel/index.js"(exports2, module2) {
module2.exports = runParallel;
var queueMicrotask2 = require_queue_microtask();
function runParallel(tasks, cb) {
let results, pending, keys;
let isSync = true;
if (Array.isArray(tasks)) {
results = [];
pending = tasks.length;
} else {
keys = Object.keys(tasks);
results = {};
pending = keys.length;
}
function done(err) {
function end() {
if (cb)
cb(err, results);
cb = null;
}
if (isSync)
queueMicrotask2(end);
else
end();
}
function each2(i2, err, result) {
results[i2] = result;
if (--pending === 0 || err) {
done(err);
}
}
if (!pending) {
done(null);
} else if (keys) {
keys.forEach(function(key) {
tasks[key](function(err, result) {
each2(key, err, result);
});
});
} else {
tasks.forEach(function(task, i2) {
task(function(err, result) {
each2(i2, err, result);
});
});
}
isSync = false;
}
}
});
// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.js
var require_constants3 = __commonJS({
"../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0;
var NODE_PROCESS_VERSION_PARTS = process.versions.node.split(".");
if (NODE_PROCESS_VERSION_PARTS[0] === void 0 || NODE_PROCESS_VERSION_PARTS[1] === void 0) {
throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);
}
var MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10);
var MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10);
var SUPPORTED_MAJOR_VERSION = 10;
var SUPPORTED_MINOR_VERSION = 10;
var IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION;
var IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION;
exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;
}
});
// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/fs.js
var require_fs3 = __commonJS({
"../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/fs.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.createDirentFromStats = void 0;
var DirentFromStats = class {
constructor(name, stats) {
this.name = name;
this.isBlockDevice = stats.isBlockDevice.bind(stats);
this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
this.isDirectory = stats.isDirectory.bind(stats);
this.isFIFO = stats.isFIFO.bind(stats);
this.isFile = stats.isFile.bind(stats);
this.isSocket = stats.isSocket.bind(stats);
this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
}
};
function createDirentFromStats(name, stats) {
return new DirentFromStats(name, stats);
}
exports2.createDirentFromStats = createDirentFromStats;
}
});
// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.js
var require_utils4 = __commonJS({
"../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.fs = void 0;
var fs40 = require_fs3();
exports2.fs = fs40;
}
});
// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.js
var require_common2 = __commonJS({
"../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.joinPathSegments = void 0;
function joinPathSegments(a2, b2, separator) {
if (a2.endsWith(separator)) {
return a2 + b2;
}
return a2 + separator + b2;
}
exports2.joinPathSegments = joinPathSegments;
}
});
// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/async.js
var require_async3 = __commonJS({
"../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/async.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0;
var fsStat = require_out();
var rpl = require_run_parallel();
var constants_1 = require_constants3();
var utils = require_utils4();
var common = require_common2();
function read(directory, settings, callback) {
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
readdirWithFileTypes(directory, settings, callback);
return;
}
readdir2(directory, settings, callback);
}
exports2.read = read;
function readdirWithFileTypes(directory, settings, callback) {
settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
if (readdirError !== null) {
callFailureCallback(callback, readdirError);
return;
}
const entries = dirents.map((dirent) => ({
dirent,
name: dirent.name,
path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
}));
if (!settings.followSymbolicLinks) {
callSuccessCallback(callback, entries);
return;
}
const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
rpl(tasks, (rplError, rplEntries) => {
if (rplError !== null) {
callFailureCallback(callback, rplError);
return;
}
callSuccessCallback(callback, rplEntries);
});
});
}
exports2.readdirWithFileTypes = readdirWithFileTypes;
function makeRplTaskEntry(entry, settings) {
return (done) => {
if (!entry.dirent.isSymbolicLink()) {
done(null, entry);
return;
}
settings.fs.stat(entry.path, (statError, stats) => {
if (statError !== null) {
if (settings.throwErrorOnBrokenSymbolicLink) {
done(statError);
return;
}
done(null, entry);
return;
}
entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
done(null, entry);
});
};
}
function readdir2(directory, settings, callback) {
settings.fs.readdir(directory, (readdirError, names) => {
if (readdirError !== null) {
callFailureCallback(callback, readdirError);
return;
}
const tasks = names.map((name) => {
const path38 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
return (done) => {
fsStat.stat(path38, settings.fsStatSettings, (error2, stats) => {
if (error2 !== null) {
done(error2);
return;
}
const entry = {
name,
path: path38,
dirent: utils.fs.createDirentFromStats(name, stats)
};
if (settings.stats) {
entry.stats = stats;
}
done(null, entry);
});
};
});
rpl(tasks, (rplError, entries) => {
if (rplError !== null) {
callFailureCallback(callback, rplError);
return;
}
callSuccessCallback(callback, entries);
});
});
}
exports2.readdir = readdir2;
function callFailureCallback(callback, error2) {
callback(error2);
}
function callSuccessCallback(callback, result) {
callback(null, result);
}
}
});
// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/sync.js
var require_sync3 = __commonJS({
"../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/sync.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0;
var fsStat = require_out();
var constants_1 = require_constants3();
var utils = require_utils4();
var common = require_common2();
function read(directory, settings) {
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
return readdirWithFileTypes(directory, settings);
}
return readdir2(directory, settings);
}
exports2.read = read;
function readdirWithFileTypes(directory, settings) {
const dirents = settings.fs.readdirSync(directory, { withFileTypes: true });
return dirents.map((dirent) => {
const entry = {
dirent,
name: dirent.name,
path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
};
if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {
try {
const stats = settings.fs.statSync(entry.path);
entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
} catch (error2) {
if (settings.throwErrorOnBrokenSymbolicLink) {
throw error2;
}
}
}
return entry;
});
}
exports2.readdirWithFileTypes = readdirWithFileTypes;
function readdir2(directory, settings) {
const names = settings.fs.readdirSync(directory);
return names.map((name) => {
const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
const stats = fsStat.statSync(entryPath, settings.fsStatSettings);
const entry = {
name,
path: entryPath,
dirent: utils.fs.createDirentFromStats(name, stats)
};
if (settings.stats) {
entry.stats = stats;
}
return entry;
});
}
exports2.readdir = readdir2;
}
});
// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/adapters/fs.js
var require_fs4 = __commonJS({
"../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/adapters/fs.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
var fs40 = require("fs");
exports2.FILE_SYSTEM_ADAPTER = {
lstat: fs40.lstat,
stat: fs40.stat,
lstatSync: fs40.lstatSync,
statSync: fs40.statSync,
readdir: fs40.readdir,
readdirSync: fs40.readdirSync
};
function createFileSystemAdapter(fsMethods) {
if (fsMethods === void 0) {
return exports2.FILE_SYSTEM_ADAPTER;
}
return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods);
}
exports2.createFileSystemAdapter = createFileSystemAdapter;
}
});
// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js
var require_settings2 = __commonJS({
"../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
var path38 = require("path");
var fsStat = require_out();
var fs40 = require_fs4();
var Settings = class {
constructor(_options = {}) {
this._options = _options;
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
this.fs = fs40.createFileSystemAdapter(this._options.fs);
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path38.sep);
this.stats = this._getValue(this._options.stats, false);
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
this.fsStatSettings = new fsStat.Settings({
followSymbolicLink: this.followSymbolicLinks,
fs: this.fs,
throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink
});
}
_getValue(option, value) {
return option !== null && option !== void 0 ? option : value;
}
};
exports2.default = Settings;
}
});
// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/index.js
var require_out2 = __commonJS({
"../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/index.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.Settings = exports2.scandirSync = exports2.scandir = void 0;
var async = require_async3();
var sync2 = require_sync3();
var settings_1 = require_settings2();
exports2.Settings = settings_1.default;
function scandir(path38, optionsOrSettingsOrCallback, callback) {
if (typeof optionsOrSettingsOrCallback === "function") {
async.read(path38, getSettings(), optionsOrSettingsOrCallback);
return;
}
async.read(path38, getSettings(optionsOrSettingsOrCallback), callback);
}
exports2.scandir = scandir;
function scandirSync(path38, optionsOrSettings) {
const settings = getSettings(optionsOrSettings);
return sync2.read(path38, settings);
}
exports2.scandirSync = scandirSync;
function getSettings(settingsOrOptions = {}) {
if (settingsOrOptions instanceof settings_1.default) {
return settingsOrOptions;
}
return new settings_1.default(settingsOrOptions);
}
}
});
// ../../node_modules/.pnpm/reusify@1.0.4/node_modules/reusify/reusify.js
var require_reusify = __commonJS({
"../../node_modules/.pnpm/reusify@1.0.4/node_modules/reusify/reusify.js"(exports2, module2) {
"use strict";
function reusify(Constructor) {
var head2 = new Constructor();
var tail2 = head2;
function get() {
var current = head2;
if (current.next) {
head2 = current.next;
} else {
head2 = new Constructor();
tail2 = head2;
}
current.next = null;
return current;
}
function release(obj) {
tail2.next = obj;
tail2 = obj;
}
return {
get,
release
};
}
module2.exports = reusify;
}
});
// ../../node_modules/.pnpm/fastq@1.15.0/node_modules/fastq/queue.js
var require_queue = __commonJS({
"../../node_modules/.pnpm/fastq@1.15.0/node_modules/fastq/queue.js"(exports2, module2) {
"use strict";
var reusify = require_reusify();
function fastqueue(context, worker, concurrency) {
if (typeof context === "function") {
concurrency = worker;
worker = context;
context = null;
}
if (concurrency < 1) {
throw new Error("fastqueue concurrency must be greater than 1");
}
var cache = reusify(Task);
var queueHead = null;
var queueTail = null;
var _running = 0;
var errorHandler = null;
var self2 = {
push,
drain: noop2,
saturated: noop2,
pause,
paused: false,
concurrency,
running,
resume,
idle,
length,
getQueue,
unshift,
empty: noop2,
kill,
killAndDrain,
error: error2
};
return self2;
function running() {
return _running;
}
function pause() {
self2.paused = true;
}
function length() {
var current = queueHead;
var counter2 = 0;
while (current) {
current = current.next;
counter2++;
}
return counter2;
}
function getQueue() {
var current = queueHead;
var tasks = [];
while (current) {
tasks.push(current.value);
current = current.next;
}
return tasks;
}
function resume() {
if (!self2.paused)
return;
self2.paused = false;
for (var i2 = 0; i2 < self2.concurrency; i2++) {
_running++;
release();
}
}
function idle() {
return _running === 0 && self2.length() === 0;
}
function push(value, done) {
var current = cache.get();
current.context = context;
current.release = release;
current.value = value;
current.callback = done || noop2;
current.errorHandler = errorHandler;
if (_running === self2.concurrency || self2.paused) {
if (queueTail) {
queueTail.next = current;
queueTail = current;
} else {
queueHead = current;
queueTail = current;
self2.saturated();
}
} else {
_running++;
worker.call(context, current.value, current.worked);
}
}
function unshift(value, done) {
var current = cache.get();
current.context = context;
current.release = release;
current.value = value;
current.callback = done || noop2;
if (_running === self2.concurrency || self2.paused) {
if (queueHead) {
current.next = queueHead;
queueHead = current;
} else {
queueHead = current;
queueTail = current;
self2.saturated();
}
} else {
_running++;
worker.call(context, current.value, current.worked);
}
}
function release(holder) {
if (holder) {
cache.release(holder);
}
var next = queueHead;
if (next) {
if (!self2.paused) {
if (queueTail === queueHead) {
queueTail = null;
}
queueHead = next.next;
next.next = null;
worker.call(context, next.value, next.worked);
if (queueTail === null) {
self2.empty();
}
} else {
_running--;
}
} else if (--_running === 0) {
self2.drain();
}
}
function kill() {
queueHead = null;
queueTail = null;
self2.drain = noop2;
}
function killAndDrain() {
queueHead = null;
queueTail = null;
self2.drain();
self2.drain = noop2;
}
function error2(handler) {
errorHandler = handler;
}
}
function noop2() {
}
function Task() {
this.value = null;
this.callback = noop2;
this.next = null;
this.release = noop2;
this.context = null;
this.errorHandler = null;
var self2 = this;
this.worked = function worked(err, result) {
var callback = self2.callback;
var errorHandler = self2.errorHandler;
var val = self2.value;
self2.value = null;
self2.callback = noop2;
if (self2.errorHandler) {
errorHandler(err, val);
}
callback.call(self2.context, err, result);
self2.release(self2);
};
}
function queueAsPromised(context, worker, concurrency) {
if (typeof context === "function") {
concurrency = worker;
worker = context;
context = null;
}
function asyncWrapper(arg2, cb) {
worker.call(this, arg2).then(function(res) {
cb(null, res);
}, cb);
}
var queue2 = fastqueue(context, asyncWrapper, concurrency);
var pushCb = queue2.push;
var unshiftCb = queue2.unshift;
queue2.push = push;
queue2.unshift = unshift;
queue2.drained = drained;
return queue2;
function push(value) {
var p2 = new Promise(function(resolve3, reject2) {
pushCb(value, function(err, result) {
if (err) {
reject2(err);
return;
}
resolve3(result);
});
});
p2.catch(noop2);
return p2;
}
function unshift(value) {
var p2 = new Promise(function(resolve3, reject2) {
unshiftCb(value, function(err, result) {
if (err) {
reject2(err);
return;
}
resolve3(result);
});
});
p2.catch(noop2);
return p2;
}
function drained() {
if (queue2.idle()) {
return new Promise(function(resolve3) {
resolve3();
});
}
var previousDrain = queue2.drain;
var p2 = new Promise(function(resolve3) {
queue2.drain = function() {
previousDrain();
resolve3();
};
});
return p2;
}
}
module2.exports = fastqueue;
module2.exports.promise = queueAsPromised;
}
});
// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.js
var require_common3 = __commonJS({
"../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.joinPathSegments = exports2.replacePathSegmentSeparator = exports2.isAppliedFilter = exports2.isFatalError = void 0;
function isFatalError(settings, error2) {
if (settings.errorFilter === null) {
return true;
}
return !settings.errorFilter(error2);
}
exports2.isFatalError = isFatalError;
function
Showing 512.00 KB of 4.25 MB. Use Edit/Download for full content.
Directory Contents
Dirs: 1 × Files: 4