storybook
Version:
Storybook framework-agnostic API
1,491 lines (1,468 loc) • 349 kB
JavaScript
import ESM_COMPAT_Module from "node:module";
import { fileURLToPath as ESM_COMPAT_fileURLToPath } from 'node:url';
import { dirname as ESM_COMPAT_dirname } from 'node:path';
const __filename = ESM_COMPAT_fileURLToPath(import.meta.url);
const __dirname = ESM_COMPAT_dirname(__filename);
const require = ESM_COMPAT_Module.createRequire(import.meta.url);
var vm = Object.create;
var Ot = Object.defineProperty;
var Sm = Object.getOwnPropertyDescriptor;
var wm = Object.getOwnPropertyNames;
var Em = Object.getPrototypeOf, Pm = Object.prototype.hasOwnProperty;
var n = (t, e) => Ot(t, "name", { value: e, configurable: !0 }), k = /* @__PURE__ */ ((t) => typeof require < "u" ? require : typeof Proxy <
"u" ? new Proxy(t, {
get: (e, r) => (typeof require < "u" ? require : e)[r]
}) : t)(function(t) {
if (typeof require < "u") return require.apply(this, arguments);
throw Error('Dynamic require of "' + t + '" is not supported');
});
var ue = (t, e) => () => (t && (e = t(t = 0)), e);
var d = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), Dt = (t, e) => {
for (var r in e)
Ot(t, r, { get: e[r], enumerable: !0 });
}, Qo = (t, e, r, i) => {
if (e && typeof e == "object" || typeof e == "function")
for (let s of wm(e))
!Pm.call(t, s) && s !== r && Ot(t, s, { get: () => e[s], enumerable: !(i = Sm(e, s)) || i.enumerable });
return t;
};
var he = (t, e, r) => (r = t != null ? vm(Em(t)) : {}, Qo(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
e || !t || !t.__esModule ? Ot(r, "default", { value: t, enumerable: !0 }) : r,
t
)), fi = (t) => Qo(Ot({}, "__esModule", { value: !0 }), t);
// ../node_modules/ts-dedent/dist/index.js
var st = d((It) => {
"use strict";
Object.defineProperty(It, "__esModule", { value: !0 });
It.dedent = void 0;
function Zo(t) {
for (var e = [], r = 1; r < arguments.length; r++)
e[r - 1] = arguments[r];
var i = Array.from(typeof t == "string" ? [t] : t);
i[i.length - 1] = i[i.length - 1].replace(/\r?\n([\t ]*)$/, "");
var s = i.reduce(function(l, c) {
var u = c.match(/\n([\t ]+|(?!\s).)/g);
return u ? l.concat(u.map(function(h) {
var m, p;
return (p = (m = h.match(/[\t ]/g)) === null || m === void 0 ? void 0 : m.length) !== null && p !== void 0 ? p : 0;
})) : l;
}, []);
if (s.length) {
var o = new RegExp(`
[ ]{` + Math.min.apply(Math, s) + "}", "g");
i = i.map(function(l) {
return l.replace(o, `
`);
});
}
i[0] = i[0].replace(/^\r?\n/, "");
var a = i[0];
return e.forEach(function(l, c) {
var u = a.match(/(?:^|\n)( *)$/), h = u ? u[1] : "", m = l;
typeof l == "string" && l.includes(`
`) && (m = String(l).split(`
`).map(function(p, w) {
return w === 0 ? p : "" + h + p;
}).join(`
`)), a += m + i[c + 1];
}), a;
}
n(Zo, "dedent");
It.dedent = Zo;
It.default = Zo;
});
// ../node_modules/camelcase/index.js
var ha = {};
Dt(ha, {
default: () => ua
});
function ua(t, e) {
if (!(typeof t == "string" || Array.isArray(t)))
throw new TypeError("Expected the input to be `string | string[]`");
if (e = {
pascalCase: !1,
preserveConsecutiveUppercase: !1,
...e
}, Array.isArray(t) ? t = t.map((o) => o.trim()).filter((o) => o.length).join("-") : t = t.trim(), t.length === 0)
return "";
let r = e.locale === !1 ? (o) => o.toLowerCase() : (o) => o.toLocaleLowerCase(e.locale), i = e.locale === !1 ? (o) => o.toUpperCase() : (o) => o.
toLocaleUpperCase(e.locale);
return t.length === 1 ? xi.test(t) ? "" : e.pascalCase ? i(t) : r(t) : (t !== r(t) && (t = Tm(t, r, i, e.preserveConsecutiveUppercase)), t =
t.replace(Cm, ""), t = e.preserveConsecutiveUppercase ? Om(t, r) : r(t), e.pascalCase && (t = i(t.charAt(0)) + t.slice(1)), Dm(t, i));
}
var Rm, Am, oa, ca, xi, Cm, aa, la, Tm, Om, Dm, pa = ue(() => {
Rm = /[\p{Lu}]/u, Am = /[\p{Ll}]/u, oa = /^[\p{Lu}](?![\p{Lu}])/gu, ca = /([\p{Alpha}\p{N}_]|$)/u, xi = /[_.\- ]+/, Cm = new RegExp("^" + xi.
source), aa = new RegExp(xi.source + ca.source, "gu"), la = new RegExp("\\d+" + ca.source, "gu"), Tm = /* @__PURE__ */ n((t, e, r, i) => {
let s = !1, o = !1, a = !1, l = !1;
for (let c = 0; c < t.length; c++) {
let u = t[c];
l = c > 2 ? t[c - 3] === "-" : !0, s && Rm.test(u) ? (t = t.slice(0, c) + "-" + t.slice(c), s = !1, a = o, o = !0, c++) : o && a && Am.
test(u) && (!l || i) ? (t = t.slice(0, c - 1) + "-" + t.slice(c - 1), a = o, o = !1, s = !0) : (s = e(u) === u && r(u) !== u, a = o, o =
r(u) === u && e(u) !== u);
}
return t;
}, "preserveCamelCase"), Om = /* @__PURE__ */ n((t, e) => (oa.lastIndex = 0, t.replaceAll(oa, (r) => e(r))), "preserveConsecutiveUppercase"),
Dm = /* @__PURE__ */ n((t, e) => (aa.lastIndex = 0, la.lastIndex = 0, t.replaceAll(la, (r, i, s) => ["_", "-"].includes(t.charAt(s + r.length)) ?
r : e(r)).replaceAll(aa, (r, i) => e(i))), "postProcess");
n(ua, "camelCase");
});
// ../node_modules/globby/node_modules/@sindresorhus/merge-streams/index.js
import { on as Bm, once as Wm } from "node:events";
import { PassThrough as Vm } from "node:stream";
import { finished as Ca } from "node:stream/promises";
function Ai(t) {
if (!Array.isArray(t))
throw new TypeError(`Expected an array, got \`${typeof t}\`.`);
for (let s of t)
Pi(s);
let e = t.some(({ readableObjectMode: s }) => s), r = Gm(t, e), i = new Ei({
objectMode: e,
writableHighWaterMark: r,
readableHighWaterMark: r
});
for (let s of t)
i.add(s);
return t.length === 0 && Da(i), i;
}
var Gm, Ei, Um, Ym, zm, Pi, Km, Ta, Xm, Qm, Zm, Oa, Da, Ri, Ia, Jm, pr, Ra, Aa, ka = ue(() => {
n(Ai, "mergeStreams");
Gm = /* @__PURE__ */ n((t, e) => {
if (t.length === 0)
return 16384;
let r = t.filter(({ readableObjectMode: i }) => i === e).map(({ readableHighWaterMark: i }) => i);
return Math.max(...r);
}, "getHighWaterMark"), Ei = class extends Vm {
static {
n(this, "MergedStream");
}
#e = /* @__PURE__ */ new Set([]);
#r = /* @__PURE__ */ new Set([]);
#i = /* @__PURE__ */ new Set([]);
#t;
add(e) {
Pi(e), !this.#e.has(e) && (this.#e.add(e), this.#t ??= Um(this, this.#e), Km({
passThroughStream: this,
stream: e,
streams: this.#e,
ended: this.#r,
aborted: this.#i,
onFinished: this.#t
}), e.pipe(this, { end: !1 }));
}
remove(e) {
return Pi(e), this.#e.has(e) ? (e.unpipe(this), !0) : !1;
}
}, Um = /* @__PURE__ */ n(async (t, e) => {
pr(t, Ra);
let r = new AbortController();
try {
await Promise.race([
Ym(t, r),
zm(t, e, r)
]);
} finally {
r.abort(), pr(t, -Ra);
}
}, "onMergedStreamFinished"), Ym = /* @__PURE__ */ n(async (t, { signal: e }) => {
await Ca(t, { signal: e, cleanup: !0 });
}, "onMergedStreamEnd"), zm = /* @__PURE__ */ n(async (t, e, { signal: r }) => {
for await (let [i] of Bm(t, "unpipe", { signal: r }))
e.has(i) && i.emit(Oa);
}, "onInputStreamsUnpipe"), Pi = /* @__PURE__ */ n((t) => {
if (typeof t?.pipe != "function")
throw new TypeError(`Expected a readable stream, got: \`${typeof t}\`.`);
}, "validateStream"), Km = /* @__PURE__ */ n(async ({ passThroughStream: t, stream: e, streams: r, ended: i, aborted: s, onFinished: o }) => {
pr(t, Aa);
let a = new AbortController();
try {
await Promise.race([
Xm(o, e),
Qm({ passThroughStream: t, stream: e, streams: r, ended: i, aborted: s, controller: a }),
Zm({ stream: e, streams: r, ended: i, aborted: s, controller: a })
]);
} finally {
a.abort(), pr(t, -Aa);
}
r.size === i.size + s.size && (i.size === 0 && s.size > 0 ? Ri(t) : Da(t));
}, "endWhenStreamsDone"), Ta = /* @__PURE__ */ n((t) => t?.code === "ERR_STREAM_PREMATURE_CLOSE", "isAbortError"), Xm = /* @__PURE__ */ n(
async (t, e) => {
try {
await t, Ri(e);
} catch (r) {
Ta(r) ? Ri(e) : Ia(e, r);
}
}, "afterMergedStreamFinished"), Qm = /* @__PURE__ */ n(async ({ passThroughStream: t, stream: e, streams: r, ended: i, aborted: s, controller: {
signal: o } }) => {
try {
await Ca(e, { signal: o, cleanup: !0, readable: !0, writable: !1 }), r.has(e) && i.add(e);
} catch (a) {
if (o.aborted || !r.has(e))
return;
Ta(a) ? s.add(e) : Ia(t, a);
}
}, "onInputStreamEnd"), Zm = /* @__PURE__ */ n(async ({ stream: t, streams: e, ended: r, aborted: i, controller: { signal: s } }) => {
await Wm(t, Oa, { signal: s }), e.delete(t), r.delete(t), i.delete(t);
}, "onInputStreamUnpipe"), Oa = Symbol("unpipe"), Da = /* @__PURE__ */ n((t) => {
t.writable && t.end();
}, "endStream"), Ri = /* @__PURE__ */ n((t) => {
(t.readable || t.writable) && t.destroy();
}, "abortStream"), Ia = /* @__PURE__ */ n((t, e) => {
t.destroyed || (t.once("error", Jm), t.destroy(e));
}, "errorStream"), Jm = /* @__PURE__ */ n(() => {
}, "noop"), pr = /* @__PURE__ */ n((t, e) => {
let r = t.getMaxListeners();
r !== 0 && r !== Number.POSITIVE_INFINITY && t.setMaxListeners(r + e);
}, "updateMaxListeners"), Ra = 2, Aa = 1;
});
// ../node_modules/fast-glob/out/utils/array.js
var $a = d((ft) => {
"use strict";
Object.defineProperty(ft, "__esModule", { value: !0 });
ft.splitWhen = ft.flatten = void 0;
function eg(t) {
return t.reduce((e, r) => [].concat(e, r), []);
}
n(eg, "flatten");
ft.flatten = eg;
function tg(t, e) {
let r = [[]], i = 0;
for (let s of t)
e(s) ? (i++, r[i] = []) : r[i].push(s);
return r;
}
n(tg, "splitWhen");
ft.splitWhen = tg;
});
// ../node_modules/fast-glob/out/utils/errno.js
var Na = d((dr) => {
"use strict";
Object.defineProperty(dr, "__esModule", { value: !0 });
dr.isEnoentCodeError = void 0;
function rg(t) {
return t.code === "ENOENT";
}
n(rg, "isEnoentCodeError");
dr.isEnoentCodeError = rg;
});
// ../node_modules/fast-glob/out/utils/fs.js
var Ma = d((fr) => {
"use strict";
Object.defineProperty(fr, "__esModule", { value: !0 });
fr.createDirentFromStats = void 0;
var Ci = class {
static {
n(this, "DirentFromStats");
}
constructor(e, r) {
this.name = e, this.isBlockDevice = r.isBlockDevice.bind(r), this.isCharacterDevice = r.isCharacterDevice.bind(r), this.isDirectory = r.
isDirectory.bind(r), this.isFIFO = r.isFIFO.bind(r), this.isFile = r.isFile.bind(r), this.isSocket = r.isSocket.bind(r), this.isSymbolicLink =
r.isSymbolicLink.bind(r);
}
};
function ig(t, e) {
return new Ci(t, e);
}
n(ig, "createDirentFromStats");
fr.createDirentFromStats = ig;
});
// ../node_modules/fast-glob/out/utils/path.js
var Fa = d((Q) => {
"use strict";
Object.defineProperty(Q, "__esModule", { value: !0 });
Q.convertPosixPathToPattern = Q.convertWindowsPathToPattern = Q.convertPathToPattern = Q.escapePosixPath = Q.escapeWindowsPath = Q.escape =
Q.removeLeadingDotSegment = Q.makeAbsolute = Q.unixify = void 0;
var sg = k("os"), ng = k("path"), qa = sg.platform() === "win32", og = 2, ag = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,
lg = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g, cg = /^\\\\([.?])/, ug = /\\(?![!()+@[\]{}])/g;
function hg(t) {
return t.replace(/\\/g, "/");
}
n(hg, "unixify");
Q.unixify = hg;
function pg(t, e) {
return ng.resolve(t, e);
}
n(pg, "makeAbsolute");
Q.makeAbsolute = pg;
function dg(t) {
if (t.charAt(0) === ".") {
let e = t.charAt(1);
if (e === "/" || e === "\\")
return t.slice(og);
}
return t;
}
n(dg, "removeLeadingDotSegment");
Q.removeLeadingDotSegment = dg;
Q.escape = qa ? Ti : Oi;
function Ti(t) {
return t.replace(lg, "\\$2");
}
n(Ti, "escapeWindowsPath");
Q.escapeWindowsPath = Ti;
function Oi(t) {
return t.replace(ag, "\\$2");
}
n(Oi, "escapePosixPath");
Q.escapePosixPath = Oi;
Q.convertPathToPattern = qa ? ja : La;
function ja(t) {
return Ti(t).replace(cg, "//$1").replace(ug, "/");
}
n(ja, "convertWindowsPathToPattern");
Q.convertWindowsPathToPattern = ja;
function La(t) {
return Oi(t);
}
n(La, "convertPosixPathToPattern");
Q.convertPosixPathToPattern = La;
});
// ../node_modules/is-extglob/index.js
var Ba = d((NR, Ha) => {
Ha.exports = /* @__PURE__ */ n(function(e) {
if (typeof e != "string" || e === "")
return !1;
for (var r; r = /(\\).|([@?!+*]\(.*\))/g.exec(e); ) {
if (r[2]) return !0;
e = e.slice(r.index + r[0].length);
}
return !1;
}, "isExtglob");
});
// ../node_modules/is-glob/index.js
var Ga = d((qR, Va) => {
var fg = Ba(), Wa = { "{": "}", "(": ")", "[": "]" }, mg = /* @__PURE__ */ n(function(t) {
if (t[0] === "!")
return !0;
for (var e = 0, r = -2, i = -2, s = -2, o = -2, a = -2; e < t.length; ) {
if (t[e] === "*" || t[e + 1] === "?" && /[\].+)]/.test(t[e]) || i !== -1 && t[e] === "[" && t[e + 1] !== "]" && (i < e && (i = t.indexOf(
"]", e)), i > e && (a === -1 || a > i || (a = t.indexOf("\\", e), a === -1 || a > i))) || s !== -1 && t[e] === "{" && t[e + 1] !== "}" &&
(s = t.indexOf("}", e), s > e && (a = t.indexOf("\\", e), a === -1 || a > s)) || o !== -1 && t[e] === "(" && t[e + 1] === "?" && /[:!=]/.
test(t[e + 2]) && t[e + 3] !== ")" && (o = t.indexOf(")", e), o > e && (a = t.indexOf("\\", e), a === -1 || a > o)) || r !== -1 && t[e] ===
"(" && t[e + 1] !== "|" && (r < e && (r = t.indexOf("|", e)), r !== -1 && t[r + 1] !== ")" && (o = t.indexOf(")", r), o > r && (a = t.
indexOf("\\", r), a === -1 || a > o))))
return !0;
if (t[e] === "\\") {
var l = t[e + 1];
e += 2;
var c = Wa[l];
if (c) {
var u = t.indexOf(c, e);
u !== -1 && (e = u + 1);
}
if (t[e] === "!")
return !0;
} else
e++;
}
return !1;
}, "strictCheck"), gg = /* @__PURE__ */ n(function(t) {
if (t[0] === "!")
return !0;
for (var e = 0; e < t.length; ) {
if (/[*?{}()[\]]/.test(t[e]))
return !0;
if (t[e] === "\\") {
var r = t[e + 1];
e += 2;
var i = Wa[r];
if (i) {
var s = t.indexOf(i, e);
s !== -1 && (e = s + 1);
}
if (t[e] === "!")
return !0;
} else
e++;
}
return !1;
}, "relaxedCheck");
Va.exports = /* @__PURE__ */ n(function(e, r) {
if (typeof e != "string" || e === "")
return !1;
if (fg(e))
return !0;
var i = mg;
return r && r.strict === !1 && (i = gg), i(e);
}, "isGlob");
});
// ../node_modules/fast-glob/node_modules/glob-parent/index.js
var Ya = d((LR, Ua) => {
"use strict";
var yg = Ga(), xg = k("path").posix.dirname, bg = k("os").platform() === "win32", Di = "/", _g = /\\/g, vg = /[\{\[].*[\}\]]$/, Sg = /(^|[^\\])([\{\[]|\([^\)]+$)/,
wg = /\\([\!\*\?\|\[\]\(\)\{\}])/g;
Ua.exports = /* @__PURE__ */ n(function(e, r) {
var i = Object.assign({ flipBackslashes: !0 }, r);
i.flipBackslashes && bg && e.indexOf(Di) < 0 && (e = e.replace(_g, Di)), vg.test(e) && (e += Di), e += "a";
do
e = xg(e);
while (yg(e) || Sg.test(e));
return e.replace(wg, "$1");
}, "globParent");
});
// ../node_modules/braces/lib/utils.js
var mr = d((pe) => {
"use strict";
pe.isInteger = (t) => typeof t == "number" ? Number.isInteger(t) : typeof t == "string" && t.trim() !== "" ? Number.isInteger(Number(t)) :
!1;
pe.find = (t, e) => t.nodes.find((r) => r.type === e);
pe.exceedsLimit = (t, e, r = 1, i) => i === !1 || !pe.isInteger(t) || !pe.isInteger(e) ? !1 : (Number(e) - Number(t)) / Number(r) >= i;
pe.escapeNode = (t, e = 0, r) => {
let i = t.nodes[e];
i && (r && i.type === r || i.type === "open" || i.type === "close") && i.escaped !== !0 && (i.value = "\\" + i.value, i.escaped = !0);
};
pe.encloseBrace = (t) => t.type !== "brace" ? !1 : t.commas >> 0 + t.ranges >> 0 === 0 ? (t.invalid = !0, !0) : !1;
pe.isInvalidBrace = (t) => t.type !== "brace" ? !1 : t.invalid === !0 || t.dollar ? !0 : t.commas >> 0 + t.ranges >> 0 === 0 || t.open !==
!0 || t.close !== !0 ? (t.invalid = !0, !0) : !1;
pe.isOpenOrClose = (t) => t.type === "open" || t.type === "close" ? !0 : t.open === !0 || t.close === !0;
pe.reduce = (t) => t.reduce((e, r) => (r.type === "text" && e.push(r.value), r.type === "range" && (r.type = "text"), e), []);
pe.flatten = (...t) => {
let e = [], r = /* @__PURE__ */ n((i) => {
for (let s = 0; s < i.length; s++) {
let o = i[s];
if (Array.isArray(o)) {
r(o);
continue;
}
o !== void 0 && e.push(o);
}
return e;
}, "flat");
return r(t), e;
};
});
// ../node_modules/braces/lib/stringify.js
var gr = d((WR, Ka) => {
"use strict";
var za = mr();
Ka.exports = (t, e = {}) => {
let r = /* @__PURE__ */ n((i, s = {}) => {
let o = e.escapeInvalid && za.isInvalidBrace(s), a = i.invalid === !0 && e.escapeInvalid === !0, l = "";
if (i.value)
return (o || a) && za.isOpenOrClose(i) ? "\\" + i.value : i.value;
if (i.value)
return i.value;
if (i.nodes)
for (let c of i.nodes)
l += r(c);
return l;
}, "stringify");
return r(t);
};
});
// ../node_modules/is-number/index.js
var Qa = d((GR, Xa) => {
"use strict";
Xa.exports = function(t) {
return typeof t == "number" ? t - t === 0 : typeof t == "string" && t.trim() !== "" ? Number.isFinite ? Number.isFinite(+t) : isFinite(+t) :
!1;
};
});
// ../node_modules/to-regex-range/index.js
var ol = d((UR, nl) => {
"use strict";
var Za = Qa(), ot = /* @__PURE__ */ n((t, e, r) => {
if (Za(t) === !1)
throw new TypeError("toRegexRange: expected the first argument to be a number");
if (e === void 0 || t === e)
return String(t);
if (Za(e) === !1)
throw new TypeError("toRegexRange: expected the second argument to be a number.");
let i = { relaxZeros: !0, ...r };
typeof i.strictZeros == "boolean" && (i.relaxZeros = i.strictZeros === !1);
let s = String(i.relaxZeros), o = String(i.shorthand), a = String(i.capture), l = String(i.wrap), c = t + ":" + e + "=" + s + o + a + l;
if (ot.cache.hasOwnProperty(c))
return ot.cache[c].result;
let u = Math.min(t, e), h = Math.max(t, e);
if (Math.abs(u - h) === 1) {
let _ = t + "|" + e;
return i.capture ? `(${_})` : i.wrap === !1 ? _ : `(?:${_})`;
}
let m = sl(t) || sl(e), p = { min: t, max: e, a: u, b: h }, w = [], g = [];
if (m && (p.isPadded = m, p.maxLen = String(p.max).length), u < 0) {
let _ = h < 0 ? Math.abs(h) : 1;
g = Ja(_, Math.abs(u), p, i), u = p.a = 0;
}
return h >= 0 && (w = Ja(u, h, p, i)), p.negatives = g, p.positives = w, p.result = Eg(g, w, i), i.capture === !0 ? p.result = `(${p.result}\
)` : i.wrap !== !1 && w.length + g.length > 1 && (p.result = `(?:${p.result})`), ot.cache[c] = p, p.result;
}, "toRegexRange");
function Eg(t, e, r) {
let i = Ii(t, e, "-", !1, r) || [], s = Ii(e, t, "", !1, r) || [], o = Ii(t, e, "-?", !0, r) || [];
return i.concat(o).concat(s).join("|");
}
n(Eg, "collatePatterns");
function Pg(t, e) {
let r = 1, i = 1, s = tl(t, r), o = /* @__PURE__ */ new Set([e]);
for (; t <= s && s <= e; )
o.add(s), r += 1, s = tl(t, r);
for (s = rl(e + 1, i) - 1; t < s && s <= e; )
o.add(s), i += 1, s = rl(e + 1, i) - 1;
return o = [...o], o.sort(Cg), o;
}
n(Pg, "splitToRanges");
function Rg(t, e, r) {
if (t === e)
return { pattern: t, count: [], digits: 0 };
let i = Ag(t, e), s = i.length, o = "", a = 0;
for (let l = 0; l < s; l++) {
let [c, u] = i[l];
c === u ? o += c : c !== "0" || u !== "9" ? o += Tg(c, u, r) : a++;
}
return a && (o += r.shorthand === !0 ? "\\d" : "[0-9]"), { pattern: o, count: [a], digits: s };
}
n(Rg, "rangeToPattern");
function Ja(t, e, r, i) {
let s = Pg(t, e), o = [], a = t, l;
for (let c = 0; c < s.length; c++) {
let u = s[c], h = Rg(String(a), String(u), i), m = "";
if (!r.isPadded && l && l.pattern === h.pattern) {
l.count.length > 1 && l.count.pop(), l.count.push(h.count[0]), l.string = l.pattern + il(l.count), a = u + 1;
continue;
}
r.isPadded && (m = Og(u, r, i)), h.string = m + h.pattern + il(h.count), o.push(h), a = u + 1, l = h;
}
return o;
}
n(Ja, "splitToPatterns");
function Ii(t, e, r, i, s) {
let o = [];
for (let a of t) {
let { string: l } = a;
!i && !el(e, "string", l) && o.push(r + l), i && el(e, "string", l) && o.push(r + l);
}
return o;
}
n(Ii, "filterPatterns");
function Ag(t, e) {
let r = [];
for (let i = 0; i < t.length; i++) r.push([t[i], e[i]]);
return r;
}
n(Ag, "zip");
function Cg(t, e) {
return t > e ? 1 : e > t ? -1 : 0;
}
n(Cg, "compare");
function el(t, e, r) {
return t.some((i) => i[e] === r);
}
n(el, "contains");
function tl(t, e) {
return Number(String(t).slice(0, -e) + "9".repeat(e));
}
n(tl, "countNines");
function rl(t, e) {
return t - t % Math.pow(10, e);
}
n(rl, "countZeros");
function il(t) {
let [e = 0, r = ""] = t;
return r || e > 1 ? `{${e + (r ? "," + r : "")}}` : "";
}
n(il, "toQuantifier");
function Tg(t, e, r) {
return `[${t}${e - t === 1 ? "" : "-"}${e}]`;
}
n(Tg, "toCharacterClass");
function sl(t) {
return /^-?(0+)\d/.test(t);
}
n(sl, "hasPadding");
function Og(t, e, r) {
if (!e.isPadded)
return t;
let i = Math.abs(e.maxLen - String(t).length), s = r.relaxZeros !== !1;
switch (i) {
case 0:
return "";
case 1:
return s ? "0?" : "0";
case 2:
return s ? "0{0,2}" : "00";
default:
return s ? `0{0,${i}}` : `0{${i}}`;
}
}
n(Og, "padZeros");
ot.cache = {};
ot.clearCache = () => ot.cache = {};
nl.exports = ot;
});
// ../node_modules/fill-range/index.js
var Ni = d((zR, dl) => {
"use strict";
var Dg = k("util"), ll = ol(), al = /* @__PURE__ */ n((t) => t !== null && typeof t == "object" && !Array.isArray(t), "isObject"), Ig = /* @__PURE__ */ n(
(t) => (e) => t === !0 ? Number(e) : String(e), "transform"), ki = /* @__PURE__ */ n((t) => typeof t == "number" || typeof t == "string" &&
t !== "", "isValidValue"), Nt = /* @__PURE__ */ n((t) => Number.isInteger(+t), "isNumber"), $i = /* @__PURE__ */ n((t) => {
let e = `${t}`, r = -1;
if (e[0] === "-" && (e = e.slice(1)), e === "0") return !1;
for (; e[++r] === "0"; ) ;
return r > 0;
}, "zeros"), kg = /* @__PURE__ */ n((t, e, r) => typeof t == "string" || typeof e == "string" ? !0 : r.stringify === !0, "stringify"), $g = /* @__PURE__ */ n(
(t, e, r) => {
if (e > 0) {
let i = t[0] === "-" ? "-" : "";
i && (t = t.slice(1)), t = i + t.padStart(i ? e - 1 : e, "0");
}
return r === !1 ? String(t) : t;
}, "pad"), xr = /* @__PURE__ */ n((t, e) => {
let r = t[0] === "-" ? "-" : "";
for (r && (t = t.slice(1), e--); t.length < e; ) t = "0" + t;
return r ? "-" + t : t;
}, "toMaxLen"), Ng = /* @__PURE__ */ n((t, e, r) => {
t.negatives.sort((l, c) => l < c ? -1 : l > c ? 1 : 0), t.positives.sort((l, c) => l < c ? -1 : l > c ? 1 : 0);
let i = e.capture ? "" : "?:", s = "", o = "", a;
return t.positives.length && (s = t.positives.map((l) => xr(String(l), r)).join("|")), t.negatives.length && (o = `-(${i}${t.negatives.map(
(l) => xr(String(l), r)).join("|")})`), s && o ? a = `${s}|${o}` : a = s || o, e.wrap ? `(${i}${a})` : a;
}, "toSequence"), cl = /* @__PURE__ */ n((t, e, r, i) => {
if (r)
return ll(t, e, { wrap: !1, ...i });
let s = String.fromCharCode(t);
if (t === e) return s;
let o = String.fromCharCode(e);
return `[${s}-${o}]`;
}, "toRange"), ul = /* @__PURE__ */ n((t, e, r) => {
if (Array.isArray(t)) {
let i = r.wrap === !0, s = r.capture ? "" : "?:";
return i ? `(${s}${t.join("|")})` : t.join("|");
}
return ll(t, e, r);
}, "toRegex"), hl = /* @__PURE__ */ n((...t) => new RangeError("Invalid range arguments: " + Dg.inspect(...t)), "rangeError"), pl = /* @__PURE__ */ n(
(t, e, r) => {
if (r.strictRanges === !0) throw hl([t, e]);
return [];
}, "invalidRange"), Mg = /* @__PURE__ */ n((t, e) => {
if (e.strictRanges === !0)
throw new TypeError(`Expected step "${t}" to be a number`);
return [];
}, "invalidStep"), qg = /* @__PURE__ */ n((t, e, r = 1, i = {}) => {
let s = Number(t), o = Number(e);
if (!Number.isInteger(s) || !Number.isInteger(o)) {
if (i.strictRanges === !0) throw hl([t, e]);
return [];
}
s === 0 && (s = 0), o === 0 && (o = 0);
let a = s > o, l = String(t), c = String(e), u = String(r);
r = Math.max(Math.abs(r), 1);
let h = $i(l) || $i(c) || $i(u), m = h ? Math.max(l.length, c.length, u.length) : 0, p = h === !1 && kg(t, e, i) === !1, w = i.transform ||
Ig(p);
if (i.toRegex && r === 1)
return cl(xr(t, m), xr(e, m), !0, i);
let g = { negatives: [], positives: [] }, _ = /* @__PURE__ */ n(($) => g[$ < 0 ? "negatives" : "positives"].push(Math.abs($)), "push"), P = [],
E = 0;
for (; a ? s >= o : s <= o; )
i.toRegex === !0 && r > 1 ? _(s) : P.push($g(w(s, E), m, p)), s = a ? s - r : s + r, E++;
return i.toRegex === !0 ? r > 1 ? Ng(g, i, m) : ul(P, null, { wrap: !1, ...i }) : P;
}, "fillNumbers"), jg = /* @__PURE__ */ n((t, e, r = 1, i = {}) => {
if (!Nt(t) && t.length > 1 || !Nt(e) && e.length > 1)
return pl(t, e, i);
let s = i.transform || ((p) => String.fromCharCode(p)), o = `${t}`.charCodeAt(0), a = `${e}`.charCodeAt(0), l = o > a, c = Math.min(o, a),
u = Math.max(o, a);
if (i.toRegex && r === 1)
return cl(c, u, !1, i);
let h = [], m = 0;
for (; l ? o >= a : o <= a; )
h.push(s(o, m)), o = l ? o - r : o + r, m++;
return i.toRegex === !0 ? ul(h, null, { wrap: !1, options: i }) : h;
}, "fillLetters"), yr = /* @__PURE__ */ n((t, e, r, i = {}) => {
if (e == null && ki(t))
return [t];
if (!ki(t) || !ki(e))
return pl(t, e, i);
if (typeof r == "function")
return yr(t, e, 1, { transform: r });
if (al(r))
return yr(t, e, 0, r);
let s = { ...i };
return s.capture === !0 && (s.wrap = !0), r = r || s.step || 1, Nt(r) ? Nt(t) && Nt(e) ? qg(t, e, r, s) : jg(t, e, Math.max(Math.abs(r),
1), s) : r != null && !al(r) ? Mg(r, s) : yr(t, e, 1, r);
}, "fill");
dl.exports = yr;
});
// ../node_modules/braces/lib/compile.js
var gl = d((XR, ml) => {
"use strict";
var Lg = Ni(), fl = mr(), Fg = /* @__PURE__ */ n((t, e = {}) => {
let r = /* @__PURE__ */ n((i, s = {}) => {
let o = fl.isInvalidBrace(s), a = i.invalid === !0 && e.escapeInvalid === !0, l = o === !0 || a === !0, c = e.escapeInvalid === !0 ? "\
\\" : "", u = "";
if (i.isOpen === !0)
return c + i.value;
if (i.isClose === !0)
return console.log("node.isClose", c, i.value), c + i.value;
if (i.type === "open")
return l ? c + i.value : "(";
if (i.type === "close")
return l ? c + i.value : ")";
if (i.type === "comma")
return i.prev.type === "comma" ? "" : l ? i.value : "|";
if (i.value)
return i.value;
if (i.nodes && i.ranges > 0) {
let h = fl.reduce(i.nodes), m = Lg(...h, { ...e, wrap: !1, toRegex: !0, strictZeros: !0 });
if (m.length !== 0)
return h.length > 1 && m.length > 1 ? `(${m})` : m;
}
if (i.nodes)
for (let h of i.nodes)
u += r(h, i);
return u;
}, "walk");
return r(t);
}, "compile");
ml.exports = Fg;
});
// ../node_modules/braces/lib/expand.js
var bl = d((ZR, xl) => {
"use strict";
var Hg = Ni(), yl = gr(), mt = mr(), at = /* @__PURE__ */ n((t = "", e = "", r = !1) => {
let i = [];
if (t = [].concat(t), e = [].concat(e), !e.length) return t;
if (!t.length)
return r ? mt.flatten(e).map((s) => `{${s}}`) : e;
for (let s of t)
if (Array.isArray(s))
for (let o of s)
i.push(at(o, e, r));
else
for (let o of e)
r === !0 && typeof o == "string" && (o = `{${o}}`), i.push(Array.isArray(o) ? at(s, o, r) : s + o);
return mt.flatten(i);
}, "append"), Bg = /* @__PURE__ */ n((t, e = {}) => {
let r = e.rangeLimit === void 0 ? 1e3 : e.rangeLimit, i = /* @__PURE__ */ n((s, o = {}) => {
s.queue = [];
let a = o, l = o.queue;
for (; a.type !== "brace" && a.type !== "root" && a.parent; )
a = a.parent, l = a.queue;
if (s.invalid || s.dollar) {
l.push(at(l.pop(), yl(s, e)));
return;
}
if (s.type === "brace" && s.invalid !== !0 && s.nodes.length === 2) {
l.push(at(l.pop(), ["{}"]));
return;
}
if (s.nodes && s.ranges > 0) {
let m = mt.reduce(s.nodes);
if (mt.exceedsLimit(...m, e.step, r))
throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
let p = Hg(...m, e);
p.length === 0 && (p = yl(s, e)), l.push(at(l.pop(), p)), s.nodes = [];
return;
}
let c = mt.encloseBrace(s), u = s.queue, h = s;
for (; h.type !== "brace" && h.type !== "root" && h.parent; )
h = h.parent, u = h.queue;
for (let m = 0; m < s.nodes.length; m++) {
let p = s.nodes[m];
if (p.type === "comma" && s.type === "brace") {
m === 1 && u.push(""), u.push("");
continue;
}
if (p.type === "close") {
l.push(at(l.pop(), u, c));
continue;
}
if (p.value && p.type !== "open") {
u.push(at(u.pop(), p.value));
continue;
}
p.nodes && i(p, s);
}
return u;
}, "walk");
return mt.flatten(i(t));
}, "expand");
xl.exports = Bg;
});
// ../node_modules/braces/lib/constants.js
var vl = d((eA, _l) => {
"use strict";
_l.exports = {
MAX_LENGTH: 1e4,
// Digits
CHAR_0: "0",
/* 0 */
CHAR_9: "9",
/* 9 */
// Alphabet chars.
CHAR_UPPERCASE_A: "A",
/* A */
CHAR_LOWERCASE_A: "a",
/* a */
CHAR_UPPERCASE_Z: "Z",
/* Z */
CHAR_LOWERCASE_Z: "z",
/* z */
CHAR_LEFT_PARENTHESES: "(",
/* ( */
CHAR_RIGHT_PARENTHESES: ")",
/* ) */
CHAR_ASTERISK: "*",
/* * */
// Non-alphabetic chars.
CHAR_AMPERSAND: "&",
/* & */
CHAR_AT: "@",
/* @ */
CHAR_BACKSLASH: "\\",
/* \ */
CHAR_BACKTICK: "`",
/* ` */
CHAR_CARRIAGE_RETURN: "\r",
/* \r */
CHAR_CIRCUMFLEX_ACCENT: "^",
/* ^ */
CHAR_COLON: ":",
/* : */
CHAR_COMMA: ",",
/* , */
CHAR_DOLLAR: "$",
/* . */
CHAR_DOT: ".",
/* . */
CHAR_DOUBLE_QUOTE: '"',
/* " */
CHAR_EQUAL: "=",
/* = */
CHAR_EXCLAMATION_MARK: "!",
/* ! */
CHAR_FORM_FEED: "\f",
/* \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",
/* \u00A0 */
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: " ",
/* \t */
CHAR_UNDERSCORE: "_",
/* _ */
CHAR_VERTICAL_LINE: "|",
/* | */
CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF"
/* \uFEFF */
};
});
// ../node_modules/braces/lib/parse.js
var Rl = d((tA, Pl) => {
"use strict";
var Wg = gr(), {
MAX_LENGTH: Sl,
CHAR_BACKSLASH: Mi,
/* \ */
CHAR_BACKTICK: Vg,
/* ` */
CHAR_COMMA: Gg,
/* , */
CHAR_DOT: Ug,
/* . */
CHAR_LEFT_PARENTHESES: Yg,
/* ( */
CHAR_RIGHT_PARENTHESES: zg,
/* ) */
CHAR_LEFT_CURLY_BRACE: Kg,
/* { */
CHAR_RIGHT_CURLY_BRACE: Xg,
/* } */
CHAR_LEFT_SQUARE_BRACKET: wl,
/* [ */
CHAR_RIGHT_SQUARE_BRACKET: El,
/* ] */
CHAR_DOUBLE_QUOTE: Qg,
/* " */
CHAR_SINGLE_QUOTE: Zg,
/* ' */
CHAR_NO_BREAK_SPACE: Jg,
CHAR_ZERO_WIDTH_NOBREAK_SPACE: ey
} = vl(), ty = /* @__PURE__ */ n((t, e = {}) => {
if (typeof t != "string")
throw new TypeError("Expected a string");
let r = e || {}, i = typeof r.maxLength == "number" ? Math.min(Sl, r.maxLength) : Sl;
if (t.length > i)
throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${i})`);
let s = { type: "root", input: t, nodes: [] }, o = [s], a = s, l = s, c = 0, u = t.length, h = 0, m = 0, p, w = /* @__PURE__ */ n(() => t[h++],
"advance"), g = /* @__PURE__ */ n((_) => {
if (_.type === "text" && l.type === "dot" && (l.type = "text"), l && l.type === "text" && _.type === "text") {
l.value += _.value;
return;
}
return a.nodes.push(_), _.parent = a, _.prev = l, l = _, _;
}, "push");
for (g({ type: "bos" }); h < u; )
if (a = o[o.length - 1], p = w(), !(p === ey || p === Jg)) {
if (p === Mi) {
g({ type: "text", value: (e.keepEscaping ? p : "") + w() });
continue;
}
if (p === El) {
g({ type: "text", value: "\\" + p });
continue;
}
if (p === wl) {
c++;
let _;
for (; h < u && (_ = w()); ) {
if (p += _, _ === wl) {
c++;
continue;
}
if (_ === Mi) {
p += w();
continue;
}
if (_ === El && (c--, c === 0))
break;
}
g({ type: "text", value: p });
continue;
}
if (p === Yg) {
a = g({ type: "paren", nodes: [] }), o.push(a), g({ type: "text", value: p });
continue;
}
if (p === zg) {
if (a.type !== "paren") {
g({ type: "text", value: p });
continue;
}
a = o.pop(), g({ type: "text", value: p }), a = o[o.length - 1];
continue;
}
if (p === Qg || p === Zg || p === Vg) {
let _ = p, P;
for (e.keepQuotes !== !0 && (p = ""); h < u && (P = w()); ) {
if (P === Mi) {
p += P + w();
continue;
}
if (P === _) {
e.keepQuotes === !0 && (p += P);
break;
}
p += P;
}
g({ type: "text", value: p });
continue;
}
if (p === Kg) {
m++;
let P = {
type: "brace",
open: !0,
close: !1,
dollar: l.value && l.value.slice(-1) === "$" || a.dollar === !0,
depth: m,
commas: 0,
ranges: 0,
nodes: []
};
a = g(P), o.push(a), g({ type: "open", value: p });
continue;
}
if (p === Xg) {
if (a.type !== "brace") {
g({ type: "text", value: p });
continue;
}
let _ = "close";
a = o.pop(), a.close = !0, g({ type: _, value: p }), m--, a = o[o.length - 1];
continue;
}
if (p === Gg && m > 0) {
if (a.ranges > 0) {
a.ranges = 0;
let _ = a.nodes.shift();
a.nodes = [_, { type: "text", value: Wg(a) }];
}
g({ type: "comma", value: p }), a.commas++;
continue;
}
if (p === Ug && m > 0 && a.commas === 0) {
let _ = a.nodes;
if (m === 0 || _.length === 0) {
g({ type: "text", value: p });
continue;
}
if (l.type === "dot") {
if (a.range = [], l.value += p, l.type = "range", a.nodes.length !== 3 && a.nodes.length !== 5) {
a.invalid = !0, a.ranges = 0, l.type = "text";
continue;
}
a.ranges++, a.args = [];
continue;
}
if (l.type === "range") {
_.pop();
let P = _[_.length - 1];
P.value += l.value + p, l = P, a.ranges--;
continue;
}
g({ type: "dot", value: p });
continue;
}
g({ type: "text", value: p });
}
do
if (a = o.pop(), a.type !== "root") {
a.nodes.forEach((E) => {
E.nodes || (E.type === "open" && (E.isOpen = !0), E.type === "close" && (E.isClose = !0), E.nodes || (E.type = "text"), E.invalid =
!0);
});
let _ = o[o.length - 1], P = _.nodes.indexOf(a);
_.nodes.splice(P, 1, ...a.nodes);
}
while (o.length > 0);
return g({ type: "eos" }), s;
}, "parse");
Pl.exports = ty;
});
// ../node_modules/braces/index.js
var Tl = d((iA, Cl) => {
"use strict";
var Al = gr(), ry = gl(), iy = bl(), sy = Rl(), le = /* @__PURE__ */ n((t, e = {}) => {
let r = [];
if (Array.isArray(t))
for (let i of t) {
let s = le.create(i, e);
Array.isArray(s) ? r.push(...s) : r.push(s);
}
else
r = [].concat(le.create(t, e));
return e && e.expand === !0 && e.nodupes === !0 && (r = [...new Set(r)]), r;
}, "braces");
le.parse = (t, e = {}) => sy(t, e);
le.stringify = (t, e = {}) => Al(typeof t == "string" ? le.parse(t, e) : t, e);
le.compile = (t, e = {}) => (typeof t == "string" && (t = le.parse(t, e)), ry(t, e));
le.expand = (t, e = {}) => {
typeof t == "string" && (t = le.parse(t, e));
let r = iy(t, e);
return e.noempty === !0 && (r = r.filter(Boolean)), e.nodupes === !0 && (r = [...new Set(r)]), r;
};
le.create = (t, e = {}) => t === "" || t.length < 3 ? [t] : e.expand !== !0 ? le.compile(t, e) : le.expand(t, e);
Cl.exports = le;
});
// ../node_modules/picomatch/lib/constants.js
var Mt = d((nA, $l) => {
"use strict";
var ny = k("path"), we = "\\\\/", Ol = `[^${we}]`, ke = "\\.", oy = "\\+", ay = "\\?", br = "\\/", ly = "(?=.)", Dl = "[^/]", qi = `(?:${br}\
|$)`, Il = `(?:^|${br})`, ji = `${ke}{1,2}${qi}`, cy = `(?!${ke})`, uy = `(?!${Il}${ji})`, hy = `(?!${ke}{0,1}${qi})`, py = `(?!${ji})`, dy = `\
[^.${br}]`, fy = `${Dl}*?`, kl = {
DOT_LITERAL: ke,
PLUS_LITERAL: oy,
QMARK_LITERAL: ay,
SLASH_LITERAL: br,
ONE_CHAR: ly,
QMARK: Dl,
END_ANCHOR: qi,
DOTS_SLASH: ji,
NO_DOT: cy,
NO_DOTS: uy,
NO_DOT_SLASH: hy,
NO_DOTS_SLASH: py,
QMARK_NO_DOT: dy,
STAR: fy,
START_ANCHOR: Il
}, my = {
...kl,
SLASH_LITERAL: `[${we}]`,
QMARK: Ol,
STAR: `${Ol}*?`,
DOTS_SLASH: `${ke}{1,2}(?:[${we}]|$)`,
NO_DOT: `(?!${ke})`,
NO_DOTS: `(?!(?:^|[${we}])${ke}{1,2}(?:[${we}]|$))`,
NO_DOT_SLASH: `(?!${ke}{0,1}(?:[${we}]|$))`,
NO_DOTS_SLASH: `(?!${ke}{1,2}(?:[${we}]|$))`,
QMARK_NO_DOT: `[^.${we}]`,
START_ANCHOR: `(?:^|[${we}])`,
END_ANCHOR: `(?:[${we}]|$)`
}, gy = {
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"
};
$l.exports = {
MAX_LENGTH: 1024 * 64,
POSIX_REGEX_SOURCE: gy,
// regular expressions
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,
// Replace globs with equivalent patterns to reduce parsing time.
REPLACEMENTS: {
"***": "*",
"**/**": "**",
"**/**/**": "**"
},
// Digits
CHAR_0: 48,
/* 0 */
CHAR_9: 57,
/* 9 */
// Alphabet chars.
CHAR_UPPERCASE_A: 65,
/* A */
CHAR_LOWERCASE_A: 97,
/* a */
CHAR_UPPERCASE_Z: 90,
/* Z */
CHAR_LOWERCASE_Z: 122,
/* z */
CHAR_LEFT_PARENTHESES: 40,
/* ( */
CHAR_RIGHT_PARENTHESES: 41,
/* ) */
CHAR_ASTERISK: 42,
/* * */
// Non-alphabetic chars.
CHAR_AMPERSAND: 38,
/* & */
CHAR_AT: 64,
/* @ */
CHAR_BACKWARD_SLASH: 92,
/* \ */
CHAR_CARRIAGE_RETURN: 13,
/* \r */
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,
/* \f */
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,
/* \n */
CHAR_NO_BREAK_SPACE: 160,
/* \u00A0 */
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,
/* \t */
CHAR_UNDERSCORE: 95,
/* _ */
CHAR_VERTICAL_LINE: 124,
/* | */
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
/* \uFEFF */
SEP: ny.sep,
/**
* Create EXTGLOB_CHARS
*/
extglobChars(t) {
return {
"!": { type: "negate", open: "(?:(?!(?:", close: `))${t.STAR})` },
"?": { type: "qmark", open: "(?:", close: ")?" },
"+": { type: "plus", open: "(?:", close: ")+" },
"*": { type: "star", open: "(?:", close: ")*" },
"@": { type: "at", open: "(?:", close: ")" }
};
},
/**
* Create GLOB_CHARS
*/
globChars(t) {
return t === !0 ? my : kl;
}
};
});
// ../node_modules/picomatch/lib/utils.js
var qt = d((se) => {
"use strict";
var yy = k("path"), xy = process.platform === "win32", {
REGEX_BACKSLASH: by,
REGEX_REMOVE_BACKSLASH: _y,
REGEX_SPECIAL_CHARS: vy,
REGEX_SPECIAL_CHARS_GLOBAL: Sy
} = Mt();
se.isObject = (t) => t !== null && typeof t == "object" && !Array.isArray(t);
se.hasRegexChars = (t) => vy.test(t);
se.isRegexChar = (t) => t.length === 1 && se.hasRegexChars(t);
se.escapeRegex = (t) => t.replace(Sy, "\\$1");
se.toPosixSlashes = (t) => t.replace(by, "/");
se.removeBackslashes = (t) => t.replace(_y, (e) => e === "\\" ? "" : e);
se.supportsLookbehinds = () => {
let t = process.version.slice(1).split(".").map(Number);
return t.length === 3 && t[0] >= 9 || t[0] === 8 && t[1] >= 10;
};
se.isWindows = (t) => t && typeof t.windows == "boolean" ? t.windows : xy === !0 || yy.sep === "\\";
se.escapeLast = (t, e, r) => {
let i = t.lastIndexOf(e, r);
return i === -1 ? t : t[i - 1] === "\\" ? se.escapeLast(t, e, i - 1) : `${t.slice(0, i)}\\${t.slice(i)}`;
};
se.removePrefix = (t, e = {}) => {
let r = t;
return r.startsWith("./") && (r = r.slice(2), e.prefix = "./"), r;
};
se.wrapOutput = (t, e = {}, r = {}) => {
let i = r.contains ? "" : "^", s = r.contains ? "" : "$", o = `${i}(?:${t})${s}`;
return e.negated === !0 && (o = `(?:^(?!${o}).*$)`), o;
};
});
// ../node_modules/picomatch/lib/scan.js
var Bl = d((aA, Hl) => {
"use strict";
var Nl = qt(), {
CHAR_ASTERISK: Li,
/* * */
CHAR_AT: wy,
/* @ */
CHAR_BACKWARD_SLASH: jt,
/* \ */
CHAR_COMMA: Ey,
/* , */
CHAR_DOT: Fi,
/* . */
CHAR_EXCLAMATION_MARK: Hi,
/* ! */
CHAR_FORWARD_SLASH: Fl,
/* / */
CHAR_LEFT_CURLY_BRACE: Bi,
/* { */
CHAR_LEFT_PARENTHESES: Wi,
/* ( */
CHAR_LEFT_SQUARE_BRACKET: Py,
/* [ */
CHAR_PLUS: Ry,
/* + */
CHAR_QUESTION_MARK: Ml,
/* ? */
CHAR_RIGHT_CURLY_BRACE: Ay,
/* } */
CHAR_RIGHT_PARENTHESES: ql,
/* ) */
CHAR_RIGHT_SQUARE_BRACKET: Cy
/* ] */
} = Mt(), jl = /* @__PURE__ */ n((t) => t === Fl || t === jt, "isPathSeparator"), Ll = /* @__PURE__ */ n((t) => {
t.isPrefix !== !0 && (t.depth = t.isGlobstar ? 1 / 0 : 1);
}, "depth"), Ty = /* @__PURE__ */ n((t, e) => {
let r = e || {}, i = t.length - 1, s = r.parts === !0 || r.scanToEnd === !0, o = [], a = [], l = [], c = t, u = -1, h = 0, m = 0, p = !1,
w = !1, g = !1, _ = !1, P = !1, E = !1, $ = !1, O = !1, L = !1, C = !1, M = 0, T, A, q = { value: "", depth: 0, isGlob: !1 }, J = /* @__PURE__ */ n(
() => u >= i, "eos"), b = /* @__PURE__ */ n(() => c.charCodeAt(u + 1), "peek"), G = /* @__PURE__ */ n(() => (T = A, c.charCodeAt(++u)), "\
advance");
for (; u < i; ) {
A = G();
let re;
if (A === jt) {
$ = q.backslashes = !0, A = G(), A === Bi && (E = !0);
continue;
}
if (E === !0 || A === Bi) {
for (M++; J() !== !0 && (A = G()); ) {
if (A === jt) {
$ = q.backslashes = !0, G();
continue;
}
if (A === Bi) {
M++;
continue;
}
if (E !== !0 && A === Fi && (A = G()) === Fi) {
if (p = q.isBrace = !0, g = q.isGlob = !0, C = !0, s === !0)
continue;
break;
}
if (E !== !0 && A === Ey) {
if (p = q.isBrace = !0, g = q.isGlob = !0, C = !0, s === !0)
continue;
break;
}
if (A === Ay && (M--, M === 0)) {
E = !1, p = q.isBrace = !0, C = !0;
break;
}
}
if (s === !0)
continue;
break;
}
if (A === Fl) {
if (o.push(u), a.push(q), q = { value: "", depth: 0, isGlob: !1 }, C === !0) continue;
if (T === Fi && u === h + 1) {
h += 2;
continue;
}
m = u + 1;
continue;
}
if (r.noext !== !0 && (A === Ry || A === wy || A === Li || A === Ml || A === Hi) === !0 && b() === Wi) {
if (g = q.isGlob = !0, _ = q.isExtglob = !0, C = !0, A === Hi && u === h && (L = !0), s === !0) {
for (; J() !== !0 && (A = G()); ) {
if (A === jt) {
$ = q.backslashes = !0, A = G();
continue;
}
if (A === ql) {
g = q.isGlob = !0, C = !0;
break;
}
}
continue;
}
break;
}
if (A === Li) {
if (T === Li && (P = q.isGlobstar = !0), g = q.isGlob = !0, C = !0, s === !0)
continue;
break;
}
if (A === Ml) {
if (g = q.isGlob = !0, C = !0, s === !0)
continue;
break;
}
if (A === Py) {
for (; J() !== !0 && (re = G()); ) {
if (re === jt) {
$ = q.backslashes = !0, G();
continue;
}
if (re === Cy) {
w = q.isBracket = !0, g = q.isGlob = !0, C = !0;
break;
}
}
if (s === !0)
continue;
break;
}
if (r.nonegate !== !0 && A === Hi && u === h) {
O = q.negated = !0, h++;
continue;
}
if (r.noparen !== !0 && A === Wi) {
if (g = q.isGlob = !0, s === !0) {
for (; J() !== !0 && (A = G()); ) {
if (A === Wi) {
$ = q.backslashes = !0, A = G();
continue;
}
if (A === ql) {
C = !0;
break;
}
}
continue;
}
break;
}
if (g === !0) {
if (C = !0, s === !0)
continue;
break;
}
}
r.noext === !0 && (_ = !1, g = !1);
let B = c, Ve = "", y = "";
h > 0 && (Ve = c.slice(0, h), c = c.slice(h), m -= h), B && g === !0 && m > 0 ? (B = c.slice(0, m), y = c.slice(m)) : g === !0 ? (B = "",
y = c) : B = c, B && B !== "" && B !== "/" && B !== c && jl(B.charCodeAt(B.length - 1)) && (B = B.slice(0, -1)), r.unescape === !0 && (y &&
(y = Nl.removeBackslashes(y)), B && $ === !0 && (B = Nl.removeBackslashes(B)));
let x = {
prefix: Ve,
input: t,
start: h,
base: B,
glob: y,
isBrace: p,
isBracket: w,
isGlob: g,
isExtglob: _,
isGlobstar: P,
negated: O,
negatedExtglob: L
};
if (r.tokens === !0 && (x.maxDepth = 0, jl(A) || a.push(q), x.tokens = a), r.parts === !0 || r.tokens === !0) {
let re;
for (let N = 0; N < o.length; N++) {
let ve = re ? re + 1 : h, Se = o[N], ae = t.slice(ve, Se);
r.tokens && (N === 0 && h !== 0 ? (a[N].isPrefix = !0, a[N].value = Ve) : a[N].value = ae, Ll(a[N]), x.maxDepth += a[N].depth), (N !==
0 || ae !== "") && l.push(ae), re = Se;
}
if (re && re + 1 < t.length) {
let N = t.slice(re + 1);
l.push(N), r.tokens && (a[a.length - 1].value = N, Ll(a[a.length - 1]), x