import { createRequire as e } from "node:module";
import t from "node:path";
import n from "node:fs/promises";
import r from "node:os";
import i from "node:process";
import a from "node:tty";
import { URL as o, fileURLToPath as s } from "node:url";
import { format as c, isDeepStrictEqual as l, promisify as u, stripVTControlCharacters as d } from "node:util";
import f, { promises as p } from "node:fs";
import m, { execFile as h } from "node:child_process";
import { text as g } from "node:stream/consumers";
//#region \0rolldown/runtime.js
var _ = Object.create, v = Object.defineProperty, y = Object.getOwnPropertyDescriptor, b = Object.getOwnPropertyNames, x = Object.getPrototypeOf, S = Object.prototype.hasOwnProperty, C = (e, t, n) => () => {
	if (n) throw n[0];
	try {
		return e && (t = e(e = 0)), t;
	} catch (e) {
		throw n = [e], e;
	}
}, w = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), T = (e, t) => {
	let n = {};
	for (var r in e) v(n, r, {
		get: e[r],
		enumerable: !0
	});
	return t || v(n, Symbol.toStringTag, { value: "Module" }), n;
}, E = (e, t, n, r) => {
	if (t && typeof t == "object" || typeof t == "function") for (var i = b(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !S.call(e, s) && s !== n && v(e, s, {
		get: ((e) => t[e]).bind(null, s),
		enumerable: !(r = y(t, s)) || r.enumerable
	});
	return e;
}, D = (e, t, n) => (n = e == null ? {} : _(x(e)), E(t || !e || !e.__esModule ? v(n, "default", {
	value: e,
	enumerable: !0
}) : n, e)), O = (e) => S.call(e, "module.exports") ? e["module.exports"] : E(v({}, "__esModule", { value: !0 }), e), k = /* @__PURE__ */ e(import.meta.url), A = /* @__PURE__ */ w(((e, t) => {
	var n, r, i, a, o = !0;
	typeof process < "u" && ({FORCE_COLOR: n, NODE_DISABLE_COLORS: r, NO_COLOR: i, TERM: a} = process.env || {}, o = process.stdout && process.stdout.isTTY);
	var s = {
		enabled: !r && i == null && a !== "dumb" && (n != null && n !== "0" || o),
		reset: u(0, 0),
		bold: u(1, 22),
		dim: u(2, 22),
		italic: u(3, 23),
		underline: u(4, 24),
		inverse: u(7, 27),
		hidden: u(8, 28),
		strikethrough: u(9, 29),
		black: u(30, 39),
		red: u(31, 39),
		green: u(32, 39),
		yellow: u(33, 39),
		blue: u(34, 39),
		magenta: u(35, 39),
		cyan: u(36, 39),
		white: u(37, 39),
		gray: u(90, 39),
		grey: u(90, 39),
		bgBlack: u(40, 49),
		bgRed: u(41, 49),
		bgGreen: u(42, 49),
		bgYellow: u(43, 49),
		bgBlue: u(44, 49),
		bgMagenta: u(45, 49),
		bgCyan: u(46, 49),
		bgWhite: u(47, 49)
	};
	function c(e, t) {
		let n = 0, r, i = "", a = "";
		for (; n < e.length; n++) r = e[n], i += r.open, a += r.close, ~t.indexOf(r.close) && (t = t.replace(r.rgx, r.close + r.open));
		return i + t + a;
	}
	function l(e, t) {
		let n = {
			has: e,
			keys: t
		};
		return n.reset = s.reset.bind(n), n.bold = s.bold.bind(n), n.dim = s.dim.bind(n), n.italic = s.italic.bind(n), n.underline = s.underline.bind(n), n.inverse = s.inverse.bind(n), n.hidden = s.hidden.bind(n), n.strikethrough = s.strikethrough.bind(n), n.black = s.black.bind(n), n.red = s.red.bind(n), n.green = s.green.bind(n), n.yellow = s.yellow.bind(n), n.blue = s.blue.bind(n), n.magenta = s.magenta.bind(n), n.cyan = s.cyan.bind(n), n.white = s.white.bind(n), n.gray = s.gray.bind(n), n.grey = s.grey.bind(n), n.bgBlack = s.bgBlack.bind(n), n.bgRed = s.bgRed.bind(n), n.bgGreen = s.bgGreen.bind(n), n.bgYellow = s.bgYellow.bind(n), n.bgBlue = s.bgBlue.bind(n), n.bgMagenta = s.bgMagenta.bind(n), n.bgCyan = s.bgCyan.bind(n), n.bgWhite = s.bgWhite.bind(n), n;
	}
	function u(e, t) {
		let n = {
			open: `\x1b[${e}m`,
			close: `\x1b[${t}m`,
			rgx: RegExp(`\\x1b\\[${t}m`, "g")
		};
		return function(t) {
			return this !== void 0 && this.has !== void 0 ? (~this.has.indexOf(e) || (this.has.push(e), this.keys.push(n)), t === void 0 ? this : s.enabled ? c(this.keys, t + "") : t + "") : t === void 0 ? l([e], [n]) : s.enabled ? c([n], t + "") : t + "";
		};
	}
	t.exports = s;
})), j = /* @__PURE__ */ w(((e, t) => {
	t.exports = (e, t) => {
		if (!(e.meta && e.name !== "escape")) {
			if (e.ctrl) {
				if (e.name === "a") return "first";
				if (e.name === "c" || e.name === "d") return "abort";
				if (e.name === "e") return "last";
				if (e.name === "g") return "reset";
			}
			if (t) {
				if (e.name === "j") return "down";
				if (e.name === "k") return "up";
				if (e.name === "q") return "abort";
			}
			return e.name === "return" || e.name === "enter" ? "submit" : e.name === "backspace" ? "delete" : e.name === "delete" ? "deleteForward" : e.name === "abort" ? "abort" : e.name === "escape" ? "exit" : e.name === "tab" ? "next" : e.name === "pagedown" ? "nextPage" : e.name === "pageup" ? "prevPage" : e.name === "home" ? "home" : e.name === "end" ? "end" : e.name === "up" ? "up" : e.name === "down" ? "down" : e.name === "right" ? "right" : e.name === "left" ? "left" : !1;
		}
	};
})), M = /* @__PURE__ */ w(((e, t) => {
	t.exports = (e) => {
		let t = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"), n = new RegExp(t, "g");
		return typeof e == "string" ? e.replace(n, "") : e;
	};
})), N = /* @__PURE__ */ w(((e, t) => {
	var n = "\x1B", r = `${n}[`, i = "\x07", a = {
		to(e, t) {
			return t ? `${r}${t + 1};${e + 1}H` : `${r}${e + 1}G`;
		},
		move(e, t) {
			let n = "";
			return e < 0 ? n += `${r}${-e}D` : e > 0 && (n += `${r}${e}C`), t < 0 ? n += `${r}${-t}A` : t > 0 && (n += `${r}${t}B`), n;
		},
		up: (e = 1) => `${r}${e}A`,
		down: (e = 1) => `${r}${e}B`,
		forward: (e = 1) => `${r}${e}C`,
		backward: (e = 1) => `${r}${e}D`,
		nextLine: (e = 1) => `${r}E`.repeat(e),
		prevLine: (e = 1) => `${r}F`.repeat(e),
		left: `${r}G`,
		hide: `${r}?25l`,
		show: `${r}?25h`,
		save: `${n}7`,
		restore: `${n}8`
	};
	t.exports = {
		cursor: a,
		scroll: {
			up: (e = 1) => `${r}S`.repeat(e),
			down: (e = 1) => `${r}T`.repeat(e)
		},
		erase: {
			screen: `${r}2J`,
			up: (e = 1) => `${r}1J`.repeat(e),
			down: (e = 1) => `${r}J`.repeat(e),
			line: `${r}2K`,
			lineEnd: `${r}K`,
			lineStart: `${r}1K`,
			lines(e) {
				let t = "";
				for (let n = 0; n < e; n++) t += this.line + (n < e - 1 ? a.up() : "");
				return e && (t += a.left), t;
			}
		},
		beep: i
	};
})), P = /* @__PURE__ */ w(((e, t) => {
	var n = M(), { erase: r, cursor: i } = N(), a = (e) => [...n(e)].length;
	t.exports = function(e, t) {
		if (!t) return r.line + i.to(0);
		let n = 0, o = e.split(/\r?\n/);
		for (let e of o) n += 1 + Math.floor(Math.max(a(e) - 1, 0) / t);
		return r.lines(n);
	};
})), F = /* @__PURE__ */ w(((e, t) => {
	var n = {
		arrowUp: "↑",
		arrowDown: "↓",
		arrowLeft: "←",
		arrowRight: "→",
		radioOn: "◉",
		radioOff: "◯",
		tick: "✔",
		cross: "✖",
		ellipsis: "…",
		pointerSmall: "›",
		line: "─",
		pointer: "❯"
	}, r = {
		arrowUp: n.arrowUp,
		arrowDown: n.arrowDown,
		arrowLeft: n.arrowLeft,
		arrowRight: n.arrowRight,
		radioOn: "(*)",
		radioOff: "( )",
		tick: "√",
		cross: "×",
		ellipsis: "...",
		pointerSmall: "»",
		line: "─",
		pointer: ">"
	};
	t.exports = process.platform === "win32" ? r : n;
})), I = /* @__PURE__ */ w(((e, t) => {
	var n = A(), r = F(), i = Object.freeze({
		password: {
			scale: 1,
			render: (e) => "*".repeat(e.length)
		},
		emoji: {
			scale: 2,
			render: (e) => "😃".repeat(e.length)
		},
		invisible: {
			scale: 0,
			render: (e) => ""
		},
		default: {
			scale: 1,
			render: (e) => `${e}`
		}
	}), a = (e) => i[e] || i.default, o = Object.freeze({
		aborted: n.red(r.cross),
		done: n.green(r.tick),
		exited: n.yellow(r.cross),
		default: n.cyan("?")
	});
	t.exports = {
		styles: i,
		render: a,
		symbols: o,
		symbol: (e, t, n) => t ? o.aborted : n ? o.exited : e ? o.done : o.default,
		delimiter: (e) => n.gray(e ? r.ellipsis : r.pointerSmall),
		item: (e, t) => n.gray(e ? t ? r.pointerSmall : "+" : r.line)
	};
})), L = /* @__PURE__ */ w(((e, t) => {
	var n = M();
	t.exports = function(e, t) {
		let r = String(n(e) || "").split(/\r?\n/);
		return t ? r.map((e) => Math.ceil(e.length / t)).reduce((e, t) => e + t) : r.length;
	};
})), R = /* @__PURE__ */ w(((e, t) => {
	t.exports = (e, t = {}) => {
		let n = Number.isSafeInteger(parseInt(t.margin)) ? Array(parseInt(t.margin)).fill(" ").join("") : t.margin || "", r = t.width;
		return (e || "").split(/\r?\n/g).map((e) => e.split(/\s+/g).reduce((e, t) => (t.length + n.length >= r || e[e.length - 1].length + t.length + 1 < r ? e[e.length - 1] += ` ${t}` : e.push(`${n}${t}`), e), [n]).join("\n")).join("\n");
	};
})), z = /* @__PURE__ */ w(((e, t) => {
	t.exports = (e, t, n) => {
		n ||= t;
		let r = Math.min(t - n, e - Math.floor(n / 2));
		r < 0 && (r = 0);
		let i = Math.min(r + n, t);
		return {
			startIndex: r,
			endIndex: i
		};
	};
})), B = /* @__PURE__ */ w(((e, t) => {
	t.exports = {
		action: j(),
		clear: P(),
		style: I(),
		strip: M(),
		figures: F(),
		lines: L(),
		wrap: R(),
		entriesToDisplay: z()
	};
})), V = /* @__PURE__ */ w(((e, t) => {
	var n = k("readline"), { action: r } = B(), i = k("events"), { beep: a, cursor: o } = N(), s = A();
	t.exports = class extends i {
		constructor(e = {}) {
			super(), this.firstRender = !0, this.in = e.stdin || process.stdin, this.out = e.stdout || process.stdout, this.onRender = (e.onRender || (() => void 0)).bind(this);
			let t = n.createInterface({
				input: this.in,
				escapeCodeTimeout: 50
			});
			n.emitKeypressEvents(this.in, t), this.in.isTTY && this.in.setRawMode(!0);
			let i = (e, t) => {
				let n = r(t, this.isSelect);
				n === !1 ? this._ && this._(e, t) : typeof this[n] == "function" ? this[n](t) : this.bell();
			};
			this.close = () => {
				this.out.write(o.show), this.in.removeListener("keypress", i), this.in.isTTY && this.in.setRawMode(!1), t.close(), this.emit(this.aborted ? "abort" : this.exited ? "exit" : "submit", this.value), this.closed = !0;
			}, this.in.on("keypress", i);
		}
		fire() {
			this.emit("state", {
				value: this.value,
				aborted: !!this.aborted,
				exited: !!this.exited
			});
		}
		bell() {
			this.out.write(a);
		}
		render() {
			this.onRender(s), this.firstRender &&= !1;
		}
	};
})), H = /* @__PURE__ */ w(((e, t) => {
	var n = A(), r = V(), { erase: i, cursor: a } = N(), { style: o, clear: s, lines: c, figures: l } = B();
	t.exports = class extends r {
		constructor(e = {}) {
			super(e), this.transform = o.render(e.style), this.scale = this.transform.scale, this.msg = e.message, this.initial = e.initial || "", this.validator = e.validate || (() => !0), this.value = "", this.errorMsg = e.error || "Please Enter A Valid Value", this.cursor = Number(!!this.initial), this.cursorOffset = 0, this.clear = s("", this.out.columns), this.render();
		}
		set value(e) {
			!e && this.initial ? (this.placeholder = !0, this.rendered = n.gray(this.transform.render(this.initial))) : (this.placeholder = !1, this.rendered = this.transform.render(e)), this._value = e, this.fire();
		}
		get value() {
			return this._value;
		}
		reset() {
			this.value = "", this.cursor = Number(!!this.initial), this.cursorOffset = 0, this.fire(), this.render();
		}
		exit() {
			this.abort();
		}
		abort() {
			this.value = this.value || this.initial, this.done = this.aborted = !0, this.error = !1, this.red = !1, this.fire(), this.render(), this.out.write("\n"), this.close();
		}
		async validate() {
			let e = await this.validator(this.value);
			typeof e == "string" && (this.errorMsg = e, e = !1), this.error = !e;
		}
		async submit() {
			if (this.value = this.value || this.initial, this.cursorOffset = 0, this.cursor = this.rendered.length, await this.validate(), this.error) {
				this.red = !0, this.fire(), this.render();
				return;
			}
			this.done = !0, this.aborted = !1, this.fire(), this.render(), this.out.write("\n"), this.close();
		}
		next() {
			if (!this.placeholder) return this.bell();
			this.value = this.initial, this.cursor = this.rendered.length, this.fire(), this.render();
		}
		moveCursor(e) {
			this.placeholder || (this.cursor += e, this.cursorOffset += e);
		}
		_(e, t) {
			let n = this.value.slice(0, this.cursor), r = this.value.slice(this.cursor);
			this.value = `${n}${e}${r}`, this.red = !1, this.cursor = this.placeholder ? 0 : n.length + 1, this.render();
		}
		delete() {
			if (this.isCursorAtStart()) return this.bell();
			let e = this.value.slice(0, this.cursor - 1), t = this.value.slice(this.cursor);
			this.value = `${e}${t}`, this.red = !1, this.isCursorAtStart() ? this.cursorOffset = 0 : (this.cursorOffset++, this.moveCursor(-1)), this.render();
		}
		deleteForward() {
			if (this.cursor * this.scale >= this.rendered.length || this.placeholder) return this.bell();
			let e = this.value.slice(0, this.cursor), t = this.value.slice(this.cursor + 1);
			this.value = `${e}${t}`, this.red = !1, this.isCursorAtEnd() ? this.cursorOffset = 0 : this.cursorOffset++, this.render();
		}
		first() {
			this.cursor = 0, this.render();
		}
		last() {
			this.cursor = this.value.length, this.render();
		}
		left() {
			if (this.cursor <= 0 || this.placeholder) return this.bell();
			this.moveCursor(-1), this.render();
		}
		right() {
			if (this.cursor * this.scale >= this.rendered.length || this.placeholder) return this.bell();
			this.moveCursor(1), this.render();
		}
		isCursorAtStart() {
			return this.cursor === 0 || this.placeholder && this.cursor === 1;
		}
		isCursorAtEnd() {
			return this.cursor === this.rendered.length || this.placeholder && this.cursor === this.rendered.length + 1;
		}
		render() {
			this.closed || (this.firstRender || (this.outputError && this.out.write(a.down(c(this.outputError, this.out.columns) - 1) + s(this.outputError, this.out.columns)), this.out.write(s(this.outputText, this.out.columns))), super.render(), this.outputError = "", this.outputText = [
				o.symbol(this.done, this.aborted),
				n.bold(this.msg),
				o.delimiter(this.done),
				this.red ? n.red(this.rendered) : this.rendered
			].join(" "), this.error && (this.outputError += this.errorMsg.split("\n").reduce((e, t, r) => e + `\n${r ? " " : l.pointerSmall} ${n.red().italic(t)}`, "")), this.out.write(i.line + a.to(0) + this.outputText + a.save + this.outputError + a.restore + a.move(this.cursorOffset, 0)));
		}
	};
})), U = /* @__PURE__ */ w(((e, t) => {
	var n = A(), r = V(), { style: i, clear: a, figures: o, wrap: s, entriesToDisplay: c } = B(), { cursor: l } = N();
	t.exports = class extends r {
		constructor(e = {}) {
			super(e), this.isSelect = !0, this.msg = e.message, this.hint = e.hint || "- Use arrow-keys. Return to submit.", this.warn = e.warn || "- This option is disabled", this.cursor = e.initial || 0, this.choices = e.choices.map((e, t) => (typeof e == "string" && (e = {
				title: e,
				value: t
			}), {
				title: e && (e.title || e.value || e),
				value: e && (e.value === void 0 ? t : e.value),
				description: e && e.description,
				selected: e && e.selected,
				disabled: e && e.disabled
			})), this.optionsPerPage = e.optionsPerPage || 10, this.value = (this.choices[this.cursor] || {}).value, this.clear = a("", this.out.columns), this.render();
		}
		moveCursor(e) {
			this.cursor = e, this.value = this.choices[e].value, this.fire();
		}
		reset() {
			this.moveCursor(0), this.fire(), this.render();
		}
		exit() {
			this.abort();
		}
		abort() {
			this.done = this.aborted = !0, this.fire(), this.render(), this.out.write("\n"), this.close();
		}
		submit() {
			this.selection.disabled ? this.bell() : (this.done = !0, this.aborted = !1, this.fire(), this.render(), this.out.write("\n"), this.close());
		}
		first() {
			this.moveCursor(0), this.render();
		}
		last() {
			this.moveCursor(this.choices.length - 1), this.render();
		}
		up() {
			this.cursor === 0 ? this.moveCursor(this.choices.length - 1) : this.moveCursor(this.cursor - 1), this.render();
		}
		down() {
			this.cursor === this.choices.length - 1 ? this.moveCursor(0) : this.moveCursor(this.cursor + 1), this.render();
		}
		next() {
			this.moveCursor((this.cursor + 1) % this.choices.length), this.render();
		}
		_(e, t) {
			if (e === " ") return this.submit();
		}
		get selection() {
			return this.choices[this.cursor];
		}
		render() {
			if (this.closed) return;
			this.firstRender ? this.out.write(l.hide) : this.out.write(a(this.outputText, this.out.columns)), super.render();
			let { startIndex: e, endIndex: t } = c(this.cursor, this.choices.length, this.optionsPerPage);
			if (this.outputText = [
				i.symbol(this.done, this.aborted),
				n.bold(this.msg),
				i.delimiter(!1),
				this.done ? this.selection.title : this.selection.disabled ? n.yellow(this.warn) : n.gray(this.hint)
			].join(" "), !this.done) {
				this.outputText += "\n";
				for (let r = e; r < t; r++) {
					let i, a, c = "", l = this.choices[r];
					a = r === e && e > 0 ? o.arrowUp : r === t - 1 && t < this.choices.length ? o.arrowDown : " ", l.disabled ? (i = this.cursor === r ? n.gray().underline(l.title) : n.strikethrough().gray(l.title), a = (this.cursor === r ? n.bold().gray(o.pointer) + " " : "  ") + a) : (i = this.cursor === r ? n.cyan().underline(l.title) : l.title, a = (this.cursor === r ? n.cyan(o.pointer) + " " : "  ") + a, l.description && this.cursor === r && (c = ` - ${l.description}`, (a.length + i.length + c.length >= this.out.columns || l.description.split(/\r?\n/).length > 1) && (c = "\n" + s(l.description, {
						margin: 3,
						width: this.out.columns
					})))), this.outputText += `${a} ${i}${n.gray(c)}\n`;
				}
			}
			this.out.write(this.outputText);
		}
	};
})), ee = /* @__PURE__ */ w(((e, t) => {
	var n = A(), r = V(), { style: i, clear: a } = B(), { cursor: o, erase: s } = N();
	t.exports = class extends r {
		constructor(e = {}) {
			super(e), this.msg = e.message, this.value = !!e.initial, this.active = e.active || "on", this.inactive = e.inactive || "off", this.initialValue = this.value, this.render();
		}
		reset() {
			this.value = this.initialValue, this.fire(), this.render();
		}
		exit() {
			this.abort();
		}
		abort() {
			this.done = this.aborted = !0, this.fire(), this.render(), this.out.write("\n"), this.close();
		}
		submit() {
			this.done = !0, this.aborted = !1, this.fire(), this.render(), this.out.write("\n"), this.close();
		}
		deactivate() {
			if (this.value === !1) return this.bell();
			this.value = !1, this.render();
		}
		activate() {
			if (this.value === !0) return this.bell();
			this.value = !0, this.render();
		}
		delete() {
			this.deactivate();
		}
		left() {
			this.deactivate();
		}
		right() {
			this.activate();
		}
		down() {
			this.deactivate();
		}
		up() {
			this.activate();
		}
		next() {
			this.value = !this.value, this.fire(), this.render();
		}
		_(e, t) {
			if (e === " ") this.value = !this.value;
			else if (e === "1") this.value = !0;
			else if (e === "0") this.value = !1;
			else return this.bell();
			this.render();
		}
		render() {
			this.closed || (this.firstRender ? this.out.write(o.hide) : this.out.write(a(this.outputText, this.out.columns)), super.render(), this.outputText = [
				i.symbol(this.done, this.aborted),
				n.bold(this.msg),
				i.delimiter(this.done),
				this.value ? this.inactive : n.cyan().underline(this.inactive),
				n.gray("/"),
				this.value ? n.cyan().underline(this.active) : this.active
			].join(" "), this.out.write(s.line + o.to(0) + this.outputText));
		}
	};
})), W = /* @__PURE__ */ w(((e, t) => {
	t.exports = class e {
		constructor({ token: e, date: t, parts: n, locales: r }) {
			this.token = e, this.date = t || /* @__PURE__ */ new Date(), this.parts = n || [this], this.locales = r || {};
		}
		up() {}
		down() {}
		next() {
			let t = this.parts.indexOf(this);
			return this.parts.find((n, r) => r > t && n instanceof e);
		}
		setTo(e) {}
		prev() {
			let t = [].concat(this.parts).reverse(), n = t.indexOf(this);
			return t.find((t, r) => r > n && t instanceof e);
		}
		toString() {
			return String(this.date);
		}
	};
})), G = /* @__PURE__ */ w(((e, t) => {
	var n = W();
	t.exports = class extends n {
		constructor(e = {}) {
			super(e);
		}
		up() {
			this.date.setHours((this.date.getHours() + 12) % 24);
		}
		down() {
			this.up();
		}
		toString() {
			let e = this.date.getHours() > 12 ? "pm" : "am";
			return /\A/.test(this.token) ? e.toUpperCase() : e;
		}
	};
})), K = /* @__PURE__ */ w(((e, t) => {
	var n = W(), r = (e) => (e %= 10, e === 1 ? "st" : e === 2 ? "nd" : e === 3 ? "rd" : "th");
	t.exports = class extends n {
		constructor(e = {}) {
			super(e);
		}
		up() {
			this.date.setDate(this.date.getDate() + 1);
		}
		down() {
			this.date.setDate(this.date.getDate() - 1);
		}
		setTo(e) {
			this.date.setDate(parseInt(e.substr(-2)));
		}
		toString() {
			let e = this.date.getDate(), t = this.date.getDay();
			return this.token === "DD" ? String(e).padStart(2, "0") : this.token === "Do" ? e + r(e) : this.token === "d" ? t + 1 : this.token === "ddd" ? this.locales.weekdaysShort[t] : this.token === "dddd" ? this.locales.weekdays[t] : e;
		}
	};
})), te = /* @__PURE__ */ w(((e, t) => {
	var n = W();
	t.exports = class extends n {
		constructor(e = {}) {
			super(e);
		}
		up() {
			this.date.setHours(this.date.getHours() + 1);
		}
		down() {
			this.date.setHours(this.date.getHours() - 1);
		}
		setTo(e) {
			this.date.setHours(parseInt(e.substr(-2)));
		}
		toString() {
			let e = this.date.getHours();
			return /h/.test(this.token) && (e = e % 12 || 12), this.token.length > 1 ? String(e).padStart(2, "0") : e;
		}
	};
})), ne = /* @__PURE__ */ w(((e, t) => {
	var n = W();
	t.exports = class extends n {
		constructor(e = {}) {
			super(e);
		}
		up() {
			this.date.setMilliseconds(this.date.getMilliseconds() + 1);
		}
		down() {
			this.date.setMilliseconds(this.date.getMilliseconds() - 1);
		}
		setTo(e) {
			this.date.setMilliseconds(parseInt(e.substr(-this.token.length)));
		}
		toString() {
			return String(this.date.getMilliseconds()).padStart(4, "0").substr(0, this.token.length);
		}
	};
})), re = /* @__PURE__ */ w(((e, t) => {
	var n = W();
	t.exports = class extends n {
		constructor(e = {}) {
			super(e);
		}
		up() {
			this.date.setMinutes(this.date.getMinutes() + 1);
		}
		down() {
			this.date.setMinutes(this.date.getMinutes() - 1);
		}
		setTo(e) {
			this.date.setMinutes(parseInt(e.substr(-2)));
		}
		toString() {
			let e = this.date.getMinutes();
			return this.token.length > 1 ? String(e).padStart(2, "0") : e;
		}
	};
})), ie = /* @__PURE__ */ w(((e, t) => {
	var n = W();
	t.exports = class extends n {
		constructor(e = {}) {
			super(e);
		}
		up() {
			this.date.setMonth(this.date.getMonth() + 1);
		}
		down() {
			this.date.setMonth(this.date.getMonth() - 1);
		}
		setTo(e) {
			e = parseInt(e.substr(-2)) - 1, this.date.setMonth(e < 0 ? 0 : e);
		}
		toString() {
			let e = this.date.getMonth(), t = this.token.length;
			return t === 2 ? String(e + 1).padStart(2, "0") : t === 3 ? this.locales.monthsShort[e] : t === 4 ? this.locales.months[e] : String(e + 1);
		}
	};
})), q = /* @__PURE__ */ w(((e, t) => {
	var n = W();
	t.exports = class extends n {
		constructor(e = {}) {
			super(e);
		}
		up() {
			this.date.setSeconds(this.date.getSeconds() + 1);
		}
		down() {
			this.date.setSeconds(this.date.getSeconds() - 1);
		}
		setTo(e) {
			this.date.setSeconds(parseInt(e.substr(-2)));
		}
		toString() {
			let e = this.date.getSeconds();
			return this.token.length > 1 ? String(e).padStart(2, "0") : e;
		}
	};
})), J = /* @__PURE__ */ w(((e, t) => {
	var n = W();
	t.exports = class extends n {
		constructor(e = {}) {
			super(e);
		}
		up() {
			this.date.setFullYear(this.date.getFullYear() + 1);
		}
		down() {
			this.date.setFullYear(this.date.getFullYear() - 1);
		}
		setTo(e) {
			this.date.setFullYear(e.substr(-4));
		}
		toString() {
			let e = String(this.date.getFullYear()).padStart(4, "0");
			return this.token.length === 2 ? e.substr(-2) : e;
		}
	};
})), ae = /* @__PURE__ */ w(((e, t) => {
	t.exports = {
		DatePart: W(),
		Meridiem: G(),
		Day: K(),
		Hours: te(),
		Milliseconds: ne(),
		Minutes: re(),
		Month: ie(),
		Seconds: q(),
		Year: J()
	};
})), oe = /* @__PURE__ */ w(((e, t) => {
	var n = A(), r = V(), { style: i, clear: a, figures: o } = B(), { erase: s, cursor: c } = N(), { DatePart: l, Meridiem: u, Day: d, Hours: f, Milliseconds: p, Minutes: m, Month: h, Seconds: g, Year: _ } = ae(), v = /\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g, y = {
		1: ({ token: e }) => e.replace(/\\(.)/g, "$1"),
		2: (e) => new d(e),
		3: (e) => new h(e),
		4: (e) => new _(e),
		5: (e) => new u(e),
		6: (e) => new f(e),
		7: (e) => new m(e),
		8: (e) => new g(e),
		9: (e) => new p(e)
	}, b = {
		months: "January,February,March,April,May,June,July,August,September,October,November,December".split(","),
		monthsShort: "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),
		weekdays: "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),
		weekdaysShort: "Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")
	};
	t.exports = class extends r {
		constructor(e = {}) {
			super(e), this.msg = e.message, this.cursor = 0, this.typed = "", this.locales = Object.assign(b, e.locales), this._date = e.initial || /* @__PURE__ */ new Date(), this.errorMsg = e.error || "Please Enter A Valid Value", this.validator = e.validate || (() => !0), this.mask = e.mask || "YYYY-MM-DD HH:mm:ss", this.clear = a("", this.out.columns), this.render();
		}
		get value() {
			return this.date;
		}
		get date() {
			return this._date;
		}
		set date(e) {
			e && this._date.setTime(e.getTime());
		}
		set mask(e) {
			let t;
			for (this.parts = []; t = v.exec(e);) {
				let e = t.shift(), n = t.findIndex((e) => e != null);
				this.parts.push(n in y ? y[n]({
					token: t[n] || e,
					date: this.date,
					parts: this.parts,
					locales: this.locales
				}) : t[n] || e);
			}
			let n = this.parts.reduce((e, t) => (typeof t == "string" && typeof e[e.length - 1] == "string" ? e[e.length - 1] += t : e.push(t), e), []);
			this.parts.splice(0), this.parts.push(...n), this.reset();
		}
		moveCursor(e) {
			this.typed = "", this.cursor = e, this.fire();
		}
		reset() {
			this.moveCursor(this.parts.findIndex((e) => e instanceof l)), this.fire(), this.render();
		}
		exit() {
			this.abort();
		}
		abort() {
			this.done = this.aborted = !0, this.error = !1, this.fire(), this.render(), this.out.write("\n"), this.close();
		}
		async validate() {
			let e = await this.validator(this.value);
			typeof e == "string" && (this.errorMsg = e, e = !1), this.error = !e;
		}
		async submit() {
			if (await this.validate(), this.error) {
				this.color = "red", this.fire(), this.render();
				return;
			}
			this.done = !0, this.aborted = !1, this.fire(), this.render(), this.out.write("\n"), this.close();
		}
		up() {
			this.typed = "", this.parts[this.cursor].up(), this.render();
		}
		down() {
			this.typed = "", this.parts[this.cursor].down(), this.render();
		}
		left() {
			let e = this.parts[this.cursor].prev();
			if (e == null) return this.bell();
			this.moveCursor(this.parts.indexOf(e)), this.render();
		}
		right() {
			let e = this.parts[this.cursor].next();
			if (e == null) return this.bell();
			this.moveCursor(this.parts.indexOf(e)), this.render();
		}
		next() {
			let e = this.parts[this.cursor].next();
			this.moveCursor(e ? this.parts.indexOf(e) : this.parts.findIndex((e) => e instanceof l)), this.render();
		}
		_(e) {
			/\d/.test(e) && (this.typed += e, this.parts[this.cursor].setTo(this.typed), this.render());
		}
		render() {
			this.closed || (this.firstRender ? this.out.write(c.hide) : this.out.write(a(this.outputText, this.out.columns)), super.render(), this.outputText = [
				i.symbol(this.done, this.aborted),
				n.bold(this.msg),
				i.delimiter(!1),
				this.parts.reduce((e, t, r) => e.concat(r === this.cursor && !this.done ? n.cyan().underline(t.toString()) : t), []).join("")
			].join(" "), this.error && (this.outputText += this.errorMsg.split("\n").reduce((e, t, r) => e + `\n${r ? " " : o.pointerSmall} ${n.red().italic(t)}`, "")), this.out.write(s.line + c.to(0) + this.outputText));
		}
	};
})), se = /* @__PURE__ */ w(((e, t) => {
	var n = A(), r = V(), { cursor: i, erase: a } = N(), { style: o, figures: s, clear: c, lines: l } = B(), u = /[0-9]/, d = (e) => e !== void 0, f = (e, t) => {
		let n = 10 ** t;
		return Math.round(e * n) / n;
	};
	t.exports = class extends r {
		constructor(e = {}) {
			super(e), this.transform = o.render(e.style), this.msg = e.message, this.initial = d(e.initial) ? e.initial : "", this.float = !!e.float, this.round = e.round || 2, this.inc = e.increment || 1, this.min = d(e.min) ? e.min : -Infinity, this.max = d(e.max) ? e.max : Infinity, this.errorMsg = e.error || "Please Enter A Valid Value", this.validator = e.validate || (() => !0), this.color = "cyan", this.value = "", this.typed = "", this.lastHit = 0, this.render();
		}
		set value(e) {
			!e && e !== 0 ? (this.placeholder = !0, this.rendered = n.gray(this.transform.render(`${this.initial}`)), this._value = "") : (this.placeholder = !1, this.rendered = this.transform.render(`${f(e, this.round)}`), this._value = f(e, this.round)), this.fire();
		}
		get value() {
			return this._value;
		}
		parse(e) {
			return this.float ? parseFloat(e) : parseInt(e);
		}
		valid(e) {
			return e === "-" || e === "." && this.float || u.test(e);
		}
		reset() {
			this.typed = "", this.value = "", this.fire(), this.render();
		}
		exit() {
			this.abort();
		}
		abort() {
			let e = this.value;
			this.value = e === "" ? this.initial : e, this.done = this.aborted = !0, this.error = !1, this.fire(), this.render(), this.out.write("\n"), this.close();
		}
		async validate() {
			let e = await this.validator(this.value);
			typeof e == "string" && (this.errorMsg = e, e = !1), this.error = !e;
		}
		async submit() {
			if (await this.validate(), this.error) {
				this.color = "red", this.fire(), this.render();
				return;
			}
			let e = this.value;
			this.value = e === "" ? this.initial : e, this.done = !0, this.aborted = !1, this.error = !1, this.fire(), this.render(), this.out.write("\n"), this.close();
		}
		up() {
			if (this.typed = "", this.value === "" && (this.value = this.min === -Infinity ? 0 - this.inc : this.min - this.inc), this.value >= this.max) return this.bell();
			this.value += this.inc, this.color = "cyan", this.fire(), this.render();
		}
		down() {
			if (this.typed = "", this.value === "" && (this.value = this.min === -Infinity ? 0 + this.inc : this.min + this.inc), this.value <= this.min) return this.bell();
			this.value -= this.inc, this.color = "cyan", this.fire(), this.render();
		}
		delete() {
			let e = this.value.toString();
			if (e.length === 0) return this.bell();
			this.value = this.parse(e = e.slice(0, -1)) || "", this.value !== "" && this.value < this.min && (this.value = this.min === -Infinity ? 0 : this.min), this.color = "cyan", this.fire(), this.render();
		}
		next() {
			this.value = this.initial, this.fire(), this.render();
		}
		_(e, t) {
			if (!this.valid(e)) return this.bell();
			let n = Date.now();
			if (n - this.lastHit > 1e3 && (this.typed = ""), this.typed += e, this.lastHit = n, this.color = "cyan", e === ".") return this.fire();
			this.value = Math.min(this.parse(this.typed), this.max), this.value > this.max && (this.value = this.max), this.value < this.min && (this.value = this.min), this.fire(), this.render();
		}
		render() {
			this.closed || (this.firstRender || (this.outputError && this.out.write(i.down(l(this.outputError, this.out.columns) - 1) + c(this.outputError, this.out.columns)), this.out.write(c(this.outputText, this.out.columns))), super.render(), this.outputError = "", this.outputText = [
				o.symbol(this.done, this.aborted),
				n.bold(this.msg),
				o.delimiter(this.done),
				!this.done || !this.done && !this.placeholder ? n[this.color]().underline(this.rendered) : this.rendered
			].join(" "), this.error && (this.outputError += this.errorMsg.split("\n").reduce((e, t, r) => e + `\n${r ? " " : s.pointerSmall} ${n.red().italic(t)}`, "")), this.out.write(a.line + i.to(0) + this.outputText + i.save + this.outputError + i.restore));
		}
	};
})), ce = /* @__PURE__ */ w(((e, t) => {
	var n = A(), { cursor: r } = N(), i = V(), { clear: a, figures: o, style: s, wrap: c, entriesToDisplay: l } = B();
	t.exports = class extends i {
		constructor(e = {}) {
			super(e), this.isSelect = !0, this.msg = e.message, this.cursorStart = e.choices.findIndex((e) => !e.heading), this.cursor = e.cursor || this.cursorStart, this.scrollIndex = e.cursor || 0, this.hint = e.hint || "", this.warn = e.warn || "- This option is disabled -", this.minSelected = e.min, this.showMinError = !1, this.maxChoices = e.max, this.instructions = e.instructions, this.optionsPerPage = e.optionsPerPage || 10, this.value = e.choices.map((e, t) => (typeof e == "string" && (e = {
				title: e,
				value: t
			}), {
				title: e && (e.title || e.value || e),
				description: e && e.description,
				value: e && (e.value === void 0 ? t : e.value),
				selected: e && e.selected,
				disabled: e && e.disabled,
				heading: e && e.heading
			})), this.clear = a("", this.out.columns), e.overrideRender || this.render();
		}
		reset() {
			this.value.map((e) => !e.selected), this.cursor = this.cursorStart, this.fire(), this.render();
		}
		selected() {
			return this.value.filter((e) => e.selected);
		}
		exit() {
			this.abort();
		}
		abort() {
			this.done = this.aborted = !0, this.fire(), this.render(), this.out.write("\n"), this.close();
		}
		submit() {
			let e = this.value.filter((e) => e.selected);
			this.minSelected && e.length < this.minSelected ? (this.showMinError = !0, this.render()) : (this.done = !0, this.aborted = !1, this.fire(), this.render(), this.out.write("\n"), this.close());
		}
		first() {
			this.cursor = this.cursorStart, this.render();
		}
		last() {
			this.cursor = this.value.length - 1, this.render();
		}
		next() {
			this.cursor = (this.cursor + 1) % this.value.length, this.value[this.cursor].heading && this.next(), this.render();
		}
		up() {
			this.cursor === this.cursorStart ? this.cursor = this.value.length - 1 : this.cursor--, this.value[this.cursor].heading && this.up(), this.render();
		}
		down() {
			this.cursor === this.value.length - 1 ? this.cursor = this.cursorStart : this.cursor++, this.value[this.cursor].heading && this.down(), this.render();
		}
		left() {
			this.value[this.cursor].selected = !1, this.render();
		}
		right() {
			if (this.value.filter((e) => e.selected).length >= this.maxChoices) return this.bell();
			this.value[this.cursor].selected = !0, this.render();
		}
		handleSpaceToggle() {
			let e = this.value[this.cursor];
			if (e.selected) e.selected = !1, this.render();
			else if (e.disabled || this.value.filter((e) => e.selected).length >= this.maxChoices) return this.bell();
			else e.selected = !0, this.render();
		}
		toggleAll() {
			if (this.maxChoices !== void 0 || this.value[this.cursor].disabled) return this.bell();
			let e = !this.value[this.cursor].selected;
			this.value.filter((e) => !e.disabled && !e.heading).forEach((t) => t.selected = e), this.render();
		}
		_(e, t) {
			if (e === " ") this.handleSpaceToggle();
			else if (e === "a") this.toggleAll();
			else return this.bell();
		}
		renderInstructions() {
			return this.instructions === void 0 || this.instructions ? typeof this.instructions == "string" ? this.instructions : `
Instructions:
    ${o.arrowUp}/${o.arrowDown}: Highlight option\n    ${o.arrowLeft}/${o.arrowRight}/[space]: Toggle selection\n` + (this.maxChoices === void 0 ? "    a: Toggle all\n" : "") + "    enter/return: Complete answer" : "";
		}
		renderOption(e, t, r, i) {
			let a = (e === r ? "❯ " : "  ") + (t.selected ? n.green(o.radioOn) : o.radioOff) + " ", s, l;
			if (t.disabled) s = e === r ? n.gray(t.title) : n.strikethrough().gray(t.title);
			else if (t.heading) return s = t.title, s + n.gray(l || "");
			else s = t.title, e === r && t.description && (l = ` - ${t.description}`, (a.length + s.length + l.length >= this.out.columns || t.description.split(/\r?\n/).length > 1) && (l = "\n" + c(t.description, {
				margin: a.length,
				width: this.out.columns
			})));
			return a + s + n.gray(l || "");
		}
		paginateOptions(e) {
			if (e.length === 0) return n.red("No matches for this query.");
			let { startIndex: t, endIndex: r } = l(this.cursor, e.length, this.optionsPerPage), i, a = [];
			for (let n = t; n < r; n++) i = n === t && t > 0 ? o.arrowUp : n === r - 1 && r < e.length ? o.arrowDown : " ", a.push(this.renderOption(this.cursor, e[n], n, i));
			return "\n" + a.join("\n");
		}
		renderOptions(e) {
			return this.done ? "" : this.paginateOptions(e);
		}
		renderDoneOrInstructions() {
			if (this.done) return "";
			let e = [n.gray(this.hint), this.renderInstructions()];
			return this.value[this.cursor].disabled && e.push(n.yellow(this.warn)), e.join(" ");
		}
		render() {
			if (this.closed) return;
			this.firstRender && this.out.write(r.hide), super.render();
			let e = [
				s.symbol(this.done, this.aborted),
				n.bold(this.msg),
				s.delimiter(!1),
				this.renderDoneOrInstructions()
			].join(" ");
			this.showMinError &&= (e += n.red(`You must select a minimum of ${this.minSelected} choices.`), !1), e += this.renderOptions(this.value), this.out.write(this.clear + e), this.clear = a(e, this.out.columns);
		}
	};
})), le = /* @__PURE__ */ w(((e, t) => {
	var n = A(), r = V(), { erase: i, cursor: a } = N(), { style: o, clear: s, figures: c, wrap: l, entriesToDisplay: u } = B(), d = (e, t) => e[t] && (e[t].value || e[t].title || e[t]), f = (e, t) => e[t] && (e[t].title || e[t].value || e[t]), p = (e, t) => {
		let n = e.findIndex((e) => e.value === t || e.title === t);
		return n > -1 ? n : void 0;
	};
	t.exports = class extends r {
		constructor(e = {}) {
			super(e), this.msg = e.message, this.suggest = e.suggest, this.choices = e.choices, this.initial = typeof e.initial == "number" ? e.initial : p(e.choices, e.initial), this.select = this.initial || e.cursor || 0, this.i18n = { noMatches: e.noMatches || "no matches found" }, this.fallback = e.fallback || this.initial, this.clearFirst = e.clearFirst || !1, this.suggestions = [], this.input = "", this.limit = e.limit || 10, this.cursor = 0, this.transform = o.render(e.style), this.scale = this.transform.scale, this.render = this.render.bind(this), this.complete = this.complete.bind(this), this.clear = s("", this.out.columns), this.complete(this.render), this.render();
		}
		set fallback(e) {
			this._fb = Number.isSafeInteger(parseInt(e)) ? parseInt(e) : e;
		}
		get fallback() {
			let e;
			return typeof this._fb == "number" ? e = this.choices[this._fb] : typeof this._fb == "string" && (e = { title: this._fb }), e || this._fb || { title: this.i18n.noMatches };
		}
		moveSelect(e) {
			this.select = e, this.suggestions.length > 0 ? this.value = d(this.suggestions, e) : this.value = this.fallback.value, this.fire();
		}
		async complete(e) {
			let t = this.completing = this.suggest(this.input, this.choices), n = await t;
			if (this.completing !== t) return;
			this.suggestions = n.map((e, t, n) => ({
				title: f(n, t),
				value: d(n, t),
				description: e.description
			})), this.completing = !1;
			let r = Math.max(n.length - 1, 0);
			this.moveSelect(Math.min(r, this.select)), e && e();
		}
		reset() {
			this.input = "", this.complete(() => {
				this.moveSelect(this.initial === void 0 ? 0 : this.initial), this.render();
			}), this.render();
		}
		exit() {
			this.clearFirst && this.input.length > 0 ? this.reset() : (this.done = this.exited = !0, this.aborted = !1, this.fire(), this.render(), this.out.write("\n"), this.close());
		}
		abort() {
			this.done = this.aborted = !0, this.exited = !1, this.fire(), this.render(), this.out.write("\n"), this.close();
		}
		submit() {
			this.done = !0, this.aborted = this.exited = !1, this.fire(), this.render(), this.out.write("\n"), this.close();
		}
		_(e, t) {
			let n = this.input.slice(0, this.cursor), r = this.input.slice(this.cursor);
			this.input = `${n}${e}${r}`, this.cursor = n.length + 1, this.complete(this.render), this.render();
		}
		delete() {
			if (this.cursor === 0) return this.bell();
			let e = this.input.slice(0, this.cursor - 1), t = this.input.slice(this.cursor);
			this.input = `${e}${t}`, this.complete(this.render), --this.cursor, this.render();
		}
		deleteForward() {
			if (this.cursor * this.scale >= this.rendered.length) return this.bell();
			let e = this.input.slice(0, this.cursor), t = this.input.slice(this.cursor + 1);
			this.input = `${e}${t}`, this.complete(this.render), this.render();
		}
		first() {
			this.moveSelect(0), this.render();
		}
		last() {
			this.moveSelect(this.suggestions.length - 1), this.render();
		}
		up() {
			this.select === 0 ? this.moveSelect(this.suggestions.length - 1) : this.moveSelect(this.select - 1), this.render();
		}
		down() {
			this.select === this.suggestions.length - 1 ? this.moveSelect(0) : this.moveSelect(this.select + 1), this.render();
		}
		next() {
			this.select === this.suggestions.length - 1 ? this.moveSelect(0) : this.moveSelect(this.select + 1), this.render();
		}
		nextPage() {
			this.moveSelect(Math.min(this.select + this.limit, this.suggestions.length - 1)), this.render();
		}
		prevPage() {
			this.moveSelect(Math.max(this.select - this.limit, 0)), this.render();
		}
		left() {
			if (this.cursor <= 0) return this.bell();
			--this.cursor, this.render();
		}
		right() {
			if (this.cursor * this.scale >= this.rendered.length) return this.bell();
			this.cursor += 1, this.render();
		}
		renderOption(e, t, r, i) {
			let a, o = r ? c.arrowUp : i ? c.arrowDown : " ", s = t ? n.cyan().underline(e.title) : e.title;
			return o = (t ? n.cyan(c.pointer) + " " : "  ") + o, e.description && (a = ` - ${e.description}`, (o.length + s.length + a.length >= this.out.columns || e.description.split(/\r?\n/).length > 1) && (a = "\n" + l(e.description, {
				margin: 3,
				width: this.out.columns
			}))), o + " " + s + n.gray(a || "");
		}
		render() {
			if (this.closed) return;
			this.firstRender ? this.out.write(a.hide) : this.out.write(s(this.outputText, this.out.columns)), super.render();
			let { startIndex: e, endIndex: t } = u(this.select, this.choices.length, this.limit);
			if (this.outputText = [
				o.symbol(this.done, this.aborted, this.exited),
				n.bold(this.msg),
				o.delimiter(this.completing),
				this.done && this.suggestions[this.select] ? this.suggestions[this.select].title : this.rendered = this.transform.render(this.input)
			].join(" "), !this.done) {
				let r = this.suggestions.slice(e, t).map((n, r) => this.renderOption(n, this.select === r + e, r === 0 && e > 0, r + e === t - 1 && t < this.choices.length)).join("\n");
				this.outputText += "\n" + (r || n.gray(this.fallback.title));
			}
			this.out.write(i.line + a.to(0) + this.outputText);
		}
	};
})), ue = /* @__PURE__ */ w(((e, t) => {
	var n = A(), { cursor: r } = N(), i = ce(), { clear: a, style: o, figures: s } = B();
	t.exports = class extends i {
		constructor(e = {}) {
			e.overrideRender = !0, super(e), this.inputValue = "", this.clear = a("", this.out.columns), this.filteredOptions = this.value, this.render();
		}
		last() {
			this.cursor = this.filteredOptions.length - 1, this.render();
		}
		next() {
			this.cursor = (this.cursor + 1) % this.filteredOptions.length, this.render();
		}
		up() {
			this.cursor === 0 ? this.cursor = this.filteredOptions.length - 1 : this.cursor--, this.render();
		}
		down() {
			this.cursor === this.filteredOptions.length - 1 ? this.cursor = 0 : this.cursor++, this.render();
		}
		left() {
			this.filteredOptions[this.cursor].selected = !1, this.render();
		}
		right() {
			if (this.value.filter((e) => e.selected).length >= this.maxChoices) return this.bell();
			this.filteredOptions[this.cursor].selected = !0, this.render();
		}
		delete() {
			this.inputValue.length && (this.inputValue = this.inputValue.substr(0, this.inputValue.length - 1), this.updateFilteredOptions());
		}
		updateFilteredOptions() {
			let e = this.filteredOptions[this.cursor];
			this.filteredOptions = this.value.filter((e) => this.inputValue ? !!(typeof e.title == "string" && e.title.toLowerCase().includes(this.inputValue.toLowerCase()) || typeof e.value == "string" && e.value.toLowerCase().includes(this.inputValue.toLowerCase())) : !0);
			let t = this.filteredOptions.findIndex((t) => t === e);
			this.cursor = t < 0 ? 0 : t, this.render();
		}
		handleSpaceToggle() {
			let e = this.filteredOptions[this.cursor];
			if (e.selected) e.selected = !1, this.render();
			else if (e.disabled || this.value.filter((e) => e.selected).length >= this.maxChoices) return this.bell();
			else e.selected = !0, this.render();
		}
		handleInputChange(e) {
			this.inputValue += e, this.updateFilteredOptions();
		}
		_(e, t) {
			e === " " ? this.handleSpaceToggle() : this.handleInputChange(e);
		}
		renderInstructions() {
			return this.instructions === void 0 || this.instructions ? typeof this.instructions == "string" ? this.instructions : `
Instructions:
    ${s.arrowUp}/${s.arrowDown}: Highlight option
    ${s.arrowLeft}/${s.arrowRight}/[space]: Toggle selection
    [a,b,c]/delete: Filter choices
    enter/return: Complete answer
` : "";
		}
		renderCurrentInput() {
			return `
Filtered results for: ${this.inputValue ? this.inputValue : n.gray("Enter something to filter")}\n`;
		}
		renderOption(e, t, r, i) {
			let a = (t.selected ? n.green(s.radioOn) : s.radioOff) + " " + i + " ", o;
			return o = t.disabled ? e === r ? n.gray().underline(t.title) : n.strikethrough().gray(t.title) : e === r ? n.cyan().underline(t.title) : t.title, a + o;
		}
		renderDoneOrInstructions() {
			if (this.done) return this.value.filter((e) => e.selected).map((e) => e.title).join(", ");
			let e = [
				n.gray(this.hint),
				this.renderInstructions(),
				this.renderCurrentInput()
			];
			return this.filteredOptions.length && this.filteredOptions[this.cursor].disabled && e.push(n.yellow(this.warn)), e.join(" ");
		}
		render() {
			if (this.closed) return;
			this.firstRender && this.out.write(r.hide), super.render();
			let e = [
				o.symbol(this.done, this.aborted),
				n.bold(this.msg),
				o.delimiter(!1),
				this.renderDoneOrInstructions()
			].join(" ");
			this.showMinError &&= (e += n.red(`You must select a minimum of ${this.minSelected} choices.`), !1), e += this.renderOptions(this.filteredOptions), this.out.write(this.clear + e), this.clear = a(e, this.out.columns);
		}
	};
})), de = /* @__PURE__ */ w(((e, t) => {
	var n = A(), r = V(), { style: i, clear: a } = B(), { erase: o, cursor: s } = N();
	t.exports = class extends r {
		constructor(e = {}) {
			super(e), this.msg = e.message, this.value = e.initial, this.initialValue = !!e.initial, this.yesMsg = e.yes || "yes", this.yesOption = e.yesOption || "(Y/n)", this.noMsg = e.no || "no", this.noOption = e.noOption || "(y/N)", this.render();
		}
		reset() {
			this.value = this.initialValue, this.fire(), this.render();
		}
		exit() {
			this.abort();
		}
		abort() {
			this.done = this.aborted = !0, this.fire(), this.render(), this.out.write("\n"), this.close();
		}
		submit() {
			this.value = this.value || !1, this.done = !0, this.aborted = !1, this.fire(), this.render(), this.out.write("\n"), this.close();
		}
		_(e, t) {
			return e.toLowerCase() === "y" ? (this.value = !0, this.submit()) : e.toLowerCase() === "n" ? (this.value = !1, this.submit()) : this.bell();
		}
		render() {
			if (this.closed) return;
			this.firstRender ? this.out.write(s.hide) : this.out.write(a(this.outputText, this.out.columns)), super.render();
			let e = this.aborted || this.done && !this.value;
			this.outputText = [
				i.symbol(this.done, e),
				n.bold(this.msg),
				i.delimiter(this.done),
				this.done ? this.value && !this.aborted ? this.yesMsg : this.noMsg : n.gray(this.initialValue ? this.yesOption : this.noOption)
			].join(" "), this.out.write(o.line + s.to(0) + this.outputText);
		}
	};
})), fe = /* @__PURE__ */ w(((e, t) => {
	t.exports = {
		TextPrompt: H(),
		SelectPrompt: U(),
		TogglePrompt: ee(),
		DatePrompt: oe(),
		NumberPrompt: se(),
		MultiselectPrompt: ce(),
		AutocompletePrompt: le(),
		AutocompleteMultiselectPrompt: ue(),
		ConfirmPrompt: de()
	};
})), pe = /* @__PURE__ */ w(((e) => {
	var t = e, n = fe(), r = (e) => e;
	function i(e, t, i = {}) {
		return new Promise((a, o) => {
			let s = new n[e](t), c = i.onAbort || r, l = i.onSubmit || r, u = i.onExit || r;
			s.on("state", t.onState || r), s.on("submit", (e) => a(l(e))), s.on("exit", (e) => a(u(e))), s.on("abort", (e) => o(c(e)));
		});
	}
	t.text = (e) => i("TextPrompt", e), t.password = (e) => (e.style = "password", t.text(e)), t.invisible = (e) => (e.style = "invisible", t.text(e)), t.number = (e) => i("NumberPrompt", e), t.date = (e) => i("DatePrompt", e), t.confirm = (e) => i("ConfirmPrompt", e), t.list = (e) => {
		let t = e.separator || ",";
		return i("TextPrompt", e, { onSubmit: (e) => e.split(t).map((e) => e.trim()) });
	}, t.toggle = (e) => i("TogglePrompt", e), t.select = (e) => i("SelectPrompt", e), t.multiselect = (e) => {
		e.choices = [].concat(e.choices || []);
		let t = (e) => e.filter((e) => e.selected).map((e) => e.value);
		return i("MultiselectPrompt", e, {
			onAbort: t,
			onSubmit: t
		});
	}, t.autocompleteMultiselect = (e) => {
		e.choices = [].concat(e.choices || []);
		let t = (e) => e.filter((e) => e.selected).map((e) => e.value);
		return i("AutocompleteMultiselectPrompt", e, {
			onAbort: t,
			onSubmit: t
		});
	};
	var a = (e, t) => Promise.resolve(t.filter((t) => t.title.slice(0, e.length).toLowerCase() === e.toLowerCase()));
	t.autocomplete = (e) => (e.suggest = e.suggest || a, e.choices = [].concat(e.choices || []), i("AutocompletePrompt", e));
})), me = /* @__PURE__ */ w(((e, t) => {
	var n = pe(), r = [
		"suggest",
		"format",
		"onState",
		"validate",
		"onRender",
		"type"
	], i = () => {};
	async function a(e = [], { onSubmit: t = i, onCancel: s = i } = {}) {
		let c = {}, l = a._override || {};
		e = [].concat(e);
		let u, d, f, p, m, h, g = async (e, t, n = !1) => {
			if (!(!n && e.validate && e.validate(t) !== !0)) return e.format ? await e.format(t, c) : t;
		};
		for (d of e) if ({name: p, type: m} = d, typeof m == "function" && (m = await m(u, { ...c }, d), d.type = m), m) {
			for (let e in d) {
				if (r.includes(e)) continue;
				let t = d[e];
				d[e] = typeof t == "function" ? await t(u, { ...c }, h) : t;
			}
			if (h = d, typeof d.message != "string") throw Error("prompt message is required");
			if ({name: p, type: m} = d, n[m] === void 0) throw Error(`prompt type (${m}) is not defined`);
			if (l[d.name] !== void 0 && (u = await g(d, l[d.name]), u !== void 0)) {
				c[p] = u;
				continue;
			}
			try {
				u = a._injected ? o(a._injected, d.initial) : await n[m](d), c[p] = u = await g(d, u, !0), f = await t(d, u, c);
			} catch {
				f = !await s(d, c);
			}
			if (f) return c;
		}
		return c;
	}
	function o(e, t) {
		let n = e.shift();
		if (n instanceof Error) throw n;
		return n === void 0 ? t : n;
	}
	function s(e) {
		a._injected = (a._injected || []).concat(e);
	}
	function c(e) {
		a._override = Object.assign({}, e);
	}
	t.exports = Object.assign(a, {
		prompt: a,
		prompts: n,
		inject: s,
		override: c
	});
})), he = /* @__PURE__ */ D((/* @__PURE__ */ w(((e, t) => {
	t.exports = me();
})))(), 1), ge = {
	name: "npm-check-updates",
	version: "22.2.9",
	author: "Tomas Junnonen <tomas1@gmail.com>",
	license: "Apache-2.0",
	contributors: ["Raine Revere (https://github.com/raineorshine)", "Imamuzzaki Abu Salam <imamuzzaki@gmail.com>"],
	description: "Find newer versions of dependencies than what your package.json allows",
	keywords: [
		"dependencies",
		"npm",
		"package.json",
		"update",
		"upgrade",
		"versions"
	],
	engines: {
		node: "^20.19.0 || ^22.12.0 || >=24.0.0",
		npm: ">=10.0.0"
	},
	type: "module",
	main: "build/index.cjs",
	module: "build/index.js",
	types: "build/index.d.ts",
	bin: {
		"npm-check-updates": "build/cli.js",
		ncu: "build/cli.js"
	},
	exports: {
		".": {
			types: "./build/index.d.ts",
			import: "./build/index.js",
			require: "./build/index.cjs"
		},
		"./package.json": "./package.json"
	},
	scripts: {
		build: "vite build",
		"build:options": "tsx scripts/build-options.ts",
		"build:analyze": "cross-env ANALYZER=true vite build",
		lint: "cross-env FORCE_COLOR=1 npm-run-all --parallel --continue-on-error --aggregate-output lint:*",
		"lint:lockfile": "lockfile-lint",
		"lint:types": "tsc --noEmit",
		"lint:markdown": "markdownlint-cli2 \"**/*.md\" \"!**/node_modules/**/*.md\" \"!build/**/*.md\"",
		"lint:src": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives",
		prepare: "git config core.hooksPath .hooks || exit 0",
		prepublishOnly: "npm run build",
		prettier: "prettier . --check",
		"prettier:fix": "prettier . --write",
		test: "tsc --noEmit && npm run test:unit && npm run test:e2e",
		"test:bun": "mocha test/bun",
		"test:unit": "mocha test --ignore \"test/bun/*\"",
		"test:e2e": "bash ./test/e2e.sh",
		ncu: "node build/cli.js"
	},
	repository: {
		type: "git",
		url: "git+https://github.com/raineorshine/npm-check-updates.git"
	},
	homepage: "https://github.com/raineorshine/npm-check-updates",
	bugs: { url: "https://github.com/raineorshine/npm-check-updates/issues" },
	overrides: {
		typescript: "$typescript",
		eslint: "$eslint",
		"eslint-config-standard": {
			"eslint-plugin-n": "$eslint-plugin-n",
			"eslint-plugin-promise": "$eslint-plugin-promise"
		},
		mocha: {
			diff: "^8.0.3",
			"serialize-javascript": "^7.0.3"
		},
		"@cypress/request": { uuid: "^14.0.0" }
	},
	devDependencies: {
		"@eslint/compat": "^2.1.0",
		"@eslint/js": "^10.0.1",
		"@microsoft/api-extractor": "^7.58.9",
		"@streamparser/json": "^0.0.22",
		"@trivago/prettier-plugin-sort-imports": "^6.0.2",
		"@types/bun": "^1.3.14",
		"@types/chai": "^5.2.3",
		"@types/chai-as-promised": "^8.0.2",
		"@types/chai-string": "^1.4.5",
		"@types/hosted-git-info": "^3.0.5",
		"@types/ini": "^4.1.1",
		"@types/jsonlines": "^0.1.5",
		"@types/mocha": "^10.0.10",
		"@types/node": "^25.9.4",
		"@types/npm-registry-fetch": "^8.0.9",
		"@types/parse-github-url": "^1.0.3",
		"@types/picomatch": "^4.0.3",
		"@types/progress": "^2.0.7",
		"@types/semver": "^7.7.1",
		"@types/semver-utils": "^1.1.3",
		"@types/sinon": "^21.0.1",
		"@types/update-notifier": "^6.0.8",
		"@typescript-eslint/eslint-plugin": "^8.62.0",
		"@typescript-eslint/parser": "^8.62.0",
		camelcase: "^9.0.0",
		chai: "^6.2.2",
		"chai-as-promised": "^8.0.2",
		"chai-string": "^2.0.0",
		chalk: "^5.6.2",
		"cli-table3": "^0.6.5",
		commander: "^14.0.3",
		"cross-env": "^10.1.0",
		eslint: "^10.6.0",
		"eslint-config-prettier": "^10.1.8",
		"eslint-config-raine": "^0.5.0",
		"eslint-config-standard": "^17.1.0",
		"eslint-import-resolver-typescript": "^4.4.5",
		"eslint-plugin-import-x": "^4.17.0",
		"eslint-plugin-jsdoc": "^62.9.0",
		"eslint-plugin-n": "^18.2.1",
		"eslint-plugin-promise": "^7.3.0",
		"fast-glob": "^3.3.3",
		"fast-memoize": "^2.5.2",
		"find-up": "^8.0.0",
		"fp-and-or": "^1.0.2",
		globals: "^17.7.0",
		"hosted-git-info": "^9.0.3",
		ini: "^6.0.0",
		"jsonc-parser": "^3.3.1",
		jsonlines: "^0.1.1",
		lilconfig: "^3.1.3",
		"lockfile-lint": "^5.0.0",
		"markdownlint-cli2": "^0.18.0",
		mocha: "^11.7.6",
		"npm-registry-fetch": "^19.1.1",
		"npm-run-all2": "^8.0.4",
		"p-map": "^7.0.4",
		"parse-github-url": "^1.0.4",
		picomatch: "^4.0.4",
		prettier: "^3.8.5",
		progress: "^2.0.3",
		"prompts-ncu": "^3.0.3",
		semver: "^7.8.5",
		"semver-utils": "^1.1.4",
		sinon: "^22.0.0",
		"spawn-please": "^3.0.0",
		"timeago.js": "^4.0.2",
		"ts-json-schema-generator": "2.4.0",
		tsx: "^4.22.4",
		typescript: "^6.0.3",
		"unplugin-dts": "^1.0.3",
		untildify: "^6.0.0",
		"update-notifier": "^7.3.1",
		valibot: "^1.4.1",
		verdaccio: "^6.7.4",
		vite: "^8.1.0",
		"vite-bundle-analyzer": "^1.3.8",
		yaml: "^2.9.0",
		yarn: "^1.22.22"
	},
	files: ["build"],
	allowScripts: {
		"yarn@1.22.22": !0,
		"esbuild@0.28.1": !0,
		"unrs-resolver@1.11.1": !0
	}
}, _e = /* @__PURE__ */ w(((e, t) => {
	var n = [], r = 0, i = (e, t) => {
		r >= t && n.push(e);
	};
	i.WARN = 1, i.INFO = 2, i.DEBUG = 3, i.reset = () => {
		n = [];
	}, i.setDebugLevel = (e) => {
		r = e;
	}, i.warn = (e) => i(e, i.WARN), i.info = (e) => i(e, i.INFO), i.debug = (e) => i(e, i.DEBUG), i.debugMessages = () => n, t.exports = i;
})), ve = /* @__PURE__ */ w(((e, t) => {
	t.exports = ({ onlyFirst: e = !1 } = {}) => {
		let t = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");
		return new RegExp(t, e ? void 0 : "g");
	};
})), ye = /* @__PURE__ */ w(((e, t) => {
	var n = ve();
	t.exports = (e) => typeof e == "string" ? e.replace(n(), "") : e;
})), be = /* @__PURE__ */ w(((e, t) => {
	var n = (e) => Number.isNaN(e) ? !1 : e >= 4352 && (e <= 4447 || e === 9001 || e === 9002 || 11904 <= e && e <= 12871 && e !== 12351 || 12880 <= e && e <= 19903 || 19968 <= e && e <= 42182 || 43360 <= e && e <= 43388 || 44032 <= e && e <= 55203 || 63744 <= e && e <= 64255 || 65040 <= e && e <= 65049 || 65072 <= e && e <= 65131 || 65281 <= e && e <= 65376 || 65504 <= e && e <= 65510 || 110592 <= e && e <= 110593 || 127488 <= e && e <= 127569 || 131072 <= e && e <= 262141);
	t.exports = n, t.exports.default = n;
})), xe = /* @__PURE__ */ w(((e, t) => {
	t.exports = function() {
		return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
	};
})), Se = /* @__PURE__ */ w(((e, t) => {
	var n = ye(), r = be(), i = xe(), a = (e) => {
		if (typeof e != "string" || e.length === 0 || (e = n(e), e.length === 0)) return 0;
		e = e.replace(i(), "  ");
		let t = 0;
		for (let n = 0; n < e.length; n++) {
			let i = e.codePointAt(n);
			i <= 31 || i >= 127 && i <= 159 || i >= 768 && i <= 879 || (i > 65535 && n++, t += r(i) ? 2 : 1);
		}
		return t;
	};
	t.exports = a, t.exports.default = a;
})), Ce = /* @__PURE__ */ w(((e, t) => {
	var n = Se();
	function r(e) {
		return e ? /\u001b\[((?:\d*;){0,5}\d*)m/g : /\u001b\[(?:\d*;){0,5}\d*m/g;
	}
	function i(e) {
		let t = r();
		return ("" + e).replace(t, "").split("\n").reduce(function(e, t) {
			return n(t) > e ? n(t) : e;
		}, 0);
	}
	function a(e, t) {
		return Array(t + 1).join(e);
	}
	function o(e, t, n, r) {
		let o = i(e);
		if (t + 1 >= o) {
			let i = t - o;
			switch (r) {
				case "right":
					e = a(n, i) + e;
					break;
				case "center": {
					let t = Math.ceil(i / 2);
					e = a(n, i - t) + e + a(n, t);
					break;
				}
				default:
					e += a(n, i);
					break;
			}
		}
		return e;
	}
	var s = {};
	function c(e, t, n) {
		t = "\x1B[" + t + "m", n = "\x1B[" + n + "m", s[t] = {
			set: e,
			to: !0
		}, s[n] = {
			set: e,
			to: !1
		}, s[e] = {
			on: t,
			off: n
		};
	}
	c("bold", 1, 22), c("italics", 3, 23), c("underline", 4, 24), c("inverse", 7, 27), c("strikethrough", 9, 29);
	function l(e, t) {
		let n = t[1] ? parseInt(t[1].split(";")[0]) : 0;
		if (n >= 30 && n <= 39 || n >= 90 && n <= 97) {
			e.lastForegroundAdded = t[0];
			return;
		}
		if (n >= 40 && n <= 49 || n >= 100 && n <= 107) {
			e.lastBackgroundAdded = t[0];
			return;
		}
		if (n === 0) {
			for (let t in e)
 /* istanbul ignore else */
			Object.prototype.hasOwnProperty.call(e, t) && delete e[t];
			return;
		}
		let r = s[t[0]];
		r && (e[r.set] = r.to);
	}
	function u(e) {
		let t = r(!0), n = t.exec(e), i = {};
		for (; n !== null;) l(i, n), n = t.exec(e);
		return i;
	}
	function d(e, t) {
		let n = e.lastBackgroundAdded, r = e.lastForegroundAdded;
		return delete e.lastBackgroundAdded, delete e.lastForegroundAdded, Object.keys(e).forEach(function(n) {
			e[n] && (t += s[n].off);
		}), n && n != "\x1B[49m" && (t += "\x1B[49m"), r && r != "\x1B[39m" && (t += "\x1B[39m"), t;
	}
	function f(e, t) {
		let n = e.lastBackgroundAdded, r = e.lastForegroundAdded;
		return delete e.lastBackgroundAdded, delete e.lastForegroundAdded, Object.keys(e).forEach(function(n) {
			e[n] && (t = s[n].on + t);
		}), n && n != "\x1B[49m" && (t = n + t), r && r != "\x1B[39m" && (t = r + t), t;
	}
	function p(e, t) {
		if (e.length === i(e)) return e.substr(0, t);
		for (; i(e) > t;) e = e.slice(0, -1);
		return e;
	}
	function m(e, t) {
		let n = r(!0), a = e.split(r()), o = 0, s = 0, c = "", u, f = {};
		for (; s < t;) {
			u = n.exec(e);
			let r = a[o];
			if (o++, s + i(r) > t && (r = p(r, t - s)), c += r, s += i(r), s < t) {
				if (!u) break;
				c += u[0], l(f, u);
			}
		}
		return d(f, c);
	}
	function h(e, t, n) {
		if (n ||= "…", i(e) <= t) return e;
		t -= i(n);
		let r = m(e, t);
		r += n;
		let a = "\x1B]8;;\x07";
		return e.includes(a) && !r.includes(a) && (r += a), r;
	}
	function g() {
		return {
			chars: {
				top: "─",
				"top-mid": "┬",
				"top-left": "┌",
				"top-right": "┐",
				bottom: "─",
				"bottom-mid": "┴",
				"bottom-left": "└",
				"bottom-right": "┘",
				left: "│",
				"left-mid": "├",
				mid: "─",
				"mid-mid": "┼",
				right: "│",
				"right-mid": "┤",
				middle: "│"
			},
			truncate: "…",
			colWidths: [],
			rowHeights: [],
			colAligns: [],
			rowAligns: [],
			style: {
				"padding-left": 1,
				"padding-right": 1,
				head: ["red"],
				border: ["grey"],
				compact: !1
			},
			head: []
		};
	}
	function _(e, t) {
		e ||= {}, t ||= g();
		let n = Object.assign({}, t, e);
		return n.chars = Object.assign({}, t.chars, e.chars), n.style = Object.assign({}, t.style, e.style), n;
	}
	function v(e, t) {
		let n = [], r = t.split(/(\s+)/g), a = [], o = 0, s;
		for (let t = 0; t < r.length; t += 2) {
			let c = r[t], l = o + i(c);
			o > 0 && s && (l += s.length), l > e ? (o !== 0 && n.push(a.join("")), a = [c], o = i(c)) : (a.push(s || "", c), o = l), s = r[t + 1];
		}
		return o && n.push(a.join("")), n;
	}
	function y(e, t) {
		let n = [], r = "";
		function i(t, i) {
			for (r.length && i && (r += i), r += t; r.length > e;) n.push(r.slice(0, e)), r = r.slice(e);
		}
		let a = t.split(/(\s+)/g);
		for (let e = 0; e < a.length; e += 2) i(a[e], e && a[e - 1]);
		return r.length && n.push(r), n;
	}
	function b(e, t, n = !0) {
		let r = [];
		t = t.split("\n");
		let i = n ? v : y;
		for (let n = 0; n < t.length; n++) r.push.apply(r, i(e, t[n]));
		return r;
	}
	function x(e) {
		let t = {}, n = [];
		for (let r = 0; r < e.length; r++) {
			let i = f(t, e[r]);
			t = u(i);
			let a = Object.assign({}, t);
			n.push(d(a, i));
		}
		return n;
	}
	function S(e, t) {
		return [
			"\x1B]",
			"8",
			";",
			";",
			e || t,
			"\x07",
			t,
			"\x1B]",
			"8",
			";",
			";",
			"\x07"
		].join("");
	}
	t.exports = {
		strlen: i,
		repeat: a,
		pad: o,
		truncate: h,
		mergeOptions: _,
		wordWrap: b,
		colorizeLines: x,
		hyperlink: S
	};
})), we = /* @__PURE__ */ w(((e, t) => {
	var n = {};
	t.exports = n;
	var r = {
		reset: [0, 0],
		bold: [1, 22],
		dim: [2, 22],
		italic: [3, 23],
		underline: [4, 24],
		inverse: [7, 27],
		hidden: [8, 28],
		strikethrough: [9, 29],
		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],
		grey: [90, 39],
		brightRed: [91, 39],
		brightGreen: [92, 39],
		brightYellow: [93, 39],
		brightBlue: [94, 39],
		brightMagenta: [95, 39],
		brightCyan: [96, 39],
		brightWhite: [97, 39],
		bgBlack: [40, 49],
		bgRed: [41, 49],
		bgGreen: [42, 49],
		bgYellow: [43, 49],
		bgBlue: [44, 49],
		bgMagenta: [45, 49],
		bgCyan: [46, 49],
		bgWhite: [47, 49],
		bgGray: [100, 49],
		bgGrey: [100, 49],
		bgBrightRed: [101, 49],
		bgBrightGreen: [102, 49],
		bgBrightYellow: [103, 49],
		bgBrightBlue: [104, 49],
		bgBrightMagenta: [105, 49],
		bgBrightCyan: [106, 49],
		bgBrightWhite: [107, 49],
		blackBG: [40, 49],
		redBG: [41, 49],
		greenBG: [42, 49],
		yellowBG: [43, 49],
		blueBG: [44, 49],
		magentaBG: [45, 49],
		cyanBG: [46, 49],
		whiteBG: [47, 49]
	};
	Object.keys(r).forEach(function(e) {
		var t = r[e], i = n[e] = [];
		i.open = "\x1B[" + t[0] + "m", i.close = "\x1B[" + t[1] + "m";
	});
})), Te = /* @__PURE__ */ w(((e, t) => {
	t.exports = function(e, t) {
		t ||= process.argv;
		var n = t.indexOf("--"), r = /^-{1,2}/.test(e) ? "" : "--", i = t.indexOf(r + e);
		return i !== -1 && (n === -1 ? !0 : i < n);
	};
})), Ee = /* @__PURE__ */ w(((e, t) => {
	var n = k("os"), r = Te(), i = process.env, a = void 0;
	r("no-color") || r("no-colors") || r("color=false") ? a = !1 : (r("color") || r("colors") || r("color=true") || r("color=always")) && (a = !0), "FORCE_COLOR" in i && (a = i.FORCE_COLOR.length === 0 || parseInt(i.FORCE_COLOR, 10) !== 0);
	function o(e) {
		return e === 0 ? !1 : {
			level: e,
			hasBasic: !0,
			has256: e >= 2,
			has16m: e >= 3
		};
	}
	function s(e) {
		if (a === !1) return 0;
		if (r("color=16m") || r("color=full") || r("color=truecolor")) return 3;
		if (r("color=256")) return 2;
		if (e && !e.isTTY && a !== !0) return 0;
		var t = +!!a;
		if (process.platform === "win32") {
			var o = n.release().split(".");
			return Number(process.versions.node.split(".")[0]) >= 8 && Number(o[0]) >= 10 && Number(o[2]) >= 10586 ? Number(o[2]) >= 14931 ? 3 : 2 : 1;
		}
		if ("CI" in i) return [
			"TRAVIS",
			"CIRCLECI",
			"APPVEYOR",
			"GITLAB_CI"
		].some(function(e) {
			return e in i;
		}) || i.CI_NAME === "codeship" ? 1 : t;
		if ("TEAMCITY_VERSION" in i) return +!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION);
		if ("TERM_PROGRAM" in i) {
			var s = parseInt((i.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
			switch (i.TERM_PROGRAM) {
				case "iTerm.app": return s >= 3 ? 3 : 2;
				case "Hyper": return 3;
				case "Apple_Terminal": return 2;
			}
		}
		return /-256(color)?$/i.test(i.TERM) ? 2 : /^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM) || "COLORTERM" in i ? 1 : (i.TERM, t);
	}
	function c(e) {
		return o(s(e));
	}
	t.exports = {
		supportsColor: c,
		stdout: c(process.stdout),
		stderr: c(process.stderr)
	};
})), De = /* @__PURE__ */ w(((e, t) => {
	t.exports = function(e, t) {
		var n = "";
		e ||= "Run the trap, drop the bass", e = e.split("");
		var r = {
			a: [
				"@",
				"Ą",
				"Ⱥ",
				"Ʌ",
				"Δ",
				"Λ",
				"Д"
			],
			b: [
				"ß",
				"Ɓ",
				"Ƀ",
				"ɮ",
				"β",
				"฿"
			],
			c: [
				"©",
				"Ȼ",
				"Ͼ"
			],
			d: [
				"Ð",
				"Ɗ",
				"Ԁ",
				"ԁ",
				"Ԃ",
				"ԃ"
			],
			e: [
				"Ë",
				"ĕ",
				"Ǝ",
				"ɘ",
				"Σ",
				"ξ",
				"Ҽ",
				"੬"
			],
			f: ["Ӻ"],
			g: ["ɢ"],
			h: [
				"Ħ",
				"ƕ",
				"Ң",
				"Һ",
				"Ӈ",
				"Ԋ"
			],
			i: ["༏"],
			j: ["Ĵ"],
			k: [
				"ĸ",
				"Ҡ",
				"Ӄ",
				"Ԟ"
			],
			l: ["Ĺ"],
			m: [
				"ʍ",
				"Ӎ",
				"ӎ",
				"Ԡ",
				"ԡ",
				"൩"
			],
			n: [
				"Ñ",
				"ŋ",
				"Ɲ",
				"Ͷ",
				"Π",
				"Ҋ"
			],
			o: [
				"Ø",
				"õ",
				"ø",
				"Ǿ",
				"ʘ",
				"Ѻ",
				"ם",
				"۝",
				"๏"
			],
			p: ["Ƿ", "Ҏ"],
			q: ["্"],
			r: [
				"®",
				"Ʀ",
				"Ȑ",
				"Ɍ",
				"ʀ",
				"Я"
			],
			s: [
				"§",
				"Ϟ",
				"ϟ",
				"Ϩ"
			],
			t: [
				"Ł",
				"Ŧ",
				"ͳ"
			],
			u: ["Ʊ", "Ս"],
			v: ["ט"],
			w: [
				"Ш",
				"Ѡ",
				"Ѽ",
				"൰"
			],
			x: [
				"Ҳ",
				"Ӿ",
				"Ӽ",
				"ӽ"
			],
			y: [
				"¥",
				"Ұ",
				"Ӌ"
			],
			z: ["Ƶ", "ɀ"]
		};
		return e.forEach(function(e) {
			e = e.toLowerCase();
			var t = r[e] || [" "], i = Math.floor(Math.random() * t.length);
			r[e] === void 0 ? n += e : n += r[e][i];
		}), n;
	};
})), Oe = /* @__PURE__ */ w(((e, t) => {
	t.exports = function(e, t) {
		e ||= "   he is here   ";
		var n = {
			up: /* @__PURE__ */ "̍.̎.̄.̅.̿.̑.̆.̐.͒.͗.͑.̇.̈.̊.͂.̓.̈.͊.͋.͌.̃.̂.̌.͐.̀.́.̋.̏.̒.̓.̔.̽.̉.ͣ.ͤ.ͥ.ͦ.ͧ.ͨ.ͩ.ͪ.ͫ.ͬ.ͭ.ͮ.ͯ.̾.͛.͆.̚".split("."),
			down: /* @__PURE__ */ "̖.̗.̘.̙.̜.̝.̞.̟.̠.̤.̥.̦.̩.̪.̫.̬.̭.̮.̯.̰.̱.̲.̳.̹.̺.̻.̼.ͅ.͇.͈.͉.͍.͎.͓.͔.͕.͖.͙.͚.̣".split("."),
			mid: [
				"̕",
				"̛",
				"̀",
				"́",
				"͘",
				"̡",
				"̢",
				"̧",
				"̨",
				"̴",
				"̵",
				"̶",
				"͜",
				"͝",
				"͞",
				"͟",
				"͠",
				"͢",
				"̸",
				"̷",
				"͡",
				" ҉"
			]
		}, r = [].concat(n.up, n.down, n.mid);
		function i(e) {
			return Math.floor(Math.random() * e);
		}
		function a(e) {
			var t = !1;
			return r.filter(function(n) {
				t = n === e;
			}), t;
		}
		function o(e, t) {
			var r = "", o, s;
			for (s in t ||= {}, t.up = t.up === void 0 ? !0 : t.up, t.mid = t.mid === void 0 ? !0 : t.mid, t.down = t.down === void 0 ? !0 : t.down, t.size = t.size === void 0 ? "maxi" : t.size, e = e.split(""), e) if (!a(s)) {
				switch (r += e[s], o = {
					up: 0,
					down: 0,
					mid: 0
				}, t.size) {
					case "mini":
						o.up = i(8), o.mid = i(2), o.down = i(8);
						break;
					case "maxi":
						o.up = i(16) + 3, o.mid = i(4) + 1, o.down = i(64) + 3;
						break;
					default:
						o.up = i(8) + 1, o.mid = i(6) / 2, o.down = i(8) + 1;
						break;
				}
				var c = [
					"up",
					"mid",
					"down"
				];
				for (var l in c) for (var u = c[l], d = 0; d <= o[u]; d++) t[u] && (r += n[u][i(n[u].length)]);
			}
			return r;
		}
		return o(e, t);
	};
})), ke = /* @__PURE__ */ w(((e, t) => {
	t.exports = function(e) {
		return function(t, n, r) {
			if (t === " ") return t;
			switch (n % 3) {
				case 0: return e.red(t);
				case 1: return e.white(t);
				case 2: return e.blue(t);
			}
		};
	};
})), Ae = /* @__PURE__ */ w(((e, t) => {
	t.exports = function(e) {
		return function(t, n, r) {
			return n % 2 == 0 ? t : e.inverse(t);
		};
	};
})), je = /* @__PURE__ */ w(((e, t) => {
	t.exports = function(e) {
		var t = [
			"red",
			"yellow",
			"green",
			"blue",
			"magenta"
		];
		return function(n, r, i) {
			return n === " " ? n : e[t[r++ % t.length]](n);
		};
	};
})), Me = /* @__PURE__ */ w(((e, t) => {
	t.exports = function(e) {
		var t = [
			"underline",
			"inverse",
			"grey",
			"yellow",
			"red",
			"green",
			"blue",
			"white",
			"cyan",
			"magenta",
			"brightYellow",
			"brightRed",
			"brightGreen",
			"brightBlue",
			"brightWhite",
			"brightCyan",
			"brightMagenta"
		];
		return function(n, r, i) {
			return n === " " ? n : e[t[Math.round(Math.random() * (t.length - 2))]](n);
		};
	};
})), Ne = /* @__PURE__ */ w(((e, t) => {
	var n = {};
	t.exports = n, n.themes = {};
	var r = k("util"), i = n.styles = we(), a = Object.defineProperties, o = /* @__PURE__ */ new RegExp(/[\r\n]+/g);
	n.supportsColor = Ee().supportsColor, n.enabled === void 0 && (n.enabled = n.supportsColor() !== !1), n.enable = function() {
		n.enabled = !0;
	}, n.disable = function() {
		n.enabled = !1;
	}, n.stripColors = n.strip = function(e) {
		return ("" + e).replace(/\x1B\[\d+m/g, "");
	}, n.stylize = function(e, t) {
		if (!n.enabled) return e + "";
		var r = i[t];
		return !r && t in n ? n[t](e) : r.open + e + r.close;
	};
	var s = /[|\\{}()[\]^$+*?.]/g, c = function(e) {
		if (typeof e != "string") throw TypeError("Expected a string");
		return e.replace(s, "\\$&");
	};
	function l(e) {
		var t = function e() {
			return f.apply(e, arguments);
		};
		return t._styles = e, t.__proto__ = d, t;
	}
	var u = (function() {
		var e = {};
		return i.grey = i.gray, Object.keys(i).forEach(function(t) {
			i[t].closeRe = new RegExp(c(i[t].close), "g"), e[t] = { get: function() {
				return l(this._styles.concat(t));
			} };
		}), e;
	})(), d = a(function() {}, u);
	function f() {
		var e = Array.prototype.slice.call(arguments).map(function(e) {
			return e != null && e.constructor === String ? e : r.inspect(e);
		}).join(" ");
		if (!n.enabled || !e) return e;
		for (var t = e.indexOf("\n") != -1, a = this._styles, s = a.length; s--;) {
			var c = i[a[s]];
			e = c.open + e.replace(c.closeRe, c.open) + c.close, t && (e = e.replace(o, function(e) {
				return c.close + e + c.open;
			}));
		}
		return e;
	}
	n.setTheme = function(e) {
		if (typeof e == "string") {
			console.log("colors.setTheme now only accepts an object, not a string.  If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file.  The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");
			return;
		}
		for (var t in e) (function(t) {
			n[t] = function(r) {
				if (typeof e[t] == "object") {
					var i = r;
					for (var a in e[t]) i = n[e[t][a]](i);
					return i;
				}
				return n[e[t]](r);
			};
		})(t);
	};
	function p() {
		var e = {};
		return Object.keys(u).forEach(function(t) {
			e[t] = { get: function() {
				return l([t]);
			} };
		}), e;
	}
	var m = function(e, t) {
		var n = t.split("");
		return n = n.map(e), n.join("");
	};
	for (var h in n.trap = De(), n.zalgo = Oe(), n.maps = {}, n.maps.america = ke()(n), n.maps.zebra = Ae()(n), n.maps.rainbow = je()(n), n.maps.random = Me()(n), n.maps) (function(e) {
		n[e] = function(t) {
			return m(n.maps[e], t);
		};
	})(h);
	a(n, p());
})), Pe = /* @__PURE__ */ w(((e, t) => {
	t.exports = Ne();
})), Fe = /* @__PURE__ */ w(((e, t) => {
	var { info: n, debug: r } = _e(), i = Ce(), a = class e {
		constructor(e) {
			this.setOptions(e), this.x = null, this.y = null;
		}
		setOptions(e) {
			[
				"boolean",
				"number",
				"bigint",
				"string"
			].indexOf(typeof e) !== -1 && (e = { content: "" + e }), e ||= {}, this.options = e;
			let t = e.content;
			if ([
				"boolean",
				"number",
				"bigint",
				"string"
			].indexOf(typeof t) !== -1) this.content = String(t);
			else if (!t) this.content = this.options.href || "";
			else throw Error("Content needs to be a primitive, got: " + typeof t);
			this.colSpan = e.colSpan || 1, this.rowSpan = e.rowSpan || 1, this.options.href && Object.defineProperty(this, "href", { get() {
				return this.options.href;
			} });
		}
		mergeTableOptions(e, t) {
			this.cells = t;
			let n = this.options.chars || {}, r = e.chars, a = this.chars = {};
			f.forEach(function(e) {
				l(n, r, e, a);
			}), this.truncate = this.options.truncate || e.truncate;
			let o = this.options.style = this.options.style || {}, s = e.style;
			l(o, s, "padding-left", this), l(o, s, "padding-right", this), this.head = o.head || s.head, this.border = o.border || s.border, this.fixedWidth = e.colWidths[this.x], this.lines = this.computeLines(e), this.desiredWidth = i.strlen(this.content) + this.paddingLeft + this.paddingRight, this.desiredHeight = this.lines.length;
		}
		computeLines(e) {
			let t = e.wordWrap || e.textWrap, { wordWrap: n = t } = this.options;
			if (this.fixedWidth && n) {
				if (this.fixedWidth -= this.paddingLeft + this.paddingRight, this.colSpan) {
					let t = 1;
					for (; t < this.colSpan;) this.fixedWidth += e.colWidths[this.x + t], t++;
				}
				let { wrapOnWordBoundary: t = !0 } = e, { wrapOnWordBoundary: n = t } = this.options;
				return this.wrapLines(i.wordWrap(this.fixedWidth, this.content, n));
			}
			return this.wrapLines(this.content.split("\n"));
		}
		wrapLines(e) {
			let t = i.colorizeLines(e);
			return this.href ? t.map((e) => i.hyperlink(this.href, e)) : t;
		}
		init(e) {
			let t = this.x, n = this.y;
			this.widths = e.colWidths.slice(t, t + this.colSpan), this.heights = e.rowHeights.slice(n, n + this.rowSpan), this.width = this.widths.reduce(d, -1), this.height = this.heights.reduce(d, -1), this.hAlign = this.options.hAlign || e.colAligns[t], this.vAlign = this.options.vAlign || e.rowAligns[n], this.drawRight = t + this.colSpan == e.colWidths.length;
		}
		draw(e, t) {
			if (e == "top") return this.drawTop(this.drawRight);
			if (e == "bottom") return this.drawBottom(this.drawRight);
			let r = i.truncate(this.content, 10, this.truncate);
			e || n(`${this.y}-${this.x}: ${this.rowSpan - e}x${this.colSpan} Cell ${r}`);
			let a = Math.max(this.height - this.lines.length, 0), o;
			switch (this.vAlign) {
				case "center":
					o = Math.ceil(a / 2);
					break;
				case "bottom":
					o = a;
					break;
				default: o = 0;
			}
			if (e < o || e >= o + this.lines.length) return this.drawEmpty(this.drawRight, t);
			let s = this.lines.length > this.height && e + 1 >= this.height;
			return this.drawLine(e - o, this.drawRight, s, t);
		}
		drawTop(e) {
			let t = [];
			return this.cells ? this.widths.forEach(function(e, n) {
				t.push(this._topLeftChar(n)), t.push(i.repeat(this.chars[this.y == 0 ? "top" : "mid"], e));
			}, this) : (t.push(this._topLeftChar(0)), t.push(i.repeat(this.chars[this.y == 0 ? "top" : "mid"], this.width))), e && t.push(this.chars[this.y == 0 ? "topRight" : "rightMid"]), this.wrapWithStyleColors("border", t.join(""));
		}
		_topLeftChar(t) {
			let n = this.x + t, r;
			if (this.y == 0) r = n == 0 ? "topLeft" : t == 0 ? "topMid" : "top";
			else if (n == 0) r = "leftMid";
			else if (r = t == 0 ? "midMid" : "bottomMid", this.cells && (this.cells[this.y - 1][n] instanceof e.ColSpanCell && (r = t == 0 ? "topMid" : "mid"), t == 0)) {
				let t = 1;
				for (; this.cells[this.y][n - t] instanceof e.ColSpanCell;) t++;
				this.cells[this.y][n - t] instanceof e.RowSpanCell && (r = "leftMid");
			}
			return this.chars[r];
		}
		wrapWithStyleColors(e, t) {
			if (this[e] && this[e].length) try {
				let n = Pe();
				for (let t = this[e].length - 1; t >= 0; t--) n = n[this[e][t]];
				return n(t);
			} catch {
				return t;
			}
			else return t;
		}
		drawLine(e, t, n, r) {
			let a = this.chars[this.x == 0 ? "left" : "middle"];
			if (this.x && r && this.cells) {
				let e = this.cells[this.y + r][this.x - 1];
				for (; e instanceof o;) e = this.cells[e.y][e.x - 1];
				e instanceof s || (a = this.chars.rightMid);
			}
			let c = i.repeat(" ", this.paddingLeft), l = t ? this.chars.right : "", u = i.repeat(" ", this.paddingRight), d = this.lines[e], f = this.width - (this.paddingLeft + this.paddingRight);
			n && (d += this.truncate || "…");
			let p = i.truncate(d, f, this.truncate);
			return p = i.pad(p, f, " ", this.hAlign), p = c + p + u, this.stylizeLine(a, p, l);
		}
		stylizeLine(e, t, n) {
			return e = this.wrapWithStyleColors("border", e), n = this.wrapWithStyleColors("border", n), this.y === 0 && (t = this.wrapWithStyleColors("head", t)), e + t + n;
		}
		drawBottom(e) {
			let t = this.chars[this.x == 0 ? "bottomLeft" : "bottomMid"], n = i.repeat(this.chars.bottom, this.width), r = e ? this.chars.bottomRight : "";
			return this.wrapWithStyleColors("border", t + n + r);
		}
		drawEmpty(e, t) {
			let n = this.chars[this.x == 0 ? "left" : "middle"];
			if (this.x && t && this.cells) {
				let e = this.cells[this.y + t][this.x - 1];
				for (; e instanceof o;) e = this.cells[e.y][e.x - 1];
				e instanceof s || (n = this.chars.rightMid);
			}
			let r = e ? this.chars.right : "", a = i.repeat(" ", this.width);
			return this.stylizeLine(n, a, r);
		}
	}, o = class {
		constructor() {}
		draw(e) {
			return typeof e == "number" && r(`${this.y}-${this.x}: 1x1 ColSpanCell`), "";
		}
		init() {}
		mergeTableOptions() {}
	}, s = class {
		constructor(e) {
			this.originalCell = e;
		}
		init(e) {
			let t = this.y, n = this.originalCell.y;
			this.cellOffset = t - n, this.offset = u(e.rowHeights, n, this.cellOffset);
		}
		draw(e) {
			return e == "top" ? this.originalCell.draw(this.offset, this.cellOffset) : e == "bottom" ? this.originalCell.draw("bottom") : (r(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`), this.originalCell.draw(this.offset + 1 + e));
		}
		mergeTableOptions() {}
	};
	function c(...e) {
		return e.filter((e) => e != null).shift();
	}
	function l(e, t, n, r) {
		let i = n.split("-");
		i.length > 1 ? (i[1] = i[1].charAt(0).toUpperCase() + i[1].substr(1), i = i.join(""), r[i] = c(e[i], e[n], t[i], t[n])) : r[n] = c(e[n], t[n]);
	}
	function u(e, t, n) {
		let r = e[t];
		for (let i = 1; i < n; i++) r += 1 + e[t + i];
		return r;
	}
	function d(e, t) {
		return e + t + 1;
	}
	var f = [
		"top",
		"top-mid",
		"top-left",
		"top-right",
		"bottom",
		"bottom-mid",
		"bottom-left",
		"bottom-right",
		"left",
		"left-mid",
		"mid",
		"mid-mid",
		"right",
		"right-mid",
		"middle"
	];
	t.exports = a, t.exports.ColSpanCell = o, t.exports.RowSpanCell = s;
})), Ie = /* @__PURE__ */ w(((e, t) => {
	var { warn: n, debug: r } = _e(), i = Fe(), { ColSpanCell: a, RowSpanCell: o } = i;
	(function() {
		function e(t, n) {
			return t[n] > 0 ? e(t, n + 1) : n;
		}
		function c(t) {
			let n = {};
			t.forEach(function(t, r) {
				let i = 0;
				t.forEach(function(t) {
					t.y = r, t.x = r ? e(n, i) : i;
					let a = t.rowSpan || 1, o = t.colSpan || 1;
					if (a > 1) for (let e = 0; e < o; e++) n[t.x + e] = a;
					i = t.x + o;
				}), Object.keys(n).forEach((e) => {
					n[e]--, n[e] < 1 && delete n[e];
				});
			});
		}
		function l(e) {
			let t = 0;
			return e.forEach(function(e) {
				e.forEach(function(e) {
					t = Math.max(t, e.x + (e.colSpan || 1));
				});
			}), t;
		}
		function u(e) {
			return e.length;
		}
		function d(e, t) {
			let n = e.y, r = e.y - 1 + (e.rowSpan || 1), i = t.y, a = !(n > t.y - 1 + (t.rowSpan || 1) || i > r), o = e.x, s = e.x - 1 + (e.colSpan || 1), c = t.x, l = !(o > t.x - 1 + (t.colSpan || 1) || c > s);
			return a && l;
		}
		function f(e, t, n) {
			let r = Math.min(e.length - 1, n), i = {
				x: t,
				y: n
			};
			for (let t = 0; t <= r; t++) {
				let n = e[t];
				for (let e = 0; e < n.length; e++) if (d(i, n[e])) return !0;
			}
			return !1;
		}
		function p(e, t, n, r) {
			for (let i = n; i < r; i++) if (f(e, i, t)) return !1;
			return !0;
		}
		function m(e) {
			e.forEach(function(t, n) {
				t.forEach(function(t) {
					for (let r = 1; r < t.rowSpan; r++) {
						let i = new o(t);
						i.x = t.x, i.y = t.y + r, i.colSpan = t.colSpan, g(i, e[n + r]);
					}
				});
			});
		}
		function h(e) {
			for (let t = e.length - 1; t >= 0; t--) {
				let n = e[t];
				for (let e = 0; e < n.length; e++) {
					let t = n[e];
					for (let r = 1; r < t.colSpan; r++) {
						let i = new a();
						i.x = t.x + r, i.y = t.y, n.splice(e + 1, 0, i);
					}
				}
			}
		}
		function g(e, t) {
			let n = 0;
			for (; n < t.length && t[n].x < e.x;) n++;
			t.splice(n, 0, e);
		}
		function _(e) {
			let t = u(e), a = l(e);
			r(`Max rows: ${t}; Max cols: ${a}`);
			for (let r = 0; r < t; r++) for (let o = 0; o < a; o++) if (!f(e, o, r)) {
				let s = {
					x: o,
					y: r,
					colSpan: 1,
					rowSpan: 1
				};
				for (o++; o < a && !f(e, o, r);) s.colSpan++, o++;
				let c = r + 1;
				for (; c < t && p(e, c, s.x, s.x + s.colSpan);) s.rowSpan++, c++;
				let l = new i(s);
				l.x = s.x, l.y = s.y, n(`Missing cell at ${l.y}-${l.x}.`), g(l, e[r]);
			}
		}
		function v(e) {
			return e.map(function(e) {
				if (!Array.isArray(e)) {
					let t = Object.keys(e)[0];
					e = e[t], Array.isArray(e) ? (e = e.slice(), e.unshift(t)) : e = [t, e];
				}
				return e.map(function(e) {
					return new i(e);
				});
			});
		}
		function y(e) {
			let t = v(e);
			return c(t), _(t), m(t), h(t), t;
		}
		t.exports = {
			makeTableLayout: y,
			layoutTable: c,
			addRowSpanCells: m,
			maxWidth: l,
			fillInTable: _,
			computeWidths: s("colSpan", "desiredWidth", "x", 1),
			computeHeights: s("rowSpan", "desiredHeight", "y", 1)
		};
	})();
	function s(e, t, n, r) {
		return function(i, a) {
			let o = [], s = [], c = {};
			a.forEach(function(i) {
				i.forEach(function(i) {
					(i[e] || 1) > 1 ? s.push(i) : o[i[n]] = Math.max(o[i[n]] || 0, i[t] || 0, r);
				});
			}), i.forEach(function(e, t) {
				typeof e == "number" && (o[t] = e);
			});
			for (let r = s.length - 1; r >= 0; r--) {
				let a = s[r], l = a[e], u = a[n], d = o[u], f = typeof i[u] == "number" ? 0 : 1;
				if (typeof d == "number") for (let e = 1; e < l; e++) d += 1 + o[u + e], typeof i[u + e] != "number" && f++;
				else d = t === "desiredWidth" ? a.desiredWidth - 1 : 1, (!c[u] || c[u] < d) && (c[u] = d);
				if (a[t] > d) {
					let e = 0;
					for (; f > 0 && a[t] > d;) {
						if (typeof i[u + e] != "number") {
							let n = Math.round((a[t] - d) / f);
							d += n, o[u + e] += n, f--;
						}
						e++;
					}
				}
			}
			Object.assign(i, o, c);
			for (let e = 0; e < i.length; e++) i[e] = Math.max(r, i[e] || 0);
		};
	}
})), Le = /* @__PURE__ */ w(((e, t) => {
	var n = _e(), r = Ce(), i = Ie(), a = class extends Array {
		constructor(e) {
			super();
			let t = r.mergeOptions(e);
			if (Object.defineProperty(this, "options", {
				value: t,
				enumerable: t.debug
			}), t.debug) {
				switch (typeof t.debug) {
					case "boolean":
						n.setDebugLevel(n.WARN);
						break;
					case "number":
						n.setDebugLevel(t.debug);
						break;
					case "string":
						n.setDebugLevel(parseInt(t.debug, 10));
						break;
					default: n.setDebugLevel(n.WARN), n.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof t.debug}`);
				}
				Object.defineProperty(this, "messages", { get() {
					return n.debugMessages();
				} });
			}
		}
		toString() {
			let e = this, t = this.options.head && this.options.head.length;
			t ? (e = [this.options.head], this.length && e.push.apply(e, this)) : this.options.style.head = [];
			let n = i.makeTableLayout(e);
			n.forEach(function(e) {
				e.forEach(function(e) {
					e.mergeTableOptions(this.options, n);
				}, this);
			}, this), i.computeWidths(this.options.colWidths, n), i.computeHeights(this.options.rowHeights, n), n.forEach(function(e) {
				e.forEach(function(e) {
					e.init(this.options);
				}, this);
			}, this);
			let r = [];
			for (let e = 0; e < n.length; e++) {
				let i = n[e], a = this.options.rowHeights[e];
				(e === 0 || !this.options.style.compact || e == 1 && t) && o(i, "top", r);
				for (let e = 0; e < a; e++) o(i, e, r);
				e + 1 == n.length && o(i, "bottom", r);
			}
			return r.join("\n");
		}
		get width() {
			return this.toString().split("\n")[0].length;
		}
	};
	a.reset = () => n.reset();
	function o(e, t, n) {
		let r = [];
		e.forEach(function(e) {
			r.push(e.draw(t));
		});
		let i = r.join("");
		i.length && n.push(i);
	}
	t.exports = a;
})), Re = /* @__PURE__ */ w(((e, t) => {
	t.exports = Le();
})), ze = /* @__PURE__ */ w(((e, t) => {
	var n = "2.0.0", r = 256;
	t.exports = {
		MAX_LENGTH: r,
		MAX_SAFE_COMPONENT_LENGTH: 16,
		MAX_SAFE_BUILD_LENGTH: r - 6,
		MAX_SAFE_INTEGER: 2 ** 53 - 1 || 9007199254740991,
		RELEASE_TYPES: [
			"major",
			"premajor",
			"minor",
			"preminor",
			"patch",
			"prepatch",
			"prerelease"
		],
		SEMVER_SPEC_VERSION: n,
		FLAG_INCLUDE_PRERELEASE: 1,
		FLAG_LOOSE: 2
	};
})), Be = /* @__PURE__ */ w(((e, t) => {
	t.exports = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...e) => console.error("SEMVER", ...e) : () => {};
})), Ve = /* @__PURE__ */ w(((e, t) => {
	var { MAX_SAFE_COMPONENT_LENGTH: n, MAX_SAFE_BUILD_LENGTH: r, MAX_LENGTH: i } = ze(), a = Be();
	e = t.exports = {};
	var o = e.re = [], s = e.safeRe = [], c = e.src = [], l = e.safeSrc = [], u = e.t = {}, d = 0, f = "[a-zA-Z0-9-]", p = [
		["\\s", 1],
		["\\d", i],
		[f, r]
	], m = (e) => {
		for (let [t, n] of p) e = e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);
		return e;
	}, h = (e, t, n) => {
		let r = m(t), i = d++;
		a(e, i, t), u[e] = i, c[i] = t, l[i] = r, o[i] = new RegExp(t, n ? "g" : void 0), s[i] = new RegExp(r, n ? "g" : void 0);
	};
	h("NUMERICIDENTIFIER", "0|[1-9]\\d*"), h("NUMERICIDENTIFIERLOOSE", "\\d+"), h("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${f}*`), h("MAINVERSION", `(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`), h("MAINVERSIONLOOSE", `(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`), h("PRERELEASEIDENTIFIER", `(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`), h("PRERELEASEIDENTIFIERLOOSE", `(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`), h("PRERELEASE", `(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`), h("PRERELEASELOOSE", `(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`), h("BUILDIDENTIFIER", `${f}+`), h("BUILD", `(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`), h("FULLPLAIN", `v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`), h("FULL", `^${c[u.FULLPLAIN]}$`), h("LOOSEPLAIN", `[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`), h("LOOSE", `^${c[u.LOOSEPLAIN]}$`), h("GTLT", "((?:<|>)?=?)"), h("XRANGEIDENTIFIERLOOSE", `${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), h("XRANGEIDENTIFIER", `${c[u.NUMERICIDENTIFIER]}|x|X|\\*`), h("XRANGEPLAIN", `[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`), h("XRANGEPLAINLOOSE", `[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`), h("XRANGE", `^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`), h("XRANGELOOSE", `^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`), h("COERCEPLAIN", `(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`), h("COERCE", `${c[u.COERCEPLAIN]}(?:$|[^\\d])`), h("COERCEFULL", c[u.COERCEPLAIN] + `(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`), h("COERCERTL", c[u.COERCE], !0), h("COERCERTLFULL", c[u.COERCEFULL], !0), h("LONETILDE", "(?:~>?)"), h("TILDETRIM", `(\\s*)${c[u.LONETILDE]}\\s+`, !0), e.tildeTrimReplace = "$1~", h("TILDE", `^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`), h("TILDELOOSE", `^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`), h("LONECARET", "(?:\\^)"), h("CARETTRIM", `(\\s*)${c[u.LONECARET]}\\s+`, !0), e.caretTrimReplace = "$1^", h("CARET", `^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`), h("CARETLOOSE", `^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`), h("COMPARATORLOOSE", `^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`), h("COMPARATOR", `^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`), h("COMPARATORTRIM", `(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`, !0), e.comparatorTrimReplace = "$1$2$3", h("HYPHENRANGE", `^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`), h("HYPHENRANGELOOSE", `^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`), h("STAR", "(<|>)?=?\\s*\\*"), h("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), h("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
})), He = /* @__PURE__ */ w(((e, t) => {
	var n = Object.freeze({ loose: !0 }), r = Object.freeze({});
	t.exports = (e) => e ? typeof e == "object" ? e : n : r;
})), Ue = /* @__PURE__ */ w(((e, t) => {
	var n = /^[0-9]+$/, r = (e, t) => {
		if (typeof e == "number" && typeof t == "number") return e === t ? 0 : e < t ? -1 : 1;
		let r = n.test(e), i = n.test(t);
		return r && i && (e = +e, t = +t), e === t ? 0 : r && !i ? -1 : i && !r ? 1 : e < t ? -1 : 1;
	};
	t.exports = {
		compareIdentifiers: r,
		rcompareIdentifiers: (e, t) => r(t, e)
	};
})), We = /* @__PURE__ */ w(((e, t) => {
	var n = Be(), { MAX_LENGTH: r, MAX_SAFE_INTEGER: i } = ze(), { safeRe: a, t: o } = Ve(), s = He(), { compareIdentifiers: c } = Ue(), l = (e, t) => {
		let n = t.split(".");
		if (n.length > e.length) return !1;
		for (let t = 0; t < n.length; t++) if (c(e[t], n[t]) !== 0) return !1;
		return !0;
	};
	t.exports = class e {
		constructor(t, c) {
			if (c = s(c), t instanceof e) {
				if (t.loose === !!c.loose && t.includePrerelease === !!c.includePrerelease) return t;
				t = t.version;
			} else if (typeof t != "string") throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);
			if (t.length > r) throw TypeError(`version is longer than ${r} characters`);
			n("SemVer", t, c), this.options = c, this.loose = !!c.loose, this.includePrerelease = !!c.includePrerelease;
			let l = t.trim().match(c.loose ? a[o.LOOSE] : a[o.FULL]);
			if (!l) throw TypeError(`Invalid Version: ${t}`);
			if (this.raw = t, this.major = +l[1], this.minor = +l[2], this.patch = +l[3], this.major > i || this.major < 0) throw TypeError("Invalid major version");
			if (this.minor > i || this.minor < 0) throw TypeError("Invalid minor version");
			if (this.patch > i || this.patch < 0) throw TypeError("Invalid patch version");
			l[4] ? this.prerelease = l[4].split(".").map((e) => {
				if (/^[0-9]+$/.test(e)) {
					let t = +e;
					if (t >= 0 && t < i) return t;
				}
				return e;
			}) : this.prerelease = [], this.build = l[5] ? l[5].split(".") : [], this.format();
		}
		format() {
			return this.version = `${this.major}.${this.minor}.${this.patch}`, this.prerelease.length && (this.version += `-${this.prerelease.join(".")}`), this.version;
		}
		toString() {
			return this.version;
		}
		compare(t) {
			if (n("SemVer.compare", this.version, this.options, t), !(t instanceof e)) {
				if (typeof t == "string" && t === this.version) return 0;
				t = new e(t, this.options);
			}
			return t.version === this.version ? 0 : this.compareMain(t) || this.comparePre(t);
		}
		compareMain(t) {
			return t instanceof e || (t = new e(t, this.options)), this.major < t.major ? -1 : this.major > t.major ? 1 : this.minor < t.minor ? -1 : this.minor > t.minor ? 1 : this.patch < t.patch ? -1 : +(this.patch > t.patch);
		}
		comparePre(t) {
			if (t instanceof e || (t = new e(t, this.options)), this.prerelease.length && !t.prerelease.length) return -1;
			if (!this.prerelease.length && t.prerelease.length) return 1;
			if (!this.prerelease.length && !t.prerelease.length) return 0;
			let r = 0;
			do {
				let e = this.prerelease[r], i = t.prerelease[r];
				if (n("prerelease compare", r, e, i), e === void 0 && i === void 0) return 0;
				if (i === void 0) return 1;
				if (e === void 0) return -1;
				if (e === i) continue;
				return c(e, i);
			} while (++r);
		}
		compareBuild(t) {
			t instanceof e || (t = new e(t, this.options));
			let r = 0;
			do {
				let e = this.build[r], i = t.build[r];
				if (n("build compare", r, e, i), e === void 0 && i === void 0) return 0;
				if (i === void 0) return 1;
				if (e === void 0) return -1;
				if (e === i) continue;
				return c(e, i);
			} while (++r);
		}
		inc(e, t, n) {
			if (e.startsWith("pre")) {
				if (!t && n === !1) throw Error("invalid increment argument: identifier is empty");
				if (t) {
					let e = `-${t}`.match(this.options.loose ? a[o.PRERELEASELOOSE] : a[o.PRERELEASE]);
					if (!e || e[1] !== t) throw Error(`invalid identifier: ${t}`);
				}
			}
			switch (e) {
				case "premajor":
					this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc("pre", t, n);
					break;
				case "preminor":
					this.prerelease.length = 0, this.patch = 0, this.minor++, this.inc("pre", t, n);
					break;
				case "prepatch":
					this.prerelease.length = 0, this.inc("patch", t, n), this.inc("pre", t, n);
					break;
				case "prerelease":
					this.prerelease.length === 0 && this.inc("patch", t, n), this.inc("pre", t, n);
					break;
				case "release":
					if (this.prerelease.length === 0) throw Error(`version ${this.raw} is not a prerelease`);
					this.prerelease.length = 0;
					break;
				case "major":
					(this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) && this.major++, this.minor = 0, this.patch = 0, this.prerelease = [];
					break;
				case "minor":
					(this.patch !== 0 || this.prerelease.length === 0) && this.minor++, this.patch = 0, this.prerelease = [];
					break;
				case "patch":
					this.prerelease.length === 0 && this.patch++, this.prerelease = [];
					break;
				case "pre": {
					let e = +!!Number(n);
					if (this.prerelease.length === 0) this.prerelease = [e];
					else {
						let r = this.prerelease.length;
						for (; --r >= 0;) typeof this.prerelease[r] == "number" && (this.prerelease[r]++, r = -2);
						if (r === -1) {
							if (t === this.prerelease.join(".") && n === !1) throw Error("invalid increment argument: identifier already exists");
							this.prerelease.push(e);
						}
					}
					if (t) {
						let r = [t, e];
						if (n === !1 && (r = [t]), l(this.prerelease, t)) {
							let e = this.prerelease[t.split(".").length];
							isNaN(e) && (this.prerelease = r);
						} else this.prerelease = r;
					}
					break;
				}
				default: throw Error(`invalid increment argument: ${e}`);
			}
			return this.raw = this.format(), this.build.length && (this.raw += `+${this.build.join(".")}`), this;
		}
	};
})), Ge = /* @__PURE__ */ w(((e, t) => {
	var n = We();
	t.exports = (e, t, r = !1) => {
		if (e instanceof n) return e;
		try {
			return new n(e, t);
		} catch (e) {
			if (!r) return null;
			throw e;
		}
	};
})), Ke = /* @__PURE__ */ w(((e, t) => {
	var n = Ge();
	t.exports = (e, t) => {
		let r = n(e, t);
		return r ? r.version : null;
	};
})), qe = /* @__PURE__ */ w(((e, t) => {
	var n = Ge();
	t.exports = (e, t) => {
		let r = n(e.trim().replace(/^[=v]+/, ""), t);
		return r ? r.version : null;
	};
})), Je = /* @__PURE__ */ w(((e, t) => {
	var n = We();
	t.exports = (e, t, r, i, a) => {
		typeof r == "string" && (a = i, i = r, r = void 0);
		try {
			return new n(e instanceof n ? e.version : e, r).inc(t, i, a).version;
		} catch {
			return null;
		}
	};
})), Ye = /* @__PURE__ */ w(((e, t) => {
	var n = Ge();
	t.exports = (e, t) => {
		let r = n(e, null, !0), i = n(t, null, !0), a = r.compare(i);
		if (a === 0) return null;
		let o = a > 0, s = o ? r : i, c = o ? i : r, l = !!s.prerelease.length;
		if (c.prerelease.length && !l) {
			if (!c.patch && !c.minor) return "major";
			if (c.compareMain(s) === 0) return c.minor && !c.patch ? "minor" : "patch";
		}
		let u = l ? "pre" : "";
		return r.major === i.major ? r.minor === i.minor ? r.patch === i.patch ? "prerelease" : u + "patch" : u + "minor" : u + "major";
	};
})), Xe = /* @__PURE__ */ w(((e, t) => {
	var n = We();
	t.exports = (e, t) => new n(e, t).major;
})), Ze = /* @__PURE__ */ w(((e, t) => {
	var n = We();
	t.exports = (e, t) => new n(e, t).minor;
})), Qe = /* @__PURE__ */ w(((e, t) => {
	var n = We();
	t.exports = (e, t) => new n(e, t).patch;
})), $e = /* @__PURE__ */ w(((e, t) => {
	var n = Ge();
	t.exports = (e, t) => {
		let r = n(e, t);
		return r && r.prerelease.length ? r.prerelease : null;
	};
})), et = /* @__PURE__ */ w(((e, t) => {
	var n = We();
	t.exports = (e, t, r) => new n(e, r).compare(new n(t, r));
})), tt = /* @__PURE__ */ w(((e, t) => {
	var n = et();
	t.exports = (e, t, r) => n(t, e, r);
})), nt = /* @__PURE__ */ w(((e, t) => {
	var n = et();
	t.exports = (e, t) => n(e, t, !0);
})), rt = /* @__PURE__ */ w(((e, t) => {
	var n = We();
	t.exports = (e, t, r) => {
		let i = new n(e, r), a = new n(t, r);
		return i.compare(a) || i.compareBuild(a);
	};
})), it = /* @__PURE__ */ w(((e, t) => {
	var n = rt();
	t.exports = (e, t) => e.sort((e, r) => n(e, r, t));
})), at = /* @__PURE__ */ w(((e, t) => {
	var n = rt();
	t.exports = (e, t) => e.sort((e, r) => n(r, e, t));
})), ot = /* @__PURE__ */ w(((e, t) => {
	var n = et();
	t.exports = (e, t, r) => n(e, t, r) > 0;
})), st = /* @__PURE__ */ w(((e, t) => {
	var n = et();
	t.exports = (e, t, r) => n(e, t, r) < 0;
})), ct = /* @__PURE__ */ w(((e, t) => {
	var n = et();
	t.exports = (e, t, r) => n(e, t, r) === 0;
})), lt = /* @__PURE__ */ w(((e, t) => {
	var n = et();
	t.exports = (e, t, r) => n(e, t, r) !== 0;
})), ut = /* @__PURE__ */ w(((e, t) => {
	var n = et();
	t.exports = (e, t, r) => n(e, t, r) >= 0;
})), dt = /* @__PURE__ */ w(((e, t) => {
	var n = et();
	t.exports = (e, t, r) => n(e, t, r) <= 0;
})), ft = /* @__PURE__ */ w(((e, t) => {
	var n = ct(), r = lt(), i = ot(), a = ut(), o = st(), s = dt();
	t.exports = (e, t, c, l) => {
		switch (t) {
			case "===": return typeof e == "object" && (e = e.version), typeof c == "object" && (c = c.version), e === c;
			case "!==": return typeof e == "object" && (e = e.version), typeof c == "object" && (c = c.version), e !== c;
			case "":
			case "=":
			case "==": return n(e, c, l);
			case "!=": return r(e, c, l);
			case ">": return i(e, c, l);
			case ">=": return a(e, c, l);
			case "<": return o(e, c, l);
			case "<=": return s(e, c, l);
			default: throw TypeError(`Invalid operator: ${t}`);
		}
	};
})), pt = /* @__PURE__ */ w(((e, t) => {
	var n = We(), r = Ge(), { safeRe: i, t: a } = Ve();
	t.exports = (e, t) => {
		if (e instanceof n) return e;
		if (typeof e == "number" && (e = String(e)), typeof e != "string") return null;
		t ||= {};
		let o = null;
		if (!t.rtl) o = e.match(t.includePrerelease ? i[a.COERCEFULL] : i[a.COERCE]);
		else {
			let n = t.includePrerelease ? i[a.COERCERTLFULL] : i[a.COERCERTL], r;
			for (; (r = n.exec(e)) && (!o || o.index + o[0].length !== e.length);) (!o || r.index + r[0].length !== o.index + o[0].length) && (o = r), n.lastIndex = r.index + r[1].length + r[2].length;
			n.lastIndex = -1;
		}
		if (o === null) return null;
		let s = o[2];
		return r(`${s}.${o[3] || "0"}.${o[4] || "0"}${t.includePrerelease && o[5] ? `-${o[5]}` : ""}${t.includePrerelease && o[6] ? `+${o[6]}` : ""}`, t);
	};
})), mt = /* @__PURE__ */ w(((e, t) => {
	var n = Ge(), r = ze(), i = We(), a = (e, t, n) => {
		if (!r.RELEASE_TYPES.includes(t)) return null;
		let i = o(e, n);
		return i && s(i, t);
	}, o = (e, t) => n(e instanceof i ? e.version : e, t), s = (e, t) => {
		if (c(t)) return e.version;
		switch (e.prerelease = [], t) {
			case "major":
				e.minor = 0, e.patch = 0;
				break;
			case "minor":
				e.patch = 0;
				break;
		}
		return e.format();
	}, c = (e) => e.startsWith("pre");
	t.exports = a;
})), ht = /* @__PURE__ */ w(((e, t) => {
	t.exports = class {
		constructor() {
			this.max = 1e3, this.map = /* @__PURE__ */ new Map();
		}
		get(e) {
			let t = this.map.get(e);
			if (t !== void 0) return this.map.delete(e), this.map.set(e, t), t;
		}
		delete(e) {
			return this.map.delete(e);
		}
		set(e, t) {
			if (!this.delete(e) && t !== void 0) {
				if (this.map.size >= this.max) {
					let e = this.map.keys().next().value;
					this.delete(e);
				}
				this.map.set(e, t);
			}
			return this;
		}
	};
})), gt = /* @__PURE__ */ w(((e, t) => {
	var n = /\s+/g;
	t.exports = class e {
		constructor(t, r) {
			if (r = i(r), t instanceof e) return t.loose === !!r.loose && t.includePrerelease === !!r.includePrerelease ? t : new e(t.raw, r);
			if (t instanceof a) return this.raw = t.value, this.set = [[t]], this.formatted = void 0, this;
			if (this.options = r, this.loose = !!r.loose, this.includePrerelease = !!r.includePrerelease, this.raw = t.trim().replace(n, " "), this.set = this.raw.split("||").map((e) => this.parseRange(e.trim())).filter((e) => e.length), !this.set.length) throw TypeError(`Invalid SemVer Range: ${this.raw}`);
			if (this.set.length > 1) {
				let e = this.set[0];
				if (this.set = this.set.filter((e) => !_(e[0])), this.set.length === 0) this.set = [e];
				else if (this.set.length > 1) {
					for (let e of this.set) if (e.length === 1 && v(e[0])) {
						this.set = [e];
						break;
					}
				}
			}
			this.formatted = void 0;
		}
		get range() {
			if (this.formatted === void 0) {
				this.formatted = "";
				for (let e = 0; e < this.set.length; e++) {
					e > 0 && (this.formatted += "||");
					let t = this.set[e];
					for (let e = 0; e < t.length; e++) e > 0 && (this.formatted += " "), this.formatted += t[e].toString().trim();
				}
			}
			return this.formatted;
		}
		format() {
			return this.range;
		}
		toString() {
			return this.range;
		}
		parseRange(e) {
			e = e.replace(g, "");
			let t = ((this.options.includePrerelease && m) | (this.options.loose && h)) + ":" + e, n = r.get(t);
			if (n) return n;
			let i = this.options.loose, s = i ? c[u.HYPHENRANGELOOSE] : c[u.HYPHENRANGE];
			e = e.replace(s, j(this.options.includePrerelease)), o("hyphen replace", e), e = e.replace(c[u.COMPARATORTRIM], d), o("comparator trim", e), e = e.replace(c[u.TILDETRIM], f), o("tilde trim", e), e = e.replace(c[u.CARETTRIM], p), o("caret trim", e);
			let l = e.split(" ").map((e) => b(e, this.options)).join(" ").split(/\s+/).map((e) => A(e, this.options));
			i && (l = l.filter((e) => (o("loose invalid filter", e, this.options), !!e.match(c[u.COMPARATORLOOSE])))), o("range list", l);
			let v = /* @__PURE__ */ new Map(), y = l.map((e) => new a(e, this.options));
			for (let e of y) {
				if (_(e)) return [e];
				v.set(e.value, e);
			}
			v.size > 1 && v.has("") && v.delete("");
			let x = [...v.values()];
			return r.set(t, x), x;
		}
		intersects(t, n) {
			if (!(t instanceof e)) throw TypeError("a Range is required");
			return this.set.some((e) => y(e, n) && t.set.some((t) => y(t, n) && e.every((e) => t.every((t) => e.intersects(t, n)))));
		}
		test(e) {
			if (!e) return !1;
			if (typeof e == "string") try {
				e = new s(e, this.options);
			} catch {
				return !1;
			}
			for (let t = 0; t < this.set.length; t++) if (M(this.set[t], e, this.options)) return !0;
			return !1;
		}
	};
	var r = new (ht())(), i = He(), a = _t(), o = Be(), s = We(), { safeRe: c, src: l, t: u, comparatorTrimReplace: d, tildeTrimReplace: f, caretTrimReplace: p } = Ve(), { FLAG_INCLUDE_PRERELEASE: m, FLAG_LOOSE: h } = ze(), g = new RegExp(l[u.BUILD], "g"), _ = (e) => e.value === "<0.0.0-0", v = (e) => e.value === "", y = (e, t) => {
		let n = !0, r = e.slice(), i = r.pop();
		for (; n && r.length;) n = r.every((e) => i.intersects(e, t)), i = r.pop();
		return n;
	}, b = (e, t) => (e = e.replace(c[u.BUILD], ""), o("comp", e, t), e = T(e, t), o("caret", e), e = C(e, t), o("tildes", e), e = D(e, t), o("xrange", e), e = k(e, t), o("stars", e), e), x = (e) => !e || e.toLowerCase() === "x" || e === "*", S = (e, t, n) => x(e) && !x(t) || x(t) && n && !x(n), C = (e, t) => e.trim().split(/\s+/).map((e) => w(e, t)).join(" "), w = (e, t) => {
		let n = t.loose ? c[u.TILDELOOSE] : c[u.TILDE], r = t.includePrerelease ? "-0" : "";
		return e.replace(n, (t, n, i, a, s) => {
			o("tilde", e, t, n, i, a, s);
			let c;
			return x(n) ? c = "" : x(i) ? c = `>=${n}.0.0${r} <${+n + 1}.0.0-0` : x(a) ? c = `>=${n}.${i}.0${r} <${n}.${+i + 1}.0-0` : s ? (o("replaceTilde pr", s), c = `>=${n}.${i}.${a}-${s} <${n}.${+i + 1}.0-0`) : c = `>=${n}.${i}.${a} <${n}.${+i + 1}.0-0`, o("tilde return", c), c;
		});
	}, T = (e, t) => e.trim().split(/\s+/).map((e) => E(e, t)).join(" "), E = (e, t) => {
		o("caret", e, t);
		let n = t.loose ? c[u.CARETLOOSE] : c[u.CARET], r = t.includePrerelease ? "-0" : "";
		return e.replace(n, (t, n, i, a, s) => {
			o("caret", e, t, n, i, a, s);
			let c;
			return x(n) ? c = "" : x(i) ? c = `>=${n}.0.0${r} <${+n + 1}.0.0-0` : x(a) ? c = n === "0" ? `>=${n}.${i}.0${r} <${n}.${+i + 1}.0-0` : `>=${n}.${i}.0${r} <${+n + 1}.0.0-0` : s ? (o("replaceCaret pr", s), c = n === "0" ? i === "0" ? `>=${n}.${i}.${a}-${s} <${n}.${i}.${+a + 1}-0` : `>=${n}.${i}.${a}-${s} <${n}.${+i + 1}.0-0` : `>=${n}.${i}.${a}-${s} <${+n + 1}.0.0-0`) : (o("no pr"), c = n === "0" ? i === "0" ? `>=${n}.${i}.${a} <${n}.${i}.${+a + 1}-0` : `>=${n}.${i}.${a} <${n}.${+i + 1}.0-0` : `>=${n}.${i}.${a} <${+n + 1}.0.0-0`), o("caret return", c), c;
		});
	}, D = (e, t) => (o("replaceXRanges", e, t), e.split(/\s+/).map((e) => O(e, t)).join(" ")), O = (e, t) => {
		e = e.trim();
		let n = t.loose ? c[u.XRANGELOOSE] : c[u.XRANGE];
		return e.replace(n, (n, r, i, a, s, c) => {
			if (o("xRange", e, n, r, i, a, s, c), S(i, a, s)) return e;
			let l = x(i), u = l || x(a), d = u || x(s), f = d;
			return r === "=" && f && (r = ""), c = t.includePrerelease ? "-0" : "", l ? n = r === ">" || r === "<" ? "<0.0.0-0" : "*" : r && f ? (u && (a = 0), s = 0, r === ">" ? (r = ">=", u ? (i = +i + 1, a = 0, s = 0) : (a = +a + 1, s = 0)) : r === "<=" && (r = "<", u ? i = +i + 1 : a = +a + 1), r === "<" && (c = "-0"), n = `${r + i}.${a}.${s}${c}`) : u ? n = `>=${i}.0.0${c} <${+i + 1}.0.0-0` : d && (n = `>=${i}.${a}.0${c} <${i}.${+a + 1}.0-0`), o("xRange return", n), n;
		});
	}, k = (e, t) => (o("replaceStars", e, t), e.trim().replace(c[u.STAR], "")), A = (e, t) => (o("replaceGTE0", e, t), e.trim().replace(c[t.includePrerelease ? u.GTE0PRE : u.GTE0], "")), j = (e) => (t, n, r, i, a, o, s, c, l, u, d, f) => (n = x(r) ? "" : x(i) ? `>=${r}.0.0${e ? "-0" : ""}` : x(a) ? `>=${r}.${i}.0${e ? "-0" : ""}` : o ? `>=${n}` : `>=${n}${e ? "-0" : ""}`, c = x(l) ? "" : x(u) ? `<${+l + 1}.0.0-0` : x(d) ? `<${l}.${+u + 1}.0-0` : f ? `<=${l}.${u}.${d}-${f}` : e ? `<${l}.${u}.${+d + 1}-0` : `<=${c}`, `${n} ${c}`.trim()), M = (e, t, n) => {
		for (let n = 0; n < e.length; n++) if (!e[n].test(t)) return !1;
		if (t.prerelease.length && !n.includePrerelease) {
			for (let n = 0; n < e.length; n++) if (o(e[n].semver), e[n].semver !== a.ANY && e[n].semver.prerelease.length > 0) {
				let r = e[n].semver;
				if (r.major === t.major && r.minor === t.minor && r.patch === t.patch) return !0;
			}
			return !1;
		}
		return !0;
	};
})), _t = /* @__PURE__ */ w(((e, t) => {
	var n = Symbol("SemVer ANY");
	t.exports = class e {
		static get ANY() {
			return n;
		}
		constructor(t, i) {
			if (i = r(i), t instanceof e) {
				if (t.loose === !!i.loose) return t;
				t = t.value;
			}
			t = t.trim().split(/\s+/).join(" "), s("comparator", t, i), this.options = i, this.loose = !!i.loose, this.parse(t), this.semver === n ? this.value = "" : this.value = this.operator + this.semver.version, s("comp", this);
		}
		parse(e) {
			let t = this.options.loose ? i[a.COMPARATORLOOSE] : i[a.COMPARATOR], r = e.match(t);
			if (!r) throw TypeError(`Invalid comparator: ${e}`);
			this.operator = r[1] === void 0 ? "" : r[1], this.operator === "=" && (this.operator = ""), r[2] ? this.semver = new c(r[2], this.options.loose) : this.semver = n;
		}
		toString() {
			return this.value;
		}
		test(e) {
			if (s("Comparator.test", e, this.options.loose), this.semver === n || e === n) return !0;
			if (typeof e == "string") try {
				e = new c(e, this.options);
			} catch {
				return !1;
			}
			return o(e, this.operator, this.semver, this.options);
		}
		intersects(t, n) {
			if (!(t instanceof e)) throw TypeError("a Comparator is required");
			return this.operator === "" ? this.value === "" ? !0 : new l(t.value, n).test(this.value) : t.operator === "" ? t.value === "" ? !0 : new l(this.value, n).test(t.semver) : (n = r(n), n.includePrerelease && (this.value === "<0.0.0-0" || t.value === "<0.0.0-0") || !n.includePrerelease && (this.value.startsWith("<0.0.0") || t.value.startsWith("<0.0.0")) ? !1 : !!(this.operator.startsWith(">") && t.operator.startsWith(">") || this.operator.startsWith("<") && t.operator.startsWith("<") || this.semver.version === t.semver.version && this.operator.includes("=") && t.operator.includes("=") || o(this.semver, "<", t.semver, n) && this.operator.startsWith(">") && t.operator.startsWith("<") || o(this.semver, ">", t.semver, n) && this.operator.startsWith("<") && t.operator.startsWith(">")));
		}
	};
	var r = He(), { safeRe: i, t: a } = Ve(), o = ft(), s = Be(), c = We(), l = gt();
})), vt = /* @__PURE__ */ w(((e, t) => {
	var n = gt();
	t.exports = (e, t, r) => {
		try {
			t = new n(t, r);
		} catch {
			return !1;
		}
		return t.test(e);
	};
})), yt = /* @__PURE__ */ w(((e, t) => {
	var n = gt();
	t.exports = (e, t) => new n(e, t).set.map((e) => e.map((e) => e.value).join(" ").trim().split(" "));
})), bt = /* @__PURE__ */ w(((e, t) => {
	var n = We(), r = gt();
	t.exports = (e, t, i) => {
		let a = null, o = null, s = null;
		try {
			s = new r(t, i);
		} catch {
			return null;
		}
		return e.forEach((e) => {
			s.test(e) && (!a || o.compare(e) === -1) && (a = e, o = new n(a, i));
		}), a;
	};
})), xt = /* @__PURE__ */ w(((e, t) => {
	var n = We(), r = gt();
	t.exports = (e, t, i) => {
		let a = null, o = null, s = null;
		try {
			s = new r(t, i);
		} catch {
			return null;
		}
		return e.forEach((e) => {
			s.test(e) && (!a || o.compare(e) === 1) && (a = e, o = new n(a, i));
		}), a;
	};
})), St = /* @__PURE__ */ w(((e, t) => {
	var n = We(), r = gt(), i = ot();
	t.exports = (e, t) => {
		e = new r(e, t);
		let a = new n("0.0.0");
		if (e.test(a) || (a = new n("0.0.0-0"), e.test(a))) return a;
		a = null;
		for (let t = 0; t < e.set.length; ++t) {
			let r = e.set[t], o = null;
			r.forEach((e) => {
				let t = new n(e.semver.version);
				switch (e.operator) {
					case ">": t.prerelease.length === 0 ? t.patch++ : t.prerelease.push(0), t.raw = t.format();
					case "":
					case ">=":
						(!o || i(t, o)) && (o = t);
						break;
					case "<":
					case "<=": break;
					/* istanbul ignore next */
					default: throw Error(`Unexpected operation: ${e.operator}`);
				}
			}), o && (!a || i(a, o)) && (a = o);
		}
		return a && e.test(a) ? a : null;
	};
})), Ct = /* @__PURE__ */ w(((e, t) => {
	var n = gt();
	t.exports = (e, t) => {
		try {
			return new n(e, t).range || "*";
		} catch {
			return null;
		}
	};
})), wt = /* @__PURE__ */ w(((e, t) => {
	var n = We(), r = _t(), { ANY: i } = r, a = gt(), o = vt(), s = ot(), c = st(), l = dt(), u = ut();
	t.exports = (e, t, d, f) => {
		e = new n(e, f), t = new a(t, f);
		let p, m, h, g, _;
		switch (d) {
			case ">":
				p = s, m = l, h = c, g = ">", _ = ">=";
				break;
			case "<":
				p = c, m = u, h = s, g = "<", _ = "<=";
				break;
			default: throw TypeError("Must provide a hilo val of \"<\" or \">\"");
		}
		if (o(e, t, f)) return !1;
		for (let n = 0; n < t.set.length; ++n) {
			let a = t.set[n], o = null, s = null;
			if (a.forEach((e) => {
				e.semver === i && (e = new r(">=0.0.0")), o ||= e, s ||= e, p(e.semver, o.semver, f) ? o = e : h(e.semver, s.semver, f) && (s = e);
			}), o.operator === g || o.operator === _ || (!s.operator || s.operator === g) && m(e, s.semver) || s.operator === _ && h(e, s.semver)) return !1;
		}
		return !0;
	};
})), Tt = /* @__PURE__ */ w(((e, t) => {
	var n = wt();
	t.exports = (e, t, r) => n(e, t, ">", r);
})), Et = /* @__PURE__ */ w(((e, t) => {
	var n = wt();
	t.exports = (e, t, r) => n(e, t, "<", r);
})), Dt = /* @__PURE__ */ w(((e, t) => {
	var n = gt();
	t.exports = (e, t, r) => (e = new n(e, r), t = new n(t, r), e.intersects(t, r));
})), Ot = /* @__PURE__ */ w(((e, t) => {
	var n = vt(), r = et();
	t.exports = (e, t, i) => {
		let a = [], o = null, s = null, c = e.sort((e, t) => r(e, t, i));
		for (let e of c) n(e, t, i) ? (s = e, o ||= e) : (s && a.push([o, s]), s = null, o = null);
		o && a.push([o, null]);
		let l = [];
		for (let [e, t] of a) e === t ? l.push(e) : !t && e === c[0] ? l.push("*") : t ? e === c[0] ? l.push(`<=${t}`) : l.push(`${e} - ${t}`) : l.push(`>=${e}`);
		let u = l.join(" || "), d = typeof t.raw == "string" ? t.raw : String(t);
		return u.length < d.length ? u : t;
	};
})), kt = /* @__PURE__ */ w(((e, t) => {
	var n = gt(), r = _t(), { ANY: i } = r, a = vt(), o = et(), s = (e, t, r = {}) => {
		if (e === t) return !0;
		e = new n(e, r), t = new n(t, r);
		let i = !1;
		OUTER: for (let n of e.set) {
			for (let e of t.set) {
				let t = u(n, e, r);
				if (i ||= t !== null, t) continue OUTER;
			}
			if (i) return !1;
		}
		return !0;
	}, c = [new r(">=0.0.0-0")], l = [new r(">=0.0.0")], u = (e, t, n) => {
		if (e === t) return !0;
		if (e.length === 1 && e[0].semver === i) {
			if (t.length === 1 && t[0].semver === i) return !0;
			e = n.includePrerelease ? c : l;
		}
		if (t.length === 1 && t[0].semver === i) {
			if (n.includePrerelease) return !0;
			t = l;
		}
		let r = /* @__PURE__ */ new Set(), s, u;
		for (let t of e) t.operator === ">" || t.operator === ">=" ? s = d(s, t, n) : t.operator === "<" || t.operator === "<=" ? u = f(u, t, n) : r.add(t.semver);
		if (r.size > 1) return null;
		let p;
		if (s && u && (p = o(s.semver, u.semver, n), p > 0 || p === 0 && (s.operator !== ">=" || u.operator !== "<="))) return null;
		for (let e of r) {
			if (s && !a(e, String(s), n) || u && !a(e, String(u), n)) return null;
			for (let r of t) if (!a(e, String(r), n)) return !1;
			return !0;
		}
		let m, h, g, _, v = u && !n.includePrerelease && u.semver.prerelease.length ? u.semver : !1, y = s && !n.includePrerelease && s.semver.prerelease.length ? s.semver : !1;
		v && v.prerelease.length === 1 && u.operator === "<" && v.prerelease[0] === 0 && (v = !1);
		for (let e of t) {
			if (_ = _ || e.operator === ">" || e.operator === ">=", g = g || e.operator === "<" || e.operator === "<=", s) {
				if (y && e.semver.prerelease && e.semver.prerelease.length && e.semver.major === y.major && e.semver.minor === y.minor && e.semver.patch === y.patch && (y = !1), e.operator === ">" || e.operator === ">=") {
					if (m = d(s, e, n), m === e && m !== s) return !1;
				} else if (s.operator === ">=" && !e.test(s.semver)) return !1;
			}
			if (u) {
				if (v && e.semver.prerelease && e.semver.prerelease.length && e.semver.major === v.major && e.semver.minor === v.minor && e.semver.patch === v.patch && (v = !1), e.operator === "<" || e.operator === "<=") {
					if (h = f(u, e, n), h === e && h !== u) return !1;
				} else if (u.operator === "<=" && !e.test(u.semver)) return !1;
			}
			if (!e.operator && (u || s) && p !== 0) return !1;
		}
		return !(s && g && !u && p !== 0 || u && _ && !s && p !== 0 || y || v);
	}, d = (e, t, n) => {
		if (!e) return t;
		let r = o(e.semver, t.semver, n);
		return r > 0 ? e : r < 0 || t.operator === ">" && e.operator === ">=" ? t : e;
	}, f = (e, t, n) => {
		if (!e) return t;
		let r = o(e.semver, t.semver, n);
		return r < 0 ? e : r > 0 || t.operator === "<" && e.operator === "<=" ? t : e;
	};
	t.exports = s;
})), At = /* @__PURE__ */ w(((e, t) => {
	var n = Ve(), r = ze(), i = We(), a = Ue();
	t.exports = {
		parse: Ge(),
		valid: Ke(),
		clean: qe(),
		inc: Je(),
		diff: Ye(),
		major: Xe(),
		minor: Ze(),
		patch: Qe(),
		prerelease: $e(),
		compare: et(),
		rcompare: tt(),
		compareLoose: nt(),
		compareBuild: rt(),
		sort: it(),
		rsort: at(),
		gt: ot(),
		lt: st(),
		eq: ct(),
		neq: lt(),
		gte: ut(),
		lte: dt(),
		cmp: ft(),
		coerce: pt(),
		truncate: mt(),
		Comparator: _t(),
		Range: gt(),
		satisfies: vt(),
		toComparators: yt(),
		maxSatisfying: bt(),
		minSatisfying: xt(),
		minVersion: St(),
		validRange: Ct(),
		outside: wt(),
		gtr: Tt(),
		ltr: Et(),
		intersects: Dt(),
		simplifyRange: Ot(),
		subset: kt(),
		SemVer: i,
		re: n.re,
		src: n.src,
		tokens: n.t,
		SEMVER_SPEC_VERSION: r.SEMVER_SPEC_VERSION,
		RELEASE_TYPES: r.RELEASE_TYPES,
		compareIdentifiers: a.compareIdentifiers,
		rcompareIdentifiers: a.rcompareIdentifiers
	};
})), jt = /* @__PURE__ */ D(Re(), 1), Y = /* @__PURE__ */ D(At(), 1), Mt = [
	"second",
	"minute",
	"hour",
	"day",
	"week",
	"month",
	"year"
];
function Nt(e, t) {
	if (t === 0) return ["just now", "right now"];
	var n = Mt[Math.floor(t / 2)];
	return e > 1 && (n += "s"), [e + " " + n + " ago", "in " + e + " " + n];
}
//#endregion
//#region node_modules/timeago.js/esm/lang/zh_CN.js
var Pt = [
	"秒",
	"分钟",
	"小时",
	"天",
	"周",
	"个月",
	"年"
];
function Ft(e, t) {
	if (t === 0) return ["刚刚", "片刻后"];
	var n = Pt[~~(t / 2)];
	return [e + " " + n + "前", e + " " + n + "后"];
}
//#endregion
//#region node_modules/timeago.js/esm/register.js
var It = {}, Lt = function(e, t) {
	It[e] = t;
}, Rt = function(e) {
	return It[e] || It.en_US;
}, zt = [
	60,
	60,
	24,
	7,
	365 / 7 / 12,
	12
];
function Bt(e) {
	return e instanceof Date ? e : !isNaN(e) || /^\d+$/.test(e) ? new Date(parseInt(e)) : (e = (e || "").trim().replace(/\.\d+/, "").replace(/-/, "/").replace(/-/, "/").replace(/(\d)T(\d)/, "$1 $2").replace(/Z/, " UTC").replace(/([+-]\d\d):?(\d\d)/, " $1$2"), new Date(e));
}
function Vt(e, t) {
	var n = +(e < 0);
	e = Math.abs(e);
	for (var r = e, i = 0; e >= zt[i] && i < zt.length; i++) e /= zt[i];
	return e = Math.floor(e), i *= 2, e > (i === 0 ? 9 : 1) && (i += 1), t(e, i, r)[n].replace("%s", e.toString());
}
function Ht(e, t) {
	return ((t ? Bt(t) : /* @__PURE__ */ new Date()) - +Bt(e)) / 1e3;
}
//#endregion
//#region node_modules/timeago.js/esm/format.js
var Ut = function(e, t, n) {
	return Vt(Ht(e, n && n.relativeDate), Rt(t));
};
Lt("en_US", Nt), Lt("zh_CN", Ft);
//#endregion
//#region node_modules/chalk/source/vendor/ansi-styles/index.js
var Wt = 10, Gt = (e = 0) => (t) => `\u001B[${t + e}m`, Kt = (e = 0) => (t) => `\u001B[${38 + e};5;${t}m`, qt = (e = 0) => (t, n, r) => `\u001B[${38 + e};2;${t};${n};${r}m`, Jt = {
	modifier: {
		reset: [0, 0],
		bold: [1, 22],
		dim: [2, 22],
		italic: [3, 23],
		underline: [4, 24],
		overline: [53, 55],
		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],
		blackBright: [90, 39],
		gray: [90, 39],
		grey: [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],
		bgGray: [100, 49],
		bgGrey: [100, 49],
		bgRedBright: [101, 49],
		bgGreenBright: [102, 49],
		bgYellowBright: [103, 49],
		bgBlueBright: [104, 49],
		bgMagentaBright: [105, 49],
		bgCyanBright: [106, 49],
		bgWhiteBright: [107, 49]
	}
};
Object.keys(Jt.modifier);
var Yt = Object.keys(Jt.color), Xt = Object.keys(Jt.bgColor);
[...Yt, ...Xt];
function Zt() {
	let e = /* @__PURE__ */ new Map();
	for (let [t, n] of Object.entries(Jt)) {
		for (let [t, r] of Object.entries(n)) Jt[t] = {
			open: `\u001B[${r[0]}m`,
			close: `\u001B[${r[1]}m`
		}, n[t] = Jt[t], e.set(r[0], r[1]);
		Object.defineProperty(Jt, t, {
			value: n,
			enumerable: !1
		});
	}
	return Object.defineProperty(Jt, "codes", {
		value: e,
		enumerable: !1
	}), Jt.color.close = "\x1B[39m", Jt.bgColor.close = "\x1B[49m", Jt.color.ansi = Gt(), Jt.color.ansi256 = Kt(), Jt.color.ansi16m = qt(), Jt.bgColor.ansi = Gt(Wt), Jt.bgColor.ansi256 = Kt(Wt), Jt.bgColor.ansi16m = qt(Wt), Object.defineProperties(Jt, {
		rgbToAnsi256: {
			value(e, t, n) {
				return e === t && t === n ? e < 8 ? 16 : e > 248 ? 231 : Math.round((e - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(e / 255 * 5) + 6 * Math.round(t / 255 * 5) + Math.round(n / 255 * 5);
			},
			enumerable: !1
		},
		hexToRgb: {
			value(e) {
				let t = /[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));
				if (!t) return [
					0,
					0,
					0
				];
				let [n] = t;
				n.length === 3 && (n = [...n].map((e) => e + e).join(""));
				let r = Number.parseInt(n, 16);
				return [
					r >> 16 & 255,
					r >> 8 & 255,
					r & 255
				];
			},
			enumerable: !1
		},
		hexToAnsi256: {
			value: (e) => Jt.rgbToAnsi256(...Jt.hexToRgb(e)),
			enumerable: !1
		},
		ansi256ToAnsi: {
			value(e) {
				if (e < 8) return 30 + e;
				if (e < 16) return 90 + (e - 8);
				let t, n, r;
				if (e >= 232) t = ((e - 232) * 10 + 8) / 255, n = t, r = t;
				else {
					e -= 16;
					let i = e % 36;
					t = Math.floor(e / 36) / 5, n = Math.floor(i / 6) / 5, r = i % 6 / 5;
				}
				let i = Math.max(t, n, r) * 2;
				if (i === 0) return 30;
				let a = 30 + (Math.round(r) << 2 | Math.round(n) << 1 | Math.round(t));
				return i === 2 && (a += 60), a;
			},
			enumerable: !1
		},
		rgbToAnsi: {
			value: (e, t, n) => Jt.ansi256ToAnsi(Jt.rgbToAnsi256(e, t, n)),
			enumerable: !1
		},
		hexToAnsi: {
			value: (e) => Jt.ansi256ToAnsi(Jt.hexToAnsi256(e)),
			enumerable: !1
		}
	}), Jt;
}
var Qt = Zt();
//#endregion
//#region node_modules/chalk/source/vendor/supports-color/index.js
function $t(e, t = globalThis.Deno ? globalThis.Deno.args : i.argv) {
	let n = e.startsWith("-") ? "" : e.length === 1 ? "-" : "--", r = t.indexOf(n + e), a = t.indexOf("--");
	return r !== -1 && (a === -1 || r < a);
}
var { env: en } = i, tn;
$t("no-color") || $t("no-colors") || $t("color=false") || $t("color=never") ? tn = 0 : ($t("color") || $t("colors") || $t("color=true") || $t("color=always")) && (tn = 1);
function nn() {
	if ("FORCE_COLOR" in en) return en.FORCE_COLOR === "true" ? 1 : en.FORCE_COLOR === "false" ? 0 : en.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(en.FORCE_COLOR, 10), 3);
}
function rn(e) {
	return e === 0 ? !1 : {
		level: e,
		hasBasic: !0,
		has256: e >= 2,
		has16m: e >= 3
	};
}
function an(e, { streamIsTTY: t, sniffFlags: n = !0 } = {}) {
	let a = nn();
	a !== void 0 && (tn = a);
	let o = n ? tn : a;
	if (o === 0) return 0;
	if (n) {
		if ($t("color=16m") || $t("color=full") || $t("color=truecolor")) return 3;
		if ($t("color=256")) return 2;
	}
	if ("TF_BUILD" in en && "AGENT_NAME" in en) return 1;
	if (e && !t && o === void 0) return 0;
	let s = o || 0;
	if (en.TERM === "dumb") return s;
	if (i.platform === "win32") {
		let e = r.release().split(".");
		return Number(e[0]) >= 10 && Number(e[2]) >= 10586 ? Number(e[2]) >= 14931 ? 3 : 2 : 1;
	}
	if ("CI" in en) return [
		"GITHUB_ACTIONS",
		"GITEA_ACTIONS",
		"CIRCLECI"
	].some((e) => e in en) ? 3 : [
		"TRAVIS",
		"APPVEYOR",
		"GITLAB_CI",
		"BUILDKITE",
		"DRONE"
	].some((e) => e in en) || en.CI_NAME === "codeship" ? 1 : s;
	if ("TEAMCITY_VERSION" in en) return +!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(en.TEAMCITY_VERSION);
	if (en.COLORTERM === "truecolor" || en.TERM === "xterm-kitty" || en.TERM === "xterm-ghostty" || en.TERM === "wezterm") return 3;
	if ("TERM_PROGRAM" in en) {
		let e = Number.parseInt((en.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
		switch (en.TERM_PROGRAM) {
			case "iTerm.app": return e >= 3 ? 3 : 2;
			case "Apple_Terminal": return 2;
		}
	}
	return /-256(color)?$/i.test(en.TERM) ? 2 : /^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(en.TERM) || "COLORTERM" in en ? 1 : s;
}
function on(e, t = {}) {
	return rn(an(e, {
		streamIsTTY: e && e.isTTY,
		...t
	}));
}
var sn = {
	stdout: on({ isTTY: a.isatty(1) }),
	stderr: on({ isTTY: a.isatty(2) })
};
//#endregion
//#region node_modules/chalk/source/utilities.js
function cn(e, t, n) {
	let r = e.indexOf(t);
	if (r === -1) return e;
	let i = t.length, a = 0, o = "";
	do
		o += e.slice(a, r) + t + n, a = r + i, r = e.indexOf(t, a);
	while (r !== -1);
	return o += e.slice(a), o;
}
function ln(e, t, n, r) {
	let i = 0, a = "";
	do {
		let o = e[r - 1] === "\r";
		a += e.slice(i, o ? r - 1 : r) + t + (o ? "\r\n" : "\n") + n, i = r + 1, r = e.indexOf("\n", i);
	} while (r !== -1);
	return a += e.slice(i), a;
}
//#endregion
//#region node_modules/chalk/source/index.js
var { stdout: un, stderr: dn } = sn, fn = Symbol("GENERATOR"), pn = Symbol("STYLER"), mn = Symbol("IS_EMPTY"), hn = [
	"ansi",
	"ansi",
	"ansi256",
	"ansi16m"
], gn = Object.create(null), _n = (e, t = {}) => {
	if (t.level && !(Number.isInteger(t.level) && t.level >= 0 && t.level <= 3)) throw Error("The `level` option should be an integer from 0 to 3");
	let n = un ? un.level : 0;
	e.level = t.level === void 0 ? n : t.level;
}, vn = class {
	constructor(e) {
		return yn(e);
	}
}, yn = (e) => {
	let t = (...e) => e.join(" ");
	return _n(t, e), Object.setPrototypeOf(t, bn.prototype), t;
};
function bn(e) {
	return yn(e);
}
Object.setPrototypeOf(bn.prototype, Function.prototype);
for (let [e, t] of Object.entries(Qt)) gn[e] = { get() {
	let n = wn(this, Cn(t.open, t.close, this[pn]), this[mn]);
	return Object.defineProperty(this, e, { value: n }), n;
} };
gn.visible = { get() {
	let e = wn(this, this[pn], !0);
	return Object.defineProperty(this, "visible", { value: e }), e;
} };
var xn = (e, t, n, ...r) => e === "rgb" ? t === "ansi16m" ? Qt[n].ansi16m(...r) : t === "ansi256" ? Qt[n].ansi256(Qt.rgbToAnsi256(...r)) : Qt[n].ansi(Qt.rgbToAnsi(...r)) : e === "hex" ? xn("rgb", t, n, ...Qt.hexToRgb(...r)) : Qt[n][e](...r);
for (let e of [
	"rgb",
	"hex",
	"ansi256"
]) {
	gn[e] = { get() {
		let { level: t } = this;
		return function(...n) {
			let r = Cn(xn(e, hn[t], "color", ...n), Qt.color.close, this[pn]);
			return wn(this, r, this[mn]);
		};
	} };
	let t = "bg" + e[0].toUpperCase() + e.slice(1);
	gn[t] = { get() {
		let { level: t } = this;
		return function(...n) {
			let r = Cn(xn(e, hn[t], "bgColor", ...n), Qt.bgColor.close, this[pn]);
			return wn(this, r, this[mn]);
		};
	} };
}
var Sn = Object.defineProperties(() => {}, {
	...gn,
	level: {
		enumerable: !0,
		get() {
			return this[fn].level;
		},
		set(e) {
			this[fn].level = e;
		}
	}
}), Cn = (e, t, n) => {
	let r, i;
	return n === void 0 ? (r = e, i = t) : (r = n.openAll + e, i = t + n.closeAll), {
		open: e,
		close: t,
		openAll: r,
		closeAll: i,
		parent: n
	};
}, wn = (e, t, n) => {
	let r = (...e) => Tn(r, e.length === 1 ? "" + e[0] : e.join(" "));
	return Object.setPrototypeOf(r, Sn), r[fn] = e, r[pn] = t, r[mn] = n, r;
}, Tn = (e, t) => {
	if (e.level <= 0 || !t) return e[mn] ? "" : t;
	let n = e[pn];
	if (n === void 0) return t;
	let { openAll: r, closeAll: i } = n;
	if (t.includes("\x1B")) for (; n !== void 0;) t = cn(t, n.close, n.open), n = n.parent;
	let a = t.indexOf("\n");
	return a !== -1 && (t = ln(t, i, r, a)), r + t + i;
};
Object.defineProperties(bn.prototype, gn);
var En = bn();
bn({ level: dn ? dn.level : 0 });
//#endregion
//#region src/lib/keyValueBy.ts
function Dn(e, t, n = {}) {
	let r = Array.isArray(e);
	return t ||= ((e) => ({ [e]: !0 })), Object.entries(e || {}).forEach(([e, i], a) => {
		let o = r ? t(i, a, n) : t(e, i, n);
		for (let [e, t] of Object.entries(o || {})) n[e] = t;
	}), n;
}
//#endregion
//#region src/lib/chalk.ts
var On = {
	blue: !0,
	bold: !0,
	cyan: !0,
	dim: !0,
	gray: !0,
	green: !0,
	magenta: !0,
	red: !0,
	reset: !0,
	underline: !0,
	yellow: !0
}, kn = Dn(On, (e) => ({ [e]: Object.assign((e) => e.toString(), {
	bold: (e) => e.toString(),
	underline: (e) => e.toString()
}) })), An, jn = (e) => e === !0 ? new vn({ level: 1 }) : e === null ? kn : En, Mn = (e) => {
	An = jn(e);
}, Nn = () => {
	if (!An) throw Error("Chalk has not been imported yet.");
}, X = Dn(On, (e) => {
	let t = (t) => (Nn(), An[e](t));
	return t.bold = (t) => (Nn(), An[e].bold(t)), t.underline = (t) => (Nn(), An[e].underline(t)), { [e]: t };
}), Pn = (e, t) => Dn(e, (e, n) => t(e, n) ? { [e]: n } : null), Fn = async (e) => {
	try {
		return await n.stat(e), !0;
	} catch {
		return !1;
	}
}, In = e(import.meta.url);
async function Ln(e, { pkgFile: r } = {}) {
	let i = In.resolve.paths(e) || [], a = r ? [t.join(t.dirname(r), "node_modules")] : [], o = [t.join(process.cwd(), "node_modules")], s = [
		...a,
		...o,
		...i
	];
	for (let r of s) {
		let i = t.join(r, e, "package.json");
		if (await Fn(i)) try {
			return JSON.parse(await n.readFile(i, "utf-8"));
		} catch {}
	}
	return null;
}
//#endregion
//#region src/lib/getPackageVersion.ts
async function Rn(e, t, { pkgFile: n } = {}) {
	return t ? t.version : (await Ln(e, { pkgFile: n }))?.version ?? null;
}
//#endregion
//#region node_modules/lru-cache/dist/commonjs/node/index.min.js
var zn = /* @__PURE__ */ w(((e) => {
	var t = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), n = t((e) => {
		Object.defineProperty(e, "__esModule", { value: !0 }), e.tracing = e.metrics = void 0;
		var t = k("node:diagnostics_channel");
		e.metrics = (0, t.channel)("lru-cache:metrics"), e.tracing = (0, t.tracingChannel)("lru-cache");
	}), r = t((e) => {
		Object.defineProperty(e, "__esModule", { value: !0 }), e.defaultPerf = void 0, e.defaultPerf = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date;
	});
	Object.defineProperty(e, "__esModule", { value: !0 }), e.LRUCache = void 0;
	var i = n(), a = r(), o = () => i.metrics.hasSubscribers || i.tracing.hasSubscribers, s = /* @__PURE__ */ new Set(), c = typeof process == "object" && process ? process : {}, l = (e, t, n, r) => {
		typeof c.emitWarning == "function" ? c.emitWarning(e, t, n, r) : console.error(`[${n}] ${t}: ${e}`);
	}, u = (e) => !s.has(e), d = (e) => !!e && e === Math.floor(e) && e > 0 && isFinite(e), f = (e) => d(e) ? e <= 2 ** 8 ? Uint8Array : e <= 2 ** 16 ? Uint16Array : e <= 2 ** 32 ? Uint32Array : e <= 2 ** 53 - 1 ? p : null : null, p = class extends Array {
		constructor(e) {
			super(e), this.fill(0);
		}
	}, m = class e {
		heap;
		length;
		static #e = !1;
		static create(t) {
			let n = f(t);
			if (!n) return [];
			e.#e = !0;
			let r = new e(t, n);
			return e.#e = !1, r;
		}
		constructor(t, n) {
			if (!e.#e) throw TypeError("instantiate Stack using Stack.create(n)");
			this.heap = new n(t), this.length = 0;
		}
		push(e) {
			this.heap[this.length++] = e;
		}
		pop() {
			return this.heap[--this.length];
		}
	};
	e.LRUCache = class e {
		#e;
		#t;
		#n;
		#r;
		#i;
		#a;
		#o;
		#s;
		get perf() {
			return this.#s;
		}
		ttl;
		ttlResolution;
		ttlAutopurge;
		updateAgeOnGet;
		updateAgeOnHas;
		allowStale;
		noDisposeOnSet;
		noUpdateTTL;
		maxEntrySize;
		sizeCalculation;
		noDeleteOnFetchRejection;
		noDeleteOnStaleGet;
		allowStaleOnFetchAbort;
		allowStaleOnFetchRejection;
		ignoreFetchAbort;
		backgroundFetchSize;
		#c;
		#l;
		#u;
		#d;
		#f;
		#p;
		#m;
		#h;
		#g;
		#_;
		#v;
		#y;
		#b;
		#x;
		#S;
		#C;
		#w;
		#T;
		#E;
		static unsafeExposeInternals(e) {
			return {
				starts: e.#b,
				ttls: e.#x,
				autopurgeTimers: e.#S,
				sizes: e.#y,
				keyMap: e.#u,
				keyList: e.#d,
				valList: e.#f,
				next: e.#p,
				prev: e.#m,
				get head() {
					return e.#h;
				},
				get tail() {
					return e.#g;
				},
				free: e.#_,
				isBackgroundFetch: (t) => e.#W(t),
				backgroundFetch: (t, n, r, i) => e.#U(t, n, r, i),
				moveToTail: (t) => e.#X(t),
				indexes: (t) => e.#I(t),
				rindexes: (t) => e.#L(t),
				isStale: (t) => e.#j(t)
			};
		}
		get max() {
			return this.#e;
		}
		get maxSize() {
			return this.#t;
		}
		get calculatedSize() {
			return this.#l;
		}
		get size() {
			return this.#c;
		}
		get fetchMethod() {
			return this.#a;
		}
		get memoMethod() {
			return this.#o;
		}
		get dispose() {
			return this.#n;
		}
		get onInsert() {
			return this.#r;
		}
		get disposeAfter() {
			return this.#i;
		}
		constructor(t) {
			let { max: n = 0, ttl: r, ttlResolution: i = 1, ttlAutopurge: o, updateAgeOnGet: c, updateAgeOnHas: p, allowStale: h, dispose: g, onInsert: _, disposeAfter: v, noDisposeOnSet: y, noUpdateTTL: b, maxSize: x = 0, maxEntrySize: S = 0, sizeCalculation: C, fetchMethod: w, memoMethod: T, noDeleteOnFetchRejection: E, noDeleteOnStaleGet: D, allowStaleOnFetchRejection: O, allowStaleOnFetchAbort: k, ignoreFetchAbort: A, backgroundFetchSize: j = 1, perf: M } = t;
			if (this.backgroundFetchSize = j, M !== void 0 && typeof M?.now != "function") throw TypeError("perf option must have a now() method if specified");
			if (this.#s = M ?? a.defaultPerf, n !== 0 && !d(n)) throw TypeError("max option must be a nonnegative integer");
			let N = n ? f(n) : Array;
			if (!N) throw Error("invalid max value: " + n);
			if (this.#e = n, this.#t = x, this.maxEntrySize = S || this.#t, this.sizeCalculation = C, this.sizeCalculation) {
				if (!this.#t && !this.maxEntrySize) throw TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
				if (typeof this.sizeCalculation != "function") throw TypeError("sizeCalculation set to non-function");
			}
			if (T !== void 0 && typeof T != "function") throw TypeError("memoMethod must be a function if defined");
			if (this.#o = T, w !== void 0 && typeof w != "function") throw TypeError("fetchMethod must be a function if specified");
			if (this.#a = w, this.#w = !!w, this.#u = /* @__PURE__ */ new Map(), this.#d = Array.from({ length: n }).fill(void 0), this.#f = Array.from({ length: n }).fill(void 0), this.#p = new N(n), this.#m = new N(n), this.#h = 0, this.#g = 0, this.#_ = m.create(n), this.#c = 0, this.#l = 0, typeof g == "function" && (this.#n = g), typeof _ == "function" && (this.#r = _), typeof v == "function" ? (this.#i = v, this.#v = []) : (this.#i = void 0, this.#v = void 0), this.#C = !!this.#n, this.#E = !!this.#r, this.#T = !!this.#i, this.noDisposeOnSet = !!y, this.noUpdateTTL = !!b, this.noDeleteOnFetchRejection = !!E, this.allowStaleOnFetchRejection = !!O, this.allowStaleOnFetchAbort = !!k, this.ignoreFetchAbort = !!A, this.maxEntrySize !== 0) {
				if (this.#t !== 0 && !d(this.#t)) throw TypeError("maxSize must be a positive integer if specified");
				if (!d(this.maxEntrySize)) throw TypeError("maxEntrySize must be a positive integer if specified");
				this.#M();
			}
			if (this.allowStale = !!h, this.noDeleteOnStaleGet = !!D, this.updateAgeOnGet = !!c, this.updateAgeOnHas = !!p, this.ttlResolution = d(i) || i === 0 ? i : 1, this.ttlAutopurge = !!o, this.ttl = r || 0, this.ttl) {
				if (!d(this.ttl)) throw TypeError("ttl must be a positive integer if specified");
				this.#D();
			}
			if (this.#e === 0 && this.ttl === 0 && this.#t === 0) throw TypeError("At least one of max, maxSize, or ttl is required");
			if (!this.ttlAutopurge && !this.#e && !this.#t) {
				let t = "LRU_CACHE_UNBOUNDED";
				u(t) && (s.add(t), l("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", t, e));
			}
		}
		getRemainingTTL(e) {
			return this.#u.has(e) ? Infinity : 0;
		}
		#D() {
			let e = new p(this.#e), t = new p(this.#e);
			this.#x = e, this.#b = t;
			let n = this.ttlAutopurge ? Array.from({ length: this.#e }) : void 0;
			this.#S = n, this.#A = (n, i, a = this.#s.now()) => {
				t[n] = i === 0 ? 0 : a, e[n] = i, r(n, i);
			}, this.#O = (n) => {
				t[n] = e[n] === 0 ? 0 : this.#s.now(), r(n, e[n]);
			};
			let r = this.ttlAutopurge ? (e, t) => {
				if (n?.[e] && (clearTimeout(n[e]), n[e] = void 0), t && t !== 0 && n) {
					let r = setTimeout(() => {
						this.#j(e) && this.#Z(this.#d[e], "expire");
					}, t + 1);
					r.unref && r.unref(), n[e] = r;
				}
			} : () => {};
			this.#k = (n, r) => {
				if (e[r]) {
					let o = e[r], s = t[r];
					if (!o || !s) return;
					n.ttl = o, n.start = s, n.now = i || a(), n.remainingTTL = o - (n.now - s);
				}
			};
			let i = 0, a = () => {
				let e = this.#s.now();
				if (this.ttlResolution > 0) {
					i = e;
					let t = setTimeout(() => i = 0, this.ttlResolution);
					t.unref && t.unref();
				}
				return e;
			};
			this.getRemainingTTL = (n) => {
				let r = this.#u.get(n);
				if (r === void 0) return 0;
				let o = e[r], s = t[r];
				return !o || !s ? Infinity : o - ((i || a()) - s);
			}, this.#j = (n) => {
				let r = t[n], o = e[n];
				return !!o && !!r && (i || a()) - r > o;
			};
		}
		#O = () => {};
		#k = () => {};
		#A = () => {};
		#j = () => !1;
		#M() {
			let e = new p(this.#e);
			this.#l = 0, this.#y = e, this.#N = (t) => {
				this.#l -= e[t], e[t] = 0;
			}, this.#F = (e, t, n, r) => {
				if (!d(n)) {
					if (this.#W(t)) return this.backgroundFetchSize;
					if (r) {
						if (typeof r != "function") throw TypeError("sizeCalculation must be a function");
						if (n = r(t, e), !d(n)) throw TypeError("sizeCalculation return invalid (expect positive integer)");
					} else throw TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
				}
				return n;
			}, this.#P = (t, n, r) => {
				if (e[t] = n, this.#t) {
					let n = this.#t - e[t];
					for (; this.#l > n;) this.#B(!0);
				}
				this.#l += e[t], r && (r.entrySize = n, r.totalCalculatedSize = this.#l);
			};
		}
		#N = (e) => {};
		#P = (e, t, n) => {};
		#F = (e, t, n, r) => {
			if (n || r) throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
			return 0;
		};
		*#I({ allowStale: e = this.allowStale } = {}) {
			if (this.#c) for (let t = this.#g; this.#R(t) && ((e || !this.#j(t)) && (yield t), t !== this.#h);) t = this.#m[t];
		}
		*#L({ allowStale: e = this.allowStale } = {}) {
			if (this.#c) for (let t = this.#h; this.#R(t) && ((e || !this.#j(t)) && (yield t), t !== this.#g);) t = this.#p[t];
		}
		#R(e) {
			return e !== void 0 && this.#u.get(this.#d[e]) === e;
		}
		*entries() {
			for (let e of this.#I()) this.#f[e] !== void 0 && this.#d[e] !== void 0 && !this.#W(this.#f[e]) && (yield [this.#d[e], this.#f[e]]);
		}
		*rentries() {
			for (let e of this.#L()) this.#f[e] !== void 0 && this.#d[e] !== void 0 && !this.#W(this.#f[e]) && (yield [this.#d[e], this.#f[e]]);
		}
		*keys() {
			for (let e of this.#I()) {
				let t = this.#d[e];
				t !== void 0 && !this.#W(this.#f[e]) && (yield t);
			}
		}
		*rkeys() {
			for (let e of this.#L()) {
				let t = this.#d[e];
				t !== void 0 && !this.#W(this.#f[e]) && (yield t);
			}
		}
		*values() {
			for (let e of this.#I()) this.#f[e] !== void 0 && !this.#W(this.#f[e]) && (yield this.#f[e]);
		}
		*rvalues() {
			for (let e of this.#L()) this.#f[e] !== void 0 && !this.#W(this.#f[e]) && (yield this.#f[e]);
		}
		[Symbol.iterator]() {
			return this.entries();
		}
		[Symbol.toStringTag] = "LRUCache";
		find(e, t = {}) {
			for (let n of this.#I()) {
				let r = this.#f[n], i = this.#W(r) ? r.__staleWhileFetching : r;
				if (i !== void 0 && e(i, this.#d[n], this)) return this.#J(this.#d[n], t);
			}
		}
		forEach(e, t = this) {
			for (let n of this.#I()) {
				let r = this.#f[n], i = this.#W(r) ? r.__staleWhileFetching : r;
				i !== void 0 && e.call(t, i, this.#d[n], this);
			}
		}
		rforEach(e, t = this) {
			for (let n of this.#L()) {
				let r = this.#f[n], i = this.#W(r) ? r.__staleWhileFetching : r;
				i !== void 0 && e.call(t, i, this.#d[n], this);
			}
		}
		purgeStale() {
			let e = !1;
			for (let t of this.#L({ allowStale: !0 })) this.#j(t) && (this.#Z(this.#d[t], "expire"), e = !0);
			return e;
		}
		info(e) {
			let t = this.#u.get(e);
			if (t === void 0) return;
			let n = this.#f[t], r = this.#W(n) ? n.__staleWhileFetching : n;
			if (r === void 0) return;
			let i = { value: r };
			if (this.#x && this.#b) {
				let e = this.#x[t], n = this.#b[t];
				e && n && (i.ttl = e - (this.#s.now() - n), i.start = Date.now());
			}
			return this.#y && (i.size = this.#y[t]), i;
		}
		dump() {
			let e = [];
			for (let t of this.#I({ allowStale: !0 })) {
				let n = this.#d[t], r = this.#f[t], i = this.#W(r) ? r.__staleWhileFetching : r;
				if (i === void 0 || n === void 0) continue;
				let a = { value: i };
				if (this.#x && this.#b) {
					a.ttl = this.#x[t];
					let e = this.#s.now() - this.#b[t];
					a.start = Math.floor(Date.now() - e);
				}
				this.#y && (a.size = this.#y[t]), e.unshift([n, a]);
			}
			return e;
		}
		load(e) {
			this.clear();
			for (let [t, n] of e) {
				if (n.start) {
					let e = Date.now() - n.start;
					n.start = this.#s.now() - e;
				}
				this.#z(t, n.value, n);
			}
		}
		set(e, t, n = {}) {
			let { status: r = i.metrics.hasSubscribers ? {} : void 0 } = n;
			n.status = r, r && (r.op = "set", r.key = e, t !== void 0 && (r.value = t), r.cache = this);
			let a = this.#z(e, t, n);
			return r && i.metrics.hasSubscribers && i.metrics.publish(r), a;
		}
		#z(e, t, n, r) {
			let { ttl: i = this.ttl, start: a, noDisposeOnSet: o = this.noDisposeOnSet, sizeCalculation: s = this.sizeCalculation, status: c } = n, l = this.#W(t);
			if (t === void 0) return c && (c.set = "deleted"), this.delete(e), this;
			let { noUpdateTTL: u = this.noUpdateTTL } = n;
			c && !l && (c.value = t);
			let d = this.#F(e, t, n.size || 0, s, c);
			if (this.maxEntrySize && d > this.maxEntrySize) return this.#Z(e, "set"), c && (c.set = "miss", c.maxEntrySizeExceeded = !0), this;
			let f = this.#c === 0 ? void 0 : this.#u.get(e);
			if (f === void 0) f = this.#c === 0 ? this.#g : this.#_.length === 0 ? this.#c === this.#e ? this.#B(!1) : this.#c : this.#_.pop(), this.#d[f] = e, this.#f[f] = t, this.#u.set(e, f), this.#p[this.#g] = f, this.#m[f] = this.#g, this.#g = f, this.#c++, this.#P(f, d, c), c && (c.set = "add"), u = !1, this.#E && !l && this.#r?.(t, e, "add");
			else {
				this.#X(f);
				let n = this.#f[f];
				if (t !== n) {
					if (!o) if (this.#W(n)) {
						n !== r && n.__abortController.abort(/* @__PURE__ */ Error("replaced"));
						let { __staleWhileFetching: i } = n;
						i !== void 0 && i !== t && (this.#C && this.#n?.(i, e, "set"), this.#T && this.#v?.push([
							i,
							e,
							"set"
						]));
					} else this.#C && this.#n?.(n, e, "set"), this.#T && this.#v?.push([
						n,
						e,
						"set"
					]);
					if (this.#N(f), this.#P(f, d, c), this.#f[f] = t, !l) {
						let r = n && this.#W(n) ? n.__staleWhileFetching : n, i = r === void 0 ? "add" : t === r ? "update" : "replace";
						c && (c.set = i, r !== void 0 && (c.oldValue = r)), this.#E && this.onInsert?.(t, e, i);
					}
				} else l || (c && (c.set = "update"), this.#E && this.onInsert?.(t, e, "update"));
			}
			if (i !== 0 && !this.#x && this.#D(), this.#x && (u || this.#A(f, i, a), c && this.#k(c, f)), !o && this.#T && this.#v) {
				let e = this.#v, t;
				for (; t = e?.shift();) this.#i?.(...t);
			}
			return this;
		}
		pop() {
			try {
				for (; this.#c;) {
					let e = this.#f[this.#h];
					if (this.#B(!0), this.#W(e)) {
						if (e.__staleWhileFetching) return e.__staleWhileFetching;
					} else if (e !== void 0) return e;
				}
			} finally {
				if (this.#T && this.#v) {
					let e = this.#v, t;
					for (; t = e?.shift();) this.#i?.(...t);
				}
			}
		}
		#B(e) {
			let t = this.#h, n = this.#d[t], r = this.#f[t], i = this.#W(r);
			i && r.__abortController.abort(/* @__PURE__ */ Error("evicted"));
			let a = i ? r.__staleWhileFetching : r;
			return (this.#C || this.#T) && a !== void 0 && (this.#C && this.#n?.(a, n, "evict"), this.#T && this.#v?.push([
				a,
				n,
				"evict"
			])), this.#N(t), this.#S?.[t] && (clearTimeout(this.#S[t]), this.#S[t] = void 0), e && (this.#d[t] = void 0, this.#f[t] = void 0, this.#_.push(t)), this.#c === 1 ? (this.#h = this.#g = 0, this.#_.length = 0) : this.#h = this.#p[t], this.#u.delete(n), this.#c--, t;
		}
		has(e, t = {}) {
			let { status: n = i.metrics.hasSubscribers ? {} : void 0 } = t;
			t.status = n, n && (n.op = "has", n.key = e, n.cache = this);
			let r = this.#V(e, t);
			return i.metrics.hasSubscribers && i.metrics.publish(n), r;
		}
		#V(e, t = {}) {
			let { updateAgeOnHas: n = this.updateAgeOnHas, status: r } = t, i = this.#u.get(e);
			if (i !== void 0) {
				let e = this.#f[i];
				if (this.#W(e) && e.__staleWhileFetching === void 0) return !1;
				if (this.#j(i)) r && (r.has = "stale", this.#k(r, i));
				else return n && this.#O(i), r && (r.has = "hit", this.#k(r, i)), !0;
			} else r && (r.has = "miss");
			return !1;
		}
		peek(e, t = {}) {
			let { status: n = o() ? {} : void 0 } = t;
			n && (n.op = "peek", n.key = e, n.cache = this), t.status = n;
			let r = this.#H(e, t);
			return i.metrics.hasSubscribers && i.metrics.publish(n), r;
		}
		#H(e, t) {
			let { status: n, allowStale: r = this.allowStale } = t, i = this.#u.get(e);
			if (i === void 0 || !r && this.#j(i)) {
				n && (n.peek = i === void 0 ? "miss" : "stale");
				return;
			}
			let a = this.#f[i], o = this.#W(a) ? a.__staleWhileFetching : a;
			return n && (o === void 0 ? n.peek = "miss" : (n.peek = "hit", n.value = o)), o;
		}
		#U(e, t, n, r) {
			let i = t === void 0 ? void 0 : this.#f[t];
			if (this.#W(i)) return i;
			let a = new AbortController(), { signal: o } = n;
			o?.addEventListener("abort", () => a.abort(o.reason), { signal: a.signal });
			let s = {
				signal: a.signal,
				options: n,
				context: r
			}, c = (r, i = !1) => {
				let { aborted: o } = a.signal, c = n.ignoreFetchAbort && r !== void 0, l = n.ignoreFetchAbort || !!(n.allowStaleOnFetchAbort && r !== void 0);
				if (n.status && (o && !i ? (n.status.fetchAborted = !0, n.status.fetchError = a.signal.reason, c && (n.status.fetchAbortIgnored = !0)) : n.status.fetchResolved = !0), o && !c && !i) return u(a.signal.reason, l);
				let d = f, p = this.#f[t];
				return (p === f || p === void 0 && c && i) && (r === void 0 ? d.__staleWhileFetching === void 0 ? this.#Z(e, "fetch") : this.#f[t] = d.__staleWhileFetching : (n.status && (n.status.fetchUpdated = !0), this.#z(e, r, s.options, d))), r;
			}, l = (e) => (n.status && (n.status.fetchRejected = !0, n.status.fetchError = e), u(e, !1)), u = (r, i) => {
				let { aborted: o } = a.signal, s = o && n.allowStaleOnFetchAbort, c = s || n.allowStaleOnFetchRejection, l = c || n.noDeleteOnFetchRejection, u = f;
				if (this.#f[t] === f && (!l || !i && u.__staleWhileFetching === void 0 ? this.#Z(e, "fetch") : s || (this.#f[t] = u.__staleWhileFetching)), c) return n.status && u.__staleWhileFetching !== void 0 && (n.status.returnedStale = !0), u.__staleWhileFetching;
				if (u.__returned === u) throw r;
			}, d = (t, r) => {
				let o = this.#a?.(e, i, s);
				a.signal.addEventListener("abort", () => {
					(!n.ignoreFetchAbort || n.allowStaleOnFetchAbort) && (t(void 0), n.allowStaleOnFetchAbort && (t = (e) => c(e, !0)));
				}), o && o instanceof Promise ? o.then((e) => t(e === void 0 ? void 0 : e), r) : o !== void 0 && t(o);
			};
			n.status && (n.status.fetchDispatched = !0);
			let f = new Promise(d).then(c, l), p = Object.assign(f, {
				__abortController: a,
				__staleWhileFetching: i,
				__returned: void 0
			});
			return t === void 0 ? (this.#z(e, p, {
				...s.options,
				status: void 0
			}), t = this.#u.get(e)) : this.#f[t] = p, p;
		}
		#W(e) {
			if (!this.#w) return !1;
			let t = e;
			return !!t && t instanceof Promise && t.hasOwnProperty("__staleWhileFetching") && t.__abortController instanceof AbortController;
		}
		fetch(e, t = {}) {
			let n = i.tracing.hasSubscribers, { status: r = o() ? {} : void 0 } = t;
			t.status = r, r && t.context && (r.context = t.context);
			let a = this.#G(e, t);
			return r && n && (r.trace = !0, i.tracing.tracePromise(() => a, r).catch(() => {})), a;
		}
		async #G(e, t = {}) {
			let { allowStale: n = this.allowStale, updateAgeOnGet: r = this.updateAgeOnGet, noDeleteOnStaleGet: i = this.noDeleteOnStaleGet, ttl: a = this.ttl, noDisposeOnSet: o = this.noDisposeOnSet, size: s = 0, sizeCalculation: c = this.sizeCalculation, noUpdateTTL: l = this.noUpdateTTL, noDeleteOnFetchRejection: u = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: d = this.allowStaleOnFetchRejection, ignoreFetchAbort: f = this.ignoreFetchAbort, allowStaleOnFetchAbort: p = this.allowStaleOnFetchAbort, context: m, forceRefresh: h = !1, status: g, signal: _ } = t;
			if (g && (g.op = "fetch", g.key = e, h && (g.forceRefresh = !0), g.cache = this), !this.#w) return g && (g.fetch = "get"), this.#J(e, {
				allowStale: n,
				updateAgeOnGet: r,
				noDeleteOnStaleGet: i,
				status: g
			});
			let v = {
				allowStale: n,
				updateAgeOnGet: r,
				noDeleteOnStaleGet: i,
				ttl: a,
				noDisposeOnSet: o,
				size: s,
				sizeCalculation: c,
				noUpdateTTL: l,
				noDeleteOnFetchRejection: u,
				allowStaleOnFetchRejection: d,
				allowStaleOnFetchAbort: p,
				ignoreFetchAbort: f,
				status: g,
				signal: _
			}, y = this.#u.get(e);
			if (y === void 0) {
				g && (g.fetch = "miss");
				let t = this.#U(e, y, v, m);
				return t.__returned = t;
			} else {
				let t = this.#f[y];
				if (this.#W(t)) {
					let e = n && t.__staleWhileFetching !== void 0;
					return g && (g.fetch = "inflight", e && (g.returnedStale = !0)), e ? t.__staleWhileFetching : t.__returned = t;
				}
				let i = this.#j(y);
				if (!h && !i) return g && (g.fetch = "hit"), this.#X(y), r && this.#O(y), g && this.#k(g, y), t;
				let a = this.#U(e, y, v, m), o = a.__staleWhileFetching !== void 0 && n;
				return g && (g.fetch = i ? "stale" : "refresh", o && i && (g.returnedStale = !0)), o ? a.__staleWhileFetching : a.__returned = a;
			}
		}
		forceFetch(e, t = {}) {
			let n = i.tracing.hasSubscribers, { status: r = o() ? {} : void 0 } = t;
			t.status = r, r && t.context && (r.context = t.context);
			let a = this.#K(e, t);
			return r && n && (r.trace = !0, i.tracing.tracePromise(() => a, r).catch(() => {})), a;
		}
		async #K(e, t = {}) {
			let n = await this.#G(e, t);
			if (n === void 0) throw Error("fetch() returned undefined");
			return n;
		}
		memo(e, t = {}) {
			let { status: n = i.metrics.hasSubscribers ? {} : void 0 } = t;
			t.status = n, n && (n.op = "memo", n.key = e, t.context && (n.context = t.context), n.cache = this);
			let r = this.#q(e, t);
			return n && (n.value = r), i.metrics.hasSubscribers && i.metrics.publish(n), r;
		}
		#q(e, t = {}) {
			let n = this.#o;
			if (!n) throw Error("no memoMethod provided to constructor");
			let { context: r, status: i, forceRefresh: a, ...o } = t;
			i && a && (i.forceRefresh = !0);
			let s = this.#J(e, o), c = a || s === void 0;
			if (i && (i.memo = c ? "miss" : "hit", c || (i.value = s)), !c) return s;
			let l = n(e, s, {
				options: o,
				context: r
			});
			return i && (i.value = l), this.#z(e, l, o), l;
		}
		get(e, t = {}) {
			let { status: n = i.metrics.hasSubscribers ? {} : void 0 } = t;
			t.status = n, n && (n.op = "get", n.key = e, n.cache = this);
			let r = this.#J(e, t);
			return n && (r !== void 0 && (n.value = r), i.metrics.hasSubscribers && i.metrics.publish(n)), r;
		}
		#J(e, t = {}) {
			let { allowStale: n = this.allowStale, updateAgeOnGet: r = this.updateAgeOnGet, noDeleteOnStaleGet: i = this.noDeleteOnStaleGet, status: a } = t, o = this.#u.get(e);
			if (o === void 0) {
				a && (a.get = "miss");
				return;
			}
			let s = this.#f[o], c = this.#W(s);
			return a && this.#k(a, o), this.#j(o) ? c ? (a && (a.get = "stale-fetching"), n && s.__staleWhileFetching !== void 0 ? (a && (a.returnedStale = !0), s.__staleWhileFetching) : void 0) : (i || this.#Z(e, "expire"), a && (a.get = "stale"), n ? (a && (a.returnedStale = !0), s) : void 0) : (a && (a.get = c ? "fetching" : "hit"), this.#X(o), r && this.#O(o), c ? s.__staleWhileFetching : s);
		}
		#Y(e, t) {
			this.#m[t] = e, this.#p[e] = t;
		}
		#X(e) {
			e !== this.#g && (e === this.#h ? this.#h = this.#p[e] : this.#Y(this.#m[e], this.#p[e]), this.#Y(this.#g, e), this.#g = e);
		}
		delete(e) {
			return this.#Z(e, "delete");
		}
		#Z(e, t) {
			i.metrics.hasSubscribers && i.metrics.publish({
				op: "delete",
				delete: t,
				key: e,
				cache: this
			});
			let n = !1;
			if (this.#c !== 0) {
				let r = this.#u.get(e);
				if (r !== void 0) if (this.#S?.[r] && (clearTimeout(this.#S?.[r]), this.#S[r] = void 0), n = !0, this.#c === 1) this.#Q(t);
				else {
					this.#N(r);
					let n = this.#f[r];
					if (this.#W(n) ? n.__abortController.abort(/* @__PURE__ */ Error("deleted")) : (this.#C || this.#T) && (this.#C && this.#n?.(n, e, t), this.#T && this.#v?.push([
						n,
						e,
						t
					])), this.#u.delete(e), this.#d[r] = void 0, this.#f[r] = void 0, r === this.#g) this.#g = this.#m[r];
					else if (r === this.#h) this.#h = this.#p[r];
					else {
						let e = this.#m[r];
						this.#p[e] = this.#p[r];
						let t = this.#p[r];
						this.#m[t] = this.#m[r];
					}
					this.#c--, this.#_.push(r);
				}
			}
			if (this.#T && this.#v?.length) {
				let e = this.#v, t;
				for (; t = e?.shift();) this.#i?.(...t);
			}
			return n;
		}
		clear() {
			return this.#Q("delete");
		}
		#Q(e) {
			for (let t of this.#L({ allowStale: !0 })) {
				let n = this.#f[t];
				if (this.#W(n)) n.__abortController.abort(/* @__PURE__ */ Error("deleted"));
				else {
					let r = this.#d[t];
					this.#C && this.#n?.(n, r, e), this.#T && this.#v?.push([
						n,
						r,
						e
					]);
				}
			}
			if (this.#u.clear(), this.#f.fill(void 0), this.#d.fill(void 0), this.#x && this.#b) {
				this.#x.fill(0), this.#b.fill(0);
				for (let e of this.#S ?? []) e !== void 0 && clearTimeout(e);
				this.#S?.fill(void 0);
			}
			if (this.#y && this.#y.fill(0), this.#h = 0, this.#g = 0, this.#_.length = 0, this.#l = 0, this.#c = 0, this.#T && this.#v) {
				let e = this.#v, t;
				for (; t = e?.shift();) this.#i?.(...t);
			}
		}
	};
})), Bn = /* @__PURE__ */ w(((e, t) => {
	var n = (...e) => e.every((e) => e) ? e.join("") : "", r = (e) => e ? encodeURIComponent(e) : "", i = (e) => e.toLowerCase().replace(/^\W+/g, "").replace(/(?<!\W)\W+$/, "").replace(/\//g, "").replace(/\W+/g, "-"), a = {
		sshtemplate: ({ domain: e, user: t, project: r, committish: i }) => `git@${e}:${t}/${r}.git${n("#", i)}`,
		sshurltemplate: ({ domain: e, user: t, project: r, committish: i }) => `git+ssh://git@${e}/${t}/${r}.git${n("#", i)}`,
		edittemplate: ({ domain: e, user: t, project: i, committish: a, editpath: o, path: s }) => `https://${e}/${t}/${i}${n("/", o, "/", r(a || "HEAD"), "/", s)}`,
		browsetemplate: ({ domain: e, user: t, project: i, committish: a, treepath: o }) => `https://${e}/${t}/${i}${n("/", o, "/", r(a))}`,
		browsetreetemplate: ({ domain: e, user: t, project: i, committish: a, treepath: o, path: s, fragment: c, hashformat: l }) => `https://${e}/${t}/${i}/${o}/${r(a || "HEAD")}/${s}${n("#", l(c || ""))}`,
		browseblobtemplate: ({ domain: e, user: t, project: i, committish: a, blobpath: o, path: s, fragment: c, hashformat: l }) => `https://${e}/${t}/${i}/${o}/${r(a || "HEAD")}/${s}${n("#", l(c || ""))}`,
		docstemplate: ({ domain: e, user: t, project: i, treepath: a, committish: o }) => `https://${e}/${t}/${i}${n("/", a, "/", r(o))}#readme`,
		httpstemplate: ({ auth: e, domain: t, user: r, project: i, committish: a }) => `git+https://${n(e, "@")}${t}/${r}/${i}.git${n("#", a)}`,
		filetemplate: ({ domain: e, user: t, project: n, committish: i, path: a }) => `https://${e}/${t}/${n}/raw/${r(i || "HEAD")}/${a}`,
		shortcuttemplate: ({ type: e, user: t, project: r, committish: i }) => `${e}:${t}/${r}${n("#", i)}`,
		pathtemplate: ({ user: e, project: t, committish: r }) => `${e}/${t}${n("#", r)}`,
		bugstemplate: ({ domain: e, user: t, project: n }) => `https://${e}/${t}/${n}/issues`,
		hashformat: i
	}, o = {};
	o.github = {
		protocols: [
			"git:",
			"http:",
			"git+ssh:",
			"git+https:",
			"ssh:",
			"https:"
		],
		domain: "github.com",
		treepath: "tree",
		blobpath: "blob",
		editpath: "edit",
		filetemplate: ({ auth: e, user: t, project: i, committish: a, path: o }) => `https://${n(e, "@")}raw.githubusercontent.com/${t}/${i}/${r(a || "HEAD")}/${o}`,
		gittemplate: ({ auth: e, domain: t, user: r, project: i, committish: a }) => `git://${n(e, "@")}${t}/${r}/${i}.git${n("#", a)}`,
		tarballtemplate: ({ domain: e, user: t, project: n, committish: i }) => `https://codeload.${e}/${t}/${n}/tar.gz/${r(i || "HEAD")}`,
		extract: (e) => {
			let [, t, n, r, i] = e.pathname.split("/", 5);
			if (!(r && r !== "tree") && (r || (i = e.hash.slice(1)), n && n.endsWith(".git") && (n = n.slice(0, -4)), !(!t || !n))) return {
				user: t,
				project: n,
				committish: i
			};
		}
	}, o.bitbucket = {
		protocols: [
			"git+ssh:",
			"git+https:",
			"ssh:",
			"https:"
		],
		domain: "bitbucket.org",
		treepath: "src",
		blobpath: "src",
		editpath: "?mode=edit",
		edittemplate: ({ domain: e, user: t, project: i, committish: a, treepath: o, path: s, editpath: c }) => `https://${e}/${t}/${i}${n("/", o, "/", r(a || "HEAD"), "/", s, c)}`,
		tarballtemplate: ({ domain: e, user: t, project: n, committish: i }) => `https://${e}/${t}/${n}/get/${r(i || "HEAD")}.tar.gz`,
		extract: (e) => {
			let [, t, n, r] = e.pathname.split("/", 4);
			if (!["get"].includes(r) && (n && n.endsWith(".git") && (n = n.slice(0, -4)), !(!t || !n))) return {
				user: t,
				project: n,
				committish: e.hash.slice(1)
			};
		}
	}, o.gitlab = {
		protocols: [
			"git+ssh:",
			"git+https:",
			"ssh:",
			"https:"
		],
		domain: "gitlab.com",
		treepath: "tree",
		blobpath: "tree",
		editpath: "-/edit",
		tarballtemplate: ({ domain: e, user: t, project: n, committish: i }) => `https://${e}/api/v4/projects/${r(t + "/" + n)}/repository/archive.tar.gz?sha=${r(i || "HEAD")}`,
		extract: (e) => {
			let t = e.pathname.slice(1);
			if (t.includes("/-/") || t.includes("/archive.tar.gz")) return;
			let n = t.split("/"), r = n.pop();
			r.endsWith(".git") && (r = r.slice(0, -4));
			let i = n.join("/");
			if (!(!i || !r)) return {
				user: i,
				project: r,
				committish: e.hash.slice(1)
			};
		}
	}, o.gist = {
		protocols: [
			"git:",
			"git+ssh:",
			"git+https:",
			"ssh:",
			"https:"
		],
		domain: "gist.github.com",
		editpath: "edit",
		sshtemplate: ({ domain: e, project: t, committish: r }) => `git@${e}:${t}.git${n("#", r)}`,
		sshurltemplate: ({ domain: e, project: t, committish: r }) => `git+ssh://git@${e}/${t}.git${n("#", r)}`,
		edittemplate: ({ domain: e, user: t, project: i, committish: a, editpath: o }) => `https://${e}/${t}/${i}${n("/", r(a))}/${o}`,
		browsetemplate: ({ domain: e, project: t, committish: i }) => `https://${e}/${t}${n("/", r(i))}`,
		browsetreetemplate: ({ domain: e, project: t, committish: i, path: a, hashformat: o }) => `https://${e}/${t}${n("/", r(i))}${n("#", o(a))}`,
		browseblobtemplate: ({ domain: e, project: t, committish: i, path: a, hashformat: o }) => `https://${e}/${t}${n("/", r(i))}${n("#", o(a))}`,
		docstemplate: ({ domain: e, project: t, committish: i }) => `https://${e}/${t}${n("/", r(i))}`,
		httpstemplate: ({ domain: e, project: t, committish: r }) => `git+https://${e}/${t}.git${n("#", r)}`,
		filetemplate: ({ user: e, project: t, committish: i, path: a }) => `https://gist.githubusercontent.com/${e}/${t}/raw${n("/", r(i))}/${a}`,
		shortcuttemplate: ({ type: e, project: t, committish: r }) => `${e}:${t}${n("#", r)}`,
		pathtemplate: ({ project: e, committish: t }) => `${e}${n("#", t)}`,
		bugstemplate: ({ domain: e, project: t }) => `https://${e}/${t}`,
		gittemplate: ({ domain: e, project: t, committish: r }) => `git://${e}/${t}.git${n("#", r)}`,
		tarballtemplate: ({ project: e, committish: t }) => `https://codeload.github.com/gist/${e}/tar.gz/${r(t || "HEAD")}`,
		extract: (e) => {
			let [, t, n, r] = e.pathname.split("/", 4);
			if (r !== "raw") {
				if (!n) {
					if (!t) return;
					n = t, t = null;
				}
				return n.endsWith(".git") && (n = n.slice(0, -4)), {
					user: t,
					project: n,
					committish: e.hash.slice(1)
				};
			}
		},
		hashformat: function(e) {
			return e && "file-" + i(e);
		}
	}, o.sourcehut = {
		protocols: ["git+ssh:", "https:"],
		domain: "git.sr.ht",
		treepath: "tree",
		blobpath: "tree",
		filetemplate: ({ domain: e, user: t, project: n, committish: i, path: a }) => `https://${e}/${t}/${n}/blob/${r(i) || "HEAD"}/${a}`,
		httpstemplate: ({ domain: e, user: t, project: r, committish: i }) => `https://${e}/${t}/${r}${n("#", i)}`,
		tarballtemplate: ({ domain: e, user: t, project: n, committish: i }) => `https://${e}/${t}/${n}/archive/${r(i) || "HEAD"}.tar.gz`,
		bugstemplate: () => null,
		extract: (e) => {
			let [, t, n, r] = e.pathname.split("/", 4);
			if (!["archive"].includes(r) && (n && n.endsWith(".git") && (n = n.slice(0, -4)), !(!t || !n))) return {
				user: t,
				project: n,
				committish: e.hash.slice(1)
			};
		}
	};
	for (let [e, t] of Object.entries(o)) o[e] = Object.assign({}, a, t);
	t.exports = o;
})), Vn = /* @__PURE__ */ w(((e, t) => {
	var n = k("url"), r = (e, t, n) => {
		let r = e.indexOf(n);
		return e.lastIndexOf(t, r > -1 ? r : Infinity);
	}, i = (e) => {
		try {
			return new n.URL(e);
		} catch {}
	}, a = (e, t) => {
		let n = e.indexOf(":"), r = e.slice(0, n + 1);
		if (Object.prototype.hasOwnProperty.call(t, r) || e.substr(n, 3) === "://") return e;
		let i = e.indexOf("@");
		return i > -1 ? i > n ? `git+ssh://${e}` : e : `${e.slice(0, n + 1)}//${e.slice(n + 1)}`;
	}, o = (e) => {
		let t = r(e, "@", "#"), n = r(e, ":", "#");
		return n > t && (e = e.slice(0, n) + "/" + e.slice(n + 1)), r(e, ":", "#") === -1 && e.indexOf("//") === -1 && (e = `git+ssh://${e}`), e;
	};
	t.exports = (e, t) => {
		let n = t ? a(e, t) : e;
		return i(n) || i(o(n));
	};
})), Hn = /* @__PURE__ */ w(((e, t) => {
	var n = Vn(), r = (e) => {
		let t = e.indexOf("#"), n = e.indexOf("/"), r = e.indexOf("/", n + 1), i = e.indexOf(":"), a = /\s/.exec(e), o = e.indexOf("@"), s = !a || t > -1 && a.index > t, c = o === -1 || t > -1 && o > t, l = i === -1 || t > -1 && i > t, u = r === -1 || t > -1 && r > t, d = n > 0, f = t > -1 ? e[t - 1] !== "/" : !e.endsWith("/"), p = !e.startsWith(".");
		return s && d && f && p && c && l && u;
	};
	t.exports = (e, t, { gitHosts: i, protocols: a }) => {
		if (!e) return;
		let o = n(r(e) ? `github:${e}` : e, a);
		if (!o) return;
		let s = i.byShortcut[o.protocol], c = i.byDomain[o.hostname.startsWith("www.") ? o.hostname.slice(4) : o.hostname], l = s || c;
		if (!l) return;
		let u = i[s || c], d = null;
		a[o.protocol]?.auth && (o.username || o.password) && (d = `${o.username}${o.password ? ":" + o.password : ""}`);
		let f = null, p = null, m = null, h = null;
		try {
			if (s) {
				let e = o.pathname.startsWith("/") ? o.pathname.slice(1) : o.pathname, t = e.indexOf("@");
				t > -1 && (e = e.slice(t + 1));
				let n = e.lastIndexOf("/");
				n > -1 ? (p = decodeURIComponent(e.slice(0, n)), p ||= null, m = decodeURIComponent(e.slice(n + 1))) : m = decodeURIComponent(e), m.endsWith(".git") && (m = m.slice(0, -4)), o.hash && (f = decodeURIComponent(o.hash.slice(1))), h = "shortcut";
			} else {
				if (!u.protocols.includes(o.protocol)) return;
				let e = u.extract(o);
				if (!e) return;
				p = e.user && decodeURIComponent(e.user), m = decodeURIComponent(e.project), f = decodeURIComponent(e.committish), h = a[o.protocol]?.name || o.protocol.slice(0, -1);
			}
		} catch (e) {
			/* istanbul ignore else */
			if (e instanceof URIError) return;
			throw e;
		}
		return [
			l,
			p,
			d,
			m,
			f,
			h,
			t
		];
	};
})), Un = /* @__PURE__ */ w(((e, t) => {
	var { LRUCache: n } = zn(), r = Bn(), i = Hn(), a = Vn(), o = new n({ max: 1e3 });
	function s(e) {
		try {
			let { protocol: t, hostname: n, pathname: r } = new URL(e);
			return n ? `${/(?:git\+)http:$/.test(t) ? "http:" : "https:"}//${n}${r.replace(/\.git$/, "")}` : null;
		} catch {
			return null;
		}
	}
	var c = class e {
		constructor(t, n, r, i, a, o, s = {}) {
			Object.assign(this, e.#e[t], {
				type: t,
				user: n,
				auth: r,
				project: i,
				committish: a,
				default: o,
				opts: s
			});
		}
		static #e = {
			byShortcut: {},
			byDomain: {}
		};
		static #t = {
			"git+ssh:": { name: "sshurl" },
			"ssh:": { name: "sshurl" },
			"git+https:": {
				name: "https",
				auth: !0
			},
			"git:": { auth: !0 },
			"http:": { auth: !0 },
			"https:": { auth: !0 },
			"git+http:": { auth: !0 }
		};
		static addHost(t, n) {
			e.#e[t] = n, e.#e.byDomain[n.domain] = t, e.#e.byShortcut[`${t}:`] = t, e.#t[`${t}:`] = { name: t };
		}
		static fromUrl(t, n) {
			if (typeof t != "string") return;
			let r = t + JSON.stringify(n || {});
			if (!o.has(r)) {
				let a = i(t, n, {
					gitHosts: e.#e,
					protocols: e.#t
				});
				o.set(r, a ? new e(...a) : void 0);
			}
			return o.get(r);
		}
		static fromManifest(t, n = {}) {
			if (!t || typeof t != "object") return;
			let r = t.repository, i = r && (typeof r == "string" ? r : typeof r == "object" && typeof r.url == "string" ? r.url : null);
			if (!i) throw Error("no repository");
			let a = i && e.fromUrl(i.replace(/^git\+/, ""), n) || null;
			if (a) return a;
			let o = s(i);
			return e.fromUrl(o, n) || o;
		}
		static parseUrl(e) {
			return a(e);
		}
		#n(e, t) {
			if (typeof e != "function") return null;
			let n = {
				...this,
				...this.opts,
				...t
			};
			n.path ||= "", n.path.startsWith("/") && (n.path = n.path.slice(1)), n.noCommittish && (n.committish = null);
			let r = e(n);
			return n.noGitPlus && r.startsWith("git+") ? r.slice(4) : r;
		}
		hash() {
			return this.committish ? `#${this.committish}` : "";
		}
		ssh(e) {
			return this.#n(this.sshtemplate, e);
		}
		sshurl(e) {
			return this.#n(this.sshurltemplate, e);
		}
		browse(e, ...t) {
			return typeof e == "string" ? typeof t[0] == "string" ? this.#n(this.browsetreetemplate, {
				...t[1],
				fragment: t[0],
				path: e
			}) : this.#n(this.browsetreetemplate, {
				...t[0],
				path: e
			}) : this.#n(this.browsetemplate, e);
		}
		browseFile(e, ...t) {
			return typeof t[0] == "string" ? this.#n(this.browseblobtemplate, {
				...t[1],
				fragment: t[0],
				path: e
			}) : this.#n(this.browseblobtemplate, {
				...t[0],
				path: e
			});
		}
		docs(e) {
			return this.#n(this.docstemplate, e);
		}
		bugs(e) {
			return this.#n(this.bugstemplate, e);
		}
		https(e) {
			return this.#n(this.httpstemplate, e);
		}
		git(e) {
			return this.#n(this.gittemplate, e);
		}
		shortcut(e) {
			return this.#n(this.shortcuttemplate, e);
		}
		path(e) {
			return this.#n(this.pathtemplate, e);
		}
		tarball(e) {
			return this.#n(this.tarballtemplate, {
				...e,
				noCommittish: !1
			});
		}
		file(e, t) {
			return this.#n(this.filetemplate, {
				...t,
				path: e
			});
		}
		edit(e, t) {
			return this.#n(this.edittemplate, {
				...t,
				path: e
			});
		}
		getDefaultRepresentation() {
			return this.default;
		}
		toString(e) {
			return this.default && typeof this[this.default] == "function" ? this[this.default](e) : this.sshurl(e);
		}
	};
	for (let [e, t] of Object.entries(r)) c.addHost(e, t);
	t.exports = c;
})), Wn = /* @__PURE__ */ D(Un(), 1);
async function Gn(e, { pkgFile: t } = {}) {
	return (await Ln(e, { pkgFile: t }))?.repository ?? null;
}
async function Kn(e, t, { pkgFile: n } = {}) {
	let r = t ? t.repository ? t.repository : null : await Gn(e, { pkgFile: n });
	if (!r) return null;
	let i, a = "";
	if (typeof r == "string") {
		i = r;
		try {
			let e = new o(i);
			if (e.protocol === "https:" || e.protocol === "http:") return i;
		} catch {}
	} else typeof r.url == "string" && (i = r.url, typeof r.directory == "string" && (a = r.directory));
	if (typeof i == "string" && typeof a == "string") {
		let e = Wn.default.fromUrl(i)?.browse(a);
		return e === void 0 ? i : e.replace(/\/$/, "").replace(/\/tree\/HEAD$/, "");
	}
	return null;
}
//#endregion
//#region src/lib/isPackageManagerProtocol.ts
function qn(e) {
	return e.startsWith("file:") || e.startsWith("link:") || e.startsWith("workspace:") || e.startsWith("catalog:") || e.startsWith("portal:");
}
//#endregion
//#region src/lib/isFetchable.ts
function Jn(e) {
	return !qn(e) && !/^[^/:@]+\/\w+/.test(e);
}
//#endregion
//#region src/lib/parseCooldown.ts
var Yn = /^(\d+(?:\.\d+)?)(d|h|m)$/;
function Xn(e) {
	let t = e.match(Yn);
	if (!t) return null;
	let n = parseFloat(t[1]), r = t[2];
	return r === "d" ? n : r === "h" ? n / 24 : n / 1440;
}
//#endregion
//#region node_modules/parse-github-url/parse-url.js
var Zn = /* @__PURE__ */ w(((e, t) => {
	var n = k("url"), r = typeof URL > "u" ? n.URL || null : URL, i = r ? null : n.parse;
	function a(e) {
		try {
			var t = new r(e), n = null;
			t.username && (n = t.password ? t.username + ":" + t.password : t.username);
			var i = t.host || null, a = t.hostname || null, o = t.pathname || null, s = t.pathname + (t.search || "") || null;
			if (!i && o && e.indexOf("//") === -1) {
				var c = o.indexOf("/");
				c === -1 ? (i = o, a = o, o = null, s = null) : (i = o.slice(0, c), a = i, o = o.slice(c), s = o + (t.search || ""));
			}
			return {
				auth: n,
				hash: t.hash || null,
				host: i,
				hostname: a,
				href: t.href,
				path: s,
				pathname: o,
				port: t.port || null,
				protocol: t.protocol || null,
				query: t.search ? t.search.slice(1) : null,
				search: t.search || null,
				slashes: e.indexOf("//") === -1 ? null : !0
			};
		} catch {
			var l = e.indexOf("#"), u = l === -1 ? null : e.slice(l), d = l === -1 ? e : e.slice(0, l), f = d.indexOf("?"), p = f === -1 ? null : d.slice(f), m = f === -1 ? d : d.slice(0, f);
			return {
				auth: null,
				hash: u,
				host: null,
				hostname: null,
				href: e,
				path: d || null,
				pathname: m || null,
				port: null,
				protocol: null,
				query: p ? p.slice(1) : null,
				search: p,
				slashes: null
			};
		}
	}
	t.exports = r ? a : i;
})), Qn = /* @__PURE__ */ w(((e, t) => {
	var n = Zn(), r = { __proto__: null };
	function i(e) {
		return /^[a-f0-9]{40}$/i.test(e);
	}
	function a(e, t) {
		var n = e.split("#"), r;
		return n.length > 1 && (r = n[n.length - 1]), !r && t.hash && t.hash.charAt(0) === "#" && (r = t.hash.slice(1)), r || "master";
	}
	function o(e) {
		return e.charAt(0) === "/" ? e.slice(1) : e;
	}
	function s(e) {
		return e ? e.replace(/\.git$/, "") : null;
	}
	function c(e) {
		if (!e) return null;
		var t = e.indexOf(":");
		return t > -1 ? e.slice(t + 1) : e;
	}
	function l(e) {
		return n("http://" + e.replace(/git@([^:]+):/, "$1/")).host || null;
	}
	function u(e) {
		if (typeof e != "string" || !e.length || e.indexOf("git@gist") !== -1 || e.indexOf("//gist") !== -1) return null;
		var t = n(e);
		if (typeof t.path != "string" || !t.path.length || typeof t.pathname != "string" || !t.pathname.length) return null;
		!t.host && /^git@/.test(e) === !0 && (t.host = l(e)), t.path = o(t.path), t.pathname = o(t.pathname), t.filepath = null, t.path.indexOf("repos") === 0 && (t.path = t.path.slice(6));
		var r = t.path.split("/").filter(Boolean), u = r[2] === "blob";
		u && !i(r[3]) && (t.branch = r[3], r.length > 4 && (t.filepath = r.slice(4).join("/")));
		var d = e.indexOf("blob");
		u && d !== -1 && (t.blob = e.slice(d + 5));
		var f = r[2] === "tree", p = e.indexOf("tree");
		if (f && p !== -1) {
			var m = p + 5, h = e.slice(m), g = h.indexOf("/");
			g !== -1 && (h = h.slice(0, g)), t.branch = h;
		}
		if (t.owner = c(r[0]), t.name = s(r[1]), r.length > 1 && t.owner && t.name) t.repo = t.owner + "/" + t.name;
		else {
			var _ = t.href.split(":");
			if (_.length === 2 && t.href.indexOf("//") === -1) {
				t.repo = t.repo || _[_.length - 1];
				var v = t.repo.split("/");
				t.owner = v[0], t.name = v[1];
			} else {
				var y = t.href.match(/\/([^/]*)$/);
				t.owner = y ? y[1] : null, t.repo = null;
			}
			if (t.repo && (!t.owner || !t.name)) {
				var b = t.repo.split("/");
				b.length === 2 && (t.owner = b[0], t.name = b[1]);
			}
		}
		return t.branch || (t.branch = r[2] || a(t.path, t), r.length > 3 && (t.filepath = r.slice(3).join("/"))), t.host = t.host || "github.com", t.owner = t.owner || null, t.name = t.name || null, t.repository = t.repo, t;
	}
	t.exports = function(e) {
		return r[e] || (r[e] = u(e)), r[e];
	};
})), $n = /* @__PURE__ */ w(((e, t) => {
	(function() {
		var e = /^v?((\d+)\.(\d+)\.(\d+))(?:-([\dA-Za-z\-]+(?:\.[\dA-Za-z\-]+)*))?(?:\+([\dA-Za-z\-]+(?:\.[\dA-Za-z\-]+)*))?$/, n = /\s*((\|\||\-)|(((?:(?:~?[<>]?)|\^?)=?)\s*(v)?([0-9]+)(\.(x|\*|[0-9]+))?(\.(x|\*|[0-9]+))?(([\-+])([a-zA-Z0-9\.-]+))?))\s*/g;
		function r(e) {
			var t = {};
			for (var n in e) e[n] !== void 0 && (t[n] = e[n]);
			return t;
		}
		function i(e) {
			var t = "";
			return t += e.major || "0", t += ".", t += e.minor || "0", t += ".", t += e.patch || "0", e.release && (t += "-" + e.release), e.build && (t += "+" + e.build), t;
		}
		function a(e) {
			var t = "";
			function n(e) {
				e.operator && (t += e.operator + " "), e.major && (t += e.toString() + " ");
			}
			return e.forEach(n), t.trim();
		}
		function o(e) {
			if (e) {
				var t = this;
				Object.keys(e).forEach(function(n) {
					t[n] = e[n];
				});
			}
		}
		o.prototype.toString = function() {
			return i(this);
		};
		function s(t) {
			var n = e.exec(t) || [], i = new o(r({
				semver: n[0],
				version: n[1],
				major: n[2],
				minor: n[3],
				patch: n[4],
				release: n[5],
				build: n[6]
			}));
			return n.length === 0 && (i = null), i;
		}
		function c(e) {
			for (var t, i = [], a; t = n.exec(e);) a = {
				semver: t[3],
				operator: t[4] || t[2],
				major: t[6],
				minor: t[8],
				patch: t[10]
			}, t[12] === "+" && (a.build = t[13]), t[12] === "-" && (a.release = t[13]), i.push(new o(r(a)));
			return i;
		}
		t.exports.parse = s, t.exports.stringify = i, t.exports.parseRange = c, t.exports.stringifyRange = a;
	})();
})), er = /* @__PURE__ */ D(Qn(), 1), tr = /* @__PURE__ */ D($n(), 1);
function nr(e) {
	return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}
//#endregion
//#region src/lib/sortBy.ts
function rr(e, t) {
	return e ? e.map((e) => ({
		item: e,
		key: t(e)
	})).sort((e, t) => e.key > t.key ? 1 : e.key < t.key ? -1 : 0).map(({ item: e }) => e) : [];
}
//#endregion
//#region src/lib/version-util.ts
var ir = [
	"major",
	"minor",
	"patch"
], ar = ["release", "build"], or = [...ir, ...ar], sr = {
	major: "",
	minor: ".",
	patch: ".",
	release: "-",
	build: "+"
}, cr = [
	"^",
	"~",
	".*",
	".x"
], lr = RegExp(`^(${[
	"^",
	"~",
	"^*",
	"*",
	"x",
	"x.x",
	"x.x.x"
].map(nr).join("|")})$`), ur = /^npm:(.*)@(.*)/;
function dr(e) {
	let [t] = tr.default.parseRange(e);
	if (!t) throw Error(c("semverutils.parseRange returned null when trying to parse \"%s\". This is probably a problem with the \"semver-utils\" dependency. Please report an issue at https://github.com/raineorshine/npm-check-updates/issues.", e));
	return or.reduce((e, n) => t[n] ? e + 1 : e, 0);
}
function fr(e, t) {
	return (t ? or.slice(0, or.indexOf(t) + 1) : or).filter((n) => t && ir.includes(t) || e[n]).map((t) => sr[t] + (e[t] || "0")).join("");
}
function pr(e) {
	let [t] = tr.default.parseRange(e);
	return or.slice().reverse().find((e) => t?.[e]);
}
function mr(e, t) {
	let [n] = tr.default.parseRange(e);
	return fr(n, t);
}
function hr(e, t) {
	return t === "^" || t === "~" ? t + e : mr(e, "major") + t;
}
function gr(e) {
	return lr.test(e);
}
function _r(e) {
	return e === "*" || e === "x";
}
function vr(e, t) {
	if (e === t) return "none";
	/^[~^]/.test(t) && t[0] === e[0] && (t = t.slice(1), e = e.slice(1));
	let n = t.split("."), r = e.split("."), i = n.findIndex((e, t) => e !== r[t]);
	return i = i >= 0 ? i : n.length, n[0] === "0" ? "majorVersionZero" : i === 0 ? "major" : i === 1 ? "minor" : "patch";
}
function yr(e, t, n) {
	let r = Dn(e, (r, i, a) => {
		let o = t[r], s = vr(o, i), c = n.groupFunction?.(r, s, (0, tr.parseRange)(o), (0, tr.parseRange)(i), (0, tr.parse)(e[r])) ?? s;
		return c === "none" ? a : {
			...a,
			[c]: {
				...a[c],
				[r]: i
			}
		};
	}), i = {
		patch: X.green(X.bold("Patch") + "   Backwards-compatible bug fixes"),
		minor: X.cyan(X.bold("Minor") + "   Backwards-compatible features"),
		major: X.red(X.bold("Major") + "   Potentially breaking API changes"),
		majorVersionZero: X.magenta(X.bold("Major version zero") + "   Anything may change")
	};
	return Array.from(/* @__PURE__ */ new Set([
		"patch",
		"minor",
		"major",
		"majorVersionZero",
		...Object.keys(r).sort()
	])).filter((e) => e in r).map((e) => ({
		groupName: e,
		heading: e in i ? i[e] : e,
		packages: r[e]
	}));
}
function br(e, t) {
	let n = "";
	/^[~^]/.test(t) && t[0] === e[0] && (n = t[0], t = t.slice(1), e = e.slice(1));
	let r = t.split("."), i = e.split("."), a = r.findIndex((e, t) => e !== i[t]);
	a = a >= 0 ? a : r.length;
	let o = a === 0 || r[0] === "0" ? "red" : a === 1 ? "cyan" : "green", s = a > 0 && a < r.length ? "." : "";
	return n + r.slice(0, a).join(".") + s + X[o](r.slice(a).join("."));
}
var xr = (e) => {
	let t = Y.default.prerelease(e);
	return t && t.slice(0, -1).join(".");
};
function Sr(e, t) {
	let n = xr(e), r = xr(t);
	return typeof n != "string" || typeof r != "string" || n === r;
}
function Cr(e, t) {
	return (Y.default.valid(e) && Y.default.valid(t) ? Y.default.gt(e, t) : e > t) ? 1 : e === t ? 0 : -1;
}
function wr(e, t, n) {
	if (!Y.default.validRange(t)) return null;
	let r = Y.default.minVersion(t);
	return [...e].sort(Cr).filter((e) => {
		let t = Y.default.parse(e);
		return t && (n === "major" || t.major === r?.major) && (n === "major" || n === "minor" || t.minor === r?.minor);
	}).at(-1) || null;
}
function Tr(e, t) {
	if (!Y.default.validRange(e)) return () => !1;
	let n = Y.default.minVersion(e);
	return (e) => {
		let r = Y.default.parse(e);
		return r && (t === "major" || r.major === n?.major) && (t === "major" || t === "minor" || r.minor === n?.minor);
	};
}
function Er(e) {
	return (t) => Y.default.satisfies(t, e);
}
function Dr(e) {
	return pr(e) === "release";
}
var Or = (e) => /^[vV]?\d+$/.test(e), kr = (e) => /^[vV]?\d+\.\d+$/.test(e), Ar = (e) => e.replace(/^[vV]/, ""), jr = (e) => Or(e) ? e + ".0.0" : e, Mr = (e) => kr(e) ? e + ".0" : e, Nr = (e) => Mr(jr(Ar(e)));
function Pr(e) {
	return e && (e[0] === "v" || e[1] === "v") ? "v" : "";
}
var Fr = (e, t) => `npm:${e}@${t}`, Ir = (e) => {
	let t = e && e.match && e.match(ur);
	return t && t.slice(1);
}, Lr = (e) => e && !!e.match(ur), Rr = (e, t) => {
	let n = Ir(e);
	return n ? Fr(n[0], t) : null;
}, zr = (e) => {
	if (!e) return !1;
	let t = null;
	try {
		t = (0, er.default)(e);
	} catch {}
	if (!t || !t.branch) return !1;
	let n = decodeURIComponent(t.branch).replace(/^semver:/, "");
	return !!Y.default.validRange(n);
}, Br = (e) => {
	if (!e) return null;
	let t = (0, er.default)(e);
	if (!t || !t.branch) return null;
	let n = decodeURIComponent(t.branch).replace(/^semver:/, "");
	return t && t.branch && Y.default.validRange(n) ? n : null;
};
function Vr(e, t, n = {}) {
	if (n.wildcard = n.wildcard || "^", !t) return e;
	let [r] = tr.default.parseRange(t);
	if (!r) return e;
	if (n.removeRange) return t;
	if (gr(e)) return e;
	let i = rr(tr.default.parseRange(e).filter((e) => e.operator !== "||" && e.operator !== "-"), (e) => dr(fr(e))), [a] = i;
	function o(e) {
		return (_r(a[e]) ? a[e] : ir.includes(e) && a[e] || ar.includes(e) ? r[e] : null) || null;
	}
	let s = fr(Dn(or, (e) => ({ [e]: o(e) }))), c = Pr(a.semver) + s, l = Array.from(new Set(i.map((e) => e.operator))), u = l[0] || "", d = cr.some((e) => s.includes(e)), f = l[0] === "<" || l[0] === "<=", p = l[0] === ">", m = l.length > 1;
	return !d && (f || m) ? hr(c, n.wildcard) : (p ? ">=" : u) + c;
}
var Hr = (e, t) => {
	let n = Pr(e), r = n ? n + t : t;
	return r = Or(e) ? r.slice(0, r.length - 4) : r, r = kr(e) ? r.slice(0, r.length - 2) : r, r;
}, Ur = (e, t) => {
	let n = Nr(t), r = (0, er.default)(e);
	if (!r) return e;
	let i = decodeURIComponent(r.branch).replace(/^semver:/, "");
	return e.replace(i, Vr(i, Hr(i, n)));
}, Wr = (e) => e.replace(/^[~^<>=]+/, ""), Gr = {
	silent: 0,
	error: 1,
	minimal: 2,
	warn: 3,
	info: 4,
	verbose: 5,
	silly: 6
};
function Z(e, t, n = null, r = "log") {
	!e.json && e.loglevel !== "silent" && (n == null || Gr[e.loglevel ?? "warn"] >= Gr[n]) && console[r](t);
}
function Kr(e, t) {
	e.loglevel !== "silent" && console.log(JSON.stringify(t, null, 2));
}
function qr(e, t) {
	console.log(Object.keys(e).map((t) => t + "@" + e[t]).join(t));
}
function Jr(e, t, n) {
	Z(e, Object.keys(t).sort().reduce((e, n) => (e[n] = t[n], e), {}), n);
}
function Yr(e) {
	let t = new jt.default({
		colAligns: [
			"left",
			"right",
			"right",
			"right",
			"left",
			"left"
		],
		chars: {
			top: "",
			"top-mid": "",
			"top-left": "",
			"top-right": "",
			bottom: "",
			"bottom-mid": "",
			"bottom-left": "",
			"bottom-right": "",
			left: "",
			"left-mid": "",
			mid: "",
			"mid-mid": "",
			right: "",
			"right-mid": "",
			middle: ""
		}
	});
	return t.push(...e), t.toString().split("\n").map((e) => e.trimEnd()).join("\n");
}
function Xr(e) {
	return zr(e) ? Br(e) : Lr(e) ? Ir(e)[1] : e;
}
function Zr(e) {
	if (e === void 0 || typeof e == "function") return "cooldown";
	let t = String(e).trim().toLowerCase(), n = t.match(Yn), r = Number(n ? n[1] : t);
	if (isNaN(r)) return "cooldown";
	let i = n ? {
		d: "day",
		h: "hour",
		m: "minute"
	}[n[2]] : "day";
	return `${+r.toFixed(1)}-${i} cooldown`;
}
async function Qr({ from: e, to: t, skippedByCooldown: r, format: i, ownersChangedDeps: a, pkgFile: o, time: s }) {
	let c = i?.includes("dep") && o ? JSON.parse(await n.readFile(o, "utf-8")) : null, l = Object.keys(r || {}).length > 0;
	return Yr(await Promise.all(Object.keys(t).sort().map(async (n) => {
		let u = (i?.includes("installedVersion") ? await Rn(n, void 0, { pkgFile: o }) : e[n]) || "", d = n in (c?.devDependencies ?? {}) ? "dev" : n in (c?.peerDependencies ?? {}) ? "peer" : n in (c?.optionalDependencies ?? {}) ? "optional" : "", f = Xr(t[n] || ""), p = a ? n in a ? a[n] ? "*owner changed*" : "" : "*unknown*" : "", m = br(Xr(u), f), h = i?.includes("homepage") && (await Ln(n, { pkgFile: o }))?.homepage || "", g = i?.includes("repo") && await Kn(n, void 0, { pkgFile: o }) || "", _ = i?.includes("diff") ? `${process.env.NCU_DIFF || "https://npmdiff.dev"}/${encodeURIComponent(n)}/${u.replace(/^\W+/, "")}/${f.replace(/^\W+/, "")}` : "", v = i?.includes("cooldown"), y = i?.includes("time"), b = (y || v) && !s?.[n] ? "[missing time]" : "", x = y && s?.[n] ? s[n] : null, S = x ? Ut(x, "en_US") : y || !l ? b : "", C = r?.[n]?.version, w = "";
		if (C) {
			let e = cr.includes(f[0]) ? f[0] : "", t = Y.default.coerce(C);
			w = `[cooldown] ${br(f, e + Xr(t && !C.endsWith(t.version) ? `${t.version}-+` : C)).replace(e, "")}`;
		} else v && !y && (w = b);
		return [
			n,
			...i?.includes("dep") ? [d ? X.gray(d) : ""] : [],
			u,
			"→",
			m,
			...l ? [w] : [],
			p,
			...[
				h,
				g,
				_,
				S
			].filter((e) => e)
		];
	})));
}
async function $r({ skippedByCooldown: e, pkgFile: t, options: n }) {
	let r = n.format;
	if (!e || !r?.includes("cooldown") || r?.includes("lines")) return;
	let i = {}, a = {}, o = {};
	for (let t of Object.values(e)) {
		let { name: e, version: n, currentVersion: r, fallbackVersion: s, time: c } = t;
		if (!Jn(r) || !n) continue;
		let l = cr.includes(r[0]) ? r[0] : "", u = l + Wr(s ?? r), d = l + Wr(n);
		i[e] = u, a[e] = br(u, d), o[e] = c || "";
	}
	if (!Object.keys(i).length) return !1;
	let s = await Qr({
		from: i,
		to: a,
		format: r.includes("time") ? r : [...r, "time"],
		pkgFile: t || void 0,
		time: o
	}), c = n.raw?.cooldown ?? n.cooldown;
	return Z(n, "\n" + X.yellow(X.bold(`Skipped due to ${Zr(c)}`))), Z(n, s), !0;
}
async function ei({ current: e, upgraded: t, skippedByCooldown: n, ownersChangedDeps: r, pkgFile: i, time: a }, o) {
	if (o.format?.includes("group")) {
		let s = yr(t, e, o);
		for (let { heading: t, packages: c } of s) Z(o, "\n" + t), Z(o, await Qr({
			from: e,
			to: c,
			skippedByCooldown: n,
			format: o.format,
			ownersChangedDeps: r,
			pkgFile: i,
			time: a
		}));
	} else o.format?.includes("lines") ? qr(t, "\n") : Z(o, await Qr({
		from: e,
		to: t,
		skippedByCooldown: n,
		format: o.format,
		ownersChangedDeps: r,
		pkgFile: i,
		time: a
	}));
}
function ti(e, t) {
	if (t && Object.keys(t).length > 0) {
		let n = new jt.default({
			colAligns: [
				"left",
				"right",
				"right",
				"right",
				"left",
				"left"
			],
			chars: {
				top: "",
				"top-mid": "",
				"top-left": "",
				"top-right": "",
				bottom: "",
				"bottom-mid": "",
				"bottom-left": "",
				"bottom-right": "",
				left: "",
				"left-mid": "",
				mid: "",
				"mid-mid": "",
				right: "",
				"right-mid": "",
				middle: ""
			}
		});
		n.push(...Object.entries(t).map(([e, t]) => [e, X.yellow(t)])), Z(e, "\n" + n.toString());
	}
}
async function ni(e, { current: t, latest: n, upgraded: r, skippedByCooldown: i, total: a, numCooldown: o, ownersChangedDeps: s, pkgFile: c, time: l, errors: u }) {
	let d = Object.keys(r).length, f = await $r({
		skippedByCooldown: i,
		pkgFile: c,
		options: e
	});
	!e.deep && !e.format?.includes("group") && (f && d ? Z(e, "\n" + X.blue(X.bold("Updates"))) : Z(e, ""));
	let p = X.green.bold(":)"), m = Object.keys(u || {}).length, h = typeof e.target == "string" ? e.target : "target";
	d === 0 && a === 0 && m === 0 ? Object.keys(t).length === 0 ? Z(e, "No dependencies.") : n && Object.keys(n).length === 0 && !o && Object.values(Pn(t, (e, t) => Jn(t))).length > 0 ? Z(e, `No package versions were returned. This may be a problem with your installed ${e.packageManager}, the npm registry, or your Internet connection. Make sure ${X.cyan("npx pacote packument ncu-test-v2")} is working before reporting an issue.`) : e.global ? Z(e, `All global packages are up-to-date ${p}`) : Z(e, `All dependencies ${o ? "not in cooldown " : ""}match the ${h} package versions ${p}`) : d === 0 && a > 0 ? Z(e, `No dependencies upgraded ${p}`) : d > 0 && await ei({
		current: t,
		upgraded: r,
		skippedByCooldown: i,
		ownersChangedDeps: s,
		pkgFile: c,
		time: l
	}, e), ti(e, u);
}
function ri(e, t) {
	Z(e, "\nIgnored incompatible updates (peer dependencies):\n"), Z(e, Yr(Object.entries(t).map(([e, { from: t, to: n, reason: r }]) => {
		let i = "reason: " + Object.entries(r).map(([e, t]) => e + " requires " + t).join(", ");
		return [
			e,
			t,
			"→",
			br(t, n),
			i
		];
	})));
}
function ii(e, t) {
	Z(e, "\nIgnored incompatible updates (engines node):\n"), Z(e, Yr(Object.entries(t).map(([e, { from: t, to: n, enginesNode: r }]) => [
		e,
		t,
		"→",
		br(t, n),
		`reason: requires node ${r}`
	])));
}
function ai(e, t = 10) {
	return e.schema === 1 ? typeof e.timestamp == "number" ? e.timestamp + 60 * 1e3 * t < Date.now() : !1 : !0;
}
var oi = ".ncu-cache.json", si = `~/${oi}`, ci = t.join(r.homedir(), oi);
function li(e) {
	return e === si ? ci : e;
}
async function ui(e) {
	e.cacheFile && await n.rm(li(e.cacheFile), { force: !0 });
}
async function di(e) {
	if (!e.cache || !e.cacheFile) return;
	let t = li(e.cacheFile), r = /* @__PURE__ */ new Set(), i = {
		schema: 1,
		timestamp: Date.now(),
		packages: {},
		peers: {}
	};
	try {
		let r = await n.readFile(t, "utf-8"), a = JSON.parse(r);
		if (ai(a, e.cacheExpiration)) await n.rm(t, { force: !0 });
		else {
			let { schema: e, timestamp: t, packages: n = {}, peers: r = {} } = a;
			i = {
				schema: e,
				timestamp: t,
				packages: n,
				peers: r
			};
		}
	} catch {}
	return {
		get: (e, t) => {
			let n = `${e}___${t}`, a = i.packages[n];
			return a && r.add(e), a;
		},
		set: (e, t, n, r) => {
			let a = `${e}___${t}`;
			i.packages[a] = {
				version: n,
				time: r
			};
		},
		getPeers: (e, t) => {
			if (!i.peers) return;
			let n = `${e}___${t}`, a = i.peers[n];
			return a && r.add(e), a;
		},
		setPeers: (e, t, n) => {
			let r = `${e}___${t}`;
			i.peers && (i.peers[r] = n);
		},
		save: async () => {
			await n.writeFile(t, JSON.stringify(i));
		},
		log: (t) => {
			let n = r.size;
			n !== 0 && (Z(e, `\nUsing ${n} cached package ${t ? "peer" : "version"}${n > 1 ? "s" : ""}`, "warn"), Z(e, r, "verbose"), r.clear());
		}
	};
}
//#endregion
//#region src/lib/wrap.ts
var fi = (e, t = 92) => {
	let n = e.split("\n"), r = [];
	for (let e of n) {
		let n = 0;
		if (e.length === 0) {
			r.push("");
			continue;
		}
		for (; n < e.length;) {
			let i = e.slice(n, n + t + 1), a = i.trimEnd();
			if (a.length <= t) {
				r.push(a);
				break;
			}
			let o = i.split("").reverse().join("").match(/[ -][^\W]/)?.index || 0, s = i.slice(0, i.length - o);
			if (s.length === 0) break;
			r.push(s.trimEnd()), n += s.length;
		}
	}
	return r.join("\n").trim();
}, pi = (e) => e.map(([e, t]) => [e, fi(t)]), mi = (e) => e.replace(/`(.+?)`/g, "<code>$1</code>"), hi = (e) => "\n  <tr>" + e.map((e) => `<td>${mi(e)}</td>`).join("") + "</tr>", gi = ({ colAligns: e, markdown: t, rows: n }) => {
	if (t) return `<table>${n.map(hi).join("")}\n</table>`;
	{
		let t = n.map((e) => e.map((e) => e.replace(/`/g, ""))), r = new jt.default({ ...e ? { colAligns: e } : null });
		return r.push(...pi(t)), r.toString();
	}
}, _i = [
	"latest",
	"newest",
	"greatest",
	"minor",
	"patch",
	"semver"
], vi = (e, t) => e.split("\n").map((e) => e && `${"".padStart(t, " ")}${e}`).join("\n"), yi = (e, { markdown: t } = {}) => `${t ? "```js\n" : ""}${vi(e, t ? 0 : 4)}${t ? "\n```" : ""}`, bi = (e) => e.replace(/`/g, ""), xi = (e) => (t) => {
	if (typeof t == "number") return t;
	if (typeof t == "string") {
		let e = parseInt(t, 10);
		if (!isNaN(e)) return e;
	}
	throw Error(`${e} must be a number`);
}, Si = (e, { markdown: t } = {}) => {
	let n = "";
	if (e.cli !== !1 && (n = `Usage:

    ncu --${e.long}${e.arg ? ` [${e.arg}]` : ""}${e.long === "doctor" ? " -u" : ""}\n`), e.type === "boolean" && (n += `    ncu --no-${e.long}\n`), e.short && (n += `    ncu -${e.short}${e.arg ? ` [${e.arg}]` : ""}${e.long === "doctor" ? "u" : ""}\n`), e.default !== void 0 && !(Array.isArray(e.default) && e.default.length === 0) && (n += `\nDefault: ${e.default}\n`), e.help) {
		let r = typeof e.help == "function" ? t ? e.help({ markdown: t }) : bi(e.help({ markdown: t })) : e.help;
		n += `\n${r.trim()}\n\n`;
	} else if (e.description) {
		let r = t ? e.description : bi(e.description);
		n += `\n${r.replace(/`/g, "")}\n`;
	}
	return n.trim();
}, Ci = [
	{
		long: "cache",
		description: `Cache versions to a local cache file. Default \`--cacheFile\` is ${si} and default \`--cacheExpiration\` is 10 minutes.`,
		type: "boolean"
	},
	{
		long: "cacheClear",
		description: "Clear the default cache, or the cache file specified by `--cacheFile`.",
		type: "boolean"
	},
	{
		long: "cacheExpiration",
		arg: "min",
		description: "Cache expiration in minutes. Only works with `--cache`.",
		parse: xi("cacheExpiration"),
		default: 10,
		type: "number"
	},
	{
		long: "cacheFile",
		arg: "path",
		description: "Filepath for the cache file. Only works with `--cache`.",
		parse: (e) => {
			if (typeof e != "string") throw Error("cacheFile must be a string");
			return t.isAbsolute(e) ? e : t.join(process.cwd(), e);
		},
		default: si,
		type: "string"
	},
	{
		long: "color",
		description: "Force color in terminal.",
		type: "boolean"
	},
	{
		long: "concurrency",
		arg: "n",
		description: "Max number of concurrent HTTP requests to registry.",
		parse: xi("concurrency"),
		default: 8,
		type: "number"
	},
	{
		long: "configFileName",
		arg: "s",
		description: "Config file name. (default: .ncurc or .ncurc.{json,yaml,yml,js,mjs,cjs})",
		type: "string"
	},
	{
		long: "configFilePath",
		arg: "path",
		description: "Directory of .ncurc config file. (default: directory of `packageFile`)",
		type: "string"
	},
	{
		long: "cwd",
		arg: "path",
		description: "Working directory in which npm will be executed.",
		type: "string"
	},
	{
		long: "deep",
		description: "Run recursively in current working directory. Alias of (`--packageFile '**/package.json'`).",
		type: "boolean"
	},
	{
		long: "dep",
		arg: "value",
		description: "Check one or more sections of dependencies only: dev, optional, peer, prod, or packageManager (comma-delimited).",
		default: [
			"prod",
			"dev",
			"optional",
			"packageManager"
		],
		parse: (e) => typeof e == "string" ? e.split(/,|\s/) : e,
		type: "string | readonly string[]"
	},
	{
		long: "deprecated",
		default: !0,
		description: "Include deprecated packages. Use `--no-deprecated` to exclude deprecated packages (20–25% slower).",
		type: "boolean"
	},
	{
		long: "doctor",
		short: "d",
		description: "Iteratively installs upgrades and runs tests to identify breaking upgrades. Requires `-u` to execute.",
		type: "boolean",
		help: ({ markdown: e }) => `Iteratively installs upgrades and runs your project's tests to identify breaking upgrades. Reverts broken upgrades and updates package.json with working upgrades.

${X.yellow("Requires `-u` to execute")} (modifies your package file, lock file, and node_modules)

To be more precise:

1. Runs \`npm install\` and \`npm test\` to ensure tests are currently passing.
2. Runs \`ncu -u\` to optimistically upgrade all dependencies.
3. If tests pass, hurray!
4. If tests fail, restores package file and lock file.
5. For each dependency, install upgrade and run tests.
6. Prints broken upgrades with test error.
7. Saves working upgrades to package.json.

Additional options:

${gi({
			markdown: e,
			rows: [[X.cyan("--doctorInstall"), "specify a custom install script (default: `npm install` or `yarn`)"], [X.cyan("--doctorTest"), "specify a custom test script (default: `npm test`)"]]
		})}

Example:

    $ ncu --doctor -u
    Running tests before upgrading
    npm install
    npm run test
    Upgrading all dependencies and re-running tests
    ncu -u
    npm install
    npm run test
    Tests failed
    Identifying broken dependencies
    npm install
    npm install --no-save react@16.0.0
    npm run test
      ✓ react 15.0.0 → 16.0.0
    npm install --no-save react-redux@7.0.0
    npm run test
      ✗ react-redux 6.0.0 → 7.0.0

    /projects/myproject/test.js:13
      throw new Error('Test failed!')
      ^

    npm install --no-save react-dnd@11.1.3
    npm run test
      ✓ react-dnd 10.0.0 → 11.1.3
    Saving partially upgraded package.json
`
	},
	{
		long: "doctorInstall",
		arg: "command",
		description: "Specifies the install script to use in doctor mode. (default: `npm install` or the equivalent for your package manager)",
		type: "string"
	},
	{
		long: "doctorTest",
		arg: "command",
		description: "Specifies the test script to use in doctor mode. (default: `npm test`)",
		type: "string"
	},
	{
		long: "enginesNode",
		description: "Include only packages that satisfy engines.node as specified in the package file.",
		type: "boolean"
	},
	{
		long: "errorLevel",
		short: "e",
		arg: "n",
		description: "Set the error level. 1: exits with error code 0 if no errors occur. 2: exits with error code 0 if no packages need updating (useful for continuous integration).",
		parse: xi("errorLevel"),
		default: 1,
		type: "number"
	},
	{
		long: "filter",
		short: "f",
		arg: "p",
		description: "Include only package names matching the given string, wildcard, glob, comma-or-space-delimited list, /regex/, or predicate function.",
		type: "string | RegExp | readonly (string | RegExp)[] | FilterFunction",
		parse: (e, t) => [...t || [], e],
		help: ({ markdown: e }) => {
			let t = (t) => e ? `\`${t}\`` : t;
			return `Include only package names matching the given string, wildcard, glob, comma-or-space-delimited list, /regex/, or predicate function. Only included packages will be checked with ${t("--peer")}.

${t("--filter")} runs _before_ new versions are fetched, in contrast to ${t("--filterResults")} which runs _after_.

You can also specify a custom function in your .ncurc.js file, or when importing npm-check-updates as a module.

> :warning: The predicate function is only available in .ncurc.js or when importing npm-check-updates as a module, not on the command line. To convert a JSON config to a JS config, follow the instructions at https://github.com/raineorshine/npm-check-updates#config-functions.

${yi(`${X.gray("/**\n  @param name     The name of the dependency.\n  @param semver   A parsed Semver array of the current version.\n    (See: https://git.coolaj86.com/coolaj86/semver-utils.js#semverutils-parse-semverstring)\n  @returns        True if the package should be included, false if it should be excluded.\n*/")}
${X.green("filter")}: (name, semver) ${X.cyan("=>")} {
  ${X.red("if")} (name.startsWith(${X.yellow("'@myorg/'")})) {
    ${X.red("return")} ${X.cyan("false")}
  }
  ${X.red("return")} ${X.cyan("true")}
}`, { markdown: e })}

`;
		}
	},
	{
		long: "filterResults",
		arg: "fn",
		cli: !1,
		description: "Filters results based on a user provided predicate function after fetching new versions.",
		type: "FilterResultsFunction",
		help: ({ markdown: e }) => {
			let t = (t) => e ? `\`${t}\`` : t;
			return `Filters results based on a user provided predicate function after fetching new versions.

${t("filterResults")} runs _after_ new versions are fetched, in contrast to ${t("filter")}, ${t("reject")}, ${t("filterVersion")}, and ${t("rejectVersion")}, which run _before_. This allows you to exclude upgrades with ${t("filterResults")} based on how the version has changed (e.g. a major version change).

> :warning: The predicate function is only available in .ncurc.js or when importing npm-check-updates as a module, not on the command line. To convert a JSON config to a JS config, follow the instructions at https://github.com/raineorshine/npm-check-updates#config-functions.

${yi(`${X.gray("/** Exclude major version updates. Note this could also be achieved with --target semver.\n  @param {string} packageName               The name of the dependency.\n  @param {string} current                   Current version declaration (may be a range).\n  @param {SemVer[]} currentVersionSemver    Current version declaration in semantic versioning format (may be a range).\n  @param {string} upgraded                  Upgraded version.\n  @param {SemVer} upgradedVersionSemver     Upgraded version in semantic versioning format.\n  @returns {boolean}                        Return true if the upgrade should be kept; otherwise, it will be ignored.\n*/")}
${X.green("filterResults")}: (packageName, { current, currentVersionSemver, upgraded, upgradedVersionSemver }) ${X.cyan("=>")} {
  ${X.cyan("const")} currentMajor ${X.red("=")} parseInt(currentVersionSemver[${X.cyan("0")}]?.major, ${X.cyan("10")})
  ${X.cyan("const")} upgradedMajor ${X.red("=")} parseInt(upgradedVersionSemver?.major, ${X.cyan("10")})
  ${X.red("if")} (currentMajor ${X.red("&&")} upgradedMajor) {
    ${X.red("return")} currentMajor ${X.red(">=")} upgradedMajor
  }
  ${X.red("return")} ${X.cyan("true")}
}`, { markdown: e })}

For the SemVer type definition, see: https://git.coolaj86.com/coolaj86/semver-utils.js#semverutils-parse-semverstring

`;
		}
	},
	{
		long: "filterVersion",
		arg: "p",
		description: "Filter on package version using comma-or-space-delimited list, /regex/, or predicate function.",
		type: "string | RegExp | readonly (string | RegExp)[] | FilterFunction",
		parse: (e, t) => [...t || [], e],
		help: ({ markdown: e }) => {
			let t = (t) => e ? `\`${t}\`` : t;
			return `Include only versions matching the given string, wildcard, glob, comma-or-space-delimited list, /regex/, or predicate function.

${t("--filterVersion")} runs _before_ new versions are fetched, in contrast to ${t("--filterResults")} which runs _after_.

You can also specify a custom function in your .ncurc.js file, or when importing npm-check-updates as a module.

> :warning: The predicate function is only available in .ncurc.js or when importing npm-check-updates as a module, not on the command line. To convert a JSON config to a JS config, follow the instructions at https://github.com/raineorshine/npm-check-updates#config-functions. This function is an alias for the ${t("filter")} option function.

${yi(`${X.gray("/**\n  @param name     The name of the dependency.\n  @param semver   A parsed Semver array of the current version.\n    (See: https://git.coolaj86.com/coolaj86/semver-utils.js#semverutils-parse-semverstring)\n  @returns        True if the package should be included, false if it should be excluded.\n*/")}
${X.green("filterVersion")}: (name, semver) ${X.cyan("=>")} {
  ${X.red("if")} (name.startsWith(${X.yellow("'@myorg/'")}) ${X.red("&&")} parseInt(semver[0]?.major) ${X.cyan(">")} ${X.cyan("5")}) {
    ${X.red("return")} ${X.cyan("false")}
  }
  ${X.red("return")} ${X.cyan("true")}
}`, { markdown: e })}

`;
		}
	},
	{
		long: "format",
		arg: "value",
		description: "Modify the output formatting or show additional information. Specify one or more comma-delimited values: dep, group, ownerChanged, repo, time, lines, installedVersion, cooldown.",
		parse: (e) => typeof e == "string" ? e.split(/,|\s/) : e,
		default: [],
		type: "readonly string[]",
		choices: [
			"dep",
			"group",
			"homepage",
			"ownerChanged",
			"repo",
			"diff",
			"time",
			"lines",
			"installedVersion",
			"cooldown"
		],
		help: ({ markdown: e }) => `Modify the output formatting or show additional information. Specify one or more comma-delimited values.\n\n${vi(gi({
			colAligns: ["right", "left"],
			markdown: e,
			rows: [
				["dep", "Prints the dependency type (dev, peer, optional) of each package."],
				["group", "Groups packages by major, minor, patch, and major version zero updates."],
				["homepage", "Displays links to the package's homepage if specified in its package.json."],
				["installedVersion", "Prints the exact current version number instead of a range."],
				["lines", "Prints name@version on separate lines. Useful for piping to npm install."],
				["ownerChanged", "Shows if the package owner has changed."],
				["repo", "Infers and displays links to the package's source code repository. Requires packages to be installed."],
				["diff", "Display link to compare the changes between package versions."],
				["time", "Shows the publish time of each upgrade."],
				["cooldown", "Shows a list of packages that were skipped due to the --cooldown threshold."]
			]
		}), e ? 0 : 4)}
`
	},
	{
		long: "global",
		short: "g",
		description: "Check global packages instead of in the current project.",
		type: "boolean"
	},
	{
		long: "groupFunction",
		arg: "fn",
		cli: !1,
		description: "Customize how packages are divided into groups when using `--format group`.",
		type: "GroupFunction",
		help: ({ markdown: e }) => `Customize how packages are divided into groups when using \`--format group\`.

Only available in .ncurc.js or when importing npm-check-updates as a module, not on the command line. To convert a JSON config to a JS config, follow the instructions at https://github.com/raineorshine/npm-check-updates#config-functions.

${yi(`${X.gray("/**\n  @param name             The name of the dependency.\n  @param defaultGroup     The predefined group name which will be used by default.\n  @param currentSpec      The current version range in your package.json.\n  @param upgradedSpec     The upgraded version range that will be written to your package.json.\n  @param upgradedVersion  The upgraded version number returned by the registry.\n  @returns                A predefined group name ('major' | 'minor' | 'patch' | 'majorVersionZero' | 'none') or a custom string to create your own group.\n*/")}
${X.green("groupFunction")}: (name, defaultGroup, currentSpec, upgradedSpec, upgradedVersion) ${X.cyan("=>")} {
  ${X.red("if")} (name ${X.red("===")} ${X.yellow("'typescript'")} ${X.red("&&")} defaultGroup ${X.red("===")} ${X.yellow("'minor'")}) {
    ${X.red("return")} ${X.yellow("'major'")}
  }
  ${X.red("if")} (name.startsWith(${X.yellow("'@myorg/'")})) {
    ${X.red("return")} ${X.yellow("'My Org'")}
  }
  ${X.red("return")} defaultGroup
}`, { markdown: e })}

`
	},
	{
		long: "install",
		arg: "value",
		description: "Control the auto-install behavior: always, never, prompt.",
		help: ({ markdown: e }) => `Control the auto-install behavior.\n\n${vi(gi({
			colAligns: ["right", "left"],
			markdown: e,
			rows: [
				["always", "Runs your package manager's install command automatically after upgrading."],
				["never", "Does not install and does not prompt."],
				["prompt", "Shows a message after upgrading that recommends an install, but does not install. In interactive mode, prompts for install. (default)"]
			]
		}), e ? 0 : 4)}
`,
		default: "prompt",
		choices: [
			"always",
			"never",
			"prompt"
		],
		type: "'always' | 'never' | 'prompt'"
	},
	{
		long: "interactive",
		short: "i",
		description: "Enable interactive prompts for each dependency; implies `-u` unless one of the json options are set.",
		type: "boolean"
	},
	{
		long: "jsonAll",
		short: "j",
		description: "Output new package file instead of human-readable message.",
		type: "boolean"
	},
	{
		long: "jsonDeps",
		description: "Like `jsonAll` but only lists `dependencies`, `devDependencies`, `optionalDependencies`, etc of the new package data.",
		type: "boolean"
	},
	{
		long: "jsonUpgraded",
		description: "Output upgraded dependencies in json.",
		type: "boolean"
	},
	{
		long: "loglevel",
		short: "l",
		arg: "n",
		description: "Amount to log: silent, error, minimal, warn, info, verbose, silly.",
		default: "warn",
		type: "string"
	},
	{
		long: "mergeConfig",
		description: "Merges nested configs with the root config file for `--deep` or `--packageFile` options. (default: false)",
		type: "boolean"
	},
	{
		long: "minimal",
		short: "m",
		description: "Do not upgrade newer versions that are already satisfied by the version range according to semver.",
		type: "boolean"
	},
	{
		long: "packageData",
		arg: "value",
		description: "Package file data (you can also use stdin).",
		type: "string | PackageFile"
	},
	{
		long: "packageFile",
		arg: "path|glob",
		description: "Package file(s) location. (default: ./package.json)",
		type: "string"
	},
	{
		long: "packageManager",
		short: "p",
		arg: "s",
		description: "npm, yarn, pnpm, deno, bun, staticRegistry (default: npm).",
		help: ({ markdown: e }) => `Specifies the package manager to use when looking up versions.\n\n${vi(gi({
			colAligns: ["right", "left"],
			markdown: e,
			rows: [
				["npm", "System-installed npm. Default."],
				["yarn", "System-installed yarn. Automatically used if yarn.lock is present."],
				["pnpm", "System-installed pnpm. Automatically used if pnpm-lock.yaml is present."],
				["bun", "System-installed bun. Automatically used if bun.lock or bun.lockb is present."]
			]
		}), e ? 0 : 4)}
`,
		type: "'npm' | 'yarn' | 'pnpm' | 'deno' | 'bun' | 'staticRegistry'"
	},
	{
		long: "peer",
		description: "Check peer dependencies of installed packages and filter updates to compatible versions.",
		type: "boolean",
		help: ({ markdown: e }) => {
			let t = (t) => e ? `\`${t}\`` : t;
			return `Check peer dependencies of installed packages and filter updates to compatible versions.

${X.bold("Example")}:

The following example demonstrates how \`--peer\` works, and how it uses peer dependencies from upgraded modules.

The package ${X.bold("ncu-test-peer-update")} has two versions published:

- 1.0.0 has peer dependency ${t("\"ncu-test-return-version\": \"1.0.x\"")}
- 1.1.0 has peer dependency ${t("\"ncu-test-return-version\": \"1.1.x\"")}

Our test app has the following dependencies:

    "ncu-test-peer-update": "1.0.0",
    "ncu-test-return-version": "1.0.0"

The latest versions of these packages are:

    "ncu-test-peer-update": "1.1.0",
    "ncu-test-return-version": "2.0.0"

${X.bold("With `--peer`")}:

ncu upgrades packages to the highest version that still adheres to the peer dependency constraints:

    ncu-test-peer-update     1.0.0  →  1.${X.cyan("1.0")}
    ncu-test-return-version  1.0.0  →  1.${X.cyan("1.0")}

${X.bold("Without `--peer`")}:

As a comparison: without using the \`--peer\` option, ncu will suggest the latest versions, ignoring peer dependencies:

    ncu-test-peer-update     1.0.0  →  1.${X.cyan("1.0")}
    ncu-test-return-version  1.0.0  →  ${X.red("2.0.0")}
`;
		}
	},
	{
		long: "pre",
		arg: "n",
		description: "Include prerelease versions, e.g. -alpha.0, -beta.5, -rc.2. Automatically set to 1 when `--target` is newest or greatest, or when the current version is a prerelease. (default: 0)",
		parse: (e) => {
			if (typeof e == "number") return !!e;
			if (typeof e == "string") return !!parseInt(e, 10);
			throw Error("pre must be a number");
		},
		type: "number"
	},
	{
		long: "prefix",
		arg: "path",
		description: "Current working directory of npm.",
		type: "string"
	},
	{
		long: "registry",
		short: "r",
		arg: "uri",
		description: "Specify the registry to use when looking up package versions.",
		type: "string"
	},
	{
		long: "registryType",
		arg: "type",
		description: "Specify whether --registry refers to a full npm registry or a simple JSON file or url: npm, json. (default: npm)",
		help: ({ markdown: e }) => `${`Specify whether ${((t) => e ? `\`${t}\`` : t)("--registry")} refers to a full npm registry or a simple JSON file.`}\n\n${vi(gi({
			colAligns: ["right", "left"],
			markdown: e,
			rows: [["npm", "Default npm registry"], ["json", `Checks versions from a file or url to a simple JSON registry. Must include the ${X.cyan("`--registry`")} option.

Example:

    ${X.gray("// local file")}
    ${X.cyan("$")} ncu --registryType json --registry ./registry.json

    ${X.gray("// url")}
    ${X.cyan("$")} ncu --registryType json --registry https://api.mydomain/registry.json

    ${X.gray("// you can omit --registryType when the registry ends in .json")}
    ${X.cyan("$")} ncu --registry ./registry.json
    ${X.cyan("$")} ncu --registry https://api.mydomain/registry.json

registry.json:

    {
      "prettier": "2.7.1",
      "typescript": "4.7.4"
    }

`]]
		}), e ? 0 : 4)}
`,
		type: "'npm' | 'json'"
	},
	{
		long: "reject",
		short: "x",
		arg: "p",
		description: "Exclude packages matching the given string, wildcard, glob, comma-or-space-delimited list, /regex/, or predicate function.",
		type: "string | RegExp | readonly (string | RegExp)[] | FilterFunction",
		parse: (e, t) => [...t || [], e],
		help: ({ markdown: e }) => {
			let t = (t) => e ? `\`${t}\`` : t;
			return `The inverse of ${t("--filter")}. Exclude package names matching the given string, wildcard, glob, comma-or-space-delimited list, /regex/, or predicate function. This will also exclude them from the ${t("--peer")} check.

${t("--reject")} runs _before_ new versions are fetched, in contrast to ${t("--filterResults")} which runs _after_.

You can also specify a custom function in your .ncurc.js file, or when importing npm-check-updates as a module.

> :warning: The predicate function is only available in .ncurc.js or when importing npm-check-updates as a module, not on the command line. To convert a JSON config to a JS config, follow the instructions at https://github.com/raineorshine/npm-check-updates#config-functions.

${yi(`${X.gray("/**\n  @param name     The name of the dependency.\n  @param semver   A parsed Semver array of the current version.\n    (See: https://git.coolaj86.com/coolaj86/semver-utils.js#semverutils-parse-semverstring)\n  @returns        True if the package should be excluded, false if it should be included.\n*/")}
${X.green("reject")}: (name, semver) ${X.cyan("=>")} {
  ${X.red("if")} (name.startsWith(${X.yellow("'@myorg/'")})) {
    ${X.red("return")} ${X.cyan("true")}
  }
  ${X.red("return")} ${X.cyan("false")}
}`, { markdown: e })}

`;
		}
	},
	{
		long: "rejectVersion",
		arg: "p",
		description: "Exclude package.json versions using comma-or-space-delimited list, /regex/, or predicate function.",
		type: "string | RegExp | readonly (string | RegExp)[] | FilterFunction",
		parse: (e, t) => [...t || [], e],
		help: ({ markdown: e }) => {
			let t = (t) => e ? `\`${t}\`` : t;
			return `The inverse of ${t("--filterVersion")}. Exclude versions matching the given string, wildcard, glob, comma-or-space-delimited list, /regex/, or predicate function.

${t("--rejectVersion")} runs _before_ new versions are fetched, in contrast to ${t("--filterResults")} which runs _after_.

You can also specify a custom function in your .ncurc.js file, or when importing npm-check-updates as a module.

> :warning: The predicate function is only available in .ncurc.js or when importing npm-check-updates as a module, not on the command line. To convert a JSON config to a JS config, follow the instructions at https://github.com/raineorshine/npm-check-updates#config-functions. This function is an alias for the reject option function.

${yi(`${X.gray("/**\n  @param name     The name of the dependency.\n  @param semver   A parsed Semver array of the current version.\n    (See: https://git.coolaj86.com/coolaj86/semver-utils.js#semverutils-parse-semverstring)\n  @returns        True if the package should be excluded, false if it should be included.\n*/")}
${X.green("rejectVersion")}: (name, semver) ${X.cyan("=>")} {
  ${X.red("if")} (name.startsWith(${X.yellow("'@myorg/'")}) ${X.red("&&")} parseInt(semver[0]?.major) ${X.cyan(">")} ${X.cyan("5")}) {
    ${X.red("return")} ${X.cyan("true")}
  }
  ${X.red("return")} ${X.cyan("false")}
}`, { markdown: e })}

`;
		}
	},
	{
		long: "removeRange",
		description: "Remove version ranges from the final package version.",
		type: "boolean"
	},
	{
		long: "root",
		default: !0,
		description: "Runs updates on the root project in addition to specified workspaces. Only allowed with `--workspace` or `--workspaces`.",
		type: "boolean"
	},
	{
		long: "retry",
		arg: "n",
		description: "Number of times to retry failed requests for package info.",
		parse: xi("retry"),
		default: 3,
		type: "number"
	},
	{
		long: "silent",
		short: "s",
		description: "Don't output anything. Alias for `--loglevel` silent.",
		type: "boolean"
	},
	{
		long: "stdin",
		description: "Read package.json from stdin.",
		type: "string"
	},
	{
		long: "target",
		short: "t",
		arg: "value",
		description: "Determines the version to upgrade to: latest, newest, greatest, minor, patch, semver, `@[tag]`, or [function]. (default: latest)",
		help: ({ markdown: e }) => `Determines the version to upgrade to. (default: "latest")

${vi(gi({
			colAligns: ["right", "left"],
			markdown: e,
			rows: [
				["greatest", "Upgrade to the highest version number published, regardless of release date or tag. Includes prereleases."],
				["latest", "Upgrade to whatever the package's \"latest\" dist-tag points to. When used with --cooldown, falls back to the greatest version that passes the cooldown threshold if the latest is too recent. Use --target \"@latest\" for strict behaviour that skips the package instead. Excludes prereleases unless --pre is specified."],
				["minor", "Upgrade to the highest minor version without bumping the major version."],
				["newest", "Upgrade to the version with the most recent publish date, even if there are other version numbers that are higher. Includes prereleases."],
				["patch", "Upgrade to the highest patch version without bumping the minor or major versions."],
				["semver", "Upgrade to the highest version within the semver range specified in your package.json."],
				["@[tag]", "Upgrade to the version published to a specific tag, e.g. 'next' or 'beta'."]
			]
		}), e ? 0 : 4)}

e.g.

${yi("ncu --target semver")}

You can also specify a custom function in your .ncurc.js file, or when importing npm-check-updates as a module.

> :warning: The predicate function is only available in .ncurc.js or when importing npm-check-updates as a module, not on the command line. To convert a JSON config to a JS config, follow the instructions at https://github.com/raineorshine/npm-check-updates#config-functions.

${yi(`${X.gray("/** Upgrade major version zero to the next minor version, and everything else to latest.\n  @param name     The name of the dependency.\n  @param semver   A parsed Semver object of the upgraded version.\n    (See: https://git.coolaj86.com/coolaj86/semver-utils.js#semverutils-parse-semverstring)\n  @returns        One of the valid target values (specified in the table above).\n*/")}
${X.green("target")}: (name, semver) ${X.cyan("=>")} {
  ${X.red("if")} (parseInt(semver[0]?.major) ${X.red("===")} ${X.yellow("'0'")}) ${X.red("return")} ${X.yellow("'minor'")}
  ${X.red("return")} ${X.yellow("'latest'")}
}`, { markdown: e })}
`,
		type: `${_i.map((e) => `'${e}'`).join(" | ")} | \`@\${string}\` | TargetFunction`
	},
	{
		long: "timeout",
		arg: "ms",
		description: "Global timeout in milliseconds. (default: no global timeout and 30 seconds per npm-registry-fetch)",
		parse: xi("timeout"),
		type: "number"
	},
	{
		long: "upgrade",
		short: "u",
		description: "Overwrite package file with upgraded versions instead of just outputting to console.",
		type: "boolean"
	},
	{
		long: "verbose",
		description: "Log additional information for debugging. Alias for `--loglevel` verbose.",
		type: "boolean"
	},
	{
		long: "workspace",
		arg: "s",
		parse: (e, t) => [...t, e],
		default: [],
		description: "Run on one or more specified workspaces. Add `--no-root` to exclude the root project.",
		type: "readonly string[]"
	},
	{
		long: "workspaces",
		short: "w",
		description: "Run on all workspaces. Add `--no-root` to exclude the root project.",
		type: "boolean"
	},
	{
		long: "cooldown",
		short: "c",
		arg: "period",
		description: "Sets a minimum age for package versions to be considered for upgrade. Accepts a number (days) or a string with a unit: \"7d\" (days), \"12h\" (hours), \"30m\" (minutes). Reduces the risk of installing newly published, potentially compromised packages.",
		type: "number | string | CooldownFunction",
		help: ({ markdown: e }) => `The cooldown option helps protect against supply chain attacks by requiring package versions to be published at least the given amount of time before considering them for upgrade.

The value can be a plain number (days) or a string with a unit suffix:

    --cooldown 7       7 days
    --cooldown 7d      7 days (same as above)
    --cooldown 12h     12 hours
    --cooldown 30m     30 minutes

With the default \`--target latest\`, if the latest dist-tag version is within the cooldown window, ncu falls back to the greatest version that passes the cooldown threshold. To instead skip the package entirely (strict behaviour), use \`--target "@latest"\`.

${X.bold("Example")}:

Let's examine how cooldown works with a package that has these versions available:

    1.0.0          Released 7 days ago    (initial version)
    1.1.0          Released 6 days ago    (minor update)
    1.1.1          Released 5 days ago    (patch update)
    1.2.0          Released 5 days ago    (minor update)
    2.0.0-beta.1   Released 5 days ago    (beta release)
    1.2.1          Released 4 days ago    (patch update)
    1.3.0          Released 4 days ago    (minor update) [latest]
    2.0.0-beta.2   Released 3 days ago    (beta release)
    2.0.0-beta.3   Released 2 days ago    (beta release) [beta]

${X.bold("With default target (latest)")}:

${yi(`${X.cyan("$")} ncu --cooldown 5`, { markdown: e })}

Falls back to 1.2.0 because:

- Latest version (1.3.0) is only 4 days old (within 5-day cooldown)
- 1.2.0 is the greatest version that is at least 5 days old

${X.bold("With `@latest` strict target")}:

${yi(`${X.cyan("$")} ncu --cooldown 5 --target @latest`, { markdown: e })}

No update will be suggested because:

- Latest version (1.3.0) is only 4 days old
- Cooldown requires versions to be at least 5 days old
- \`@latest\` is strict: no fallback to older versions

${X.bold("With `@beta`/`@tag` target")}:

${yi(`${X.cyan("$")} ncu --cooldown 3 --target @beta`, { markdown: e })}

No update will be suggested because:

- Current beta (2.0.0-beta.3) is only 2 days old
- Cooldown requires versions to be at least 3 days old
- Use \`--cooldown 2\` or lower to allow this update

${X.bold("With other targets")}:

${yi(`${X.cyan("$")} ncu --cooldown 5 --target greatest|newest|minor|patch|semver`, { markdown: e })}

Each target will select the best version that is at least 5 days old:

    greatest → 1.2.0        (highest version number outside cooldown)
    newest   → 2.0.0-beta.1 (most recently published version outside cooldown)
    minor    → 1.2.0        (highest minor version outside cooldown)
    patch    → 1.1.1        (highest patch version outside cooldown)

You can also provide a custom function in your .ncurc.js file or when importing npm-check-updates as a module.

> :warning: The predicate function is only available in .ncurc.js or when importing npm-check-updates as a module, not on the command line. To convert a JSON config to a JS config, follow the instructions at https://github.com/raineorshine/npm-check-updates#config-functions.

${yi(`${X.gray("/** Set cooldown to 3 days but skip it for `@my-company` packages.\n  @param packageName     The name of the dependency.\n  @returns               Cooldown days restriction for given package.\n*/")}
${X.green("cooldown")}: packageName ${X.cyan("=>")} (packageName.startsWith(${X.yellow("'@my-company'")}) ? ${X.cyan("0")} : ${X.cyan("3")})`, { markdown: e })}

### Package Manager Configurations

If \`--cooldown\` is not set explicitly, \`ncu\` automatically reads the cooldown configuration from your package manager's own native config — each package manager only consults its own config and these are not cross-applied between package managers:

${gi({
			colAligns: ["right", "left"],
			markdown: e,
			rows: [
				["npm", "Reads `min-release-age` from `.npmrc`, excluding packages matched by `min-release-age-exclude`."],
				["yarn", "Reads `npmMinimalAgeGate` from `.yarnrc.yml`, excluding packages matched by `npmPreapprovedPackages`."],
				["pnpm", "Reads `minimumReleaseAge` from `pnpm-workspace.yaml`, excluding packages matched by `minimumReleaseAgeExclude`."]
			]
		})}

### Cooldown Formatting

When using \`--format cooldown\` alongside the \`--cooldown\` option, \`ncu\` will show a list of packages that were skipped due to the \`--cooldown\` threshold.

Example:

${yi("ncu --format cooldown --cooldown 7", { markdown: e })}

Output:

${yi("Skipped due to 7-day cooldown\n @typescript-eslint/parser  ^8.50.0  →  ^8.59.1      5 days ago\n eslint                     ^10.0.1  →  ^10.3.0      1 day ago")}
`,
		parse: (e) => {
			if (typeof e == "number" || typeof e == "function") return e;
			if (typeof e == "string") {
				let t = Xn(e);
				return t === null ? parseInt(e, 10) : t;
			} else throw Error("cooldown must be a number, string, or function");
		}
	}
], wi = Ci.reduce((e, t) => ({
	...e,
	...t.short ? { [t.short]: t } : null,
	...t.long ? { [t.long]: t } : null
}), {}), Ti = rr(Ci, (e) => e.long), Ei = [
	"package-lock.json",
	"yarn.lock",
	"pnpm-lock.yaml",
	"deno.json",
	"deno.jsonc",
	"bun.lock",
	"bun.lockb"
];
async function Di(e, i = n.readdir) {
	try {
		let n = r.homedir(), a = r.tmpdir(), o = e.cwd ? e.cwd : e.packageFile ? t.dirname(e.packageFile) : ".";
		for (o = t.resolve(o);;) {
			let e = await i(o);
			for (let t of Ei) if (e.includes(t)) return {
				directoryPath: o,
				filename: t
			};
			let r = t.resolve(o, "..");
			if (r === o || r === n || r === a) break;
			o = r;
		}
	} catch {}
	return null;
}
//#endregion
//#region src/lib/determinePackageManager.ts
var Oi = t.dirname(s(import.meta.url)), ki = {
	"package-lock": "npm",
	yarn: "yarn",
	"pnpm-lock": "pnpm",
	deno: "deno",
	bun: "bun"
}, Ai = () => {
	let e = process.env.npm_config_user_agent ?? "", t = process.env.npm_execpath ?? "";
	return e.startsWith("yarn/") || t.includes("yarn") || Oi.includes("/yarn/") || Oi.includes("\\Yarn\\") ? "yarn" : e.startsWith("pnpm/") || t.includes("pnpm") || Oi.includes("/pnpm/") || Oi.includes("\\pnpm\\") ? "pnpm" : e.startsWith("bun/") || typeof Bun < "u" || process.versions.bun || Oi.includes("/.bun/") || Oi.includes("\\.bun\\") ? "bun" : "npm";
}, ji = async (e, t = n.readdir) => {
	if (e.packageManager) return e.packageManager;
	if (e.global) return Ai();
	let r = (await Di(e, t))?.filename;
	return r ? ki[r.split(".")[0]] : "npm";
}, Mi = /* @__PURE__ */ w(((e, t) => {
	t.exports = a, a.sync = o;
	var n = k("fs");
	function r(e, t) {
		var n = t.pathExt === void 0 ? process.env.PATHEXT : t.pathExt;
		if (!n || (n = n.split(";"), n.indexOf("") !== -1)) return !0;
		for (var r = 0; r < n.length; r++) {
			var i = n[r].toLowerCase();
			if (i && e.substr(-i.length).toLowerCase() === i) return !0;
		}
		return !1;
	}
	function i(e, t, n) {
		return !e.isSymbolicLink() && !e.isFile() ? !1 : r(t, n);
	}
	function a(e, t, r) {
		n.stat(e, function(n, a) {
			r(n, n ? !1 : i(a, e, t));
		});
	}
	function o(e, t) {
		return i(n.statSync(e), e, t);
	}
})), Ni = /* @__PURE__ */ w(((e, t) => {
	t.exports = r, r.sync = i;
	var n = k("fs");
	function r(e, t, r) {
		n.stat(e, function(e, n) {
			r(e, e ? !1 : a(n, t));
		});
	}
	function i(e, t) {
		return a(n.statSync(e), t);
	}
	function a(e, t) {
		return e.isFile() && o(e, t);
	}
	function o(e, t) {
		var n = e.mode, r = e.uid, i = e.gid, a = t.uid === void 0 ? process.getuid && process.getuid() : t.uid, o = t.gid === void 0 ? process.getgid && process.getgid() : t.gid, s = 64, c = 8, l = 1, u = s | c;
		return n & l || n & c && i === o || n & s && r === a || n & u && a === 0;
	}
})), Pi = /* @__PURE__ */ w(((e, t) => {
	k("fs");
	var n = process.platform === "win32" || global.TESTING_WINDOWS ? Mi() : Ni();
	t.exports = r, r.sync = i;
	function r(e, t, i) {
		if (typeof t == "function" && (i = t, t = {}), !i) {
			if (typeof Promise != "function") throw TypeError("callback not provided");
			return new Promise(function(n, i) {
				r(e, t || {}, function(e, t) {
					e ? i(e) : n(t);
				});
			});
		}
		n(e, t || {}, function(e, n) {
			e && (e.code === "EACCES" || t && t.ignoreErrors) && (e = null, n = !1), i(e, n);
		});
	}
	function i(e, t) {
		try {
			return n.sync(e, t || {});
		} catch (e) {
			if (t && t.ignoreErrors || e.code === "EACCES") return !1;
			throw e;
		}
	}
})), Fi = /* @__PURE__ */ w(((e, t) => {
	var n = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", r = k("path"), i = n ? ";" : ":", a = Pi(), o = (e) => Object.assign(/* @__PURE__ */ Error(`not found: ${e}`), { code: "ENOENT" }), s = (e, t) => {
		let r = t.colon || i, a = e.match(/\//) || n && e.match(/\\/) ? [""] : [...n ? [process.cwd()] : [], ...(t.path || process.env.PATH || "").split(r)], o = n ? t.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", s = n ? o.split(r) : [""];
		return n && e.indexOf(".") !== -1 && s[0] !== "" && s.unshift(""), {
			pathEnv: a,
			pathExt: s,
			pathExtExe: o
		};
	}, c = (e, t, n) => {
		typeof t == "function" && (n = t, t = {}), t ||= {};
		let { pathEnv: i, pathExt: c, pathExtExe: l } = s(e, t), u = [], d = (n) => new Promise((a, s) => {
			if (n === i.length) return t.all && u.length ? a(u) : s(o(e));
			let c = i[n], l = /^".*"$/.test(c) ? c.slice(1, -1) : c, d = r.join(l, e);
			a(f(!l && /^\.[\\\/]/.test(e) ? e.slice(0, 2) + d : d, n, 0));
		}), f = (e, n, r) => new Promise((i, o) => {
			if (r === c.length) return i(d(n + 1));
			let s = c[r];
			a(e + s, { pathExt: l }, (a, o) => {
				if (!a && o) if (t.all) u.push(e + s);
				else return i(e + s);
				return i(f(e, n, r + 1));
			});
		});
		return n ? d(0).then((e) => n(null, e), n) : d(0);
	};
	t.exports = c, c.sync = (e, t) => {
		t ||= {};
		let { pathEnv: n, pathExt: i, pathExtExe: c } = s(e, t), l = [];
		for (let o = 0; o < n.length; o++) {
			let s = n[o], u = /^".*"$/.test(s) ? s.slice(1, -1) : s, d = r.join(u, e), f = !u && /^\.[\\\/]/.test(e) ? e.slice(0, 2) + d : d;
			for (let e = 0; e < i.length; e++) {
				let n = f + i[e];
				try {
					if (a.sync(n, { pathExt: c })) if (t.all) l.push(n);
					else return n;
				} catch {}
			}
		}
		if (t.all && l.length) return l;
		if (t.nothrow) return null;
		throw o(e);
	};
})), Ii = /* @__PURE__ */ w(((e, t) => {
	var n = (e = {}) => {
		let t = e.env || process.env;
		return (e.platform || process.platform) === "win32" ? Object.keys(t).reverse().find((e) => e.toUpperCase() === "PATH") || "Path" : "PATH";
	};
	t.exports = n, t.exports.default = n;
})), Li = /* @__PURE__ */ w(((e, t) => {
	var n = k("path"), r = Fi(), i = Ii();
	function a(e, t) {
		let a = e.options.env || process.env, o = process.cwd(), s = e.options.cwd != null, c = s && process.chdir !== void 0 && !process.chdir.disabled;
		if (c) try {
			process.chdir(e.options.cwd);
		} catch {}
		let l;
		try {
			l = r.sync(e.command, {
				path: a[i({ env: a })],
				pathExt: t ? n.delimiter : void 0
			});
		} catch {} finally {
			c && process.chdir(o);
		}
		return l &&= n.resolve(s ? e.options.cwd : "", l), l;
	}
	function o(e) {
		return a(e) || a(e, !0);
	}
	t.exports = o;
})), Ri = /* @__PURE__ */ w(((e, t) => {
	var n = /([()\][%!^"`<>&|;, *?])/g;
	function r(e) {
		return e = e.replace(n, "^$1"), e;
	}
	function i(e, t) {
		return e = `${e}`, e = e.replace(/(?=(\\+?)?)\1"/g, "$1$1\\\""), e = e.replace(/(?=(\\+?)?)\1$/, "$1$1"), e = `"${e}"`, e = e.replace(n, "^$1"), t && (e = e.replace(n, "^$1")), e;
	}
	t.exports.command = r, t.exports.argument = i;
})), zi = /* @__PURE__ */ w(((e, t) => {
	t.exports = /^#!(.*)/;
})), Bi = /* @__PURE__ */ w(((e, t) => {
	var n = zi();
	t.exports = (e = "") => {
		let t = e.match(n);
		if (!t) return null;
		let [r, i] = t[0].replace(/#! ?/, "").split(" "), a = r.split("/").pop();
		return a === "env" ? i : i ? `${a} ${i}` : a;
	};
})), Vi = /* @__PURE__ */ w(((e, t) => {
	var n = k("fs"), r = Bi();
	function i(e) {
		let t = Buffer.alloc(150), i;
		try {
			i = n.openSync(e, "r"), n.readSync(i, t, 0, 150, 0), n.closeSync(i);
		} catch {}
		return r(t.toString());
	}
	t.exports = i;
})), Hi = /* @__PURE__ */ w(((e, t) => {
	var n = k("path"), r = Li(), i = Ri(), a = Vi(), o = process.platform === "win32", s = /\.(?:com|exe)$/i, c = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
	function l(e) {
		e.file = r(e);
		let t = e.file && a(e.file);
		return t ? (e.args.unshift(e.file), e.command = t, r(e)) : e.file;
	}
	function u(e) {
		if (!o) return e;
		let t = l(e), r = !s.test(t);
		if (e.options.forceShell || r) {
			let r = c.test(t);
			e.command = n.normalize(e.command), e.command = i.command(e.command), e.args = e.args.map((e) => i.argument(e, r)), e.args = [
				"/d",
				"/s",
				"/c",
				`"${[e.command].concat(e.args).join(" ")}"`
			], e.command = process.env.comspec || "cmd.exe", e.options.windowsVerbatimArguments = !0;
		}
		return e;
	}
	function d(e, t, n) {
		t && !Array.isArray(t) && (n = t, t = null), t = t ? t.slice(0) : [], n = Object.assign({}, n);
		let r = {
			command: e,
			args: t,
			options: n,
			file: void 0,
			original: {
				command: e,
				args: t
			}
		};
		return n.shell ? r : u(r);
	}
	t.exports = d;
})), Ui = /* @__PURE__ */ w(((e, t) => {
	var n = process.platform === "win32";
	function r(e, t) {
		return Object.assign(/* @__PURE__ */ Error(`${t} ${e.command} ENOENT`), {
			code: "ENOENT",
			errno: "ENOENT",
			syscall: `${t} ${e.command}`,
			path: e.command,
			spawnargs: e.args
		});
	}
	function i(e, t) {
		if (!n) return;
		let r = e.emit;
		e.emit = function(n, i) {
			if (n === "exit") {
				let n = a(i, t);
				if (n) return r.call(e, "error", n);
			}
			return r.apply(e, arguments);
		};
	}
	function a(e, t) {
		return n && e === 1 && !t.file ? r(t.original, "spawn") : null;
	}
	function o(e, t) {
		return n && e === 1 && !t.file ? r(t.original, "spawnSync") : null;
	}
	t.exports = {
		hookChildProcess: i,
		verifyENOENT: a,
		verifyENOENTSync: o,
		notFoundError: r
	};
})), Wi = /* @__PURE__ */ w(((e, t) => {
	var n = k("child_process"), r = Hi(), i = Ui();
	function a(e, t, a) {
		let o = r(e, t, a), s = n.spawn(o.command, o.args, o.options);
		return i.hookChildProcess(s, o), s;
	}
	function o(e, t, a) {
		let o = r(e, t, a), s = n.spawnSync(o.command, o.args, o.options);
		return s.error = s.error || i.verifyENOENTSync(s.status, o), s;
	}
	t.exports = a, t.exports.spawn = a, t.exports.sync = o, t.exports._parse = r, t.exports._enoent = i;
})), Gi = /* @__PURE__ */ D((/* @__PURE__ */ w(((e, t) => {
	var n = Wi();
	t.exports = (e, t, r = {}, i = {}) => {
		r.rejectOnError === void 0 && (r.rejectOnError = !0);
		let a = "", o = "", s = n(e, t, i);
		return new Promise((e, t) => {
			r.stdin !== void 0 && r.stdin != null && s.stdin.write(r.stdin), s.stdin.end(), s.stdout.on("data", (e) => {
				a += e, r.stdout && r.stdout(e);
			}), s.stderr.on("data", (e) => {
				o += e, r.stderr && r.stderr(e);
			}), r.rejectOnError && s.addListener("error", t), s.on("close", (n) => {
				n !== 0 && r.rejectOnError ? t(o) : e({
					stdout: a,
					stderr: o
				});
			});
		});
	};
})))(), 1), Q;
(function(e) {
	e[e.BACKSPACE = 8] = "BACKSPACE", e[e.FORM_FEED = 12] = "FORM_FEED", e[e.NEWLINE = 10] = "NEWLINE", e[e.CARRIAGE_RETURN = 13] = "CARRIAGE_RETURN", e[e.TAB = 9] = "TAB", e[e.SPACE = 32] = "SPACE", e[e.EXCLAMATION_MARK = 33] = "EXCLAMATION_MARK", e[e.QUOTATION_MARK = 34] = "QUOTATION_MARK", e[e.NUMBER_SIGN = 35] = "NUMBER_SIGN", e[e.DOLLAR_SIGN = 36] = "DOLLAR_SIGN", e[e.PERCENT_SIGN = 37] = "PERCENT_SIGN", e[e.AMPERSAND = 38] = "AMPERSAND", e[e.APOSTROPHE = 39] = "APOSTROPHE", e[e.LEFT_PARENTHESIS = 40] = "LEFT_PARENTHESIS", e[e.RIGHT_PARENTHESIS = 41] = "RIGHT_PARENTHESIS", e[e.ASTERISK = 42] = "ASTERISK", e[e.PLUS_SIGN = 43] = "PLUS_SIGN", e[e.COMMA = 44] = "COMMA", e[e.HYPHEN_MINUS = 45] = "HYPHEN_MINUS", e[e.FULL_STOP = 46] = "FULL_STOP", e[e.SOLIDUS = 47] = "SOLIDUS", e[e.DIGIT_ZERO = 48] = "DIGIT_ZERO", e[e.DIGIT_ONE = 49] = "DIGIT_ONE", e[e.DIGIT_TWO = 50] = "DIGIT_TWO", e[e.DIGIT_THREE = 51] = "DIGIT_THREE", e[e.DIGIT_FOUR = 52] = "DIGIT_FOUR", e[e.DIGIT_FIVE = 53] = "DIGIT_FIVE", e[e.DIGIT_SIX = 54] = "DIGIT_SIX", e[e.DIGIT_SEVEN = 55] = "DIGIT_SEVEN", e[e.DIGIT_EIGHT = 56] = "DIGIT_EIGHT", e[e.DIGIT_NINE = 57] = "DIGIT_NINE", e[e.COLON = 58] = "COLON", e[e.SEMICOLON = 59] = "SEMICOLON", e[e.LESS_THAN_SIGN = 60] = "LESS_THAN_SIGN", e[e.EQUALS_SIGN = 61] = "EQUALS_SIGN", e[e.GREATER_THAN_SIGN = 62] = "GREATER_THAN_SIGN", e[e.QUESTION_MARK = 63] = "QUESTION_MARK", e[e.COMMERCIAL_AT = 64] = "COMMERCIAL_AT", e[e.LATIN_CAPITAL_LETTER_A = 65] = "LATIN_CAPITAL_LETTER_A", e[e.LATIN_CAPITAL_LETTER_B = 66] = "LATIN_CAPITAL_LETTER_B", e[e.LATIN_CAPITAL_LETTER_C = 67] = "LATIN_CAPITAL_LETTER_C", e[e.LATIN_CAPITAL_LETTER_D = 68] = "LATIN_CAPITAL_LETTER_D", e[e.LATIN_CAPITAL_LETTER_E = 69] = "LATIN_CAPITAL_LETTER_E", e[e.LATIN_CAPITAL_LETTER_F = 70] = "LATIN_CAPITAL_LETTER_F", e[e.LATIN_CAPITAL_LETTER_G = 71] = "LATIN_CAPITAL_LETTER_G", e[e.LATIN_CAPITAL_LETTER_H = 72] = "LATIN_CAPITAL_LETTER_H", e[e.LATIN_CAPITAL_LETTER_I = 73] = "LATIN_CAPITAL_LETTER_I", e[e.LATIN_CAPITAL_LETTER_J = 74] = "LATIN_CAPITAL_LETTER_J", e[e.LATIN_CAPITAL_LETTER_K = 75] = "LATIN_CAPITAL_LETTER_K", e[e.LATIN_CAPITAL_LETTER_L = 76] = "LATIN_CAPITAL_LETTER_L", e[e.LATIN_CAPITAL_LETTER_M = 77] = "LATIN_CAPITAL_LETTER_M", e[e.LATIN_CAPITAL_LETTER_N = 78] = "LATIN_CAPITAL_LETTER_N", e[e.LATIN_CAPITAL_LETTER_O = 79] = "LATIN_CAPITAL_LETTER_O", e[e.LATIN_CAPITAL_LETTER_P = 80] = "LATIN_CAPITAL_LETTER_P", e[e.LATIN_CAPITAL_LETTER_Q = 81] = "LATIN_CAPITAL_LETTER_Q", e[e.LATIN_CAPITAL_LETTER_R = 82] = "LATIN_CAPITAL_LETTER_R", e[e.LATIN_CAPITAL_LETTER_S = 83] = "LATIN_CAPITAL_LETTER_S", e[e.LATIN_CAPITAL_LETTER_T = 84] = "LATIN_CAPITAL_LETTER_T", e[e.LATIN_CAPITAL_LETTER_U = 85] = "LATIN_CAPITAL_LETTER_U", e[e.LATIN_CAPITAL_LETTER_V = 86] = "LATIN_CAPITAL_LETTER_V", e[e.LATIN_CAPITAL_LETTER_W = 87] = "LATIN_CAPITAL_LETTER_W", e[e.LATIN_CAPITAL_LETTER_X = 88] = "LATIN_CAPITAL_LETTER_X", e[e.LATIN_CAPITAL_LETTER_Y = 89] = "LATIN_CAPITAL_LETTER_Y", e[e.LATIN_CAPITAL_LETTER_Z = 90] = "LATIN_CAPITAL_LETTER_Z", e[e.LEFT_SQUARE_BRACKET = 91] = "LEFT_SQUARE_BRACKET", e[e.REVERSE_SOLIDUS = 92] = "REVERSE_SOLIDUS", e[e.RIGHT_SQUARE_BRACKET = 93] = "RIGHT_SQUARE_BRACKET", e[e.CIRCUMFLEX_ACCENT = 94] = "CIRCUMFLEX_ACCENT", e[e.LOW_LINE = 95] = "LOW_LINE", e[e.GRAVE_ACCENT = 96] = "GRAVE_ACCENT", e[e.LATIN_SMALL_LETTER_A = 97] = "LATIN_SMALL_LETTER_A", e[e.LATIN_SMALL_LETTER_B = 98] = "LATIN_SMALL_LETTER_B", e[e.LATIN_SMALL_LETTER_C = 99] = "LATIN_SMALL_LETTER_C", e[e.LATIN_SMALL_LETTER_D = 100] = "LATIN_SMALL_LETTER_D", e[e.LATIN_SMALL_LETTER_E = 101] = "LATIN_SMALL_LETTER_E", e[e.LATIN_SMALL_LETTER_F = 102] = "LATIN_SMALL_LETTER_F", e[e.LATIN_SMALL_LETTER_G = 103] = "LATIN_SMALL_LETTER_G", e[e.LATIN_SMALL_LETTER_H = 104] = "LATIN_SMALL_LETTER_H", e[e.LATIN_SMALL_LETTER_I = 105] = "LATIN_SMALL_LETTER_I", e[e.LATIN_SMALL_LETTER_J = 106] = "LATIN_SMALL_LETTER_J", e[e.LATIN_SMALL_LETTER_K = 107] = "LATIN_SMALL_LETTER_K", e[e.LATIN_SMALL_LETTER_L = 108] = "LATIN_SMALL_LETTER_L", e[e.LATIN_SMALL_LETTER_M = 109] = "LATIN_SMALL_LETTER_M", e[e.LATIN_SMALL_LETTER_N = 110] = "LATIN_SMALL_LETTER_N", e[e.LATIN_SMALL_LETTER_O = 111] = "LATIN_SMALL_LETTER_O", e[e.LATIN_SMALL_LETTER_P = 112] = "LATIN_SMALL_LETTER_P", e[e.LATIN_SMALL_LETTER_Q = 113] = "LATIN_SMALL_LETTER_Q", e[e.LATIN_SMALL_LETTER_R = 114] = "LATIN_SMALL_LETTER_R", e[e.LATIN_SMALL_LETTER_S = 115] = "LATIN_SMALL_LETTER_S", e[e.LATIN_SMALL_LETTER_T = 116] = "LATIN_SMALL_LETTER_T", e[e.LATIN_SMALL_LETTER_U = 117] = "LATIN_SMALL_LETTER_U", e[e.LATIN_SMALL_LETTER_V = 118] = "LATIN_SMALL_LETTER_V", e[e.LATIN_SMALL_LETTER_W = 119] = "LATIN_SMALL_LETTER_W", e[e.LATIN_SMALL_LETTER_X = 120] = "LATIN_SMALL_LETTER_X", e[e.LATIN_SMALL_LETTER_Y = 121] = "LATIN_SMALL_LETTER_Y", e[e.LATIN_SMALL_LETTER_Z = 122] = "LATIN_SMALL_LETTER_Z", e[e.LEFT_CURLY_BRACKET = 123] = "LEFT_CURLY_BRACKET", e[e.VERTICAL_LINE = 124] = "VERTICAL_LINE", e[e.RIGHT_CURLY_BRACKET = 125] = "RIGHT_CURLY_BRACKET", e[e.TILDE = 126] = "TILDE";
})(Q ||= {});
var Ki = {
	[Q.QUOTATION_MARK]: Q.QUOTATION_MARK,
	[Q.REVERSE_SOLIDUS]: Q.REVERSE_SOLIDUS,
	[Q.SOLIDUS]: Q.SOLIDUS,
	[Q.LATIN_SMALL_LETTER_B]: Q.BACKSPACE,
	[Q.LATIN_SMALL_LETTER_F]: Q.FORM_FEED,
	[Q.LATIN_SMALL_LETTER_N]: Q.NEWLINE,
	[Q.LATIN_SMALL_LETTER_R]: Q.CARRIAGE_RETURN,
	[Q.LATIN_SMALL_LETTER_T]: Q.TAB
}, qi = class {
	constructor() {
		this.decoder = new TextDecoder("utf-8"), this.strings = [], this.byteLength = 0;
	}
	appendChar(e) {
		this.strings.push(String.fromCharCode(e)), this.byteLength += 1;
	}
	appendBuf(e, t = 0, n = e.length) {
		this.strings.push(this.decoder.decode(e.subarray(t, n))), this.byteLength += n - t;
	}
	reset() {
		this.strings = [], this.byteLength = 0;
	}
	toString() {
		return this.strings.join("");
	}
}, Ji = class {
	constructor(e) {
		this.decoder = new TextDecoder("utf-8"), this.bufferOffset = 0, this.string = "", this.byteLength = 0, this.buffer = new Uint8Array(e);
	}
	appendChar(e) {
		this.bufferOffset >= this.buffer.length && this.flushStringBuffer(), this.buffer[this.bufferOffset++] = e, this.byteLength += 1;
	}
	appendBuf(e, t = 0, n = e.length) {
		let r = n - t;
		this.bufferOffset + r > this.buffer.length && this.flushStringBuffer(), this.buffer.set(e.subarray(t, n), this.bufferOffset), this.bufferOffset += r, this.byteLength += r;
	}
	flushStringBuffer() {
		this.string += this.decoder.decode(this.buffer.subarray(0, this.bufferOffset)), this.bufferOffset = 0;
	}
	reset() {
		this.string = "", this.bufferOffset = 0, this.byteLength = 0;
	}
	toString() {
		return this.flushStringBuffer(), this.string;
	}
}, Yi;
(function(e) {
	e[e.LEFT_BRACE = 0] = "LEFT_BRACE", e[e.RIGHT_BRACE = 1] = "RIGHT_BRACE", e[e.LEFT_BRACKET = 2] = "LEFT_BRACKET", e[e.RIGHT_BRACKET = 3] = "RIGHT_BRACKET", e[e.COLON = 4] = "COLON", e[e.COMMA = 5] = "COMMA", e[e.TRUE = 6] = "TRUE", e[e.FALSE = 7] = "FALSE", e[e.NULL = 8] = "NULL", e[e.STRING = 9] = "STRING", e[e.NUMBER = 10] = "NUMBER", e[e.SEPARATOR = 11] = "SEPARATOR";
})(Yi ||= {});
var Xi = Yi, $;
(function(e) {
	e[e.START = 0] = "START", e[e.ENDED = 1] = "ENDED", e[e.ERROR = 2] = "ERROR", e[e.TRUE1 = 3] = "TRUE1", e[e.TRUE2 = 4] = "TRUE2", e[e.TRUE3 = 5] = "TRUE3", e[e.FALSE1 = 6] = "FALSE1", e[e.FALSE2 = 7] = "FALSE2", e[e.FALSE3 = 8] = "FALSE3", e[e.FALSE4 = 9] = "FALSE4", e[e.NULL1 = 10] = "NULL1", e[e.NULL2 = 11] = "NULL2", e[e.NULL3 = 12] = "NULL3", e[e.STRING_DEFAULT = 13] = "STRING_DEFAULT", e[e.STRING_AFTER_BACKSLASH = 14] = "STRING_AFTER_BACKSLASH", e[e.STRING_UNICODE_DIGIT_1 = 15] = "STRING_UNICODE_DIGIT_1", e[e.STRING_UNICODE_DIGIT_2 = 16] = "STRING_UNICODE_DIGIT_2", e[e.STRING_UNICODE_DIGIT_3 = 17] = "STRING_UNICODE_DIGIT_3", e[e.STRING_UNICODE_DIGIT_4 = 18] = "STRING_UNICODE_DIGIT_4", e[e.STRING_INCOMPLETE_CHAR = 19] = "STRING_INCOMPLETE_CHAR", e[e.NUMBER_AFTER_INITIAL_MINUS = 20] = "NUMBER_AFTER_INITIAL_MINUS", e[e.NUMBER_AFTER_INITIAL_ZERO = 21] = "NUMBER_AFTER_INITIAL_ZERO", e[e.NUMBER_AFTER_INITIAL_NON_ZERO = 22] = "NUMBER_AFTER_INITIAL_NON_ZERO", e[e.NUMBER_AFTER_FULL_STOP = 23] = "NUMBER_AFTER_FULL_STOP", e[e.NUMBER_AFTER_DECIMAL = 24] = "NUMBER_AFTER_DECIMAL", e[e.NUMBER_AFTER_E = 25] = "NUMBER_AFTER_E", e[e.NUMBER_AFTER_E_AND_SIGN = 26] = "NUMBER_AFTER_E_AND_SIGN", e[e.NUMBER_AFTER_E_AND_DIGIT = 27] = "NUMBER_AFTER_E_AND_DIGIT", e[e.SEPARATOR = 28] = "SEPARATOR", e[e.BOM_OR_START = 29] = "BOM_OR_START", e[e.BOM = 30] = "BOM";
})($ ||= {});
function Zi(e) {
	return (/* @__PURE__ */ "START.ENDED.ERROR.TRUE1.TRUE2.TRUE3.FALSE1.FALSE2.FALSE3.FALSE4.NULL1.NULL2.NULL3.STRING_DEFAULT.STRING_AFTER_BACKSLASH.STRING_UNICODE_DIGIT_1.STRING_UNICODE_DIGIT_2.STRING_UNICODE_DIGIT_3.STRING_UNICODE_DIGIT_4.STRING_INCOMPLETE_CHAR.NUMBER_AFTER_INITIAL_MINUS.NUMBER_AFTER_INITIAL_ZERO.NUMBER_AFTER_INITIAL_NON_ZERO.NUMBER_AFTER_FULL_STOP.NUMBER_AFTER_DECIMAL.NUMBER_AFTER_E.NUMBER_AFTER_E_AND_SIGN.NUMBER_AFTER_E_AND_DIGIT.SEPARATOR.BOM_OR_START.BOM".split("."))[e];
}
var Qi = {
	stringBufferSize: 0,
	numberBufferSize: 0,
	separator: void 0,
	emitPartialTokens: !1
}, $i = class e extends Error {
	constructor(t) {
		super(t), Object.setPrototypeOf(this, e.prototype);
	}
}, ea = class {
	constructor(e) {
		this.state = $.BOM_OR_START, this.bomIndex = 0, this.separatorIndex = 0, this.escapedCharsByteLength = 0, this.bytes_remaining = 0, this.bytes_in_sequence = 0, this.char_split_buffer = /* @__PURE__ */ new Uint8Array(4), this.encoder = new TextEncoder(), this.offset = -1, e = Object.assign(Object.assign({}, Qi), e), this.emitPartialTokens = e.emitPartialTokens === !0, this.bufferedString = e.stringBufferSize && e.stringBufferSize > 4 ? new Ji(e.stringBufferSize) : new qi(), this.bufferedNumber = e.numberBufferSize && e.numberBufferSize > 0 ? new Ji(e.numberBufferSize) : new qi(), this.separator = e.separator, this.separatorBytes = e.separator ? this.encoder.encode(e.separator) : void 0;
	}
	get isEnded() {
		return this.state === $.ENDED;
	}
	write(e) {
		try {
			let t;
			if (e instanceof Uint8Array) t = e;
			else if (typeof e == "string") t = this.encoder.encode(e);
			else if (Array.isArray(e)) t = Uint8Array.from(e);
			else if (ArrayBuffer.isView(e)) t = new Uint8Array(e.buffer, e.byteOffset, e.byteLength);
			else throw TypeError("Unexpected type. The `write` function only accepts Arrays, TypedArrays and Strings.");
			for (let n = 0; n < t.length; n += 1) {
				let r = t[n];
				switch (this.state) {
					case $.BOM_OR_START:
						if (e instanceof Uint8Array && r === 239) {
							this.bom = [
								239,
								187,
								191
							], this.bomIndex += 1, this.state = $.BOM;
							continue;
						}
						if (e instanceof Uint16Array) {
							if (r === 254) {
								this.bom = [254, 255], this.bomIndex += 1, this.state = $.BOM;
								continue;
							}
							if (r === 255) {
								this.bom = [255, 254], this.bomIndex += 1, this.state = $.BOM;
								continue;
							}
						}
						if (e instanceof Uint32Array) {
							if (r === 0) {
								this.bom = [
									0,
									0,
									254,
									255
								], this.bomIndex += 1, this.state = $.BOM;
								continue;
							}
							if (r === 255) {
								this.bom = [
									255,
									254,
									0,
									0
								], this.bomIndex += 1, this.state = $.BOM;
								continue;
							}
						}
					case $.START:
						if (this.offset += 1, this.separatorBytes && r === this.separatorBytes[0]) {
							if (this.separatorBytes.length === 1) {
								this.state = $.START, this.onToken({
									token: Xi.SEPARATOR,
									value: this.separator,
									offset: this.offset + this.separatorBytes.length - 1
								});
								continue;
							}
							this.state = $.SEPARATOR;
							continue;
						}
						if (r === Q.SPACE || r === Q.NEWLINE || r === Q.CARRIAGE_RETURN || r === Q.TAB) continue;
						if (r === Q.LEFT_CURLY_BRACKET) {
							this.onToken({
								token: Xi.LEFT_BRACE,
								value: "{",
								offset: this.offset
							});
							continue;
						}
						if (r === Q.RIGHT_CURLY_BRACKET) {
							this.onToken({
								token: Xi.RIGHT_BRACE,
								value: "}",
								offset: this.offset
							});
							continue;
						}
						if (r === Q.LEFT_SQUARE_BRACKET) {
							this.onToken({
								token: Xi.LEFT_BRACKET,
								value: "[",
								offset: this.offset
							});
							continue;
						}
						if (r === Q.RIGHT_SQUARE_BRACKET) {
							this.onToken({
								token: Xi.RIGHT_BRACKET,
								value: "]",
								offset: this.offset
							});
							continue;
						}
						if (r === Q.COLON) {
							this.onToken({
								token: Xi.COLON,
								value: ":",
								offset: this.offset
							});
							continue;
						}
						if (r === Q.COMMA) {
							this.onToken({
								token: Xi.COMMA,
								value: ",",
								offset: this.offset
							});
							continue;
						}
						if (r === Q.LATIN_SMALL_LETTER_T) {
							this.state = $.TRUE1;
							continue;
						}
						if (r === Q.LATIN_SMALL_LETTER_F) {
							this.state = $.FALSE1;
							continue;
						}
						if (r === Q.LATIN_SMALL_LETTER_N) {
							this.state = $.NULL1;
							continue;
						}
						if (r === Q.QUOTATION_MARK) {
							this.bufferedString.reset(), this.escapedCharsByteLength = 0, this.state = $.STRING_DEFAULT;
							continue;
						}
						if (r >= Q.DIGIT_ONE && r <= Q.DIGIT_NINE) {
							this.bufferedNumber.reset(), this.bufferedNumber.appendChar(r), this.state = $.NUMBER_AFTER_INITIAL_NON_ZERO;
							continue;
						}
						if (r === Q.DIGIT_ZERO) {
							this.bufferedNumber.reset(), this.bufferedNumber.appendChar(r), this.state = $.NUMBER_AFTER_INITIAL_ZERO;
							continue;
						}
						if (r === Q.HYPHEN_MINUS) {
							this.bufferedNumber.reset(), this.bufferedNumber.appendChar(r), this.state = $.NUMBER_AFTER_INITIAL_MINUS;
							continue;
						}
						break;
					case $.STRING_DEFAULT:
						if (r === Q.QUOTATION_MARK) {
							let e = this.bufferedString.toString();
							this.state = $.START, this.onToken({
								token: Xi.STRING,
								value: e,
								offset: this.offset
							}), this.offset += this.escapedCharsByteLength + this.bufferedString.byteLength + 1;
							continue;
						}
						if (r === Q.REVERSE_SOLIDUS) {
							this.state = $.STRING_AFTER_BACKSLASH;
							continue;
						}
						if (r >= 128) {
							if (r >= 194 && r <= 223 ? this.bytes_in_sequence = 2 : r <= 239 ? this.bytes_in_sequence = 3 : this.bytes_in_sequence = 4, this.bytes_in_sequence <= t.length - n) {
								this.bufferedString.appendBuf(t, n, n + this.bytes_in_sequence), n += this.bytes_in_sequence - 1;
								continue;
							}
							this.bytes_remaining = n + this.bytes_in_sequence - t.length, this.char_split_buffer.set(t.subarray(n)), n = t.length - 1, this.state = $.STRING_INCOMPLETE_CHAR;
							continue;
						}
						if (r >= Q.SPACE) {
							this.bufferedString.appendChar(r);
							continue;
						}
						break;
					case $.STRING_INCOMPLETE_CHAR:
						this.char_split_buffer.set(t.subarray(n, n + this.bytes_remaining), this.bytes_in_sequence - this.bytes_remaining), this.bufferedString.appendBuf(this.char_split_buffer, 0, this.bytes_in_sequence), n = this.bytes_remaining - 1, this.state = $.STRING_DEFAULT;
						continue;
					case $.STRING_AFTER_BACKSLASH:
						let i = Ki[r];
						if (i) {
							this.bufferedString.appendChar(i), this.escapedCharsByteLength += 1, this.state = $.STRING_DEFAULT;
							continue;
						}
						if (r === Q.LATIN_SMALL_LETTER_U) {
							this.unicode = "", this.state = $.STRING_UNICODE_DIGIT_1;
							continue;
						}
						break;
					case $.STRING_UNICODE_DIGIT_1:
					case $.STRING_UNICODE_DIGIT_2:
					case $.STRING_UNICODE_DIGIT_3:
						if (r >= Q.DIGIT_ZERO && r <= Q.DIGIT_NINE || r >= Q.LATIN_CAPITAL_LETTER_A && r <= Q.LATIN_CAPITAL_LETTER_F || r >= Q.LATIN_SMALL_LETTER_A && r <= Q.LATIN_SMALL_LETTER_F) {
							this.unicode += String.fromCharCode(r), this.state += 1;
							continue;
						}
						break;
					case $.STRING_UNICODE_DIGIT_4:
						if (r >= Q.DIGIT_ZERO && r <= Q.DIGIT_NINE || r >= Q.LATIN_CAPITAL_LETTER_A && r <= Q.LATIN_CAPITAL_LETTER_F || r >= Q.LATIN_SMALL_LETTER_A && r <= Q.LATIN_SMALL_LETTER_F) {
							let e = parseInt(this.unicode + String.fromCharCode(r), 16), t;
							if (this.highSurrogate === void 0) if (e >= 55296 && e <= 56319) {
								this.highSurrogate = e, this.state = $.STRING_DEFAULT;
								continue;
							} else t = String.fromCharCode(e);
							else t = e >= 56320 && e <= 57343 ? String.fromCharCode(this.highSurrogate, e) : String.fromCharCode(this.highSurrogate), this.highSurrogate = void 0;
							let n = this.encoder.encode(t);
							this.bufferedString.appendBuf(n), this.escapedCharsByteLength += 6 - n.byteLength, this.state = $.STRING_DEFAULT;
							continue;
						}
						break;
					case $.NUMBER_AFTER_INITIAL_MINUS:
						if (r === Q.DIGIT_ZERO) {
							this.bufferedNumber.appendChar(r), this.state = $.NUMBER_AFTER_INITIAL_ZERO;
							continue;
						}
						if (r >= Q.DIGIT_ONE && r <= Q.DIGIT_NINE) {
							this.bufferedNumber.appendChar(r), this.state = $.NUMBER_AFTER_INITIAL_NON_ZERO;
							continue;
						}
						break;
					case $.NUMBER_AFTER_INITIAL_ZERO:
						if (r === Q.FULL_STOP) {
							this.bufferedNumber.appendChar(r), this.state = $.NUMBER_AFTER_FULL_STOP;
							continue;
						}
						if (r === Q.LATIN_SMALL_LETTER_E || r === Q.LATIN_CAPITAL_LETTER_E) {
							this.bufferedNumber.appendChar(r), this.state = $.NUMBER_AFTER_E;
							continue;
						}
						--n, this.state = $.START, this.emitNumber();
						continue;
					case $.NUMBER_AFTER_INITIAL_NON_ZERO:
						if (r >= Q.DIGIT_ZERO && r <= Q.DIGIT_NINE) {
							this.bufferedNumber.appendChar(r);
							continue;
						}
						if (r === Q.FULL_STOP) {
							this.bufferedNumber.appendChar(r), this.state = $.NUMBER_AFTER_FULL_STOP;
							continue;
						}
						if (r === Q.LATIN_SMALL_LETTER_E || r === Q.LATIN_CAPITAL_LETTER_E) {
							this.bufferedNumber.appendChar(r), this.state = $.NUMBER_AFTER_E;
							continue;
						}
						--n, this.state = $.START, this.emitNumber();
						continue;
					case $.NUMBER_AFTER_FULL_STOP:
						if (r >= Q.DIGIT_ZERO && r <= Q.DIGIT_NINE) {
							this.bufferedNumber.appendChar(r), this.state = $.NUMBER_AFTER_DECIMAL;
							continue;
						}
						break;
					case $.NUMBER_AFTER_DECIMAL:
						if (r >= Q.DIGIT_ZERO && r <= Q.DIGIT_NINE) {
							this.bufferedNumber.appendChar(r);
							continue;
						}
						if (r === Q.LATIN_SMALL_LETTER_E || r === Q.LATIN_CAPITAL_LETTER_E) {
							this.bufferedNumber.appendChar(r), this.state = $.NUMBER_AFTER_E;
							continue;
						}
						--n, this.state = $.START, this.emitNumber();
						continue;
					case $.NUMBER_AFTER_E: if (r === Q.PLUS_SIGN || r === Q.HYPHEN_MINUS) {
						this.bufferedNumber.appendChar(r), this.state = $.NUMBER_AFTER_E_AND_SIGN;
						continue;
					}
					case $.NUMBER_AFTER_E_AND_SIGN:
						if (r >= Q.DIGIT_ZERO && r <= Q.DIGIT_NINE) {
							this.bufferedNumber.appendChar(r), this.state = $.NUMBER_AFTER_E_AND_DIGIT;
							continue;
						}
						break;
					case $.NUMBER_AFTER_E_AND_DIGIT:
						if (r >= Q.DIGIT_ZERO && r <= Q.DIGIT_NINE) {
							this.bufferedNumber.appendChar(r);
							continue;
						}
						--n, this.state = $.START, this.emitNumber();
						continue;
					case $.TRUE1:
						if (r === Q.LATIN_SMALL_LETTER_R) {
							this.state = $.TRUE2;
							continue;
						}
						break;
					case $.TRUE2:
						if (r === Q.LATIN_SMALL_LETTER_U) {
							this.state = $.TRUE3;
							continue;
						}
						break;
					case $.TRUE3:
						if (r === Q.LATIN_SMALL_LETTER_E) {
							this.state = $.START, this.onToken({
								token: Xi.TRUE,
								value: !0,
								offset: this.offset
							}), this.offset += 3;
							continue;
						}
						break;
					case $.FALSE1:
						if (r === Q.LATIN_SMALL_LETTER_A) {
							this.state = $.FALSE2;
							continue;
						}
						break;
					case $.FALSE2:
						if (r === Q.LATIN_SMALL_LETTER_L) {
							this.state = $.FALSE3;
							continue;
						}
						break;
					case $.FALSE3:
						if (r === Q.LATIN_SMALL_LETTER_S) {
							this.state = $.FALSE4;
							continue;
						}
						break;
					case $.FALSE4:
						if (r === Q.LATIN_SMALL_LETTER_E) {
							this.state = $.START, this.onToken({
								token: Xi.FALSE,
								value: !1,
								offset: this.offset
							}), this.offset += 4;
							continue;
						}
						break;
					case $.NULL1:
						if (r === Q.LATIN_SMALL_LETTER_U) {
							this.state = $.NULL2;
							continue;
						}
						break;
					case $.NULL2:
						if (r === Q.LATIN_SMALL_LETTER_L) {
							this.state = $.NULL3;
							continue;
						}
						break;
					case $.NULL3:
						if (r === Q.LATIN_SMALL_LETTER_L) {
							this.state = $.START, this.onToken({
								token: Xi.NULL,
								value: null,
								offset: this.offset
							}), this.offset += 3;
							continue;
						}
						break;
					case $.SEPARATOR:
						if (this.separatorIndex += 1, !this.separatorBytes || r !== this.separatorBytes[this.separatorIndex]) break;
						this.separatorIndex === this.separatorBytes.length - 1 && (this.state = $.START, this.onToken({
							token: Xi.SEPARATOR,
							value: this.separator,
							offset: this.offset + this.separatorIndex
						}), this.separatorIndex = 0);
						continue;
					case $.BOM:
						if (r === this.bom[this.bomIndex]) {
							if (this.bomIndex === this.bom.length - 1) {
								this.state = $.START, this.bom = void 0, this.bomIndex = 0;
								continue;
							}
							this.bomIndex += 1;
							continue;
						}
						break;
					case $.ENDED: if (r === Q.SPACE || r === Q.NEWLINE || r === Q.CARRIAGE_RETURN || r === Q.TAB) continue;
				}
				throw new $i(`Unexpected "${String.fromCharCode(r)}" at position "${n}" in state ${Zi(this.state)}`);
			}
			if (this.emitPartialTokens) switch (this.state) {
				case $.TRUE1:
				case $.TRUE2:
				case $.TRUE3:
					this.onToken({
						token: Xi.TRUE,
						value: !0,
						offset: this.offset,
						partial: !0
					});
					break;
				case $.FALSE1:
				case $.FALSE2:
				case $.FALSE3:
				case $.FALSE4:
					this.onToken({
						token: Xi.FALSE,
						value: !1,
						offset: this.offset,
						partial: !0
					});
					break;
				case $.NULL1:
				case $.NULL2:
				case $.NULL3:
					this.onToken({
						token: Xi.NULL,
						value: null,
						offset: this.offset,
						partial: !0
					});
					break;
				case $.STRING_DEFAULT: {
					let e = this.bufferedString.toString();
					this.onToken({
						token: Xi.STRING,
						value: e,
						offset: this.offset,
						partial: !0
					});
					break;
				}
				case $.NUMBER_AFTER_INITIAL_ZERO:
				case $.NUMBER_AFTER_INITIAL_NON_ZERO:
				case $.NUMBER_AFTER_DECIMAL:
				case $.NUMBER_AFTER_E_AND_DIGIT: try {
					this.onToken({
						token: Xi.NUMBER,
						value: this.parseNumber(this.bufferedNumber.toString()),
						offset: this.offset,
						partial: !0
					});
				} catch {}
			}
		} catch (e) {
			this.error(e);
		}
	}
	emitNumber() {
		this.onToken({
			token: Xi.NUMBER,
			value: this.parseNumber(this.bufferedNumber.toString()),
			offset: this.offset
		}), this.offset += this.bufferedNumber.byteLength - 1;
	}
	parseNumber(e) {
		return Number(e);
	}
	error(e) {
		this.state !== $.ENDED && (this.state = $.ERROR), this.onError(e);
	}
	end() {
		switch (this.state) {
			case $.NUMBER_AFTER_INITIAL_ZERO:
			case $.NUMBER_AFTER_INITIAL_NON_ZERO:
			case $.NUMBER_AFTER_DECIMAL:
			case $.NUMBER_AFTER_E_AND_DIGIT:
				this.state = $.ENDED, this.emitNumber(), this.onEnd();
				break;
			case $.BOM_OR_START:
			case $.START:
			case $.ERROR:
			case $.SEPARATOR:
				this.state = $.ENDED, this.onEnd();
				break;
			default: this.error(new $i(`Tokenizer ended in the middle of a token (state: ${Zi(this.state)}). Either not all the data was received or the data was invalid.`));
		}
	}
	onToken(e) {
		throw new $i("Can't emit tokens before the \"onToken\" callback has been set up.");
	}
	onError(e) {
		throw e;
	}
	onEnd() {}
}, ta;
(function(e) {
	e[e.OBJECT = 0] = "OBJECT", e[e.ARRAY = 1] = "ARRAY";
})(ta ||= {});
//#endregion
//#region node_modules/@streamparser/json/dist/mjs/tokenparser.js
var na;
(function(e) {
	e[e.VALUE = 0] = "VALUE", e[e.KEY = 1] = "KEY", e[e.COLON = 2] = "COLON", e[e.COMMA = 3] = "COMMA", e[e.ENDED = 4] = "ENDED", e[e.ERROR = 5] = "ERROR", e[e.SEPARATOR = 6] = "SEPARATOR";
})(na ||= {});
function ra(e) {
	return [
		"VALUE",
		"KEY",
		"COLON",
		"COMMA",
		"ENDED",
		"ERROR",
		"SEPARATOR"
	][e];
}
var ia = {
	paths: void 0,
	keepStack: !0,
	separator: void 0,
	emitPartialValues: !1
}, aa = class e extends Error {
	constructor(t) {
		super(t), Object.setPrototypeOf(this, e.prototype);
	}
}, oa = class {
	constructor(e) {
		this.state = na.VALUE, this.mode = void 0, this.key = void 0, this.value = void 0, this.stack = [], e = Object.assign(Object.assign({}, ia), e), e.paths && (this.paths = e.paths.map((e) => {
			if (e === void 0 || e === "$*") return;
			if (!e.startsWith("$")) throw new aa(`Invalid selector "${e}". Should start with "$".`);
			let t = e.split(".").slice(1);
			if (t.includes("")) throw new aa(`Invalid selector "${e}". ".." syntax not supported.`);
			return t;
		})), this.keepStack = e.keepStack || !1, this.separator = e.separator, e.emitPartialValues || (this.emitPartial = () => {});
	}
	shouldEmit() {
		return this.paths ? this.paths.some((e) => {
			if (e === void 0) return !0;
			if (e.length !== this.stack.length) return !1;
			for (let t = 0; t < e.length - 1; t++) {
				let n = e[t], r = this.stack[t + 1].key;
				if (n !== "*" && n !== r?.toString()) return !1;
			}
			let t = e[e.length - 1];
			return t === "*" ? !0 : t === this.key?.toString();
		}) : !0;
	}
	push() {
		this.stack.push({
			key: this.key,
			value: this.value,
			mode: this.mode,
			emit: this.shouldEmit()
		});
	}
	pop() {
		let e = this.value, t;
		({key: this.key, value: this.value, mode: this.mode, emit: t} = this.stack.pop()), this.state = this.mode === void 0 ? na.VALUE : na.COMMA, this.emit(e, t);
	}
	emit(e, t) {
		!this.keepStack && this.value && this.stack.every((e) => !e.emit) && delete this.value[this.key], t && this.onValue({
			value: e,
			key: this.key,
			parent: this.value,
			stack: this.stack
		}), this.stack.length === 0 && (this.separator ? this.state = na.SEPARATOR : this.separator === void 0 && this.end());
	}
	emitPartial(e) {
		if (this.shouldEmit()) {
			if (this.state === na.KEY) {
				this.onValue({
					value: void 0,
					key: e,
					parent: this.value,
					stack: this.stack,
					partial: !0
				});
				return;
			}
			this.onValue({
				value: e,
				key: this.key,
				parent: this.value,
				stack: this.stack,
				partial: !0
			});
		}
	}
	get isEnded() {
		return this.state === na.ENDED;
	}
	write({ token: e, value: t, partial: n }) {
		try {
			if (n) {
				this.emitPartial(t);
				return;
			}
			if (this.state === na.VALUE) {
				if (e === Xi.STRING || e === Xi.NUMBER || e === Xi.TRUE || e === Xi.FALSE || e === Xi.NULL) {
					this.mode === ta.OBJECT ? (this.value[this.key] = t, this.state = na.COMMA) : this.mode === ta.ARRAY && (this.value.push(t), this.state = na.COMMA), this.emit(t, this.shouldEmit());
					return;
				}
				if (e === Xi.LEFT_BRACE) {
					if (this.push(), this.mode === ta.OBJECT) this.value = this.value[this.key] = {};
					else if (this.mode === ta.ARRAY) {
						let e = {};
						this.value.push(e), this.value = e;
					} else this.value = {};
					this.mode = ta.OBJECT, this.state = na.KEY, this.key = void 0, this.emitPartial();
					return;
				}
				if (e === Xi.LEFT_BRACKET) {
					if (this.push(), this.mode === ta.OBJECT) this.value = this.value[this.key] = [];
					else if (this.mode === ta.ARRAY) {
						let e = [];
						this.value.push(e), this.value = e;
					} else this.value = [];
					this.mode = ta.ARRAY, this.state = na.VALUE, this.key = 0, this.emitPartial();
					return;
				}
				if (this.mode === ta.ARRAY && e === Xi.RIGHT_BRACKET && this.value.length === 0) {
					this.pop();
					return;
				}
			}
			if (this.state === na.KEY) {
				if (e === Xi.STRING) {
					this.key = t, this.state = na.COLON, this.emitPartial();
					return;
				}
				if (e === Xi.RIGHT_BRACE && Object.keys(this.value).length === 0) {
					this.pop();
					return;
				}
			}
			if (this.state === na.COLON && e === Xi.COLON) {
				this.state = na.VALUE;
				return;
			}
			if (this.state === na.COMMA) {
				if (e === Xi.COMMA) {
					if (this.mode === ta.ARRAY) {
						this.state = na.VALUE, this.key += 1;
						return;
					}
					/* istanbul ignore else */
					if (this.mode === ta.OBJECT) {
						this.state = na.KEY;
						return;
					}
				}
				if (e === Xi.RIGHT_BRACE && this.mode === ta.OBJECT || e === Xi.RIGHT_BRACKET && this.mode === ta.ARRAY) {
					this.pop();
					return;
				}
			}
			if (this.state === na.SEPARATOR && e === Xi.SEPARATOR && t === this.separator) {
				this.state = na.VALUE;
				return;
			}
			if (e === Xi.SEPARATOR && this.state !== na.SEPARATOR && Array.from(t).map((e) => e.charCodeAt(0)).every((e) => e === Q.SPACE || e === Q.NEWLINE || e === Q.CARRIAGE_RETURN || e === Q.TAB)) return;
			throw new aa(`Unexpected ${Xi[e]} (${JSON.stringify(t)}) in state ${ra(this.state)}`);
		} catch (e) {
			this.error(e);
		}
	}
	error(e) {
		this.state !== na.ENDED && (this.state = na.ERROR), this.onError(e);
	}
	end() {
		this.state !== na.VALUE && this.state !== na.SEPARATOR || this.stack.length > 0 ? this.error(/* @__PURE__ */ Error(`Parser ended in mid-parsing (state: ${ra(this.state)}). Either not all the data was received or the data was invalid.`)) : (this.state = na.ENDED, this.onEnd());
	}
	onValue(e) {
		throw new aa("Can't emit data before the \"onValue\" callback has been set up.");
	}
	onError(e) {
		throw e;
	}
	onEnd() {}
}, sa = class {
	constructor(e = {}) {
		this.tokenizer = new ea(e), this.tokenParser = new oa(e), this.tokenizer.onToken = this.tokenParser.write.bind(this.tokenParser), this.tokenizer.onEnd = () => {
			this.tokenParser.isEnded || this.tokenParser.end();
		}, this.tokenParser.onError = this.tokenizer.error.bind(this.tokenizer), this.tokenParser.onEnd = () => {
			this.tokenizer.isEnded || this.tokenizer.end();
		};
	}
	get isEnded() {
		return this.tokenizer.isEnded && this.tokenParser.isEnded;
	}
	write(e) {
		this.tokenizer.write(e);
	}
	end() {
		this.tokenizer.end();
	}
	set onToken(e) {
		this.tokenizer.onToken = (t) => {
			e(t), this.tokenParser.write(t);
		};
	}
	set onValue(e) {
		this.tokenParser.onValue = e;
	}
	set onError(e) {
		this.tokenizer.onError = e;
	}
	set onEnd(e) {
		this.tokenParser.onEnd = () => {
			this.tokenizer.isEnded || this.tokenizer.end(), e.call(this.tokenParser);
		};
	}
}, ca = /[\p{Lu}]/u, la = /[\p{Ll}]/u, ua = /^[\p{Lu}](?![\p{Lu}])/u, da = /[_.\- ]+/, fa = /([\p{Alpha}\p{N}_]|$)/u, pa = RegExp("^" + da.source), ma = new RegExp(da.source + fa.source, "gu"), ha = new RegExp(String.raw`\d+` + fa.source, "gu"), ga = (e, t, n, r) => {
	let i = !1, a = !1, o = !1, s = !1;
	for (let c = 0; c < e.length; c++) {
		let l = e[c];
		s = c > 2 ? e[c - 3] === "-" : !0, i && ca.test(l) ? (e = e.slice(0, c) + "-" + e.slice(c), i = !1, o = a, a = !0, c++) : a && o && la.test(l) && (!s || r) ? (e = e.slice(0, c - 1) + "-" + e.slice(c - 1), o = a, a = !1, i = !0) : (i = t(l) === l && n(l) !== l, o = a, a = n(l) === l && t(l) !== l);
	}
	return e;
}, _a = (e, t) => e.replace(ua, (e) => t(e)), va = (e, t, n) => {
	let r = "", i = !1, a = !1, o = [...e];
	for (let e = 0; e < o.length; e++) {
		let s = o[e], c = ca.test(s), l = e + 1 < o.length && ca.test(o[e + 1]);
		i && /[\p{Alpha}]/u.test(s) ? (r += s, i = !1, a = c) : n && c && (a || l) ? (r += s, a = !0) : /\d/.test(s) ? (r += s, i = !0, a = !1) : da.test(s) ? (r += s, a = !1) : (r += t(s), i = !1, a = !1);
	}
	return r;
}, ya = (e, t, { capitalizeAfterNumber: n }) => {
	let r = n ? (e, n, r, i) => {
		let a = i.charAt(r + e.length);
		return da.test(a) ? e : n ? e.slice(0, -n.length) + t(n) : e;
	} : (e) => e;
	return e.replaceAll(ha, r).replaceAll(ma, (e, n) => t(n));
};
function ba(e, t) {
	if (!(typeof e == "string" || Array.isArray(e))) throw TypeError("Expected the input to be `string | string[]`");
	if (t = {
		pascalCase: !1,
		preserveConsecutiveUppercase: !1,
		capitalizeAfterNumber: !0,
		...t
	}, e = Array.isArray(e) ? e.map((e) => e.trim()).filter((e) => e.length > 0).join("-") : e.trim(), e.length === 0) return "";
	let n = e.match(/^[_$]*/)[0];
	if (e = e.slice(n.length), e.length === 0) return n;
	let r = t.locale === !1 ? (e) => e.toLowerCase() : (e) => e.toLocaleLowerCase(t.locale), i = t.locale === !1 ? (e) => e.toUpperCase() : (e) => e.toLocaleUpperCase(t.locale);
	return e.length === 1 ? da.test(e) ? n : n + (t.pascalCase ? i(e) : r(e)) : (e !== r(e) && (e = ga(e, r, i, t.preserveConsecutiveUppercase)), e = e.replace(pa, ""), e = t.capitalizeAfterNumber ? t.preserveConsecutiveUppercase ? _a(e, r) : r(e) : va(e, r, t.preserveConsecutiveUppercase), t.pascalCase && e.length > 0 && (e = i(e[0]) + e.slice(1)), n + ya(e, i, t));
}
//#endregion
//#region node_modules/fast-memoize/src/index.js
var xa = /* @__PURE__ */ w(((e, t) => {
	function n(e, t) {
		var n = t && t.cache ? t.cache : f, r = t && t.serializer ? t.serializer : u;
		return (t && t.strategy ? t.strategy : s)(e, {
			cache: n,
			serializer: r
		});
	}
	function r(e) {
		return e == null || typeof e == "number" || typeof e == "boolean";
	}
	function i(e, t, n, i) {
		var a = r(i) ? i : n(i), o = t.get(a);
		return o === void 0 && (o = e.call(this, i), t.set(a, o)), o;
	}
	function a(e, t, n) {
		var r = Array.prototype.slice.call(arguments, 3), i = n(r), a = t.get(i);
		return a === void 0 && (a = e.apply(this, r), t.set(i, a)), a;
	}
	function o(e, t, n, r, i) {
		return n.bind(t, e, r, i);
	}
	function s(e, t) {
		var n = e.length === 1 ? i : a;
		return o(e, this, n, t.cache.create(), t.serializer);
	}
	function c(e, t) {
		var n = a;
		return o(e, this, n, t.cache.create(), t.serializer);
	}
	function l(e, t) {
		var n = i;
		return o(e, this, n, t.cache.create(), t.serializer);
	}
	function u() {
		return JSON.stringify(arguments);
	}
	function d() {
		this.cache = Object.create(null);
	}
	d.prototype.has = function(e) {
		return e in this.cache;
	}, d.prototype.get = function(e) {
		return this.cache[e];
	}, d.prototype.set = function(e, t) {
		this.cache[e] = t;
	};
	var f = { create: function() {
		return new d();
	} };
	t.exports = n, t.exports.strategies = {
		variadic: c,
		monadic: l
	};
})), Sa = /* @__PURE__ */ w(((e, t) => {
	var { hasOwnProperty: n } = Object.prototype, r = (e, t = {}) => {
		typeof t == "string" && (t = { section: t }), t.align = t.align === !0, t.newline = t.newline === !0, t.sort = t.sort === !0, t.whitespace = t.whitespace === !0 || t.align === !0, t.platform = t.platform || typeof process < "u" && process.platform, t.bracketedArray = t.bracketedArray !== !1;
		/* istanbul ignore next */
		let n = t.platform === "win32" ? "\r\n" : "\n", a = t.whitespace ? " = " : "=", o = [], c = t.sort ? Object.keys(e).sort() : Object.keys(e), l = 0;
		t.align && (l = s(c.filter((t) => e[t] === null || Array.isArray(e[t]) || typeof e[t] != "object").map((t) => Array.isArray(e[t]) ? `${t}[]` : t).concat([""]).reduce((e, t) => s(e).length >= s(t).length ? e : t)).length);
		let u = "", d = t.bracketedArray ? "[]" : "";
		for (let t of c) {
			let r = e[t];
			if (r && Array.isArray(r)) for (let e of r) u += s(`${t}${d}`).padEnd(l, " ") + a + s(e) + n;
			else r && typeof r == "object" ? o.push(t) : u += s(t).padEnd(l, " ") + a + s(r) + n;
		}
		t.section && u.length && (u = "[" + s(t.section) + "]" + (t.newline ? n + n : n) + u);
		for (let a of o) {
			let o = i(a, ".").join("\\."), s = (t.section ? t.section + "." : "") + o, c = r(e[a], {
				...t,
				section: s
			});
			u.length && c.length && (u += n), u += c;
		}
		return u;
	};
	function i(e, t) {
		var n = 0, r = 0, i = 0, a = [];
		do
			if (i = e.indexOf(t, n), i !== -1) {
				if (n = i + t.length, i > 0 && e[i - 1] === "\\") continue;
				a.push(e.slice(r, i)), r = i + t.length;
			}
		while (i !== -1);
		return a.push(e.slice(r)), a;
	}
	var a = (e, t = {}) => {
		t.bracketedArray = t.bracketedArray !== !1;
		let r = Object.create(null), a = r, o = null, s = /^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i, l = e.split(/[\r\n]+/g), u = {};
		for (let e of l) {
			if (!e || e.match(/^\s*[;#]/) || e.match(/^\s*$/)) continue;
			let i = e.match(s);
			if (!i) continue;
			if (i[1] !== void 0) {
				if (o = c(i[1]), o === "__proto__") {
					a = Object.create(null);
					continue;
				}
				a = r[o] = r[o] || Object.create(null);
				continue;
			}
			let l = c(i[2]), d;
			t.bracketedArray ? d = l.length > 2 && l.slice(-2) === "[]" : (u[l] = (u?.[l] || 0) + 1, d = u[l] > 1);
			let f = d && l.endsWith("[]") ? l.slice(0, -2) : l;
			if (f === "__proto__") continue;
			let p = i[3] ? c(i[4]) : !0, m = p === "true" || p === "false" || p === "null" ? JSON.parse(p) : p;
			d && (n.call(a, f) ? Array.isArray(a[f]) || (a[f] = [a[f]]) : a[f] = []), Array.isArray(a[f]) ? a[f].push(m) : a[f] = m;
		}
		let d = [];
		for (let e of Object.keys(r)) {
			if (!n.call(r, e) || typeof r[e] != "object" || Array.isArray(r[e])) continue;
			let t = i(e, ".");
			a = r;
			let o = t.pop(), s = o.replace(/\\\./g, ".");
			for (let e of t) e !== "__proto__" && ((!n.call(a, e) || typeof a[e] != "object") && (a[e] = Object.create(null)), a = a[e]);
			a === r && s === o || (a[s] = r[e], d.push(e));
		}
		for (let e of d) delete r[e];
		return r;
	}, o = (e) => e.startsWith("\"") && e.endsWith("\"") || e.startsWith("'") && e.endsWith("'"), s = (e) => typeof e != "string" || e.match(/[=\r\n]/) || e.match(/^\[/) || e.length > 1 && o(e) || e !== e.trim() ? JSON.stringify(e) : e.split(";").join("\\;").split("#").join("\\#"), c = (e) => {
		if (e = (e || "").trim(), o(e)) {
			e.charAt(0) === "'" && (e = e.slice(1, -1));
			try {
				e = JSON.parse(e);
			} catch {}
		} else {
			let t = !1, n = "";
			for (let r = 0, i = e.length; r < i; r++) {
				let i = e.charAt(r);
				if (t) "\\;#".indexOf(i) === -1 ? n += "\\" + i : n += i, t = !1;
				else if (";#".indexOf(i) !== -1) break;
				else i === "\\" ? t = !0 : n += i;
			}
			return t && (n += "\\"), n.trim();
		}
		return e;
	};
	t.exports = {
		parse: a,
		decode: a,
		stringify: r,
		encode: r,
		safe: s,
		unsafe: c
	};
})), Ca = /* @__PURE__ */ w(((e, t) => {
	var { URL: n } = k("node:url");
	function r(e) {
		try {
			let r = new n(e).pathname.slice(1);
			if (!r.match(/^-/)) {
				r = r.split("/");
				var t = r.indexOf("_rewrite");
				return t === -1 ? t = r.length - 1 : t++, decodeURIComponent(r[t]);
			}
		} catch {}
	}
	var i = class extends Error {
		constructor(e, t, n, i) {
			super(), this.name = this.constructor.name, this.headers = typeof t.headers?.raw == "function" ? t.headers.raw() : t.headers, this.statusCode = t.status, this.code = `E${t.status}`, this.method = e, this.uri = t.url, this.body = n, this.pkgid = i ? i.toString() : r(t.url), Error.captureStackTrace(this, this.constructor);
		}
	};
	t.exports = {
		HttpErrorBase: i,
		HttpErrorGeneral: class extends i {
			constructor(e, t, n, r) {
				super(e, t, n, r), this.message = `${t.status} ${t.statusText} - ${this.method.toUpperCase()} ${this.spec || this.uri}${n && n.error ? " - " + n.error : ""}`;
			}
		},
		HttpErrorAuthOTP: class extends i {
			constructor(e, t, n, r) {
				super(e, t, n, r), this.message = "OTP required for authentication", this.code = "EOTP";
			}
		},
		HttpErrorAuthIPAddress: class extends i {
			constructor(e, t, n, r) {
				super(e, t, n, r), this.message = "Login is not allowed from your IP address", this.code = "EAUTHIP";
			}
		},
		HttpErrorAuthUnknown: class extends i {
			constructor(e, t, n, r) {
				super(e, t, n, r), this.message = "Unable to authenticate, need: " + t.headers.get("www-authenticate");
			}
		}
	};
})), wa = /* @__PURE__ */ w(((e) => {
	var t = e && e.__importDefault || function(e) {
		return e && e.__esModule ? e : { default: e };
	};
	Object.defineProperty(e, "__esModule", { value: !0 }), e.Minipass = e.isWritable = e.isReadable = e.isStream = void 0;
	var n = typeof process == "object" && process ? process : {
		stdout: null,
		stderr: null
	}, r = k("node:events"), i = t(k("node:stream")), a = k("node:string_decoder");
	e.isStream = (t) => !!t && typeof t == "object" && (t instanceof K || t instanceof i.default || (0, e.isReadable)(t) || (0, e.isWritable)(t)), e.isReadable = (e) => !!e && typeof e == "object" && e instanceof r.EventEmitter && typeof e.pipe == "function" && e.pipe !== i.default.Writable.prototype.pipe, e.isWritable = (e) => !!e && typeof e == "object" && e instanceof r.EventEmitter && typeof e.write == "function" && typeof e.end == "function";
	var o = Symbol("EOF"), s = Symbol("maybeEmitEnd"), c = Symbol("emittedEnd"), l = Symbol("emittingEnd"), u = Symbol("emittedError"), d = Symbol("closed"), f = Symbol("read"), p = Symbol("flush"), m = Symbol("flushChunk"), h = Symbol("encoding"), g = Symbol("decoder"), _ = Symbol("flowing"), v = Symbol("paused"), y = Symbol("resume"), b = Symbol("buffer"), x = Symbol("pipes"), S = Symbol("bufferLength"), C = Symbol("bufferPush"), w = Symbol("bufferShift"), T = Symbol("objectMode"), E = Symbol("destroyed"), D = Symbol("error"), O = Symbol("emitData"), A = Symbol("emitEnd"), j = Symbol("emitEnd2"), M = Symbol("async"), N = Symbol("abort"), P = Symbol("aborted"), F = Symbol("signal"), I = Symbol("dataListeners"), L = Symbol("discarded"), R = (e) => Promise.resolve().then(e), z = (e) => e(), B = (e) => e === "end" || e === "finish" || e === "prefinish", V = (e) => e instanceof ArrayBuffer || !!e && typeof e == "object" && e.constructor && e.constructor.name === "ArrayBuffer" && e.byteLength >= 0, H = (e) => !Buffer.isBuffer(e) && ArrayBuffer.isView(e), U = class {
		src;
		dest;
		opts;
		ondrain;
		constructor(e, t, n) {
			this.src = e, this.dest = t, this.opts = n, this.ondrain = () => e[y](), this.dest.on("drain", this.ondrain);
		}
		unpipe() {
			this.dest.removeListener("drain", this.ondrain);
		}
		/* c8 ignore start */
		proxyErrors(e) {}
		/* c8 ignore stop */
		end() {
			this.unpipe(), this.opts.end && this.dest.end();
		}
	}, ee = class extends U {
		unpipe() {
			this.src.removeListener("error", this.proxyErrors), super.unpipe();
		}
		constructor(e, t, n) {
			super(e, t, n), this.proxyErrors = (e) => this.dest.emit("error", e), e.on("error", this.proxyErrors);
		}
	}, W = (e) => !!e.objectMode, G = (e) => !e.objectMode && !!e.encoding && e.encoding !== "buffer", K = class extends r.EventEmitter {
		[_] = !1;
		[v] = !1;
		[x] = [];
		[b] = [];
		[T];
		[h];
		[M];
		[g];
		[o] = !1;
		[c] = !1;
		[l] = !1;
		[d] = !1;
		[u] = null;
		[S] = 0;
		[E] = !1;
		[F];
		[P] = !1;
		[I] = 0;
		[L] = !1;
		writable = !0;
		readable = !0;
		constructor(...e) {
			let t = e[0] || {};
			if (super(), t.objectMode && typeof t.encoding == "string") throw TypeError("Encoding and objectMode may not be used together");
			W(t) ? (this[T] = !0, this[h] = null) : G(t) ? (this[h] = t.encoding, this[T] = !1) : (this[T] = !1, this[h] = null), this[M] = !!t.async, this[g] = this[h] ? new a.StringDecoder(this[h]) : null, t && t.debugExposeBuffer === !0 && Object.defineProperty(this, "buffer", { get: () => this[b] }), t && t.debugExposePipes === !0 && Object.defineProperty(this, "pipes", { get: () => this[x] });
			let { signal: n } = t;
			n && (this[F] = n, n.aborted ? this[N]() : n.addEventListener("abort", () => this[N]()));
		}
		get bufferLength() {
			return this[S];
		}
		get encoding() {
			return this[h];
		}
		set encoding(e) {
			throw Error("Encoding must be set at instantiation time");
		}
		setEncoding(e) {
			throw Error("Encoding must be set at instantiation time");
		}
		get objectMode() {
			return this[T];
		}
		set objectMode(e) {
			throw Error("objectMode must be set at instantiation time");
		}
		get async() {
			return this[M];
		}
		set async(e) {
			this[M] = this[M] || !!e;
		}
		[N]() {
			this[P] = !0, this.emit("abort", this[F]?.reason), this.destroy(this[F]?.reason);
		}
		get aborted() {
			return this[P];
		}
		set aborted(e) {}
		write(e, t, n) {
			if (this[P]) return !1;
			if (this[o]) throw Error("write after end");
			if (this[E]) return this.emit("error", Object.assign(/* @__PURE__ */ Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), !0;
			typeof t == "function" && (n = t, t = "utf8"), t ||= "utf8";
			let r = this[M] ? R : z;
			if (!this[T] && !Buffer.isBuffer(e)) {
				if (H(e)) e = Buffer.from(e.buffer, e.byteOffset, e.byteLength);
				else if (V(e)) e = Buffer.from(e);
				else if (typeof e != "string") throw Error("Non-contiguous data written to non-objectMode stream");
			}
			return this[T] ? (this[_] && this[S] !== 0 && this[p](!0), this[_] ? this.emit("data", e) : this[C](e), this[S] !== 0 && this.emit("readable"), n && r(n), this[_]) : e.length ? (typeof e == "string" && !(t === this[h] && !this[g]?.lastNeed) && (e = Buffer.from(e, t)), Buffer.isBuffer(e) && this[h] && (e = this[g].write(e)), this[_] && this[S] !== 0 && this[p](!0), this[_] ? this.emit("data", e) : this[C](e), this[S] !== 0 && this.emit("readable"), n && r(n), this[_]) : (this[S] !== 0 && this.emit("readable"), n && r(n), this[_]);
		}
		read(e) {
			if (this[E]) return null;
			if (this[L] = !1, this[S] === 0 || e === 0 || e && e > this[S]) return this[s](), null;
			this[T] && (e = null), this[b].length > 1 && !this[T] && (this[b] = [this[h] ? this[b].join("") : Buffer.concat(this[b], this[S])]);
			let t = this[f](e || null, this[b][0]);
			return this[s](), t;
		}
		[f](e, t) {
			if (this[T]) this[w]();
			else {
				let n = t;
				e === n.length || e === null ? this[w]() : typeof n == "string" ? (this[b][0] = n.slice(e), t = n.slice(0, e), this[S] -= e) : (this[b][0] = n.subarray(e), t = n.subarray(0, e), this[S] -= e);
			}
			return this.emit("data", t), !this[b].length && !this[o] && this.emit("drain"), t;
		}
		end(e, t, n) {
			return typeof e == "function" && (n = e, e = void 0), typeof t == "function" && (n = t, t = "utf8"), e !== void 0 && this.write(e, t), n && this.once("end", n), this[o] = !0, this.writable = !1, (this[_] || !this[v]) && this[s](), this;
		}
		[y]() {
			this[E] || (!this[I] && !this[x].length && (this[L] = !0), this[v] = !1, this[_] = !0, this.emit("resume"), this[b].length ? this[p]() : this[o] ? this[s]() : this.emit("drain"));
		}
		resume() {
			return this[y]();
		}
		pause() {
			this[_] = !1, this[v] = !0, this[L] = !1;
		}
		get destroyed() {
			return this[E];
		}
		get flowing() {
			return this[_];
		}
		get paused() {
			return this[v];
		}
		[C](e) {
			this[T] ? this[S] += 1 : this[S] += e.length, this[b].push(e);
		}
		[w]() {
			return this[T] ? --this[S] : this[S] -= this[b][0].length, this[b].shift();
		}
		[p](e = !1) {
			do			;
while (this[m](this[w]()) && this[b].length);
			!e && !this[b].length && !this[o] && this.emit("drain");
		}
		[m](e) {
			return this.emit("data", e), this[_];
		}
		pipe(e, t) {
			if (this[E]) return e;
			this[L] = !1;
			let r = this[c];
			return t ||= {}, e === n.stdout || e === n.stderr ? t.end = !1 : t.end = t.end !== !1, t.proxyErrors = !!t.proxyErrors, r ? t.end && e.end() : (this[x].push(t.proxyErrors ? new ee(this, e, t) : new U(this, e, t)), this[M] ? R(() => this[y]()) : this[y]()), e;
		}
		unpipe(e) {
			let t = this[x].find((t) => t.dest === e);
			t && (this[x].length === 1 ? (this[_] && this[I] === 0 && (this[_] = !1), this[x] = []) : this[x].splice(this[x].indexOf(t), 1), t.unpipe());
		}
		addListener(e, t) {
			return this.on(e, t);
		}
		on(e, t) {
			let n = super.on(e, t);
			if (e === "data") this[L] = !1, this[I]++, !this[x].length && !this[_] && this[y]();
			else if (e === "readable" && this[S] !== 0) super.emit("readable");
			else if (B(e) && this[c]) super.emit(e), this.removeAllListeners(e);
			else if (e === "error" && this[u]) {
				let e = t;
				this[M] ? R(() => e.call(this, this[u])) : e.call(this, this[u]);
			}
			return n;
		}
		removeListener(e, t) {
			return this.off(e, t);
		}
		off(e, t) {
			let n = super.off(e, t);
			return e === "data" && (this[I] = this.listeners("data").length, this[I] === 0 && !this[L] && !this[x].length && (this[_] = !1)), n;
		}
		removeAllListeners(e) {
			let t = super.removeAllListeners(e);
			return (e === "data" || e === void 0) && (this[I] = 0, !this[L] && !this[x].length && (this[_] = !1)), t;
		}
		get emittedEnd() {
			return this[c];
		}
		[s]() {
			!this[l] && !this[c] && !this[E] && this[b].length === 0 && this[o] && (this[l] = !0, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[d] && this.emit("close"), this[l] = !1);
		}
		emit(e, ...t) {
			let n = t[0];
			if (e !== "error" && e !== "close" && e !== E && this[E]) return !1;
			if (e === "data") return !this[T] && !n ? !1 : this[M] ? (R(() => this[O](n)), !0) : this[O](n);
			if (e === "end") return this[A]();
			if (e === "close") {
				if (this[d] = !0, !this[c] && !this[E]) return !1;
				let e = super.emit("close");
				return this.removeAllListeners("close"), e;
			} else if (e === "error") {
				this[u] = n, super.emit(D, n);
				let e = !this[F] || this.listeners("error").length ? super.emit("error", n) : !1;
				return this[s](), e;
			} else if (e === "resume") {
				let e = super.emit("resume");
				return this[s](), e;
			} else if (e === "finish" || e === "prefinish") {
				let t = super.emit(e);
				return this.removeAllListeners(e), t;
			}
			let r = super.emit(e, ...t);
			return this[s](), r;
		}
		[O](e) {
			for (let t of this[x]) t.dest.write(e) === !1 && this.pause();
			let t = this[L] ? !1 : super.emit("data", e);
			return this[s](), t;
		}
		[A]() {
			return this[c] ? !1 : (this[c] = !0, this.readable = !1, this[M] ? (R(() => this[j]()), !0) : this[j]());
		}
		[j]() {
			if (this[g]) {
				let e = this[g].end();
				if (e) {
					for (let t of this[x]) t.dest.write(e);
					this[L] || super.emit("data", e);
				}
			}
			for (let e of this[x]) e.end();
			let e = super.emit("end");
			return this.removeAllListeners("end"), e;
		}
		async collect() {
			let e = Object.assign([], { dataLength: 0 });
			this[T] || (e.dataLength = 0);
			let t = this.promise();
			return this.on("data", (t) => {
				e.push(t), this[T] || (e.dataLength += t.length);
			}), await t, e;
		}
		async concat() {
			if (this[T]) throw Error("cannot concat in objectMode");
			let e = await this.collect();
			return this[h] ? e.join("") : Buffer.concat(e, e.dataLength);
		}
		async promise() {
			return new Promise((e, t) => {
				this.on(E, () => t(/* @__PURE__ */ Error("stream destroyed"))), this.on("error", (e) => t(e)), this.on("end", () => e());
			});
		}
		[Symbol.asyncIterator]() {
			this[L] = !1;
			let e = !1, t = async () => (this.pause(), e = !0, {
				value: void 0,
				done: !0
			});
			return {
				next: () => {
					if (e) return t();
					let n = this.read();
					if (n !== null) return Promise.resolve({
						done: !1,
						value: n
					});
					if (this[o]) return t();
					let r, i, a = (e) => {
						this.off("data", s), this.off("end", c), this.off(E, l), t(), i(e);
					}, s = (e) => {
						this.off("error", a), this.off("end", c), this.off(E, l), this.pause(), r({
							value: e,
							done: !!this[o]
						});
					}, c = () => {
						this.off("error", a), this.off("data", s), this.off(E, l), t(), r({
							done: !0,
							value: void 0
						});
					}, l = () => a(/* @__PURE__ */ Error("stream destroyed"));
					return new Promise((e, t) => {
						i = t, r = e, this.once(E, l), this.once("error", a), this.once("end", c), this.once("data", s);
					});
				},
				throw: t,
				return: t,
				[Symbol.asyncIterator]() {
					return this;
				},
				[Symbol.asyncDispose]: async () => {}
			};
		}
		[Symbol.iterator]() {
			this[L] = !1;
			let e = !1, t = () => (this.pause(), this.off(D, t), this.off(E, t), this.off("end", t), e = !0, {
				done: !0,
				value: void 0
			});
			return this.once("end", t), this.once(D, t), this.once(E, t), {
				next: () => {
					if (e) return t();
					let n = this.read();
					return n === null ? t() : {
						done: !1,
						value: n
					};
				},
				throw: t,
				return: t,
				[Symbol.iterator]() {
					return this;
				},
				[Symbol.dispose]: () => {}
			};
		}
		destroy(e) {
			if (this[E]) return e ? this.emit("error", e) : this.emit(E), this;
			this[E] = !0, this[L] = !0, this[b].length = 0, this[S] = 0;
			let t = this;
			return typeof t.close == "function" && !this[d] && t.close(), e ? this.emit("error", e) : this.emit(E), this;
		}
		static get isStream() {
			return e.isStream;
		}
	};
	e.Minipass = K;
})), Ta = /* @__PURE__ */ w(((e) => {
	var t = e && e.__importDefault || function(e) {
		return e && e.__esModule ? e : { default: e };
	};
	Object.defineProperty(e, "__esModule", { value: !0 }), e.constants = void 0;
	/* c8 ignore start */
	var n = t(k("zlib")).default.constants || { ZLIB_VERNUM: 4736 };
	/* c8 ignore stop */
	e.constants = Object.freeze(Object.assign(Object.create(null), {
		Z_NO_FLUSH: 0,
		Z_PARTIAL_FLUSH: 1,
		Z_SYNC_FLUSH: 2,
		Z_FULL_FLUSH: 3,
		Z_FINISH: 4,
		Z_BLOCK: 5,
		Z_OK: 0,
		Z_STREAM_END: 1,
		Z_NEED_DICT: 2,
		Z_ERRNO: -1,
		Z_STREAM_ERROR: -2,
		Z_DATA_ERROR: -3,
		Z_MEM_ERROR: -4,
		Z_BUF_ERROR: -5,
		Z_VERSION_ERROR: -6,
		Z_NO_COMPRESSION: 0,
		Z_BEST_SPEED: 1,
		Z_BEST_COMPRESSION: 9,
		Z_DEFAULT_COMPRESSION: -1,
		Z_FILTERED: 1,
		Z_HUFFMAN_ONLY: 2,
		Z_RLE: 3,
		Z_FIXED: 4,
		Z_DEFAULT_STRATEGY: 0,
		DEFLATE: 1,
		INFLATE: 2,
		GZIP: 3,
		GUNZIP: 4,
		DEFLATERAW: 5,
		INFLATERAW: 6,
		UNZIP: 7,
		BROTLI_DECODE: 8,
		BROTLI_ENCODE: 9,
		Z_MIN_WINDOWBITS: 8,
		Z_MAX_WINDOWBITS: 15,
		Z_DEFAULT_WINDOWBITS: 15,
		Z_MIN_CHUNK: 64,
		Z_MAX_CHUNK: Infinity,
		Z_DEFAULT_CHUNK: 16384,
		Z_MIN_MEMLEVEL: 1,
		Z_MAX_MEMLEVEL: 9,
		Z_DEFAULT_MEMLEVEL: 8,
		Z_MIN_LEVEL: -1,
		Z_MAX_LEVEL: 9,
		Z_DEFAULT_LEVEL: -1,
		BROTLI_OPERATION_PROCESS: 0,
		BROTLI_OPERATION_FLUSH: 1,
		BROTLI_OPERATION_FINISH: 2,
		BROTLI_OPERATION_EMIT_METADATA: 3,
		BROTLI_MODE_GENERIC: 0,
		BROTLI_MODE_TEXT: 1,
		BROTLI_MODE_FONT: 2,
		BROTLI_DEFAULT_MODE: 0,
		BROTLI_MIN_QUALITY: 0,
		BROTLI_MAX_QUALITY: 11,
		BROTLI_DEFAULT_QUALITY: 11,
		BROTLI_MIN_WINDOW_BITS: 10,
		BROTLI_MAX_WINDOW_BITS: 24,
		BROTLI_LARGE_MAX_WINDOW_BITS: 30,
		BROTLI_DEFAULT_WINDOW: 22,
		BROTLI_MIN_INPUT_BLOCK_BITS: 16,
		BROTLI_MAX_INPUT_BLOCK_BITS: 24,
		BROTLI_PARAM_MODE: 0,
		BROTLI_PARAM_QUALITY: 1,
		BROTLI_PARAM_LGWIN: 2,
		BROTLI_PARAM_LGBLOCK: 3,
		BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4,
		BROTLI_PARAM_SIZE_HINT: 5,
		BROTLI_PARAM_LARGE_WINDOW: 6,
		BROTLI_PARAM_NPOSTFIX: 7,
		BROTLI_PARAM_NDIRECT: 8,
		BROTLI_DECODER_RESULT_ERROR: 0,
		BROTLI_DECODER_RESULT_SUCCESS: 1,
		BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2,
		BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3,
		BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0,
		BROTLI_DECODER_PARAM_LARGE_WINDOW: 1,
		BROTLI_DECODER_NO_ERROR: 0,
		BROTLI_DECODER_SUCCESS: 1,
		BROTLI_DECODER_NEEDS_MORE_INPUT: 2,
		BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3,
		BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1,
		BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2,
		BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3,
		BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4,
		BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5,
		BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6,
		BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7,
		BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8,
		BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9,
		BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10,
		BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11,
		BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12,
		BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13,
		BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14,
		BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15,
		BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16,
		BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19,
		BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20,
		BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21,
		BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22,
		BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25,
		BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26,
		BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27,
		BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30,
		BROTLI_DECODER_ERROR_UNREACHABLE: -31
	}, n));
})), Ea = /* @__PURE__ */ w(((e) => {
	var t = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
		r === void 0 && (r = n);
		var i = Object.getOwnPropertyDescriptor(t, n);
		(!i || ("get" in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
			enumerable: !0,
			get: function() {
				return t[n];
			}
		}), Object.defineProperty(e, r, i);
	}) : (function(e, t, n, r) {
		r === void 0 && (r = n), e[r] = t[n];
	})), n = e && e.__setModuleDefault || (Object.create ? (function(e, t) {
		Object.defineProperty(e, "default", {
			enumerable: !0,
			value: t
		});
	}) : function(e, t) {
		e.default = t;
	}), r = e && e.__importStar || (function() {
		var e = function(t) {
			return e = Object.getOwnPropertyNames || function(e) {
				var t = [];
				for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[t.length] = n);
				return t;
			}, e(t);
		};
		return function(r) {
			if (r && r.__esModule) return r;
			var i = {};
			if (r != null) for (var a = e(r), o = 0; o < a.length; o++) a[o] !== "default" && t(i, r, a[o]);
			return n(i, r), i;
		};
	})(), i = e && e.__importDefault || function(e) {
		return e && e.__esModule ? e : { default: e };
	};
	Object.defineProperty(e, "__esModule", { value: !0 }), e.ZstdDecompress = e.ZstdCompress = e.BrotliDecompress = e.BrotliCompress = e.Unzip = e.InflateRaw = e.DeflateRaw = e.Gunzip = e.Gzip = e.Inflate = e.Deflate = e.Zlib = e.ZlibError = e.constants = void 0;
	var a = i(k("assert")), o = k("buffer"), s = wa(), c = r(k("zlib")), l = Ta(), u = Ta();
	Object.defineProperty(e, "constants", {
		enumerable: !0,
		get: function() {
			return u.constants;
		}
	});
	var d = o.Buffer.concat, f = Object.getOwnPropertyDescriptor(o.Buffer, "concat"), p = (e) => e, m = f?.writable === !0 || f?.set !== void 0 ? (e) => {
		o.Buffer.concat = e ? p : d;
	} : (e) => {}, h = Symbol("_superWrite"), g = class extends Error {
		code;
		errno;
		constructor(e, t) {
			super("zlib: " + e.message, { cause: e }), this.code = e.code, this.errno = e.errno, this.code ||= "ZLIB_ERROR", this.message = "zlib: " + e.message, Error.captureStackTrace(this, t ?? this.constructor);
		}
		get name() {
			return "ZlibError";
		}
	};
	e.ZlibError = g;
	var _ = Symbol("flushFlag"), v = class extends s.Minipass {
		#e = !1;
		#t = !1;
		#n;
		#r;
		#i;
		#a;
		#o;
		get sawError() {
			return this.#e;
		}
		get handle() {
			return this.#a;
		}
		/* c8 ignore start */
		get flushFlag() {
			return this.#n;
		}
		/* c8 ignore stop */
		constructor(e, t) {
			if (!e || typeof e != "object") throw TypeError("invalid options for ZlibBase constructor");
			/* c8 ignore stop */
			if (super(e), this.#n = e.flush ?? 0, this.#r = e.finishFlush ?? 0, this.#i = e.fullFlushFlag ?? 0, typeof c[t] != "function") throw TypeError("Compression method not supported: " + t);
			try {
				this.#a = new c[t](e);
			} catch (e) {
				throw new g(e, this.constructor);
			}
			this.#o = (e) => {
				this.#e || (this.#e = !0, this.close(), this.emit("error", e));
			}, this.#a?.on("error", (e) => this.#o(new g(e))), this.once("end", () => this.close);
		}
		close() {
			this.#a && (this.#a.close(), this.#a = void 0, this.emit("close"));
		}
		reset() {
			if (!this.#e) return (0, a.default)(this.#a, "zlib binding closed"), this.#a.reset?.();
		}
		flush(e) {
			this.ended || (typeof e != "number" && (e = this.#i), this.write(Object.assign(o.Buffer.alloc(0), { [_]: e })));
		}
		end(e, t, n) {
			return typeof e == "function" && (n = e, t = void 0, e = void 0), typeof t == "function" && (n = t, t = void 0), e && (t ? this.write(e, t) : this.write(e)), this.flush(this.#r), this.#t = !0, super.end(n);
		}
		get ended() {
			return this.#t;
		}
		[h](e) {
			return super.write(e);
		}
		write(e, t, n) {
			if (typeof t == "function" && (n = t, t = "utf8"), typeof e == "string" && (e = o.Buffer.from(e, t)), this.#e) return;
			(0, a.default)(this.#a, "zlib binding closed");
			let r = this.#a._handle, i = r.close;
			r.close = () => {};
			let s = this.#a.close;
			this.#a.close = () => {}, m(!0);
			let c;
			try {
				let t = typeof e[_] == "number" ? e[_] : this.#n;
				c = this.#a._processChunk(e, t), m(!1);
			} catch (e) {
				m(!1), this.#o(new g(e, this.write));
			} finally {
				this.#a && (this.#a._handle = r, r.close = i, this.#a.close = s, this.#a.removeAllListeners("error"));
			}
			this.#a && this.#a.on("error", (e) => this.#o(new g(e, this.write)));
			let l;
			if (c) if (Array.isArray(c) && c.length > 0) {
				let e = c[0];
				l = this[h](o.Buffer.from(e));
				for (let e = 1; e < c.length; e++) l = this[h](c[e]);
			} else l = this[h](o.Buffer.from(c));
			return n && n(), l;
		}
	}, y = class extends v {
		#e;
		#t;
		constructor(e, t) {
			e ||= {}, e.flush = e.flush || l.constants.Z_NO_FLUSH, e.finishFlush = e.finishFlush || l.constants.Z_FINISH, e.fullFlushFlag = l.constants.Z_FULL_FLUSH, super(e, t), this.#e = e.level, this.#t = e.strategy;
		}
		params(e, t) {
			if (!this.sawError) {
				if (!this.handle) throw Error("cannot switch params when binding is closed");
				/* c8 ignore start */
				if (!this.handle.params) throw Error("not supported in this implementation");
				/* c8 ignore stop */
				if (this.#e !== e || this.#t !== t) {
					this.flush(l.constants.Z_SYNC_FLUSH), (0, a.default)(this.handle, "zlib binding closed");
					let n = this.handle.flush;
					this.handle.flush = (e, t) => {
						typeof e == "function" && (t = e, e = this.flushFlag), this.flush(e), t?.();
					};
					try {
						this.handle.params(e, t);
					} finally {
						this.handle.flush = n;
					}
					/* c8 ignore start */
					this.handle && (this.#e = e, this.#t = t);
				}
			}
		}
	};
	e.Zlib = y, e.Deflate = class extends y {
		constructor(e) {
			super(e, "Deflate");
		}
	}, e.Inflate = class extends y {
		constructor(e) {
			super(e, "Inflate");
		}
	}, e.Gzip = class extends y {
		#e;
		constructor(e) {
			super(e, "Gzip"), this.#e = e && !!e.portable;
		}
		[h](e) {
			return this.#e ? (this.#e = !1, e[9] = 255, super[h](e)) : super[h](e);
		}
	}, e.Gunzip = class extends y {
		constructor(e) {
			super(e, "Gunzip");
		}
	}, e.DeflateRaw = class extends y {
		constructor(e) {
			super(e, "DeflateRaw");
		}
	}, e.InflateRaw = class extends y {
		constructor(e) {
			super(e, "InflateRaw");
		}
	}, e.Unzip = class extends y {
		constructor(e) {
			super(e, "Unzip");
		}
	};
	var b = class extends v {
		constructor(e, t) {
			e ||= {}, e.flush = e.flush || l.constants.BROTLI_OPERATION_PROCESS, e.finishFlush = e.finishFlush || l.constants.BROTLI_OPERATION_FINISH, e.fullFlushFlag = l.constants.BROTLI_OPERATION_FLUSH, super(e, t);
		}
	};
	e.BrotliCompress = class extends b {
		constructor(e) {
			super(e, "BrotliCompress");
		}
	}, e.BrotliDecompress = class extends b {
		constructor(e) {
			super(e, "BrotliDecompress");
		}
	};
	var x = class extends v {
		constructor(e, t) {
			e ||= {}, e.flush = e.flush || l.constants.ZSTD_e_continue, e.finishFlush = e.finishFlush || l.constants.ZSTD_e_end, e.fullFlushFlag = l.constants.ZSTD_e_flush, super(e, t);
		}
	};
	e.ZstdCompress = class extends x {
		constructor(e) {
			super(e, "ZstdCompress");
		}
	}, e.ZstdDecompress = class extends x {
		constructor(e) {
			super(e, "ZstdDecompress");
		}
	};
})), Da = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.MinipassSized = e.SizeError = void 0;
	var t = wa(), n = (e) => typeof e == "string", r = class extends Error {
		expect;
		found;
		code = "EBADSIZE";
		constructor(e, t, n) {
			super(`Bad data size: expected ${t} bytes, but got ${e}`), this.expect = t, this.found = e, Error.captureStackTrace(this, n ?? this.constructor);
		}
		get name() {
			return "SizeError";
		}
	};
	e.SizeError = r, e.MinipassSized = class extends t.Minipass {
		found = 0;
		expect;
		constructor(e) {
			let t = e?.size;
			if (typeof t != "number" || t > 2 ** 53 - 1 || isNaN(t) || t < 0 || !isFinite(t) || t !== Math.floor(t)) throw Error("invalid expected size: " + t);
			if (super(e), e.objectMode) throw TypeError(`${this.constructor.name} streams only work with string and buffer data`);
			this.expect = t;
		}
		write(e, t, i) {
			let a = Buffer.isBuffer(e) ? e : typeof e == "string" ? Buffer.from(e, n(t) ? t : "utf8") : e;
			return typeof t == "function" && (i = t, t = null), Buffer.isBuffer(a) ? (this.found += a.length, this.found > this.expect && this.emit("error", new r(this.found, this.expect)), super.write(e, t, i)) : (this.emit("error", /* @__PURE__ */ TypeError(`${this.constructor.name} streams only work with string and buffer data`)), !1);
		}
		emit(e, ...t) {
			return e === "end" && this.found !== this.expect && this.emit("error", new r(this.found, this.expect, this.emit)), super.emit(e, ...t);
		}
	};
})), Oa = /* @__PURE__ */ w(((e, t) => {
	var { Minipass: n } = wa(), r = Symbol("type"), i = Symbol("buffer"), a = class e {
		constructor(t, n) {
			this[r] = "";
			let a = [], o = 0;
			if (t) {
				let n = t, r = Number(n.length);
				for (let t = 0; t < r; t++) {
					let r = n[t], s = r instanceof Buffer ? r : ArrayBuffer.isView(r) ? Buffer.from(r.buffer, r.byteOffset, r.byteLength) : r instanceof ArrayBuffer ? Buffer.from(r) : r instanceof e ? r[i] : typeof r == "string" ? Buffer.from(r) : Buffer.from(String(r));
					o += s.length, a.push(s);
				}
			}
			this[i] = Buffer.concat(a, o);
			let s = n && n.type !== void 0 && String(n.type).toLowerCase();
			s && !/[^\u0020-\u007E]/.test(s) && (this[r] = s);
		}
		get size() {
			return this[i].length;
		}
		get type() {
			return this[r];
		}
		text() {
			return Promise.resolve(this[i].toString());
		}
		arrayBuffer() {
			let e = this[i], t = e.byteOffset, n = e.byteLength, r = e.buffer.slice(t, t + n);
			return Promise.resolve(r);
		}
		stream() {
			return new n().end(this[i]);
		}
		slice(t, n, r) {
			let a = this.size, o = t === void 0 ? 0 : t < 0 ? Math.max(a + t, 0) : Math.min(t, a), s = n === void 0 ? a : n < 0 ? Math.max(a + n, 0) : Math.min(n, a), c = Math.max(s - o, 0), l = this[i].slice(o, o + c), u = new e([], { type: r });
			return u[i] = l, u;
		}
		get [Symbol.toStringTag]() {
			return "Blob";
		}
		static get BUFFER() {
			return i;
		}
	};
	Object.defineProperties(a.prototype, {
		size: { enumerable: !0 },
		type: { enumerable: !0 }
	}), t.exports = a;
})), ka = /* @__PURE__ */ w(((e, t) => {
	t.exports = class extends Error {
		constructor(e, t, n) {
			super(e), this.code = "FETCH_ERROR", n && Object.assign(this, n), this.errno = this.code, this.type = this.code === "EBADSIZE" && this.found > this.expect ? "max-size" : t, this.message = e, Error.captureStackTrace(this, this.constructor);
		}
		get name() {
			return "FetchError";
		}
		set name(e) {}
		get [Symbol.toStringTag]() {
			return "FetchError";
		}
	};
})), Aa = /* @__PURE__ */ T({ default: () => ja }), ja, Ma = C((() => {
	ja = {};
})), Na = /* @__PURE__ */ w(((e, t) => {
	var { Minipass: n } = wa(), { MinipassSized: r } = Da(), i = Oa(), { BUFFER: a } = i, o = ka(), s;
	try {
		s = (Ma(), O(Aa)).decode;
	} catch {}
	var c = Symbol("Body internals"), l = Symbol("consumeBody"), u = class {
		constructor(e, t = {}) {
			let { size: r = 0, timeout: i = 0 } = t, a = e == null ? null : d(e) ? Buffer.from(e.toString()) : f(e) || Buffer.isBuffer(e) ? e : Object.prototype.toString.call(e) === "[object ArrayBuffer]" ? Buffer.from(e) : ArrayBuffer.isView(e) ? Buffer.from(e.buffer, e.byteOffset, e.byteLength) : n.isStream(e) ? e : Buffer.from(String(e));
			this[c] = {
				body: a,
				disturbed: !1,
				error: null
			}, this.size = r, this.timeout = i, n.isStream(a) && a.on("error", (e) => {
				let t = e.name === "AbortError" ? e : new o(`Invalid response while trying to fetch ${this.url}: ${e.message}`, "system", e);
				this[c].error = t;
			});
		}
		get body() {
			return this[c].body;
		}
		get bodyUsed() {
			return this[c].disturbed;
		}
		arrayBuffer() {
			return this[l]().then((e) => e.buffer.slice(e.byteOffset, e.byteOffset + e.byteLength));
		}
		blob() {
			let e = this.headers && this.headers.get("content-type") || "";
			return this[l]().then((t) => Object.assign(new i([], { type: e.toLowerCase() }), { [a]: t }));
		}
		async json() {
			let e = await this[l]();
			try {
				return JSON.parse(e.toString());
			} catch (e) {
				throw new o(`invalid json response body at ${this.url} reason: ${e.message}`, "invalid-json");
			}
		}
		text() {
			return this[l]().then((e) => e.toString());
		}
		buffer() {
			return this[l]();
		}
		textConverted() {
			/* istanbul ignore if */
			if (typeof s != "function") throw Error("The package `iconv-lite` must be installed to use the textConverted() function");
			return this[l]().then((e) => p(e, this.headers));
		}
		[l]() {
			if (this[c].disturbed) return Promise.reject(/* @__PURE__ */ TypeError(`body used already for: ${this.url}`));
			if (this[c].disturbed = !0, this[c].error) return Promise.reject(this[c].error);
			if (this.body === null) return Promise.resolve(Buffer.alloc(0));
			if (Buffer.isBuffer(this.body)) return Promise.resolve(this.body);
			let e = f(this.body) ? this.body.stream() : this.body;
			/* istanbul ignore if: should never happen */
			if (!n.isStream(e)) return Promise.resolve(Buffer.alloc(0));
			let t = this.size && e instanceof r || !this.size && e instanceof n && !(e instanceof r) ? e : this.size ? new r({ size: this.size }) : new n(), i = this.timeout && t.writable ? setTimeout(() => {
				t.emit("error", new o(`Response timeout while trying to fetch ${this.url} (over ${this.timeout}ms)`, "body-timeout"));
			}, this.timeout) : null;
			return i && i.unref && i.unref(), new Promise((n) => {
				t !== e && (e.on("error", (e) => t.emit("error", e)), e.pipe(t)), n();
			}).then(() => t.concat()).then((e) => (clearTimeout(i), e)).catch((e) => {
				throw clearTimeout(i), e.name === "AbortError" || e.name === "FetchError" ? e : e.name === "RangeError" ? new o(`Could not create Buffer from response body for ${this.url}: ${e.message}`, "system", e) : new o(`Invalid response body while trying to fetch ${this.url}: ${e.message}`, "system", e);
			});
		}
		static clone(e) {
			if (e.bodyUsed) throw Error("cannot clone body after it is used");
			let t = e.body;
			if (n.isStream(t) && typeof t.getBoundary != "function") {
				let r = new n(), i = new n(), a = new n();
				return r.on("error", (e) => {
					i.emit("error", e), a.emit("error", e);
				}), t.on("error", (e) => r.emit("error", e)), r.pipe(i), r.pipe(a), t.pipe(r), e[c].body = i, a;
			} else return e.body;
		}
		static extractContentType(e) {
			return e == null ? null : typeof e == "string" ? "text/plain;charset=UTF-8" : d(e) ? "application/x-www-form-urlencoded;charset=UTF-8" : f(e) ? e.type || null : Buffer.isBuffer(e) || Object.prototype.toString.call(e) === "[object ArrayBuffer]" || ArrayBuffer.isView(e) ? null : typeof e.getBoundary == "function" ? `multipart/form-data;boundary=${e.getBoundary()}` : n.isStream(e) ? null : "text/plain;charset=UTF-8";
		}
		static getTotalBytes(e) {
			let { body: t } = e;
			return t == null ? 0 : f(t) ? t.size : Buffer.isBuffer(t) ? t.length : t && typeof t.getLengthSync == "function" && (t._lengthRetrievers && t._lengthRetrievers.length === 0 || t.hasKnownLength && t.hasKnownLength()) ? t.getLengthSync() : null;
		}
		static writeToStream(e, t) {
			let { body: n } = t;
			return n == null ? e.end() : Buffer.isBuffer(n) || typeof n == "string" ? e.end(n) : (f(n) ? n.stream() : n).on("error", (t) => e.emit("error", t)).pipe(e), e;
		}
	};
	Object.defineProperties(u.prototype, {
		body: { enumerable: !0 },
		bodyUsed: { enumerable: !0 },
		arrayBuffer: { enumerable: !0 },
		blob: { enumerable: !0 },
		json: { enumerable: !0 },
		text: { enumerable: !0 }
	});
	var d = (e) => typeof e != "object" || typeof e.append != "function" || typeof e.delete != "function" || typeof e.get != "function" || typeof e.getAll != "function" || typeof e.has != "function" || typeof e.set != "function" ? !1 : e.constructor.name === "URLSearchParams" || Object.prototype.toString.call(e) === "[object URLSearchParams]" || typeof e.sort == "function", f = (e) => typeof e == "object" && typeof e.arrayBuffer == "function" && typeof e.type == "string" && typeof e.stream == "function" && typeof e.constructor == "function" && typeof e.constructor.name == "string" && /^(Blob|File)$/.test(e.constructor.name) && /^(Blob|File)$/.test(e[Symbol.toStringTag]), p = (e, t) => {
		let n = t && t.get("content-type"), r = "utf-8", i;
		n && (i = /charset=([^;]*)/i.exec(n));
		let a = e.slice(0, 1024).toString();
		if (!i && a && (i = /<meta.+?charset=(['"])(.+?)\1/i.exec(a)), !i && a && (i = /<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(a), i || (i = /<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(a), i && i.pop()), i &&= /charset=(.*)/i.exec(i.pop())), !i && a && (i = /<\?xml.+?encoding=(['"])(.+?)\1/i.exec(a)), i && (r = i.pop(), (r === "gb2312" || r === "gbk") && (r = "gb18030")), r === "UTF-8") return e.toString("UTF-8");
		r = r.toString().trim().replace(/^latin[-_]?(\d+)$/i, "ISO-8859-$1").replace(/^win(?:dows)?[-_]?(\d+)$/i, "WINDOWS-$1").replace(/^utf[-_]?(\d+)$/i, "UTF-$1").replace(/^ks_c_5601-1987$/i, "CP949").replace(/^us[-_]?ascii$/i, "ASCII").toUpperCase();
		try {
			return s(e, r).toString();
		} catch {
			/* istanbul ignore next */
			return e.toString("UTF-8");
		}
	};
	t.exports = u;
})), Pa = /* @__PURE__ */ w(((e, t) => {
	var n = /[^^_`a-zA-Z\-0-9!#$%&'*+.|~]/, r = /[^\t\x20-\x7e\x80-\xff]/, i = (e) => {
		if (e = `${e}`, n.test(e) || e === "") throw TypeError(`${e} is not a legal HTTP header name`);
	}, a = (e) => {
		if (e = `${e}`, r.test(e)) throw TypeError(`${e} is not a legal HTTP header value`);
	}, o = (e, t) => {
		t = t.toLowerCase();
		for (let n in e) if (n.toLowerCase() === t) return n;
	}, s = Symbol("map"), c = class e {
		constructor(t = void 0) {
			if (this[s] = Object.create(null), t instanceof e) {
				let e = t.raw(), n = Object.keys(e);
				for (let t of n) for (let n of e[t]) this.append(t, n);
				return;
			}
			if (t != null) if (typeof t == "object") {
				let e = t[Symbol.iterator];
				if (e != null) {
					if (typeof e != "function") throw TypeError("Header pairs must be iterable");
					let n = [];
					for (let e of t) {
						if (typeof e != "object" || typeof e[Symbol.iterator] != "function") throw TypeError("Each header pair must be iterable");
						let t = Array.from(e);
						if (t.length !== 2) throw TypeError("Each header pair must be a name/value tuple");
						n.push(t);
					}
					for (let e of n) this.append(e[0], e[1]);
				} else for (let e of Object.keys(t)) this.append(e, t[e]);
			} else throw TypeError("Provided initializer must be an object");
		}
		get(e) {
			e = `${e}`, i(e);
			let t = o(this[s], e);
			return t === void 0 ? null : this[s][t].join(", ");
		}
		forEach(e, t = void 0) {
			let n = l(this);
			for (let r = 0; r < n.length; r++) {
				let [i, a] = n[r];
				e.call(t, a, i, this), n = l(this);
			}
		}
		set(e, t) {
			e = `${e}`, t = `${t}`, i(e), a(t);
			let n = o(this[s], e);
			this[s][n === void 0 ? e : n] = [t];
		}
		append(e, t) {
			e = `${e}`, t = `${t}`, i(e), a(t);
			let n = o(this[s], e);
			n === void 0 ? this[s][e] = [t] : this[s][n].push(t);
		}
		has(e) {
			return e = `${e}`, i(e), o(this[s], e) !== void 0;
		}
		delete(e) {
			e = `${e}`, i(e);
			let t = o(this[s], e);
			t !== void 0 && delete this[s][t];
		}
		raw() {
			return this[s];
		}
		keys() {
			return new d(this, "key");
		}
		values() {
			return new d(this, "value");
		}
		[Symbol.iterator]() {
			return new d(this, "key+value");
		}
		entries() {
			return new d(this, "key+value");
		}
		get [Symbol.toStringTag]() {
			return "Headers";
		}
		static exportNodeCompatibleHeaders(e) {
			let t = Object.assign(Object.create(null), e[s]), n = o(e[s], "Host");
			return n !== void 0 && (t[n] = t[n][0]), t;
		}
		static createHeadersLenient(t) {
			let i = new e();
			for (let e of Object.keys(t)) if (!n.test(e)) if (Array.isArray(t[e])) for (let n of t[e]) r.test(n) || (i[s][e] === void 0 ? i[s][e] = [n] : i[s][e].push(n));
			else r.test(t[e]) || (i[s][e] = [t[e]]);
			return i;
		}
	};
	Object.defineProperties(c.prototype, {
		get: { enumerable: !0 },
		forEach: { enumerable: !0 },
		set: { enumerable: !0 },
		append: { enumerable: !0 },
		has: { enumerable: !0 },
		delete: { enumerable: !0 },
		keys: { enumerable: !0 },
		values: { enumerable: !0 },
		entries: { enumerable: !0 }
	});
	var l = (e, t = "key+value") => Object.keys(e[s]).sort().map(t === "key" ? (e) => e.toLowerCase() : t === "value" ? (t) => e[s][t].join(", ") : (t) => [t.toLowerCase(), e[s][t].join(", ")]), u = Symbol("internal"), d = class e {
		constructor(e, t) {
			this[u] = {
				target: e,
				kind: t,
				index: 0
			};
		}
		get [Symbol.toStringTag]() {
			return "HeadersIterator";
		}
		next() {
			/* istanbul ignore if: should be impossible */
			if (!this || Object.getPrototypeOf(this) !== e.prototype) throw TypeError("Value of `this` is not a HeadersIterator");
			let { target: t, kind: n, index: r } = this[u], i = l(t, n);
			return r >= i.length ? {
				value: void 0,
				done: !0
			} : (this[u].index++, {
				value: i[r],
				done: !1
			});
		}
	};
	Object.setPrototypeOf(d.prototype, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))), t.exports = c;
})), Fa = /* @__PURE__ */ w(((e, t) => {
	var { STATUS_CODES: n } = k("http"), r = Pa(), i = Na(), { clone: a, extractContentType: o } = i, s = Symbol("Response internals"), c = class e extends i {
		constructor(e = null, t = {}) {
			super(e, t);
			let i = t.status || 200, a = new r(t.headers);
			if (e != null && !a.has("Content-Type")) {
				let t = o(e);
				t && a.append("Content-Type", t);
			}
			this[s] = {
				url: t.url,
				status: i,
				statusText: t.statusText || n[i],
				headers: a,
				counter: t.counter,
				trailer: Promise.resolve(t.trailer || new r())
			};
		}
		get trailer() {
			return this[s].trailer;
		}
		get url() {
			return this[s].url || "";
		}
		get status() {
			return this[s].status;
		}
		get ok() {
			return this[s].status >= 200 && this[s].status < 300;
		}
		get redirected() {
			return this[s].counter > 0;
		}
		get statusText() {
			return this[s].statusText;
		}
		get headers() {
			return this[s].headers;
		}
		clone() {
			return new e(a(this), {
				url: this.url,
				status: this.status,
				statusText: this.statusText,
				headers: this.headers,
				ok: this.ok,
				redirected: this.redirected,
				trailer: this.trailer
			});
		}
		get [Symbol.toStringTag]() {
			return "Response";
		}
	};
	t.exports = c, Object.defineProperties(c.prototype, {
		url: { enumerable: !0 },
		status: { enumerable: !0 },
		ok: { enumerable: !0 },
		redirected: { enumerable: !0 },
		statusText: { enumerable: !0 },
		headers: { enumerable: !0 },
		clone: { enumerable: !0 }
	});
})), Ia = /* @__PURE__ */ T({
	author: () => Xa,
	default: () => Qa,
	dependencies: () => Wa,
	description: () => za,
	devDependencies: () => Ua,
	engines: () => Ya,
	files: () => Ja,
	keywords: () => qa,
	license: () => "MIT",
	main: () => Ba,
	name: () => La,
	optionalDependencies: () => Ga,
	repository: () => Ka,
	scripts: () => Va,
	tap: () => Ha,
	templateOSS: () => Za,
	version: () => Ra
}), La, Ra, za, Ba, Va, Ha, Ua, Wa, Ga, Ka, qa, Ja, Ya, Xa, Za, Qa, $a = C((() => {
	La = "minipass-fetch", Ra = "5.0.2", za = "An implementation of window.fetch in Node.js using Minipass streams", Ba = "lib/index.js", Va = {
		"test:tls-fixtures": "./test/fixtures/tls/setup.sh",
		test: "tap",
		snap: "tap",
		lint: "npm run eslint",
		postlint: "template-oss-check",
		lintfix: "npm run eslint -- --fix",
		posttest: "npm run lint",
		"template-oss-apply": "template-oss-apply --force",
		eslint: "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
	}, Ha = {
		"coverage-map": "map.js",
		"check-coverage": !0,
		"nyc-arg": ["--exclude", "tap-snapshots/**"]
	}, Ua = {
		"@npmcli/eslint-config": "^5.0.0",
		"@npmcli/template-oss": "4.27.1",
		"@ungap/url-search-params": "^0.2.2",
		"abort-controller": "^3.0.0",
		"abortcontroller-polyfill": "~1.7.3",
		"form-data": "^4.0.0",
		"iconv-lite": "^0.7.2",
		nock: "^13.2.4",
		parted: "^0.1.1",
		"string-to-arraybuffer": "^1.0.2",
		tap: "^16.0.0"
	}, Wa = {
		minipass: "^7.0.3",
		"minipass-sized": "^2.0.0",
		minizlib: "^3.0.1"
	}, Ga = { "iconv-lite": "^0.7.2" }, Ka = {
		type: "git",
		url: "git+https://github.com/npm/minipass-fetch.git"
	}, qa = [
		"fetch",
		"minipass",
		"node-fetch",
		"window.fetch"
	], Ja = ["bin/", "lib/"], Ya = { node: "^20.17.0 || >=22.9.0" }, Xa = "GitHub Inc.", Za = {
		"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
		version: "4.27.1",
		publish: "true"
	}, Qa = {
		name: La,
		version: Ra,
		description: za,
		license: "MIT",
		main: Ba,
		scripts: Va,
		tap: Ha,
		devDependencies: Ua,
		dependencies: Wa,
		optionalDependencies: Ga,
		repository: Ka,
		keywords: qa,
		files: Ja,
		engines: Ya,
		author: Xa,
		templateOSS: Za
	};
})), eo = /* @__PURE__ */ w(((e, t) => {
	var { URL: n } = k("url"), { Minipass: r } = wa(), i = Pa(), { exportNodeCompatibleHeaders: a } = i, o = Na(), { clone: s, extractContentType: c, getTotalBytes: l } = o, u = `minipass-fetch/${($a(), O(Ia).default).version} (+https://github.com/isaacs/minipass-fetch)`, d = Symbol("Request internals"), f = (e) => typeof e == "object" && typeof e[d] == "object", p = (e) => {
		let t = e && typeof e == "object" && Object.getPrototypeOf(e);
		return !!(t && t.constructor.name === "AbortSignal");
	}, m = class e extends o {
		constructor(e, t = {}) {
			let r = f(e) ? new n(e.url) : e && e.href ? new n(e.href) : new n(`${e}`);
			f(e) ? t = {
				...e[d],
				...t
			} : (!e || typeof e == "string") && (e = {});
			let a = (t.method || e.method || "GET").toUpperCase(), o = a === "GET" || a === "HEAD";
			if ((t.body !== null && t.body !== void 0 || f(e) && e.body !== null) && o) throw TypeError("Request with GET/HEAD method cannot have body");
			let l = t.body !== null && t.body !== void 0 ? t.body : f(e) && e.body !== null ? s(e) : null;
			super(l, {
				timeout: t.timeout || e.timeout || 0,
				size: t.size || e.size || 0
			});
			let u = new i(t.headers || e.headers || {});
			if (l != null && !u.has("Content-Type")) {
				let e = c(l);
				e && u.append("Content-Type", e);
			}
			let m = "signal" in t ? t.signal : null;
			if (m != null && !p(m)) throw TypeError("Expected signal must be an instanceof AbortSignal");
			let { ca: h, cert: g, ciphers: _, clientCertEngine: v, crl: y, dhparam: b, ecdhCurve: x, family: S, honorCipherOrder: C, key: w, passphrase: T, pfx: E, rejectUnauthorized: D = process.env.NODE_TLS_REJECT_UNAUTHORIZED !== "0", secureOptions: O, secureProtocol: k, servername: A, sessionIdContext: j } = t;
			this[d] = {
				method: a,
				redirect: t.redirect || e.redirect || "follow",
				headers: u,
				parsedURL: r,
				signal: m,
				ca: h,
				cert: g,
				ciphers: _,
				clientCertEngine: v,
				crl: y,
				dhparam: b,
				ecdhCurve: x,
				family: S,
				honorCipherOrder: C,
				key: w,
				passphrase: T,
				pfx: E,
				rejectUnauthorized: D,
				secureOptions: O,
				secureProtocol: k,
				servername: A,
				sessionIdContext: j
			}, this.follow = t.follow === void 0 ? e.follow === void 0 ? 20 : e.follow : t.follow, this.compress = t.compress === void 0 ? e.compress === void 0 ? !0 : e.compress : t.compress, this.counter = t.counter || e.counter || 0, this.agent = t.agent || e.agent;
		}
		get method() {
			return this[d].method;
		}
		get url() {
			return this[d].parsedURL.toString();
		}
		get headers() {
			return this[d].headers;
		}
		get redirect() {
			return this[d].redirect;
		}
		get signal() {
			return this[d].signal;
		}
		clone() {
			return new e(this);
		}
		get [Symbol.toStringTag]() {
			return "Request";
		}
		static getNodeRequestOptions(e) {
			let t = e[d].parsedURL, n = new i(e[d].headers);
			if (n.has("Accept") || n.set("Accept", "*/*"), !/^https?:$/.test(t.protocol)) throw TypeError("Only HTTP(S) protocols are supported");
			if (e.signal && r.isStream(e.body) && typeof e.body.destroy != "function") throw Error("Cancellation of streamed requests with AbortSignal is not supported");
			let o = (e.body === null || e.body === void 0) && /^(POST|PUT)$/i.test(e.method) ? "0" : e.body !== null && e.body !== void 0 ? l(e) : null;
			o && n.set("Content-Length", o + ""), n.has("User-Agent") || n.set("User-Agent", u), e.compress && !n.has("Accept-Encoding") && n.set("Accept-Encoding", "gzip,deflate");
			let s = typeof e.agent == "function" ? e.agent(t) : e.agent;
			!n.has("Connection") && !s && n.set("Connection", "close");
			let { ca: c, cert: f, ciphers: p, clientCertEngine: m, crl: h, dhparam: g, ecdhCurve: _, family: v, honorCipherOrder: y, key: b, passphrase: x, pfx: S, rejectUnauthorized: C, secureOptions: w, secureProtocol: T, servername: E, sessionIdContext: D } = e[d];
			return {
				auth: t.username || t.password ? `${t.username}:${t.password}` : "",
				host: t.host,
				hostname: t.hostname,
				path: `${t.pathname}${t.search}`,
				port: t.port,
				protocol: t.protocol,
				method: e.method,
				headers: a(n),
				agent: s,
				ca: c,
				cert: f,
				ciphers: p,
				clientCertEngine: m,
				crl: h,
				dhparam: g,
				ecdhCurve: _,
				family: v,
				honorCipherOrder: y,
				key: b,
				passphrase: x,
				pfx: S,
				rejectUnauthorized: C,
				secureOptions: w,
				secureProtocol: T,
				servername: E,
				sessionIdContext: D,
				timeout: e.timeout
			};
		}
	};
	t.exports = m, Object.defineProperties(m.prototype, {
		method: { enumerable: !0 },
		url: { enumerable: !0 },
		headers: { enumerable: !0 },
		redirect: { enumerable: !0 },
		clone: { enumerable: !0 },
		signal: { enumerable: !0 }
	});
})), to = /* @__PURE__ */ w(((e, t) => {
	t.exports = class extends Error {
		constructor(e) {
			super(e), this.code = "FETCH_ABORTED", this.type = "aborted", Error.captureStackTrace(this, this.constructor);
		}
		get name() {
			return "AbortError";
		}
		set name(e) {}
	};
})), no = /* @__PURE__ */ w(((e, t) => {
	var { URL: n } = k("url"), r = k("http"), i = k("https"), a = Ea(), { Minipass: o } = wa(), { writeToStream: s, getTotalBytes: c } = Na(), l = Fa(), u = Pa(), { createHeadersLenient: d } = u, f = eo(), { getNodeRequestOptions: p } = f, m = ka(), h = to(), g = async (e, t) => {
		if (/^data:/.test(e)) {
			let r = new f(e, t);
			return Promise.resolve().then(() => new Promise((t, i) => {
				let a, o;
				try {
					let { pathname: t, search: r } = new n(e), i = t.split(",");
					if (i.length < 2) throw Error("invalid data: URI");
					let s = i.shift(), c = /;base64$/.test(s);
					a = c ? s.slice(0, -7) : s;
					let l = decodeURIComponent(i.join(",") + r);
					o = c ? Buffer.from(l, "base64") : Buffer.from(l);
				} catch (e) {
					return i(new m(`[${r.method}] ${r.url} invalid URL, ${e.message}`, "system", e));
				}
				let { signal: s } = r;
				if (s && s.aborted) return i(new h("The user aborted a request."));
				let c = { "Content-Length": o.length };
				return a && (c["Content-Type"] = a), t(new l(o, { headers: c }));
			}));
		}
		return new Promise((_, v) => {
			let y = new f(e, t), b;
			try {
				b = p(y);
			} catch (e) {
				return v(e);
			}
			let x = (b.protocol === "https:" ? i : r).request, { signal: S } = y, C = null, w = () => {
				let e = new h("The user aborted a request.");
				v(e), o.isStream(y.body) && typeof y.body.destroy == "function" && y.body.destroy(e), C && C.body && C.body.emit("error", e);
			};
			if (S && S.aborted) return w();
			let T = () => {
				w(), E();
			}, E = () => {
				D.abort(), S && S.removeEventListener("abort", T), clearTimeout(O);
			}, D = x(b);
			S && S.addEventListener("abort", T);
			let O = null;
			y.timeout && D.once("socket", () => {
				O = setTimeout(() => {
					v(new m(`network timeout at: ${y.url}`, "request-timeout")), E();
				}, y.timeout);
			}), D.on("error", (e) => {
				D.res && D.res.emit("error", e), v(new m(`request to ${y.url} failed, reason: ${e.message}`, "system", e)), E();
			}), D.on("response", (e) => {
				clearTimeout(O);
				let t = d(e.headers);
				if (g.isRedirect(e.statusCode)) {
					let r = t.get("Location"), i = null;
					try {
						i = r === null ? null : new n(r, y.url).toString();
					} catch {
						if (y.redirect !== "manual") {
							v(new m(`uri requested responds with an invalid redirect URL: ${r}`, "invalid-redirect")), E();
							return;
						}
					}
					if (y.redirect === "error") {
						v(new m(`uri requested responds with a redirect, redirect mode is set to error: ${y.url}`, "no-redirect")), E();
						return;
					} else if (y.redirect === "manual") {
						if (i !== null) try {
							t.set("Location", i);
						} catch (e) {
							/* istanbul ignore next: nodejs server prevent invalid
							response headers, we can't test this through normal
							request */
							v(e);
						}
					} else if (y.redirect === "follow" && i !== null) {
						if (y.counter >= y.follow) {
							v(new m(`maximum redirect reached at: ${y.url}`, "max-redirect")), E();
							return;
						}
						if (e.statusCode !== 303 && y.body && c(y) === null) {
							v(new m("Cannot follow redirect with body being a readable stream", "unsupported-redirect")), E();
							return;
						}
						y.headers.set("host", new n(i).host);
						let t = {
							headers: new u(y.headers),
							follow: y.follow,
							counter: y.counter + 1,
							agent: y.agent,
							compress: y.compress,
							method: y.method,
							body: y.body,
							signal: y.signal,
							timeout: y.timeout
						}, r = new n(y.url), a = new n(i);
						r.hostname !== a.hostname && (t.headers.delete("authorization"), t.headers.delete("cookie")), (e.statusCode === 303 || (e.statusCode === 301 || e.statusCode === 302) && y.method === "POST") && (t.method = "GET", t.body = void 0, t.headers.delete("content-length")), _(g(new f(i, t))), E();
						return;
					}
				}
				e.once("end", () => S && S.removeEventListener("abort", T));
				let r = new o();
				r.on("error", E), e.on(
					"error",
					/* istanbul ignore next */
					(e) => r.emit("error", e)
				), e.on("data", (e) => r.write(e)), e.on("end", () => r.end());
				let i = {
					url: y.url,
					status: e.statusCode,
					statusText: e.statusMessage,
					headers: t,
					size: y.size,
					timeout: y.timeout,
					counter: y.counter,
					trailer: new Promise((t) => e.on("end", () => t(d(e.trailers))))
				}, s = t.get("Content-Encoding");
				if (!y.compress || y.method === "HEAD" || s === null || e.statusCode === 204 || e.statusCode === 304) {
					C = new l(r, i), _(C);
					return;
				}
				let p = {
					flush: a.constants.Z_SYNC_FLUSH,
					finishFlush: a.constants.Z_SYNC_FLUSH
				};
				if (s === "gzip" || s === "x-gzip") {
					let e = new a.Gunzip(p);
					C = new l(r.on(
						"error",
						/* istanbul ignore next */
						(t) => e.emit("error", t)
					).pipe(e), i), _(C);
					return;
				}
				if (s === "deflate" || s === "x-deflate") {
					e.once("data", (e) => {
						let t = (e[0] & 15) == 8 ? new a.Inflate() : new a.InflateRaw();
						r.on(
							"error",
							/* istanbul ignore next */
							(e) => t.emit("error", e)
						).pipe(t), C = new l(t, i), _(C);
					});
					return;
				}
				if (s === "br") {
					// istanbul ignore next
					try {
						var h = new a.BrotliDecompress();
					} catch (e) {
						v(e), E();
						return;
					}
					r.on(
						"error",
						/* istanbul ignore next */
						(e) => h.emit("error", e)
					).pipe(h), C = new l(h, i), _(C);
					return;
				}
				C = new l(r, i), _(C);
			}), s(D, y);
		});
	};
	t.exports = g, g.isRedirect = (e) => e === 301 || e === 302 || e === 303 || e === 307 || e === 308, g.Headers = u, g.Request = f, g.Response = l, g.FetchError = m, g.AbortError = h;
})), ro = /* @__PURE__ */ T({
	author: () => fo,
	default: () => vo,
	dependencies: () => po,
	description: () => oo,
	devDependencies: () => mo,
	engines: () => go,
	files: () => so,
	keywords: () => uo,
	license: () => "ISC",
	main: () => "lib",
	name: () => io,
	repository: () => lo,
	scripts: () => co,
	tap: () => ho,
	templateOSS: () => _o,
	version: () => ao
}), io, ao, oo, so, co, lo, uo, fo, po, mo, ho, go, _o, vo, yo = C((() => {
	io = "npm-registry-fetch", ao = "19.1.1", oo = "Fetch-based http client for use with npm registry APIs", so = ["bin/", "lib/"], co = {
		eslint: "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
		lint: "npm run eslint",
		lintfix: "npm run eslint -- --fix",
		test: "tap",
		posttest: "npm run lint",
		npmclilint: "npmcli-lint",
		postsnap: "npm run lintfix --",
		postlint: "template-oss-check",
		snap: "tap",
		"template-oss-apply": "template-oss-apply --force"
	}, lo = {
		type: "git",
		url: "git+https://github.com/npm/npm-registry-fetch.git"
	}, uo = [
		"npm",
		"registry",
		"fetch"
	], fo = "GitHub Inc.", po = {
		"@npmcli/redact": "^4.0.0",
		jsonparse: "^1.3.1",
		"make-fetch-happen": "^15.0.0",
		minipass: "^7.0.2",
		"minipass-fetch": "^5.0.0",
		minizlib: "^3.0.1",
		"npm-package-arg": "^13.0.0",
		"proc-log": "^6.0.0"
	}, mo = {
		"@npmcli/eslint-config": "^6.0.0",
		"@npmcli/template-oss": "4.28.0",
		cacache: "^20.0.0",
		nock: "^13.2.4",
		"require-inject": "^1.4.4",
		ssri: "^13.0.0",
		tap: "^16.0.1"
	}, ho = {
		"check-coverage": !0,
		"test-ignore": "test[\\\\/](util|cache)[\\\\/]",
		"nyc-arg": ["--exclude", "tap-snapshots/**"]
	}, go = { node: "^20.17.0 || >=22.9.0" }, _o = {
		"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
		version: "4.28.0",
		publish: "true"
	}, vo = {
		name: io,
		version: ao,
		description: oo,
		main: "lib",
		files: so,
		scripts: co,
		repository: lo,
		keywords: uo,
		author: fo,
		license: "ISC",
		dependencies: po,
		devDependencies: mo,
		tap: ho,
		engines: go,
		templateOSS: _o
	};
})), bo = /* @__PURE__ */ w(((e, t) => {
	var n = (yo(), O(ro).default);
	t.exports = {
		maxSockets: 12,
		method: "GET",
		registry: "https://registry.npmjs.org/",
		timeout: 300 * 1e3,
		strictSSL: !0,
		noProxy: process.env.NOPROXY,
		userAgent: `${n.name}@${n.version}/node@${process.version}+${process.arch} (${process.platform})`
	};
})), xo = /* @__PURE__ */ w(((e, t) => {
	t.exports = {
		META: Symbol("proc-log.meta"),
		output: {
			LEVELS: [
				"standard",
				"error",
				"buffer",
				"flush"
			],
			KEYS: {
				standard: "standard",
				error: "error",
				buffer: "buffer",
				flush: "flush"
			},
			standard: function(...e) {
				return process.emit("output", "standard", ...e);
			},
			error: function(...e) {
				return process.emit("output", "error", ...e);
			},
			buffer: function(...e) {
				return process.emit("output", "buffer", ...e);
			},
			flush: function(...e) {
				return process.emit("output", "flush", ...e);
			}
		},
		log: {
			LEVELS: [
				"notice",
				"error",
				"warn",
				"info",
				"verbose",
				"http",
				"silly",
				"timing",
				"pause",
				"resume"
			],
			KEYS: {
				notice: "notice",
				error: "error",
				warn: "warn",
				info: "info",
				verbose: "verbose",
				http: "http",
				silly: "silly",
				timing: "timing",
				pause: "pause",
				resume: "resume"
			},
			error: function(...e) {
				return process.emit("log", "error", ...e);
			},
			notice: function(...e) {
				return process.emit("log", "notice", ...e);
			},
			warn: function(...e) {
				return process.emit("log", "warn", ...e);
			},
			info: function(...e) {
				return process.emit("log", "info", ...e);
			},
			verbose: function(...e) {
				return process.emit("log", "verbose", ...e);
			},
			http: function(...e) {
				return process.emit("log", "http", ...e);
			},
			silly: function(...e) {
				return process.emit("log", "silly", ...e);
			},
			timing: function(...e) {
				return process.emit("log", "timing", ...e);
			},
			pause: function() {
				return process.emit("log", "pause");
			},
			resume: function() {
				return process.emit("log", "resume");
			}
		},
		time: {
			LEVELS: ["start", "end"],
			KEYS: {
				start: "start",
				end: "end"
			},
			start: function(e, t) {
				process.emit("time", "start", e);
				function n() {
					return process.emit("time", "end", e);
				}
				if (typeof t == "function") {
					let e = t();
					return e && e.finally ? e.finally(n) : (n(), e);
				}
				return n;
			},
			end: function(e) {
				return process.emit("time", "end", e);
			}
		},
		input: {
			LEVELS: [
				"start",
				"end",
				"read"
			],
			KEYS: {
				start: "start",
				end: "end",
				read: "read"
			},
			start: function(...e) {
				let t;
				typeof e[0] == "function" && (t = e.shift()), process.emit("input", "start", ...e);
				function n() {
					return process.emit("input", "end", ...e);
				}
				if (typeof t == "function") {
					let e = t();
					return e && e.finally ? e.finally(n) : (n(), e);
				}
				return n;
			},
			end: function(...e) {
				return process.emit("input", "end", ...e);
			},
			read: function(...e) {
				let t, n, r = new Promise((e, r) => {
					t = e, n = r;
				});
				return process.emit("input", "read", t, n, ...e), r;
			}
		}
	};
})), So = /* @__PURE__ */ w(((e, t) => {
	var n = "regex", r = "url", i = "path";
	t.exports = {
		TYPE_REGEX: n,
		TYPE_URL: r,
		TYPE_PATH: i,
		NPM_SECRET: {
			type: n,
			pattern: /\b(npms?_)[a-zA-Z0-9]{36,48}\b/gi,
			replacement: "[REDACTED_NPM_SECRET]"
		},
		AUTH_HEADER: {
			type: n,
			pattern: /\b(Basic\s+|Bearer\s+)[\w+=\-.]+\b/gi,
			replacement: "[REDACTED_AUTH_HEADER]"
		},
		JSON_WEB_TOKEN: {
			type: n,
			pattern: /\b[A-Za-z0-9-_]{10,}(?!\.\d+\.)\.[A-Za-z0-9-_]{3,}\.[A-Za-z0-9-_]{20,}\b/gi,
			replacement: "[REDACTED_JSON_WEB_TOKEN]"
		},
		UUID: {
			type: n,
			pattern: /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,
			replacement: "[REDACTED_UUID]"
		},
		URL_MATCHER: {
			type: n,
			pattern: /(?:https?|ftp):\/\/[^\s/"$.?#].[^\s"]*/gi,
			replacement: "[REDACTED_URL]"
		},
		DEEP_HEADER_AUTHORIZATION: {
			type: i,
			predicate: ({ path: e }) => e.endsWith(".headers.authorization"),
			replacement: "[REDACTED_HEADER_AUTHORIZATION]"
		},
		DEEP_HEADER_SET_COOKIE: {
			type: i,
			predicate: ({ path: e }) => e.endsWith(".headers.set-cookie"),
			replacement: "[REDACTED_HEADER_SET_COOKIE]"
		},
		DEEP_HEADER_COOKIE: {
			type: i,
			predicate: ({ path: e }) => e.endsWith(".headers.cookie"),
			replacement: "[REDACTED_HEADER_COOKIE]"
		},
		REWRITE_REQUEST: {
			type: i,
			predicate: ({ path: e }) => e.endsWith(".request"),
			replacement: (e) => ({
				method: e?.method,
				path: e?.path,
				headers: e?.headers,
				url: e?.url
			})
		},
		REWRITE_RESPONSE: {
			type: i,
			predicate: ({ path: e }) => e.endsWith(".response"),
			replacement: (e) => ({
				data: e?.data,
				status: e?.status,
				headers: e?.headers
			})
		}
	};
})), Co = /* @__PURE__ */ w(((e, t) => {
	var { URL_MATCHER: n, TYPE_URL: r, TYPE_REGEX: i, TYPE_PATH: a } = So(), o = (e = 0) => (e = typeof e == "string" ? e.length : e, e < 8 ? "*".repeat(8) : "*".repeat(e)), s = (e) => e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), c = (e) => [.../* @__PURE__ */ new Set([
		encodeURIComponent(e),
		decodeURIComponent(e),
		e
	])].map(s).join("|"), l = (e, ...t) => {
		let n = "";
		for (let r = 0; r < t.length; r++) n += e[r] + `(${c(t[r])})`;
		return n += e[e.length - 1], new RegExp(n);
	}, u = ({ hostname: e, replacement: t } = {}) => ({
		type: r,
		predicate: ({ url: t }) => t.hostname === e,
		pattern: ({ url: e }) => l`(^${e.protocol}//${e.username}:.+@)?${e.hostname}`,
		replacement: `$1${t || o()}`
	}), d = ({ param: e, replacement: t } = {}) => ({
		type: r,
		predicate: ({ url: t }) => t.searchParams.has(e),
		pattern: ({ url: t }) => l`(${e}=)${t.searchParams.get(e)}`,
		replacement: `$1${t || o()}`
	}), f = ({ replacement: e } = {}) => ({
		type: r,
		predicate: ({ url: e }) => e.password,
		pattern: ({ url: e }) => l`(^${e.protocol}//${e.username}:)${e.password}`,
		replacement: `$1${e || o()}`
	}), p = (...e) => (t) => {
		try {
			let n = new URL(t);
			return _(...e)(t, { url: n });
		} catch {
			return t;
		}
	}, m = (...e) => ({
		...n,
		replacement: p(...e)
	}), h = {
		[i]: (e) => (t) => (typeof t == "string" && (t = t.replace(e.pattern, e.replacement)), t),
		[r]: (e) => (t, n) => {
			if (typeof t == "string") try {
				let r = n?.url || new URL(t), { predicate: i, pattern: a } = e;
				i({ url: r }) && (t = t.replace(a({ url: r }), e.replacement));
			} catch {
				return t;
			}
			return t;
		},
		[a]: (e) => (t, n) => {
			let r = n?.path, i = r.join(".").toLowerCase(), { predicate: a, replacement: o } = e, s = typeof o == "function" ? o : () => o;
			return a({
				rawPath: r,
				path: i
			}) && (t = s(t, {
				rawPath: r,
				path: i
			})), t;
		}
	}, g = (e) => h[e.type](e), _ = (...e) => (t, n) => e.flat().reduce((e, t) => (typeof t == "function" ? t : g(t))(e, n), t);
	t.exports = {
		asterisk: o,
		escapeRegExp: s,
		urlEncodeRegexGroup: c,
		urlEncodeRegexTag: l,
		redactUrlHostnameMatcher: u,
		redactUrlSearchParamsMatcher: d,
		redactUrlPasswordMatcher: f,
		redactUrlMatcher: m,
		redactUrlReplacement: p,
		redactDynamicReplacement: () => (e, t) => typeof t == "number" ? o(e) : t + o(e.substring(t.length).length),
		redactFixedReplacement: (e) => (t, n) => typeof n == "number" ? o(e) : n + o(e),
		redactMatchers: _,
		redactUrlPassword: (e, t) => _(f({ replacement: t }))(e)
	};
})), wo = /* @__PURE__ */ w(((e, t) => {
	var n = So(), { redactUrlPassword: r } = Co(), i = "***", a = (e) => typeof e != "string" || !e ? e : r(e, i).replace(n.NPM_SECRET.pattern, `npm_${i}`).replace(n.UUID.pattern, i), o = (e) => {
		let t = /[\s=]/g, n = null, r = "", i = 0;
		for (; n = t.exec(e);) r += a(e.slice(i, n.index)) + n[0], i = t.lastIndex;
		return r + a(e.slice(i));
	};
	t.exports = {
		redact: a,
		redactLog: (e) => typeof e == "string" ? o(e) : Array.isArray(e) ? e.map((e) => typeof e == "string" ? o(e) : e) : e
	};
})), To = /* @__PURE__ */ w(((e, t) => {
	var n = Ca(), { Response: r } = no(), i = bo(), { log: a } = xo(), { redact: o } = wo(), s = "https://github.com/npm/cli/wiki/No-auth-for-URI,-but-auth-present-for-scoped-registry";
	t.exports = async ({ method: e, uri: t, res: n, startTime: o, auth: u, opts: d }) => (d = {
		...i,
		...d
	}, n.headers.has("npm-notice") && !n.headers.has("x-local-cache") && a.notice("", n.headers.get("npm-notice")), n.status >= 400 ? (c(e, n, o), u && u.scopeAuthKey && !u.token && !u.auth && a.warn("registry", `No auth for URI, but auth present for scoped registry.

URI: ${t}
Scoped Registry Key: ${u.scopeAuthKey}

More info here: ${s}`), l(e, n, o, d)) : (n.body.on("end", () => c(e, n, o, d)), d.ignoreBody ? (n.body.resume(), new r(null, n)) : n));
	function c(e, t, n) {
		let r = Date.now() - n, i = t.headers.get("x-fetch-attempts"), s = i && i > 1 ? ` attempt #${i}` : "", c = t.headers.get("x-local-cache-status"), l = c ? ` (cache ${c})` : "", u = o(t.url);
		c === "hit" ? a.http("cache", `${u} ${r}ms${s}${l}`) : a.http("fetch", `${e.toUpperCase()} ${t.status} ${u} ${r}ms${s}${l}`);
	}
	function l(e, t, r, i) {
		return t.buffer().catch(() => null).then((r) => {
			let a = r;
			try {
				a = JSON.parse(r.toString("utf8"));
			} catch {}
			if (t.status === 401 && t.headers.get("www-authenticate")) {
				let r = t.headers.get("www-authenticate").split(/,\s*/).map((e) => e.toLowerCase());
				throw r.indexOf("ipaddress") === -1 ? r.indexOf("otp") === -1 ? new n.HttpErrorAuthUnknown(e, t, a, i.spec) : new n.HttpErrorAuthOTP(e, t, a, i.spec) : new n.HttpErrorAuthIPAddress(e, t, a, i.spec);
			} else if (t.status === 401 && r != null && /one-time pass/.test(r.toString("utf8"))) throw new n.HttpErrorAuthOTP(e, t, a, i.spec);
			else throw new n.HttpErrorGeneral(e, t, a, i.spec);
		});
	}
})), Eo = /* @__PURE__ */ T({ default: () => Do }), Do, Oo = C((() => {
	Do = /* @__PURE__ */ "_http_agent._http_client._http_common._http_incoming._http_outgoing._http_server._stream_duplex._stream_passthrough._stream_readable._stream_transform._stream_wrap._stream_writable._tls_common._tls_wrap.assert.assert/strict.async_hooks.buffer.child_process.cluster.console.constants.crypto.dgram.diagnostics_channel.dns.dns/promises.domain.events.fs.fs/promises.http.http2.https.inspector.inspector/promises.module.net.os.path.path/posix.path/win32.perf_hooks.process.punycode.querystring.readline.readline/promises.repl.stream.stream/consumers.stream/promises.stream/web.string_decoder.sys.timers.timers/promises.tls.trace_events.tty.url.util.util/types.v8.vm.wasi.worker_threads.zlib.node:sea.node:sqlite.node:test.node:test/reporters".split(".");
})), ko = /* @__PURE__ */ w(((e, t) => {
	var n = (Oo(), O(Eo).default), r = /* @__PURE__ */ RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"), i = ["node_modules", "favicon.ico"];
	function a(e) {
		var t = [], a = [];
		if (e === null) return a.push("name cannot be null"), o(t, a);
		if (e === void 0) return a.push("name cannot be undefined"), o(t, a);
		if (typeof e != "string") return a.push("name must be a string"), o(t, a);
		if (e.length || a.push("name length must be greater than zero"), e.startsWith(".") && a.push("name cannot start with a period"), e.startsWith("-") && a.push("name cannot start with a hyphen"), e.match(/^_/) && a.push("name cannot start with an underscore"), e.trim() !== e && a.push("name cannot contain leading or trailing spaces"), i.forEach(function(t) {
			e.toLowerCase() === t && a.push(t + " is not a valid package name");
		}), n.includes(e.toLowerCase()) && t.push(e + " is a core module name"), e.length > 214 && t.push("name can no longer contain more than 214 characters"), e.toLowerCase() !== e && t.push("name can no longer contain capital letters"), /[~'!()*]/.test(e.split("/").slice(-1)[0]) && t.push("name can no longer contain special characters (\"~'!()*\")"), encodeURIComponent(e) !== e) {
			var s = e.match(r);
			if (s) {
				var c = s[1], l = s[2];
				if (l.startsWith(".") && a.push("name cannot start with a period"), encodeURIComponent(c) === c && encodeURIComponent(l) === l) return o(t, a);
			}
			a.push("name can only contain URL-friendly characters");
		}
		return o(t, a);
	}
	var o = function(e, t) {
		var n = {
			validForNewPackages: t.length === 0 && e.length === 0,
			validForOldPackages: t.length === 0,
			warnings: e,
			errors: t
		};
		return n.warnings.length || delete n.warnings, n.errors.length || delete n.errors, n;
	};
	t.exports = a;
})), Ao = /* @__PURE__ */ w(((e, t) => {
	var n = process.platform === "win32", { URL: r } = k("node:url"), i = k(n ? "node:path/win32" : "node:path"), { homedir: a } = k("node:os"), o = Un(), s = At(), c = ko(), { log: l } = xo(), u = n ? /\\|[/]/ : /[/]/, d = /^(?:git[+])?[a-z]+:/i, f = /^[^@]+@[^:.]+\.[^:]+:.+$/i, p = /[.](?:tgz|tar\.gz|tar)$/i, m = /:[0-9]+(\/|$)/i, h = /^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/, g = /^(?:[.]|~[/]|[/]|[a-zA-Z]:)/, _ = "https://registry.npmjs.org";
	function v(e, t) {
		let n, r;
		if (typeof e == "object") return e instanceof E && (!t || t === e.where) ? e : e.name && e.rawSpec ? v.resolve(e.name, e.rawSpec, t || e.where) : v(e.raw, t || e.where);
		let i = e.indexOf("@", 1), a = i > 0 ? e.slice(0, i) : e;
		return d.test(e) ? r = e : f.test(e) ? r = `git+ssh://${e}` : !a.startsWith("@") && (u.test(a) || p.test(a)) ? r = e : i > 0 ? (n = a, r = e.slice(i + 1) || "*") : c(e).validForOldPackages ? (n = e, r = "*") : r = e, x(n, r, t, e);
	}
	function y(e) {
		return e ? e.toLowerCase().startsWith("file:") ? !0 : n ? h.test(e) : g.test(e) : !1;
	}
	function b(e) {
		return e ? e.toLowerCase().startsWith("npm:") : !1;
	}
	function x(e, t, n, r) {
		let i = new E({
			raw: r,
			name: e,
			rawSpec: t,
			fromArgument: r != null
		});
		if (e && (i.name = e), n ||= process.cwd(), y(t)) return j(i, n);
		if (b(t)) return F(i, n);
		let a = o.fromUrl(t, {
			noGitPlus: !0,
			noCommittish: !0
		});
		return a ? M(i, a) : t && d.test(t) ? P(i) : t && (u.test(t) || p.test(t)) ? j(i, n) : I(i);
	}
	function S(e, t = _) {
		let n = v(e);
		if (n.type !== "version") throw T(n.type, n.raw);
		let r = "pkg:npm/" + n.name.replace(/^@/, "%40") + "@" + n.rawSpec;
		return t !== _ && (r += "?repository_url=" + t), r;
	}
	function C(e, t, n) {
		let r = /* @__PURE__ */ Error(`Invalid package name "${e}" of package "${n}": ${t.errors.join("; ")}.`);
		return r.code = "EINVALIDPACKAGENAME", r;
	}
	function w(e, t) {
		let n = /* @__PURE__ */ Error(`Invalid tag name "${e}" of package "${t}": Tags may not have any characters that encodeURIComponent encodes.`);
		return n.code = "EINVALIDTAGNAME", n;
	}
	function T(e, t) {
		let n = /* @__PURE__ */ Error(`Invalid type "${e}" of package "${t}": Purl can only be generated for "version" types.`);
		return n.code = "EINVALIDPURLTYPE", n;
	}
	var E = class {
		constructor(e) {
			this.type = e.type, this.registry = e.registry, this.where = e.where, e.raw == null ? this.raw = e.name ? `${e.name}@${e.rawSpec}` : e.rawSpec : this.raw = e.raw, this.name = void 0, this.escapedName = void 0, this.scope = void 0, this.rawSpec = e.rawSpec || "", this.saveSpec = e.saveSpec, this.fetchSpec = e.fetchSpec, e.name && this.setName(e.name), this.gitRange = e.gitRange, this.gitCommittish = e.gitCommittish, this.gitSubdir = e.gitSubdir, this.hosted = e.hosted;
		}
		setName(e) {
			let t = c(e);
			if (!t.validForOldPackages) throw C(e, t, this.raw);
			return this.name = e, this.scope = e[0] === "@" ? e.slice(0, e.indexOf("/")) : void 0, this.escapedName = e.replace("/", "%2f"), this;
		}
		toString() {
			let e = [];
			this.name != null && this.name !== "" && e.push(this.name);
			let t = this.saveSpec || this.fetchSpec || this.rawSpec;
			return t != null && t !== "" && e.push(t), e.length ? e.join("@") : this.raw;
		}
		toJSON() {
			let e = Object.assign({}, this);
			return delete e.hosted, e;
		}
	};
	function D(e, t) {
		if (!t) {
			e.gitCommittish = null;
			return;
		}
		for (let n of t.split("::")) {
			if (!n.includes(":")) {
				if (e.gitRange) throw Error("cannot override existing semver range with a committish");
				if (e.gitCommittish) throw Error("cannot override existing committish with a second committish");
				e.gitCommittish = n;
				continue;
			}
			let [t, r] = n.split(":");
			if (t === "semver") {
				if (e.gitCommittish) throw Error("cannot override existing committish with a semver range");
				if (e.gitRange) throw Error("cannot override existing semver range with a second semver range");
				e.gitRange = decodeURIComponent(r);
				continue;
			}
			if (t === "path") {
				if (e.gitSubdir) throw Error("cannot override existing path with a second path");
				e.gitSubdir = `/${r}`;
				continue;
			}
			l.warn("npm-package-arg", `ignoring unknown key "${t}"`);
		}
	}
	var O = /* @__PURE__ */ new Map([
		["\0", "%00"],
		["	", "%09"],
		["\n", "%0A"],
		["\r", "%0D"],
		[" ", "%20"],
		["\"", "%22"],
		["#", "%23"],
		["%", "%25"],
		["?", "%3F"],
		["[", "%5B"],
		["\\", n ? "/" : "%5C"],
		["]", "%5D"],
		["^", "%5E"],
		["|", "%7C"],
		["~", "%7E"]
	]);
	function A(e) {
		let t = "";
		for (let n = 0; n < e.length; n++) t = `${t}${O.get(e[n]) ?? e[n]}`;
		return t.startsWith("file:") ? t : `file:${t}`;
	}
	function j(e, t) {
		e.type = p.test(e.rawSpec) ? "file" : "directory", e.where = t;
		let o = A(e.rawSpec);
		o.startsWith("file:/") && (/^file:\/\/[^/]/.test(o) && (o = `file:/${o.slice(5)}`), /^\/{1,3}\.\.?(\/|$)/.test(o.slice(5)) && (o = o.replace(/^file:\/{1,3}/, "file:")));
		let s, c;
		try {
			s = new r(o, `${A(i.resolve(t))}/`), c = new r(o);
		} catch (n) {
			throw Object.assign(/* @__PURE__ */ Error("Invalid file: URL, must comply with RFC 8089"), {
				raw: e.rawSpec,
				spec: e,
				where: t,
				originalError: n
			});
		}
		let l = decodeURIComponent(c.pathname), u = decodeURIComponent(s.pathname);
		return n && (l = l.replace(/^\/+([a-z]:\/)/i, "$1"), u = u.replace(/^\/+([a-z]:\/)/i, "$1")), /^\/~(\/|$)/.test(l) ? (e.saveSpec = `file:${l.substr(1)}`, u = i.resolve(a(), l.substr(3))) : i.isAbsolute(o.slice(5)) ? e.saveSpec = `file:${i.resolve(u)}` : e.saveSpec = `file:${i.relative(t, u)}`, e.fetchSpec = i.resolve(t, u), e.saveSpec = e.saveSpec.split("\\").join("/"), e.saveSpec.startsWith("file://") && (e.saveSpec = `file:/${e.saveSpec.slice(7)}`), e;
	}
	function M(e, t) {
		return e.type = "git", e.hosted = t, e.saveSpec = t.toString({
			noGitPlus: !1,
			noCommittish: !1
		}), e.fetchSpec = t.getDefaultRepresentation() === "shortcut" ? null : t.toString(), D(e, t.committish), e;
	}
	function N(e, t) {
		let n = /* @__PURE__ */ Error(`Unsupported URL Type "${e}": ${t}`);
		return n.code = "EUNSUPPORTEDPROTOCOL", n;
	}
	function P(e) {
		let t = e.rawSpec;
		if (e.saveSpec = t, t.startsWith("git+ssh:")) {
			let n = t.match(/^git\+ssh:\/\/([^:#]+:[^#]+(?:\.git)?)(?:#(.*))?$/i);
			if (n && !n[1].match(m)) return e.type = "git", D(e, n[2]), e.fetchSpec = n[1], e;
		} else t.startsWith("git+file://") && (t = t.replace(/\\/g, "/"));
		let n = new r(t);
		switch (n.protocol) {
			case "git:":
			case "git+http:":
			case "git+https:":
			case "git+rsync:":
			case "git+ftp:":
			case "git+file:":
			case "git+ssh:":
				e.type = "git", D(e, n.hash.slice(1)), n.protocol === "git+file:" && /^git\+file:\/\/[a-z]:/i.test(t) ? e.fetchSpec = `git+file://${n.host.toLowerCase()}:${n.pathname}` : (n.hash = "", e.fetchSpec = n.toString()), e.fetchSpec.startsWith("git+") && (e.fetchSpec = e.fetchSpec.slice(4));
				break;
			case "http:":
			case "https:":
				e.type = "remote", e.fetchSpec = e.saveSpec;
				break;
			default: throw N(n.protocol, t);
		}
		return e;
	}
	function F(e, t) {
		let n = v(e.rawSpec.substr(4), t);
		if (n.type === "alias") throw Error("nested aliases not supported");
		if (!n.registry) throw Error("aliases only work for registry deps");
		if (!n.name) throw Error("aliases must have a name");
		return e.subSpec = n, e.registry = !0, e.type = "alias", e.saveSpec = null, e.fetchSpec = null, e;
	}
	function I(e) {
		e.registry = !0;
		let t = e.rawSpec.trim();
		e.saveSpec = null, e.fetchSpec = t;
		let n = s.valid(t, !0), r = s.validRange(t, !0);
		if (n) e.type = "version";
		else if (r) e.type = "range";
		else {
			if (encodeURIComponent(t) !== t) throw w(t, e.raw);
			e.type = "tag";
		}
		return e;
	}
	t.exports = v, t.exports.resolve = x, t.exports.toPurl = S, t.exports.Result = E;
})), jo = /* @__PURE__ */ w(((e, t) => {
	var n = k("fs"), r = Ao(), { URL: i } = k("url"), a = (e, t) => {
		let n = new i(e), r = `//${n.host}${n.pathname}`;
		for (; r.length > 2;) {
			let e = o(r, t);
			if (e) return {
				regKey: r,
				authKey: e
			};
			r = r.replace(/([^/]+|\/)$/, "");
		}
		return {
			regKey: !1,
			authKey: null
		};
	}, o = (e, t) => t[`${e}:_authToken`] ? "_authToken" : t[`${e}:_auth`] ? "_auth" : t[`${e}:username`] && t[`${e}:_password`] ? "username" : t[`${e}:certfile`] && t[`${e}:keyfile`] ? "certfile" : !1, s = (e, t) => {
		let n = new i(e), r = new i(t);
		return n.host === r.host;
	}, c = (e) => {
		let { spec: t } = e, { scope: n, subSpec: i } = t ? r(t) : {}, a = i && i.scope, o = i ? a : n;
		return o && e[`${o}:registry`] || e.registry;
	}, l = (e) => {
		try {
			return n.readFileSync(e, "utf8");
		} catch (e) {
			if (e.code !== "ENOENT") throw e;
			return null;
		}
	}, u = (e, t = {}) => {
		let { forceAuth: n } = t;
		if (!e) throw Error("URI is required");
		let { regKey: r, authKey: i } = a(e, n || t);
		if (n && !r) return new d({
			regKey: !1,
			authKey: null,
			scopeAuthKey: null,
			token: n._authToken || n.token,
			username: n.username,
			password: n._password || n.password,
			auth: n._auth || n.auth,
			certfile: n.certfile,
			keyfile: n.keyfile
		});
		if (!r) {
			let n = c(t);
			if (n && e !== n && s(e, n)) return u(n, t);
			if (n !== t.registry) {
				let { regKey: e, authKey: r } = a(n, t);
				return new d({
					scopeAuthKey: e,
					regKey: e,
					authKey: r
				});
			}
		}
		let { [`${r}:_authToken`]: o, [`${r}:username`]: l, [`${r}:_password`]: f, [`${r}:_auth`]: p, [`${r}:certfile`]: m, [`${r}:keyfile`]: h } = t;
		return new d({
			scopeAuthKey: null,
			regKey: r,
			authKey: i,
			token: o,
			auth: p,
			username: l,
			password: f,
			certfile: m,
			keyfile: h
		});
	}, d = class {
		constructor({ token: e, auth: t, username: n, password: r, scopeAuthKey: i, certfile: a, keyfile: o, regKey: s, authKey: c }) {
			if (this.scopeAuthKey = i, this.regKey = s, this.authKey = c, this.token = null, this.auth = null, this.isBasicAuth = !1, this.cert = null, this.key = null, e) this.token = e;
			else if (t) this.auth = t;
			else if (n && r) {
				let e = Buffer.from(r, "base64").toString("utf8");
				this.auth = Buffer.from(`${n}:${e}`, "utf8").toString("base64"), this.isBasicAuth = !0;
			}
			if (a && o) {
				let e = l(a, "utf-8"), t = l(o, "utf-8");
				e && t && (this.cert = e, this.key = t);
			}
		}
	};
	t.exports = u;
})), Mo = /* @__PURE__ */ w(((e, t) => {
	var n = k("dns"), r = [
		"if-modified-since",
		"if-none-match",
		"if-unmodified-since",
		"if-match",
		"if-range"
	];
	t.exports = (e) => {
		let { strictSSL: t, ...i } = { ...e };
		if (i.method = i.method ? i.method.toUpperCase() : "GET", t == null ? i.rejectUnauthorized = process.env.NODE_TLS_REJECT_UNAUTHORIZED !== "0" : i.rejectUnauthorized = t !== !1, !i.retry) i.retry = { retries: 0 };
		else if (typeof i.retry == "string") {
			let e = parseInt(i.retry, 10);
			isFinite(e) ? i.retry = { retries: e } : i.retry = { retries: 0 };
		} else typeof i.retry == "number" ? i.retry = { retries: i.retry } : i.retry = {
			retries: 0,
			...i.retry
		};
		return i.dns = {
			ttl: 300 * 1e3,
			lookup: n.lookup,
			...i.dns
		}, i.cache = i.cache || "default", i.cache === "default" && Object.keys(i.headers || {}).some((e) => r.includes(e.toLowerCase())) && (i.cache = "no-store"), i.cacheAdditionalHeaders = i.cacheAdditionalHeaders || [], i.cacheManager && !i.cachePath && (i.cachePath = i.cacheManager), i;
	};
})), No = /* @__PURE__ */ w(((e, t) => {
	var n = /* @__PURE__ */ new Set([
		200,
		203,
		204,
		206,
		300,
		301,
		308,
		404,
		405,
		410,
		414,
		501
	]), r = /* @__PURE__ */ new Set([
		200,
		203,
		204,
		300,
		301,
		302,
		303,
		307,
		308,
		404,
		405,
		410,
		414,
		501
	]), i = /* @__PURE__ */ new Set([
		500,
		502,
		503,
		504
	]), a = {
		date: !0,
		connection: !0,
		"keep-alive": !0,
		"proxy-authenticate": !0,
		"proxy-authorization": !0,
		te: !0,
		trailer: !0,
		"transfer-encoding": !0,
		upgrade: !0
	}, o = {
		"content-length": !0,
		"content-encoding": !0,
		"transfer-encoding": !0,
		"content-range": !0
	};
	function s(e) {
		let t = parseInt(e, 10);
		return isFinite(t) ? t : 0;
	}
	function c(e) {
		return e ? i.has(e.status) : !0;
	}
	function l(e) {
		let t = {};
		if (!e) return t;
		let n = e.trim().split(/,/);
		for (let e of n) {
			let [n, r] = e.split(/=/, 2);
			t[n.trim()] = r === void 0 ? !0 : r.trim().replace(/^"|"$/g, "");
		}
		return t;
	}
	function u(e) {
		let t = [];
		for (let n in e) {
			let r = e[n];
			t.push(r === !0 ? n : n + "=" + r);
		}
		if (t.length) return t.join(", ");
	}
	t.exports = class {
		constructor(e, t, { shared: n, cacheHeuristic: r, immutableMinTimeToLive: i, ignoreCargoCult: a, _fromObject: o } = {}) {
			if (o) {
				this._fromObject(o);
				return;
			}
			if (!t || !t.headers) throw Error("Response headers missing");
			this._assertRequestHasHeaders(e), this._responseTime = this.now(), this._isShared = n !== !1, this._ignoreCargoCult = !!a, this._cacheHeuristic = r === void 0 ? .1 : r, this._immutableMinTtl = i === void 0 ? 24 * 3600 * 1e3 : i, this._status = "status" in t ? t.status : 200, this._resHeaders = t.headers, this._rescc = l(t.headers["cache-control"]), this._method = "method" in e ? e.method : "GET", this._url = e.url, this._host = e.headers.host, this._noAuthorization = !e.headers.authorization, this._reqHeaders = t.headers.vary ? e.headers : null, this._reqcc = l(e.headers["cache-control"]), this._ignoreCargoCult && "pre-check" in this._rescc && "post-check" in this._rescc && (delete this._rescc["pre-check"], delete this._rescc["post-check"], delete this._rescc["no-cache"], delete this._rescc["no-store"], delete this._rescc["must-revalidate"], this._resHeaders = Object.assign({}, this._resHeaders, { "cache-control": u(this._rescc) }), delete this._resHeaders.expires, delete this._resHeaders.pragma), t.headers["cache-control"] == null && /no-cache/.test(t.headers.pragma) && (this._rescc["no-cache"] = !0);
		}
		now() {
			return Date.now();
		}
		storable() {
			return !!(!this._reqcc["no-store"] && (this._method === "GET" || this._method === "HEAD" || this._method === "POST" && this._hasExplicitExpiration()) && r.has(this._status) && !this._rescc["no-store"] && (!this._isShared || !this._rescc.private) && (!this._isShared || this._noAuthorization || this._allowsStoringAuthenticated()) && (this._resHeaders.expires || this._rescc["max-age"] || this._isShared && this._rescc["s-maxage"] || this._rescc.public || n.has(this._status)));
		}
		_hasExplicitExpiration() {
			return !!(this._isShared && this._rescc["s-maxage"] || this._rescc["max-age"] || this._resHeaders.expires);
		}
		_assertRequestHasHeaders(e) {
			if (!e || !e.headers) throw Error("Request headers missing");
		}
		satisfiesWithoutRevalidation(e) {
			return !this.evaluateRequest(e).revalidation;
		}
		_evaluateRequestHitResult(e) {
			return {
				response: { headers: this.responseHeaders() },
				revalidation: e
			};
		}
		_evaluateRequestRevalidation(e, t) {
			return {
				synchronous: t,
				headers: this.revalidationHeaders(e)
			};
		}
		_evaluateRequestMissResult(e) {
			return {
				response: void 0,
				revalidation: this._evaluateRequestRevalidation(e, !0)
			};
		}
		evaluateRequest(e) {
			if (this._assertRequestHasHeaders(e), this._rescc["must-revalidate"] || !this._requestMatches(e, !1)) return this._evaluateRequestMissResult(e);
			let t = l(e.headers["cache-control"]);
			return t["no-cache"] || /no-cache/.test(e.headers.pragma) || t["max-age"] && this.age() > s(t["max-age"]) || t["min-fresh"] && this.maxAge() - this.age() < s(t["min-fresh"]) ? this._evaluateRequestMissResult(e) : this.stale() ? "max-stale" in t && (!0 === t["max-stale"] || t["max-stale"] > this.age() - this.maxAge()) ? this._evaluateRequestHitResult(void 0) : this.useStaleWhileRevalidate() ? this._evaluateRequestHitResult(this._evaluateRequestRevalidation(e, !1)) : this._evaluateRequestMissResult(e) : this._evaluateRequestHitResult(void 0);
		}
		_requestMatches(e, t) {
			return !!((!this._url || this._url === e.url) && this._host === e.headers.host && (!e.method || this._method === e.method || t && e.method === "HEAD") && this._varyMatches(e));
		}
		_allowsStoringAuthenticated() {
			return !!(this._rescc["must-revalidate"] || this._rescc.public || this._rescc["s-maxage"]);
		}
		_varyMatches(e) {
			if (!this._resHeaders.vary) return !0;
			if (this._resHeaders.vary === "*") return !1;
			let t = this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);
			for (let n of t) if (e.headers[n] !== this._reqHeaders[n]) return !1;
			return !0;
		}
		_copyWithoutHopByHopHeaders(e) {
			let t = {};
			for (let n in e) a[n] || (t[n] = e[n]);
			if (e.connection) {
				let n = e.connection.trim().split(/\s*,\s*/);
				for (let e of n) delete t[e];
			}
			if (t.warning) {
				let e = t.warning.split(/,/).filter((e) => !/^\s*1[0-9][0-9]/.test(e));
				e.length ? t.warning = e.join(",").trim() : delete t.warning;
			}
			return t;
		}
		responseHeaders() {
			let e = this._copyWithoutHopByHopHeaders(this._resHeaders), t = this.age();
			return t > 3600 * 24 && !this._hasExplicitExpiration() && this.maxAge() > 3600 * 24 && (e.warning = (e.warning ? `${e.warning}, ` : "") + "113 - \"rfc7234 5.5.4\""), e.age = `${Math.round(t)}`, e.date = new Date(this.now()).toUTCString(), e;
		}
		date() {
			let e = Date.parse(this._resHeaders.date);
			return isFinite(e) ? e : this._responseTime;
		}
		age() {
			return this._ageValue() + (this.now() - this._responseTime) / 1e3;
		}
		_ageValue() {
			return s(this._resHeaders.age);
		}
		maxAge() {
			if (!this.storable() || this._rescc["no-cache"] || this._isShared && this._resHeaders["set-cookie"] && !this._rescc.public && !this._rescc.immutable || this._resHeaders.vary === "*") return 0;
			if (this._isShared) {
				if (this._rescc["proxy-revalidate"]) return 0;
				if (this._rescc["s-maxage"]) return s(this._rescc["s-maxage"]);
			}
			if (this._rescc["max-age"]) return s(this._rescc["max-age"]);
			let e = this._rescc.immutable ? this._immutableMinTtl : 0, t = this.date();
			if (this._resHeaders.expires) {
				let n = Date.parse(this._resHeaders.expires);
				return Number.isNaN(n) || n < t ? 0 : Math.max(e, (n - t) / 1e3);
			}
			if (this._resHeaders["last-modified"]) {
				let n = Date.parse(this._resHeaders["last-modified"]);
				if (isFinite(n) && t > n) return Math.max(e, (t - n) / 1e3 * this._cacheHeuristic);
			}
			return e;
		}
		timeToLive() {
			let e = this.maxAge() - this.age(), t = e + s(this._rescc["stale-if-error"]), n = e + s(this._rescc["stale-while-revalidate"]);
			return Math.round(Math.max(0, e, t, n) * 1e3);
		}
		stale() {
			return this.maxAge() <= this.age();
		}
		_useStaleIfError() {
			return this.maxAge() + s(this._rescc["stale-if-error"]) > this.age();
		}
		useStaleWhileRevalidate() {
			let e = s(this._rescc["stale-while-revalidate"]);
			return e > 0 && this.maxAge() + e > this.age();
		}
		static fromObject(e) {
			return new this(void 0, void 0, { _fromObject: e });
		}
		_fromObject(e) {
			if (this._responseTime) throw Error("Reinitialized");
			if (!e || e.v !== 1) throw Error("Invalid serialization");
			this._responseTime = e.t, this._isShared = e.sh, this._cacheHeuristic = e.ch, this._immutableMinTtl = e.imm === void 0 ? 24 * 3600 * 1e3 : e.imm, this._ignoreCargoCult = !!e.icc, this._status = e.st, this._resHeaders = e.resh, this._rescc = e.rescc, this._method = e.m, this._url = e.u, this._host = e.h, this._noAuthorization = e.a, this._reqHeaders = e.reqh, this._reqcc = e.reqcc;
		}
		toObject() {
			return {
				v: 1,
				t: this._responseTime,
				sh: this._isShared,
				ch: this._cacheHeuristic,
				imm: this._immutableMinTtl,
				icc: this._ignoreCargoCult,
				st: this._status,
				resh: this._resHeaders,
				rescc: this._rescc,
				m: this._method,
				u: this._url,
				h: this._host,
				a: this._noAuthorization,
				reqh: this._reqHeaders,
				reqcc: this._reqcc
			};
		}
		revalidationHeaders(e) {
			this._assertRequestHasHeaders(e);
			let t = this._copyWithoutHopByHopHeaders(e.headers);
			if (delete t["if-range"], !this._requestMatches(e, !0) || !this.storable()) return delete t["if-none-match"], delete t["if-modified-since"], t;
			if (this._resHeaders.etag && (t["if-none-match"] = t["if-none-match"] ? `${t["if-none-match"]}, ${this._resHeaders.etag}` : this._resHeaders.etag), t["accept-ranges"] || t["if-match"] || t["if-unmodified-since"] || this._method && this._method != "GET") {
				if (delete t["if-modified-since"], t["if-none-match"]) {
					let e = t["if-none-match"].split(/,/).filter((e) => !/^\s*W\//.test(e));
					e.length ? t["if-none-match"] = e.join(",").trim() : delete t["if-none-match"];
				}
			} else this._resHeaders["last-modified"] && !t["if-modified-since"] && (t["if-modified-since"] = this._resHeaders["last-modified"]);
			return t;
		}
		revalidatedPolicy(e, t) {
			if (this._assertRequestHasHeaders(e), this._useStaleIfError() && c(t)) return {
				policy: this,
				modified: !1,
				matches: !0
			};
			if (!t || !t.headers) throw Error("Response headers missing");
			let n = !1;
			t.status !== void 0 && t.status != 304 ? n = !1 : t.headers.etag && !/^\s*W\//.test(t.headers.etag) ? n = this._resHeaders.etag && this._resHeaders.etag.replace(/^\s*W\//, "") === t.headers.etag : this._resHeaders.etag && t.headers.etag ? n = this._resHeaders.etag.replace(/^\s*W\//, "") === t.headers.etag.replace(/^\s*W\//, "") : this._resHeaders["last-modified"] ? n = this._resHeaders["last-modified"] === t.headers["last-modified"] : !this._resHeaders.etag && !this._resHeaders["last-modified"] && !t.headers.etag && !t.headers["last-modified"] && (n = !0);
			let r = {
				shared: this._isShared,
				cacheHeuristic: this._cacheHeuristic,
				immutableMinTimeToLive: this._immutableMinTtl,
				ignoreCargoCult: this._ignoreCargoCult
			};
			if (!n) return {
				policy: new this.constructor(e, t, r),
				modified: t.status != 304,
				matches: !1
			};
			let i = {};
			for (let e in this._resHeaders) i[e] = e in t.headers && !o[e] ? t.headers[e] : this._resHeaders[e];
			let a = Object.assign({}, t, {
				status: this._status,
				method: this._method,
				headers: i
			});
			return {
				policy: new this.constructor(e, a, r),
				modified: !1,
				matches: !0
			};
		}
	};
})), Po = /* @__PURE__ */ w(((e, t) => {
	t.exports = s, t.exports.preferredCharsets = s;
	var n = /^\s*([^\s;]+)\s*(?:;(.*))?$/;
	function r(e) {
		for (var t = e.split(","), n = 0, r = 0; n < t.length; n++) {
			var a = i(t[n].trim(), n);
			a && (t[r++] = a);
		}
		return t.length = r, t;
	}
	function i(e, t) {
		var r = n.exec(e);
		if (!r) return null;
		var i = r[1], a = 1;
		if (r[2]) for (var o = r[2].split(";"), s = 0; s < o.length; s++) {
			var c = o[s].trim().split("=");
			if (c[0] === "q") {
				a = parseFloat(c[1]);
				break;
			}
		}
		return {
			charset: i,
			q: a,
			i: t
		};
	}
	function a(e, t, n) {
		for (var r = {
			o: -1,
			q: 0,
			s: 0
		}, i = 0; i < t.length; i++) {
			var a = o(e, t[i], n);
			a && (r.s - a.s || r.q - a.q || r.o - a.o) < 0 && (r = a);
		}
		return r;
	}
	function o(e, t, n) {
		var r = 0;
		if (t.charset.toLowerCase() === e.toLowerCase()) r |= 1;
		else if (t.charset !== "*") return null;
		return {
			i: n,
			o: t.i,
			q: t.q,
			s: r
		};
	}
	function s(e, t) {
		var n = r(e === void 0 ? "*" : e || "");
		if (!t) return n.filter(u).sort(c).map(l);
		var i = t.map(function(e, t) {
			return a(e, n, t);
		});
		return i.filter(u).sort(c).map(function(e) {
			return t[i.indexOf(e)];
		});
	}
	function c(e, t) {
		return t.q - e.q || t.s - e.s || e.o - t.o || e.i - t.i || 0;
	}
	function l(e) {
		return e.charset;
	}
	function u(e) {
		return e.q > 0;
	}
})), Fo = /* @__PURE__ */ w(((e, t) => {
	t.exports = s, t.exports.preferredEncodings = s;
	var n = /^\s*([^\s;]+)\s*(?:;(.*))?$/;
	function r(e) {
		for (var t = e.split(","), n = !1, r = 1, a = 0, s = 0; a < t.length; a++) {
			var c = i(t[a].trim(), a);
			c && (t[s++] = c, n ||= o("identity", c), r = Math.min(r, c.q || 1));
		}
		return n || (t[s++] = {
			encoding: "identity",
			q: r,
			i: a
		}), t.length = s, t;
	}
	function i(e, t) {
		var r = n.exec(e);
		if (!r) return null;
		var i = r[1], a = 1;
		if (r[2]) for (var o = r[2].split(";"), s = 0; s < o.length; s++) {
			var c = o[s].trim().split("=");
			if (c[0] === "q") {
				a = parseFloat(c[1]);
				break;
			}
		}
		return {
			encoding: i,
			q: a,
			i: t
		};
	}
	function a(e, t, n) {
		for (var r = {
			encoding: e,
			o: -1,
			q: 0,
			s: 0
		}, i = 0; i < t.length; i++) {
			var a = o(e, t[i], n);
			a && (r.s - a.s || r.q - a.q || r.o - a.o) < 0 && (r = a);
		}
		return r;
	}
	function o(e, t, n) {
		var r = 0;
		if (t.encoding.toLowerCase() === e.toLowerCase()) r |= 1;
		else if (t.encoding !== "*") return null;
		return {
			encoding: e,
			i: n,
			o: t.i,
			q: t.q,
			s: r
		};
	}
	function s(e, t, n) {
		var i = r(e || ""), o = n ? function(e, t) {
			if (e.q !== t.q) return t.q - e.q;
			var r = n.indexOf(e.encoding), i = n.indexOf(t.encoding);
			return r === -1 && i === -1 ? t.s - e.s || e.o - t.o || e.i - t.i : r !== -1 && i !== -1 ? r - i : r === -1 ? 1 : -1;
		} : c;
		if (!t) return i.filter(u).sort(o).map(l);
		var s = t.map(function(e, t) {
			return a(e, i, t);
		});
		return s.filter(u).sort(o).map(function(e) {
			return t[s.indexOf(e)];
		});
	}
	function c(e, t) {
		return t.q - e.q || t.s - e.s || e.o - t.o || e.i - t.i;
	}
	function l(e) {
		return e.encoding;
	}
	function u(e) {
		return e.q > 0;
	}
})), Io = /* @__PURE__ */ w(((e, t) => {
	t.exports = s, t.exports.preferredLanguages = s;
	var n = /^\s*([^\s\-;]+)(?:-([^\s;]+))?\s*(?:;(.*))?$/;
	function r(e) {
		for (var t = e.split(","), n = 0, r = 0; n < t.length; n++) {
			var a = i(t[n].trim(), n);
			a && (t[r++] = a);
		}
		return t.length = r, t;
	}
	function i(e, t) {
		var r = n.exec(e);
		if (!r) return null;
		var i = r[1], a = r[2], o = i;
		a && (o += "-" + a);
		var s = 1;
		if (r[3]) for (var c = r[3].split(";"), l = 0; l < c.length; l++) {
			var u = c[l].split("=");
			u[0] === "q" && (s = parseFloat(u[1]));
		}
		return {
			prefix: i,
			suffix: a,
			q: s,
			i: t,
			full: o
		};
	}
	function a(e, t, n) {
		for (var r = {
			o: -1,
			q: 0,
			s: 0
		}, i = 0; i < t.length; i++) {
			var a = o(e, t[i], n);
			a && (r.s - a.s || r.q - a.q || r.o - a.o) < 0 && (r = a);
		}
		return r;
	}
	function o(e, t, n) {
		var r = i(e);
		if (!r) return null;
		var a = 0;
		if (t.full.toLowerCase() === r.full.toLowerCase()) a |= 4;
		else if (t.prefix.toLowerCase() === r.full.toLowerCase()) a |= 2;
		else if (t.full.toLowerCase() === r.prefix.toLowerCase()) a |= 1;
		else if (t.full !== "*") return null;
		return {
			i: n,
			o: t.i,
			q: t.q,
			s: a
		};
	}
	function s(e, t) {
		var n = r(e === void 0 ? "*" : e || "");
		if (!t) return n.filter(u).sort(c).map(l);
		var i = t.map(function(e, t) {
			return a(e, n, t);
		});
		return i.filter(u).sort(c).map(function(e) {
			return t[i.indexOf(e)];
		});
	}
	function c(e, t) {
		return t.q - e.q || t.s - e.s || e.o - t.o || e.i - t.i || 0;
	}
	function l(e) {
		return e.full;
	}
	function u(e) {
		return e.q > 0;
	}
})), Lo = /* @__PURE__ */ w(((e, t) => {
	t.exports = s, t.exports.preferredMediaTypes = s;
	var n = /^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/;
	function r(e) {
		for (var t = p(e), n = 0, r = 0; n < t.length; n++) {
			var a = i(t[n].trim(), n);
			a && (t[r++] = a);
		}
		return t.length = r, t;
	}
	function i(e, t) {
		var r = n.exec(e);
		if (!r) return null;
		var i = Object.create(null), a = 1, o = r[2], s = r[1];
		if (r[3]) for (var c = m(r[3]).map(f), l = 0; l < c.length; l++) {
			var u = c[l], d = u[0].toLowerCase(), p = u[1], h = p && p[0] === "\"" && p[p.length - 1] === "\"" ? p.slice(1, -1) : p;
			if (d === "q") {
				a = parseFloat(h);
				break;
			}
			i[d] = h;
		}
		return {
			type: s,
			subtype: o,
			params: i,
			q: a,
			i: t
		};
	}
	function a(e, t, n) {
		for (var r = {
			o: -1,
			q: 0,
			s: 0
		}, i = 0; i < t.length; i++) {
			var a = o(e, t[i], n);
			a && (r.s - a.s || r.q - a.q || r.o - a.o) < 0 && (r = a);
		}
		return r;
	}
	function o(e, t, n) {
		var r = i(e), a = 0;
		if (!r) return null;
		if (t.type.toLowerCase() == r.type.toLowerCase()) a |= 4;
		else if (t.type != "*") return null;
		if (t.subtype.toLowerCase() == r.subtype.toLowerCase()) a |= 2;
		else if (t.subtype != "*") return null;
		var o = Object.keys(t.params);
		if (o.length > 0) if (o.every(function(e) {
			return t.params[e] == "*" || (t.params[e] || "").toLowerCase() == (r.params[e] || "").toLowerCase();
		})) a |= 1;
		else return null;
		return {
			i: n,
			o: t.i,
			q: t.q,
			s: a
		};
	}
	function s(e, t) {
		var n = r(e === void 0 ? "*/*" : e || "");
		if (!t) return n.filter(u).sort(c).map(l);
		var i = t.map(function(e, t) {
			return a(e, n, t);
		});
		return i.filter(u).sort(c).map(function(e) {
			return t[i.indexOf(e)];
		});
	}
	function c(e, t) {
		return t.q - e.q || t.s - e.s || e.o - t.o || e.i - t.i || 0;
	}
	function l(e) {
		return e.type + "/" + e.subtype;
	}
	function u(e) {
		return e.q > 0;
	}
	function d(e) {
		for (var t = 0, n = 0; (n = e.indexOf("\"", n)) !== -1;) t++, n++;
		return t;
	}
	function f(e) {
		var t = e.indexOf("="), n, r;
		return t === -1 ? n = e : (n = e.slice(0, t), r = e.slice(t + 1)), [n, r];
	}
	function p(e) {
		for (var t = e.split(","), n = 1, r = 0; n < t.length; n++) d(t[r]) % 2 == 0 ? t[++r] = t[n] : t[r] += "," + t[n];
		return t.length = r + 1, t;
	}
	function m(e) {
		for (var t = e.split(";"), n = 1, r = 0; n < t.length; n++) d(t[r]) % 2 == 0 ? t[++r] = t[n] : t[r] += ";" + t[n];
		t.length = r + 1;
		for (var n = 0; n < t.length; n++) t[n] = t[n].trim();
		return t;
	}
})), Ro = /* @__PURE__ */ w(((e, t) => {
	var n = Po(), r = Fo(), i = Io(), a = Lo();
	t.exports = o, t.exports.Negotiator = o;
	function o(e) {
		if (!(this instanceof o)) return new o(e);
		this.request = e;
	}
	o.prototype.charset = function(e) {
		var t = this.charsets(e);
		return t && t[0];
	}, o.prototype.charsets = function(e) {
		return n(this.request.headers["accept-charset"], e);
	}, o.prototype.encoding = function(e, t) {
		var n = this.encodings(e, t);
		return n && n[0];
	}, o.prototype.encodings = function(e, t) {
		var n = t || {};
		return r(this.request.headers["accept-encoding"], e, n.preferred);
	}, o.prototype.language = function(e) {
		var t = this.languages(e);
		return t && t[0];
	}, o.prototype.languages = function(e) {
		return i(this.request.headers["accept-language"], e);
	}, o.prototype.mediaType = function(e) {
		var t = this.mediaTypes(e);
		return t && t[0];
	}, o.prototype.mediaTypes = function(e) {
		return a(this.request.headers.accept, e);
	}, o.prototype.preferredCharset = o.prototype.charset, o.prototype.preferredCharsets = o.prototype.charsets, o.prototype.preferredEncoding = o.prototype.encoding, o.prototype.preferredEncodings = o.prototype.encodings, o.prototype.preferredLanguage = o.prototype.language, o.prototype.preferredLanguages = o.prototype.languages, o.prototype.preferredMediaType = o.prototype.mediaType, o.prototype.preferredMediaTypes = o.prototype.mediaTypes;
})), zo = /* @__PURE__ */ w(((e, t) => {
	var n = k("crypto"), { Minipass: r } = wa(), i = [
		"sha512",
		"sha384",
		"sha256"
	], a = ["sha512"], o = n.getHashes(), s = /^[a-z0-9+/]+(?:=?=?)$/i, c = /^([a-z0-9]+)-([^?]+)(\?[?\S*]*)?$/, l = /^([a-z0-9]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)?$/, u = /^[\x21-\x7E]+$/, d = [
		"md5",
		"whirlpool",
		"sha1",
		"sha224",
		"sha256",
		"sha384",
		"sha512",
		"sha3",
		"sha3-256",
		"sha3-384",
		"sha3-512",
		"sha3_256",
		"sha3_384",
		"sha3_512"
	].filter((e) => o.includes(e)), f = (e) => e?.length ? `?${e.join("?")}` : "", p = class extends r {
		#e;
		#t;
		#n;
		constructor(e) {
			super(), this.size = 0, this.opts = e, this.#r(), e?.algorithms ? this.algorithms = [...e.algorithms] : this.algorithms = [...a], this.algorithm !== null && !this.algorithms.includes(this.algorithm) && this.algorithms.push(this.algorithm), this.hashes = this.algorithms.map(n.createHash);
		}
		#r() {
			this.sri = this.opts?.integrity ? _(this.opts?.integrity, this.opts) : null, this.expectedSize = this.opts?.size, this.sri ? this.sri.isHash ? (this.goodSri = !0, this.algorithm = this.sri.algorithm) : (this.goodSri = !this.sri.isEmpty(), this.algorithm = this.sri.pickAlgorithm(this.opts)) : this.algorithm = null, this.digests = this.goodSri ? this.sri[this.algorithm] : null, this.optString = f(this.opts?.options);
		}
		on(e, t) {
			return e === "size" && this.#t ? t(this.#t) : e === "integrity" && this.#e ? t(this.#e) : e === "verified" && this.#n ? t(this.#n) : super.on(e, t);
		}
		emit(e, t) {
			return e === "end" && this.#i(), super.emit(e, t);
		}
		write(e) {
			return this.size += e.length, this.hashes.forEach((t) => t.update(e)), super.write(e);
		}
		#i() {
			this.goodSri || this.#r();
			let e = _(this.hashes.map((e, t) => `${this.algorithms[t]}-${e.digest("base64")}${this.optString}`).join(" "), this.opts), t = this.goodSri && e.match(this.sri, this.opts);
			if (typeof this.expectedSize == "number" && this.size !== this.expectedSize) {
				let e = /* @__PURE__ */ Error(`stream size mismatch when checking ${this.sri}.\n  Wanted: ${this.expectedSize}\n  Found: ${this.size}`);
				e.code = "EBADSIZE", e.found = this.size, e.expected = this.expectedSize, e.sri = this.sri, this.emit("error", e);
			} else if (this.sri && !t) {
				let t = /* @__PURE__ */ Error(`${this.sri} integrity checksum failed when using ${this.algorithm}: wanted ${this.digests} but got ${e}. (${this.size} bytes)`);
				t.code = "EINTEGRITY", t.found = e, t.expected = this.digests, t.algorithm = this.algorithm, t.sri = this.sri, this.emit("error", t);
			} else this.#t = this.size, this.emit("size", this.size), this.#e = e, this.emit("integrity", e), t && (this.#n = t, this.emit("verified", t));
		}
	}, m = class {
		get isHash() {
			return !0;
		}
		constructor(e, t) {
			let n = t?.strict;
			this.source = e.trim(), this.digest = "", this.algorithm = "", this.options = [];
			let r = this.source.match(n ? l : c);
			if (!r || n && !i.includes(r[1]) || !o.includes(r[1])) return;
			this.algorithm = r[1], this.digest = r[2];
			let a = r[3];
			a && (this.options = a.slice(1).split("?"));
		}
		hexDigest() {
			return this.digest && Buffer.from(this.digest, "base64").toString("hex");
		}
		toJSON() {
			return this.toString();
		}
		match(e, t) {
			let n = _(e, t);
			if (!n) return !1;
			if (n.isIntegrity) {
				let e = n.pickAlgorithm(t, [this.algorithm]);
				return e && n[e].find((e) => e.digest === this.digest) || !1;
			}
			return n.digest === this.digest ? n : !1;
		}
		toString(e) {
			return e?.strict && !(i.includes(this.algorithm) && this.digest.match(s) && this.options.every((e) => e.match(u))) ? "" : `${this.algorithm}-${this.digest}${f(this.options)}`;
		}
	};
	function h(e, t, n, r) {
		let i = e !== "", a = !1, o = "", s = r.length - 1;
		for (let e = 0; e < s; e++) {
			let i = m.prototype.toString.call(r[e], n);
			i && (a = !0, o += i, o += t);
		}
		let c = m.prototype.toString.call(r[s], n);
		return c && (a = !0, o += c), i && a ? e + t + o : e + o;
	}
	var g = class {
		get isIntegrity() {
			return !0;
		}
		toJSON() {
			return this.toString();
		}
		isEmpty() {
			return Object.keys(this).length === 0;
		}
		toString(e) {
			let t = e?.sep || " ", n = "";
			if (e?.strict) {
				t = t.replace(/\S+/g, " ");
				for (let r of i) this[r] && (n = h(n, t, e, this[r]));
			} else for (let r of Object.keys(this)) n = h(n, t, e, this[r]);
			return n;
		}
		concat(e, t) {
			let n = typeof e == "string" ? e : y(e, t);
			return _(`${this.toString(t)} ${n}`, t);
		}
		hexDigest() {
			return _(this, { single: !0 }).hexDigest();
		}
		merge(e, t) {
			let n = _(e, t);
			for (let e in n) if (this[e]) {
				if (!this[e].find((t) => n[e].find((e) => t.digest === e.digest))) throw Error("hashes do not match, cannot update integrity");
			} else this[e] = n[e];
		}
		match(e, t) {
			let n = _(e, t);
			if (!n) return !1;
			let r = n.pickAlgorithm(t, Object.keys(this));
			return !!r && this[r].find((e) => n[r].find((t) => e.digest === t.digest)) || !1;
		}
		pickAlgorithm(e, t) {
			let n = e?.pickAlgorithm || D, r = Object.keys(this);
			return t?.length && (r = r.filter((e) => t.includes(e))), r.length ? r.reduce((e, t) => n(e, t) || e) : null;
		}
	};
	t.exports.parse = _;
	function _(e, t) {
		if (!e) return null;
		if (typeof e == "string") return v(e, t);
		if (e.algorithm && e.digest) {
			let n = new g();
			return n[e.algorithm] = [e], v(y(n, t), t);
		} else return v(y(e, t), t);
	}
	function v(e, t) {
		if (t?.single) return new m(e, t);
		let n = e.trim().split(/\s+/).reduce((e, n) => {
			let r = new m(n, t);
			if (r.algorithm && r.digest) {
				let t = r.algorithm;
				Object.keys(e).includes(t) || (e[t] = []), e[t].push(r);
			}
			return e;
		}, new g());
		return n.isEmpty() ? null : n;
	}
	t.exports.stringify = y;
	function y(e, t) {
		return e.algorithm && e.digest ? m.prototype.toString.call(e, t) : typeof e == "string" ? y(_(e, t), t) : g.prototype.toString.call(e, t);
	}
	t.exports.fromHex = b;
	function b(e, t, n) {
		let r = f(n?.options);
		return _(`${t}-${Buffer.from(e, "hex").toString("base64")}${r}`, n);
	}
	t.exports.fromData = x;
	function x(e, t) {
		let r = t?.algorithms || [...a], i = f(t?.options);
		return r.reduce((r, a) => {
			let o = new m(`${a}-${n.createHash(a).update(e).digest("base64")}${i}`, t);
			// istanbul ignore else - it would be VERY strange if the string we just calculated with an algo did not have an algo or digest.
			if (o.algorithm && o.digest) {
				let e = o.algorithm;
				r[e] || (r[e] = []), r[e].push(o);
			}
			return r;
		}, new g());
	}
	t.exports.fromStream = S;
	function S(e, t) {
		let n = T(t);
		return new Promise((t, r) => {
			e.pipe(n), e.on("error", r), n.on("error", r);
			let i;
			n.on("integrity", (e) => {
				i = e;
			}), n.on("end", () => t(i)), n.resume();
		});
	}
	t.exports.checkData = C;
	function C(e, t, r) {
		if (t = _(t, r), !t || !Object.keys(t).length) {
			if (r?.error) throw Object.assign(/* @__PURE__ */ Error("No valid integrity hashes to check against"), { code: "EINTEGRITY" });
			return !1;
		}
		let i = t.pickAlgorithm(r), a = _({
			algorithm: i,
			digest: n.createHash(i).update(e).digest("base64")
		}), o = a.match(t, r);
		if (r ||= {}, o || !r.error) return o;
		if (typeof r.size == "number" && e.length !== r.size) {
			let n = /* @__PURE__ */ Error(`data size mismatch when checking ${t}.\n  Wanted: ${r.size}\n  Found: ${e.length}`);
			throw n.code = "EBADSIZE", n.found = e.length, n.expected = r.size, n.sri = t, n;
		} else {
			let n = /* @__PURE__ */ Error(`Integrity checksum failed when using ${i}: Wanted ${t}, but got ${a}. (${e.length} bytes)`);
			throw n.code = "EINTEGRITY", n.found = a, n.expected = t, n.algorithm = i, n.sri = t, n;
		}
	}
	t.exports.checkStream = w;
	function w(e, t, n) {
		if (n ||= Object.create(null), n.integrity = t, t = _(t, n), !t || !Object.keys(t).length) return Promise.reject(Object.assign(/* @__PURE__ */ Error("No valid integrity hashes to check against"), { code: "EINTEGRITY" }));
		let r = T(n);
		return new Promise((t, n) => {
			e.pipe(r), e.on("error", n), r.on("error", n);
			let i;
			r.on("verified", (e) => {
				i = e;
			}), r.on("end", () => t(i)), r.resume();
		});
	}
	t.exports.integrityStream = T;
	function T(e = Object.create(null)) {
		return new p(e);
	}
	t.exports.create = E;
	function E(e) {
		let t = e?.algorithms || [...a], r = f(e?.options), i = t.map(n.createHash);
		return {
			update: function(e, t) {
				return i.forEach((n) => n.update(e, t)), this;
			},
			digest: function() {
				return t.reduce((t, n) => {
					let a = new m(`${n}-${i.shift().digest("base64")}${r}`, e);
					return t[a.algorithm] || (t[a.algorithm] = []), t[a.algorithm].push(a), t;
				}, new g());
			}
		};
	}
	function D(e, t) {
		return d.indexOf(e.toLowerCase()) >= d.indexOf(t.toLowerCase()) ? e : t;
	}
})), Bo = /* @__PURE__ */ w(((e, t) => {
	var n = No(), r = Ro(), i = zo(), a = {
		shared: !1,
		ignoreCargoCult: !0
	}, o = {
		status: 200,
		headers: {}
	}, s = (e) => {
		let t = {
			method: e.method,
			url: e.url,
			headers: {},
			compress: e.compress
		};
		return e.headers.forEach((e, n) => {
			t.headers[n] = e;
		}), t;
	}, c = (e) => {
		let t = {
			status: e.status,
			headers: {}
		};
		return e.headers.forEach((e, n) => {
			t.headers[n] = e;
		}), t;
	};
	t.exports = class {
		constructor({ entry: e, request: t, response: r, options: i }) {
			this.entry = e, this.request = s(t), this.response = c(r), this.options = i, this.policy = new n(this.request, this.response, a), this.entry && (this.policy._responseTime = this.entry.metadata.time);
		}
		static storable(e, t) {
			return !t.cachePath || t.cache === "no-store" || !["GET", "HEAD"].includes(e.method) ? !1 : new n(s(e), o, a).storable();
		}
		satisfies(e) {
			let t = s(e);
			if (this.request.headers.host !== t.headers.host || this.request.compress !== t.compress) return !1;
			let n = new r(this.request), a = new r(t);
			return JSON.stringify(n.mediaTypes()) !== JSON.stringify(a.mediaTypes()) || JSON.stringify(n.languages()) !== JSON.stringify(a.languages()) || JSON.stringify(n.encodings()) !== JSON.stringify(a.encodings()) ? !1 : this.options.integrity ? i.parse(this.options.integrity).match(this.entry.integrity) : !0;
		}
		storable() {
			return this.policy.storable();
		}
		get mustRevalidate() {
			return !!this.policy._rescc["must-revalidate"];
		}
		needsRevalidation(e) {
			let t = s(e);
			return t.method = "GET", !this.policy.satisfiesWithoutRevalidation(t);
		}
		responseHeaders() {
			return this.policy.responseHeaders();
		}
		revalidationHeaders(e) {
			let t = s(e);
			return this.policy.revalidationHeaders(t);
		}
		revalidated(e, t) {
			let n = s(e), r = c(t);
			return !this.policy.revalidatedPolicy(n, r).modified;
		}
	};
})), Vo = /* @__PURE__ */ w(((e, t) => {
	t.exports = { NotCachedError: class extends Error {
		constructor(e) {
			super(`request to ${e} failed: cache mode is 'only-if-cached' but no cached response is available.`), this.code = "ENOTCACHED";
		}
	} };
})), Ho = /* @__PURE__ */ w(((e, t) => {
	var n = typeof process == "object" && process ? process : {
		stdout: null,
		stderr: null
	}, r = k("events"), i = k("stream"), a = k("string_decoder").StringDecoder, o = Symbol("EOF"), s = Symbol("maybeEmitEnd"), c = Symbol("emittedEnd"), l = Symbol("emittingEnd"), u = Symbol("emittedError"), d = Symbol("closed"), f = Symbol("read"), p = Symbol("flush"), m = Symbol("flushChunk"), h = Symbol("encoding"), g = Symbol("decoder"), _ = Symbol("flowing"), v = Symbol("paused"), y = Symbol("resume"), b = Symbol("bufferLength"), x = Symbol("bufferPush"), S = Symbol("bufferShift"), C = Symbol("objectMode"), w = Symbol("destroyed"), T = Symbol("emitData"), E = Symbol("emitEnd"), D = Symbol("emitEnd2"), O = Symbol("async"), A = (e) => Promise.resolve().then(e), j = global._MP_NO_ITERATOR_SYMBOLS_ !== "1", M = j && Symbol.asyncIterator || Symbol("asyncIterator not implemented"), N = j && Symbol.iterator || Symbol("iterator not implemented"), P = (e) => e === "end" || e === "finish" || e === "prefinish", F = (e) => e instanceof ArrayBuffer || typeof e == "object" && e.constructor && e.constructor.name === "ArrayBuffer" && e.byteLength >= 0, I = (e) => !Buffer.isBuffer(e) && ArrayBuffer.isView(e), L = class {
		constructor(e, t, n) {
			this.src = e, this.dest = t, this.opts = n, this.ondrain = () => e[y](), t.on("drain", this.ondrain);
		}
		unpipe() {
			this.dest.removeListener("drain", this.ondrain);
		}
		// istanbul ignore next - only here for the prototype
		proxyErrors() {}
		end() {
			this.unpipe(), this.opts.end && this.dest.end();
		}
	}, R = class extends L {
		unpipe() {
			this.src.removeListener("error", this.proxyErrors), super.unpipe();
		}
		constructor(e, t, n) {
			super(e, t, n), this.proxyErrors = (e) => t.emit("error", e), e.on("error", this.proxyErrors);
		}
	};
	t.exports = class e extends i {
		constructor(e) {
			super(), this[_] = !1, this[v] = !1, this.pipes = [], this.buffer = [], this[C] = e && e.objectMode || !1, this[C] ? this[h] = null : this[h] = e && e.encoding || null, this[h] === "buffer" && (this[h] = null), this[O] = e && !!e.async || !1, this[g] = this[h] ? new a(this[h]) : null, this[o] = !1, this[c] = !1, this[l] = !1, this[d] = !1, this[u] = null, this.writable = !0, this.readable = !0, this[b] = 0, this[w] = !1;
		}
		get bufferLength() {
			return this[b];
		}
		get encoding() {
			return this[h];
		}
		set encoding(e) {
			if (this[C]) throw Error("cannot set encoding in objectMode");
			if (this[h] && e !== this[h] && (this[g] && this[g].lastNeed || this[b])) throw Error("cannot change encoding");
			this[h] !== e && (this[g] = e ? new a(e) : null, this.buffer.length && (this.buffer = this.buffer.map((e) => this[g].write(e)))), this[h] = e;
		}
		setEncoding(e) {
			this.encoding = e;
		}
		get objectMode() {
			return this[C];
		}
		set objectMode(e) {
			this[C] = this[C] || !!e;
		}
		get async() {
			return this[O];
		}
		set async(e) {
			this[O] = this[O] || !!e;
		}
		write(e, t, n) {
			if (this[o]) throw Error("write after end");
			if (this[w]) return this.emit("error", Object.assign(/* @__PURE__ */ Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), !0;
			typeof t == "function" && (n = t, t = "utf8"), t ||= "utf8";
			let r = this[O] ? A : (e) => e();
			return !this[C] && !Buffer.isBuffer(e) && (I(e) ? e = Buffer.from(e.buffer, e.byteOffset, e.byteLength) : F(e) ? e = Buffer.from(e) : typeof e != "string" && (this.objectMode = !0)), this[C] ? (this.flowing && this[b] !== 0 && this[p](!0), this.flowing ? this.emit("data", e) : this[x](e), this[b] !== 0 && this.emit("readable"), n && r(n), this.flowing) : e.length ? (typeof e == "string" && !(t === this[h] && !this[g].lastNeed) && (e = Buffer.from(e, t)), Buffer.isBuffer(e) && this[h] && (e = this[g].write(e)), this.flowing && this[b] !== 0 && this[p](!0), this.flowing ? this.emit("data", e) : this[x](e), this[b] !== 0 && this.emit("readable"), n && r(n), this.flowing) : (this[b] !== 0 && this.emit("readable"), n && r(n), this.flowing);
		}
		read(e) {
			if (this[w]) return null;
			if (this[b] === 0 || e === 0 || e > this[b]) return this[s](), null;
			this[C] && (e = null), this.buffer.length > 1 && !this[C] && (this.encoding ? this.buffer = [this.buffer.join("")] : this.buffer = [Buffer.concat(this.buffer, this[b])]);
			let t = this[f](e || null, this.buffer[0]);
			return this[s](), t;
		}
		[f](e, t) {
			return e === t.length || e === null ? this[S]() : (this.buffer[0] = t.slice(e), t = t.slice(0, e), this[b] -= e), this.emit("data", t), !this.buffer.length && !this[o] && this.emit("drain"), t;
		}
		end(e, t, n) {
			return typeof e == "function" && (n = e, e = null), typeof t == "function" && (n = t, t = "utf8"), e && this.write(e, t), n && this.once("end", n), this[o] = !0, this.writable = !1, (this.flowing || !this[v]) && this[s](), this;
		}
		[y]() {
			this[w] || (this[v] = !1, this[_] = !0, this.emit("resume"), this.buffer.length ? this[p]() : this[o] ? this[s]() : this.emit("drain"));
		}
		resume() {
			return this[y]();
		}
		pause() {
			this[_] = !1, this[v] = !0;
		}
		get destroyed() {
			return this[w];
		}
		get flowing() {
			return this[_];
		}
		get paused() {
			return this[v];
		}
		[x](e) {
			this[C] ? this[b] += 1 : this[b] += e.length, this.buffer.push(e);
		}
		[S]() {
			return this.buffer.length && (this[C] ? --this[b] : this[b] -= this.buffer[0].length), this.buffer.shift();
		}
		[p](e) {
			do			;
while (this[m](this[S]()));
			!e && !this.buffer.length && !this[o] && this.emit("drain");
		}
		[m](e) {
			return e ? (this.emit("data", e), this.flowing) : !1;
		}
		pipe(e, t) {
			if (this[w]) return;
			let r = this[c];
			return t ||= {}, e === n.stdout || e === n.stderr ? t.end = !1 : t.end = t.end !== !1, t.proxyErrors = !!t.proxyErrors, r ? t.end && e.end() : (this.pipes.push(t.proxyErrors ? new R(this, e, t) : new L(this, e, t)), this[O] ? A(() => this[y]()) : this[y]()), e;
		}
		unpipe(e) {
			let t = this.pipes.find((t) => t.dest === e);
			t && (this.pipes.splice(this.pipes.indexOf(t), 1), t.unpipe());
		}
		addListener(e, t) {
			return this.on(e, t);
		}
		on(e, t) {
			let n = super.on(e, t);
			return e === "data" && !this.pipes.length && !this.flowing ? this[y]() : e === "readable" && this[b] !== 0 ? super.emit("readable") : P(e) && this[c] ? (super.emit(e), this.removeAllListeners(e)) : e === "error" && this[u] && (this[O] ? A(() => t.call(this, this[u])) : t.call(this, this[u])), n;
		}
		get emittedEnd() {
			return this[c];
		}
		[s]() {
			!this[l] && !this[c] && !this[w] && this.buffer.length === 0 && this[o] && (this[l] = !0, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[d] && this.emit("close"), this[l] = !1);
		}
		emit(e, t, ...n) {
			if (e !== "error" && e !== "close" && e !== w && this[w]) return;
			if (e === "data") return t ? this[O] ? A(() => this[T](t)) : this[T](t) : !1;
			if (e === "end") return this[E]();
			if (e === "close") {
				if (this[d] = !0, !this[c] && !this[w]) return;
				let e = super.emit("close");
				return this.removeAllListeners("close"), e;
			} else if (e === "error") {
				this[u] = t;
				let e = super.emit("error", t);
				return this[s](), e;
			} else if (e === "resume") {
				let e = super.emit("resume");
				return this[s](), e;
			} else if (e === "finish" || e === "prefinish") {
				let t = super.emit(e);
				return this.removeAllListeners(e), t;
			}
			let r = super.emit(e, t, ...n);
			return this[s](), r;
		}
		[T](e) {
			for (let t of this.pipes) t.dest.write(e) === !1 && this.pause();
			let t = super.emit("data", e);
			return this[s](), t;
		}
		[E]() {
			this[c] || (this[c] = !0, this.readable = !1, this[O] ? A(() => this[D]()) : this[D]());
		}
		[D]() {
			if (this[g]) {
				let e = this[g].end();
				if (e) {
					for (let t of this.pipes) t.dest.write(e);
					super.emit("data", e);
				}
			}
			for (let e of this.pipes) e.end();
			let e = super.emit("end");
			return this.removeAllListeners("end"), e;
		}
		collect() {
			let e = [];
			this[C] || (e.dataLength = 0);
			let t = this.promise();
			return this.on("data", (t) => {
				e.push(t), this[C] || (e.dataLength += t.length);
			}), t.then(() => e);
		}
		concat() {
			return this[C] ? Promise.reject(/* @__PURE__ */ Error("cannot concat in objectMode")) : this.collect().then((e) => this[C] ? Promise.reject(/* @__PURE__ */ Error("cannot concat in objectMode")) : this[h] ? e.join("") : Buffer.concat(e, e.dataLength));
		}
		promise() {
			return new Promise((e, t) => {
				this.on(w, () => t(/* @__PURE__ */ Error("stream destroyed"))), this.on("error", (e) => t(e)), this.on("end", () => e());
			});
		}
		[M]() {
			return { next: () => {
				let e = this.read();
				if (e !== null) return Promise.resolve({
					done: !1,
					value: e
				});
				if (this[o]) return Promise.resolve({ done: !0 });
				let t = null, n = null, r = (e) => {
					this.removeListener("data", i), this.removeListener("end", a), n(e);
				}, i = (e) => {
					this.removeListener("error", r), this.removeListener("end", a), this.pause(), t({
						value: e,
						done: !!this[o]
					});
				}, a = () => {
					this.removeListener("error", r), this.removeListener("data", i), t({ done: !0 });
				}, s = () => r(/* @__PURE__ */ Error("stream destroyed"));
				return new Promise((e, o) => {
					n = o, t = e, this.once(w, s), this.once("error", r), this.once("end", a), this.once("data", i);
				});
			} };
		}
		[N]() {
			return { next: () => {
				let e = this.read();
				return {
					value: e,
					done: e === null
				};
			} };
		}
		destroy(e) {
			return this[w] ? (e ? this.emit("error", e) : this.emit(w), this) : (this[w] = !0, this.buffer.length = 0, this[b] = 0, typeof this.close == "function" && !this[d] && this.close(), e ? this.emit("error", e) : this.emit(w), this);
		}
		static isStream(t) {
			return !!t && (t instanceof e || t instanceof i || t instanceof r && (typeof t.pipe == "function" || typeof t.write == "function" && typeof t.end == "function"));
		}
	};
})), Uo = /* @__PURE__ */ w(((e, t) => {
	var n = Ho(), r = Symbol("_flush"), i = Symbol("_flushed"), a = Symbol("_flushing");
	t.exports = class extends n {
		constructor(e = {}) {
			if (typeof e == "function" && (e = { flush: e }), super(e), typeof e.flush != "function" && typeof this.flush != "function") throw TypeError("must provide flush function in options");
			this[r] = e.flush || this.flush;
		}
		emit(e, ...t) {
			if (e !== "end" && e !== "finish" || this[i]) return super.emit(e, ...t);
			if (this[a]) return;
			this[a] = !0;
			let n = (e) => {
				this[i] = !0, e ? super.emit("error", e) : super.emit("end");
			}, o = this[r](n);
			o && o.then && o.then(() => n(), (e) => n(e));
		}
	};
})), Wo = /* @__PURE__ */ w(((e, t) => {
	var { Minipass: n } = wa(), r = Symbol("_data"), i = Symbol("_length");
	t.exports = class extends n {
		constructor(e) {
			super(e), this[r] = [], this[i] = 0;
		}
		write(e, t, n) {
			typeof t == "function" && (n = t, t = "utf8"), t ||= "utf8";
			let a = Buffer.isBuffer(e) ? e : Buffer.from(e, t);
			return this[r].push(a), this[i] += a.length, n && n(), !0;
		}
		end(e, t, n) {
			typeof e == "function" && (n = e, e = null), typeof t == "function" && (n = t, t = "utf8"), e && this.write(e, t);
			let a = Buffer.concat(this[r], this[i]);
			return super.write(a), super.end(n);
		}
	};
	var a = class extends n {
		constructor(e) {
			super(e), this[r] = [], this[i] = 0;
		}
		write(e, t, n) {
			typeof t == "function" && (n = t, t = "utf8"), t ||= "utf8";
			let a = Buffer.isBuffer(e) ? e : Buffer.from(e, t);
			return this[r].push(a), this[i] += a.length, super.write(e, t, n);
		}
		end(e, t, n) {
			typeof e == "function" && (n = e, e = null), typeof t == "function" && (n = t, t = "utf8"), e && this.write(e, t);
			let a = Buffer.concat(this[r], this[i]);
			return this.emit("collect", a), super.end(n);
		}
	};
	t.exports.PassThrough = a;
})), Go = /* @__PURE__ */ w(((e, t) => {
	var n = typeof process == "object" && process ? process : {
		stdout: null,
		stderr: null
	}, r = k("events"), i = k("stream"), a = k("string_decoder").StringDecoder, o = Symbol("EOF"), s = Symbol("maybeEmitEnd"), c = Symbol("emittedEnd"), l = Symbol("emittingEnd"), u = Symbol("emittedError"), d = Symbol("closed"), f = Symbol("read"), p = Symbol("flush"), m = Symbol("flushChunk"), h = Symbol("encoding"), g = Symbol("decoder"), _ = Symbol("flowing"), v = Symbol("paused"), y = Symbol("resume"), b = Symbol("bufferLength"), x = Symbol("bufferPush"), S = Symbol("bufferShift"), C = Symbol("objectMode"), w = Symbol("destroyed"), T = Symbol("emitData"), E = Symbol("emitEnd"), D = Symbol("emitEnd2"), O = Symbol("async"), A = (e) => Promise.resolve().then(e), j = global._MP_NO_ITERATOR_SYMBOLS_ !== "1", M = j && Symbol.asyncIterator || Symbol("asyncIterator not implemented"), N = j && Symbol.iterator || Symbol("iterator not implemented"), P = (e) => e === "end" || e === "finish" || e === "prefinish", F = (e) => e instanceof ArrayBuffer || typeof e == "object" && e.constructor && e.constructor.name === "ArrayBuffer" && e.byteLength >= 0, I = (e) => !Buffer.isBuffer(e) && ArrayBuffer.isView(e), L = class {
		constructor(e, t, n) {
			this.src = e, this.dest = t, this.opts = n, this.ondrain = () => e[y](), t.on("drain", this.ondrain);
		}
		unpipe() {
			this.dest.removeListener("drain", this.ondrain);
		}
		// istanbul ignore next - only here for the prototype
		proxyErrors() {}
		end() {
			this.unpipe(), this.opts.end && this.dest.end();
		}
	}, R = class extends L {
		unpipe() {
			this.src.removeListener("error", this.proxyErrors), super.unpipe();
		}
		constructor(e, t, n) {
			super(e, t, n), this.proxyErrors = (e) => t.emit("error", e), e.on("error", this.proxyErrors);
		}
	};
	t.exports = class e extends i {
		constructor(e) {
			super(), this[_] = !1, this[v] = !1, this.pipes = [], this.buffer = [], this[C] = e && e.objectMode || !1, this[C] ? this[h] = null : this[h] = e && e.encoding || null, this[h] === "buffer" && (this[h] = null), this[O] = e && !!e.async || !1, this[g] = this[h] ? new a(this[h]) : null, this[o] = !1, this[c] = !1, this[l] = !1, this[d] = !1, this[u] = null, this.writable = !0, this.readable = !0, this[b] = 0, this[w] = !1;
		}
		get bufferLength() {
			return this[b];
		}
		get encoding() {
			return this[h];
		}
		set encoding(e) {
			if (this[C]) throw Error("cannot set encoding in objectMode");
			if (this[h] && e !== this[h] && (this[g] && this[g].lastNeed || this[b])) throw Error("cannot change encoding");
			this[h] !== e && (this[g] = e ? new a(e) : null, this.buffer.length && (this.buffer = this.buffer.map((e) => this[g].write(e)))), this[h] = e;
		}
		setEncoding(e) {
			this.encoding = e;
		}
		get objectMode() {
			return this[C];
		}
		set objectMode(e) {
			this[C] = this[C] || !!e;
		}
		get async() {
			return this[O];
		}
		set async(e) {
			this[O] = this[O] || !!e;
		}
		write(e, t, n) {
			if (this[o]) throw Error("write after end");
			if (this[w]) return this.emit("error", Object.assign(/* @__PURE__ */ Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), !0;
			typeof t == "function" && (n = t, t = "utf8"), t ||= "utf8";
			let r = this[O] ? A : (e) => e();
			return !this[C] && !Buffer.isBuffer(e) && (I(e) ? e = Buffer.from(e.buffer, e.byteOffset, e.byteLength) : F(e) ? e = Buffer.from(e) : typeof e != "string" && (this.objectMode = !0)), this[C] ? (this.flowing && this[b] !== 0 && this[p](!0), this.flowing ? this.emit("data", e) : this[x](e), this[b] !== 0 && this.emit("readable"), n && r(n), this.flowing) : e.length ? (typeof e == "string" && !(t === this[h] && !this[g].lastNeed) && (e = Buffer.from(e, t)), Buffer.isBuffer(e) && this[h] && (e = this[g].write(e)), this.flowing && this[b] !== 0 && this[p](!0), this.flowing ? this.emit("data", e) : this[x](e), this[b] !== 0 && this.emit("readable"), n && r(n), this.flowing) : (this[b] !== 0 && this.emit("readable"), n && r(n), this.flowing);
		}
		read(e) {
			if (this[w]) return null;
			if (this[b] === 0 || e === 0 || e > this[b]) return this[s](), null;
			this[C] && (e = null), this.buffer.length > 1 && !this[C] && (this.encoding ? this.buffer = [this.buffer.join("")] : this.buffer = [Buffer.concat(this.buffer, this[b])]);
			let t = this[f](e || null, this.buffer[0]);
			return this[s](), t;
		}
		[f](e, t) {
			return e === t.length || e === null ? this[S]() : (this.buffer[0] = t.slice(e), t = t.slice(0, e), this[b] -= e), this.emit("data", t), !this.buffer.length && !this[o] && this.emit("drain"), t;
		}
		end(e, t, n) {
			return typeof e == "function" && (n = e, e = null), typeof t == "function" && (n = t, t = "utf8"), e && this.write(e, t), n && this.once("end", n), this[o] = !0, this.writable = !1, (this.flowing || !this[v]) && this[s](), this;
		}
		[y]() {
			this[w] || (this[v] = !1, this[_] = !0, this.emit("resume"), this.buffer.length ? this[p]() : this[o] ? this[s]() : this.emit("drain"));
		}
		resume() {
			return this[y]();
		}
		pause() {
			this[_] = !1, this[v] = !0;
		}
		get destroyed() {
			return this[w];
		}
		get flowing() {
			return this[_];
		}
		get paused() {
			return this[v];
		}
		[x](e) {
			this[C] ? this[b] += 1 : this[b] += e.length, this.buffer.push(e);
		}
		[S]() {
			return this.buffer.length && (this[C] ? --this[b] : this[b] -= this.buffer[0].length), this.buffer.shift();
		}
		[p](e) {
			do			;
while (this[m](this[S]()));
			!e && !this.buffer.length && !this[o] && this.emit("drain");
		}
		[m](e) {
			return e ? (this.emit("data", e), this.flowing) : !1;
		}
		pipe(e, t) {
			if (this[w]) return;
			let r = this[c];
			return t ||= {}, e === n.stdout || e === n.stderr ? t.end = !1 : t.end = t.end !== !1, t.proxyErrors = !!t.proxyErrors, r ? t.end && e.end() : (this.pipes.push(t.proxyErrors ? new R(this, e, t) : new L(this, e, t)), this[O] ? A(() => this[y]()) : this[y]()), e;
		}
		unpipe(e) {
			let t = this.pipes.find((t) => t.dest === e);
			t && (this.pipes.splice(this.pipes.indexOf(t), 1), t.unpipe());
		}
		addListener(e, t) {
			return this.on(e, t);
		}
		on(e, t) {
			let n = super.on(e, t);
			return e === "data" && !this.pipes.length && !this.flowing ? this[y]() : e === "readable" && this[b] !== 0 ? super.emit("readable") : P(e) && this[c] ? (super.emit(e), this.removeAllListeners(e)) : e === "error" && this[u] && (this[O] ? A(() => t.call(this, this[u])) : t.call(this, this[u])), n;
		}
		get emittedEnd() {
			return this[c];
		}
		[s]() {
			!this[l] && !this[c] && !this[w] && this.buffer.length === 0 && this[o] && (this[l] = !0, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[d] && this.emit("close"), this[l] = !1);
		}
		emit(e, t, ...n) {
			if (e !== "error" && e !== "close" && e !== w && this[w]) return;
			if (e === "data") return t ? this[O] ? A(() => this[T](t)) : this[T](t) : !1;
			if (e === "end") return this[E]();
			if (e === "close") {
				if (this[d] = !0, !this[c] && !this[w]) return;
				let e = super.emit("close");
				return this.removeAllListeners("close"), e;
			} else if (e === "error") {
				this[u] = t;
				let e = super.emit("error", t);
				return this[s](), e;
			} else if (e === "resume") {
				let e = super.emit("resume");
				return this[s](), e;
			} else if (e === "finish" || e === "prefinish") {
				let t = super.emit(e);
				return this.removeAllListeners(e), t;
			}
			let r = super.emit(e, t, ...n);
			return this[s](), r;
		}
		[T](e) {
			for (let t of this.pipes) t.dest.write(e) === !1 && this.pause();
			let t = super.emit("data", e);
			return this[s](), t;
		}
		[E]() {
			this[c] || (this[c] = !0, this.readable = !1, this[O] ? A(() => this[D]()) : this[D]());
		}
		[D]() {
			if (this[g]) {
				let e = this[g].end();
				if (e) {
					for (let t of this.pipes) t.dest.write(e);
					super.emit("data", e);
				}
			}
			for (let e of this.pipes) e.end();
			let e = super.emit("end");
			return this.removeAllListeners("end"), e;
		}
		collect() {
			let e = [];
			this[C] || (e.dataLength = 0);
			let t = this.promise();
			return this.on("data", (t) => {
				e.push(t), this[C] || (e.dataLength += t.length);
			}), t.then(() => e);
		}
		concat() {
			return this[C] ? Promise.reject(/* @__PURE__ */ Error("cannot concat in objectMode")) : this.collect().then((e) => this[C] ? Promise.reject(/* @__PURE__ */ Error("cannot concat in objectMode")) : this[h] ? e.join("") : Buffer.concat(e, e.dataLength));
		}
		promise() {
			return new Promise((e, t) => {
				this.on(w, () => t(/* @__PURE__ */ Error("stream destroyed"))), this.on("error", (e) => t(e)), this.on("end", () => e());
			});
		}
		[M]() {
			return { next: () => {
				let e = this.read();
				if (e !== null) return Promise.resolve({
					done: !1,
					value: e
				});
				if (this[o]) return Promise.resolve({ done: !0 });
				let t = null, n = null, r = (e) => {
					this.removeListener("data", i), this.removeListener("end", a), n(e);
				}, i = (e) => {
					this.removeListener("error", r), this.removeListener("end", a), this.pause(), t({
						value: e,
						done: !!this[o]
					});
				}, a = () => {
					this.removeListener("error", r), this.removeListener("data", i), t({ done: !0 });
				}, s = () => r(/* @__PURE__ */ Error("stream destroyed"));
				return new Promise((e, o) => {
					n = o, t = e, this.once(w, s), this.once("error", r), this.once("end", a), this.once("data", i);
				});
			} };
		}
		[N]() {
			return { next: () => {
				let e = this.read();
				return {
					value: e,
					done: e === null
				};
			} };
		}
		destroy(e) {
			return this[w] ? (e ? this.emit("error", e) : this.emit(w), this) : (this[w] = !0, this.buffer.length = 0, this[b] = 0, typeof this.close == "function" && !this[d] && this.close(), e ? this.emit("error", e) : this.emit(w), this);
		}
		static isStream(t) {
			return !!t && (t instanceof e || t instanceof i || t instanceof r && (typeof t.pipe == "function" || typeof t.write == "function" && typeof t.end == "function"));
		}
	};
})), Ko = /* @__PURE__ */ w(((e, t) => {
	var n = Go(), r = k("events"), i = (e) => e && e instanceof r && (typeof e.pipe == "function" || typeof e.write == "function" && typeof e.end == "function"), a = Symbol("_head"), o = Symbol("_tail"), s = Symbol("_linkStreams"), c = Symbol("_setHead"), l = Symbol("_setTail"), u = Symbol("_onError"), d = Symbol("_onData"), f = Symbol("_onEnd"), p = Symbol("_onDrain"), m = Symbol("_streams");
	t.exports = class extends n {
		constructor(e, ...t) {
			i(e) && (t.unshift(e), e = {}), super(e), this[m] = [], t.length && this.push(...t);
		}
		[s](e) {
			return e.reduce((e, t) => (e.on("error", (e) => t.emit("error", e)), e.pipe(t), t));
		}
		push(...e) {
			this[m].push(...e), this[o] && e.unshift(this[o]);
			let t = this[s](e);
			this[l](t), this[a] || this[c](e[0]);
		}
		unshift(...e) {
			this[m].unshift(...e), this[a] && e.push(this[a]);
			let t = this[s](e);
			this[c](e[0]), this[o] || this[l](t);
		}
		destroy(e) {
			return this[m].forEach((e) => typeof e.destroy == "function" && e.destroy()), super.destroy(e);
		}
		[l](e) {
			this[o] = e, e.on("error", (t) => this[u](e, t)), e.on("data", (t) => this[d](e, t)), e.on("end", () => this[f](e)), e.on("finish", () => this[f](e));
		}
		[u](e, t) {
			e === this[o] && this.emit("error", t);
		}
		[d](e, t) {
			e === this[o] && super.write(t);
		}
		[f](e) {
			e === this[o] && super.end();
		}
		pause() {
			return super.pause(), this[o] && this[o].pause && this[o].pause();
		}
		emit(e, ...t) {
			return e === "resume" && this[o] && this[o].resume && this[o].resume(), super.emit(e, ...t);
		}
		[c](e) {
			this[a] = e, e.on("drain", () => this[p](e));
		}
		[p](e) {
			e === this[a] && this.emit("drain");
		}
		write(e, t, n) {
			return this[a].write(e, t, n) && (this.flowing || this.buffer.length === 0);
		}
		end(e, t, n) {
			return this[a].end(e, t, n), this;
		}
	};
})), qo = /* @__PURE__ */ w(((e, t) => {
	t.exports = (e, { copy: t, wrap: n }) => {
		let r = {};
		if (e && typeof e == "object") for (let n of t) e[n] !== void 0 && (r[n] = e[n]);
		else r[n] = e;
		return r;
	};
})), Jo = /* @__PURE__ */ w(((e, t) => {
	var n = At();
	t.exports = { satisfies: (e) => n.satisfies(process.version, e, { includePrerelease: !0 }) };
})), Yo = /* @__PURE__ */ w(((e, t) => {
	var { inspect: n } = k("util"), r = class {
		constructor(e, t, n) {
			let r = `${t}: ${n.syscall} returned ${n.code} (${n.message})`;
			n.path !== void 0 && (r += ` ${n.path}`), n.dest !== void 0 && (r += ` => ${n.dest}`), this.code = e, Object.defineProperties(this, {
				name: {
					value: "SystemError",
					enumerable: !1,
					writable: !0,
					configurable: !0
				},
				message: {
					value: r,
					enumerable: !1,
					writable: !0,
					configurable: !0
				},
				info: {
					value: n,
					enumerable: !0,
					configurable: !0,
					writable: !1
				},
				errno: {
					get() {
						return n.errno;
					},
					set(e) {
						n.errno = e;
					},
					enumerable: !0,
					configurable: !0
				},
				syscall: {
					get() {
						return n.syscall;
					},
					set(e) {
						n.syscall = e;
					},
					enumerable: !0,
					configurable: !0
				}
			}), n.path !== void 0 && Object.defineProperty(this, "path", {
				get() {
					return n.path;
				},
				set(e) {
					n.path = e;
				},
				enumerable: !0,
				configurable: !0
			}), n.dest !== void 0 && Object.defineProperty(this, "dest", {
				get() {
					return n.dest;
				},
				set(e) {
					n.dest = e;
				},
				enumerable: !0,
				configurable: !0
			});
		}
		toString() {
			return `${this.name} [${this.code}]: ${this.message}`;
		}
		[Symbol.for("nodejs.util.inspect.custom")](e, t) {
			return n(this, {
				...t,
				getters: !0,
				customInspect: !1
			});
		}
	};
	function i(e, n) {
		t.exports[e] = class extends r {
			constructor(t) {
				super(e, n, t);
			}
		};
	}
	i("ERR_FS_CP_DIR_TO_NON_DIR", "Cannot overwrite directory with non-directory"), i("ERR_FS_CP_EEXIST", "Target already exists"), i("ERR_FS_CP_EINVAL", "Invalid src or dest"), i("ERR_FS_CP_FIFO_PIPE", "Cannot copy a FIFO pipe"), i("ERR_FS_CP_NON_DIR_TO_DIR", "Cannot overwrite non-directory with directory"), i("ERR_FS_CP_SOCKET", "Cannot copy a socket file"), i("ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY", "Cannot overwrite symlink in subdirectory of self"), i("ERR_FS_CP_UNKNOWN", "Cannot copy an unknown file type"), i("ERR_FS_EISDIR", "Path is a directory"), t.exports.ERR_INVALID_ARG_TYPE = class extends Error {
		constructor(e, t, n) {
			super(), this.code = "ERR_INVALID_ARG_TYPE", this.message = `The ${e} argument must be ${t}. Received ${typeof n}`;
		}
	};
})), Xo = /* @__PURE__ */ w(((e, t) => {
	var { ERR_FS_CP_DIR_TO_NON_DIR: n, ERR_FS_CP_EEXIST: r, ERR_FS_CP_EINVAL: i, ERR_FS_CP_FIFO_PIPE: a, ERR_FS_CP_NON_DIR_TO_DIR: o, ERR_FS_CP_SOCKET: s, ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY: c, ERR_FS_CP_UNKNOWN: l, ERR_FS_EISDIR: u, ERR_INVALID_ARG_TYPE: d } = Yo(), { constants: { errno: { EEXIST: f, EISDIR: p, EINVAL: m, ENOTDIR: h } } } = k("os"), { chmod: g, copyFile: _, lstat: v, mkdir: y, readdir: b, readlink: x, stat: S, symlink: C, unlink: w, utimes: T } = k("fs/promises"), { dirname: E, isAbsolute: D, join: O, parse: A, resolve: j, sep: M, toNamespacedPath: N } = k("path"), { fileURLToPath: P } = k("url"), F = {
		dereference: !1,
		errorOnExist: !1,
		filter: void 0,
		force: !0,
		preserveTimestamps: !1,
		recursive: !1
	};
	async function I(e, t, n) {
		if (n != null && typeof n != "object") throw new d("options", ["Object"], n);
		return R(N(L(e)), N(L(t)), {
			...F,
			...n
		});
	}
	function L(e) {
		return e != null && e.href && e.origin ? P(e) : e;
	}
	async function R(e, t, n) {
		// istanbul ignore next
		n.preserveTimestamps && process.arch === "ia32" && process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended", "TimestampPrecisionWarning");
		let { srcStat: r, destStat: i } = await z(e, t, n);
		return await ee(e, r, t), n.filter ? K(H, i, e, t, n) : H(i, e, t, n);
	}
	async function z(e, t, r) {
		let { 0: a, 1: s } = await V(e, t, r);
		if (s) {
			if (B(a, s)) throw new i({
				message: "src and dest cannot be the same",
				path: t,
				syscall: "cp",
				errno: m
			});
			if (a.isDirectory() && !s.isDirectory()) throw new n({
				message: `cannot overwrite directory ${e} with non-directory ${t}`,
				path: t,
				syscall: "cp",
				errno: p
			});
			if (!a.isDirectory() && s.isDirectory()) throw new o({
				message: `cannot overwrite non-directory ${e} with directory ${t}`,
				path: t,
				syscall: "cp",
				errno: h
			});
		}
		if (a.isDirectory() && G(e, t)) throw new i({
			message: `cannot copy ${e} to a subdirectory of self ${t}`,
			path: t,
			syscall: "cp",
			errno: m
		});
		return {
			srcStat: a,
			destStat: s
		};
	}
	function B(e, t) {
		return t.ino && t.dev && t.ino === e.ino && t.dev === e.dev;
	}
	function V(e, t, n) {
		let r = n.dereference ? (e) => S(e, { bigint: !0 }) : (e) => v(e, { bigint: !0 });
		return Promise.all([r(e), r(t).catch((e) => {
			// istanbul ignore next: unsure how to cover.
			if (e.code === "ENOENT") return null;
			// istanbul ignore next: unsure how to cover.
			throw e;
		})]);
	}
	async function H(e, t, n, r) {
		let i = E(n);
		return await U(i) || await y(i, { recursive: !0 }), ne(e, t, n, r);
	}
	function U(e) {
		return S(e).then(
			() => !0,
			// istanbul ignore next: not sure when this would occur
			(e) => e.code === "ENOENT" ? !1 : Promise.reject(e)
		);
	}
	async function ee(e, t, n) {
		let r = j(E(e)), a = j(E(n));
		if (a === r || a === A(a).root) return;
		let o;
		try {
			o = await S(a, { bigint: !0 });
		} catch (e) {
			// istanbul ignore else: not sure when this would occur
			if (e.code === "ENOENT") return;
			// istanbul ignore next: not sure when this would occur
			throw e;
		}
		if (B(t, o)) throw new i({
			message: `cannot copy ${e} to a subdirectory of self ${n}`,
			path: n,
			syscall: "cp",
			errno: m
		});
		return ee(e, t, a);
	}
	var W = (e) => j(e).split(M).filter(Boolean);
	function G(e, t) {
		let n = W(e), r = W(t);
		return n.every((e, t) => r[t] === e);
	}
	async function K(e, t, n, r, i, a) {
		if (await i.filter(n, r)) return e(t, n, r, i, a);
	}
	function te(e, t, n, r) {
		return r.filter ? K(ne, e, t, n, r) : ne(e, t, n, r);
	}
	async function ne(e, t, n, r) {
		let i = await (r.dereference ? S : v)(t);
		// istanbul ignore else: can't portably test FIFO
		if (i.isDirectory() && r.recursive) return ue(i, e, t, n, r);
		if (i.isDirectory()) throw new u({
			message: `${t} is a directory (not copied)`,
			path: t,
			syscall: "cp",
			errno: m
		});
		if (i.isFile() || i.isCharacterDevice() || i.isBlockDevice()) return re(i, e, t, n, r);
		if (i.isSymbolicLink()) return pe(e, t, n);
		// istanbul ignore next: should be unreachable
		throw i.isSocket() ? new s({
			message: `cannot copy a socket file: ${n}`,
			path: n,
			syscall: "cp",
			errno: m
		}) : i.isFIFO() ? new a({
			message: `cannot copy a FIFO pipe: ${n}`,
			path: n,
			syscall: "cp",
			errno: m
		}) : new l({
			message: `cannot copy an unknown file type: ${n}`,
			path: n,
			syscall: "cp",
			errno: m
		});
	}
	function re(e, t, n, r, i) {
		return t ? ie(e, n, r, i) : q(e, n, r, i);
	}
	async function ie(e, t, n, i) {
		if (i.force) return await w(n), q(e, t, n, i);
		if (i.errorOnExist) throw new r({
			message: `${n} already exists`,
			path: n,
			syscall: "cp",
			errno: f
		});
	}
	async function q(e, t, n, r) {
		return await _(t, n), r.preserveTimestamps ? J(e.mode, t, n) : ce(n, e.mode);
	}
	async function J(e, t, n) {
		return ae(e) && await oe(n, e), se(e, t, n);
	}
	function ae(e) {
		return (e & 128) == 0;
	}
	function oe(e, t) {
		return ce(e, t | 128);
	}
	async function se(e, t, n) {
		return await le(t, n), ce(n, e);
	}
	function ce(e, t) {
		return g(e, t);
	}
	async function le(e, t) {
		let n = await S(e);
		return T(t, n.atime, n.mtime);
	}
	function ue(e, t, n, r, i) {
		return t ? fe(n, r, i) : de(e.mode, n, r, i);
	}
	async function de(e, t, n, r) {
		return await y(n), await fe(t, n, r), ce(n, e);
	}
	async function fe(e, t, n) {
		let r = await b(e);
		for (let i = 0; i < r.length; i++) {
			let a = r[i], o = O(e, a), s = O(t, a), { destStat: c } = await z(o, s, n);
			await te(c, o, s, n);
		}
	}
	async function pe(e, t, n) {
		let r = await x(t);
		if (D(r) || (r = j(E(t), r)), !e) return C(r, n);
		let a;
		try {
			a = await x(n);
		} catch (e) {
			// istanbul ignore next: can only test on windows
			if (e.code === "EINVAL" || e.code === "UNKNOWN") return C(r, n);
			// istanbul ignore next: should not be possible
			throw e;
		}
		if (D(a) || (a = j(E(n), a)), G(r, a)) throw new i({
			message: `cannot copy ${r} to a subdirectory of self ${a}`,
			path: n,
			syscall: "cp",
			errno: m
		});
		if ((await S(t)).isDirectory() && G(a, r)) throw new c({
			message: `cannot overwrite ${a} with ${r}`,
			path: n,
			syscall: "cp",
			errno: m
		});
		return me(r, n);
	}
	async function me(e, t) {
		return await w(t), C(e, t);
	}
	t.exports = I;
})), Zo = /* @__PURE__ */ w(((e, t) => {
	var n = k("fs/promises"), r = qo(), i = Jo(), a = Xo(), o = i.satisfies(">=16.7.0");
	t.exports = async (e, t, i) => {
		let s = r(i, { copy: [
			"dereference",
			"errorOnExist",
			"filter",
			"force",
			"preserveTimestamps",
			"recursive"
		] });
		// istanbul ignore next
		return o ? n.cp(e, t, s) : a(e, t, s);
	};
})), Qo = /* @__PURE__ */ w(((e, t) => {
	var { join: n, sep: r } = k("path"), i = qo(), { mkdir: a, mkdtemp: o, rm: s } = k("fs/promises");
	t.exports = async (e, t, c) => {
		let l = i(c, { copy: ["tmpPrefix"] });
		await a(e, { recursive: !0 });
		let u = await o(n(`${e}${r}`, l.tmpPrefix || "")), d, f;
		try {
			f = await t(u);
		} catch (e) {
			d = e;
		}
		try {
			await s(u, {
				force: !0,
				recursive: !0
			});
		} catch {}
		if (d) throw d;
		return f;
	};
})), $o = /* @__PURE__ */ w(((e, t) => {
	var { readdir: n } = k("fs/promises"), { join: r } = k("path");
	t.exports = async (e) => {
		let t = [];
		for (let i of await n(e)) if (i.startsWith("@")) for (let a of await n(r(e, i))) t.push(r(i, a));
		else t.push(i);
		return t;
	};
})), es = /* @__PURE__ */ w(((e, t) => {
	var { dirname: n, join: r, resolve: i, relative: a, isAbsolute: o } = k("path"), s = k("fs/promises"), c = async (e) => {
		try {
			return await s.access(e), !0;
		} catch (e) {
			return e.code !== "ENOENT";
		}
	}, l = async (e, t, u = {}, d = !0, f = []) => {
		if (!e || !t) throw TypeError("`source` and `destination` file required");
		if (u = {
			overwrite: !0,
			...u
		}, !u.overwrite && await c(t)) throw Error(`The destination file exists: ${t}`);
		await s.mkdir(n(t), { recursive: !0 });
		try {
			await s.rename(e, t);
		} catch (n) {
			if (n.code === "EXDEV" || n.code === "EPERM") {
				let n = await s.lstat(e);
				if (n.isDirectory()) {
					let n = await s.readdir(e);
					await Promise.all(n.map((n) => l(r(e, n), r(t, n), u, !1, f)));
				} else n.isSymbolicLink() ? f.push({
					source: e,
					destination: t
				}) : await s.copyFile(e, t);
			} else throw n;
		}
		d && (await Promise.all(f.map(async ({ source: e, destination: t }) => {
			let r = await s.readlink(e);
			o(r) && (r = i(t, a(e, r)));
			let c = "file";
			try {
				c = await s.stat(i(n(e), r)), c.isDirectory() && (c = "junction");
			} catch {}
			await s.symlink(r, t, c);
		})), await s.rm(e, {
			recursive: !0,
			force: !0
		}));
	};
	t.exports = l;
})), ts = /* @__PURE__ */ w(((e, t) => {
	t.exports = {
		cp: Zo(),
		withTempDir: Qo(),
		readdirScoped: $o(),
		moveFile: es()
	};
})), ns = /* @__PURE__ */ w(((e, t) => {
	var n = k("crypto"), { withTempDir: r } = ts(), i = k("fs/promises"), a = k("path");
	t.exports.mkdir = o, t.exports.tmpName = function(e, t) {
		let r = n.randomUUID();
		return a.join(e, "tmp", t ? `${t}-${r}` : r);
	};
	async function o(e, t = {}) {
		let { tmpPrefix: n } = t, r = a.join(e, "tmp");
		await i.mkdir(r, {
			recursive: !0,
			owner: "inherit"
		});
		let o = `${r}${a.sep}${n || ""}`;
		return i.mkdtemp(o, { owner: "inherit" });
	}
	t.exports.withTmp = s;
	function s(e, t, n) {
		return n || (n = t, t = {}), r(a.join(e, "tmp"), n, t);
	}
})), rs = /* @__PURE__ */ T({
	author: () => gs,
	default: () => vs,
	dependencies: () => fs,
	description: () => os,
	devDependencies: () => ps,
	engines: () => ms,
	files: () => cs,
	keywords: () => ds,
	license: () => "ISC",
	main: () => ss,
	name: () => is,
	repository: () => us,
	scripts: () => ls,
	tap: () => _s,
	templateOSS: () => hs,
	version: () => as
}), is, as, os, ss, cs, ls, us, ds, fs, ps, ms, hs, gs, _s, vs, ys = C((() => {
	is = "cacache", as = "20.0.4", os = "Fast, fault-tolerant, cross-platform, disk-based, data-agnostic, content-addressable cache.", ss = "lib/index.js", cs = ["bin/", "lib/"], ls = {
		test: "tap",
		snap: "tap",
		coverage: "tap",
		"test-docker": "docker run -it --rm --name pacotest -v \"$PWD\":/tmp -w /tmp node:latest npm test",
		lint: "npm run eslint",
		npmclilint: "npmcli-lint",
		lintfix: "npm run eslint -- --fix",
		postsnap: "npm run lintfix --",
		postlint: "template-oss-check",
		posttest: "npm run lint",
		"template-oss-apply": "template-oss-apply --force",
		eslint: "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
	}, us = {
		type: "git",
		url: "git+https://github.com/npm/cacache.git"
	}, ds = [
		"cache",
		"caching",
		"content-addressable",
		"sri",
		"sri hash",
		"subresource integrity",
		"cache",
		"storage",
		"store",
		"file store",
		"filesystem",
		"disk cache",
		"disk storage"
	], fs = {
		"@npmcli/fs": "^5.0.0",
		"fs-minipass": "^3.0.0",
		glob: "^13.0.0",
		"lru-cache": "^11.1.0",
		minipass: "^7.0.3",
		"minipass-collect": "^2.0.1",
		"minipass-flush": "^1.0.5",
		"minipass-pipeline": "^1.2.4",
		"p-map": "^7.0.2",
		ssri: "^13.0.0"
	}, ps = {
		"@npmcli/eslint-config": "^6.0.1",
		"@npmcli/template-oss": "4.29.0",
		tap: "^16.0.0"
	}, ms = { node: "^20.17.0 || >=22.9.0" }, hs = {
		"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
		windowsCI: !1,
		version: "4.29.0",
		publish: "true"
	}, gs = "GitHub Inc.", _s = { "nyc-arg": ["--exclude", "tap-snapshots/**"] }, vs = {
		name: is,
		version: as,
		"cache-version": {
			content: "2",
			index: "5"
		},
		description: os,
		main: ss,
		files: cs,
		scripts: ls,
		repository: us,
		keywords: ds,
		license: "ISC",
		dependencies: fs,
		devDependencies: ps,
		engines: ms,
		templateOSS: hs,
		author: gs,
		tap: _s
	};
})), bs = /* @__PURE__ */ w(((e, t) => {
	t.exports = n;
	function n(e) {
		return [
			e.slice(0, 2),
			e.slice(2, 4),
			e.slice(4)
		];
	}
})), xs = /* @__PURE__ */ w(((e, t) => {
	var n = (ys(), O(rs).default)["cache-version"].content, r = bs(), i = k("path"), a = zo();
	t.exports = o;
	function o(e, t) {
		let n = a.parse(t, { single: !0 });
		return i.join(s(e), n.algorithm, ...r(n.hexDigest()));
	}
	t.exports.contentDir = s;
	function s(e) {
		return i.join(e, `content-v${n}`);
	}
})), Ss = /* @__PURE__ */ w(((e, t) => {
	var n = k("crypto"), { appendFile: r, mkdir: i, readFile: a, readdir: o, rm: s, writeFile: c } = k("fs/promises"), { Minipass: l } = wa(), u = k("path"), d = zo(), { tmpName: f } = ns(), p = xs(), m = bs(), h = (ys(), O(rs).default)["cache-version"].index, { moveFile: g } = ts(), _ = 5;
	t.exports.NotFoundError = class extends Error {
		constructor(e, t) {
			super(`No cache entry for ${t} found in ${e}`), this.code = "ENOENT", this.cache = e, this.key = t;
		}
	}, t.exports.compact = v;
	async function v(e, t, n, r = {}) {
		let a = D(e, t), o = await w(a), l = [];
		for (let e = o.length - 1; e >= 0; --e) {
			let t = o[e];
			if (t.integrity === null && !r.validateEntry) break;
			(!r.validateEntry || r.validateEntry(t) === !0) && (l.length === 0 || !l.find((e) => n(e, t))) && l.unshift(t);
		}
		let d = "\n" + l.map((e) => {
			let t = JSON.stringify(e);
			return `${j(t)}\t${t}`;
		}).join("\n"), p = async () => {
			let t = f(e, r.tmpPrefix);
			return await i(u.dirname(t), { recursive: !0 }), {
				target: t,
				moved: !1
			};
		}, m = async (e) => {
			if (!e.moved) return s(e.target, {
				recursive: !0,
				force: !0
			});
		}, h = async (e) => {
			await c(e.target, d, { flag: "wx" }), await i(u.dirname(a), { recursive: !0 }), await g(e.target, a), e.moved = !0;
		}, _ = await p();
		try {
			await h(_);
		} finally {
			await m(_);
		}
		return l.reverse().map((t) => N(e, t, !0));
	}
	t.exports.insert = y;
	async function y(e, t, n, a = {}) {
		let { metadata: o, size: s, time: c } = a, l = D(e, t), f = {
			key: t,
			integrity: n && d.stringify(n),
			time: c || Date.now(),
			size: s,
			metadata: o
		};
		try {
			await i(u.dirname(l), { recursive: !0 });
			let e = JSON.stringify(f);
			await r(l, `\n${j(e)}\t${e}`);
		} catch (e) {
			if (e.code === "ENOENT") return;
			throw e;
		}
		return N(e, f);
	}
	t.exports.find = b;
	async function b(e, t) {
		let n = D(e, t);
		try {
			return (await w(n)).reduce((n, r) => r && r.key === t ? N(e, r) : n, null);
		} catch (e) {
			if (e.code === "ENOENT") return null;
			throw e;
		}
	}
	t.exports.delete = x;
	function x(e, t, n = {}) {
		return n.removeFully ? s(D(e, t), {
			recursive: !0,
			force: !0
		}) : y(e, t, null, n);
	}
	t.exports.lsStream = S;
	function S(e) {
		let t = E(e), n = new l({ objectMode: !0 });
		return Promise.resolve().then(async () => {
			let { default: r } = await Promise.resolve().then(() => (jh(), Oh));
			return await r(await P(t), async (i) => {
				let a = u.join(t, i);
				await r(await P(a), async (t) => {
					let i = u.join(a, t);
					await r(await P(i), async (t) => {
						let r = u.join(i, t);
						try {
							let t = (await w(r)).reduce((e, t) => (e.set(t.key, t), e), /* @__PURE__ */ new Map());
							for (let r of t.values()) {
								let t = N(e, r);
								t && n.write(t);
							}
						} catch (e) {
							if (e.code === "ENOENT") return;
							throw e;
						}
					}, { concurrency: _ });
				}, { concurrency: _ });
			}, { concurrency: _ }), n.end(), n;
		}).catch((e) => n.emit("error", e)), n;
	}
	t.exports.ls = C;
	async function C(e) {
		return (await S(e).collect()).reduce((e, t) => (e[t.key] = t, e), {});
	}
	t.exports.bucketEntries = w;
	async function w(e, t) {
		return T(await a(e, "utf8"), t);
	}
	function T(e) {
		let t = [];
		return e.split("\n").forEach((e) => {
			if (!e) return;
			let n = e.split("	");
			if (!n[1] || j(n[1]) !== n[0]) return;
			let r;
			try {
				r = JSON.parse(n[1]);
			} catch {}
			// istanbul ignore else
			r && t.push(r);
		}), t;
	}
	t.exports.bucketDir = E;
	function E(e) {
		return u.join(e, `index-v${h}`);
	}
	t.exports.bucketPath = D;
	function D(e, t) {
		let n = A(t);
		return u.join.apply(u, [E(e)].concat(m(n)));
	}
	t.exports.hashKey = A;
	function A(e) {
		return M(e, "sha256");
	}
	t.exports.hashEntry = j;
	function j(e) {
		return M(e, "sha1");
	}
	function M(e, t) {
		return n.createHash(t).update(e).digest("hex");
	}
	function N(e, t, n) {
		return !t.integrity && !n ? null : {
			key: t.key,
			integrity: t.integrity,
			path: t.integrity ? p(e, t.integrity) : void 0,
			size: t.size,
			time: t.time,
			metadata: t.metadata
		};
	}
	function P(e) {
		return o(e).catch((e) => {
			if (e.code === "ENOENT" || e.code === "ENOTDIR") return [];
			throw e;
		});
	}
})), Cs = /* @__PURE__ */ w(((e, t) => {
	var { LRUCache: n } = zn(), r = new n({
		max: 500,
		maxSize: 50 * 1024 * 1024,
		ttl: 180 * 1e3,
		sizeCalculation: (e, t) => t.startsWith("key:") ? e.data.length : e.length
	});
	t.exports.clearMemoized = i;
	function i() {
		let e = {};
		return r.forEach((t, n) => {
			e[n] = t;
		}), r.clear(), e;
	}
	t.exports.put = a;
	function a(e, t, n, r) {
		u(r).set(`key:${e}:${t.key}`, {
			entry: t,
			data: n
		}), o(e, t.integrity, n, r);
	}
	t.exports.put.byDigest = o;
	function o(e, t, n, r) {
		u(r).set(`digest:${e}:${t}`, n);
	}
	t.exports.get = s;
	function s(e, t, n) {
		return u(n).get(`key:${e}:${t}`);
	}
	t.exports.get.byDigest = c;
	function c(e, t, n) {
		return u(n).get(`digest:${e}:${t}`);
	}
	var l = class {
		constructor(e) {
			this.obj = e;
		}
		get(e) {
			return this.obj[e];
		}
		set(e, t) {
			this.obj[e] = t;
		}
	};
	function u(e) {
		return !e || !e.memoize ? r : e.memoize.get && e.memoize.set ? e.memoize : typeof e.memoize == "object" ? new l(e.memoize) : r;
	}
})), ws = /* @__PURE__ */ w(((e) => {
	var { Minipass: t } = wa(), n = k("events").EventEmitter, r = k("fs"), i = r.writev, a = Symbol("_autoClose"), o = Symbol("_close"), s = Symbol("_ended"), c = Symbol("_fd"), l = Symbol("_finished"), u = Symbol("_flags"), d = Symbol("_flush"), f = Symbol("_handleChunk"), p = Symbol("_makeBuf"), m = Symbol("_mode"), h = Symbol("_needDrain"), g = Symbol("_onerror"), _ = Symbol("_onopen"), v = Symbol("_onread"), y = Symbol("_onwrite"), b = Symbol("_open"), x = Symbol("_path"), S = Symbol("_pos"), C = Symbol("_queue"), w = Symbol("_read"), T = Symbol("_readSize"), E = Symbol("_reading"), D = Symbol("_remain"), O = Symbol("_size"), A = Symbol("_write"), j = Symbol("_writing"), M = Symbol("_defaultFlag"), N = Symbol("_errored"), P = class extends t {
		constructor(e, t) {
			if (t ||= {}, super(t), this.readable = !0, this.writable = !1, typeof e != "string") throw TypeError("path must be a string");
			this[N] = !1, this[c] = typeof t.fd == "number" ? t.fd : null, this[x] = e, this[T] = t.readSize || 16 * 1024 * 1024, this[E] = !1, this[O] = typeof t.size == "number" ? t.size : Infinity, this[D] = this[O], this[a] = typeof t.autoClose == "boolean" ? t.autoClose : !0, typeof this[c] == "number" ? this[w]() : this[b]();
		}
		get fd() {
			return this[c];
		}
		get path() {
			return this[x];
		}
		write() {
			throw TypeError("this is a readable stream");
		}
		end() {
			throw TypeError("this is a readable stream");
		}
		[b]() {
			r.open(this[x], "r", (e, t) => this[_](e, t));
		}
		[_](e, t) {
			e ? this[g](e) : (this[c] = t, this.emit("open", t), this[w]());
		}
		[p]() {
			return Buffer.allocUnsafe(Math.min(this[T], this[D]));
		}
		[w]() {
			if (!this[E]) {
				this[E] = !0;
				let e = this[p]();
				/* istanbul ignore if */
				if (e.length === 0) return process.nextTick(() => this[v](null, 0, e));
				r.read(this[c], e, 0, e.length, null, (e, t, n) => this[v](e, t, n));
			}
		}
		[v](e, t, n) {
			this[E] = !1, e ? this[g](e) : this[f](t, n) && this[w]();
		}
		[o]() {
			if (this[a] && typeof this[c] == "number") {
				let e = this[c];
				this[c] = null, r.close(e, (e) => e ? this.emit("error", e) : this.emit("close"));
			}
		}
		[g](e) {
			this[E] = !0, this[o](), this.emit("error", e);
		}
		[f](e, t) {
			let n = !1;
			return this[D] -= e, e > 0 && (n = super.write(e < t.length ? t.slice(0, e) : t)), (e === 0 || this[D] <= 0) && (n = !1, this[o](), super.end()), n;
		}
		emit(e, t) {
			switch (e) {
				case "prefinish":
				case "finish": break;
				case "drain":
					typeof this[c] == "number" && this[w]();
					break;
				case "error": return this[N] ? void 0 : (this[N] = !0, super.emit(e, t));
				default: return super.emit(e, t);
			}
		}
	}, F = class extends P {
		[b]() {
			let e = !0;
			try {
				this[_](null, r.openSync(this[x], "r")), e = !1;
			} finally {
				e && this[o]();
			}
		}
		[w]() {
			let e = !0;
			try {
				if (!this[E]) {
					this[E] = !0;
					do {
						let e = this[p](), t = e.length === 0 ? 0 : r.readSync(this[c], e, 0, e.length, null);
						if (!this[f](t, e)) break;
					} while (!0);
					this[E] = !1;
				}
				e = !1;
			} finally {
				e && this[o]();
			}
		}
		[o]() {
			if (this[a] && typeof this[c] == "number") {
				let e = this[c];
				this[c] = null, r.closeSync(e), this.emit("close");
			}
		}
	}, I = class extends n {
		constructor(e, t) {
			t ||= {}, super(t), this.readable = !1, this.writable = !0, this[N] = !1, this[j] = !1, this[s] = !1, this[h] = !1, this[C] = [], this[x] = e, this[c] = typeof t.fd == "number" ? t.fd : null, this[m] = t.mode === void 0 ? 438 : t.mode, this[S] = typeof t.start == "number" ? t.start : null, this[a] = typeof t.autoClose == "boolean" ? t.autoClose : !0;
			let n = this[S] === null ? "w" : "r+";
			this[M] = t.flags === void 0, this[u] = this[M] ? n : t.flags, this[c] === null && this[b]();
		}
		emit(e, t) {
			if (e === "error") {
				if (this[N]) return;
				this[N] = !0;
			}
			return super.emit(e, t);
		}
		get fd() {
			return this[c];
		}
		get path() {
			return this[x];
		}
		[g](e) {
			this[o](), this[j] = !0, this.emit("error", e);
		}
		[b]() {
			r.open(this[x], this[u], this[m], (e, t) => this[_](e, t));
		}
		[_](e, t) {
			this[M] && this[u] === "r+" && e && e.code === "ENOENT" ? (this[u] = "w", this[b]()) : e ? this[g](e) : (this[c] = t, this.emit("open", t), this[j] || this[d]());
		}
		end(e, t) {
			return e && this.write(e, t), this[s] = !0, !this[j] && !this[C].length && typeof this[c] == "number" && this[y](null, 0), this;
		}
		write(e, t) {
			return typeof e == "string" && (e = Buffer.from(e, t)), this[s] ? (this.emit("error", /* @__PURE__ */ Error("write() after end()")), !1) : this[c] === null || this[j] || this[C].length ? (this[C].push(e), this[h] = !0, !1) : (this[j] = !0, this[A](e), !0);
		}
		[A](e) {
			r.write(this[c], e, 0, e.length, this[S], (e, t) => this[y](e, t));
		}
		[y](e, t) {
			e ? this[g](e) : (this[S] !== null && (this[S] += t), this[C].length ? this[d]() : (this[j] = !1, this[s] && !this[l] ? (this[l] = !0, this[o](), this.emit("finish")) : this[h] && (this[h] = !1, this.emit("drain"))));
		}
		[d]() {
			if (this[C].length === 0) this[s] && this[y](null, 0);
			else if (this[C].length === 1) this[A](this[C].pop());
			else {
				let e = this[C];
				this[C] = [], i(this[c], e, this[S], (e, t) => this[y](e, t));
			}
		}
		[o]() {
			if (this[a] && typeof this[c] == "number") {
				let e = this[c];
				this[c] = null, r.close(e, (e) => e ? this.emit("error", e) : this.emit("close"));
			}
		}
	}, L = class extends I {
		[b]() {
			let e;
			if (this[M] && this[u] === "r+") try {
				e = r.openSync(this[x], this[u], this[m]);
			} catch (e) {
				if (e.code === "ENOENT") return this[u] = "w", this[b]();
				throw e;
			}
			else e = r.openSync(this[x], this[u], this[m]);
			this[_](null, e);
		}
		[o]() {
			if (this[a] && typeof this[c] == "number") {
				let e = this[c];
				this[c] = null, r.closeSync(e), this.emit("close");
			}
		}
		[A](e) {
			let t = !0;
			try {
				this[y](null, r.writeSync(this[c], e, 0, e.length, this[S])), t = !1;
			} finally {
				if (t) try {
					this[o]();
				} catch {}
			}
		}
	};
	e.ReadStream = P, e.ReadStreamSync = F, e.WriteStream = I, e.WriteStreamSync = L;
})), Ts = /* @__PURE__ */ w(((e, t) => {
	var n = k("fs/promises"), r = ws(), i = zo(), a = xs(), o = Ko();
	t.exports = c;
	var s = 64 * 1024 * 1024;
	async function c(e, t, r = {}) {
		let { size: a } = r, { stat: c, cpath: u, sri: d } = await p(e, t, async (e, t) => ({
			stat: a ? { size: a } : await n.stat(e),
			cpath: e,
			sri: t
		}));
		if (c.size > s) return l(u, c.size, d, new o()).concat();
		let f = await n.readFile(u, { encoding: null });
		if (c.size !== f.length) throw m(c.size, f.length);
		if (!i.checkData(f, d)) throw h(d, u);
		return f;
	}
	var l = (e, t, n, a) => (a.push(new r.ReadStream(e, {
		size: t,
		readSize: s
	}), i.integrityStream({
		integrity: n,
		size: t
	})), a);
	t.exports.stream = u, t.exports.readStream = u;
	function u(e, t, r = {}) {
		let { size: i } = r, a = new o();
		return Promise.resolve().then(async () => {
			let { stat: r, cpath: o, sri: s } = await p(e, t, async (e, t) => ({
				stat: i ? { size: i } : await n.stat(e),
				cpath: e,
				sri: t
			}));
			return l(o, r.size, s, a);
		}).catch((e) => a.emit("error", e)), a;
	}
	t.exports.copy = d;
	function d(e, t, r) {
		return p(e, t, (e) => n.copyFile(e, r));
	}
	t.exports.hasContent = f;
	async function f(e, t) {
		if (!t) return !1;
		try {
			return await p(e, t, async (e, t) => {
				let r = await n.stat(e);
				return {
					size: r.size,
					sri: t,
					stat: r
				};
			});
		} catch (e) {
			if (e.code === "ENOENT") return !1;
			if (e.code === "EPERM") {
				/* istanbul ignore else */
				if (process.platform !== "win32") throw e;
				return !1;
			}
		}
	}
	async function p(e, t, n) {
		let r = i.parse(t), o = r[r.pickAlgorithm()];
		if (o.length <= 1) return n(a(e, o[0]), o[0]);
		{
			let t = await Promise.all(o.map(async (t) => {
				try {
					return await p(e, t, n);
				} catch (e) {
					return e.code === "ENOENT" ? Object.assign(/* @__PURE__ */ Error("No matching content found for " + r.toString()), { code: "ENOENT" }) : e;
				}
			})), i = t.find((e) => !(e instanceof Error));
			if (i) return i;
			throw t.find((e) => e.code === "ENOENT") || t.find((e) => e instanceof Error);
		}
	}
	function m(e, t) {
		let n = /* @__PURE__ */ Error(`Bad data size: expected inserted data to be ${e} bytes, but got ${t} instead`);
		return n.expected = e, n.found = t, n.code = "EBADSIZE", n;
	}
	function h(e, t) {
		let n = /* @__PURE__ */ Error(`Integrity verification failed for ${e} (${t})`);
		return n.code = "EINTEGRITY", n.sri = e, n.path = t, n;
	}
})), Es = /* @__PURE__ */ w(((e, t) => {
	var n = Wo(), { Minipass: r } = wa(), i = Ko(), a = Ss(), o = Cs(), s = Ts();
	async function c(e, t, n = {}) {
		let { integrity: r, memoize: i, size: c } = n, l = o.get(e, t, n);
		if (l && i !== !1) return {
			metadata: l.entry.metadata,
			data: l.data,
			integrity: l.entry.integrity,
			size: l.entry.size
		};
		let u = await a.find(e, t, n);
		if (!u) throw new a.NotFoundError(e, t);
		let d = await s(e, u.integrity, {
			integrity: r,
			size: c
		});
		return i && o.put(e, u, d, n), {
			data: d,
			metadata: u.metadata,
			size: u.size,
			integrity: u.integrity
		};
	}
	t.exports = c;
	async function l(e, t, n = {}) {
		let { integrity: r, memoize: i, size: a } = n, c = o.get.byDigest(e, t, n);
		if (c && i !== !1) return c;
		let l = await s(e, t, {
			integrity: r,
			size: a
		});
		return i && o.put.byDigest(e, t, l, n), l;
	}
	t.exports.byDigest = l;
	var u = (e) => {
		let t = new r();
		return t.on("newListener", function(t, n) {
			t === "metadata" && n(e.entry.metadata), t === "integrity" && n(e.entry.integrity), t === "size" && n(e.entry.size);
		}), t.end(e.data), t;
	};
	function d(e, t, r = {}) {
		let { memoize: c, size: l } = r, d = o.get(e, t, r);
		if (d && c !== !1) return u(d);
		let f = new i();
		return Promise.resolve().then(async () => {
			let i = await a.find(e, t);
			if (!i) throw new a.NotFoundError(e, t);
			f.emit("metadata", i.metadata), f.emit("integrity", i.integrity), f.emit("size", i.size), f.on("newListener", function(e, t) {
				e === "metadata" && t(i.metadata), e === "integrity" && t(i.integrity), e === "size" && t(i.size);
			});
			let u = s.readStream(e, i.integrity, {
				...r,
				size: typeof l == "number" ? l : i.size
			});
			if (c) {
				let t = new n.PassThrough();
				t.on("collect", (t) => o.put(e, i, t, r)), f.unshift(t);
			}
			return f.unshift(u), f;
		}).catch((e) => f.emit("error", e)), f;
	}
	t.exports.stream = d;
	function f(e, t, a = {}) {
		let { memoize: c } = a, l = o.get.byDigest(e, t, a);
		if (l && c !== !1) {
			let e = new r();
			return e.end(l), e;
		} else {
			let r = s.readStream(e, t, a);
			if (!c) return r;
			let l = new n.PassThrough();
			return l.on("collect", (n) => o.put.byDigest(e, t, n, a)), new i(r, l);
		}
	}
	t.exports.stream.byDigest = f;
	function p(e, t, n = {}) {
		let { memoize: r } = n, i = o.get(e, t, n);
		return i && r !== !1 ? Promise.resolve(i.entry) : a.find(e, t);
	}
	t.exports.info = p;
	async function m(e, t, n, r = {}) {
		let i = await a.find(e, t, r);
		if (!i) throw new a.NotFoundError(e, t);
		return await s.copy(e, i.integrity, n, r), {
			metadata: i.metadata,
			size: i.size,
			integrity: i.integrity
		};
	}
	t.exports.copy = m;
	async function h(e, t, n, r = {}) {
		return await s.copy(e, t, n, r), t;
	}
	t.exports.copy.byDigest = h, t.exports.hasContent = s.hasContent;
})), Ds = /* @__PURE__ */ w(((e, t) => {
	var n = k("events"), r = xs(), i = k("fs/promises"), { moveFile: a } = ts(), { Minipass: o } = wa(), s = Ko(), c = Uo(), l = k("path"), u = zo(), { tmpName: d } = ns(), f = ws();
	t.exports = m;
	var p = /* @__PURE__ */ new Map();
	async function m(e, t, n = {}) {
		let { algorithms: r, size: a, integrity: o } = n;
		if (typeof a == "number" && t.length !== a) throw x(a, t.length);
		let s = u.fromData(t, r ? { algorithms: r } : {});
		if (o && !u.checkData(t, o, n)) throw S(o, s);
		for (let r in s) {
			let a = await y(e, n), o = s[r].toString();
			try {
				await i.writeFile(a.target, t, { flag: "wx" }), await b(a, e, o, n);
			} finally {
				a.moved || await i.rm(a.target, {
					recursive: !0,
					force: !0
				});
			}
		}
		return {
			integrity: s,
			size: t.length
		};
	}
	t.exports.stream = g;
	var h = class extends c {
		constructor(e, t) {
			super(), this.opts = t, this.cache = e, this.inputStream = new o(), this.inputStream.on("error", (e) => this.emit("error", e)), this.inputStream.on("drain", () => this.emit("drain")), this.handleContentP = null;
		}
		write(e, t, n) {
			return this.handleContentP || (this.handleContentP = _(this.inputStream, this.cache, this.opts), this.handleContentP.catch((e) => this.emit("error", e))), this.inputStream.write(e, t, n);
		}
		flush(e) {
			this.inputStream.end(() => {
				if (!this.handleContentP) {
					let t = /* @__PURE__ */ Error("Cache input stream was empty");
					return t.code = "ENODATA", Promise.reject(t).catch(e);
				}
				this.handleContentP.then((t) => {
					t.integrity && this.emit("integrity", t.integrity), t.size !== null && this.emit("size", t.size), e();
				}, (t) => e(t));
			});
		}
	};
	function g(e, t = {}) {
		return new h(e, t);
	}
	async function _(e, t, n) {
		let r = await y(t, n);
		try {
			let i = await v(e, t, r.target, n);
			return await b(r, t, i.integrity, n), i;
		} finally {
			r.moved || await i.rm(r.target, {
				recursive: !0,
				force: !0
			});
		}
	}
	async function v(e, t, r, i) {
		let a = new f.WriteStream(r, { flags: "wx" });
		if (i.integrityEmitter) {
			let [t, r] = await Promise.all([
				n.once(i.integrityEmitter, "integrity").then((e) => e[0]),
				n.once(i.integrityEmitter, "size").then((e) => e[0]),
				new s(e, a).promise()
			]);
			return {
				integrity: t,
				size: r
			};
		}
		let o, c, l = u.integrityStream({
			integrity: i.integrity,
			algorithms: i.algorithms,
			size: i.size
		});
		return l.on("integrity", (e) => {
			o = e;
		}), l.on("size", (e) => {
			c = e;
		}), await new s(e, l, a).promise(), {
			integrity: o,
			size: c
		};
	}
	async function y(e, t) {
		let n = d(e, t.tmpPrefix);
		return await i.mkdir(l.dirname(n), { recursive: !0 }), {
			target: n,
			moved: !1
		};
	}
	async function b(e, t, n) {
		let o = r(t, n), s = l.dirname(o);
		return p.has(o) || p.set(o, i.mkdir(s, { recursive: !0 }).then(async () => (await a(e.target, o, { overwrite: !1 }), e.moved = !0, e.moved)).catch((e) => {
			if (!e.message.startsWith("The destination file exists")) throw Object.assign(e, { code: "EEXIST" });
		}).finally(() => {
			p.delete(o);
		})), p.get(o);
	}
	function x(e, t) {
		let n = /* @__PURE__ */ Error(`Bad data size: expected inserted data to be ${e} bytes, but got ${t} instead`);
		return n.expected = e, n.found = t, n.code = "EBADSIZE", n;
	}
	function S(e, t) {
		let n = /* @__PURE__ */ Error(`Integrity check failed:
  Wanted: ${e}
   Found: ${t}`);
		return n.code = "EINTEGRITY", n.expected = e, n.found = t, n;
	}
})), Os = /* @__PURE__ */ w(((e, t) => {
	var n = Ss(), r = Cs(), i = Ds(), a = Uo(), { PassThrough: o } = Wo(), s = Ko(), c = (e) => ({
		algorithms: ["sha512"],
		...e
	});
	t.exports = l;
	async function l(e, t, a, o = {}) {
		let { memoize: s } = o;
		o = c(o);
		let l = await i(e, a, o), u = await n.insert(e, t, l.integrity, {
			...o,
			size: l.size
		});
		return s && r.put(e, u, a, o), l.integrity;
	}
	t.exports.stream = u;
	function u(e, t, l = {}) {
		let { memoize: u } = l;
		l = c(l);
		let d, f, p, m, h = new s();
		if (u) {
			let e = new o().on("collect", (e) => {
				m = e;
			});
			h.push(e);
		}
		let g = i.stream(e, l).on("integrity", (e) => {
			d = e;
		}).on("size", (e) => {
			f = e;
		}).on("error", (e) => {
			p = e;
		});
		return h.push(g), h.push(new a({ async flush() {
			if (!p) {
				let i = await n.insert(e, t, d, {
					...l,
					size: f
				});
				u && m && r.put(e, i, m, l), h.emit("integrity", d), h.emit("size", f);
			}
		} })), h;
	}
})), ks = /* @__PURE__ */ w(((e) => {
	var t = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), n = t((e) => {
		Object.defineProperty(e, "__esModule", { value: !0 }), e.range = e.balanced = void 0, e.balanced = (n, r, i) => {
			let a = n instanceof RegExp ? t(n, i) : n, o = r instanceof RegExp ? t(r, i) : r, s = a !== null && o != null && (0, e.range)(a, o, i);
			return s && {
				start: s[0],
				end: s[1],
				pre: i.slice(0, s[0]),
				body: i.slice(s[0] + a.length, s[1]),
				post: i.slice(s[1] + o.length)
			};
		};
		var t = (e, t) => {
			let n = t.match(e);
			return n ? n[0] : null;
		};
		e.range = (e, t, n) => {
			let r, i, a, o, s, c = n.indexOf(e), l = n.indexOf(t, c + 1), u = c;
			if (c >= 0 && l > 0) {
				if (e === t) return [c, l];
				for (r = [], a = n.length; u >= 0 && !s;) {
					if (u === c) r.push(u), c = n.indexOf(e, u + 1);
					else if (r.length === 1) {
						let e = r.pop();
						e !== void 0 && (s = [e, l]);
					} else i = r.pop(), i !== void 0 && i < a && (a = i, o = l), l = n.indexOf(t, u + 1);
					u = c < l && c >= 0 ? c : l;
				}
				r.length && o !== void 0 && (s = [a, o]);
			}
			return s;
		};
	}), r = t((e) => {
		Object.defineProperty(e, "__esModule", { value: !0 }), e.EXPANSION_MAX = void 0, e.expand = S;
		var t = n(), r = "\0SLASH" + Math.random() + "\0", i = "\0OPEN" + Math.random() + "\0", a = "\0CLOSE" + Math.random() + "\0", o = "\0COMMA" + Math.random() + "\0", s = "\0PERIOD" + Math.random() + "\0", c = new RegExp(r, "g"), l = new RegExp(i, "g"), u = new RegExp(a, "g"), d = new RegExp(o, "g"), f = new RegExp(s, "g"), p = /\\\\/g, m = /\\{/g, h = /\\}/g, g = /\\,/g, _ = /\\./g;
		e.EXPANSION_MAX = 1e5;
		function v(e) {
			return isNaN(e) ? e.charCodeAt(0) : parseInt(e, 10);
		}
		function y(e) {
			return e.replace(p, r).replace(m, i).replace(h, a).replace(g, o).replace(_, s);
		}
		function b(e) {
			return e.replace(c, "\\").replace(l, "{").replace(u, "}").replace(d, ",").replace(f, ".");
		}
		function x(e) {
			if (!e) return [""];
			let n = [], r = (0, t.balanced)("{", "}", e);
			if (!r) return e.split(",");
			let { pre: i, body: a, post: o } = r, s = i.split(",");
			s[s.length - 1] += "{" + a + "}";
			let c = x(o);
			return o.length && (s[s.length - 1] += c.shift(), s.push.apply(s, c)), n.push.apply(n, s), n;
		}
		function S(t, n = {}) {
			if (!t) return [];
			let { max: r = e.EXPANSION_MAX } = n;
			return t.slice(0, 2) === "{}" && (t = "\\{\\}" + t.slice(2)), D(y(t), r, !0).map(b);
		}
		function C(e) {
			return "{" + e + "}";
		}
		function w(e) {
			return /^-?0\d/.test(e);
		}
		function T(e, t) {
			return e <= t;
		}
		function E(e, t) {
			return e >= t;
		}
		function D(e, n, r) {
			let i = [], o = (0, t.balanced)("{", "}", e);
			if (!o) return [e];
			let s = o.pre, c = o.post.length ? D(o.post, n, !1) : [""];
			if (/\$$/.test(o.pre)) for (let e = 0; e < c.length && e < n; e++) {
				let t = s + "{" + o.body + "}" + c[e];
				i.push(t);
			}
			else {
				let t = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body), l = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body), u = t || l, d = o.body.indexOf(",") >= 0;
				if (!u && !d) return o.post.match(/,(?!,).*\}/) ? (e = o.pre + "{" + o.body + a + o.post, D(e, n, !0)) : [e];
				let f;
				if (u) f = o.body.split(/\.\./);
				else if (f = x(o.body), f.length === 1 && f[0] !== void 0 && (f = D(f[0], n, !1).map(C), f.length === 1)) return c.map((e) => o.pre + f[0] + e);
				let p;
				if (u && f[0] !== void 0 && f[1] !== void 0) {
					let e = v(f[0]), t = v(f[1]), n = Math.max(f[0].length, f[1].length), r = f.length === 3 && f[2] !== void 0 ? Math.abs(v(f[2])) : 1, i = T;
					t < e && (r *= -1, i = E);
					let a = f.some(w);
					p = [];
					for (let o = e; i(o, t); o += r) {
						let e;
						if (l) e = String.fromCharCode(o), e === "\\" && (e = "");
						else if (e = String(o), a) {
							let t = n - e.length;
							if (t > 0) {
								let n = Array(t + 1).join("0");
								e = o < 0 ? "-" + n + e.slice(1) : n + e;
							}
						}
						p.push(e);
					}
				} else {
					p = [];
					for (let e = 0; e < f.length; e++) p.push.apply(p, D(f[e], n, !1));
				}
				for (let e = 0; e < p.length; e++) for (let t = 0; t < c.length && i.length < n; t++) {
					let n = s + p[e] + c[t];
					(!r || u || n) && i.push(n);
				}
			}
			return i;
		}
	}), i = t((e) => {
		Object.defineProperty(e, "__esModule", { value: !0 }), e.assertValidPattern = void 0;
		var t = 1024 * 64;
		e.assertValidPattern = (e) => {
			if (typeof e != "string") throw TypeError("invalid pattern");
			if (e.length > t) throw TypeError("pattern is too long");
		};
	}), a = t((e) => {
		Object.defineProperty(e, "__esModule", { value: !0 }), e.parseClass = void 0;
		var t = {
			"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", !0],
			"[:alpha:]": ["\\p{L}\\p{Nl}", !0],
			"[:ascii:]": ["\\x00-\\x7f", !1],
			"[:blank:]": ["\\p{Zs}\\t", !0],
			"[:cntrl:]": ["\\p{Cc}", !0],
			"[:digit:]": ["\\p{Nd}", !0],
			"[:graph:]": [
				"\\p{Z}\\p{C}",
				!0,
				!0
			],
			"[:lower:]": ["\\p{Ll}", !0],
			"[:print:]": ["\\p{C}", !0],
			"[:punct:]": ["\\p{P}", !0],
			"[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", !0],
			"[:upper:]": ["\\p{Lu}", !0],
			"[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", !0],
			"[:xdigit:]": ["A-Fa-f0-9", !1]
		}, n = (e) => e.replace(/[[\]\\-]/g, "\\$&"), r = (e) => e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), i = (e) => e.join("");
		e.parseClass = (e, a) => {
			let o = a;
			if (e.charAt(o) !== "[") throw Error("not in a brace expression");
			let s = [], c = [], l = o + 1, u = !1, d = !1, f = !1, p = !1, m = o, h = "";
			t: for (; l < e.length;) {
				let r = e.charAt(l);
				if ((r === "!" || r === "^") && l === o + 1) {
					p = !0, l++;
					continue;
				}
				if (r === "]" && u && !f) {
					m = l + 1;
					break;
				}
				if (u = !0, r === "\\" && !f) {
					f = !0, l++;
					continue;
				}
				if (r === "[" && !f) {
					for (let [n, [r, i, a]] of Object.entries(t)) if (e.startsWith(n, l)) {
						if (h) return [
							"$.",
							!1,
							e.length - o,
							!0
						];
						l += n.length, a ? c.push(r) : s.push(r), d ||= i;
						continue t;
					}
				}
				if (f = !1, h) {
					r > h ? s.push(n(h) + "-" + n(r)) : r === h && s.push(n(r)), h = "", l++;
					continue;
				}
				if (e.startsWith("-]", l + 1)) {
					s.push(n(r + "-")), l += 2;
					continue;
				}
				if (e.startsWith("-", l + 1)) {
					h = r, l += 2;
					continue;
				}
				s.push(n(r)), l++;
			}
			if (m < l) return [
				"",
				!1,
				0,
				!1
			];
			if (!s.length && !c.length) return [
				"$.",
				!1,
				e.length - o,
				!0
			];
			if (c.length === 0 && s.length === 1 && /^\\?.$/.test(s[0]) && !p) return [
				r(s[0].length === 2 ? s[0].slice(-1) : s[0]),
				!1,
				m - o,
				!1
			];
			let g = "[" + (p ? "^" : "") + i(s) + "]", _ = "[" + (p ? "" : "^") + i(c) + "]";
			return [
				s.length && c.length ? "(" + g + "|" + _ + ")" : s.length ? g : _,
				d,
				m - o,
				!0
			];
		};
	}), o = t((e) => {
		Object.defineProperty(e, "__esModule", { value: !0 }), e.unescape = void 0, e.unescape = (e, { windowsPathsNoEscape: t = !1, magicalBraces: n = !0 } = {}) => n ? t ? e.replace(/\[([^\/\\])\]/g, "$1") : e.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1") : t ? e.replace(/\[([^\/\\{}])\]/g, "$1") : e.replace(/((?!\\).|^)\[([^\/\\{}])\]/g, "$1$2").replace(/\\([^\/{}])/g, "$1");
	}), s = t((e) => {
		Object.defineProperty(e, "__esModule", { value: !0 }), e.AST = void 0;
		var t = a(), n = o(), r = /* @__PURE__ */ new Set([
			"!",
			"?",
			"+",
			"*",
			"@"
		]), i = (e) => r.has(e), s = "(?!(?:^|/)\\.\\.?(?:$|/))", c = "(?!\\.)", l = /* @__PURE__ */ new Set(["[", "."]), u = /* @__PURE__ */ new Set(["..", "."]), d = /* @__PURE__ */ new Set("().*{}+?[]^$\\!"), f = (e) => e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), p = "[^/]", m = p + "*?", h = p + "+?";
		e.AST = class e {
			type;
			#e;
			#t;
			#n = !1;
			#r = [];
			#i;
			#a;
			#o;
			#s = !1;
			#c;
			#l;
			#u = !1;
			constructor(e, t, n = {}) {
				this.type = e, e && (this.#t = !0), this.#i = t, this.#e = this.#i ? this.#i.#e : this, this.#c = this.#e === this ? n : this.#e.#c, this.#o = this.#e === this ? [] : this.#e.#o, e === "!" && !this.#e.#s && this.#o.push(this), this.#a = this.#i ? this.#i.#r.length : 0;
			}
			get hasMagic() {
				if (this.#t !== void 0) return this.#t;
				for (let e of this.#r) if (typeof e != "string" && (e.type || e.hasMagic)) return this.#t = !0;
				return this.#t;
			}
			toString() {
				return this.#l === void 0 ? this.type ? this.#l = this.type + "(" + this.#r.map((e) => String(e)).join("|") + ")" : this.#l = this.#r.map((e) => String(e)).join("") : this.#l;
			}
			#d() {
				if (this !== this.#e) throw Error("should only call on root");
				if (this.#s) return this;
				this.toString(), this.#s = !0;
				let e;
				for (; e = this.#o.pop();) {
					if (e.type !== "!") continue;
					let t = e, n = t.#i;
					for (; n;) {
						for (let r = t.#a + 1; !n.type && r < n.#r.length; r++) for (let t of e.#r) {
							if (typeof t == "string") throw Error("string part in extglob AST??");
							t.copyIn(n.#r[r]);
						}
						t = n, n = t.#i;
					}
				}
				return this;
			}
			push(...t) {
				for (let n of t) if (n !== "") {
					if (typeof n != "string" && !(n instanceof e && n.#i === this)) throw Error("invalid part: " + n);
					this.#r.push(n);
				}
			}
			toJSON() {
				let e = this.type === null ? this.#r.slice().map((e) => typeof e == "string" ? e : e.toJSON()) : [this.type, ...this.#r.map((e) => e.toJSON())];
				return this.isStart() && !this.type && e.unshift([]), this.isEnd() && (this === this.#e || this.#e.#s && this.#i?.type === "!") && e.push({}), e;
			}
			isStart() {
				if (this.#e === this) return !0;
				if (!this.#i?.isStart()) return !1;
				if (this.#a === 0) return !0;
				let t = this.#i;
				for (let n = 0; n < this.#a; n++) {
					let r = t.#r[n];
					if (!(r instanceof e && r.type === "!")) return !1;
				}
				return !0;
			}
			isEnd() {
				if (this.#e === this || this.#i?.type === "!") return !0;
				if (!this.#i?.isEnd()) return !1;
				if (!this.type) return this.#i?.isEnd();
				let e = this.#i ? this.#i.#r.length : 0;
				return this.#a === e - 1;
			}
			copyIn(e) {
				typeof e == "string" ? this.push(e) : this.push(e.clone(this));
			}
			clone(t) {
				let n = new e(this.type, t);
				for (let e of this.#r) n.copyIn(e);
				return n;
			}
			static #f(t, n, r, a) {
				let o = !1, s = !1, c = -1, l = !1;
				if (n.type === null) {
					let u = r, d = "";
					for (; u < t.length;) {
						let r = t.charAt(u++);
						if (o || r === "\\") {
							o = !o, d += r;
							continue;
						}
						if (s) {
							u === c + 1 ? (r === "^" || r === "!") && (l = !0) : r === "]" && !(u === c + 2 && l) && (s = !1), d += r;
							continue;
						} else if (r === "[") {
							s = !0, c = u, l = !1, d += r;
							continue;
						}
						if (!a.noext && i(r) && t.charAt(u) === "(") {
							n.push(d), d = "";
							let i = new e(r, n);
							u = e.#f(t, i, u, a), n.push(i);
							continue;
						}
						d += r;
					}
					return n.push(d), u;
				}
				let u = r + 1, d = new e(null, n), f = [], p = "";
				for (; u < t.length;) {
					let r = t.charAt(u++);
					if (o || r === "\\") {
						o = !o, p += r;
						continue;
					}
					if (s) {
						u === c + 1 ? (r === "^" || r === "!") && (l = !0) : r === "]" && !(u === c + 2 && l) && (s = !1), p += r;
						continue;
					} else if (r === "[") {
						s = !0, c = u, l = !1, p += r;
						continue;
					}
					if (i(r) && t.charAt(u) === "(") {
						d.push(p), p = "";
						let n = new e(r, d);
						d.push(n), u = e.#f(t, n, u, a);
						continue;
					}
					if (r === "|") {
						d.push(p), p = "", f.push(d), d = new e(null, n);
						continue;
					}
					if (r === ")") return p === "" && n.#r.length === 0 && (n.#u = !0), d.push(p), p = "", n.push(...f, d), u;
					p += r;
				}
				return n.type = null, n.#t = void 0, n.#r = [t.substring(r - 1)], u;
			}
			static fromGlob(t, n = {}) {
				let r = new e(null, void 0, n);
				return e.#f(t, r, 0, n), r;
			}
			toMMPattern() {
				if (this !== this.#e) return this.#e.toMMPattern();
				let e = this.toString(), [t, n, r, i] = this.toRegExpSource();
				if (!(r || this.#t || this.#c.nocase && !this.#c.nocaseMagicOnly && e.toUpperCase() !== e.toLowerCase())) return n;
				let a = (this.#c.nocase ? "i" : "") + (i ? "u" : "");
				return Object.assign(RegExp(`^${t}$`, a), {
					_src: t,
					_glob: e
				});
			}
			get options() {
				return this.#c;
			}
			toRegExpSource(t) {
				let r = t ?? !!this.#c.dot;
				if (this.#e === this && this.#d(), !this.type) {
					let i = this.isStart() && this.isEnd() && !this.#r.some((e) => typeof e != "string"), a = this.#r.map((n) => {
						let [r, a, o, s] = typeof n == "string" ? e.#m(n, this.#t, i) : n.toRegExpSource(t);
						return this.#t = this.#t || o, this.#n = this.#n || s, r;
					}).join(""), o = "";
					if (this.isStart() && typeof this.#r[0] == "string" && !(this.#r.length === 1 && u.has(this.#r[0]))) {
						let e = l, n = r && e.has(a.charAt(0)) || a.startsWith("\\.") && e.has(a.charAt(2)) || a.startsWith("\\.\\.") && e.has(a.charAt(4)), i = !r && !t && e.has(a.charAt(0));
						o = n ? s : i ? c : "";
					}
					let d = "";
					return this.isEnd() && this.#e.#s && this.#i?.type === "!" && (d = "(?:$|\\/)"), [
						o + a + d,
						(0, n.unescape)(a),
						this.#t = !!this.#t,
						this.#n
					];
				}
				let i = this.type === "*" || this.type === "+", a = this.type === "!" ? "(?:(?!(?:" : "(?:", o = this.#p(r);
				if (this.isStart() && this.isEnd() && !o && this.type !== "!") {
					let e = this.toString();
					return this.#r = [e], this.type = null, this.#t = void 0, [
						e,
						(0, n.unescape)(this.toString()),
						!1,
						!1
					];
				}
				let d = !i || t || r || !c ? "" : this.#p(!0);
				d === o && (d = ""), d && (o = `(?:${o})(?:${d})*?`);
				let f = "";
				if (this.type === "!" && this.#u) f = (this.isStart() && !r ? c : "") + h;
				else {
					let e = this.type === "!" ? "))" + (this.isStart() && !r && !t ? c : "") + m + ")" : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && d ? ")" : this.type === "*" && d ? ")?" : `)${this.type}`;
					f = a + o + e;
				}
				return [
					f,
					(0, n.unescape)(o),
					this.#t = !!this.#t,
					this.#n
				];
			}
			#p(e) {
				return this.#r.map((t) => {
					if (typeof t == "string") throw Error("string type in extglob ast??");
					let [n, r, i, a] = t.toRegExpSource(e);
					return this.#n = this.#n || a, n;
				}).filter((e) => !(this.isStart() && this.isEnd()) || !!e).join("|");
			}
			static #m(e, r, i = !1) {
				let a = !1, o = "", s = !1, c = !1;
				for (let n = 0; n < e.length; n++) {
					let l = e.charAt(n);
					if (a) {
						a = !1, o += (d.has(l) ? "\\" : "") + l;
						continue;
					}
					if (l === "*") {
						if (c) continue;
						c = !0, o += i && /^[*]+$/.test(e) ? h : m, r = !0;
						continue;
					} else c = !1;
					if (l === "\\") {
						n === e.length - 1 ? o += "\\\\" : a = !0;
						continue;
					}
					if (l === "[") {
						let [i, a, c, l] = (0, t.parseClass)(e, n);
						if (c) {
							o += i, s ||= a, n += c - 1, r ||= l;
							continue;
						}
					}
					if (l === "?") {
						o += p, r = !0;
						continue;
					}
					o += f(l);
				}
				return [
					o,
					(0, n.unescape)(e),
					!!r,
					s
				];
			}
		};
	}), c = t((e) => {
		Object.defineProperty(e, "__esModule", { value: !0 }), e.escape = void 0, e.escape = (e, { windowsPathsNoEscape: t = !1, magicalBraces: n = !1 } = {}) => n ? t ? e.replace(/[?*()[\]{}]/g, "[$&]") : e.replace(/[?*()[\]\\{}]/g, "\\$&") : t ? e.replace(/[?*()[\]]/g, "[$&]") : e.replace(/[?*()[\]\\]/g, "\\$&");
	}), l = t((e) => {
		Object.defineProperty(e, "__esModule", { value: !0 }), e.unescape = e.escape = e.AST = e.Minimatch = e.match = e.makeRe = e.braceExpand = e.defaults = e.filter = e.GLOBSTAR = e.sep = e.minimatch = void 0;
		var t = r(), n = i(), a = s(), l = c(), u = o();
		e.minimatch = (e, t, r = {}) => ((0, n.assertValidPattern)(t), !r.nocomment && t.charAt(0) === "#" ? !1 : new z(t, r).match(e));
		var d = /^\*+([^+@!?\*\[\(]*)$/, f = (e) => (t) => !t.startsWith(".") && t.endsWith(e), p = (e) => (t) => t.endsWith(e), m = (e) => (e = e.toLowerCase(), (t) => !t.startsWith(".") && t.toLowerCase().endsWith(e)), h = (e) => (e = e.toLowerCase(), (t) => t.toLowerCase().endsWith(e)), g = /^\*+\.\*+$/, _ = (e) => !e.startsWith(".") && e.includes("."), v = (e) => e !== "." && e !== ".." && e.includes("."), y = /^\.\*+$/, b = (e) => e !== "." && e !== ".." && e.startsWith("."), x = /^\*+$/, S = (e) => e.length !== 0 && !e.startsWith("."), C = (e) => e.length !== 0 && e !== "." && e !== "..", w = /^\?+([^+@!?\*\[\(]*)?$/, T = ([e, t = ""]) => {
			let n = k([e]);
			return t ? (t = t.toLowerCase(), (e) => n(e) && e.toLowerCase().endsWith(t)) : n;
		}, E = ([e, t = ""]) => {
			let n = A([e]);
			return t ? (t = t.toLowerCase(), (e) => n(e) && e.toLowerCase().endsWith(t)) : n;
		}, D = ([e, t = ""]) => {
			let n = A([e]);
			return t ? (e) => n(e) && e.endsWith(t) : n;
		}, O = ([e, t = ""]) => {
			let n = k([e]);
			return t ? (e) => n(e) && e.endsWith(t) : n;
		}, k = ([e]) => {
			let t = e.length;
			return (e) => e.length === t && !e.startsWith(".");
		}, A = ([e]) => {
			let t = e.length;
			return (e) => e.length === t && e !== "." && e !== "..";
		}, j = typeof process == "object" && process ? typeof process.env == "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix", M = {
			win32: { sep: "\\" },
			posix: { sep: "/" }
		};
		e.sep = j === "win32" ? M.win32.sep : M.posix.sep, e.minimatch.sep = e.sep, e.GLOBSTAR = Symbol("globstar **"), e.minimatch.GLOBSTAR = e.GLOBSTAR;
		var N = "[^/]*?", P = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?", F = "(?:(?!(?:\\/|^)\\.).)*?";
		e.filter = (t, n = {}) => (r) => (0, e.minimatch)(r, t, n), e.minimatch.filter = e.filter;
		var I = (e, t = {}) => Object.assign({}, e, t);
		e.defaults = (t) => {
			if (!t || typeof t != "object" || !Object.keys(t).length) return e.minimatch;
			let n = e.minimatch;
			return Object.assign((e, r, i = {}) => n(e, r, I(t, i)), {
				Minimatch: class extends n.Minimatch {
					constructor(e, n = {}) {
						super(e, I(t, n));
					}
					static defaults(e) {
						return n.defaults(I(t, e)).Minimatch;
					}
				},
				AST: class extends n.AST {
					constructor(e, n, r = {}) {
						super(e, n, I(t, r));
					}
					static fromGlob(e, r = {}) {
						return n.AST.fromGlob(e, I(t, r));
					}
				},
				unescape: (e, r = {}) => n.unescape(e, I(t, r)),
				escape: (e, r = {}) => n.escape(e, I(t, r)),
				filter: (e, r = {}) => n.filter(e, I(t, r)),
				defaults: (e) => n.defaults(I(t, e)),
				makeRe: (e, r = {}) => n.makeRe(e, I(t, r)),
				braceExpand: (e, r = {}) => n.braceExpand(e, I(t, r)),
				match: (e, r, i = {}) => n.match(e, r, I(t, i)),
				sep: n.sep,
				GLOBSTAR: e.GLOBSTAR
			});
		}, e.minimatch.defaults = e.defaults, e.braceExpand = (e, r = {}) => ((0, n.assertValidPattern)(e), r.nobrace || !/\{(?:(?!\{).)*\}/.test(e) ? [e] : (0, t.expand)(e, { max: r.braceExpandMax })), e.minimatch.braceExpand = e.braceExpand, e.makeRe = (e, t = {}) => new z(e, t).makeRe(), e.minimatch.makeRe = e.makeRe, e.match = (e, t, n = {}) => {
			let r = new z(t, n);
			return e = e.filter((e) => r.match(e)), r.options.nonull && !e.length && e.push(t), e;
		}, e.minimatch.match = e.match;
		var L = /[?*]|[+@!]\(.*?\)|\[|\]/, R = (e) => e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), z = class {
			options;
			set;
			pattern;
			windowsPathsNoEscape;
			nonegate;
			negate;
			comment;
			empty;
			preserveMultipleSlashes;
			partial;
			globSet;
			globParts;
			nocase;
			isWindows;
			platform;
			windowsNoMagicRoot;
			regexp;
			constructor(e, t = {}) {
				(0, n.assertValidPattern)(e), t ||= {}, this.options = t, this.pattern = e, this.platform = t.platform || j, this.isWindows = this.platform === "win32", this.windowsPathsNoEscape = !!t.windowsPathsNoEscape || t.allowWindowsEscape === !1, this.windowsPathsNoEscape && (this.pattern = this.pattern.replace(/\\/g, "/")), this.preserveMultipleSlashes = !!t.preserveMultipleSlashes, this.regexp = null, this.negate = !1, this.nonegate = !!t.nonegate, this.comment = !1, this.empty = !1, this.partial = !!t.partial, this.nocase = !!this.options.nocase, this.windowsNoMagicRoot = t.windowsNoMagicRoot === void 0 ? !!(this.isWindows && this.nocase) : t.windowsNoMagicRoot, this.globSet = [], this.globParts = [], this.set = [], this.make();
			}
			hasMagic() {
				if (this.options.magicalBraces && this.set.length > 1) return !0;
				for (let e of this.set) for (let t of e) if (typeof t != "string") return !0;
				return !1;
			}
			debug(...e) {}
			make() {
				let e = this.pattern, t = this.options;
				if (!t.nocomment && e.charAt(0) === "#") {
					this.comment = !0;
					return;
				}
				if (!e) {
					this.empty = !0;
					return;
				}
				this.parseNegate(), this.globSet = [...new Set(this.braceExpand())], t.debug && (this.debug = (...e) => console.error(...e)), this.debug(this.pattern, this.globSet);
				let n = this.globSet.map((e) => this.slashSplit(e));
				this.globParts = this.preprocess(n), this.debug(this.pattern, this.globParts);
				let r = this.globParts.map((e, t, n) => {
					if (this.isWindows && this.windowsNoMagicRoot) {
						let t = e[0] === "" && e[1] === "" && (e[2] === "?" || !L.test(e[2])) && !L.test(e[3]), n = /^[a-z]:/i.test(e[0]);
						if (t) return [...e.slice(0, 4), ...e.slice(4).map((e) => this.parse(e))];
						if (n) return [e[0], ...e.slice(1).map((e) => this.parse(e))];
					}
					return e.map((e) => this.parse(e));
				});
				if (this.debug(this.pattern, r), this.set = r.filter((e) => e.indexOf(!1) === -1), this.isWindows) for (let e = 0; e < this.set.length; e++) {
					let t = this.set[e];
					t[0] === "" && t[1] === "" && this.globParts[e][2] === "?" && typeof t[3] == "string" && /^[a-z]:$/i.test(t[3]) && (t[2] = "?");
				}
				this.debug(this.pattern, this.set);
			}
			preprocess(e) {
				if (this.options.noglobstar) for (let t = 0; t < e.length; t++) for (let n = 0; n < e[t].length; n++) e[t][n] === "**" && (e[t][n] = "*");
				let { optimizationLevel: t = 1 } = this.options;
				return t >= 2 ? (e = this.firstPhasePreProcess(e), e = this.secondPhasePreProcess(e)) : e = t >= 1 ? this.levelOneOptimize(e) : this.adjascentGlobstarOptimize(e), e;
			}
			adjascentGlobstarOptimize(e) {
				return e.map((e) => {
					let t = -1;
					for (; (t = e.indexOf("**", t + 1)) !== -1;) {
						let n = t;
						for (; e[n + 1] === "**";) n++;
						n !== t && e.splice(t, n - t);
					}
					return e;
				});
			}
			levelOneOptimize(e) {
				return e.map((e) => (e = e.reduce((e, t) => {
					let n = e[e.length - 1];
					return t === "**" && n === "**" ? e : t === ".." && n && n !== ".." && n !== "." && n !== "**" ? (e.pop(), e) : (e.push(t), e);
				}, []), e.length === 0 ? [""] : e));
			}
			levelTwoFileOptimize(e) {
				Array.isArray(e) || (e = this.slashSplit(e));
				let t = !1;
				do {
					if (t = !1, !this.preserveMultipleSlashes) {
						for (let n = 1; n < e.length - 1; n++) {
							let r = e[n];
							n === 1 && r === "" && e[0] === "" || (r === "." || r === "") && (t = !0, e.splice(n, 1), n--);
						}
						e[0] === "." && e.length === 2 && (e[1] === "." || e[1] === "") && (t = !0, e.pop());
					}
					let n = 0;
					for (; (n = e.indexOf("..", n + 1)) !== -1;) {
						let r = e[n - 1];
						r && r !== "." && r !== ".." && r !== "**" && (t = !0, e.splice(n - 1, 2), n -= 2);
					}
				} while (t);
				return e.length === 0 ? [""] : e;
			}
			firstPhasePreProcess(e) {
				let t = !1;
				do {
					t = !1;
					for (let n of e) {
						let r = -1;
						for (; (r = n.indexOf("**", r + 1)) !== -1;) {
							let i = r;
							for (; n[i + 1] === "**";) i++;
							i > r && n.splice(r + 1, i - r);
							let a = n[r + 1], o = n[r + 2], s = n[r + 3];
							if (a !== ".." || !o || o === "." || o === ".." || !s || s === "." || s === "..") continue;
							t = !0, n.splice(r, 1);
							let c = n.slice(0);
							c[r] = "**", e.push(c), r--;
						}
						if (!this.preserveMultipleSlashes) {
							for (let e = 1; e < n.length - 1; e++) {
								let r = n[e];
								e === 1 && r === "" && n[0] === "" || (r === "." || r === "") && (t = !0, n.splice(e, 1), e--);
							}
							n[0] === "." && n.length === 2 && (n[1] === "." || n[1] === "") && (t = !0, n.pop());
						}
						let i = 0;
						for (; (i = n.indexOf("..", i + 1)) !== -1;) {
							let e = n[i - 1];
							if (e && e !== "." && e !== ".." && e !== "**") {
								t = !0;
								let e = i === 1 && n[i + 1] === "**" ? ["."] : [];
								n.splice(i - 1, 2, ...e), n.length === 0 && n.push(""), i -= 2;
							}
						}
					}
				} while (t);
				return e;
			}
			secondPhasePreProcess(e) {
				for (let t = 0; t < e.length - 1; t++) for (let n = t + 1; n < e.length; n++) {
					let r = this.partsMatch(e[t], e[n], !this.preserveMultipleSlashes);
					if (r) {
						e[t] = [], e[n] = r;
						break;
					}
				}
				return e.filter((e) => e.length);
			}
			partsMatch(e, t, n = !1) {
				let r = 0, i = 0, a = [], o = "";
				for (; r < e.length && i < t.length;) if (e[r] === t[i]) a.push(o === "b" ? t[i] : e[r]), r++, i++;
				else if (n && e[r] === "**" && t[i] === e[r + 1]) a.push(e[r]), r++;
				else if (n && t[i] === "**" && e[r] === t[i + 1]) a.push(t[i]), i++;
				else if (e[r] === "*" && t[i] && (this.options.dot || !t[i].startsWith(".")) && t[i] !== "**") {
					if (o === "b") return !1;
					o = "a", a.push(e[r]), r++, i++;
				} else if (t[i] === "*" && e[r] && (this.options.dot || !e[r].startsWith(".")) && e[r] !== "**") {
					if (o === "a") return !1;
					o = "b", a.push(t[i]), r++, i++;
				} else return !1;
				return e.length === t.length && a;
			}
			parseNegate() {
				if (this.nonegate) return;
				let e = this.pattern, t = !1, n = 0;
				for (let r = 0; r < e.length && e.charAt(r) === "!"; r++) t = !t, n++;
				n && (this.pattern = e.slice(n)), this.negate = t;
			}
			matchOne(t, n, r = !1) {
				let i = this.options;
				if (this.isWindows) {
					let e = typeof t[0] == "string" && /^[a-z]:$/i.test(t[0]), r = !e && t[0] === "" && t[1] === "" && t[2] === "?" && /^[a-z]:$/i.test(t[3]), i = typeof n[0] == "string" && /^[a-z]:$/i.test(n[0]), a = !i && n[0] === "" && n[1] === "" && n[2] === "?" && typeof n[3] == "string" && /^[a-z]:$/i.test(n[3]), o = r ? 3 : e ? 0 : void 0, s = a ? 3 : i ? 0 : void 0;
					if (typeof o == "number" && typeof s == "number") {
						let [e, r] = [t[o], n[s]];
						e.toLowerCase() === r.toLowerCase() && (n[s] = e, s > o ? n = n.slice(s) : o > s && (t = t.slice(o)));
					}
				}
				let { optimizationLevel: a = 1 } = this.options;
				a >= 2 && (t = this.levelTwoFileOptimize(t)), this.debug("matchOne", this, {
					file: t,
					pattern: n
				}), this.debug("matchOne", t.length, n.length);
				for (var o = 0, s = 0, c = t.length, l = n.length; o < c && s < l; o++, s++) {
					this.debug("matchOne loop");
					var u = n[s], d = t[o];
					if (this.debug(n, u, d), u === !1) return !1;
					if (u === e.GLOBSTAR) {
						this.debug("GLOBSTAR", [
							n,
							u,
							d
						]);
						var f = o, p = s + 1;
						if (p === l) {
							for (this.debug("** at the end"); o < c; o++) if (t[o] === "." || t[o] === ".." || !i.dot && t[o].charAt(0) === ".") return !1;
							return !0;
						}
						for (; f < c;) {
							var m = t[f];
							if (this.debug("\nglobstar while", t, f, n, p, m), this.matchOne(t.slice(f), n.slice(p), r)) return this.debug("globstar found match!", f, c, m), !0;
							if (m === "." || m === ".." || !i.dot && m.charAt(0) === ".") {
								this.debug("dot detected!", t, f, n, p);
								break;
							}
							this.debug("globstar swallow a segment, and continue"), f++;
						}
						return !!(r && (this.debug("\n>>> no match, partial?", t, f, n, p), f === c));
					}
					let a;
					if (typeof u == "string" ? (a = d === u, this.debug("string match", u, d, a)) : (a = u.test(d), this.debug("pattern match", u, d, a)), !a) return !1;
				}
				if (o === c && s === l) return !0;
				if (o === c) return r;
				if (s === l) return o === c - 1 && t[o] === "";
				throw Error("wtf?");
			}
			braceExpand() {
				return (0, e.braceExpand)(this.pattern, this.options);
			}
			parse(t) {
				(0, n.assertValidPattern)(t);
				let r = this.options;
				if (t === "**") return e.GLOBSTAR;
				if (t === "") return "";
				let i, o = null;
				(i = t.match(x)) ? o = r.dot ? C : S : (i = t.match(d)) ? o = (r.nocase ? r.dot ? h : m : r.dot ? p : f)(i[1]) : (i = t.match(w)) ? o = (r.nocase ? r.dot ? E : T : r.dot ? D : O)(i) : (i = t.match(g)) ? o = r.dot ? v : _ : (i = t.match(y)) && (o = b);
				let s = a.AST.fromGlob(t, this.options).toMMPattern();
				return o && typeof s == "object" && Reflect.defineProperty(s, "test", { value: o }), s;
			}
			makeRe() {
				if (this.regexp || this.regexp === !1) return this.regexp;
				let t = this.set;
				if (!t.length) return this.regexp = !1, this.regexp;
				let n = this.options, r = n.noglobstar ? N : n.dot ? P : F, i = new Set(n.nocase ? ["i"] : []), a = t.map((t) => {
					let n = t.map((t) => {
						if (t instanceof RegExp) for (let e of t.flags.split("")) i.add(e);
						return typeof t == "string" ? R(t) : t === e.GLOBSTAR ? e.GLOBSTAR : t._src;
					});
					n.forEach((t, i) => {
						let a = n[i + 1], o = n[i - 1];
						t !== e.GLOBSTAR || o === e.GLOBSTAR || (o === void 0 ? a !== void 0 && a !== e.GLOBSTAR ? n[i + 1] = "(?:\\/|" + r + "\\/)?" + a : n[i] = r : a === void 0 ? n[i - 1] = o + "(?:\\/|\\/" + r + ")?" : a !== e.GLOBSTAR && (n[i - 1] = o + "(?:\\/|\\/" + r + "\\/)" + a, n[i + 1] = e.GLOBSTAR));
					});
					let a = n.filter((t) => t !== e.GLOBSTAR);
					if (this.partial && a.length >= 1) {
						let e = [];
						for (let t = 1; t <= a.length; t++) e.push(a.slice(0, t).join("/"));
						return "(?:" + e.join("|") + ")";
					}
					return a.join("/");
				}).join("|"), [o, s] = t.length > 1 ? ["(?:", ")"] : ["", ""];
				a = "^" + o + a + s + "$", this.partial && (a = "^(?:\\/|" + o + a.slice(1, -1) + s + ")$"), this.negate && (a = "^(?!" + a + ").+$");
				try {
					this.regexp = new RegExp(a, [...i].join(""));
				} catch {
					this.regexp = !1;
				}
				return this.regexp;
			}
			slashSplit(e) {
				return this.preserveMultipleSlashes ? e.split("/") : this.isWindows && /^\/\/[^\/]+/.test(e) ? ["", ...e.split(/\/+/)] : e.split(/\/+/);
			}
			match(e, t = this.partial) {
				if (this.debug("match", e, this.pattern), this.comment) return !1;
				if (this.empty) return e === "";
				if (e === "/" && t) return !0;
				let n = this.options;
				this.isWindows && (e = e.split("\\").join("/"));
				let r = this.slashSplit(e);
				this.debug(this.pattern, "split", r);
				let i = this.set;
				this.debug(this.pattern, "set", i);
				let a = r[r.length - 1];
				if (!a) for (let e = r.length - 2; !a && e >= 0; e--) a = r[e];
				for (let e = 0; e < i.length; e++) {
					let o = i[e], s = r;
					if (n.matchBase && o.length === 1 && (s = [a]), this.matchOne(s, o, t)) return n.flipNegate ? !0 : !this.negate;
				}
				return n.flipNegate ? !1 : this.negate;
			}
			static defaults(t) {
				return e.minimatch.defaults(t).Minimatch;
			}
		};
		e.Minimatch = z;
		var B = s();
		Object.defineProperty(e, "AST", {
			enumerable: !0,
			get: function() {
				return B.AST;
			}
		});
		var V = c();
		Object.defineProperty(e, "escape", {
			enumerable: !0,
			get: function() {
				return V.escape;
			}
		});
		var H = o();
		Object.defineProperty(e, "unescape", {
			enumerable: !0,
			get: function() {
				return H.unescape;
			}
		}), e.minimatch.AST = a.AST, e.minimatch.Minimatch = z, e.minimatch.escape = l.escape, e.minimatch.unescape = u.unescape;
	}), u = t((e) => {
		Object.defineProperty(e, "__esModule", { value: !0 }), e.LRUCache = void 0;
		var t = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date, n = /* @__PURE__ */ new Set(), r = typeof process == "object" && process ? process : {}, i = (e, t, n, i) => {
			typeof r.emitWarning == "function" ? r.emitWarning(e, t, n, i) : console.error(`[${n}] ${t}: ${e}`);
		}, a = globalThis.AbortController, o = globalThis.AbortSignal;
		if (typeof a > "u") {
			o = class {
				onabort;
				_onabort = [];
				reason;
				aborted = !1;
				addEventListener(e, t) {
					this._onabort.push(t);
				}
			}, a = class {
				constructor() {
					t();
				}
				signal = new o();
				abort(e) {
					if (!this.signal.aborted) {
						this.signal.reason = e, this.signal.aborted = !0;
						for (let t of this.signal._onabort) t(e);
						this.signal.onabort?.(e);
					}
				}
			};
			let e = r.env?.LRU_CACHE_IGNORE_AC_WARNING !== "1", t = () => {
				e && (e = !1, i("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", "NO_ABORT_CONTROLLER", "ENOTSUP", t));
			};
		}
		var s = (e) => !n.has(e), c = (e) => e && e === Math.floor(e) && e > 0 && isFinite(e), l = (e) => c(e) ? e <= 2 ** 8 ? Uint8Array : e <= 2 ** 16 ? Uint16Array : e <= 2 ** 32 ? Uint32Array : e <= 2 ** 53 - 1 ? u : null : null, u = class extends Array {
			constructor(e) {
				super(e), this.fill(0);
			}
		}, d = class e {
			heap;
			length;
			static #e = !1;
			static create(t) {
				let n = l(t);
				if (!n) return [];
				e.#e = !0;
				let r = new e(t, n);
				return e.#e = !1, r;
			}
			constructor(t, n) {
				if (!e.#e) throw TypeError("instantiate Stack using Stack.create(n)");
				this.heap = new n(t), this.length = 0;
			}
			push(e) {
				this.heap[this.length++] = e;
			}
			pop() {
				return this.heap[--this.length];
			}
		};
		e.LRUCache = class e {
			#e;
			#t;
			#n;
			#r;
			#i;
			#a;
			#o;
			#s;
			get perf() {
				return this.#s;
			}
			ttl;
			ttlResolution;
			ttlAutopurge;
			updateAgeOnGet;
			updateAgeOnHas;
			allowStale;
			noDisposeOnSet;
			noUpdateTTL;
			maxEntrySize;
			sizeCalculation;
			noDeleteOnFetchRejection;
			noDeleteOnStaleGet;
			allowStaleOnFetchAbort;
			allowStaleOnFetchRejection;
			ignoreFetchAbort;
			#c;
			#l;
			#u;
			#d;
			#f;
			#p;
			#m;
			#h;
			#g;
			#_;
			#v;
			#y;
			#b;
			#x;
			#S;
			#C;
			#w;
			#T;
			#E;
			static unsafeExposeInternals(e) {
				return {
					starts: e.#b,
					ttls: e.#x,
					autopurgeTimers: e.#S,
					sizes: e.#y,
					keyMap: e.#u,
					keyList: e.#d,
					valList: e.#f,
					next: e.#p,
					prev: e.#m,
					get head() {
						return e.#h;
					},
					get tail() {
						return e.#g;
					},
					free: e.#_,
					isBackgroundFetch: (t) => e.#V(t),
					backgroundFetch: (t, n, r, i) => e.#B(t, n, r, i),
					moveToTail: (t) => e.#U(t),
					indexes: (t) => e.#I(t),
					rindexes: (t) => e.#L(t),
					isStale: (t) => e.#j(t)
				};
			}
			get max() {
				return this.#e;
			}
			get maxSize() {
				return this.#t;
			}
			get calculatedSize() {
				return this.#l;
			}
			get size() {
				return this.#c;
			}
			get fetchMethod() {
				return this.#a;
			}
			get memoMethod() {
				return this.#o;
			}
			get dispose() {
				return this.#n;
			}
			get onInsert() {
				return this.#r;
			}
			get disposeAfter() {
				return this.#i;
			}
			constructor(r) {
				let { max: a = 0, ttl: o, ttlResolution: u = 1, ttlAutopurge: f, updateAgeOnGet: p, updateAgeOnHas: m, allowStale: h, dispose: g, onInsert: _, disposeAfter: v, noDisposeOnSet: y, noUpdateTTL: b, maxSize: x = 0, maxEntrySize: S = 0, sizeCalculation: C, fetchMethod: w, memoMethod: T, noDeleteOnFetchRejection: E, noDeleteOnStaleGet: D, allowStaleOnFetchRejection: O, allowStaleOnFetchAbort: k, ignoreFetchAbort: A, perf: j } = r;
				if (j !== void 0 && typeof j?.now != "function") throw TypeError("perf option must have a now() method if specified");
				if (this.#s = j ?? t, a !== 0 && !c(a)) throw TypeError("max option must be a nonnegative integer");
				let M = a ? l(a) : Array;
				if (!M) throw Error("invalid max value: " + a);
				if (this.#e = a, this.#t = x, this.maxEntrySize = S || this.#t, this.sizeCalculation = C, this.sizeCalculation) {
					if (!this.#t && !this.maxEntrySize) throw TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
					if (typeof this.sizeCalculation != "function") throw TypeError("sizeCalculation set to non-function");
				}
				if (T !== void 0 && typeof T != "function") throw TypeError("memoMethod must be a function if defined");
				if (this.#o = T, w !== void 0 && typeof w != "function") throw TypeError("fetchMethod must be a function if specified");
				if (this.#a = w, this.#w = !!w, this.#u = /* @__PURE__ */ new Map(), this.#d = Array(a).fill(void 0), this.#f = Array(a).fill(void 0), this.#p = new M(a), this.#m = new M(a), this.#h = 0, this.#g = 0, this.#_ = d.create(a), this.#c = 0, this.#l = 0, typeof g == "function" && (this.#n = g), typeof _ == "function" && (this.#r = _), typeof v == "function" ? (this.#i = v, this.#v = []) : (this.#i = void 0, this.#v = void 0), this.#C = !!this.#n, this.#E = !!this.#r, this.#T = !!this.#i, this.noDisposeOnSet = !!y, this.noUpdateTTL = !!b, this.noDeleteOnFetchRejection = !!E, this.allowStaleOnFetchRejection = !!O, this.allowStaleOnFetchAbort = !!k, this.ignoreFetchAbort = !!A, this.maxEntrySize !== 0) {
					if (this.#t !== 0 && !c(this.#t)) throw TypeError("maxSize must be a positive integer if specified");
					if (!c(this.maxEntrySize)) throw TypeError("maxEntrySize must be a positive integer if specified");
					this.#M();
				}
				if (this.allowStale = !!h, this.noDeleteOnStaleGet = !!D, this.updateAgeOnGet = !!p, this.updateAgeOnHas = !!m, this.ttlResolution = c(u) || u === 0 ? u : 1, this.ttlAutopurge = !!f, this.ttl = o || 0, this.ttl) {
					if (!c(this.ttl)) throw TypeError("ttl must be a positive integer if specified");
					this.#D();
				}
				if (this.#e === 0 && this.ttl === 0 && this.#t === 0) throw TypeError("At least one of max, maxSize, or ttl is required");
				if (!this.ttlAutopurge && !this.#e && !this.#t) {
					let t = "LRU_CACHE_UNBOUNDED";
					s(t) && (n.add(t), i("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", t, e));
				}
			}
			getRemainingTTL(e) {
				return this.#u.has(e) ? Infinity : 0;
			}
			#D() {
				let e = new u(this.#e), t = new u(this.#e);
				this.#x = e, this.#b = t;
				let n = this.ttlAutopurge ? Array(this.#e) : void 0;
				this.#S = n, this.#A = (r, i, a = this.#s.now()) => {
					if (t[r] = i === 0 ? 0 : a, e[r] = i, n?.[r] && (clearTimeout(n[r]), n[r] = void 0), i !== 0 && n) {
						let e = setTimeout(() => {
							this.#j(r) && this.#W(this.#d[r], "expire");
						}, i + 1);
						e.unref && e.unref(), n[r] = e;
					}
				}, this.#O = (n) => {
					t[n] = e[n] === 0 ? 0 : this.#s.now();
				}, this.#k = (n, a) => {
					if (e[a]) {
						let o = e[a], s = t[a];
						if (!o || !s) return;
						n.ttl = o, n.start = s, n.now = r || i(), n.remainingTTL = o - (n.now - s);
					}
				};
				let r = 0, i = () => {
					let e = this.#s.now();
					if (this.ttlResolution > 0) {
						r = e;
						let t = setTimeout(() => r = 0, this.ttlResolution);
						t.unref && t.unref();
					}
					return e;
				};
				this.getRemainingTTL = (n) => {
					let a = this.#u.get(n);
					if (a === void 0) return 0;
					let o = e[a], s = t[a];
					return !o || !s ? Infinity : o - ((r || i()) - s);
				}, this.#j = (n) => {
					let a = t[n], o = e[n];
					return !!o && !!a && (r || i()) - a > o;
				};
			}
			#O = () => {};
			#k = () => {};
			#A = () => {};
			#j = () => !1;
			#M() {
				let e = new u(this.#e);
				this.#l = 0, this.#y = e, this.#N = (t) => {
					this.#l -= e[t], e[t] = 0;
				}, this.#F = (e, t, n, r) => {
					if (this.#V(t)) return 0;
					if (!c(n)) if (r) {
						if (typeof r != "function") throw TypeError("sizeCalculation must be a function");
						if (n = r(t, e), !c(n)) throw TypeError("sizeCalculation return invalid (expect positive integer)");
					} else throw TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
					return n;
				}, this.#P = (t, n, r) => {
					if (e[t] = n, this.#t) {
						let n = this.#t - e[t];
						for (; this.#l > n;) this.#z(!0);
					}
					this.#l += e[t], r && (r.entrySize = n, r.totalCalculatedSize = this.#l);
				};
			}
			#N = (e) => {};
			#P = (e, t, n) => {};
			#F = (e, t, n, r) => {
				if (n || r) throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
				return 0;
			};
			*#I({ allowStale: e = this.allowStale } = {}) {
				if (this.#c) for (let t = this.#g; !(!this.#R(t) || ((e || !this.#j(t)) && (yield t), t === this.#h));) t = this.#m[t];
			}
			*#L({ allowStale: e = this.allowStale } = {}) {
				if (this.#c) for (let t = this.#h; !(!this.#R(t) || ((e || !this.#j(t)) && (yield t), t === this.#g));) t = this.#p[t];
			}
			#R(e) {
				return e !== void 0 && this.#u.get(this.#d[e]) === e;
			}
			*entries() {
				for (let e of this.#I()) this.#f[e] !== void 0 && this.#d[e] !== void 0 && !this.#V(this.#f[e]) && (yield [this.#d[e], this.#f[e]]);
			}
			*rentries() {
				for (let e of this.#L()) this.#f[e] !== void 0 && this.#d[e] !== void 0 && !this.#V(this.#f[e]) && (yield [this.#d[e], this.#f[e]]);
			}
			*keys() {
				for (let e of this.#I()) {
					let t = this.#d[e];
					t !== void 0 && !this.#V(this.#f[e]) && (yield t);
				}
			}
			*rkeys() {
				for (let e of this.#L()) {
					let t = this.#d[e];
					t !== void 0 && !this.#V(this.#f[e]) && (yield t);
				}
			}
			*values() {
				for (let e of this.#I()) this.#f[e] !== void 0 && !this.#V(this.#f[e]) && (yield this.#f[e]);
			}
			*rvalues() {
				for (let e of this.#L()) this.#f[e] !== void 0 && !this.#V(this.#f[e]) && (yield this.#f[e]);
			}
			[Symbol.iterator]() {
				return this.entries();
			}
			[Symbol.toStringTag] = "LRUCache";
			find(e, t = {}) {
				for (let n of this.#I()) {
					let r = this.#f[n], i = this.#V(r) ? r.__staleWhileFetching : r;
					if (i !== void 0 && e(i, this.#d[n], this)) return this.get(this.#d[n], t);
				}
			}
			forEach(e, t = this) {
				for (let n of this.#I()) {
					let r = this.#f[n], i = this.#V(r) ? r.__staleWhileFetching : r;
					i !== void 0 && e.call(t, i, this.#d[n], this);
				}
			}
			rforEach(e, t = this) {
				for (let n of this.#L()) {
					let r = this.#f[n], i = this.#V(r) ? r.__staleWhileFetching : r;
					i !== void 0 && e.call(t, i, this.#d[n], this);
				}
			}
			purgeStale() {
				let e = !1;
				for (let t of this.#L({ allowStale: !0 })) this.#j(t) && (this.#W(this.#d[t], "expire"), e = !0);
				return e;
			}
			info(e) {
				let t = this.#u.get(e);
				if (t === void 0) return;
				let n = this.#f[t], r = this.#V(n) ? n.__staleWhileFetching : n;
				if (r === void 0) return;
				let i = { value: r };
				if (this.#x && this.#b) {
					let e = this.#x[t], n = this.#b[t];
					e && n && (i.ttl = e - (this.#s.now() - n), i.start = Date.now());
				}
				return this.#y && (i.size = this.#y[t]), i;
			}
			dump() {
				let e = [];
				for (let t of this.#I({ allowStale: !0 })) {
					let n = this.#d[t], r = this.#f[t], i = this.#V(r) ? r.__staleWhileFetching : r;
					if (i === void 0 || n === void 0) continue;
					let a = { value: i };
					if (this.#x && this.#b) {
						a.ttl = this.#x[t];
						let e = this.#s.now() - this.#b[t];
						a.start = Math.floor(Date.now() - e);
					}
					this.#y && (a.size = this.#y[t]), e.unshift([n, a]);
				}
				return e;
			}
			load(e) {
				this.clear();
				for (let [t, n] of e) {
					if (n.start) {
						let e = Date.now() - n.start;
						n.start = this.#s.now() - e;
					}
					this.set(t, n.value, n);
				}
			}
			set(e, t, n = {}) {
				if (t === void 0) return this.delete(e), this;
				let { ttl: r = this.ttl, start: i, noDisposeOnSet: a = this.noDisposeOnSet, sizeCalculation: o = this.sizeCalculation, status: s } = n, { noUpdateTTL: c = this.noUpdateTTL } = n, l = this.#F(e, t, n.size || 0, o);
				if (this.maxEntrySize && l > this.maxEntrySize) return s && (s.set = "miss", s.maxEntrySizeExceeded = !0), this.#W(e, "set"), this;
				let u = this.#c === 0 ? void 0 : this.#u.get(e);
				if (u === void 0) u = this.#c === 0 ? this.#g : this.#_.length === 0 ? this.#c === this.#e ? this.#z(!1) : this.#c : this.#_.pop(), this.#d[u] = e, this.#f[u] = t, this.#u.set(e, u), this.#p[this.#g] = u, this.#m[u] = this.#g, this.#g = u, this.#c++, this.#P(u, l, s), s && (s.set = "add"), c = !1, this.#E && this.#r?.(t, e, "add");
				else {
					this.#U(u);
					let n = this.#f[u];
					if (t !== n) {
						if (this.#w && this.#V(n)) {
							n.__abortController.abort(/* @__PURE__ */ Error("replaced"));
							let { __staleWhileFetching: t } = n;
							t !== void 0 && !a && (this.#C && this.#n?.(t, e, "set"), this.#T && this.#v?.push([
								t,
								e,
								"set"
							]));
						} else a || (this.#C && this.#n?.(n, e, "set"), this.#T && this.#v?.push([
							n,
							e,
							"set"
						]));
						if (this.#N(u), this.#P(u, l, s), this.#f[u] = t, s) {
							s.set = "replace";
							let e = n && this.#V(n) ? n.__staleWhileFetching : n;
							e !== void 0 && (s.oldValue = e);
						}
					} else s && (s.set = "update");
					this.#E && this.onInsert?.(t, e, t === n ? "update" : "replace");
				}
				if (r !== 0 && !this.#x && this.#D(), this.#x && (c || this.#A(u, r, i), s && this.#k(s, u)), !a && this.#T && this.#v) {
					let e = this.#v, t;
					for (; t = e?.shift();) this.#i?.(...t);
				}
				return this;
			}
			pop() {
				try {
					for (; this.#c;) {
						let e = this.#f[this.#h];
						if (this.#z(!0), this.#V(e)) {
							if (e.__staleWhileFetching) return e.__staleWhileFetching;
						} else if (e !== void 0) return e;
					}
				} finally {
					if (this.#T && this.#v) {
						let e = this.#v, t;
						for (; t = e?.shift();) this.#i?.(...t);
					}
				}
			}
			#z(e) {
				let t = this.#h, n = this.#d[t], r = this.#f[t];
				return this.#w && this.#V(r) ? r.__abortController.abort(/* @__PURE__ */ Error("evicted")) : (this.#C || this.#T) && (this.#C && this.#n?.(r, n, "evict"), this.#T && this.#v?.push([
					r,
					n,
					"evict"
				])), this.#N(t), this.#S?.[t] && (clearTimeout(this.#S[t]), this.#S[t] = void 0), e && (this.#d[t] = void 0, this.#f[t] = void 0, this.#_.push(t)), this.#c === 1 ? (this.#h = this.#g = 0, this.#_.length = 0) : this.#h = this.#p[t], this.#u.delete(n), this.#c--, t;
			}
			has(e, t = {}) {
				let { updateAgeOnHas: n = this.updateAgeOnHas, status: r } = t, i = this.#u.get(e);
				if (i !== void 0) {
					let e = this.#f[i];
					if (this.#V(e) && e.__staleWhileFetching === void 0) return !1;
					if (this.#j(i)) r && (r.has = "stale", this.#k(r, i));
					else return n && this.#O(i), r && (r.has = "hit", this.#k(r, i)), !0;
				} else r && (r.has = "miss");
				return !1;
			}
			peek(e, t = {}) {
				let { allowStale: n = this.allowStale } = t, r = this.#u.get(e);
				if (r === void 0 || !n && this.#j(r)) return;
				let i = this.#f[r];
				return this.#V(i) ? i.__staleWhileFetching : i;
			}
			#B(e, t, n, r) {
				let i = t === void 0 ? void 0 : this.#f[t];
				if (this.#V(i)) return i;
				let o = new a(), { signal: s } = n;
				s?.addEventListener("abort", () => o.abort(s.reason), { signal: o.signal });
				let c = {
					signal: o.signal,
					options: n,
					context: r
				}, l = (r, i = !1) => {
					let { aborted: a } = o.signal, s = n.ignoreFetchAbort && r !== void 0, l = n.ignoreFetchAbort || !!(n.allowStaleOnFetchAbort && r !== void 0);
					if (n.status && (a && !i ? (n.status.fetchAborted = !0, n.status.fetchError = o.signal.reason, s && (n.status.fetchAbortIgnored = !0)) : n.status.fetchResolved = !0), a && !s && !i) return d(o.signal.reason, l);
					let u = p, f = this.#f[t];
					return (f === p || s && i && f === void 0) && (r === void 0 ? u.__staleWhileFetching === void 0 ? this.#W(e, "fetch") : this.#f[t] = u.__staleWhileFetching : (n.status && (n.status.fetchUpdated = !0), this.set(e, r, c.options))), r;
				}, u = (e) => (n.status && (n.status.fetchRejected = !0, n.status.fetchError = e), d(e, !1)), d = (r, i) => {
					let { aborted: a } = o.signal, s = a && n.allowStaleOnFetchAbort, c = s || n.allowStaleOnFetchRejection, l = c || n.noDeleteOnFetchRejection, u = p;
					if (this.#f[t] === p && (!l || !i && u.__staleWhileFetching === void 0 ? this.#W(e, "fetch") : s || (this.#f[t] = u.__staleWhileFetching)), c) return n.status && u.__staleWhileFetching !== void 0 && (n.status.returnedStale = !0), u.__staleWhileFetching;
					if (u.__returned === u) throw r;
				}, f = (t, r) => {
					let a = this.#a?.(e, i, c);
					a && a instanceof Promise && a.then((e) => t(e === void 0 ? void 0 : e), r), o.signal.addEventListener("abort", () => {
						(!n.ignoreFetchAbort || n.allowStaleOnFetchAbort) && (t(void 0), n.allowStaleOnFetchAbort && (t = (e) => l(e, !0)));
					});
				};
				n.status && (n.status.fetchDispatched = !0);
				let p = new Promise(f).then(l, u), m = Object.assign(p, {
					__abortController: o,
					__staleWhileFetching: i,
					__returned: void 0
				});
				return t === void 0 ? (this.set(e, m, {
					...c.options,
					status: void 0
				}), t = this.#u.get(e)) : this.#f[t] = m, m;
			}
			#V(e) {
				if (!this.#w) return !1;
				let t = e;
				return !!t && t instanceof Promise && t.hasOwnProperty("__staleWhileFetching") && t.__abortController instanceof a;
			}
			async fetch(e, t = {}) {
				let { allowStale: n = this.allowStale, updateAgeOnGet: r = this.updateAgeOnGet, noDeleteOnStaleGet: i = this.noDeleteOnStaleGet, ttl: a = this.ttl, noDisposeOnSet: o = this.noDisposeOnSet, size: s = 0, sizeCalculation: c = this.sizeCalculation, noUpdateTTL: l = this.noUpdateTTL, noDeleteOnFetchRejection: u = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: d = this.allowStaleOnFetchRejection, ignoreFetchAbort: f = this.ignoreFetchAbort, allowStaleOnFetchAbort: p = this.allowStaleOnFetchAbort, context: m, forceRefresh: h = !1, status: g, signal: _ } = t;
				if (!this.#w) return g && (g.fetch = "get"), this.get(e, {
					allowStale: n,
					updateAgeOnGet: r,
					noDeleteOnStaleGet: i,
					status: g
				});
				let v = {
					allowStale: n,
					updateAgeOnGet: r,
					noDeleteOnStaleGet: i,
					ttl: a,
					noDisposeOnSet: o,
					size: s,
					sizeCalculation: c,
					noUpdateTTL: l,
					noDeleteOnFetchRejection: u,
					allowStaleOnFetchRejection: d,
					allowStaleOnFetchAbort: p,
					ignoreFetchAbort: f,
					status: g,
					signal: _
				}, y = this.#u.get(e);
				if (y === void 0) {
					g && (g.fetch = "miss");
					let t = this.#B(e, y, v, m);
					return t.__returned = t;
				} else {
					let t = this.#f[y];
					if (this.#V(t)) {
						let e = n && t.__staleWhileFetching !== void 0;
						return g && (g.fetch = "inflight", e && (g.returnedStale = !0)), e ? t.__staleWhileFetching : t.__returned = t;
					}
					let i = this.#j(y);
					if (!h && !i) return g && (g.fetch = "hit"), this.#U(y), r && this.#O(y), g && this.#k(g, y), t;
					let a = this.#B(e, y, v, m), o = a.__staleWhileFetching !== void 0 && n;
					return g && (g.fetch = i ? "stale" : "refresh", o && i && (g.returnedStale = !0)), o ? a.__staleWhileFetching : a.__returned = a;
				}
			}
			async forceFetch(e, t = {}) {
				let n = await this.fetch(e, t);
				if (n === void 0) throw Error("fetch() returned undefined");
				return n;
			}
			memo(e, t = {}) {
				let n = this.#o;
				if (!n) throw Error("no memoMethod provided to constructor");
				let { context: r, forceRefresh: i, ...a } = t, o = this.get(e, a);
				if (!i && o !== void 0) return o;
				let s = n(e, o, {
					options: a,
					context: r
				});
				return this.set(e, s, a), s;
			}
			get(e, t = {}) {
				let { allowStale: n = this.allowStale, updateAgeOnGet: r = this.updateAgeOnGet, noDeleteOnStaleGet: i = this.noDeleteOnStaleGet, status: a } = t, o = this.#u.get(e);
				if (o !== void 0) {
					let t = this.#f[o], s = this.#V(t);
					return a && this.#k(a, o), this.#j(o) ? (a && (a.get = "stale"), s ? (a && n && t.__staleWhileFetching !== void 0 && (a.returnedStale = !0), n ? t.__staleWhileFetching : void 0) : (i || this.#W(e, "expire"), a && n && (a.returnedStale = !0), n ? t : void 0)) : (a && (a.get = "hit"), s ? t.__staleWhileFetching : (this.#U(o), r && this.#O(o), t));
				} else a && (a.get = "miss");
			}
			#H(e, t) {
				this.#m[t] = e, this.#p[e] = t;
			}
			#U(e) {
				e !== this.#g && (e === this.#h ? this.#h = this.#p[e] : this.#H(this.#m[e], this.#p[e]), this.#H(this.#g, e), this.#g = e);
			}
			delete(e) {
				return this.#W(e, "delete");
			}
			#W(e, t) {
				let n = !1;
				if (this.#c !== 0) {
					let r = this.#u.get(e);
					if (r !== void 0) if (this.#S?.[r] && (clearTimeout(this.#S?.[r]), this.#S[r] = void 0), n = !0, this.#c === 1) this.#G(t);
					else {
						this.#N(r);
						let n = this.#f[r];
						if (this.#V(n) ? n.__abortController.abort(/* @__PURE__ */ Error("deleted")) : (this.#C || this.#T) && (this.#C && this.#n?.(n, e, t), this.#T && this.#v?.push([
							n,
							e,
							t
						])), this.#u.delete(e), this.#d[r] = void 0, this.#f[r] = void 0, r === this.#g) this.#g = this.#m[r];
						else if (r === this.#h) this.#h = this.#p[r];
						else {
							let e = this.#m[r];
							this.#p[e] = this.#p[r];
							let t = this.#p[r];
							this.#m[t] = this.#m[r];
						}
						this.#c--, this.#_.push(r);
					}
				}
				if (this.#T && this.#v?.length) {
					let e = this.#v, t;
					for (; t = e?.shift();) this.#i?.(...t);
				}
				return n;
			}
			clear() {
				return this.#G("delete");
			}
			#G(e) {
				for (let t of this.#L({ allowStale: !0 })) {
					let n = this.#f[t];
					if (this.#V(n)) n.__abortController.abort(/* @__PURE__ */ Error("deleted"));
					else {
						let r = this.#d[t];
						this.#C && this.#n?.(n, r, e), this.#T && this.#v?.push([
							n,
							r,
							e
						]);
					}
				}
				if (this.#u.clear(), this.#f.fill(void 0), this.#d.fill(void 0), this.#x && this.#b) {
					this.#x.fill(0), this.#b.fill(0);
					for (let e of this.#S ?? []) e !== void 0 && clearTimeout(e);
					this.#S?.fill(void 0);
				}
				if (this.#y && this.#y.fill(0), this.#h = 0, this.#g = 0, this.#_.length = 0, this.#l = 0, this.#c = 0, this.#T && this.#v) {
					let e = this.#v, t;
					for (; t = e?.shift();) this.#i?.(...t);
				}
			}
		};
	}), d = t((e) => {
		var t = e && e.__importDefault || function(e) {
			return e && e.__esModule ? e : { default: e };
		};
		Object.defineProperty(e, "__esModule", { value: !0 }), e.Minipass = e.isWritable = e.isReadable = e.isStream = void 0;
		var n = typeof process == "object" && process ? process : {
			stdout: null,
			stderr: null
		}, r = k("node:events"), i = t(k("node:stream")), a = k("node:string_decoder");
		e.isStream = (t) => !!t && typeof t == "object" && (t instanceof K || t instanceof i.default || (0, e.isReadable)(t) || (0, e.isWritable)(t)), e.isReadable = (e) => !!e && typeof e == "object" && e instanceof r.EventEmitter && typeof e.pipe == "function" && e.pipe !== i.default.Writable.prototype.pipe, e.isWritable = (e) => !!e && typeof e == "object" && e instanceof r.EventEmitter && typeof e.write == "function" && typeof e.end == "function";
		var o = Symbol("EOF"), s = Symbol("maybeEmitEnd"), c = Symbol("emittedEnd"), l = Symbol("emittingEnd"), u = Symbol("emittedError"), d = Symbol("closed"), f = Symbol("read"), p = Symbol("flush"), m = Symbol("flushChunk"), h = Symbol("encoding"), g = Symbol("decoder"), _ = Symbol("flowing"), v = Symbol("paused"), y = Symbol("resume"), b = Symbol("buffer"), x = Symbol("pipes"), S = Symbol("bufferLength"), C = Symbol("bufferPush"), w = Symbol("bufferShift"), T = Symbol("objectMode"), E = Symbol("destroyed"), D = Symbol("error"), O = Symbol("emitData"), A = Symbol("emitEnd"), j = Symbol("emitEnd2"), M = Symbol("async"), N = Symbol("abort"), P = Symbol("aborted"), F = Symbol("signal"), I = Symbol("dataListeners"), L = Symbol("discarded"), R = (e) => Promise.resolve().then(e), z = (e) => e(), B = (e) => e === "end" || e === "finish" || e === "prefinish", V = (e) => e instanceof ArrayBuffer || !!e && typeof e == "object" && e.constructor && e.constructor.name === "ArrayBuffer" && e.byteLength >= 0, H = (e) => !Buffer.isBuffer(e) && ArrayBuffer.isView(e), U = class {
			src;
			dest;
			opts;
			ondrain;
			constructor(e, t, n) {
				this.src = e, this.dest = t, this.opts = n, this.ondrain = () => e[y](), this.dest.on("drain", this.ondrain);
			}
			unpipe() {
				this.dest.removeListener("drain", this.ondrain);
			}
			proxyErrors(e) {}
			end() {
				this.unpipe(), this.opts.end && this.dest.end();
			}
		}, ee = class extends U {
			unpipe() {
				this.src.removeListener("error", this.proxyErrors), super.unpipe();
			}
			constructor(e, t, n) {
				super(e, t, n), this.proxyErrors = (e) => this.dest.emit("error", e), e.on("error", this.proxyErrors);
			}
		}, W = (e) => !!e.objectMode, G = (e) => !e.objectMode && !!e.encoding && e.encoding !== "buffer", K = class extends r.EventEmitter {
			[_] = !1;
			[v] = !1;
			[x] = [];
			[b] = [];
			[T];
			[h];
			[M];
			[g];
			[o] = !1;
			[c] = !1;
			[l] = !1;
			[d] = !1;
			[u] = null;
			[S] = 0;
			[E] = !1;
			[F];
			[P] = !1;
			[I] = 0;
			[L] = !1;
			writable = !0;
			readable = !0;
			constructor(...e) {
				let t = e[0] || {};
				if (super(), t.objectMode && typeof t.encoding == "string") throw TypeError("Encoding and objectMode may not be used together");
				W(t) ? (this[T] = !0, this[h] = null) : G(t) ? (this[h] = t.encoding, this[T] = !1) : (this[T] = !1, this[h] = null), this[M] = !!t.async, this[g] = this[h] ? new a.StringDecoder(this[h]) : null, t && t.debugExposeBuffer === !0 && Object.defineProperty(this, "buffer", { get: () => this[b] }), t && t.debugExposePipes === !0 && Object.defineProperty(this, "pipes", { get: () => this[x] });
				let { signal: n } = t;
				n && (this[F] = n, n.aborted ? this[N]() : n.addEventListener("abort", () => this[N]()));
			}
			get bufferLength() {
				return this[S];
			}
			get encoding() {
				return this[h];
			}
			set encoding(e) {
				throw Error("Encoding must be set at instantiation time");
			}
			setEncoding(e) {
				throw Error("Encoding must be set at instantiation time");
			}
			get objectMode() {
				return this[T];
			}
			set objectMode(e) {
				throw Error("objectMode must be set at instantiation time");
			}
			get async() {
				return this[M];
			}
			set async(e) {
				this[M] = this[M] || !!e;
			}
			[N]() {
				this[P] = !0, this.emit("abort", this[F]?.reason), this.destroy(this[F]?.reason);
			}
			get aborted() {
				return this[P];
			}
			set aborted(e) {}
			write(e, t, n) {
				if (this[P]) return !1;
				if (this[o]) throw Error("write after end");
				if (this[E]) return this.emit("error", Object.assign(/* @__PURE__ */ Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), !0;
				typeof t == "function" && (n = t, t = "utf8"), t ||= "utf8";
				let r = this[M] ? R : z;
				if (!this[T] && !Buffer.isBuffer(e)) {
					if (H(e)) e = Buffer.from(e.buffer, e.byteOffset, e.byteLength);
					else if (V(e)) e = Buffer.from(e);
					else if (typeof e != "string") throw Error("Non-contiguous data written to non-objectMode stream");
				}
				return this[T] ? (this[_] && this[S] !== 0 && this[p](!0), this[_] ? this.emit("data", e) : this[C](e), this[S] !== 0 && this.emit("readable"), n && r(n), this[_]) : e.length ? (typeof e == "string" && !(t === this[h] && !this[g]?.lastNeed) && (e = Buffer.from(e, t)), Buffer.isBuffer(e) && this[h] && (e = this[g].write(e)), this[_] && this[S] !== 0 && this[p](!0), this[_] ? this.emit("data", e) : this[C](e), this[S] !== 0 && this.emit("readable"), n && r(n), this[_]) : (this[S] !== 0 && this.emit("readable"), n && r(n), this[_]);
			}
			read(e) {
				if (this[E]) return null;
				if (this[L] = !1, this[S] === 0 || e === 0 || e && e > this[S]) return this[s](), null;
				this[T] && (e = null), this[b].length > 1 && !this[T] && (this[b] = [this[h] ? this[b].join("") : Buffer.concat(this[b], this[S])]);
				let t = this[f](e || null, this[b][0]);
				return this[s](), t;
			}
			[f](e, t) {
				if (this[T]) this[w]();
				else {
					let n = t;
					e === n.length || e === null ? this[w]() : typeof n == "string" ? (this[b][0] = n.slice(e), t = n.slice(0, e), this[S] -= e) : (this[b][0] = n.subarray(e), t = n.subarray(0, e), this[S] -= e);
				}
				return this.emit("data", t), !this[b].length && !this[o] && this.emit("drain"), t;
			}
			end(e, t, n) {
				return typeof e == "function" && (n = e, e = void 0), typeof t == "function" && (n = t, t = "utf8"), e !== void 0 && this.write(e, t), n && this.once("end", n), this[o] = !0, this.writable = !1, (this[_] || !this[v]) && this[s](), this;
			}
			[y]() {
				this[E] || (!this[I] && !this[x].length && (this[L] = !0), this[v] = !1, this[_] = !0, this.emit("resume"), this[b].length ? this[p]() : this[o] ? this[s]() : this.emit("drain"));
			}
			resume() {
				return this[y]();
			}
			pause() {
				this[_] = !1, this[v] = !0, this[L] = !1;
			}
			get destroyed() {
				return this[E];
			}
			get flowing() {
				return this[_];
			}
			get paused() {
				return this[v];
			}
			[C](e) {
				this[T] ? this[S] += 1 : this[S] += e.length, this[b].push(e);
			}
			[w]() {
				return this[T] ? --this[S] : this[S] -= this[b][0].length, this[b].shift();
			}
			[p](e = !1) {
				do				;
while (this[m](this[w]()) && this[b].length);
				!e && !this[b].length && !this[o] && this.emit("drain");
			}
			[m](e) {
				return this.emit("data", e), this[_];
			}
			pipe(e, t) {
				if (this[E]) return e;
				this[L] = !1;
				let r = this[c];
				return t ||= {}, e === n.stdout || e === n.stderr ? t.end = !1 : t.end = t.end !== !1, t.proxyErrors = !!t.proxyErrors, r ? t.end && e.end() : (this[x].push(t.proxyErrors ? new ee(this, e, t) : new U(this, e, t)), this[M] ? R(() => this[y]()) : this[y]()), e;
			}
			unpipe(e) {
				let t = this[x].find((t) => t.dest === e);
				t && (this[x].length === 1 ? (this[_] && this[I] === 0 && (this[_] = !1), this[x] = []) : this[x].splice(this[x].indexOf(t), 1), t.unpipe());
			}
			addListener(e, t) {
				return this.on(e, t);
			}
			on(e, t) {
				let n = super.on(e, t);
				if (e === "data") this[L] = !1, this[I]++, !this[x].length && !this[_] && this[y]();
				else if (e === "readable" && this[S] !== 0) super.emit("readable");
				else if (B(e) && this[c]) super.emit(e), this.removeAllListeners(e);
				else if (e === "error" && this[u]) {
					let e = t;
					this[M] ? R(() => e.call(this, this[u])) : e.call(this, this[u]);
				}
				return n;
			}
			removeListener(e, t) {
				return this.off(e, t);
			}
			off(e, t) {
				let n = super.off(e, t);
				return e === "data" && (this[I] = this.listeners("data").length, this[I] === 0 && !this[L] && !this[x].length && (this[_] = !1)), n;
			}
			removeAllListeners(e) {
				let t = super.removeAllListeners(e);
				return (e === "data" || e === void 0) && (this[I] = 0, !this[L] && !this[x].length && (this[_] = !1)), t;
			}
			get emittedEnd() {
				return this[c];
			}
			[s]() {
				!this[l] && !this[c] && !this[E] && this[b].length === 0 && this[o] && (this[l] = !0, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[d] && this.emit("close"), this[l] = !1);
			}
			emit(e, ...t) {
				let n = t[0];
				if (e !== "error" && e !== "close" && e !== E && this[E]) return !1;
				if (e === "data") return !this[T] && !n ? !1 : this[M] ? (R(() => this[O](n)), !0) : this[O](n);
				if (e === "end") return this[A]();
				if (e === "close") {
					if (this[d] = !0, !this[c] && !this[E]) return !1;
					let e = super.emit("close");
					return this.removeAllListeners("close"), e;
				} else if (e === "error") {
					this[u] = n, super.emit(D, n);
					let e = !this[F] || this.listeners("error").length ? super.emit("error", n) : !1;
					return this[s](), e;
				} else if (e === "resume") {
					let e = super.emit("resume");
					return this[s](), e;
				} else if (e === "finish" || e === "prefinish") {
					let t = super.emit(e);
					return this.removeAllListeners(e), t;
				}
				let r = super.emit(e, ...t);
				return this[s](), r;
			}
			[O](e) {
				for (let t of this[x]) t.dest.write(e) === !1 && this.pause();
				let t = this[L] ? !1 : super.emit("data", e);
				return this[s](), t;
			}
			[A]() {
				return this[c] ? !1 : (this[c] = !0, this.readable = !1, this[M] ? (R(() => this[j]()), !0) : this[j]());
			}
			[j]() {
				if (this[g]) {
					let e = this[g].end();
					if (e) {
						for (let t of this[x]) t.dest.write(e);
						this[L] || super.emit("data", e);
					}
				}
				for (let e of this[x]) e.end();
				let e = super.emit("end");
				return this.removeAllListeners("end"), e;
			}
			async collect() {
				let e = Object.assign([], { dataLength: 0 });
				this[T] || (e.dataLength = 0);
				let t = this.promise();
				return this.on("data", (t) => {
					e.push(t), this[T] || (e.dataLength += t.length);
				}), await t, e;
			}
			async concat() {
				if (this[T]) throw Error("cannot concat in objectMode");
				let e = await this.collect();
				return this[h] ? e.join("") : Buffer.concat(e, e.dataLength);
			}
			async promise() {
				return new Promise((e, t) => {
					this.on(E, () => t(/* @__PURE__ */ Error("stream destroyed"))), this.on("error", (e) => t(e)), this.on("end", () => e());
				});
			}
			[Symbol.asyncIterator]() {
				this[L] = !1;
				let e = !1, t = async () => (this.pause(), e = !0, {
					value: void 0,
					done: !0
				});
				return {
					next: () => {
						if (e) return t();
						let n = this.read();
						if (n !== null) return Promise.resolve({
							done: !1,
							value: n
						});
						if (this[o]) return t();
						let r, i, a = (e) => {
							this.off("data", s), this.off("end", c), this.off(E, l), t(), i(e);
						}, s = (e) => {
							this.off("error", a), this.off("end", c), this.off(E, l), this.pause(), r({
								value: e,
								done: !!this[o]
							});
						}, c = () => {
							this.off("error", a), this.off("data", s), this.off(E, l), t(), r({
								done: !0,
								value: void 0
							});
						}, l = () => a(/* @__PURE__ */ Error("stream destroyed"));
						return new Promise((e, t) => {
							i = t, r = e, this.once(E, l), this.once("error", a), this.once("end", c), this.once("data", s);
						});
					},
					throw: t,
					return: t,
					[Symbol.asyncIterator]() {
						return this;
					},
					[Symbol.asyncDispose]: async () => {}
				};
			}
			[Symbol.iterator]() {
				this[L] = !1;
				let e = !1, t = () => (this.pause(), this.off(D, t), this.off(E, t), this.off("end", t), e = !0, {
					done: !0,
					value: void 0
				});
				return this.once("end", t), this.once(D, t), this.once(E, t), {
					next: () => {
						if (e) return t();
						let n = this.read();
						return n === null ? t() : {
							done: !1,
							value: n
						};
					},
					throw: t,
					return: t,
					[Symbol.iterator]() {
						return this;
					},
					[Symbol.dispose]: () => {}
				};
			}
			destroy(e) {
				if (this[E]) return e ? this.emit("error", e) : this.emit(E), this;
				this[E] = !0, this[L] = !0, this[b].length = 0, this[S] = 0;
				let t = this;
				return typeof t.close == "function" && !this[d] && t.close(), e ? this.emit("error", e) : this.emit(E), this;
			}
			static get isStream() {
				return e.isStream;
			}
		};
		e.Minipass = K;
	}), f = t((e) => {
		var t = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
			r === void 0 && (r = n);
			var i = Object.getOwnPropertyDescriptor(t, n);
			(!i || ("get" in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
				enumerable: !0,
				get: function() {
					return t[n];
				}
			}), Object.defineProperty(e, r, i);
		}) : (function(e, t, n, r) {
			r === void 0 && (r = n), e[r] = t[n];
		})), n = e && e.__setModuleDefault || (Object.create ? (function(e, t) {
			Object.defineProperty(e, "default", {
				enumerable: !0,
				value: t
			});
		}) : function(e, t) {
			e.default = t;
		}), r = e && e.__importStar || function(e) {
			if (e && e.__esModule) return e;
			var r = {};
			if (e != null) for (var i in e) i !== "default" && Object.prototype.hasOwnProperty.call(e, i) && t(r, e, i);
			return n(r, e), r;
		};
		Object.defineProperty(e, "__esModule", { value: !0 }), e.PathScurry = e.Path = e.PathScurryDarwin = e.PathScurryPosix = e.PathScurryWin32 = e.PathScurryBase = e.PathPosix = e.PathWin32 = e.PathBase = e.ChildrenCache = e.ResolveCache = void 0;
		var i = u(), a = k("node:path"), o = k("node:url"), s = k("fs"), c = r(k("node:fs")), l = s.realpathSync.native, f = k("node:fs/promises"), p = d(), m = {
			lstatSync: s.lstatSync,
			readdir: s.readdir,
			readdirSync: s.readdirSync,
			readlinkSync: s.readlinkSync,
			realpathSync: l,
			promises: {
				lstat: f.lstat,
				readdir: f.readdir,
				readlink: f.readlink,
				realpath: f.realpath
			}
		}, h = (e) => !e || e === m || e === c ? m : {
			...m,
			...e,
			promises: {
				...m.promises,
				...e.promises || {}
			}
		}, g = /^\\\\\?\\([a-z]:)\\?$/i, _ = (e) => e.replace(/\//g, "\\").replace(g, "$1\\"), v = /[\\\/]/, y = 0, b = 1, x = 2, S = 4, C = 6, w = 8, T = 10, E = 12, D = 15, O = ~D, A = 16, j = 32, M = 64, N = 128, P = 256, F = 512, I = M | N | F, L = 1023, R = (e) => e.isFile() ? w : e.isDirectory() ? S : e.isSymbolicLink() ? T : e.isCharacterDevice() ? x : e.isBlockDevice() ? C : e.isSocket() ? E : e.isFIFO() ? b : y, z = new i.LRUCache({ max: 2 ** 12 }), B = (e) => {
			let t = z.get(e);
			if (t) return t;
			let n = e.normalize("NFKD");
			return z.set(e, n), n;
		}, V = new i.LRUCache({ max: 2 ** 12 }), H = (e) => {
			let t = V.get(e);
			if (t) return t;
			let n = B(e.toLowerCase());
			return V.set(e, n), n;
		}, U = class extends i.LRUCache {
			constructor() {
				super({ max: 256 });
			}
		};
		e.ResolveCache = U;
		var ee = class extends i.LRUCache {
			constructor(e = 16 * 1024) {
				super({
					maxSize: e,
					sizeCalculation: (e) => e.length + 1
				});
			}
		};
		e.ChildrenCache = ee;
		var W = Symbol("PathScurry setAsCwd"), G = class {
			name;
			root;
			roots;
			parent;
			nocase;
			isCWD = !1;
			#e;
			#t;
			get dev() {
				return this.#t;
			}
			#n;
			get mode() {
				return this.#n;
			}
			#r;
			get nlink() {
				return this.#r;
			}
			#i;
			get uid() {
				return this.#i;
			}
			#a;
			get gid() {
				return this.#a;
			}
			#o;
			get rdev() {
				return this.#o;
			}
			#s;
			get blksize() {
				return this.#s;
			}
			#c;
			get ino() {
				return this.#c;
			}
			#l;
			get size() {
				return this.#l;
			}
			#u;
			get blocks() {
				return this.#u;
			}
			#d;
			get atimeMs() {
				return this.#d;
			}
			#f;
			get mtimeMs() {
				return this.#f;
			}
			#p;
			get ctimeMs() {
				return this.#p;
			}
			#m;
			get birthtimeMs() {
				return this.#m;
			}
			#h;
			get atime() {
				return this.#h;
			}
			#g;
			get mtime() {
				return this.#g;
			}
			#_;
			get ctime() {
				return this.#_;
			}
			#v;
			get birthtime() {
				return this.#v;
			}
			#y;
			#b;
			#x;
			#S;
			#C;
			#w;
			#T;
			#E;
			#D;
			#O;
			get parentPath() {
				return (this.parent || this).fullpath();
			}
			get path() {
				return this.parentPath;
			}
			constructor(e, t = y, n, r, i, a, o) {
				this.name = e, this.#y = i ? H(e) : B(e), this.#T = t & L, this.nocase = i, this.roots = r, this.root = n || this, this.#E = a, this.#x = o.fullpath, this.#C = o.relative, this.#w = o.relativePosix, this.parent = o.parent, this.parent ? this.#e = this.parent.#e : this.#e = h(o.fs);
			}
			depth() {
				return this.#b === void 0 ? this.parent ? this.#b = this.parent.depth() + 1 : this.#b = 0 : this.#b;
			}
			childrenCache() {
				return this.#E;
			}
			resolve(e) {
				if (!e) return this;
				let t = this.getRootString(e), n = e.substring(t.length).split(this.splitSep);
				return t ? this.getRoot(t).#k(n) : this.#k(n);
			}
			#k(e) {
				let t = this;
				for (let n of e) t = t.child(n);
				return t;
			}
			children() {
				let e = this.#E.get(this);
				if (e) return e;
				let t = Object.assign([], { provisional: 0 });
				return this.#E.set(this, t), this.#T &= ~A, t;
			}
			child(e, t) {
				if (e === "" || e === ".") return this;
				if (e === "..") return this.parent || this;
				let n = this.children(), r = this.nocase ? H(e) : B(e);
				for (let e of n) if (e.#y === r) return e;
				let i = this.parent ? this.sep : "", a = this.#x ? this.#x + i + e : void 0, o = this.newChild(e, y, {
					...t,
					parent: this,
					fullpath: a
				});
				return this.canReaddir() || (o.#T |= N), n.push(o), o;
			}
			relative() {
				if (this.isCWD) return "";
				if (this.#C !== void 0) return this.#C;
				let e = this.name, t = this.parent;
				if (!t) return this.#C = this.name;
				let n = t.relative();
				return n + (!n || !t.parent ? "" : this.sep) + e;
			}
			relativePosix() {
				if (this.sep === "/") return this.relative();
				if (this.isCWD) return "";
				if (this.#w !== void 0) return this.#w;
				let e = this.name, t = this.parent;
				if (!t) return this.#w = this.fullpathPosix();
				let n = t.relativePosix();
				return n + (!n || !t.parent ? "" : "/") + e;
			}
			fullpath() {
				if (this.#x !== void 0) return this.#x;
				let e = this.name, t = this.parent;
				if (!t) return this.#x = this.name;
				let n = t.fullpath() + (t.parent ? this.sep : "") + e;
				return this.#x = n;
			}
			fullpathPosix() {
				if (this.#S !== void 0) return this.#S;
				if (this.sep === "/") return this.#S = this.fullpath();
				if (!this.parent) {
					let e = this.fullpath().replace(/\\/g, "/");
					return /^[a-z]:\//i.test(e) ? this.#S = `//?/${e}` : this.#S = e;
				}
				let e = this.parent, t = e.fullpathPosix(), n = t + (!t || !e.parent ? "" : "/") + this.name;
				return this.#S = n;
			}
			isUnknown() {
				return (this.#T & D) === y;
			}
			isType(e) {
				return this[`is${e}`]();
			}
			getType() {
				return this.isUnknown() ? "Unknown" : this.isDirectory() ? "Directory" : this.isFile() ? "File" : this.isSymbolicLink() ? "SymbolicLink" : this.isFIFO() ? "FIFO" : this.isCharacterDevice() ? "CharacterDevice" : this.isBlockDevice() ? "BlockDevice" : this.isSocket() ? "Socket" : "Unknown";
			}
			isFile() {
				return (this.#T & D) === w;
			}
			isDirectory() {
				return (this.#T & D) === S;
			}
			isCharacterDevice() {
				return (this.#T & D) === x;
			}
			isBlockDevice() {
				return (this.#T & D) === C;
			}
			isFIFO() {
				return (this.#T & D) === b;
			}
			isSocket() {
				return (this.#T & D) === E;
			}
			isSymbolicLink() {
				return (this.#T & T) === T;
			}
			lstatCached() {
				return this.#T & j ? this : void 0;
			}
			readlinkCached() {
				return this.#D;
			}
			realpathCached() {
				return this.#O;
			}
			readdirCached() {
				let e = this.children();
				return e.slice(0, e.provisional);
			}
			canReadlink() {
				if (this.#D) return !0;
				if (!this.parent) return !1;
				let e = this.#T & D;
				return !(e !== y && e !== T || this.#T & P || this.#T & N);
			}
			calledReaddir() {
				return !!(this.#T & A);
			}
			isENOENT() {
				return !!(this.#T & N);
			}
			isNamed(e) {
				return this.nocase ? this.#y === H(e) : this.#y === B(e);
			}
			async readlink() {
				let e = this.#D;
				if (e) return e;
				if (this.canReadlink() && this.parent) try {
					let e = await this.#e.promises.readlink(this.fullpath()), t = (await this.parent.realpath())?.resolve(e);
					if (t) return this.#D = t;
				} catch (e) {
					this.#L(e.code);
					return;
				}
			}
			readlinkSync() {
				let e = this.#D;
				if (e) return e;
				if (this.canReadlink() && this.parent) try {
					let e = this.#e.readlinkSync(this.fullpath()), t = this.parent.realpathSync()?.resolve(e);
					if (t) return this.#D = t;
				} catch (e) {
					this.#L(e.code);
					return;
				}
			}
			#A(e) {
				this.#T |= A;
				for (let t = e.provisional; t < e.length; t++) {
					let n = e[t];
					n && n.#j();
				}
			}
			#j() {
				this.#T & N || (this.#T = (this.#T | N) & O, this.#M());
			}
			#M() {
				let e = this.children();
				e.provisional = 0;
				for (let t of e) t.#j();
			}
			#N() {
				this.#T |= F, this.#P();
			}
			#P() {
				if (this.#T & M) return;
				let e = this.#T;
				(e & D) === S && (e &= O), this.#T = e | M, this.#M();
			}
			#F(e = "") {
				e === "ENOTDIR" || e === "EPERM" ? this.#P() : e === "ENOENT" ? this.#j() : this.children().provisional = 0;
			}
			#I(e = "") {
				e === "ENOTDIR" ? this.parent.#P() : e === "ENOENT" && this.#j();
			}
			#L(e = "") {
				let t = this.#T;
				t |= P, e === "ENOENT" && (t |= N), (e === "EINVAL" || e === "UNKNOWN") && (t &= O), this.#T = t, e === "ENOTDIR" && this.parent && this.parent.#P();
			}
			#R(e, t) {
				return this.#B(e, t) || this.#z(e, t);
			}
			#z(e, t) {
				let n = R(e), r = this.newChild(e.name, n, { parent: this }), i = r.#T & D;
				return i !== S && i !== T && i !== y && (r.#T |= M), t.unshift(r), t.provisional++, r;
			}
			#B(e, t) {
				for (let n = t.provisional; n < t.length; n++) {
					let r = t[n];
					if ((this.nocase ? H(e.name) : B(e.name)) === r.#y) return this.#V(e, r, n, t);
				}
			}
			#V(e, t, n, r) {
				let i = t.name;
				return t.#T = t.#T & O | R(e), i !== e.name && (t.name = e.name), n !== r.provisional && (n === r.length - 1 ? r.pop() : r.splice(n, 1), r.unshift(t)), r.provisional++, t;
			}
			async lstat() {
				if ((this.#T & N) === 0) try {
					return this.#H(await this.#e.promises.lstat(this.fullpath())), this;
				} catch (e) {
					this.#I(e.code);
				}
			}
			lstatSync() {
				if ((this.#T & N) === 0) try {
					return this.#H(this.#e.lstatSync(this.fullpath())), this;
				} catch (e) {
					this.#I(e.code);
				}
			}
			#H(e) {
				let { atime: t, atimeMs: n, birthtime: r, birthtimeMs: i, blksize: a, blocks: o, ctime: s, ctimeMs: c, dev: l, gid: u, ino: d, mode: f, mtime: p, mtimeMs: m, nlink: h, rdev: g, size: _, uid: v } = e;
				this.#h = t, this.#d = n, this.#v = r, this.#m = i, this.#s = a, this.#u = o, this.#_ = s, this.#p = c, this.#t = l, this.#a = u, this.#c = d, this.#n = f, this.#g = p, this.#f = m, this.#r = h, this.#o = g, this.#l = _, this.#i = v;
				let b = R(e);
				this.#T = this.#T & O | b | j, b !== y && b !== S && b !== T && (this.#T |= M);
			}
			#U = [];
			#W = !1;
			#G(e) {
				this.#W = !1;
				let t = this.#U.slice();
				this.#U.length = 0, t.forEach((t) => t(null, e));
			}
			readdirCB(e, t = !1) {
				if (!this.canReaddir()) {
					t ? e(null, []) : queueMicrotask(() => e(null, []));
					return;
				}
				let n = this.children();
				if (this.calledReaddir()) {
					let r = n.slice(0, n.provisional);
					t ? e(null, r) : queueMicrotask(() => e(null, r));
					return;
				}
				if (this.#U.push(e), this.#W) return;
				this.#W = !0;
				let r = this.fullpath();
				this.#e.readdir(r, { withFileTypes: !0 }, (e, t) => {
					if (e) this.#F(e.code), n.provisional = 0;
					else {
						for (let e of t) this.#R(e, n);
						this.#A(n);
					}
					this.#G(n.slice(0, n.provisional));
				});
			}
			#K;
			async readdir() {
				if (!this.canReaddir()) return [];
				let e = this.children();
				if (this.calledReaddir()) return e.slice(0, e.provisional);
				let t = this.fullpath();
				if (this.#K) await this.#K;
				else {
					let n = () => {};
					this.#K = new Promise((e) => n = e);
					try {
						for (let n of await this.#e.promises.readdir(t, { withFileTypes: !0 })) this.#R(n, e);
						this.#A(e);
					} catch (t) {
						this.#F(t.code), e.provisional = 0;
					}
					this.#K = void 0, n();
				}
				return e.slice(0, e.provisional);
			}
			readdirSync() {
				if (!this.canReaddir()) return [];
				let e = this.children();
				if (this.calledReaddir()) return e.slice(0, e.provisional);
				let t = this.fullpath();
				try {
					for (let n of this.#e.readdirSync(t, { withFileTypes: !0 })) this.#R(n, e);
					this.#A(e);
				} catch (t) {
					this.#F(t.code), e.provisional = 0;
				}
				return e.slice(0, e.provisional);
			}
			canReaddir() {
				if (this.#T & I) return !1;
				let e = D & this.#T;
				return e === y || e === S || e === T;
			}
			shouldWalk(e, t) {
				return (this.#T & S) === S && !(this.#T & I) && !e.has(this) && (!t || t(this));
			}
			async realpath() {
				if (this.#O) return this.#O;
				if (!((F | P | N) & this.#T)) try {
					let e = await this.#e.promises.realpath(this.fullpath());
					return this.#O = this.resolve(e);
				} catch {
					this.#N();
				}
			}
			realpathSync() {
				if (this.#O) return this.#O;
				if (!((F | P | N) & this.#T)) try {
					let e = this.#e.realpathSync(this.fullpath());
					return this.#O = this.resolve(e);
				} catch {
					this.#N();
				}
			}
			[W](e) {
				if (e === this) return;
				e.isCWD = !1, this.isCWD = !0;
				let t = /* @__PURE__ */ new Set([]), n = [], r = this;
				for (; r && r.parent;) t.add(r), r.#C = n.join(this.sep), r.#w = n.join("/"), r = r.parent, n.push("..");
				for (r = e; r && r.parent && !t.has(r);) r.#C = void 0, r.#w = void 0, r = r.parent;
			}
		};
		e.PathBase = G;
		var K = class e extends G {
			sep = "\\";
			splitSep = v;
			constructor(e, t = y, n, r, i, a, o) {
				super(e, t, n, r, i, a, o);
			}
			newChild(t, n = y, r = {}) {
				return new e(t, n, this.root, this.roots, this.nocase, this.childrenCache(), r);
			}
			getRootString(e) {
				return a.win32.parse(e).root;
			}
			getRoot(e) {
				if (e = _(e.toUpperCase()), e === this.root.name) return this.root;
				for (let [t, n] of Object.entries(this.roots)) if (this.sameRoot(e, t)) return this.roots[e] = n;
				return this.roots[e] = new re(e, this).root;
			}
			sameRoot(e, t = this.root.name) {
				return e = e.toUpperCase().replace(/\//g, "\\").replace(g, "$1\\"), e === t;
			}
		};
		e.PathWin32 = K;
		var te = class e extends G {
			splitSep = "/";
			sep = "/";
			constructor(e, t = y, n, r, i, a, o) {
				super(e, t, n, r, i, a, o);
			}
			getRootString(e) {
				return e.startsWith("/") ? "/" : "";
			}
			getRoot(e) {
				return this.root;
			}
			newChild(t, n = y, r = {}) {
				return new e(t, n, this.root, this.roots, this.nocase, this.childrenCache(), r);
			}
		};
		e.PathPosix = te;
		var ne = class {
			root;
			rootPath;
			roots;
			cwd;
			#e;
			#t;
			#n;
			nocase;
			#r;
			constructor(e = process.cwd(), t, n, { nocase: r, childrenCacheSize: i = 16 * 1024, fs: a = m } = {}) {
				this.#r = h(a), (e instanceof URL || e.startsWith("file://")) && (e = (0, o.fileURLToPath)(e));
				let s = t.resolve(e);
				this.roots = Object.create(null), this.rootPath = this.parseRootPath(s), this.#e = new U(), this.#t = new U(), this.#n = new ee(i);
				let c = s.substring(this.rootPath.length).split(n);
				if (c.length === 1 && !c[0] && c.pop(), r === void 0) throw TypeError("must provide nocase setting to PathScurryBase ctor");
				this.nocase = r, this.root = this.newRoot(this.#r), this.roots[this.rootPath] = this.root;
				let l = this.root, u = c.length - 1, d = t.sep, f = this.rootPath, p = !1;
				for (let e of c) {
					let t = u--;
					l = l.child(e, {
						relative: Array(t).fill("..").join(d),
						relativePosix: Array(t).fill("..").join("/"),
						fullpath: f += (p ? "" : d) + e
					}), p = !0;
				}
				this.cwd = l;
			}
			depth(e = this.cwd) {
				return typeof e == "string" && (e = this.cwd.resolve(e)), e.depth();
			}
			childrenCache() {
				return this.#n;
			}
			resolve(...e) {
				let t = "";
				for (let n = e.length - 1; n >= 0; n--) {
					let r = e[n];
					if (!(!r || r === ".") && (t = t ? `${r}/${t}` : r, this.isAbsolute(r))) break;
				}
				let n = this.#e.get(t);
				if (n !== void 0) return n;
				let r = this.cwd.resolve(t).fullpath();
				return this.#e.set(t, r), r;
			}
			resolvePosix(...e) {
				let t = "";
				for (let n = e.length - 1; n >= 0; n--) {
					let r = e[n];
					if (!(!r || r === ".") && (t = t ? `${r}/${t}` : r, this.isAbsolute(r))) break;
				}
				let n = this.#t.get(t);
				if (n !== void 0) return n;
				let r = this.cwd.resolve(t).fullpathPosix();
				return this.#t.set(t, r), r;
			}
			relative(e = this.cwd) {
				return typeof e == "string" && (e = this.cwd.resolve(e)), e.relative();
			}
			relativePosix(e = this.cwd) {
				return typeof e == "string" && (e = this.cwd.resolve(e)), e.relativePosix();
			}
			basename(e = this.cwd) {
				return typeof e == "string" && (e = this.cwd.resolve(e)), e.name;
			}
			dirname(e = this.cwd) {
				return typeof e == "string" && (e = this.cwd.resolve(e)), (e.parent || e).fullpath();
			}
			async readdir(e = this.cwd, t = { withFileTypes: !0 }) {
				typeof e == "string" ? e = this.cwd.resolve(e) : e instanceof G || (t = e, e = this.cwd);
				let { withFileTypes: n } = t;
				if (e.canReaddir()) {
					let t = await e.readdir();
					return n ? t : t.map((e) => e.name);
				} else return [];
			}
			readdirSync(e = this.cwd, t = { withFileTypes: !0 }) {
				typeof e == "string" ? e = this.cwd.resolve(e) : e instanceof G || (t = e, e = this.cwd);
				let { withFileTypes: n = !0 } = t;
				return e.canReaddir() ? n ? e.readdirSync() : e.readdirSync().map((e) => e.name) : [];
			}
			async lstat(e = this.cwd) {
				return typeof e == "string" && (e = this.cwd.resolve(e)), e.lstat();
			}
			lstatSync(e = this.cwd) {
				return typeof e == "string" && (e = this.cwd.resolve(e)), e.lstatSync();
			}
			async readlink(e = this.cwd, { withFileTypes: t } = { withFileTypes: !1 }) {
				typeof e == "string" ? e = this.cwd.resolve(e) : e instanceof G || (t = e.withFileTypes, e = this.cwd);
				let n = await e.readlink();
				return t ? n : n?.fullpath();
			}
			readlinkSync(e = this.cwd, { withFileTypes: t } = { withFileTypes: !1 }) {
				typeof e == "string" ? e = this.cwd.resolve(e) : e instanceof G || (t = e.withFileTypes, e = this.cwd);
				let n = e.readlinkSync();
				return t ? n : n?.fullpath();
			}
			async realpath(e = this.cwd, { withFileTypes: t } = { withFileTypes: !1 }) {
				typeof e == "string" ? e = this.cwd.resolve(e) : e instanceof G || (t = e.withFileTypes, e = this.cwd);
				let n = await e.realpath();
				return t ? n : n?.fullpath();
			}
			realpathSync(e = this.cwd, { withFileTypes: t } = { withFileTypes: !1 }) {
				typeof e == "string" ? e = this.cwd.resolve(e) : e instanceof G || (t = e.withFileTypes, e = this.cwd);
				let n = e.realpathSync();
				return t ? n : n?.fullpath();
			}
			async walk(e = this.cwd, t = {}) {
				typeof e == "string" ? e = this.cwd.resolve(e) : e instanceof G || (t = e, e = this.cwd);
				let { withFileTypes: n = !0, follow: r = !1, filter: i, walkFilter: a } = t, o = [];
				(!i || i(e)) && o.push(n ? e : e.fullpath());
				let s = /* @__PURE__ */ new Set(), c = (e, t) => {
					s.add(e), e.readdirCB((e, l) => {
						if (e) return t(e);
						let u = l.length;
						if (!u) return t();
						let d = () => {
							--u === 0 && t();
						};
						for (let e of l) (!i || i(e)) && o.push(n ? e : e.fullpath()), r && e.isSymbolicLink() ? e.realpath().then((e) => e?.isUnknown() ? e.lstat() : e).then((e) => e?.shouldWalk(s, a) ? c(e, d) : d()) : e.shouldWalk(s, a) ? c(e, d) : d();
					}, !0);
				}, l = e;
				return new Promise((e, t) => {
					c(l, (n) => {
						if (n) return t(n);
						e(o);
					});
				});
			}
			walkSync(e = this.cwd, t = {}) {
				typeof e == "string" ? e = this.cwd.resolve(e) : e instanceof G || (t = e, e = this.cwd);
				let { withFileTypes: n = !0, follow: r = !1, filter: i, walkFilter: a } = t, o = [];
				(!i || i(e)) && o.push(n ? e : e.fullpath());
				let s = /* @__PURE__ */ new Set([e]);
				for (let e of s) {
					let t = e.readdirSync();
					for (let e of t) {
						(!i || i(e)) && o.push(n ? e : e.fullpath());
						let t = e;
						if (e.isSymbolicLink()) {
							if (!(r && (t = e.realpathSync()))) continue;
							t.isUnknown() && t.lstatSync();
						}
						t.shouldWalk(s, a) && s.add(t);
					}
				}
				return o;
			}
			[Symbol.asyncIterator]() {
				return this.iterate();
			}
			iterate(e = this.cwd, t = {}) {
				return typeof e == "string" ? e = this.cwd.resolve(e) : e instanceof G || (t = e, e = this.cwd), this.stream(e, t)[Symbol.asyncIterator]();
			}
			[Symbol.iterator]() {
				return this.iterateSync();
			}
			*iterateSync(e = this.cwd, t = {}) {
				typeof e == "string" ? e = this.cwd.resolve(e) : e instanceof G || (t = e, e = this.cwd);
				let { withFileTypes: n = !0, follow: r = !1, filter: i, walkFilter: a } = t;
				(!i || i(e)) && (yield n ? e : e.fullpath());
				let o = /* @__PURE__ */ new Set([e]);
				for (let e of o) {
					let t = e.readdirSync();
					for (let e of t) {
						(!i || i(e)) && (yield n ? e : e.fullpath());
						let t = e;
						if (e.isSymbolicLink()) {
							if (!(r && (t = e.realpathSync()))) continue;
							t.isUnknown() && t.lstatSync();
						}
						t.shouldWalk(o, a) && o.add(t);
					}
				}
			}
			stream(e = this.cwd, t = {}) {
				typeof e == "string" ? e = this.cwd.resolve(e) : e instanceof G || (t = e, e = this.cwd);
				let { withFileTypes: n = !0, follow: r = !1, filter: i, walkFilter: a } = t, o = new p.Minipass({ objectMode: !0 });
				(!i || i(e)) && o.write(n ? e : e.fullpath());
				let s = /* @__PURE__ */ new Set(), c = [e], l = 0, u = () => {
					let e = !1;
					for (; !e;) {
						let t = c.shift();
						if (!t) {
							l === 0 && o.end();
							return;
						}
						l++, s.add(t);
						let d = (t, p, m = !1) => {
							if (t) return o.emit("error", t);
							if (r && !m) {
								let e = [];
								for (let t of p) t.isSymbolicLink() && e.push(t.realpath().then((e) => e?.isUnknown() ? e.lstat() : e));
								if (e.length) {
									Promise.all(e).then(() => d(null, p, !0));
									return;
								}
							}
							for (let t of p) t && (!i || i(t)) && (o.write(n ? t : t.fullpath()) || (e = !0));
							l--;
							for (let e of p) {
								let t = e.realpathCached() || e;
								t.shouldWalk(s, a) && c.push(t);
							}
							e && !o.flowing ? o.once("drain", u) : f || u();
						}, f = !0;
						t.readdirCB(d, !0), f = !1;
					}
				};
				return u(), o;
			}
			streamSync(e = this.cwd, t = {}) {
				typeof e == "string" ? e = this.cwd.resolve(e) : e instanceof G || (t = e, e = this.cwd);
				let { withFileTypes: n = !0, follow: r = !1, filter: i, walkFilter: a } = t, o = new p.Minipass({ objectMode: !0 }), s = /* @__PURE__ */ new Set();
				(!i || i(e)) && o.write(n ? e : e.fullpath());
				let c = [e], l = 0, u = () => {
					let e = !1;
					for (; !e;) {
						let t = c.shift();
						if (!t) {
							l === 0 && o.end();
							return;
						}
						l++, s.add(t);
						let u = t.readdirSync();
						for (let t of u) (!i || i(t)) && (o.write(n ? t : t.fullpath()) || (e = !0));
						l--;
						for (let e of u) {
							let t = e;
							if (e.isSymbolicLink()) {
								if (!(r && (t = e.realpathSync()))) continue;
								t.isUnknown() && t.lstatSync();
							}
							t.shouldWalk(s, a) && c.push(t);
						}
					}
					e && !o.flowing && o.once("drain", u);
				};
				return u(), o;
			}
			chdir(e = this.cwd) {
				let t = this.cwd;
				this.cwd = typeof e == "string" ? this.cwd.resolve(e) : e, this.cwd[W](t);
			}
		};
		e.PathScurryBase = ne;
		var re = class extends ne {
			sep = "\\";
			constructor(e = process.cwd(), t = {}) {
				let { nocase: n = !0 } = t;
				super(e, a.win32, "\\", {
					...t,
					nocase: n
				}), this.nocase = n;
				for (let e = this.cwd; e; e = e.parent) e.nocase = this.nocase;
			}
			parseRootPath(e) {
				return a.win32.parse(e).root.toUpperCase();
			}
			newRoot(e) {
				return new K(this.rootPath, S, void 0, this.roots, this.nocase, this.childrenCache(), { fs: e });
			}
			isAbsolute(e) {
				return e.startsWith("/") || e.startsWith("\\") || /^[a-z]:(\/|\\)/i.test(e);
			}
		};
		e.PathScurryWin32 = re;
		var ie = class extends ne {
			sep = "/";
			constructor(e = process.cwd(), t = {}) {
				let { nocase: n = !1 } = t;
				super(e, a.posix, "/", {
					...t,
					nocase: n
				}), this.nocase = n;
			}
			parseRootPath(e) {
				return "/";
			}
			newRoot(e) {
				return new te(this.rootPath, S, void 0, this.roots, this.nocase, this.childrenCache(), { fs: e });
			}
			isAbsolute(e) {
				return e.startsWith("/");
			}
		};
		e.PathScurryPosix = ie;
		var q = class extends ie {
			constructor(e = process.cwd(), t = {}) {
				let { nocase: n = !0 } = t;
				super(e, {
					...t,
					nocase: n
				});
			}
		};
		e.PathScurryDarwin = q, e.Path = process.platform === "win32" ? K : te, e.PathScurry = process.platform === "win32" ? re : process.platform === "darwin" ? q : ie;
	}), p = t((e) => {
		Object.defineProperty(e, "__esModule", { value: !0 }), e.Pattern = void 0;
		var t = l(), n = (e) => e.length >= 1, r = (e) => e.length >= 1, i = Symbol.for("nodejs.util.inspect.custom");
		e.Pattern = class e {
			#e;
			#t;
			#n;
			length;
			#r;
			#i;
			#a;
			#o;
			#s;
			#c;
			#l = !0;
			constructor(e, t, i, a) {
				if (!n(e)) throw TypeError("empty pattern list");
				if (!r(t)) throw TypeError("empty glob list");
				if (t.length !== e.length) throw TypeError("mismatched pattern list and glob list lengths");
				if (this.length = e.length, i < 0 || i >= this.length) throw TypeError("index out of range");
				if (this.#e = e, this.#t = t, this.#n = i, this.#r = a, this.#n === 0) {
					if (this.isUNC()) {
						let [e, t, n, r, ...i] = this.#e, [a, o, s, c, ...l] = this.#t;
						i[0] === "" && (i.shift(), l.shift());
						let u = [
							e,
							t,
							n,
							r,
							""
						].join("/"), d = [
							a,
							o,
							s,
							c,
							""
						].join("/");
						this.#e = [u, ...i], this.#t = [d, ...l], this.length = this.#e.length;
					} else if (this.isDrive() || this.isAbsolute()) {
						let [e, ...t] = this.#e, [n, ...r] = this.#t;
						t[0] === "" && (t.shift(), r.shift());
						let i = e + "/", a = n + "/";
						this.#e = [i, ...t], this.#t = [a, ...r], this.length = this.#e.length;
					}
				}
			}
			[i]() {
				return "Pattern <" + this.#t.slice(this.#n).join("/") + ">";
			}
			pattern() {
				return this.#e[this.#n];
			}
			isString() {
				return typeof this.#e[this.#n] == "string";
			}
			isGlobstar() {
				return this.#e[this.#n] === t.GLOBSTAR;
			}
			isRegExp() {
				return this.#e[this.#n] instanceof RegExp;
			}
			globString() {
				return this.#a = this.#a || (this.#n === 0 ? this.isAbsolute() ? this.#t[0] + this.#t.slice(1).join("/") : this.#t.join("/") : this.#t.slice(this.#n).join("/"));
			}
			hasMore() {
				return this.length > this.#n + 1;
			}
			rest() {
				return this.#i === void 0 ? this.hasMore() ? (this.#i = new e(this.#e, this.#t, this.#n + 1, this.#r), this.#i.#c = this.#c, this.#i.#s = this.#s, this.#i.#o = this.#o, this.#i) : this.#i = null : this.#i;
			}
			isUNC() {
				let e = this.#e;
				return this.#s === void 0 ? this.#s = this.#r === "win32" && this.#n === 0 && e[0] === "" && e[1] === "" && typeof e[2] == "string" && !!e[2] && typeof e[3] == "string" && !!e[3] : this.#s;
			}
			isDrive() {
				let e = this.#e;
				return this.#o === void 0 ? this.#o = this.#r === "win32" && this.#n === 0 && this.length > 1 && typeof e[0] == "string" && /^[a-z]:$/i.test(e[0]) : this.#o;
			}
			isAbsolute() {
				let e = this.#e;
				return this.#c === void 0 ? this.#c = e[0] === "" && e.length > 1 || this.isDrive() || this.isUNC() : this.#c;
			}
			root() {
				let e = this.#e[0];
				return typeof e == "string" && this.isAbsolute() && this.#n === 0 ? e : "";
			}
			checkFollowGlobstar() {
				return !(this.#n === 0 || !this.isGlobstar() || !this.#l);
			}
			markFollowGlobstar() {
				return this.#n === 0 || !this.isGlobstar() || !this.#l ? !1 : (this.#l = !1, !0);
			}
		};
	}), m = t((e) => {
		Object.defineProperty(e, "__esModule", { value: !0 }), e.Ignore = void 0;
		var t = l(), n = p(), r = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux";
		e.Ignore = class {
			relative;
			relativeChildren;
			absolute;
			absoluteChildren;
			platform;
			mmopts;
			constructor(e, { nobrace: t, nocase: n, noext: i, noglobstar: a, platform: o = r }) {
				this.relative = [], this.absolute = [], this.relativeChildren = [], this.absoluteChildren = [], this.platform = o, this.mmopts = {
					dot: !0,
					nobrace: t,
					nocase: n,
					noext: i,
					noglobstar: a,
					optimizationLevel: 2,
					platform: o,
					nocomment: !0,
					nonegate: !0
				};
				for (let t of e) this.add(t);
			}
			add(e) {
				let r = new t.Minimatch(e, this.mmopts);
				for (let e = 0; e < r.set.length; e++) {
					let i = r.set[e], a = r.globParts[e];
					if (!i || !a) throw Error("invalid pattern object");
					for (; i[0] === "." && a[0] === ".";) i.shift(), a.shift();
					let o = new n.Pattern(i, a, 0, this.platform), s = new t.Minimatch(o.globString(), this.mmopts), c = a[a.length - 1] === "**", l = o.isAbsolute();
					l ? this.absolute.push(s) : this.relative.push(s), c && (l ? this.absoluteChildren.push(s) : this.relativeChildren.push(s));
				}
			}
			ignored(e) {
				let t = e.fullpath(), n = `${t}/`, r = e.relative() || ".", i = `${r}/`;
				for (let e of this.relative) if (e.match(r) || e.match(i)) return !0;
				for (let e of this.absolute) if (e.match(t) || e.match(n)) return !0;
				return !1;
			}
			childrenIgnored(e) {
				let t = e.fullpath() + "/", n = (e.relative() || ".") + "/";
				for (let e of this.relativeChildren) if (e.match(n)) return !0;
				for (let e of this.absoluteChildren) if (e.match(t)) return !0;
				return !1;
			}
		};
	}), h = t((e) => {
		Object.defineProperty(e, "__esModule", { value: !0 }), e.Processor = e.SubWalks = e.MatchRecord = e.HasWalkedCache = void 0;
		var t = l(), n = class e {
			store;
			constructor(e = /* @__PURE__ */ new Map()) {
				this.store = e;
			}
			copy() {
				return new e(new Map(this.store));
			}
			hasWalked(e, t) {
				return this.store.get(e.fullpath())?.has(t.globString());
			}
			storeWalked(e, t) {
				let n = e.fullpath(), r = this.store.get(n);
				r ? r.add(t.globString()) : this.store.set(n, /* @__PURE__ */ new Set([t.globString()]));
			}
		};
		e.HasWalkedCache = n;
		var r = class {
			store = /* @__PURE__ */ new Map();
			add(e, t, n) {
				let r = (t ? 2 : 0) | !!n, i = this.store.get(e);
				this.store.set(e, i === void 0 ? r : r & i);
			}
			entries() {
				return [...this.store.entries()].map(([e, t]) => [
					e,
					!!(t & 2),
					!!(t & 1)
				]);
			}
		};
		e.MatchRecord = r;
		var i = class {
			store = /* @__PURE__ */ new Map();
			add(e, t) {
				if (!e.canReaddir()) return;
				let n = this.store.get(e);
				n ? n.find((e) => e.globString() === t.globString()) || n.push(t) : this.store.set(e, [t]);
			}
			get(e) {
				let t = this.store.get(e);
				if (!t) throw Error("attempting to walk unknown path");
				return t;
			}
			entries() {
				return this.keys().map((e) => [e, this.store.get(e)]);
			}
			keys() {
				return [...this.store.keys()].filter((e) => e.canReaddir());
			}
		};
		e.SubWalks = i, e.Processor = class e {
			hasWalkedCache;
			matches = new r();
			subwalks = new i();
			patterns;
			follow;
			dot;
			opts;
			constructor(e, t) {
				this.opts = e, this.follow = !!e.follow, this.dot = !!e.dot, this.hasWalkedCache = t ? t.copy() : new n();
			}
			processPatterns(e, n) {
				this.patterns = n;
				let r = n.map((t) => [e, t]);
				for (let [e, n] of r) {
					this.hasWalkedCache.storeWalked(e, n);
					let r = n.root(), i = n.isAbsolute() && this.opts.absolute !== !1;
					if (r) {
						e = e.resolve(r === "/" && this.opts.root !== void 0 ? this.opts.root : r);
						let t = n.rest();
						if (t) n = t;
						else {
							this.matches.add(e, !0, !1);
							continue;
						}
					}
					if (e.isENOENT()) continue;
					let a, o, s = !1;
					for (; typeof (a = n.pattern()) == "string" && (o = n.rest());) e = e.resolve(a), n = o, s = !0;
					if (a = n.pattern(), o = n.rest(), s) {
						if (this.hasWalkedCache.hasWalked(e, n)) continue;
						this.hasWalkedCache.storeWalked(e, n);
					}
					if (typeof a == "string") {
						let t = a === ".." || a === "" || a === ".";
						this.matches.add(e.resolve(a), i, t);
						continue;
					} else if (a === t.GLOBSTAR) {
						(!e.isSymbolicLink() || this.follow || n.checkFollowGlobstar()) && this.subwalks.add(e, n);
						let t = o?.pattern(), r = o?.rest();
						if (!o || (t === "" || t === ".") && !r) this.matches.add(e, i, t === "" || t === ".");
						else if (t === "..") {
							let t = e.parent || e;
							r ? this.hasWalkedCache.hasWalked(t, r) || this.subwalks.add(t, r) : this.matches.add(t, i, !0);
						}
					} else a instanceof RegExp && this.subwalks.add(e, n);
				}
				return this;
			}
			subwalkTargets() {
				return this.subwalks.keys();
			}
			child() {
				return new e(this.opts, this.hasWalkedCache);
			}
			filterEntries(e, n) {
				let r = this.subwalks.get(e), i = this.child();
				for (let e of n) for (let n of r) {
					let r = n.isAbsolute(), a = n.pattern(), o = n.rest();
					a === t.GLOBSTAR ? i.testGlobstar(e, n, o, r) : a instanceof RegExp ? i.testRegExp(e, a, o, r) : i.testString(e, a, o, r);
				}
				return i;
			}
			testGlobstar(e, t, n, r) {
				if ((this.dot || !e.name.startsWith(".")) && (t.hasMore() || this.matches.add(e, r, !1), e.canReaddir() && (this.follow || !e.isSymbolicLink() ? this.subwalks.add(e, t) : e.isSymbolicLink() && (n && t.checkFollowGlobstar() ? this.subwalks.add(e, n) : t.markFollowGlobstar() && this.subwalks.add(e, t)))), n) {
					let t = n.pattern();
					if (typeof t == "string" && t !== ".." && t !== "" && t !== ".") this.testString(e, t, n.rest(), r);
					else if (t === "..") {
						let t = e.parent || e;
						this.subwalks.add(t, n);
					} else t instanceof RegExp && this.testRegExp(e, t, n.rest(), r);
				}
			}
			testRegExp(e, t, n, r) {
				t.test(e.name) && (n ? this.subwalks.add(e, n) : this.matches.add(e, r, !1));
			}
			testString(e, t, n, r) {
				e.isNamed(t) && (n ? this.subwalks.add(e, n) : this.matches.add(e, r, !1));
			}
		};
	}), g = t((e) => {
		Object.defineProperty(e, "__esModule", { value: !0 }), e.GlobStream = e.GlobWalker = e.GlobUtil = void 0;
		var t = d(), n = m(), r = h(), i = (e, t) => typeof e == "string" ? new n.Ignore([e], t) : Array.isArray(e) ? new n.Ignore(e, t) : e, a = class {
			path;
			patterns;
			opts;
			seen = /* @__PURE__ */ new Set();
			paused = !1;
			aborted = !1;
			#e = [];
			#t;
			#n;
			signal;
			maxDepth;
			includeChildMatches;
			constructor(e, t, n) {
				if (this.patterns = e, this.path = t, this.opts = n, this.#n = !n.posix && n.platform === "win32" ? "\\" : "/", this.includeChildMatches = n.includeChildMatches !== !1, (n.ignore || !this.includeChildMatches) && (this.#t = i(n.ignore ?? [], n), !this.includeChildMatches && typeof this.#t.add != "function")) throw Error("cannot ignore child matches, ignore lacks add() method.");
				this.maxDepth = n.maxDepth || Infinity, n.signal && (this.signal = n.signal, this.signal.addEventListener("abort", () => {
					this.#e.length = 0;
				}));
			}
			#r(e) {
				return this.seen.has(e) || !!this.#t?.ignored?.(e);
			}
			#i(e) {
				return !!this.#t?.childrenIgnored?.(e);
			}
			pause() {
				this.paused = !0;
			}
			resume() {
				if (this.signal?.aborted) return;
				this.paused = !1;
				let e;
				for (; !this.paused && (e = this.#e.shift());) e();
			}
			onResume(e) {
				this.signal?.aborted || (this.paused ? this.#e.push(e) : e());
			}
			async matchCheck(e, t) {
				if (t && this.opts.nodir) return;
				let n;
				if (this.opts.realpath) {
					if (n = e.realpathCached() || await e.realpath(), !n) return;
					e = n;
				}
				let r = e.isUnknown() || this.opts.stat ? await e.lstat() : e;
				if (this.opts.follow && this.opts.nodir && r?.isSymbolicLink()) {
					let e = await r.realpath();
					e && (e.isUnknown() || this.opts.stat) && await e.lstat();
				}
				return this.matchCheckTest(r, t);
			}
			matchCheckTest(e, t) {
				return e && (this.maxDepth === Infinity || e.depth() <= this.maxDepth) && (!t || e.canReaddir()) && (!this.opts.nodir || !e.isDirectory()) && (!this.opts.nodir || !this.opts.follow || !e.isSymbolicLink() || !e.realpathCached()?.isDirectory()) && !this.#r(e) ? e : void 0;
			}
			matchCheckSync(e, t) {
				if (t && this.opts.nodir) return;
				let n;
				if (this.opts.realpath) {
					if (n = e.realpathCached() || e.realpathSync(), !n) return;
					e = n;
				}
				let r = e.isUnknown() || this.opts.stat ? e.lstatSync() : e;
				if (this.opts.follow && this.opts.nodir && r?.isSymbolicLink()) {
					let e = r.realpathSync();
					e && (e?.isUnknown() || this.opts.stat) && e.lstatSync();
				}
				return this.matchCheckTest(r, t);
			}
			matchFinish(e, t) {
				if (this.#r(e)) return;
				if (!this.includeChildMatches && this.#t?.add) {
					let t = `${e.relativePosix()}/**`;
					this.#t.add(t);
				}
				let n = this.opts.absolute === void 0 ? t : this.opts.absolute;
				this.seen.add(e);
				let r = this.opts.mark && e.isDirectory() ? this.#n : "";
				if (this.opts.withFileTypes) this.matchEmit(e);
				else if (n) {
					let t = this.opts.posix ? e.fullpathPosix() : e.fullpath();
					this.matchEmit(t + r);
				} else {
					let t = this.opts.posix ? e.relativePosix() : e.relative(), n = this.opts.dotRelative && !t.startsWith(".." + this.#n) ? "." + this.#n : "";
					this.matchEmit(t ? n + t + r : "." + r);
				}
			}
			async match(e, t, n) {
				let r = await this.matchCheck(e, n);
				r && this.matchFinish(r, t);
			}
			matchSync(e, t, n) {
				let r = this.matchCheckSync(e, n);
				r && this.matchFinish(r, t);
			}
			walkCB(e, t, n) {
				this.signal?.aborted && n(), this.walkCB2(e, t, new r.Processor(this.opts), n);
			}
			walkCB2(e, t, n, r) {
				if (this.#i(e)) return r();
				if (this.signal?.aborted && r(), this.paused) {
					this.onResume(() => this.walkCB2(e, t, n, r));
					return;
				}
				n.processPatterns(e, t);
				let i = 1, a = () => {
					--i === 0 && r();
				};
				for (let [e, t, r] of n.matches.entries()) this.#r(e) || (i++, this.match(e, t, r).then(() => a()));
				for (let e of n.subwalkTargets()) {
					if (this.maxDepth !== Infinity && e.depth() >= this.maxDepth) continue;
					i++;
					let t = e.readdirCached();
					e.calledReaddir() ? this.walkCB3(e, t, n, a) : e.readdirCB((t, r) => this.walkCB3(e, r, n, a), !0);
				}
				a();
			}
			walkCB3(e, t, n, r) {
				n = n.filterEntries(e, t);
				let i = 1, a = () => {
					--i === 0 && r();
				};
				for (let [e, t, r] of n.matches.entries()) this.#r(e) || (i++, this.match(e, t, r).then(() => a()));
				for (let [e, t] of n.subwalks.entries()) i++, this.walkCB2(e, t, n.child(), a);
				a();
			}
			walkCBSync(e, t, n) {
				this.signal?.aborted && n(), this.walkCB2Sync(e, t, new r.Processor(this.opts), n);
			}
			walkCB2Sync(e, t, n, r) {
				if (this.#i(e)) return r();
				if (this.signal?.aborted && r(), this.paused) {
					this.onResume(() => this.walkCB2Sync(e, t, n, r));
					return;
				}
				n.processPatterns(e, t);
				let i = 1, a = () => {
					--i === 0 && r();
				};
				for (let [e, t, r] of n.matches.entries()) this.#r(e) || this.matchSync(e, t, r);
				for (let e of n.subwalkTargets()) {
					if (this.maxDepth !== Infinity && e.depth() >= this.maxDepth) continue;
					i++;
					let t = e.readdirSync();
					this.walkCB3Sync(e, t, n, a);
				}
				a();
			}
			walkCB3Sync(e, t, n, r) {
				n = n.filterEntries(e, t);
				let i = 1, a = () => {
					--i === 0 && r();
				};
				for (let [e, t, r] of n.matches.entries()) this.#r(e) || this.matchSync(e, t, r);
				for (let [e, t] of n.subwalks.entries()) i++, this.walkCB2Sync(e, t, n.child(), a);
				a();
			}
		};
		e.GlobUtil = a, e.GlobWalker = class extends a {
			matches = /* @__PURE__ */ new Set();
			constructor(e, t, n) {
				super(e, t, n);
			}
			matchEmit(e) {
				this.matches.add(e);
			}
			async walk() {
				if (this.signal?.aborted) throw this.signal.reason;
				return this.path.isUnknown() && await this.path.lstat(), await new Promise((e, t) => {
					this.walkCB(this.path, this.patterns, () => {
						this.signal?.aborted ? t(this.signal.reason) : e(this.matches);
					});
				}), this.matches;
			}
			walkSync() {
				if (this.signal?.aborted) throw this.signal.reason;
				return this.path.isUnknown() && this.path.lstatSync(), this.walkCBSync(this.path, this.patterns, () => {
					if (this.signal?.aborted) throw this.signal.reason;
				}), this.matches;
			}
		}, e.GlobStream = class extends a {
			results;
			constructor(e, n, r) {
				super(e, n, r), this.results = new t.Minipass({
					signal: this.signal,
					objectMode: !0
				}), this.results.on("drain", () => this.resume()), this.results.on("resume", () => this.resume());
			}
			matchEmit(e) {
				this.results.write(e), this.results.flowing || this.pause();
			}
			stream() {
				let e = this.path;
				return e.isUnknown() ? e.lstat().then(() => {
					this.walkCB(e, this.patterns, () => this.results.end());
				}) : this.walkCB(e, this.patterns, () => this.results.end()), this.results;
			}
			streamSync() {
				return this.path.isUnknown() && this.path.lstatSync(), this.walkCBSync(this.path, this.patterns, () => this.results.end()), this.results;
			}
		};
	}), _ = t((e) => {
		Object.defineProperty(e, "__esModule", { value: !0 }), e.Glob = void 0;
		var t = l(), n = k("node:url"), r = f(), i = p(), a = g(), o = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux";
		e.Glob = class {
			absolute;
			cwd;
			root;
			dot;
			dotRelative;
			follow;
			ignore;
			magicalBraces;
			mark;
			matchBase;
			maxDepth;
			nobrace;
			nocase;
			nodir;
			noext;
			noglobstar;
			pattern;
			platform;
			realpath;
			scurry;
			stat;
			signal;
			windowsPathsNoEscape;
			withFileTypes;
			includeChildMatches;
			opts;
			patterns;
			constructor(e, a) {
				if (!a) throw TypeError("glob options required");
				if (this.withFileTypes = !!a.withFileTypes, this.signal = a.signal, this.follow = !!a.follow, this.dot = !!a.dot, this.dotRelative = !!a.dotRelative, this.nodir = !!a.nodir, this.mark = !!a.mark, a.cwd ? (a.cwd instanceof URL || a.cwd.startsWith("file://")) && (a.cwd = (0, n.fileURLToPath)(a.cwd)) : this.cwd = "", this.cwd = a.cwd || "", this.root = a.root, this.magicalBraces = !!a.magicalBraces, this.nobrace = !!a.nobrace, this.noext = !!a.noext, this.realpath = !!a.realpath, this.absolute = a.absolute, this.includeChildMatches = a.includeChildMatches !== !1, this.noglobstar = !!a.noglobstar, this.matchBase = !!a.matchBase, this.maxDepth = typeof a.maxDepth == "number" ? a.maxDepth : Infinity, this.stat = !!a.stat, this.ignore = a.ignore, this.withFileTypes && this.absolute !== void 0) throw Error("cannot set absolute and withFileTypes:true");
				if (typeof e == "string" && (e = [e]), this.windowsPathsNoEscape = !!a.windowsPathsNoEscape || a.allowWindowsEscape === !1, this.windowsPathsNoEscape && (e = e.map((e) => e.replace(/\\/g, "/"))), this.matchBase) {
					if (a.noglobstar) throw TypeError("base matching requires globstar");
					e = e.map((e) => e.includes("/") ? e : `./**/${e}`);
				}
				if (this.pattern = e, this.platform = a.platform || o, this.opts = {
					...a,
					platform: this.platform
				}, a.scurry) {
					if (this.scurry = a.scurry, a.nocase !== void 0 && a.nocase !== a.scurry.nocase) throw Error("nocase option contradicts provided scurry option");
				} else {
					let e = a.platform === "win32" ? r.PathScurryWin32 : a.platform === "darwin" ? r.PathScurryDarwin : a.platform ? r.PathScurryPosix : r.PathScurry;
					this.scurry = new e(this.cwd, {
						nocase: a.nocase,
						fs: a.fs
					});
				}
				this.nocase = this.scurry.nocase;
				let s = this.platform === "darwin" || this.platform === "win32", c = {
					braceExpandMax: 1e4,
					...a,
					dot: this.dot,
					matchBase: this.matchBase,
					nobrace: this.nobrace,
					nocase: this.nocase,
					nocaseMagicOnly: s,
					nocomment: !0,
					noext: this.noext,
					nonegate: !0,
					optimizationLevel: 2,
					platform: this.platform,
					windowsPathsNoEscape: this.windowsPathsNoEscape,
					debug: !!this.opts.debug
				}, [l, u] = this.pattern.map((e) => new t.Minimatch(e, c)).reduce((e, t) => (e[0].push(...t.set), e[1].push(...t.globParts), e), [[], []]);
				this.patterns = l.map((e, t) => {
					let n = u[t];
					if (!n) throw Error("invalid pattern object");
					return new i.Pattern(e, n, 0, this.platform);
				});
			}
			async walk() {
				return [...await new a.GlobWalker(this.patterns, this.scurry.cwd, {
					...this.opts,
					maxDepth: this.maxDepth === Infinity ? Infinity : this.maxDepth + this.scurry.cwd.depth(),
					platform: this.platform,
					nocase: this.nocase,
					includeChildMatches: this.includeChildMatches
				}).walk()];
			}
			walkSync() {
				return [...new a.GlobWalker(this.patterns, this.scurry.cwd, {
					...this.opts,
					maxDepth: this.maxDepth === Infinity ? Infinity : this.maxDepth + this.scurry.cwd.depth(),
					platform: this.platform,
					nocase: this.nocase,
					includeChildMatches: this.includeChildMatches
				}).walkSync()];
			}
			stream() {
				return new a.GlobStream(this.patterns, this.scurry.cwd, {
					...this.opts,
					maxDepth: this.maxDepth === Infinity ? Infinity : this.maxDepth + this.scurry.cwd.depth(),
					platform: this.platform,
					nocase: this.nocase,
					includeChildMatches: this.includeChildMatches
				}).stream();
			}
			streamSync() {
				return new a.GlobStream(this.patterns, this.scurry.cwd, {
					...this.opts,
					maxDepth: this.maxDepth === Infinity ? Infinity : this.maxDepth + this.scurry.cwd.depth(),
					platform: this.platform,
					nocase: this.nocase,
					includeChildMatches: this.includeChildMatches
				}).streamSync();
			}
			iterateSync() {
				return this.streamSync()[Symbol.iterator]();
			}
			[Symbol.iterator]() {
				return this.iterateSync();
			}
			iterate() {
				return this.stream()[Symbol.asyncIterator]();
			}
			[Symbol.asyncIterator]() {
				return this.iterate();
			}
		};
	}), v = t((e) => {
		Object.defineProperty(e, "__esModule", { value: !0 }), e.hasMagic = void 0;
		var t = l();
		e.hasMagic = (e, n = {}) => {
			Array.isArray(e) || (e = [e]);
			for (let r of e) if (new t.Minimatch(r, n).hasMagic()) return !0;
			return !1;
		};
	});
	Object.defineProperty(e, "__esModule", { value: !0 }), e.glob = e.sync = e.iterate = e.iterateSync = e.stream = e.streamSync = e.Ignore = e.hasMagic = e.Glob = e.unescape = e.escape = void 0, e.globStreamSync = E, e.globStream = D, e.globSync = O, e.globIterateSync = j, e.globIterate = M;
	var y = l(), b = _(), x = v(), S = l();
	Object.defineProperty(e, "escape", {
		enumerable: !0,
		get: function() {
			return S.escape;
		}
	}), Object.defineProperty(e, "unescape", {
		enumerable: !0,
		get: function() {
			return S.unescape;
		}
	});
	var C = _();
	Object.defineProperty(e, "Glob", {
		enumerable: !0,
		get: function() {
			return C.Glob;
		}
	});
	var w = v();
	Object.defineProperty(e, "hasMagic", {
		enumerable: !0,
		get: function() {
			return w.hasMagic;
		}
	});
	var T = m();
	Object.defineProperty(e, "Ignore", {
		enumerable: !0,
		get: function() {
			return T.Ignore;
		}
	});
	function E(e, t = {}) {
		return new b.Glob(e, t).streamSync();
	}
	function D(e, t = {}) {
		return new b.Glob(e, t).stream();
	}
	function O(e, t = {}) {
		return new b.Glob(e, t).walkSync();
	}
	async function A(e, t = {}) {
		return new b.Glob(e, t).walk();
	}
	function j(e, t = {}) {
		return new b.Glob(e, t).iterateSync();
	}
	function M(e, t = {}) {
		return new b.Glob(e, t).iterate();
	}
	e.streamSync = E, e.stream = Object.assign(D, { sync: E }), e.iterateSync = j, e.iterate = Object.assign(M, { sync: j }), e.sync = Object.assign(O, {
		stream: E,
		iterate: j
	}), e.glob = Object.assign(A, {
		glob: A,
		globSync: O,
		sync: e.sync,
		globStream: D,
		stream: e.stream,
		globStreamSync: E,
		streamSync: e.streamSync,
		globIterate: M,
		iterate: e.iterate,
		globIterateSync: j,
		iterateSync: e.iterateSync,
		Glob: b.Glob,
		hasMagic: x.hasMagic,
		escape: y.escape,
		unescape: y.unescape
	}), e.glob.glob = e.glob;
})), As = /* @__PURE__ */ w(((e, t) => {
	var { glob: n } = ks(), r = k("path"), i = (e) => e.split(r.win32.sep).join(r.posix.sep);
	t.exports = (e, t) => n(i(e), t);
})), js = /* @__PURE__ */ w(((e, t) => {
	var n = k("fs/promises"), r = xs(), { hasContent: i } = Ts();
	t.exports = a;
	async function a(e, t) {
		let a = await i(e, t);
		return a && a.sri ? (await n.rm(r(e, a.sri), {
			recursive: !0,
			force: !0
		}), !0) : !1;
	}
})), Ms = /* @__PURE__ */ w(((e, t) => {
	var { rm: n } = k("fs/promises"), r = As(), i = Ss(), a = Cs(), o = k("path"), s = js();
	t.exports = c, t.exports.entry = c;
	function c(e, t, n) {
		return a.clearMemoized(), i.delete(e, t, n);
	}
	t.exports.content = l;
	function l(e, t) {
		return a.clearMemoized(), s(e, t);
	}
	t.exports.all = u;
	async function u(e) {
		a.clearMemoized();
		let t = await r(o.join(e, "*(content-*|index-*)"), {
			silent: !0,
			nosort: !0
		});
		return Promise.all(t.map((e) => n(e, {
			recursive: !0,
			force: !0
		})));
	}
})), Ns = /* @__PURE__ */ w(((e, t) => {
	var { mkdir: n, readFile: r, rm: i, stat: a, truncate: o, writeFile: s } = k("fs/promises"), c = xs(), l = ws(), u = As(), d = Ss(), f = k("path"), p = zo(), m = (e, t) => Object.prototype.hasOwnProperty.call(e, t), h = (e) => ({
		concurrency: 20,
		log: { silly() {} },
		...e
	});
	t.exports = g;
	async function g(e, t) {
		t = h(t), t.log.silly("verify", "verifying cache at", e);
		let n = [
			_,
			y,
			b,
			S,
			w,
			T,
			v
		], r = {};
		for (let i of n) {
			let n = i.name, a = /* @__PURE__ */ new Date(), o = await i(e, t);
			o && Object.keys(o).forEach((e) => {
				r[e] = o[e];
			});
			let s = /* @__PURE__ */ new Date();
			r.runTime ||= {}, r.runTime[n] = s - a;
		}
		return r.runTime.total = r.endTime - r.startTime, t.log.silly("verify", "verification finished for", e, "in", `${r.runTime.total}ms`), r;
	}
	async function _() {
		return { startTime: /* @__PURE__ */ new Date() };
	}
	async function v() {
		return { endTime: /* @__PURE__ */ new Date() };
	}
	async function y(e, t) {
		return t.log.silly("verify", "fixing cache permissions"), await n(e, { recursive: !0 }), null;
	}
	async function b(e, t) {
		t.log.silly("verify", "garbage collecting content");
		let { default: n } = await Promise.resolve().then(() => (jh(), Oh)), r = d.lsStream(e), o = /* @__PURE__ */ new Set();
		r.on("data", (e) => {
			if (t.filter && !t.filter(e)) return;
			let n = p.parse(e.integrity);
			for (let e in n) o.add(n[e].toString());
		}), await new Promise((e, t) => {
			r.on("end", e).on("error", t);
		});
		let s = c.contentDir(e), l = await u(f.join(s, "**"), {
			follow: !1,
			nodir: !0,
			nosort: !0
		}), m = {
			verifiedContent: 0,
			reclaimedCount: 0,
			reclaimedSize: 0,
			badContentCount: 0,
			keptSize: 0
		};
		return await n(l, async (e) => {
			let t = e.split(/[/\\]/), n = t.slice(t.length - 3).join(""), r = t[t.length - 4], s = p.fromHex(n, r);
			if (o.has(s.toString())) {
				let t = await x(e, s);
				t.valid ? (m.verifiedContent++, m.keptSize += t.size) : (m.reclaimedCount++, m.badContentCount++, m.reclaimedSize += t.size);
			} else {
				m.reclaimedCount++;
				let t = await a(e);
				await i(e, {
					recursive: !0,
					force: !0
				}), m.reclaimedSize += t.size;
			}
			return m;
		}, { concurrency: t.concurrency }), m;
	}
	async function x(e, t) {
		let n = {};
		try {
			let { size: r } = await a(e);
			n.size = r, n.valid = !0, await p.checkStream(new l.ReadStream(e), t);
		} catch (t) {
			if (t.code === "ENOENT") return {
				size: 0,
				valid: !1
			};
			if (t.code !== "EINTEGRITY") throw t;
			await i(e, {
				recursive: !0,
				force: !0
			}), n.valid = !1;
		}
		return n;
	}
	async function S(e, t) {
		t.log.silly("verify", "rebuilding index");
		let { default: n } = await Promise.resolve().then(() => (jh(), Oh)), r = await d.ls(e), i = {
			missingContent: 0,
			rejectedEntries: 0,
			totalEntries: 0
		}, a = {};
		for (let n in r)
 /* istanbul ignore else */
		if (m(r, n)) {
			let o = d.hashKey(n), s = r[n], c = t.filter && !t.filter(s);
			c && i.rejectedEntries++, a[o] && !c ? a[o].push(s) : a[o] && c || (c ? (a[o] = [], a[o]._path = d.bucketPath(e, n)) : (a[o] = [s], a[o]._path = d.bucketPath(e, n)));
		}
		return await n(Object.keys(a), (n) => C(e, a[n], i, t), { concurrency: t.concurrency }), i;
	}
	async function C(e, t, n) {
		await o(t._path);
		for (let r of t) {
			let t = c(e, r.integrity);
			try {
				await a(t), await d.insert(e, r.key, r.integrity, {
					metadata: r.metadata,
					size: r.size,
					time: r.time
				}), n.totalEntries++;
			} catch (e) {
				if (e.code === "ENOENT") n.rejectedEntries++, n.missingContent++;
				else throw e;
			}
		}
	}
	function w(e, t) {
		return t.log.silly("verify", "cleaning tmp directory"), i(f.join(e, "tmp"), {
			recursive: !0,
			force: !0
		});
	}
	async function T(e, t) {
		let n = f.join(e, "_lastverified");
		return t.log.silly("verify", "writing verifile to " + n), s(n, `${Date.now()}`);
	}
	t.exports.lastRun = E;
	async function E(e) {
		let t = await r(f.join(e, "_lastverified"), { encoding: "utf8" });
		return /* @__PURE__ */ new Date(+t);
	}
})), Ps = /* @__PURE__ */ w(((e, t) => {
	var n = Es(), r = Os(), i = Ms(), a = Ns(), { clearMemoized: o } = Cs(), s = ns(), c = Ss();
	t.exports.index = {}, t.exports.index.compact = c.compact, t.exports.index.insert = c.insert, t.exports.ls = c.ls, t.exports.ls.stream = c.lsStream, t.exports.get = n, t.exports.get.byDigest = n.byDigest, t.exports.get.stream = n.stream, t.exports.get.stream.byDigest = n.stream.byDigest, t.exports.get.copy = n.copy, t.exports.get.copy.byDigest = n.copy.byDigest, t.exports.get.info = n.info, t.exports.get.hasContent = n.hasContent, t.exports.put = r, t.exports.put.stream = r.stream, t.exports.rm = i.entry, t.exports.rm.all = i.all, t.exports.rm.entry = t.exports.rm, t.exports.rm.content = i.content, t.exports.clearMemoized = o, t.exports.tmp = {}, t.exports.tmp.mkdir = s.mkdir, t.exports.tmp.withTmp = s.withTmp, t.exports.verify = a, t.exports.verify.lastRun = a.lastRun;
})), Fs = /* @__PURE__ */ w(((e, t) => {
	var n = Ko();
	t.exports = class extends n {
		#e = [];
		#t = /* @__PURE__ */ new Map();
		constructor(e, ...t) {
			/* istanbul ignore next - coverage disabled because this is pointless to test here */
			super(), this.#e = e.events, t.length && this.push(...t);
		}
		on(e, t) {
			return this.#e.includes(e) && this.#t.has(e) ? t(...this.#t.get(e)) : super.on(e, t);
		}
		emit(e, ...t) {
			return this.#e.includes(e) && this.#t.set(e, t), super.emit(e, ...t);
		}
	};
})), Is = /* @__PURE__ */ w(((e, t) => {
	var { URL: n, format: r } = k("url"), i = {
		auth: !1,
		fragment: !1,
		search: !0,
		unicode: !1
	};
	t.exports = (e) => `make-fetch-happen:request-cache:${r(new n(e.url), i)}`;
})), Ls = /* @__PURE__ */ w(((e, t) => {
	t.exports = { RetryOperation: class {
		#e = 1;
		#t = null;
		#n = [];
		#r = null;
		#i;
		#a = null;
		#o;
		#s;
		#c = null;
		#l;
		constructor(e, t = {}) {
			this.#o = [...e], this.#s = [...e], this.#l = t.unref, this.#i = t.maxRetryTime || Infinity, t.forever && (this.#t = [...this.#s]);
		}
		get timeouts() {
			return [...this.#s];
		}
		get errors() {
			return [...this.#n];
		}
		get attempts() {
			return this.#e;
		}
		get mainError() {
			let e = null;
			if (this.#n.length) {
				let t = 0, n = {};
				for (let r = 0; r < this.#n.length; r++) {
					let i = this.#n[r], { message: a } = i;
					n[a] || (n[a] = 0), n[a]++, n[a] >= t && (e = i, t = n[a]);
				}
			}
			return e;
		}
		reset() {
			this.#e = 1, this.#s = [...this.#o];
		}
		stop() {
			this.#c && clearTimeout(this.#c), this.#s = [], this.#t = null;
		}
		retry(e) {
			if (this.#n.push(e), (/* @__PURE__ */ new Date()).getTime() - this.#a >= this.#i) return this.#n.unshift(/* @__PURE__ */ Error("RetryOperation timeout occurred")), !1;
			let t = this.#s.shift();
			if (t === void 0) if (this.#t) this.#n.pop(), t = this.#t.at(-1);
			else return !1;
			return this.#c = setTimeout(() => {
				this.#e++, this.#r(this.#e);
			}, t), this.#l && this.#c.unref(), !0;
		}
		attempt(e) {
			this.#r = e, this.#a = (/* @__PURE__ */ new Date()).getTime(), this.#r(this.#e);
		}
	} };
})), Rs = /* @__PURE__ */ w(((e, t) => {
	var { RetryOperation: n } = Ls(), r = (e, t) => Math.min(Math.round((1 + (t.randomize ? Math.random() : 0)) * Math.max(t.minTimeout, 1) * t.factor ** +e), t.maxTimeout), i = (e) => e?.code === "EPROMISERETRY" && Object.hasOwn(e, "retried");
	t.exports = { promiseRetry: async (e, t = {}) => {
		let a = [];
		if (t instanceof Array) a = [...t];
		else {
			t.retries === Infinity && (t.forever = !0, delete t.retries);
			let e = {
				retries: 10,
				factor: 2,
				minTimeout: 1 * 1e3,
				maxTimeout: Infinity,
				randomize: !1,
				...t
			};
			if (e.minTimeout > e.maxTimeout) throw Error("minTimeout is greater than maxTimeout");
			if (e.retries) {
				for (let t = 0; t < e.retries; t++) a.push(r(t, e));
				a.sort((e, t) => e - t);
			} else t.forever && a.push(r(0, e));
		}
		let o = new n(a, {
			forever: t.forever,
			unref: t.unref,
			maxRetryTime: t.maxRetryTime
		});
		return new Promise(function(t, n) {
			o.attempt(async (r) => {
				try {
					return t(await e((e) => {
						throw Object.assign(/* @__PURE__ */ Error("Retrying"), {
							code: "EPROMISERETRY",
							retried: e
						});
					}, r, o));
				} catch (e) {
					if (!i(e)) return n(e);
					if (!o.retry(e.retried || /* @__PURE__ */ Error())) return n(e.retried);
				}
			});
		});
	} };
})), zs = /* @__PURE__ */ w(((e, t) => {
	var { LRUCache: n } = zn(), r = k("dns"), i = new n({ max: 50 });
	t.exports = {
		cache: i,
		getOptions: ({ family: e = 0, hints: t = r.ADDRCONFIG, all: n = !1, verbatim: a = void 0, ttl: o = 300 * 1e3, lookup: s = r.lookup }) => ({
			hints: t,
			lookup: (r, ...c) => {
				let l = c.pop(), u = c[0] ?? {}, d = {
					family: e,
					hints: t,
					all: n,
					verbatim: a,
					...typeof u == "number" ? { family: u } : u
				}, f = JSON.stringify({
					hostname: r,
					...d
				});
				if (i.has(f)) {
					let e = i.get(f);
					return process.nextTick(l, null, ...e);
				}
				s(r, d, (e, ...t) => e ? l(e) : (i.set(f, t, { ttl: o }), l(null, ...t)));
			}
		})
	};
})), Bs = /* @__PURE__ */ w(((e, t) => {
	var n = zs(), r = (e) => {
		let t = parseInt(e.family ?? "0", 10), r = e.keepAlive ?? !0, i = {
			keepAliveMsecs: r ? 1e3 : void 0,
			maxSockets: e.maxSockets ?? 15,
			maxTotalSockets: Infinity,
			maxFreeSockets: r ? 256 : void 0,
			scheduling: "fifo",
			...e,
			family: t,
			keepAlive: r,
			timeouts: {
				idle: e.timeout ?? 0,
				connection: 0,
				response: 0,
				transfer: 0,
				...e.timeouts
			},
			...n.getOptions({
				family: t,
				...e.dns
			})
		};
		return delete i.timeout, delete i.headers, i;
	}, i = (e) => {
		let t = "", n = Object.entries(e).sort((e, t) => e[0] - t[0]);
		for (let [e, r] of n) r == null ? r = "null" : r instanceof URL ? r = r.toString() : typeof r == "object" && (r = i(r)), t += `${e}:${r}:`;
		return t;
	};
	t.exports = {
		normalizeOptions: r,
		cacheOptions: ({ secureEndpoint: e, ...t }) => i({
			secureEndpoint: !!e,
			family: t.family,
			hints: t.hints,
			localAddress: t.localAddress,
			strictSsl: e ? !!t.rejectUnauthorized : !1,
			ca: e ? t.ca : null,
			cert: e ? t.cert : null,
			key: e ? t.key : null,
			keepAlive: t.keepAlive,
			keepAliveMsecs: t.keepAliveMsecs,
			maxSockets: t.maxSockets,
			maxTotalSockets: t.maxTotalSockets,
			maxFreeSockets: t.maxFreeSockets,
			scheduling: t.scheduling,
			timeouts: t.timeouts,
			proxy: t.proxy
		})
	};
})), Vs = /* @__PURE__ */ w(((e, t) => {
	var n = 1e3, r = n * 60, i = r * 60, a = i * 24, o = a * 7, s = a * 365.25;
	t.exports = function(e, t) {
		t ||= {};
		var n = typeof e;
		if (n === "string" && e.length > 0) return c(e);
		if (n === "number" && isFinite(e)) return t.long ? u(e) : l(e);
		throw Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(e));
	};
	function c(e) {
		if (e = String(e), !(e.length > 100)) {
			var t = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);
			if (t) {
				var c = parseFloat(t[1]);
				switch ((t[2] || "ms").toLowerCase()) {
					case "years":
					case "year":
					case "yrs":
					case "yr":
					case "y": return c * s;
					case "weeks":
					case "week":
					case "w": return c * o;
					case "days":
					case "day":
					case "d": return c * a;
					case "hours":
					case "hour":
					case "hrs":
					case "hr":
					case "h": return c * i;
					case "minutes":
					case "minute":
					case "mins":
					case "min":
					case "m": return c * r;
					case "seconds":
					case "second":
					case "secs":
					case "sec":
					case "s": return c * n;
					case "milliseconds":
					case "millisecond":
					case "msecs":
					case "msec":
					case "ms": return c;
					default: return;
				}
			}
		}
	}
	function l(e) {
		var t = Math.abs(e);
		return t >= a ? Math.round(e / a) + "d" : t >= i ? Math.round(e / i) + "h" : t >= r ? Math.round(e / r) + "m" : t >= n ? Math.round(e / n) + "s" : e + "ms";
	}
	function u(e) {
		var t = Math.abs(e);
		return t >= a ? d(e, t, a, "day") : t >= i ? d(e, t, i, "hour") : t >= r ? d(e, t, r, "minute") : t >= n ? d(e, t, n, "second") : e + " ms";
	}
	function d(e, t, n, r) {
		var i = t >= n * 1.5;
		return Math.round(e / n) + " " + r + (i ? "s" : "");
	}
})), Hs = /* @__PURE__ */ w(((e, t) => {
	function n(e) {
		n.debug = n, n.default = n, n.coerce = c, n.disable = o, n.enable = i, n.enabled = s, n.humanize = Vs(), n.destroy = l, Object.keys(e).forEach((t) => {
			n[t] = e[t];
		}), n.names = [], n.skips = [], n.formatters = {};
		function t(e) {
			let t = 0;
			for (let n = 0; n < e.length; n++) t = (t << 5) - t + e.charCodeAt(n), t |= 0;
			return n.colors[Math.abs(t) % n.colors.length];
		}
		n.selectColor = t;
		function n(e) {
			let t, i = null, a, o;
			function s(...e) {
				if (!s.enabled) return;
				let r = s, i = Number(/* @__PURE__ */ new Date());
				r.diff = i - (t || i), r.prev = t, r.curr = i, t = i, e[0] = n.coerce(e[0]), typeof e[0] != "string" && e.unshift("%O");
				let a = 0;
				e[0] = e[0].replace(/%([a-zA-Z%])/g, (t, i) => {
					if (t === "%%") return "%";
					a++;
					let o = n.formatters[i];
					if (typeof o == "function") {
						let n = e[a];
						t = o.call(r, n), e.splice(a, 1), a--;
					}
					return t;
				}), n.formatArgs.call(r, e), (r.log || n.log).apply(r, e);
			}
			return s.namespace = e, s.useColors = n.useColors(), s.color = n.selectColor(e), s.extend = r, s.destroy = n.destroy, Object.defineProperty(s, "enabled", {
				enumerable: !0,
				configurable: !1,
				get: () => i === null ? (a !== n.namespaces && (a = n.namespaces, o = n.enabled(e)), o) : i,
				set: (e) => {
					i = e;
				}
			}), typeof n.init == "function" && n.init(s), s;
		}
		function r(e, t) {
			let r = n(this.namespace + (t === void 0 ? ":" : t) + e);
			return r.log = this.log, r;
		}
		function i(e) {
			n.save(e), n.namespaces = e, n.names = [], n.skips = [];
			let t = (typeof e == "string" ? e : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
			for (let e of t) e[0] === "-" ? n.skips.push(e.slice(1)) : n.names.push(e);
		}
		function a(e, t) {
			let n = 0, r = 0, i = -1, a = 0;
			for (; n < e.length;) if (r < t.length && (t[r] === e[n] || t[r] === "*")) t[r] === "*" ? (i = r, a = n, r++) : (n++, r++);
			else if (i !== -1) r = i + 1, a++, n = a;
			else return !1;
			for (; r < t.length && t[r] === "*";) r++;
			return r === t.length;
		}
		function o() {
			let e = [...n.names, ...n.skips.map((e) => "-" + e)].join(",");
			return n.enable(""), e;
		}
		function s(e) {
			for (let t of n.skips) if (a(e, t)) return !1;
			for (let t of n.names) if (a(e, t)) return !0;
			return !1;
		}
		function c(e) {
			return e instanceof Error ? e.stack || e.message : e;
		}
		function l() {
			console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
		}
		return n.enable(n.load()), n;
	}
	t.exports = n;
})), Us = /* @__PURE__ */ w(((e, t) => {
	e.formatArgs = r, e.save = i, e.load = a, e.useColors = n, e.storage = o(), e.destroy = (() => {
		let e = !1;
		return () => {
			e || (e = !0, console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));
		};
	})(), e.colors = /* @__PURE__ */ "#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".split(".");
	function n() {
		if (typeof window < "u" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) return !0;
		if (typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) return !1;
		let e;
		return typeof document < "u" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window < "u" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator < "u" && navigator.userAgent && (e = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(e[1], 10) >= 31 || typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
	}
	function r(e) {
		if (e[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + e[0] + (this.useColors ? "%c " : " ") + "+" + t.exports.humanize(this.diff), !this.useColors) return;
		let n = "color: " + this.color;
		e.splice(1, 0, n, "color: inherit");
		let r = 0, i = 0;
		e[0].replace(/%[a-zA-Z%]/g, (e) => {
			e !== "%%" && (r++, e === "%c" && (i = r));
		}), e.splice(i, 0, n);
	}
	e.log = console.debug || console.log || (() => {});
	function i(t) {
		try {
			t ? e.storage.setItem("debug", t) : e.storage.removeItem("debug");
		} catch {}
	}
	function a() {
		let t;
		try {
			t = e.storage.getItem("debug") || e.storage.getItem("DEBUG");
		} catch {}
		return !t && typeof process < "u" && "env" in process && (t = process.env.DEBUG), t;
	}
	function o() {
		try {
			return localStorage;
		} catch {}
	}
	t.exports = Hs()(e);
	var { formatters: s } = t.exports;
	s.j = function(e) {
		try {
			return JSON.stringify(e);
		} catch (e) {
			return "[UnexpectedJSONParseError]: " + e.message;
		}
	};
})), Ws = /* @__PURE__ */ w(((e, t) => {
	t.exports = (e, t = process.argv) => {
		let n = e.startsWith("-") ? "" : e.length === 1 ? "-" : "--", r = t.indexOf(n + e), i = t.indexOf("--");
		return r !== -1 && (i === -1 || r < i);
	};
})), Gs = /* @__PURE__ */ w(((e, t) => {
	var n = k("os"), r = k("tty"), i = Ws(), { env: a } = process, o;
	i("no-color") || i("no-colors") || i("color=false") || i("color=never") ? o = 0 : (i("color") || i("colors") || i("color=true") || i("color=always")) && (o = 1);
	function s() {
		if ("FORCE_COLOR" in a) return a.FORCE_COLOR === "true" ? 1 : a.FORCE_COLOR === "false" ? 0 : a.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(a.FORCE_COLOR, 10), 3);
	}
	function c(e) {
		return e === 0 ? !1 : {
			level: e,
			hasBasic: !0,
			has256: e >= 2,
			has16m: e >= 3
		};
	}
	function l(e, { streamIsTTY: t, sniffFlags: r = !0 } = {}) {
		let c = s();
		c !== void 0 && (o = c);
		let l = r ? o : c;
		if (l === 0) return 0;
		if (r) {
			if (i("color=16m") || i("color=full") || i("color=truecolor")) return 3;
			if (i("color=256")) return 2;
		}
		if (e && !t && l === void 0) return 0;
		let u = l || 0;
		if (a.TERM === "dumb") return u;
		if (process.platform === "win32") {
			let e = n.release().split(".");
			return Number(e[0]) >= 10 && Number(e[2]) >= 10586 ? Number(e[2]) >= 14931 ? 3 : 2 : 1;
		}
		if ("CI" in a) return [
			"TRAVIS",
			"CIRCLECI",
			"APPVEYOR",
			"GITLAB_CI",
			"GITHUB_ACTIONS",
			"BUILDKITE",
			"DRONE"
		].some((e) => e in a) || a.CI_NAME === "codeship" ? 1 : u;
		if ("TEAMCITY_VERSION" in a) return +!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION);
		if (a.COLORTERM === "truecolor") return 3;
		if ("TERM_PROGRAM" in a) {
			let e = Number.parseInt((a.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
			switch (a.TERM_PROGRAM) {
				case "iTerm.app": return e >= 3 ? 3 : 2;
				case "Apple_Terminal": return 2;
			}
		}
		return /-256(color)?$/i.test(a.TERM) ? 2 : /^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM) || "COLORTERM" in a ? 1 : u;
	}
	function u(e, t = {}) {
		return c(l(e, {
			streamIsTTY: e && e.isTTY,
			...t
		}));
	}
	t.exports = {
		supportsColor: u,
		stdout: u({ isTTY: r.isatty(1) }),
		stderr: u({ isTTY: r.isatty(2) })
	};
})), Ks = /* @__PURE__ */ w(((e, t) => {
	var n = k("tty"), r = k("util");
	e.init = u, e.log = s, e.formatArgs = a, e.save = c, e.load = l, e.useColors = i, e.destroy = r.deprecate(() => {}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."), e.colors = [
		6,
		2,
		3,
		4,
		5,
		1
	];
	try {
		let t = Gs();
		t && (t.stderr || t).level >= 2 && (e.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 {}
	e.inspectOpts = Object.keys(process.env).filter((e) => /^debug_/i.test(e)).reduce((e, t) => {
		let n = t.substring(6).toLowerCase().replace(/_([a-z])/g, (e, t) => t.toUpperCase()), r = process.env[t];
		return r = /^(yes|on|true|enabled)$/i.test(r) ? !0 : /^(no|off|false|disabled)$/i.test(r) ? !1 : r === "null" ? null : Number(r), e[n] = r, e;
	}, {});
	function i() {
		return "colors" in e.inspectOpts ? !!e.inspectOpts.colors : n.isatty(process.stderr.fd);
	}
	function a(e) {
		let { namespace: n, useColors: r } = this;
		if (r) {
			let r = this.color, i = "\x1B[3" + (r < 8 ? r : "8;5;" + r), a = `  ${i};1m${n} \u001B[0m`;
			e[0] = a + e[0].split("\n").join("\n" + a), e.push(i + "m+" + t.exports.humanize(this.diff) + "\x1B[0m");
		} else e[0] = o() + n + " " + e[0];
	}
	function o() {
		return e.inspectOpts.hideDate ? "" : (/* @__PURE__ */ new Date()).toISOString() + " ";
	}
	function s(...t) {
		return process.stderr.write(r.formatWithOptions(e.inspectOpts, ...t) + "\n");
	}
	function c(e) {
		e ? process.env.DEBUG = e : delete process.env.DEBUG;
	}
	function l() {
		return process.env.DEBUG;
	}
	function u(t) {
		t.inspectOpts = {};
		let n = Object.keys(e.inspectOpts);
		for (let r = 0; r < n.length; r++) t.inspectOpts[n[r]] = e.inspectOpts[n[r]];
	}
	t.exports = Hs()(e);
	var { formatters: d } = t.exports;
	d.o = function(e) {
		return this.inspectOpts.colors = this.useColors, r.inspect(e, this.inspectOpts).split("\n").map((e) => e.trim()).join(" ");
	}, d.O = function(e) {
		return this.inspectOpts.colors = this.useColors, r.inspect(e, this.inspectOpts);
	};
})), qs = /* @__PURE__ */ w(((e, t) => {
	typeof process > "u" || process.type === "renderer" || process.browser === !0 || process.__nwjs ? t.exports = Us() : t.exports = Ks();
})), Js = /* @__PURE__ */ w(((e) => {
	var t = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
		r === void 0 && (r = n);
		var i = Object.getOwnPropertyDescriptor(t, n);
		(!i || ("get" in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
			enumerable: !0,
			get: function() {
				return t[n];
			}
		}), Object.defineProperty(e, r, i);
	}) : (function(e, t, n, r) {
		r === void 0 && (r = n), e[r] = t[n];
	})), n = e && e.__setModuleDefault || (Object.create ? (function(e, t) {
		Object.defineProperty(e, "default", {
			enumerable: !0,
			value: t
		});
	}) : function(e, t) {
		e.default = t;
	}), r = e && e.__importStar || function(e) {
		if (e && e.__esModule) return e;
		var r = {};
		if (e != null) for (var i in e) i !== "default" && Object.prototype.hasOwnProperty.call(e, i) && t(r, e, i);
		return n(r, e), r;
	};
	Object.defineProperty(e, "__esModule", { value: !0 }), e.req = e.json = e.toBuffer = void 0;
	var i = r(k("http")), a = r(k("https"));
	async function o(e) {
		let t = 0, n = [];
		for await (let r of e) t += r.length, n.push(r);
		return Buffer.concat(n, t);
	}
	e.toBuffer = o;
	async function s(e) {
		let t = (await o(e)).toString("utf8");
		try {
			return JSON.parse(t);
		} catch (e) {
			let n = e;
			throw n.message += ` (input: ${t})`, n;
		}
	}
	e.json = s;
	function c(e, t = {}) {
		let n = ((typeof e == "string" ? e : e.href).startsWith("https:") ? a : i).request(e, t), r = new Promise((e, t) => {
			n.once("response", e).once("error", t).end();
		});
		return n.then = r.then.bind(r), n;
	}
	e.req = c;
})), Ys = /* @__PURE__ */ w(((e) => {
	var t = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
		r === void 0 && (r = n);
		var i = Object.getOwnPropertyDescriptor(t, n);
		(!i || ("get" in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
			enumerable: !0,
			get: function() {
				return t[n];
			}
		}), Object.defineProperty(e, r, i);
	}) : (function(e, t, n, r) {
		r === void 0 && (r = n), e[r] = t[n];
	})), n = e && e.__setModuleDefault || (Object.create ? (function(e, t) {
		Object.defineProperty(e, "default", {
			enumerable: !0,
			value: t
		});
	}) : function(e, t) {
		e.default = t;
	}), r = e && e.__importStar || function(e) {
		if (e && e.__esModule) return e;
		var r = {};
		if (e != null) for (var i in e) i !== "default" && Object.prototype.hasOwnProperty.call(e, i) && t(r, e, i);
		return n(r, e), r;
	}, i = e && e.__exportStar || function(e, n) {
		for (var r in e) r !== "default" && !Object.prototype.hasOwnProperty.call(n, r) && t(n, e, r);
	};
	Object.defineProperty(e, "__esModule", { value: !0 }), e.Agent = void 0;
	var a = r(k("net")), o = r(k("http")), s = k("https");
	i(Js(), e);
	var c = Symbol("AgentBaseInternalState");
	e.Agent = class extends o.Agent {
		constructor(e) {
			super(e), this[c] = {};
		}
		isSecureEndpoint(e) {
			if (e) {
				if (typeof e.secureEndpoint == "boolean") return e.secureEndpoint;
				if (typeof e.protocol == "string") return e.protocol === "https:";
			}
			let { stack: t } = /* @__PURE__ */ Error();
			return typeof t == "string" ? t.split("\n").some((e) => e.indexOf("(https.js:") !== -1 || e.indexOf("node:https:") !== -1) : !1;
		}
		incrementSockets(e) {
			if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) return null;
			this.sockets[e] || (this.sockets[e] = []);
			let t = new a.Socket({ writable: !1 });
			return this.sockets[e].push(t), this.totalSocketCount++, t;
		}
		decrementSockets(e, t) {
			if (!this.sockets[e] || t === null) return;
			let n = this.sockets[e], r = n.indexOf(t);
			r !== -1 && (n.splice(r, 1), this.totalSocketCount--, n.length === 0 && delete this.sockets[e]);
		}
		getName(e) {
			return this.isSecureEndpoint(e) ? s.Agent.prototype.getName.call(this, e) : super.getName(e);
		}
		createSocket(e, t, n) {
			let r = {
				...t,
				secureEndpoint: this.isSecureEndpoint(t)
			}, i = this.getName(r), a = this.incrementSockets(i);
			Promise.resolve().then(() => this.connect(e, r)).then((s) => {
				if (this.decrementSockets(i, a), s instanceof o.Agent) try {
					return s.addRequest(e, r);
				} catch (e) {
					return n(e);
				}
				this[c].currentSocket = s, super.createSocket(e, t, n);
			}, (e) => {
				this.decrementSockets(i, a), n(e);
			});
		}
		createConnection() {
			let e = this[c].currentSocket;
			if (this[c].currentSocket = void 0, !e) throw Error("No socket was returned in the `connect()` function");
			return e;
		}
		get defaultPort() {
			return this[c].defaultPort ?? (this.protocol === "https:" ? 443 : 80);
		}
		set defaultPort(e) {
			this[c] && (this[c].defaultPort = e);
		}
		get protocol() {
			return this[c].protocol ?? (this.isSecureEndpoint() ? "https:" : "http:");
		}
		set protocol(e) {
			this[c] && (this[c].protocol = e);
		}
	};
})), Xs = /* @__PURE__ */ w(((e) => {
	var t = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
		r === void 0 && (r = n);
		var i = Object.getOwnPropertyDescriptor(t, n);
		(!i || ("get" in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
			enumerable: !0,
			get: function() {
				return t[n];
			}
		}), Object.defineProperty(e, r, i);
	}) : (function(e, t, n, r) {
		r === void 0 && (r = n), e[r] = t[n];
	})), n = e && e.__setModuleDefault || (Object.create ? (function(e, t) {
		Object.defineProperty(e, "default", {
			enumerable: !0,
			value: t
		});
	}) : function(e, t) {
		e.default = t;
	}), r = e && e.__importStar || function(e) {
		if (e && e.__esModule) return e;
		var r = {};
		if (e != null) for (var i in e) i !== "default" && Object.prototype.hasOwnProperty.call(e, i) && t(r, e, i);
		return n(r, e), r;
	}, i = e && e.__importDefault || function(e) {
		return e && e.__esModule ? e : { default: e };
	};
	Object.defineProperty(e, "__esModule", { value: !0 }), e.HttpProxyAgent = void 0;
	var a = r(k("net")), o = r(k("tls")), s = i(qs()), c = k("events"), l = Ys(), u = k("url"), d = (0, s.default)("http-proxy-agent"), f = class extends l.Agent {
		constructor(e, t) {
			super(t), this.proxy = typeof e == "string" ? new u.URL(e) : e, this.proxyHeaders = t?.headers ?? {}, d("Creating new HttpProxyAgent instance: %o", this.proxy.href);
			let n = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ""), r = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80;
			this.connectOpts = {
				...t ? p(t, "headers") : null,
				host: n,
				port: r
			};
		}
		addRequest(e, t) {
			e._header = null, this.setRequestProps(e, t), super.addRequest(e, t);
		}
		setRequestProps(e, t) {
			let { proxy: n } = this, r = `${t.secureEndpoint ? "https:" : "http:"}//${e.getHeader("host") || "localhost"}`, i = new u.URL(e.path, r);
			t.port !== 80 && (i.port = String(t.port)), e.path = String(i);
			let a = typeof this.proxyHeaders == "function" ? this.proxyHeaders() : { ...this.proxyHeaders };
			if (n.username || n.password) {
				let e = `${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;
				a["Proxy-Authorization"] = `Basic ${Buffer.from(e).toString("base64")}`;
			}
			a["Proxy-Connection"] ||= this.keepAlive ? "Keep-Alive" : "close";
			for (let t of Object.keys(a)) {
				let n = a[t];
				n && e.setHeader(t, n);
			}
		}
		async connect(e, t) {
			e._header = null, e.path.includes("://") || this.setRequestProps(e, t);
			let n, r;
			d("Regenerating stored HTTP header string for request"), e._implicitHeader(), e.outputData && e.outputData.length > 0 && (d("Patching connection write() output buffer with updated header"), n = e.outputData[0].data, r = n.indexOf("\r\n\r\n") + 4, e.outputData[0].data = e._header + n.substring(r), d("Output buffer: %o", e.outputData[0].data));
			let i;
			return this.proxy.protocol === "https:" ? (d("Creating `tls.Socket`: %o", this.connectOpts), i = o.connect(this.connectOpts)) : (d("Creating `net.Socket`: %o", this.connectOpts), i = a.connect(this.connectOpts)), await (0, c.once)(i, "connect"), i;
		}
	};
	f.protocols = ["http", "https"], e.HttpProxyAgent = f;
	function p(e, ...t) {
		let n = {}, r;
		for (r in e) t.includes(r) || (n[r] = e[r]);
		return n;
	}
})), Zs = /* @__PURE__ */ w(((e) => {
	var t = e && e.__importDefault || function(e) {
		return e && e.__esModule ? e : { default: e };
	};
	Object.defineProperty(e, "__esModule", { value: !0 }), e.parseProxyResponse = void 0;
	var n = (0, t(qs()).default)("https-proxy-agent:parse-proxy-response");
	function r(e) {
		return new Promise((t, r) => {
			let i = 0, a = [];
			function o() {
				let t = e.read();
				t ? u(t) : e.once("readable", o);
			}
			function s() {
				e.removeListener("end", c), e.removeListener("error", l), e.removeListener("readable", o);
			}
			function c() {
				s(), n("onend"), r(/* @__PURE__ */ Error("Proxy connection ended before receiving CONNECT response"));
			}
			function l(e) {
				s(), n("onerror %o", e), r(e);
			}
			function u(c) {
				a.push(c), i += c.length;
				let l = Buffer.concat(a, i), u = l.indexOf("\r\n\r\n");
				if (u === -1) {
					n("have not received end of HTTP headers yet..."), o();
					return;
				}
				let d = l.slice(0, u).toString("ascii").split("\r\n"), f = d.shift();
				if (!f) return e.destroy(), r(/* @__PURE__ */ Error("No header received from proxy CONNECT response"));
				let p = f.split(" "), m = +p[1], h = p.slice(2).join(" "), g = {};
				for (let t of d) {
					if (!t) continue;
					let n = t.indexOf(":");
					if (n === -1) return e.destroy(), r(/* @__PURE__ */ Error(`Invalid header from proxy CONNECT response: "${t}"`));
					let i = t.slice(0, n).toLowerCase(), a = t.slice(n + 1).trimStart(), o = g[i];
					typeof o == "string" ? g[i] = [o, a] : Array.isArray(o) ? o.push(a) : g[i] = a;
				}
				n("got proxy server response: %o %o", f, g), s(), t({
					connect: {
						statusCode: m,
						statusText: h,
						headers: g
					},
					buffered: l
				});
			}
			e.on("error", l), e.on("end", c), o();
		});
	}
	e.parseProxyResponse = r;
})), Qs = /* @__PURE__ */ w(((e) => {
	var t = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
		r === void 0 && (r = n);
		var i = Object.getOwnPropertyDescriptor(t, n);
		(!i || ("get" in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
			enumerable: !0,
			get: function() {
				return t[n];
			}
		}), Object.defineProperty(e, r, i);
	}) : (function(e, t, n, r) {
		r === void 0 && (r = n), e[r] = t[n];
	})), n = e && e.__setModuleDefault || (Object.create ? (function(e, t) {
		Object.defineProperty(e, "default", {
			enumerable: !0,
			value: t
		});
	}) : function(e, t) {
		e.default = t;
	}), r = e && e.__importStar || function(e) {
		if (e && e.__esModule) return e;
		var r = {};
		if (e != null) for (var i in e) i !== "default" && Object.prototype.hasOwnProperty.call(e, i) && t(r, e, i);
		return n(r, e), r;
	}, i = e && e.__importDefault || function(e) {
		return e && e.__esModule ? e : { default: e };
	};
	Object.defineProperty(e, "__esModule", { value: !0 }), e.HttpsProxyAgent = void 0;
	var a = r(k("net")), o = r(k("tls")), s = i(k("assert")), c = i(qs()), l = Ys(), u = k("url"), d = Zs(), f = (0, c.default)("https-proxy-agent"), p = (e) => e.servername === void 0 && e.host && !a.isIP(e.host) ? {
		...e,
		servername: e.host
	} : e, m = class extends l.Agent {
		constructor(e, t) {
			super(t), this.options = { path: void 0 }, this.proxy = typeof e == "string" ? new u.URL(e) : e, this.proxyHeaders = t?.headers ?? {}, f("Creating new HttpsProxyAgent instance: %o", this.proxy.href);
			let n = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ""), r = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80;
			this.connectOpts = {
				ALPNProtocols: ["http/1.1"],
				...t ? g(t, "headers") : null,
				host: n,
				port: r
			};
		}
		async connect(e, t) {
			let { proxy: n } = this;
			if (!t.host) throw TypeError("No \"host\" provided");
			let r;
			n.protocol === "https:" ? (f("Creating `tls.Socket`: %o", this.connectOpts), r = o.connect(p(this.connectOpts))) : (f("Creating `net.Socket`: %o", this.connectOpts), r = a.connect(this.connectOpts));
			let i = typeof this.proxyHeaders == "function" ? this.proxyHeaders() : { ...this.proxyHeaders }, c = a.isIPv6(t.host) ? `[${t.host}]` : t.host, l = `CONNECT ${c}:${t.port} HTTP/1.1\r\n`;
			if (n.username || n.password) {
				let e = `${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;
				i["Proxy-Authorization"] = `Basic ${Buffer.from(e).toString("base64")}`;
			}
			i.Host = `${c}:${t.port}`, i["Proxy-Connection"] ||= this.keepAlive ? "Keep-Alive" : "close";
			for (let e of Object.keys(i)) l += `${e}: ${i[e]}\r\n`;
			let u = (0, d.parseProxyResponse)(r);
			r.write(`${l}\r\n`);
			let { connect: m, buffered: _ } = await u;
			if (e.emit("proxyConnect", m), this.emit("proxyConnect", m, e), m.statusCode === 200) return e.once("socket", h), t.secureEndpoint ? (f("Upgrading socket connection to TLS"), o.connect({
				...g(p(t), "host", "path", "port"),
				socket: r
			})) : r;
			r.destroy();
			let v = new a.Socket({ writable: !1 });
			return v.readable = !0, e.once("socket", (e) => {
				f("Replaying proxy buffer for failed request"), (0, s.default)(e.listenerCount("data") > 0), e.push(_), e.push(null);
			}), v;
		}
	};
	m.protocols = ["http", "https"], e.HttpsProxyAgent = m;
	function h(e) {
		e.resume();
	}
	function g(e, ...t) {
		let n = {}, r;
		for (r in e) t.includes(r) || (n[r] = e[r]);
		return n;
	}
})), $s = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 });
	var t = k("buffer"), n = {
		INVALID_ENCODING: "Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",
		INVALID_SMARTBUFFER_SIZE: "Invalid size provided. Size must be a valid integer greater than zero.",
		INVALID_SMARTBUFFER_BUFFER: "Invalid Buffer provided in SmartBufferOptions.",
		INVALID_SMARTBUFFER_OBJECT: "Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",
		INVALID_OFFSET: "An invalid offset value was provided.",
		INVALID_OFFSET_NON_NUMBER: "An invalid offset value was provided. A numeric value is required.",
		INVALID_LENGTH: "An invalid length value was provided.",
		INVALID_LENGTH_NON_NUMBER: "An invalid length value was provived. A numeric value is required.",
		INVALID_TARGET_OFFSET: "Target offset is beyond the bounds of the internal SmartBuffer data.",
		INVALID_TARGET_LENGTH: "Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",
		INVALID_READ_BEYOND_BOUNDS: "Attempted to read beyond the bounds of the managed data.",
		INVALID_WRITE_BEYOND_BOUNDS: "Attempted to write beyond the bounds of the managed data."
	};
	e.ERRORS = n;
	function r(e) {
		if (!t.Buffer.isEncoding(e)) throw Error(n.INVALID_ENCODING);
	}
	e.checkEncoding = r;
	function i(e) {
		return typeof e == "number" && isFinite(e) && l(e);
	}
	e.isFiniteInteger = i;
	function a(e, t) {
		if (typeof e == "number") {
			if (!i(e) || e < 0) throw Error(t ? n.INVALID_OFFSET : n.INVALID_LENGTH);
		} else throw Error(t ? n.INVALID_OFFSET_NON_NUMBER : n.INVALID_LENGTH_NON_NUMBER);
	}
	function o(e) {
		a(e, !1);
	}
	e.checkLengthValue = o;
	function s(e) {
		a(e, !0);
	}
	e.checkOffsetValue = s;
	function c(e, t) {
		if (e < 0 || e > t.length) throw Error(n.INVALID_TARGET_OFFSET);
	}
	e.checkTargetOffset = c;
	function l(e) {
		return typeof e == "number" && isFinite(e) && Math.floor(e) === e;
	}
	function u(e) {
		if (typeof BigInt > "u") throw Error("Platform does not support JS BigInt type.");
		if (t.Buffer.prototype[e] === void 0) throw Error(`Platform does not support Buffer.prototype.${e}.`);
	}
	e.bigIntAndBufferInt64Check = u;
})), ec = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 });
	var t = $s(), n = 4096, r = "utf8";
	e.SmartBuffer = class e {
		constructor(i) {
			if (this.length = 0, this._encoding = r, this._writeOffset = 0, this._readOffset = 0, e.isSmartBufferOptions(i)) if (i.encoding && (t.checkEncoding(i.encoding), this._encoding = i.encoding), i.size) if (t.isFiniteInteger(i.size) && i.size > 0) this._buff = Buffer.allocUnsafe(i.size);
			else throw Error(t.ERRORS.INVALID_SMARTBUFFER_SIZE);
			else if (i.buff) if (Buffer.isBuffer(i.buff)) this._buff = i.buff, this.length = i.buff.length;
			else throw Error(t.ERRORS.INVALID_SMARTBUFFER_BUFFER);
			else this._buff = Buffer.allocUnsafe(n);
			else {
				if (i !== void 0) throw Error(t.ERRORS.INVALID_SMARTBUFFER_OBJECT);
				this._buff = Buffer.allocUnsafe(n);
			}
		}
		static fromSize(e, t) {
			return new this({
				size: e,
				encoding: t
			});
		}
		static fromBuffer(e, t) {
			return new this({
				buff: e,
				encoding: t
			});
		}
		static fromOptions(e) {
			return new this(e);
		}
		static isSmartBufferOptions(e) {
			let t = e;
			return t && (t.encoding !== void 0 || t.size !== void 0 || t.buff !== void 0);
		}
		readInt8(e) {
			return this._readNumberValue(Buffer.prototype.readInt8, 1, e);
		}
		readInt16BE(e) {
			return this._readNumberValue(Buffer.prototype.readInt16BE, 2, e);
		}
		readInt16LE(e) {
			return this._readNumberValue(Buffer.prototype.readInt16LE, 2, e);
		}
		readInt32BE(e) {
			return this._readNumberValue(Buffer.prototype.readInt32BE, 4, e);
		}
		readInt32LE(e) {
			return this._readNumberValue(Buffer.prototype.readInt32LE, 4, e);
		}
		readBigInt64BE(e) {
			return t.bigIntAndBufferInt64Check("readBigInt64BE"), this._readNumberValue(Buffer.prototype.readBigInt64BE, 8, e);
		}
		readBigInt64LE(e) {
			return t.bigIntAndBufferInt64Check("readBigInt64LE"), this._readNumberValue(Buffer.prototype.readBigInt64LE, 8, e);
		}
		writeInt8(e, t) {
			return this._writeNumberValue(Buffer.prototype.writeInt8, 1, e, t), this;
		}
		insertInt8(e, t) {
			return this._insertNumberValue(Buffer.prototype.writeInt8, 1, e, t);
		}
		writeInt16BE(e, t) {
			return this._writeNumberValue(Buffer.prototype.writeInt16BE, 2, e, t);
		}
		insertInt16BE(e, t) {
			return this._insertNumberValue(Buffer.prototype.writeInt16BE, 2, e, t);
		}
		writeInt16LE(e, t) {
			return this._writeNumberValue(Buffer.prototype.writeInt16LE, 2, e, t);
		}
		insertInt16LE(e, t) {
			return this._insertNumberValue(Buffer.prototype.writeInt16LE, 2, e, t);
		}
		writeInt32BE(e, t) {
			return this._writeNumberValue(Buffer.prototype.writeInt32BE, 4, e, t);
		}
		insertInt32BE(e, t) {
			return this._insertNumberValue(Buffer.prototype.writeInt32BE, 4, e, t);
		}
		writeInt32LE(e, t) {
			return this._writeNumberValue(Buffer.prototype.writeInt32LE, 4, e, t);
		}
		insertInt32LE(e, t) {
			return this._insertNumberValue(Buffer.prototype.writeInt32LE, 4, e, t);
		}
		writeBigInt64BE(e, n) {
			return t.bigIntAndBufferInt64Check("writeBigInt64BE"), this._writeNumberValue(Buffer.prototype.writeBigInt64BE, 8, e, n);
		}
		insertBigInt64BE(e, n) {
			return t.bigIntAndBufferInt64Check("writeBigInt64BE"), this._insertNumberValue(Buffer.prototype.writeBigInt64BE, 8, e, n);
		}
		writeBigInt64LE(e, n) {
			return t.bigIntAndBufferInt64Check("writeBigInt64LE"), this._writeNumberValue(Buffer.prototype.writeBigInt64LE, 8, e, n);
		}
		insertBigInt64LE(e, n) {
			return t.bigIntAndBufferInt64Check("writeBigInt64LE"), this._insertNumberValue(Buffer.prototype.writeBigInt64LE, 8, e, n);
		}
		readUInt8(e) {
			return this._readNumberValue(Buffer.prototype.readUInt8, 1, e);
		}
		readUInt16BE(e) {
			return this._readNumberValue(Buffer.prototype.readUInt16BE, 2, e);
		}
		readUInt16LE(e) {
			return this._readNumberValue(Buffer.prototype.readUInt16LE, 2, e);
		}
		readUInt32BE(e) {
			return this._readNumberValue(Buffer.prototype.readUInt32BE, 4, e);
		}
		readUInt32LE(e) {
			return this._readNumberValue(Buffer.prototype.readUInt32LE, 4, e);
		}
		readBigUInt64BE(e) {
			return t.bigIntAndBufferInt64Check("readBigUInt64BE"), this._readNumberValue(Buffer.prototype.readBigUInt64BE, 8, e);
		}
		readBigUInt64LE(e) {
			return t.bigIntAndBufferInt64Check("readBigUInt64LE"), this._readNumberValue(Buffer.prototype.readBigUInt64LE, 8, e);
		}
		writeUInt8(e, t) {
			return this._writeNumberValue(Buffer.prototype.writeUInt8, 1, e, t);
		}
		insertUInt8(e, t) {
			return this._insertNumberValue(Buffer.prototype.writeUInt8, 1, e, t);
		}
		writeUInt16BE(e, t) {
			return this._writeNumberValue(Buffer.prototype.writeUInt16BE, 2, e, t);
		}
		insertUInt16BE(e, t) {
			return this._insertNumberValue(Buffer.prototype.writeUInt16BE, 2, e, t);
		}
		writeUInt16LE(e, t) {
			return this._writeNumberValue(Buffer.prototype.writeUInt16LE, 2, e, t);
		}
		insertUInt16LE(e, t) {
			return this._insertNumberValue(Buffer.prototype.writeUInt16LE, 2, e, t);
		}
		writeUInt32BE(e, t) {
			return this._writeNumberValue(Buffer.prototype.writeUInt32BE, 4, e, t);
		}
		insertUInt32BE(e, t) {
			return this._insertNumberValue(Buffer.prototype.writeUInt32BE, 4, e, t);
		}
		writeUInt32LE(e, t) {
			return this._writeNumberValue(Buffer.prototype.writeUInt32LE, 4, e, t);
		}
		insertUInt32LE(e, t) {
			return this._insertNumberValue(Buffer.prototype.writeUInt32LE, 4, e, t);
		}
		writeBigUInt64BE(e, n) {
			return t.bigIntAndBufferInt64Check("writeBigUInt64BE"), this._writeNumberValue(Buffer.prototype.writeBigUInt64BE, 8, e, n);
		}
		insertBigUInt64BE(e, n) {
			return t.bigIntAndBufferInt64Check("writeBigUInt64BE"), this._insertNumberValue(Buffer.prototype.writeBigUInt64BE, 8, e, n);
		}
		writeBigUInt64LE(e, n) {
			return t.bigIntAndBufferInt64Check("writeBigUInt64LE"), this._writeNumberValue(Buffer.prototype.writeBigUInt64LE, 8, e, n);
		}
		insertBigUInt64LE(e, n) {
			return t.bigIntAndBufferInt64Check("writeBigUInt64LE"), this._insertNumberValue(Buffer.prototype.writeBigUInt64LE, 8, e, n);
		}
		readFloatBE(e) {
			return this._readNumberValue(Buffer.prototype.readFloatBE, 4, e);
		}
		readFloatLE(e) {
			return this._readNumberValue(Buffer.prototype.readFloatLE, 4, e);
		}
		writeFloatBE(e, t) {
			return this._writeNumberValue(Buffer.prototype.writeFloatBE, 4, e, t);
		}
		insertFloatBE(e, t) {
			return this._insertNumberValue(Buffer.prototype.writeFloatBE, 4, e, t);
		}
		writeFloatLE(e, t) {
			return this._writeNumberValue(Buffer.prototype.writeFloatLE, 4, e, t);
		}
		insertFloatLE(e, t) {
			return this._insertNumberValue(Buffer.prototype.writeFloatLE, 4, e, t);
		}
		readDoubleBE(e) {
			return this._readNumberValue(Buffer.prototype.readDoubleBE, 8, e);
		}
		readDoubleLE(e) {
			return this._readNumberValue(Buffer.prototype.readDoubleLE, 8, e);
		}
		writeDoubleBE(e, t) {
			return this._writeNumberValue(Buffer.prototype.writeDoubleBE, 8, e, t);
		}
		insertDoubleBE(e, t) {
			return this._insertNumberValue(Buffer.prototype.writeDoubleBE, 8, e, t);
		}
		writeDoubleLE(e, t) {
			return this._writeNumberValue(Buffer.prototype.writeDoubleLE, 8, e, t);
		}
		insertDoubleLE(e, t) {
			return this._insertNumberValue(Buffer.prototype.writeDoubleLE, 8, e, t);
		}
		readString(e, n) {
			let r;
			typeof e == "number" ? (t.checkLengthValue(e), r = Math.min(e, this.length - this._readOffset)) : (n = e, r = this.length - this._readOffset), n !== void 0 && t.checkEncoding(n);
			let i = this._buff.slice(this._readOffset, this._readOffset + r).toString(n || this._encoding);
			return this._readOffset += r, i;
		}
		insertString(e, n, r) {
			return t.checkOffsetValue(n), this._handleString(e, !0, n, r);
		}
		writeString(e, t, n) {
			return this._handleString(e, !1, t, n);
		}
		readStringNT(e) {
			e !== void 0 && t.checkEncoding(e);
			let n = this.length;
			for (let e = this._readOffset; e < this.length; e++) if (this._buff[e] === 0) {
				n = e;
				break;
			}
			let r = this._buff.slice(this._readOffset, n);
			return this._readOffset = n + 1, r.toString(e || this._encoding);
		}
		insertStringNT(e, n, r) {
			return t.checkOffsetValue(n), this.insertString(e, n, r), this.insertUInt8(0, n + e.length), this;
		}
		writeStringNT(e, t, n) {
			return this.writeString(e, t, n), this.writeUInt8(0, typeof t == "number" ? t + e.length : this.writeOffset), this;
		}
		readBuffer(e) {
			e !== void 0 && t.checkLengthValue(e);
			let n = typeof e == "number" ? e : this.length, r = Math.min(this.length, this._readOffset + n), i = this._buff.slice(this._readOffset, r);
			return this._readOffset = r, i;
		}
		insertBuffer(e, n) {
			return t.checkOffsetValue(n), this._handleBuffer(e, !0, n);
		}
		writeBuffer(e, t) {
			return this._handleBuffer(e, !1, t);
		}
		readBufferNT() {
			let e = this.length;
			for (let t = this._readOffset; t < this.length; t++) if (this._buff[t] === 0) {
				e = t;
				break;
			}
			let t = this._buff.slice(this._readOffset, e);
			return this._readOffset = e + 1, t;
		}
		insertBufferNT(e, n) {
			return t.checkOffsetValue(n), this.insertBuffer(e, n), this.insertUInt8(0, n + e.length), this;
		}
		writeBufferNT(e, n) {
			return n !== void 0 && t.checkOffsetValue(n), this.writeBuffer(e, n), this.writeUInt8(0, typeof n == "number" ? n + e.length : this._writeOffset), this;
		}
		clear() {
			return this._writeOffset = 0, this._readOffset = 0, this.length = 0, this;
		}
		remaining() {
			return this.length - this._readOffset;
		}
		get readOffset() {
			return this._readOffset;
		}
		set readOffset(e) {
			t.checkOffsetValue(e), t.checkTargetOffset(e, this), this._readOffset = e;
		}
		get writeOffset() {
			return this._writeOffset;
		}
		set writeOffset(e) {
			t.checkOffsetValue(e), t.checkTargetOffset(e, this), this._writeOffset = e;
		}
		get encoding() {
			return this._encoding;
		}
		set encoding(e) {
			t.checkEncoding(e), this._encoding = e;
		}
		get internalBuffer() {
			return this._buff;
		}
		toBuffer() {
			return this._buff.slice(0, this.length);
		}
		toString(e) {
			let n = typeof e == "string" ? e : this._encoding;
			return t.checkEncoding(n), this._buff.toString(n, 0, this.length);
		}
		destroy() {
			return this.clear(), this;
		}
		_handleString(e, n, r, i) {
			let a = this._writeOffset, o = this._encoding;
			typeof r == "number" ? a = r : typeof r == "string" && (t.checkEncoding(r), o = r), typeof i == "string" && (t.checkEncoding(i), o = i);
			let s = Buffer.byteLength(e, o);
			return n ? this.ensureInsertable(s, a) : this._ensureWriteable(s, a), this._buff.write(e, a, s, o), n ? this._writeOffset += s : typeof r == "number" ? this._writeOffset = Math.max(this._writeOffset, a + s) : this._writeOffset += s, this;
		}
		_handleBuffer(e, t, n) {
			let r = typeof n == "number" ? n : this._writeOffset;
			return t ? this.ensureInsertable(e.length, r) : this._ensureWriteable(e.length, r), e.copy(this._buff, r), t ? this._writeOffset += e.length : typeof n == "number" ? this._writeOffset = Math.max(this._writeOffset, r + e.length) : this._writeOffset += e.length, this;
		}
		ensureReadable(e, n) {
			let r = this._readOffset;
			if (n !== void 0 && (t.checkOffsetValue(n), r = n), r < 0 || r + e > this.length) throw Error(t.ERRORS.INVALID_READ_BEYOND_BOUNDS);
		}
		ensureInsertable(e, n) {
			t.checkOffsetValue(n), this._ensureCapacity(this.length + e), n < this.length && this._buff.copy(this._buff, n + e, n, this._buff.length), n + e > this.length ? this.length = n + e : this.length += e;
		}
		_ensureWriteable(e, t) {
			let n = typeof t == "number" ? t : this._writeOffset;
			this._ensureCapacity(n + e), n + e > this.length && (this.length = n + e);
		}
		_ensureCapacity(e) {
			let t = this._buff.length;
			if (e > t) {
				let n = this._buff, r = t * 3 / 2 + 1;
				r < e && (r = e), this._buff = Buffer.allocUnsafe(r), n.copy(this._buff, 0, 0, t);
			}
		}
		_readNumberValue(e, t, n) {
			this.ensureReadable(t, n);
			let r = e.call(this._buff, typeof n == "number" ? n : this._readOffset);
			return n === void 0 && (this._readOffset += t), r;
		}
		_insertNumberValue(e, n, r, i) {
			return t.checkOffsetValue(i), this.ensureInsertable(n, i), e.call(this._buff, r, i), this._writeOffset += n, this;
		}
		_writeNumberValue(e, n, r, i) {
			if (typeof i == "number") {
				if (i < 0) throw Error(t.ERRORS.INVALID_WRITE_BEYOND_BOUNDS);
				t.checkOffsetValue(i);
			}
			let a = typeof i == "number" ? i : this._writeOffset;
			return this._ensureWriteable(n, a), e.call(this._buff, r, a), typeof i == "number" ? this._writeOffset = Math.max(this._writeOffset, a + n) : this._writeOffset += n, this;
		}
	};
})), tc = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.SOCKS5_NO_ACCEPTABLE_AUTH = e.SOCKS5_CUSTOM_AUTH_END = e.SOCKS5_CUSTOM_AUTH_START = e.SOCKS_INCOMING_PACKET_SIZES = e.SocksClientState = e.Socks5Response = e.Socks5HostType = e.Socks5Auth = e.Socks4Response = e.SocksCommand = e.ERRORS = e.DEFAULT_TIMEOUT = void 0, e.DEFAULT_TIMEOUT = 3e4, e.ERRORS = {
		InvalidSocksCommand: "An invalid SOCKS command was provided. Valid options are connect, bind, and associate.",
		InvalidSocksCommandForOperation: "An invalid SOCKS command was provided. Only a subset of commands are supported for this operation.",
		InvalidSocksCommandChain: "An invalid SOCKS command was provided. Chaining currently only supports the connect command.",
		InvalidSocksClientOptionsDestination: "An invalid destination host was provided.",
		InvalidSocksClientOptionsExistingSocket: "An invalid existing socket was provided. This should be an instance of stream.Duplex.",
		InvalidSocksClientOptionsProxy: "Invalid SOCKS proxy details were provided.",
		InvalidSocksClientOptionsTimeout: "An invalid timeout value was provided. Please enter a value above 0 (in ms).",
		InvalidSocksClientOptionsProxiesLength: "At least two socks proxies must be provided for chaining.",
		InvalidSocksClientOptionsCustomAuthRange: "Custom auth must be a value between 0x80 and 0xFE.",
		InvalidSocksClientOptionsCustomAuthOptions: "When a custom_auth_method is provided, custom_auth_request_handler, custom_auth_response_size, and custom_auth_response_handler must also be provided and valid.",
		NegotiationError: "Negotiation error",
		SocketClosed: "Socket closed",
		ProxyConnectionTimedOut: "Proxy connection timed out",
		InternalError: "SocksClient internal error (this should not happen)",
		InvalidSocks4HandshakeResponse: "Received invalid Socks4 handshake response",
		Socks4ProxyRejectedConnection: "Socks4 Proxy rejected connection",
		InvalidSocks4IncomingConnectionResponse: "Socks4 invalid incoming connection response",
		Socks4ProxyRejectedIncomingBoundConnection: "Socks4 Proxy rejected incoming bound connection",
		InvalidSocks5InitialHandshakeResponse: "Received invalid Socks5 initial handshake response",
		InvalidSocks5IntiailHandshakeSocksVersion: "Received invalid Socks5 initial handshake (invalid socks version)",
		InvalidSocks5InitialHandshakeNoAcceptedAuthType: "Received invalid Socks5 initial handshake (no accepted authentication type)",
		InvalidSocks5InitialHandshakeUnknownAuthType: "Received invalid Socks5 initial handshake (unknown authentication type)",
		Socks5AuthenticationFailed: "Socks5 Authentication failed",
		InvalidSocks5FinalHandshake: "Received invalid Socks5 final handshake response",
		InvalidSocks5FinalHandshakeRejected: "Socks5 proxy rejected connection",
		InvalidSocks5IncomingConnectionResponse: "Received invalid Socks5 incoming connection response",
		Socks5ProxyRejectedIncomingBoundConnection: "Socks5 Proxy rejected incoming bound connection"
	}, e.SOCKS_INCOMING_PACKET_SIZES = {
		Socks5InitialHandshakeResponse: 2,
		Socks5UserPassAuthenticationResponse: 2,
		Socks5ResponseHeader: 5,
		Socks5ResponseIPv4: 10,
		Socks5ResponseIPv6: 22,
		Socks5ResponseHostname: (e) => e + 7,
		Socks4Response: 8
	};
	var t;
	(function(e) {
		e[e.connect = 1] = "connect", e[e.bind = 2] = "bind", e[e.associate = 3] = "associate";
	})(t || (e.SocksCommand = t = {}));
	var n;
	(function(e) {
		e[e.Granted = 90] = "Granted", e[e.Failed = 91] = "Failed", e[e.Rejected = 92] = "Rejected", e[e.RejectedIdent = 93] = "RejectedIdent";
	})(n || (e.Socks4Response = n = {}));
	var r;
	(function(e) {
		e[e.NoAuth = 0] = "NoAuth", e[e.GSSApi = 1] = "GSSApi", e[e.UserPass = 2] = "UserPass";
	})(r || (e.Socks5Auth = r = {})), e.SOCKS5_CUSTOM_AUTH_START = 128, e.SOCKS5_CUSTOM_AUTH_END = 254, e.SOCKS5_NO_ACCEPTABLE_AUTH = 255;
	var i;
	(function(e) {
		e[e.Granted = 0] = "Granted", e[e.Failure = 1] = "Failure", e[e.NotAllowed = 2] = "NotAllowed", e[e.NetworkUnreachable = 3] = "NetworkUnreachable", e[e.HostUnreachable = 4] = "HostUnreachable", e[e.ConnectionRefused = 5] = "ConnectionRefused", e[e.TTLExpired = 6] = "TTLExpired", e[e.CommandNotSupported = 7] = "CommandNotSupported", e[e.AddressNotSupported = 8] = "AddressNotSupported";
	})(i || (e.Socks5Response = i = {}));
	var a;
	(function(e) {
		e[e.IPv4 = 1] = "IPv4", e[e.Hostname = 3] = "Hostname", e[e.IPv6 = 4] = "IPv6";
	})(a || (e.Socks5HostType = a = {}));
	var o;
	(function(e) {
		e[e.Created = 0] = "Created", e[e.Connecting = 1] = "Connecting", e[e.Connected = 2] = "Connected", e[e.SentInitialHandshake = 3] = "SentInitialHandshake", e[e.ReceivedInitialHandshakeResponse = 4] = "ReceivedInitialHandshakeResponse", e[e.SentAuthentication = 5] = "SentAuthentication", e[e.ReceivedAuthenticationResponse = 6] = "ReceivedAuthenticationResponse", e[e.SentFinalHandshake = 7] = "SentFinalHandshake", e[e.ReceivedFinalResponse = 8] = "ReceivedFinalResponse", e[e.BoundWaitingForConnection = 9] = "BoundWaitingForConnection", e[e.Established = 10] = "Established", e[e.Disconnected = 11] = "Disconnected", e[e.Error = 99] = "Error";
	})(o || (e.SocksClientState = o = {}));
})), nc = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.shuffleArray = e.SocksClientError = void 0, e.SocksClientError = class extends Error {
		constructor(e, t) {
			super(e), this.options = t;
		}
	};
	function t(e) {
		for (let t = e.length - 1; t > 0; t--) {
			let n = Math.floor(Math.random() * (t + 1));
			[e[t], e[n]] = [e[n], e[t]];
		}
	}
	e.shuffleArray = t;
})), rc = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.AddressError = void 0, e.AddressError = class extends Error {
		constructor(e, t) {
			super(e), this.name = "AddressError", this.parseMessage = t;
		}
	};
})), ic = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.isInSubnet = n, e.isCorrect = r, e.prefixLengthFromMask = i, e.numberToPaddedHex = a, e.stringToPaddedHex = o, e.testBit = s;
	var t = rc();
	function n(e) {
		return this.subnetMask < e.subnetMask ? !1 : this.mask(e.subnetMask) === e.mask();
	}
	function r(e) {
		return function() {
			return this.addressMinusSuffix === this.correctForm() ? this.subnetMask === e && !this.parsedSubnet ? !0 : this.parsedSubnet === String(this.subnetMask) : !1;
		};
	}
	function i(e, n) {
		let r = e.toString(2).padStart(n, "0");
		if (r.length > n) throw new t.AddressError("Invalid subnet mask.");
		let i = r.indexOf("0");
		if (i === -1) return n;
		if (r.slice(i).includes("1")) throw new t.AddressError("Invalid subnet mask.");
		return i;
	}
	function a(e) {
		return e.toString(16).padStart(2, "0");
	}
	function o(e) {
		return a(parseInt(e, 10));
	}
	function s(e, t) {
		let { length: n } = e;
		if (t > n) return !1;
		let r = n - t;
		return e.substring(r, r + 1) === "1";
	}
})), ac = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.RE_SUBNET_STRING = e.RE_ADDRESS = e.GROUPS = e.BITS = void 0, e.BITS = 32, e.GROUPS = 4, e.RE_ADDRESS = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g, e.RE_SUBNET_STRING = /\/\d{1,2}$/;
})), oc = /* @__PURE__ */ w(((e) => {
	var t = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
		r === void 0 && (r = n);
		var i = Object.getOwnPropertyDescriptor(t, n);
		(!i || ("get" in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
			enumerable: !0,
			get: function() {
				return t[n];
			}
		}), Object.defineProperty(e, r, i);
	}) : (function(e, t, n, r) {
		r === void 0 && (r = n), e[r] = t[n];
	})), n = e && e.__setModuleDefault || (Object.create ? (function(e, t) {
		Object.defineProperty(e, "default", {
			enumerable: !0,
			value: t
		});
	}) : function(e, t) {
		e.default = t;
	}), r = e && e.__importStar || function(e) {
		if (e && e.__esModule) return e;
		var r = {};
		if (e != null) for (var i in e) i !== "default" && Object.prototype.hasOwnProperty.call(e, i) && t(r, e, i);
		return n(r, e), r;
	};
	Object.defineProperty(e, "__esModule", { value: !0 }), e.Address4 = void 0;
	var i = r(ic()), a = r(ac()), o = rc(), s = i.isCorrect(a.BITS), c = class e {
		constructor(e) {
			this.groups = a.GROUPS, this.parsedAddress = [], this.parsedSubnet = "", this.subnet = "/32", this.subnetMask = 32, this.v4 = !0, this.isCorrect = s, this.isInSubnet = i.isInSubnet, this.address = e;
			let t = a.RE_SUBNET_STRING.exec(e);
			if (t) {
				if (this.parsedSubnet = t[0].replace("/", ""), this.subnetMask = parseInt(this.parsedSubnet, 10), this.subnet = `/${this.subnetMask}`, this.subnetMask < 0 || this.subnetMask > a.BITS) throw new o.AddressError("Invalid subnet mask.");
				e = e.replace(a.RE_SUBNET_STRING, "");
			}
			this.addressMinusSuffix = e, this.parsedAddress = this.parse(e);
		}
		static isValid(t) {
			try {
				return new e(t), !0;
			} catch {
				return !1;
			}
		}
		parse(e) {
			let t = e.split(".");
			if (!e.match(a.RE_ADDRESS)) throw new o.AddressError("Invalid IPv4 address.");
			return t;
		}
		correctForm() {
			return this.parsedAddress.map((e) => parseInt(e, 10)).join(".");
		}
		static fromAddressAndMask(t, n) {
			return new e(`${t}/${i.prefixLengthFromMask(new e(n).bigInt(), a.BITS)}`);
		}
		static fromAddressAndWildcardMask(t, n) {
			let r = new e(n).bigInt() ^ (BigInt(1) << BigInt(a.BITS)) - BigInt(1);
			return new e(`${t}/${i.prefixLengthFromMask(r, a.BITS)}`);
		}
		static fromWildcard(t) {
			let n = t.split(".");
			if (n.length !== a.GROUPS) throw new o.AddressError("Wildcard pattern must have 4 octets");
			let r = -1;
			for (let e = 0; e < n.length; e++) if (n[e] === "*") r === -1 && (r = e);
			else if (r !== -1) throw new o.AddressError("Wildcard `*` must only appear in trailing octets (e.g. `192.168.0.*`)");
			let i = r === -1 ? 0 : n.length - r, s = n.map((e) => e === "*" ? "0" : e), c = a.BITS - i * 8;
			return new e(`${s.join(".")}/${c}`);
		}
		static fromHex(t) {
			let n = t.replace(/:/g, "");
			if (!/^[0-9a-fA-F]{8}$/.test(n)) throw new o.AddressError("IPv4 hex must be exactly 8 hex digits");
			let r = [];
			for (let e = 0; e < 8; e += 2) r.push(parseInt(n.slice(e, e + 2), 16));
			return new e(r.join("."));
		}
		static fromInteger(t) {
			if (!Number.isInteger(t) || t < 0 || t > 4294967295) throw new o.AddressError("IPv4 integer must be in the range 0 to 2**32 - 1");
			return e.fromHex(t.toString(16).padStart(8, "0"));
		}
		static fromArpa(t) {
			return new e(t.replace(/(\.in-addr\.arpa)?\.$/, "").split(".").reverse().join("."));
		}
		toHex() {
			return this.parsedAddress.map((e) => i.stringToPaddedHex(e)).join(":");
		}
		toArray() {
			return this.parsedAddress.map((e) => parseInt(e, 10));
		}
		toGroup6() {
			let e = [], t;
			for (t = 0; t < a.GROUPS; t += 2) e.push(`${i.stringToPaddedHex(this.parsedAddress[t])}${i.stringToPaddedHex(this.parsedAddress[t + 1])}`);
			return e.join(":");
		}
		bigInt() {
			return BigInt(`0x${this.parsedAddress.map((e) => i.stringToPaddedHex(e)).join("")}`);
		}
		_startAddress() {
			return BigInt(`0b${this.mask() + "0".repeat(a.BITS - this.subnetMask)}`);
		}
		startAddress() {
			return e.fromBigInt(this._startAddress());
		}
		startAddressExclusive() {
			let t = BigInt("1");
			return e.fromBigInt(this._startAddress() + t);
		}
		_endAddress() {
			return BigInt(`0b${this.mask() + "1".repeat(a.BITS - this.subnetMask)}`);
		}
		endAddress() {
			return e.fromBigInt(this._endAddress());
		}
		endAddressExclusive() {
			let t = BigInt("1");
			return e.fromBigInt(this._endAddress() - t);
		}
		subnetMaskAddress() {
			return e.fromBigInt(BigInt(`0b${"1".repeat(this.subnetMask)}${"0".repeat(a.BITS - this.subnetMask)}`));
		}
		wildcardMask() {
			return e.fromBigInt(BigInt(`0b${"0".repeat(this.subnetMask)}${"1".repeat(a.BITS - this.subnetMask)}`));
		}
		networkForm() {
			return `${this.startAddress().correctForm()}/${this.subnetMask}`;
		}
		static fromBigInt(t) {
			if (t < 0n || t > 4294967295n) throw new o.AddressError("IPv4 BigInt must be in the range 0 to 2**32 - 1");
			return e.fromHex(t.toString(16).padStart(8, "0"));
		}
		static fromByteArray(e) {
			if (e.length !== 4) throw new o.AddressError("IPv4 addresses require exactly 4 bytes");
			for (let t = 0; t < e.length; t++) if (!Number.isInteger(e[t]) || e[t] < 0 || e[t] > 255) throw new o.AddressError("All bytes must be integers between 0 and 255");
			return this.fromUnsignedByteArray(e);
		}
		static fromUnsignedByteArray(t) {
			if (t.length !== 4) throw new o.AddressError("IPv4 addresses require exactly 4 bytes");
			return new e(t.join("."));
		}
		mask(e) {
			return e === void 0 && (e = this.subnetMask), this.getBitsBase2(0, e);
		}
		getBitsBase2(e, t) {
			return this.binaryZeroPad().slice(e, t);
		}
		reverseForm(e) {
			e ||= {};
			let t = this.correctForm().split(".").reverse().join(".");
			return e.omitSuffix ? t : `${t}.in-addr.arpa.`;
		}
		isMulticast() {
			return this.isInSubnet(l);
		}
		isPrivate() {
			return u.some((e) => this.isInSubnet(e));
		}
		isLoopback() {
			return this.isInSubnet(d);
		}
		isLinkLocal() {
			return this.isInSubnet(f);
		}
		isUnspecified() {
			return this.isInSubnet(p);
		}
		isBroadcast() {
			return this.isInSubnet(m);
		}
		isCGNAT() {
			return this.isInSubnet(h);
		}
		binaryZeroPad() {
			return this._binaryZeroPad === void 0 && (this._binaryZeroPad = this.bigInt().toString(2).padStart(a.BITS, "0")), this._binaryZeroPad;
		}
		groupForV6() {
			let e = this.parsedAddress;
			return this.address.replace(a.RE_ADDRESS, `<span class="hover-group group-v4 group-6">${e.slice(0, 2).join(".")}</span>.<span class="hover-group group-v4 group-7">${e.slice(2, 4).join(".")}</span>`);
		}
	};
	e.Address4 = c;
	var l = new c("224.0.0.0/4"), u = [
		new c("10.0.0.0/8"),
		new c("172.16.0.0/12"),
		new c("192.168.0.0/16")
	], d = new c("127.0.0.0/8"), f = new c("169.254.0.0/16"), p = new c("0.0.0.0/32"), m = new c("255.255.255.255/32"), h = new c("100.64.0.0/10");
})), sc = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.RE_URL_WITH_PORT = e.RE_URL = e.RE_ZONE_STRING = e.RE_SUBNET_STRING = e.RE_BAD_ADDRESS = e.RE_BAD_CHARACTERS = e.TYPES = e.SCOPES = e.GROUPS = e.BITS = void 0, e.BITS = 128, e.GROUPS = 8, e.SCOPES = {
		0: "Reserved",
		1: "Interface local",
		2: "Link local",
		4: "Admin local",
		5: "Site local",
		8: "Organization local",
		14: "Global",
		15: "Reserved"
	}, e.TYPES = {
		"ff01::1/128": "Multicast (All nodes on this interface)",
		"ff01::2/128": "Multicast (All routers on this interface)",
		"ff02::1/128": "Multicast (All nodes on this link)",
		"ff02::2/128": "Multicast (All routers on this link)",
		"ff05::2/128": "Multicast (All routers in this site)",
		"ff02::5/128": "Multicast (OSPFv3 AllSPF routers)",
		"ff02::6/128": "Multicast (OSPFv3 AllDR routers)",
		"ff02::9/128": "Multicast (RIP routers)",
		"ff02::a/128": "Multicast (EIGRP routers)",
		"ff02::d/128": "Multicast (PIM routers)",
		"ff02::16/128": "Multicast (MLDv2 reports)",
		"ff01::fb/128": "Multicast (mDNSv6)",
		"ff02::fb/128": "Multicast (mDNSv6)",
		"ff05::fb/128": "Multicast (mDNSv6)",
		"ff02::1:2/128": "Multicast (All DHCP servers and relay agents on this link)",
		"ff05::1:2/128": "Multicast (All DHCP servers and relay agents in this site)",
		"ff02::1:3/128": "Multicast (All DHCP servers on this link)",
		"ff05::1:3/128": "Multicast (All DHCP servers in this site)",
		"::/128": "Unspecified",
		"::1/128": "Loopback",
		"ff00::/8": "Multicast",
		"fe80::/10": "Link-local unicast",
		"fc00::/7": "Unique local",
		"2002::/16": "6to4",
		"2001:db8::/32": "Documentation",
		"64:ff9b::/96": "NAT64 (well-known)",
		"64:ff9b:1::/48": "NAT64 (local-use)"
	}, e.RE_BAD_CHARACTERS = /([^0-9a-f:/%])/gi, e.RE_BAD_ADDRESS = /([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi, e.RE_SUBNET_STRING = /\/\d{1,3}(?=%|$)/, e.RE_ZONE_STRING = /%.*$/, e.RE_URL = /^\[{0,1}([0-9a-f:]+)\]{0,1}/, e.RE_URL_WITH_PORT = /\[([0-9a-f:]+)\]:([0-9]{1,5})/;
})), cc = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.escapeHtml = t, e.spanAllZeroes = n, e.spanAll = r, e.spanLeadingZeroes = a, e.simpleGroup = o;
	function t(e) {
		return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
	}
	function n(e) {
		return t(e).replace(/(0+)/g, "<span class=\"zero\">$1</span>");
	}
	function r(e, r = 0) {
		return e.split("").map((e, i) => `<span class="digit value-${t(e)} position-${i + r}">${n(e)}</span>`).join("");
	}
	function i(e) {
		return t(e).replace(/^(0+)/, "<span class=\"zero\">$1</span>");
	}
	function a(e) {
		return e.split(":").map((e) => i(e)).join(":");
	}
	function o(e, t = 0) {
		return e.split(":").map((e, n) => /group-v4/.test(e) ? e : `<span class="hover-group group-${n + t}">${i(e)}</span>`);
	}
})), lc = /* @__PURE__ */ w(((e) => {
	var t = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
		r === void 0 && (r = n);
		var i = Object.getOwnPropertyDescriptor(t, n);
		(!i || ("get" in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
			enumerable: !0,
			get: function() {
				return t[n];
			}
		}), Object.defineProperty(e, r, i);
	}) : (function(e, t, n, r) {
		r === void 0 && (r = n), e[r] = t[n];
	})), n = e && e.__setModuleDefault || (Object.create ? (function(e, t) {
		Object.defineProperty(e, "default", {
			enumerable: !0,
			value: t
		});
	}) : function(e, t) {
		e.default = t;
	}), r = e && e.__importStar || function(e) {
		if (e && e.__esModule) return e;
		var r = {};
		if (e != null) for (var i in e) i !== "default" && Object.prototype.hasOwnProperty.call(e, i) && t(r, e, i);
		return n(r, e), r;
	};
	Object.defineProperty(e, "__esModule", { value: !0 }), e.ADDRESS_BOUNDARY = void 0, e.groupPossibilities = a, e.padGroup = o, e.simpleRegularExpression = s, e.possibleElisions = c;
	var i = r(sc());
	function a(e) {
		return `(${e.join("|")})`;
	}
	function o(e) {
		return e.length < 4 ? `0{0,${4 - e.length}}${e}` : e;
	}
	e.ADDRESS_BOUNDARY = "[^A-Fa-f0-9:]";
	function s(e) {
		let t = [];
		e.forEach((e, n) => {
			parseInt(e, 16) === 0 && t.push(n);
		});
		let n = t.map((t) => e.map((e, n) => {
			if (n === t) {
				let t = n === 0 || n === i.GROUPS - 1 ? ":" : "";
				return a([o(e), t]);
			}
			return o(e);
		}).join(":"));
		return n.push(e.map(o).join(":")), a(n);
	}
	function c(e, t, n) {
		let r = t ? "" : ":", i = n ? "" : ":", o = [];
		!t && !n && o.push("::"), t && n && o.push(""), (n && !t || !n && t) && o.push(":"), o.push(`${r}(:0{1,4}){1,${e - 1}}`), o.push(`(0{1,4}:){1,${e - 1}}${i}`), o.push(`(0{1,4}:){${e - 1}}0{1,4}`);
		for (let t = 1; t < e - 1; t++) for (let n = 1; n < e - t; n++) o.push(`(0{1,4}:){${n}}:(0{1,4}:){${e - n - t - 1}}0{1,4}`);
		return a(o);
	}
})), uc = /* @__PURE__ */ w(((e) => {
	var t = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
		r === void 0 && (r = n);
		var i = Object.getOwnPropertyDescriptor(t, n);
		(!i || ("get" in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
			enumerable: !0,
			get: function() {
				return t[n];
			}
		}), Object.defineProperty(e, r, i);
	}) : (function(e, t, n, r) {
		r === void 0 && (r = n), e[r] = t[n];
	})), n = e && e.__setModuleDefault || (Object.create ? (function(e, t) {
		Object.defineProperty(e, "default", {
			enumerable: !0,
			value: t
		});
	}) : function(e, t) {
		e.default = t;
	}), r = e && e.__importStar || function(e) {
		if (e && e.__esModule) return e;
		var r = {};
		if (e != null) for (var i in e) i !== "default" && Object.prototype.hasOwnProperty.call(e, i) && t(r, e, i);
		return n(r, e), r;
	};
	Object.defineProperty(e, "__esModule", { value: !0 }), e.Address6 = void 0;
	var i = r(ic()), a = r(ac()), o = r(sc()), s = r(cc()), c = oc(), l = lc(), u = rc(), d = ic(), f = i.isCorrect(o.BITS);
	function p(e) {
		if (!e) throw Error("Assertion failed.");
	}
	function m(e) {
		let t = /(\d+)(\d{3})/;
		for (; t.test(e);) e = e.replace(t, "$1,$2");
		return e;
	}
	function h(e) {
		return e = e.replace(/^(0{1,})([1-9]+)$/, "<span class=\"parse-error\">$1</span>$2"), e = e.replace(/^(0{1,})(0)$/, "<span class=\"parse-error\">$1</span>$2"), e;
	}
	function g(e, t) {
		let n = [], r = [], i;
		for (i = 0; i < e.length; i++) i < t[0] ? n.push(e[i]) : i > t[1] && r.push(e[i]);
		return n.concat(["compact"]).concat(r);
	}
	function _(e) {
		return parseInt(e, 16).toString(16).padStart(4, "0");
	}
	function v(e) {
		return e & 255;
	}
	var y = class e {
		constructor(e, t) {
			this.addressMinusSuffix = "", this.parsedSubnet = "", this.subnet = "/128", this.subnetMask = 128, this.v4 = !1, this.zone = "", this.isInSubnet = i.isInSubnet, this.isCorrect = f, t === void 0 ? this.groups = o.GROUPS : this.groups = t, this.address = e;
			let n = o.RE_SUBNET_STRING.exec(e);
			if (n) {
				if (this.parsedSubnet = n[0].replace("/", ""), this.subnetMask = parseInt(this.parsedSubnet, 10), this.subnet = `/${this.subnetMask}`, Number.isNaN(this.subnetMask) || this.subnetMask < 0 || this.subnetMask > o.BITS) throw new u.AddressError("Invalid subnet mask.");
				e = e.replace(o.RE_SUBNET_STRING, "");
			} else if (/\//.test(e)) throw new u.AddressError("Invalid subnet mask.");
			let r = o.RE_ZONE_STRING.exec(e);
			r && (this.zone = r[0], e = e.replace(o.RE_ZONE_STRING, "")), this.addressMinusSuffix = e, this.parsedAddress = this.parse(this.addressMinusSuffix);
		}
		static isValid(t) {
			try {
				return new e(t), !0;
			} catch {
				return !1;
			}
		}
		static fromBigInt(t) {
			if (t < 0n || t > (1n << BigInt(o.BITS)) - 1n) throw new u.AddressError("IPv6 BigInt must be in the range 0 to 2**128 - 1");
			let n = t.toString(16).padStart(32, "0"), r = [];
			for (let e = 0; e < o.GROUPS; e++) r.push(n.slice(e * 4, (e + 1) * 4));
			return new e(r.join(":"));
		}
		static fromURL(t) {
			let n, r = null, i;
			if (t.indexOf("[") !== -1 && t.indexOf("]:") !== -1) {
				if (i = o.RE_URL_WITH_PORT.exec(t), i === null) return {
					error: "failed to parse address with port",
					address: null,
					port: null
				};
				n = i[1], r = i[2];
			} else if (t.indexOf("/") !== -1) {
				if (t = t.replace(/^[a-z0-9]+:\/\//, ""), i = o.RE_URL.exec(t), i === null) return {
					error: "failed to parse address from URL",
					address: null,
					port: null
				};
				n = i[1];
			} else n = t;
			return r ? (r = parseInt(r, 10), (r < 0 || r > 65536) && (r = null)) : r = null, {
				address: new e(n),
				port: r
			};
		}
		static fromAddressAndMask(t, n) {
			return new e(`${t}/${i.prefixLengthFromMask(new e(n).bigInt(), o.BITS)}`);
		}
		static fromAddressAndWildcardMask(t, n) {
			let r = new e(n).bigInt() ^ (BigInt(1) << BigInt(o.BITS)) - BigInt(1);
			return new e(`${t}/${i.prefixLengthFromMask(r, o.BITS)}`);
		}
		static fromWildcard(t) {
			if (t.includes("%") || t.includes("/")) throw new u.AddressError("Wildcard pattern must not include a zone or CIDR suffix");
			let n = t.split("::");
			if (n.length > 2) throw new u.AddressError("Wildcard pattern cannot contain more than one '::'");
			let r;
			if (n.length === 2) {
				let e = n[0] === "" ? [] : n[0].split(":"), t = n[1] === "" ? [] : n[1].split(":"), i = o.GROUPS - e.length - t.length;
				if (i < 1) throw new u.AddressError("Wildcard pattern with '::' has too many groups");
				r = [
					...e,
					...Array(i).fill("0"),
					...t
				];
			} else r = t.split(":");
			if (r.length !== o.GROUPS) throw new u.AddressError("Wildcard pattern must have 8 groups");
			let i = -1;
			for (let e = 0; e < r.length; e++) if (r[e] === "*") i === -1 && (i = e);
			else if (i !== -1) throw new u.AddressError("Wildcard `*` must only appear in trailing groups (e.g. `2001:db8:*:*:*:*:*:*`)");
			let a = i === -1 ? 0 : r.length - i, s = r.map((e) => e === "*" ? "0" : e), c = o.BITS - a * 16;
			return new e(`${s.join(":")}/${c}`);
		}
		static fromAddress4(t) {
			let n = new c.Address4(t), r = o.BITS - (a.BITS - n.subnetMask);
			return new e(`::ffff:${n.correctForm()}/${r}`);
		}
		static fromArpa(t) {
			let n = t.replace(/(\.ip6\.arpa)?\.$/, "");
			if (n.length !== 63) throw new u.AddressError("Invalid 'ip6.arpa' form.");
			let r = n.split(".").reverse();
			for (let e = 7; e > 0; e--) {
				let t = e * 4;
				r.splice(t, 0, ":");
			}
			return n = r.join(""), new e(n);
		}
		microsoftTranscription() {
			return `${this.correctForm().replace(/:/g, "-")}.ipv6-literal.net`;
		}
		mask(e = this.subnetMask) {
			return this.getBitsBase2(0, e);
		}
		possibleSubnets(e = 128) {
			let t = o.BITS - this.subnetMask - Math.abs(e - o.BITS);
			return t < 0 ? "0" : m((BigInt("2") ** BigInt(t)).toString(10));
		}
		_startAddress() {
			return BigInt(`0b${this.mask() + "0".repeat(o.BITS - this.subnetMask)}`);
		}
		startAddress() {
			return e.fromBigInt(this._startAddress());
		}
		startAddressExclusive() {
			let t = BigInt("1");
			return e.fromBigInt(this._startAddress() + t);
		}
		_endAddress() {
			return BigInt(`0b${this.mask() + "1".repeat(o.BITS - this.subnetMask)}`);
		}
		endAddress() {
			return e.fromBigInt(this._endAddress());
		}
		endAddressExclusive() {
			let t = BigInt("1");
			return e.fromBigInt(this._endAddress() - t);
		}
		subnetMaskAddress() {
			return e.fromBigInt(BigInt(`0b${"1".repeat(this.subnetMask)}${"0".repeat(o.BITS - this.subnetMask)}`));
		}
		wildcardMask() {
			return e.fromBigInt(BigInt(`0b${"0".repeat(this.subnetMask)}${"1".repeat(o.BITS - this.subnetMask)}`));
		}
		networkForm() {
			return `${this.startAddress().correctForm()}/${this.subnetMask}`;
		}
		getScope() {
			let e = this.getType();
			return e === "Multicast" || e.startsWith("Multicast ") ? o.SCOPES[parseInt(this.getBits(12, 16).toString(10), 10)] || "Unknown" : e === "Link-local unicast" || e === "Loopback" ? "Link local" : e === "Unspecified" ? "Unknown" : "Global";
		}
		getType() {
			for (let e = 0; e < b.length; e++) {
				let t = b[e];
				if (this.isInSubnet(t[0])) return t[1];
			}
			return "Global unicast";
		}
		getBits(e, t) {
			return BigInt(`0b${this.getBitsBase2(e, t)}`);
		}
		getBitsBase2(e, t) {
			return this.binaryZeroPad().slice(e, t);
		}
		getBitsBase16(e, t) {
			let n = t - e;
			if (n % 4 != 0) throw Error("Length of bits to retrieve must be divisible by four");
			return this.getBits(e, t).toString(16).padStart(n / 4, "0");
		}
		getBitsPastSubnet() {
			return this.getBitsBase2(this.subnetMask, o.BITS);
		}
		reverseForm(e) {
			e ||= {};
			let t = Math.floor(this.subnetMask / 4), n = this.canonicalForm().replace(/:/g, "").split("").slice(0, t).reverse().join(".");
			return t > 0 ? e.omitSuffix ? n : `${n}.ip6.arpa.` : e.omitSuffix ? "" : "ip6.arpa.";
		}
		correctForm() {
			let e, t = [], n = 0, r = [];
			for (e = 0; e < this.parsedAddress.length; e++) {
				let t = parseInt(this.parsedAddress[e], 16);
				t === 0 && n++, t !== 0 && n > 0 && (n > 1 && r.push([e - n, e - 1]), n = 0);
			}
			n > 1 && r.push([this.parsedAddress.length - n, this.parsedAddress.length - 1]);
			let i = r.map((e) => e[1] - e[0] + 1);
			if (r.length > 0) {
				let e = i.indexOf(Math.max(...i));
				t = g(this.parsedAddress, r[e]);
			} else t = this.parsedAddress;
			for (e = 0; e < t.length; e++) t[e] !== "compact" && (t[e] = parseInt(t[e], 16).toString(16));
			let a = t.join(":");
			return a = a.replace(/^compact$/, "::"), a = a.replace(/(^compact)|(compact$)/, ":"), a = a.replace(/compact/, ""), a;
		}
		binaryZeroPad() {
			return this._binaryZeroPad === void 0 && (this._binaryZeroPad = this.bigInt().toString(2).padStart(o.BITS, "0")), this._binaryZeroPad;
		}
		parse4in6(e) {
			if (e.indexOf(".") === -1) return e;
			let t = e.split(":"), n = t.slice(-1)[0].match(a.RE_ADDRESS);
			if (n) {
				this.parsedAddress4 = n[0], this.address4 = new c.Address4(this.parsedAddress4);
				for (let e = 0; e < this.address4.groups; e++) if (/^0[0-9]+/.test(this.address4.parsedAddress[e])) {
					let e = this.address4.parsedAddress.map(h).join("."), n = t.slice(0, -1).map(s.escapeHtml).join(":"), r = t.length > 1 ? ":" : "";
					throw new u.AddressError("IPv4 addresses can't have leading zeroes.", `${n}${r}${e}`);
				}
				this.v4 = !0, t[t.length - 1] = this.address4.toGroup6(), e = t.join(":");
			}
			return e;
		}
		parse(e) {
			e = this.parse4in6(e);
			let t = e.match(o.RE_BAD_CHARACTERS);
			if (t) throw new u.AddressError(`Bad character${t.length > 1 ? "s" : ""} detected in address: ${t.join("")}`, e.replace(o.RE_BAD_CHARACTERS, "<span class=\"parse-error\">$1</span>"));
			let n = e.match(o.RE_BAD_ADDRESS);
			if (n) throw new u.AddressError(`Address failed regex: ${n.join("")}`, e.replace(o.RE_BAD_ADDRESS, "<span class=\"parse-error\">$1</span>"));
			let r = [], i = e.split("::");
			if (i.length === 2) {
				let e = i[0].split(":"), t = i[1].split(":");
				e.length === 1 && e[0] === "" && (e = []), t.length === 1 && t[0] === "" && (t = []);
				let n = this.groups - (e.length + t.length);
				if (!n) throw new u.AddressError("Error parsing groups");
				this.elidedGroups = n, this.elisionBegin = e.length, this.elisionEnd = e.length + this.elidedGroups, r = r.concat(e);
				for (let e = 0; e < n; e++) r.push("0");
				r = r.concat(t);
			} else if (i.length === 1) r = e.split(":"), this.elidedGroups = 0;
			else throw new u.AddressError("Too many :: groups found");
			if (r = r.map((e) => parseInt(e, 16).toString(16)), r.length !== this.groups) throw new u.AddressError("Incorrect number of groups found");
			return r;
		}
		canonicalForm() {
			return this.parsedAddress.map(_).join(":");
		}
		decimal() {
			return this.parsedAddress.map((e) => parseInt(e, 16).toString(10).padStart(5, "0")).join(":");
		}
		bigInt() {
			return BigInt(`0x${this.parsedAddress.map(_).join("")}`);
		}
		to4() {
			let e = this.binaryZeroPad().split("");
			return c.Address4.fromHex(BigInt(`0b${e.slice(96, 128).join("")}`).toString(16).padStart(8, "0"));
		}
		to4in6() {
			let t = this.to4(), n = new e(this.parsedAddress.slice(0, 6).join(":"), 6).correctForm(), r = "";
			return /:$/.test(n) || (r = ":"), n + r + t.address;
		}
		inspectTeredo() {
			let e = this.getBitsBase16(0, 32), t = (this.getBits(80, 96) ^ BigInt("0xffff")).toString(), n = c.Address4.fromHex(this.getBitsBase16(32, 64)), r = this.getBits(96, 128), i = c.Address4.fromHex((r ^ BigInt("0xffffffff")).toString(16).padStart(8, "0")), a = this.getBitsBase2(64, 80), o = (0, d.testBit)(a, 15), s = (0, d.testBit)(a, 14), l = (0, d.testBit)(a, 8), u = (0, d.testBit)(a, 9), f = BigInt(`0b${a.slice(2, 6) + a.slice(8, 16)}`).toString(10);
			return {
				prefix: `${e.slice(0, 4)}:${e.slice(4, 8)}`,
				server4: n.address,
				client4: i.address,
				flags: a,
				coneNat: o,
				microsoft: {
					reserved: s,
					universalLocal: u,
					groupIndividual: l,
					nonce: f
				},
				udpPort: t
			};
		}
		inspect6to4() {
			let e = this.getBitsBase16(0, 16), t = c.Address4.fromHex(this.getBitsBase16(16, 48));
			return {
				prefix: e.slice(0, 4),
				gateway: t.address
			};
		}
		to6to4() {
			return this.is4() ? new e([
				"2002",
				this.getBitsBase16(96, 112),
				this.getBitsBase16(112, 128),
				"",
				"/16"
			].join(":")) : null;
		}
		static fromAddress4Nat64(t, n = "64:ff9b::/96") {
			let r = new c.Address4(t), i = new e(n), a = i.subnetMask;
			if (a !== 32 && a !== 40 && a !== 48 && a !== 56 && a !== 64 && a !== 96) throw new u.AddressError("NAT64 prefix length must be 32, 40, 48, 56, 64, or 96");
			let o = i.binaryZeroPad(), s = r.binaryZeroPad(), l;
			if (a === 96) l = o.slice(0, 96) + s;
			else {
				let e = 64 - a;
				l = o.slice(0, a) + s.slice(0, e) + "00000000" + s.slice(e) + "0".repeat(56 - (32 - e));
			}
			let d = BigInt(`0b${l}`).toString(16).padStart(32, "0"), f = [];
			for (let e = 0; e < 8; e++) f.push(d.slice(e * 4, (e + 1) * 4));
			return new e(f.join(":"));
		}
		toAddress4Nat64(t = "64:ff9b::/96") {
			let n = new e(t), r = n.subnetMask;
			if (r !== 32 && r !== 40 && r !== 48 && r !== 56 && r !== 64 && r !== 96) throw new u.AddressError("NAT64 prefix length must be 32, 40, 48, 56, 64, or 96");
			if (!this.isInSubnet(n)) return null;
			let i = this.binaryZeroPad(), a;
			if (r === 96) a = i.slice(96, 128);
			else {
				let e = 64 - r;
				a = i.slice(r, r + e) + i.slice(72, 72 + (32 - e));
			}
			let o = [];
			for (let e = 0; e < 4; e++) o.push(parseInt(a.slice(e * 8, (e + 1) * 8), 2).toString());
			return new c.Address4(o.join("."));
		}
		toByteArray() {
			let e = this.bigInt().toString(16), t = `${"0".repeat(e.length % 2)}${e}`, n = [];
			for (let e = 0, r = t.length; e < r; e += 2) n.push(parseInt(t.substring(e, e + 2), 16));
			return n;
		}
		toUnsignedByteArray() {
			return this.toByteArray().map(v);
		}
		static fromByteArray(e) {
			return this.fromUnsignedByteArray(e.map(v));
		}
		static fromUnsignedByteArray(t) {
			let n = BigInt("256"), r = BigInt("0"), i = BigInt("1");
			for (let e = t.length - 1; e >= 0; e--) r += i * BigInt(t[e].toString(10)), i *= n;
			return e.fromBigInt(r);
		}
		isCanonical() {
			return this.addressMinusSuffix === this.canonicalForm();
		}
		isLinkLocal() {
			return this.getBitsBase2(0, 64) === "1111111010000000000000000000000000000000000000000000000000000000";
		}
		isMulticast() {
			let e = this.getType();
			return e === "Multicast" || e.startsWith("Multicast ");
		}
		is4() {
			return this.v4;
		}
		isMapped4() {
			return this.isInSubnet(T);
		}
		isTeredo() {
			return this.isInSubnet(x);
		}
		is6to4() {
			return this.isInSubnet(S);
		}
		isLoopback() {
			return this.getType() === "Loopback";
		}
		isULA() {
			return this.isInSubnet(C);
		}
		isUnspecified() {
			return this.getType() === "Unspecified";
		}
		isDocumentation() {
			return this.isInSubnet(w);
		}
		href(e) {
			return e = e === void 0 ? "" : `:${e}`, `http://[${this.correctForm()}]${e}/`;
		}
		link(e) {
			e ||= {}, e.className === void 0 && (e.className = ""), e.prefix === void 0 && (e.prefix = "/#address="), e.v4 === void 0 && (e.v4 = !1);
			let t = this.correctForm;
			e.v4 && (t = this.to4in6);
			let n = t.call(this), r = s.escapeHtml(`${e.prefix}${n}`), i = s.escapeHtml(n);
			return e.className ? `<a href="${r}" class="${s.escapeHtml(e.className)}">${i}</a>` : `<a href="${r}">${i}</a>`;
		}
		group() {
			if (this.elidedGroups === 0) return s.simpleGroup(this.addressMinusSuffix).join(":");
			p(typeof this.elidedGroups == "number"), p(typeof this.elisionBegin == "number");
			let e = [], [t, n] = this.addressMinusSuffix.split("::");
			t.length ? e.push(...s.simpleGroup(t)) : e.push("");
			let r = ["hover-group"];
			for (let e = this.elisionBegin; e < this.elisionBegin + this.elidedGroups; e++) r.push(`group-${e}`);
			return e.push(`<span class="${r.join(" ")}"></span>`), n.length ? e.push(...s.simpleGroup(n, this.elisionEnd)) : e.push(""), this.is4() && (p(this.address4 instanceof c.Address4), e.pop(), e.push(this.address4.groupForV6())), e.join(":");
		}
		regularExpressionString(t = !1) {
			let n = [], r = new e(this.correctForm());
			if (r.elidedGroups === 0) n.push((0, l.simpleRegularExpression)(r.parsedAddress));
			else if (r.elidedGroups === o.GROUPS) n.push((0, l.possibleElisions)(o.GROUPS));
			else {
				let e = r.address.split("::");
				e[0].length && n.push((0, l.simpleRegularExpression)(e[0].split(":"))), p(typeof r.elidedGroups == "number"), n.push((0, l.possibleElisions)(r.elidedGroups, e[0].length !== 0, e[1].length !== 0)), e[1].length && n.push((0, l.simpleRegularExpression)(e[1].split(":"))), n = [n.join(":")];
			}
			return t || (n = [
				"(?=^|",
				l.ADDRESS_BOUNDARY,
				"|[^\\w\\:])(",
				...n,
				")(?=[^\\w\\:]|",
				l.ADDRESS_BOUNDARY,
				"|$)"
			]), n.join("");
		}
		regularExpression(e = !1) {
			return new RegExp(this.regularExpressionString(e), "i");
		}
	};
	e.Address6 = y;
	var b = Object.keys(o.TYPES).map((e) => [new y(e), o.TYPES[e]]), x = new y("2001::/32"), S = new y("2002::/16"), C = new y("fc00::/7"), w = new y("2001:db8::/32"), T = new y("::ffff:0:0/96");
})), dc = /* @__PURE__ */ w(((e) => {
	var t = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
		r === void 0 && (r = n);
		var i = Object.getOwnPropertyDescriptor(t, n);
		(!i || ("get" in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
			enumerable: !0,
			get: function() {
				return t[n];
			}
		}), Object.defineProperty(e, r, i);
	}) : (function(e, t, n, r) {
		r === void 0 && (r = n), e[r] = t[n];
	})), n = e && e.__setModuleDefault || (Object.create ? (function(e, t) {
		Object.defineProperty(e, "default", {
			enumerable: !0,
			value: t
		});
	}) : function(e, t) {
		e.default = t;
	}), r = e && e.__importStar || function(e) {
		if (e && e.__esModule) return e;
		var r = {};
		if (e != null) for (var i in e) i !== "default" && Object.prototype.hasOwnProperty.call(e, i) && t(r, e, i);
		return n(r, e), r;
	};
	Object.defineProperty(e, "__esModule", { value: !0 }), e.v6 = e.AddressError = e.Address6 = e.Address4 = void 0;
	var i = oc();
	Object.defineProperty(e, "Address4", {
		enumerable: !0,
		get: function() {
			return i.Address4;
		}
	});
	var a = uc();
	Object.defineProperty(e, "Address6", {
		enumerable: !0,
		get: function() {
			return a.Address6;
		}
	});
	var o = rc();
	Object.defineProperty(e, "AddressError", {
		enumerable: !0,
		get: function() {
			return o.AddressError;
		}
	}), e.v6 = { helpers: r(cc()) };
})), fc = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.ipToBuffer = e.int32ToIpv4 = e.ipv4ToInt32 = e.validateSocksClientChainOptions = e.validateSocksClientOptions = void 0;
	var t = nc(), n = tc(), r = k("stream"), i = dc(), a = k("net");
	function o(e, i = [
		"connect",
		"bind",
		"associate"
	]) {
		if (!n.SocksCommand[e.command]) throw new t.SocksClientError(n.ERRORS.InvalidSocksCommand, e);
		if (i.indexOf(e.command) === -1) throw new t.SocksClientError(n.ERRORS.InvalidSocksCommandForOperation, e);
		if (!l(e.destination)) throw new t.SocksClientError(n.ERRORS.InvalidSocksClientOptionsDestination, e);
		if (!u(e.proxy)) throw new t.SocksClientError(n.ERRORS.InvalidSocksClientOptionsProxy, e);
		if (c(e.proxy, e), e.timeout && !d(e.timeout)) throw new t.SocksClientError(n.ERRORS.InvalidSocksClientOptionsTimeout, e);
		if (e.existing_socket && !(e.existing_socket instanceof r.Duplex)) throw new t.SocksClientError(n.ERRORS.InvalidSocksClientOptionsExistingSocket, e);
	}
	e.validateSocksClientOptions = o;
	function s(e) {
		if (e.command !== "connect") throw new t.SocksClientError(n.ERRORS.InvalidSocksCommandChain, e);
		if (!l(e.destination)) throw new t.SocksClientError(n.ERRORS.InvalidSocksClientOptionsDestination, e);
		if (!(e.proxies && Array.isArray(e.proxies) && e.proxies.length >= 2)) throw new t.SocksClientError(n.ERRORS.InvalidSocksClientOptionsProxiesLength, e);
		if (e.proxies.forEach((r) => {
			if (!u(r)) throw new t.SocksClientError(n.ERRORS.InvalidSocksClientOptionsProxy, e);
			c(r, e);
		}), e.timeout && !d(e.timeout)) throw new t.SocksClientError(n.ERRORS.InvalidSocksClientOptionsTimeout, e);
	}
	e.validateSocksClientChainOptions = s;
	function c(e, r) {
		if (e.custom_auth_method !== void 0) {
			if (e.custom_auth_method < n.SOCKS5_CUSTOM_AUTH_START || e.custom_auth_method > n.SOCKS5_CUSTOM_AUTH_END) throw new t.SocksClientError(n.ERRORS.InvalidSocksClientOptionsCustomAuthRange, r);
			if (e.custom_auth_request_handler === void 0 || typeof e.custom_auth_request_handler != "function" || e.custom_auth_response_size === void 0 || e.custom_auth_response_handler === void 0 || typeof e.custom_auth_response_handler != "function") throw new t.SocksClientError(n.ERRORS.InvalidSocksClientOptionsCustomAuthOptions, r);
		}
	}
	function l(e) {
		return e && typeof e.host == "string" && Buffer.byteLength(e.host) < 256 && typeof e.port == "number" && e.port >= 0 && e.port <= 65535;
	}
	function u(e) {
		return e && (typeof e.host == "string" || typeof e.ipaddress == "string") && typeof e.port == "number" && e.port >= 0 && e.port <= 65535 && (e.type === 4 || e.type === 5);
	}
	function d(e) {
		return typeof e == "number" && e > 0;
	}
	function f(e) {
		return new i.Address4(e).toArray().reduce((e, t) => (e << 8) + t, 0) >>> 0;
	}
	e.ipv4ToInt32 = f;
	function p(e) {
		return [
			e >>> 24 & 255,
			e >>> 16 & 255,
			e >>> 8 & 255,
			e & 255
		].join(".");
	}
	e.int32ToIpv4 = p;
	function m(e) {
		if (a.isIPv4(e)) {
			let t = new i.Address4(e);
			return Buffer.from(t.toArray());
		} else if (a.isIPv6(e)) {
			let t = new i.Address6(e);
			return Buffer.from(t.canonicalForm().split(":").map((e) => e.padStart(4, "0")).join(""), "hex");
		} else throw Error("Invalid IP address format");
	}
	e.ipToBuffer = m;
})), pc = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.ReceiveBuffer = void 0, e.ReceiveBuffer = class {
		constructor(e = 4096) {
			this.buffer = Buffer.allocUnsafe(e), this.offset = 0, this.originalSize = e;
		}
		get length() {
			return this.offset;
		}
		append(e) {
			if (!Buffer.isBuffer(e)) throw Error("Attempted to append a non-buffer instance to ReceiveBuffer.");
			if (this.offset + e.length >= this.buffer.length) {
				let t = this.buffer;
				this.buffer = Buffer.allocUnsafe(Math.max(this.buffer.length + this.originalSize, this.buffer.length + e.length)), t.copy(this.buffer);
			}
			return e.copy(this.buffer, this.offset), this.offset += e.length;
		}
		peek(e) {
			if (e > this.offset) throw Error("Attempted to read beyond the bounds of the managed internal data.");
			return this.buffer.slice(0, e);
		}
		get(e) {
			if (e > this.offset) throw Error("Attempted to read beyond the bounds of the managed internal data.");
			let t = Buffer.allocUnsafe(e);
			return this.buffer.slice(0, e).copy(t), this.buffer.copyWithin(0, e, e + this.offset - e), this.offset -= e, t;
		}
	};
})), mc = /* @__PURE__ */ w(((e) => {
	var t = e && e.__awaiter || function(e, t, n, r) {
		function i(e) {
			return e instanceof n ? e : new n(function(t) {
				t(e);
			});
		}
		return new (n ||= Promise)(function(n, a) {
			function o(e) {
				try {
					c(r.next(e));
				} catch (e) {
					a(e);
				}
			}
			function s(e) {
				try {
					c(r.throw(e));
				} catch (e) {
					a(e);
				}
			}
			function c(e) {
				e.done ? n(e.value) : i(e.value).then(o, s);
			}
			c((r = r.apply(e, t || [])).next());
		});
	};
	Object.defineProperty(e, "__esModule", { value: !0 }), e.SocksClientError = e.SocksClient = void 0;
	var n = k("events"), r = k("net"), i = ec(), a = tc(), o = fc(), s = pc(), c = nc();
	Object.defineProperty(e, "SocksClientError", {
		enumerable: !0,
		get: function() {
			return c.SocksClientError;
		}
	});
	var l = dc();
	e.SocksClient = class e extends n.EventEmitter {
		constructor(e) {
			super(), this.options = Object.assign({}, e), (0, o.validateSocksClientOptions)(e), this.setState(a.SocksClientState.Created);
		}
		static createConnection(t, n) {
			return new Promise((r, i) => {
				try {
					(0, o.validateSocksClientOptions)(t, ["connect"]);
				} catch (e) {
					return typeof n == "function" ? (n(e), r(e)) : i(e);
				}
				let a = new e(t);
				a.connect(t.existing_socket), a.once("established", (e) => {
					a.removeAllListeners(), typeof n == "function" && n(null, e), r(e);
				}), a.once("error", (e) => {
					a.removeAllListeners(), typeof n == "function" ? (n(e), r(e)) : i(e);
				});
			});
		}
		static createConnectionChain(n, r) {
			return new Promise((i, a) => t(this, void 0, void 0, function* () {
				try {
					(0, o.validateSocksClientChainOptions)(n);
				} catch (e) {
					return typeof r == "function" ? (r(e), i(e)) : a(e);
				}
				n.randomizeChain && (0, c.shuffleArray)(n.proxies);
				try {
					let t;
					for (let r = 0; r < n.proxies.length; r++) {
						let i = n.proxies[r], a = r === n.proxies.length - 1 ? n.destination : {
							host: n.proxies[r + 1].host || n.proxies[r + 1].ipaddress,
							port: n.proxies[r + 1].port
						}, o = yield e.createConnection({
							command: "connect",
							proxy: i,
							destination: a,
							existing_socket: t
						});
						t ||= o.socket;
					}
					typeof r == "function" && r(null, { socket: t }), i({ socket: t });
				} catch (e) {
					typeof r == "function" ? (r(e), i(e)) : a(e);
				}
			}));
		}
		static createUDPFrame(e) {
			let t = new i.SmartBuffer();
			return t.writeUInt16BE(0), t.writeUInt8(e.frameNumber || 0), r.isIPv4(e.remoteHost.host) ? (t.writeUInt8(a.Socks5HostType.IPv4), t.writeUInt32BE((0, o.ipv4ToInt32)(e.remoteHost.host))) : r.isIPv6(e.remoteHost.host) ? (t.writeUInt8(a.Socks5HostType.IPv6), t.writeBuffer((0, o.ipToBuffer)(e.remoteHost.host))) : (t.writeUInt8(a.Socks5HostType.Hostname), t.writeUInt8(Buffer.byteLength(e.remoteHost.host)), t.writeString(e.remoteHost.host)), t.writeUInt16BE(e.remoteHost.port), t.writeBuffer(e.data), t.toBuffer();
		}
		static parseUDPFrame(e) {
			let t = i.SmartBuffer.fromBuffer(e);
			t.readOffset = 2;
			let n = t.readUInt8(), r = t.readUInt8(), s;
			s = r === a.Socks5HostType.IPv4 ? (0, o.int32ToIpv4)(t.readUInt32BE()) : r === a.Socks5HostType.IPv6 ? l.Address6.fromByteArray(Array.from(t.readBuffer(16))).canonicalForm() : t.readString(t.readUInt8());
			let c = t.readUInt16BE();
			return {
				frameNumber: n,
				remoteHost: {
					host: s,
					port: c
				},
				data: t.readBuffer()
			};
		}
		setState(e) {
			this.state !== a.SocksClientState.Error && (this.state = e);
		}
		connect(e) {
			this.onDataReceived = (e) => this.onDataReceivedHandler(e), this.onClose = () => this.onCloseHandler(), this.onError = (e) => this.onErrorHandler(e), this.onConnect = () => this.onConnectHandler();
			let t = setTimeout(() => this.onEstablishedTimeout(), this.options.timeout || a.DEFAULT_TIMEOUT);
			t.unref && typeof t.unref == "function" && t.unref(), e ? this.socket = e : this.socket = new r.Socket(), this.socket.once("close", this.onClose), this.socket.once("error", this.onError), this.socket.once("connect", this.onConnect), this.socket.on("data", this.onDataReceived), this.setState(a.SocksClientState.Connecting), this.receiveBuffer = new s.ReceiveBuffer(), e ? this.socket.emit("connect") : (this.socket.connect(this.getSocketOptions()), this.options.set_tcp_nodelay !== void 0 && this.options.set_tcp_nodelay !== null && this.socket.setNoDelay(!!this.options.set_tcp_nodelay)), this.prependOnceListener("established", (e) => {
				setImmediate(() => {
					if (this.receiveBuffer.length > 0) {
						let t = this.receiveBuffer.get(this.receiveBuffer.length);
						e.socket.emit("data", t);
					}
					e.socket.resume();
				});
			});
		}
		getSocketOptions() {
			return Object.assign(Object.assign({}, this.options.socket_options), {
				host: this.options.proxy.host || this.options.proxy.ipaddress,
				port: this.options.proxy.port
			});
		}
		onEstablishedTimeout() {
			this.state !== a.SocksClientState.Established && this.state !== a.SocksClientState.BoundWaitingForConnection && this.closeSocket(a.ERRORS.ProxyConnectionTimedOut);
		}
		onConnectHandler() {
			this.setState(a.SocksClientState.Connected), this.options.proxy.type === 4 ? this.sendSocks4InitialHandshake() : this.sendSocks5InitialHandshake(), this.setState(a.SocksClientState.SentInitialHandshake);
		}
		onDataReceivedHandler(e) {
			this.receiveBuffer.append(e), this.processData();
		}
		processData() {
			for (; this.state !== a.SocksClientState.Established && this.state !== a.SocksClientState.Error && this.receiveBuffer.length >= this.nextRequiredPacketBufferSize;) if (this.state === a.SocksClientState.SentInitialHandshake) this.options.proxy.type === 4 ? this.handleSocks4FinalHandshakeResponse() : this.handleInitialSocks5HandshakeResponse();
			else if (this.state === a.SocksClientState.SentAuthentication) this.handleInitialSocks5AuthenticationHandshakeResponse();
			else if (this.state === a.SocksClientState.SentFinalHandshake) this.handleSocks5FinalHandshakeResponse();
			else if (this.state === a.SocksClientState.BoundWaitingForConnection) this.options.proxy.type === 4 ? this.handleSocks4IncomingConnectionResponse() : this.handleSocks5IncomingConnectionResponse();
			else {
				this.closeSocket(a.ERRORS.InternalError);
				break;
			}
		}
		onCloseHandler() {
			this.closeSocket(a.ERRORS.SocketClosed);
		}
		onErrorHandler(e) {
			this.closeSocket(e.message);
		}
		removeInternalSocketHandlers() {
			this.socket.pause(), this.socket.removeListener("data", this.onDataReceived), this.socket.removeListener("close", this.onClose), this.socket.removeListener("error", this.onError), this.socket.removeListener("connect", this.onConnect);
		}
		closeSocket(e) {
			this.state !== a.SocksClientState.Error && (this.setState(a.SocksClientState.Error), this.socket.destroy(), this.removeInternalSocketHandlers(), this.emit("error", new c.SocksClientError(e, this.options)));
		}
		sendSocks4InitialHandshake() {
			let e = this.options.proxy.userId || "", t = new i.SmartBuffer();
			t.writeUInt8(4), t.writeUInt8(a.SocksCommand[this.options.command]), t.writeUInt16BE(this.options.destination.port), r.isIPv4(this.options.destination.host) ? (t.writeBuffer((0, o.ipToBuffer)(this.options.destination.host)), t.writeStringNT(e)) : (t.writeUInt8(0), t.writeUInt8(0), t.writeUInt8(0), t.writeUInt8(1), t.writeStringNT(e), t.writeStringNT(this.options.destination.host)), this.nextRequiredPacketBufferSize = a.SOCKS_INCOMING_PACKET_SIZES.Socks4Response, this.socket.write(t.toBuffer());
		}
		handleSocks4FinalHandshakeResponse() {
			let e = this.receiveBuffer.get(8);
			if (e[1] !== a.Socks4Response.Granted) this.closeSocket(`${a.ERRORS.Socks4ProxyRejectedConnection} - (${a.Socks4Response[e[1]]})`);
			else if (a.SocksCommand[this.options.command] === a.SocksCommand.bind) {
				let t = i.SmartBuffer.fromBuffer(e);
				t.readOffset = 2;
				let n = {
					port: t.readUInt16BE(),
					host: (0, o.int32ToIpv4)(t.readUInt32BE())
				};
				n.host === "0.0.0.0" && (n.host = this.options.proxy.ipaddress), this.setState(a.SocksClientState.BoundWaitingForConnection), this.emit("bound", {
					remoteHost: n,
					socket: this.socket
				});
			} else this.setState(a.SocksClientState.Established), this.removeInternalSocketHandlers(), this.emit("established", { socket: this.socket });
		}
		handleSocks4IncomingConnectionResponse() {
			let e = this.receiveBuffer.get(8);
			if (e[1] !== a.Socks4Response.Granted) this.closeSocket(`${a.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${a.Socks4Response[e[1]]})`);
			else {
				let t = i.SmartBuffer.fromBuffer(e);
				t.readOffset = 2;
				let n = {
					port: t.readUInt16BE(),
					host: (0, o.int32ToIpv4)(t.readUInt32BE())
				};
				this.setState(a.SocksClientState.Established), this.removeInternalSocketHandlers(), this.emit("established", {
					remoteHost: n,
					socket: this.socket
				});
			}
		}
		sendSocks5InitialHandshake() {
			let e = new i.SmartBuffer(), t = [a.Socks5Auth.NoAuth];
			(this.options.proxy.userId || this.options.proxy.password) && t.push(a.Socks5Auth.UserPass), this.options.proxy.custom_auth_method !== void 0 && t.push(this.options.proxy.custom_auth_method), e.writeUInt8(5), e.writeUInt8(t.length);
			for (let n of t) e.writeUInt8(n);
			this.nextRequiredPacketBufferSize = a.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse, this.socket.write(e.toBuffer()), this.setState(a.SocksClientState.SentInitialHandshake);
		}
		handleInitialSocks5HandshakeResponse() {
			let e = this.receiveBuffer.get(2);
			e[0] === 5 ? e[1] === a.SOCKS5_NO_ACCEPTABLE_AUTH ? this.closeSocket(a.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType) : e[1] === a.Socks5Auth.NoAuth ? (this.socks5ChosenAuthType = a.Socks5Auth.NoAuth, this.sendSocks5CommandRequest()) : e[1] === a.Socks5Auth.UserPass ? (this.socks5ChosenAuthType = a.Socks5Auth.UserPass, this.sendSocks5UserPassAuthentication()) : e[1] === this.options.proxy.custom_auth_method ? (this.socks5ChosenAuthType = this.options.proxy.custom_auth_method, this.sendSocks5CustomAuthentication()) : this.closeSocket(a.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType) : this.closeSocket(a.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion);
		}
		sendSocks5UserPassAuthentication() {
			let e = this.options.proxy.userId || "", t = this.options.proxy.password || "", n = new i.SmartBuffer();
			n.writeUInt8(1), n.writeUInt8(Buffer.byteLength(e)), n.writeString(e), n.writeUInt8(Buffer.byteLength(t)), n.writeString(t), this.nextRequiredPacketBufferSize = a.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse, this.socket.write(n.toBuffer()), this.setState(a.SocksClientState.SentAuthentication);
		}
		sendSocks5CustomAuthentication() {
			return t(this, void 0, void 0, function* () {
				this.nextRequiredPacketBufferSize = this.options.proxy.custom_auth_response_size, this.socket.write(yield this.options.proxy.custom_auth_request_handler()), this.setState(a.SocksClientState.SentAuthentication);
			});
		}
		handleSocks5CustomAuthHandshakeResponse(e) {
			return t(this, void 0, void 0, function* () {
				return yield this.options.proxy.custom_auth_response_handler(e);
			});
		}
		handleSocks5AuthenticationNoAuthHandshakeResponse(e) {
			return t(this, void 0, void 0, function* () {
				return e[1] === 0;
			});
		}
		handleSocks5AuthenticationUserPassHandshakeResponse(e) {
			return t(this, void 0, void 0, function* () {
				return e[1] === 0;
			});
		}
		handleInitialSocks5AuthenticationHandshakeResponse() {
			return t(this, void 0, void 0, function* () {
				this.setState(a.SocksClientState.ReceivedAuthenticationResponse);
				let e = !1;
				this.socks5ChosenAuthType === a.Socks5Auth.NoAuth ? e = yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2)) : this.socks5ChosenAuthType === a.Socks5Auth.UserPass ? e = yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2)) : this.socks5ChosenAuthType === this.options.proxy.custom_auth_method && (e = yield this.handleSocks5CustomAuthHandshakeResponse(this.receiveBuffer.get(this.options.proxy.custom_auth_response_size))), e ? this.sendSocks5CommandRequest() : this.closeSocket(a.ERRORS.Socks5AuthenticationFailed);
			});
		}
		sendSocks5CommandRequest() {
			let e = new i.SmartBuffer();
			e.writeUInt8(5), e.writeUInt8(a.SocksCommand[this.options.command]), e.writeUInt8(0), r.isIPv4(this.options.destination.host) ? (e.writeUInt8(a.Socks5HostType.IPv4), e.writeBuffer((0, o.ipToBuffer)(this.options.destination.host))) : r.isIPv6(this.options.destination.host) ? (e.writeUInt8(a.Socks5HostType.IPv6), e.writeBuffer((0, o.ipToBuffer)(this.options.destination.host))) : (e.writeUInt8(a.Socks5HostType.Hostname), e.writeUInt8(this.options.destination.host.length), e.writeString(this.options.destination.host)), e.writeUInt16BE(this.options.destination.port), this.nextRequiredPacketBufferSize = a.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader, this.socket.write(e.toBuffer()), this.setState(a.SocksClientState.SentFinalHandshake);
		}
		handleSocks5FinalHandshakeResponse() {
			let e = this.receiveBuffer.peek(5);
			if (e[0] !== 5 || e[1] !== a.Socks5Response.Granted) this.closeSocket(`${a.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${a.Socks5Response[e[1]]}`);
			else {
				let t = e[3], n, r;
				if (t === a.Socks5HostType.IPv4) {
					let e = a.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;
					if (this.receiveBuffer.length < e) {
						this.nextRequiredPacketBufferSize = e;
						return;
					}
					r = i.SmartBuffer.fromBuffer(this.receiveBuffer.get(e).slice(4)), n = {
						host: (0, o.int32ToIpv4)(r.readUInt32BE()),
						port: r.readUInt16BE()
					}, n.host === "0.0.0.0" && (n.host = this.options.proxy.ipaddress);
				} else if (t === a.Socks5HostType.Hostname) {
					let t = e[4], o = a.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(t);
					if (this.receiveBuffer.length < o) {
						this.nextRequiredPacketBufferSize = o;
						return;
					}
					r = i.SmartBuffer.fromBuffer(this.receiveBuffer.get(o).slice(5)), n = {
						host: r.readString(t),
						port: r.readUInt16BE()
					};
				} else if (t === a.Socks5HostType.IPv6) {
					let e = a.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;
					if (this.receiveBuffer.length < e) {
						this.nextRequiredPacketBufferSize = e;
						return;
					}
					r = i.SmartBuffer.fromBuffer(this.receiveBuffer.get(e).slice(4)), n = {
						host: l.Address6.fromByteArray(Array.from(r.readBuffer(16))).canonicalForm(),
						port: r.readUInt16BE()
					};
				}
				this.setState(a.SocksClientState.ReceivedFinalResponse), a.SocksCommand[this.options.command] === a.SocksCommand.connect ? (this.setState(a.SocksClientState.Established), this.removeInternalSocketHandlers(), this.emit("established", {
					remoteHost: n,
					socket: this.socket
				})) : a.SocksCommand[this.options.command] === a.SocksCommand.bind ? (this.setState(a.SocksClientState.BoundWaitingForConnection), this.nextRequiredPacketBufferSize = a.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader, this.emit("bound", {
					remoteHost: n,
					socket: this.socket
				})) : a.SocksCommand[this.options.command] === a.SocksCommand.associate && (this.setState(a.SocksClientState.Established), this.removeInternalSocketHandlers(), this.emit("established", {
					remoteHost: n,
					socket: this.socket
				}));
			}
		}
		handleSocks5IncomingConnectionResponse() {
			let e = this.receiveBuffer.peek(5);
			if (e[0] !== 5 || e[1] !== a.Socks5Response.Granted) this.closeSocket(`${a.ERRORS.Socks5ProxyRejectedIncomingBoundConnection} - ${a.Socks5Response[e[1]]}`);
			else {
				let t = e[3], n, r;
				if (t === a.Socks5HostType.IPv4) {
					let e = a.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;
					if (this.receiveBuffer.length < e) {
						this.nextRequiredPacketBufferSize = e;
						return;
					}
					r = i.SmartBuffer.fromBuffer(this.receiveBuffer.get(e).slice(4)), n = {
						host: (0, o.int32ToIpv4)(r.readUInt32BE()),
						port: r.readUInt16BE()
					}, n.host === "0.0.0.0" && (n.host = this.options.proxy.ipaddress);
				} else if (t === a.Socks5HostType.Hostname) {
					let t = e[4], o = a.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(t);
					if (this.receiveBuffer.length < o) {
						this.nextRequiredPacketBufferSize = o;
						return;
					}
					r = i.SmartBuffer.fromBuffer(this.receiveBuffer.get(o).slice(5)), n = {
						host: r.readString(t),
						port: r.readUInt16BE()
					};
				} else if (t === a.Socks5HostType.IPv6) {
					let e = a.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;
					if (this.receiveBuffer.length < e) {
						this.nextRequiredPacketBufferSize = e;
						return;
					}
					r = i.SmartBuffer.fromBuffer(this.receiveBuffer.get(e).slice(4)), n = {
						host: l.Address6.fromByteArray(Array.from(r.readBuffer(16))).canonicalForm(),
						port: r.readUInt16BE()
					};
				}
				this.setState(a.SocksClientState.Established), this.removeInternalSocketHandlers(), this.emit("established", {
					remoteHost: n,
					socket: this.socket
				});
			}
		}
		get socksClientOptions() {
			return Object.assign({}, this.options);
		}
	};
})), hc = /* @__PURE__ */ w(((e) => {
	var t = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
		r === void 0 && (r = n);
		var i = Object.getOwnPropertyDescriptor(t, n);
		(!i || ("get" in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
			enumerable: !0,
			get: function() {
				return t[n];
			}
		}), Object.defineProperty(e, r, i);
	}) : (function(e, t, n, r) {
		r === void 0 && (r = n), e[r] = t[n];
	})), n = e && e.__exportStar || function(e, n) {
		for (var r in e) r !== "default" && !Object.prototype.hasOwnProperty.call(n, r) && t(n, e, r);
	};
	Object.defineProperty(e, "__esModule", { value: !0 }), n(mc(), e);
})), gc = /* @__PURE__ */ w(((e) => {
	var t = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
		r === void 0 && (r = n);
		var i = Object.getOwnPropertyDescriptor(t, n);
		(!i || ("get" in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
			enumerable: !0,
			get: function() {
				return t[n];
			}
		}), Object.defineProperty(e, r, i);
	}) : (function(e, t, n, r) {
		r === void 0 && (r = n), e[r] = t[n];
	})), n = e && e.__setModuleDefault || (Object.create ? (function(e, t) {
		Object.defineProperty(e, "default", {
			enumerable: !0,
			value: t
		});
	}) : function(e, t) {
		e.default = t;
	}), r = e && e.__importStar || function(e) {
		if (e && e.__esModule) return e;
		var r = {};
		if (e != null) for (var i in e) i !== "default" && Object.prototype.hasOwnProperty.call(e, i) && t(r, e, i);
		return n(r, e), r;
	}, i = e && e.__importDefault || function(e) {
		return e && e.__esModule ? e : { default: e };
	};
	Object.defineProperty(e, "__esModule", { value: !0 }), e.SocksProxyAgent = void 0;
	var a = hc(), o = Ys(), s = i(qs()), c = r(k("dns")), l = r(k("net")), u = r(k("tls")), d = k("url"), f = (0, s.default)("socks-proxy-agent"), p = (e) => e.servername === void 0 && e.host && !l.isIP(e.host) ? {
		...e,
		servername: e.host
	} : e;
	function m(e) {
		let t = !1, n = 5, r = e.hostname, i = parseInt(e.port, 10) || 1080;
		switch (e.protocol.replace(":", "")) {
			case "socks4":
				t = !0, n = 4;
				break;
			case "socks4a":
				n = 4;
				break;
			case "socks5":
				t = !0, n = 5;
				break;
			case "socks":
				n = 5;
				break;
			case "socks5h":
				n = 5;
				break;
			default: throw TypeError(`A "socks" protocol must be specified! Got: ${String(e.protocol)}`);
		}
		let a = {
			host: r,
			port: i,
			type: n
		};
		return e.username && Object.defineProperty(a, "userId", {
			value: decodeURIComponent(e.username),
			enumerable: !1
		}), e.password != null && Object.defineProperty(a, "password", {
			value: decodeURIComponent(e.password),
			enumerable: !1
		}), {
			lookup: t,
			proxy: a
		};
	}
	var h = class extends o.Agent {
		constructor(e, t) {
			super(t);
			let { proxy: n, lookup: r } = m(typeof e == "string" ? new d.URL(e) : e);
			this.shouldLookup = r, this.proxy = n, this.timeout = t?.timeout ?? null, this.socketOptions = t?.socketOptions ?? null;
		}
		async connect(e, t) {
			let { shouldLookup: n, proxy: r, timeout: i } = this;
			if (!t.host) throw Error("No `host` defined!");
			let { host: o } = t, { port: s, lookup: l = c.lookup } = t;
			n && (o = await new Promise((e, t) => {
				l(o, {}, (n, r) => {
					n ? t(n) : e(r);
				});
			}));
			let d = {
				proxy: r,
				destination: {
					host: o,
					port: typeof s == "number" ? s : parseInt(s, 10)
				},
				command: "connect",
				timeout: i ?? void 0,
				socket_options: this.socketOptions ?? void 0
			}, m = (t) => {
				e.destroy(), h.destroy(), t && t.destroy();
			};
			f("Creating socks proxy connection: %o", d);
			let { socket: h } = await a.SocksClient.createConnection(d);
			if (f("Successfully created socks proxy connection"), i !== null && (h.setTimeout(i), h.on("timeout", () => m())), t.secureEndpoint) {
				f("Upgrading socket connection to TLS");
				let e = u.connect({
					...g(p(t), "host", "path", "port"),
					socket: h
				});
				return e.once("error", (t) => {
					f("Socket TLS error", t.message), m(e);
				}), e;
			}
			return h;
		}
	};
	h.protocols = [
		"socks",
		"socks4",
		"socks4a",
		"socks5",
		"socks5h"
	], e.SocksProxyAgent = h;
	function g(e, ...t) {
		let n = {}, r;
		for (r in e) t.includes(r) || (n[r] = e[r]);
		return n;
	}
})), _c = /* @__PURE__ */ w(((e, t) => {
	t.exports = {
		InvalidProxyProtocolError: class extends Error {
			constructor(e) {
				super(`Invalid protocol \`${e.protocol}\` connecting to proxy \`${e.host}\``), this.code = "EINVALIDPROXY", this.proxy = e;
			}
		},
		ConnectionTimeoutError: class extends Error {
			constructor(e) {
				super(`Timeout connecting to host \`${e}\``), this.code = "ECONNECTIONTIMEOUT", this.host = e;
			}
		},
		IdleTimeoutError: class extends Error {
			constructor(e) {
				super(`Idle timeout reached for host \`${e}\``), this.code = "EIDLETIMEOUT", this.host = e;
			}
		},
		ResponseTimeoutError: class extends Error {
			constructor(e, t) {
				let n = "Response timeout ";
				t && (n += `from proxy \`${t.host}\` `), n += `connecting to host \`${e.host}\``, super(n), this.code = "ERESPONSETIMEOUT", this.proxy = t, this.request = e;
			}
		},
		TransferTimeoutError: class extends Error {
			constructor(e, t) {
				let n = "Transfer timeout ";
				t && (n += `from proxy \`${t.host}\` `), n += `for \`${e.host}\``, super(n), this.code = "ETRANSFERTIMEOUT", this.proxy = t, this.request = e;
			}
		}
	};
})), vc = /* @__PURE__ */ w(((e, t) => {
	var { HttpProxyAgent: n } = Xs(), { HttpsProxyAgent: r } = Qs(), { SocksProxyAgent: i } = gc(), { LRUCache: a } = zn(), { InvalidProxyProtocolError: o } = _c(), s = new a({ max: 20 }), c = new Set(i.protocols), l = /* @__PURE__ */ new Set([
		"https_proxy",
		"http_proxy",
		"proxy",
		"no_proxy"
	]), u = Object.entries(process.env).reduce((e, [t, n]) => (t = t.toLowerCase(), l.has(t) && (e[t] = n), e), {}), d = (e) => {
		e = new URL(e);
		let t = e.protocol.slice(0, -1);
		if (c.has(t)) return i;
		if (t === "https" || t === "http") return [n, r];
		throw new o(e);
	}, f = (e, t) => {
		if (typeof t == "string" && (t = t.split(",").map((e) => e.trim()).filter(Boolean)), !t || !t.length) return !1;
		let n = e.hostname.split(".").reverse();
		return t.some((e) => {
			let t = e.split(".").filter(Boolean).reverse();
			if (!t.length) return !1;
			for (let e = 0; e < t.length; e++) if (n[e] !== t[e]) return !1;
			return !0;
		});
	};
	t.exports = {
		getProxyAgent: d,
		getProxy: (e, { proxy: t, noProxy: n }) => (e = new URL(e), t ||= e.protocol === "https:" ? u.https_proxy : u.https_proxy || u.http_proxy || u.proxy, n ||= u.no_proxy, !t || f(e, n) ? null : new URL(t)),
		proxyCache: s
	};
})), yc = /* @__PURE__ */ w(((e, t) => {
	var n = k("net"), r = k("tls"), { once: i } = k("events"), a = k("timers/promises"), { normalizeOptions: o, cacheOptions: s } = Bs(), { getProxy: c, getProxyAgent: l, proxyCache: u } = vc(), d = _c(), { Agent: f } = Ys();
	t.exports = class extends f {
		#e;
		#t;
		#n;
		#r;
		#i;
		constructor(e = {}) {
			let { timeouts: t, proxy: n, noProxy: r, ...i } = o(e);
			super(i), this.#e = i, this.#t = t, n && (this.#n = new URL(n), this.#r = r, this.#i = l(n));
		}
		get proxy() {
			return this.#n ? { url: this.#n } : {};
		}
		#a(e) {
			if (!this.#n) return;
			let t = c(`${e.protocol}//${e.host}:${e.port}`, {
				proxy: this.#n,
				noProxy: this.#r
			});
			if (!t) return;
			let n = s({
				...e,
				...this.#e,
				timeouts: this.#t,
				proxy: t
			});
			if (u.has(n)) return u.get(n);
			let r = this.#i;
			Array.isArray(r) && (r = this.isSecureEndpoint(e) ? r[1] : r[0]);
			let i = new r(t, {
				...this.#e,
				socketOptions: { family: this.#e.family }
			});
			return u.set(n, i), i;
		}
		async #o({ promises: e, options: t, timeout: n }, r = new AbortController()) {
			if (n) {
				let i = a.setTimeout(n, null, { signal: r.signal }).then(() => {
					throw new d.ConnectionTimeoutError(`${t.host}:${t.port}`);
				}).catch((e) => {
					if (e.name !== "AbortError") throw e;
				});
				e.push(i);
			}
			let i;
			try {
				i = await Promise.race(e), r.abort();
			} catch (e) {
				throw r.abort(), e;
			}
			return i;
		}
		async connect(e, t) {
			t.lookup ??= this.#e.lookup;
			let a, o = this.#t.connection, s = this.isSecureEndpoint(t), c = this.#a(t);
			if (c) {
				let n = Date.now();
				a = await this.#o({
					options: t,
					timeout: o,
					promises: [c.connect(e, t)]
				}), o && (o -= Date.now() - n);
			} else a = (s ? r : n).connect(t);
			a.setKeepAlive(this.keepAlive, this.keepAliveMsecs), a.setNoDelay(this.keepAlive);
			let l = new AbortController(), { signal: u } = l, f = a[s ? "secureConnecting" : "connecting"] ? i(a, s ? "secureConnect" : "connect", { signal: u }) : Promise.resolve();
			return await this.#o({
				options: t,
				timeout: o,
				promises: [f, i(a, "error", { signal: u }).then((e) => {
					throw e[0];
				})]
			}, l), this.#t.idle && a.setTimeout(this.#t.idle, () => {
				a.destroy(new d.IdleTimeoutError(`${t.host}:${t.port}`));
			}), a;
		}
		addRequest(e, t) {
			let n = this.#a(t);
			return n?.setRequestProps && n.setRequestProps(e, t), e.setHeader("connection", this.keepAlive ? "keep-alive" : "close"), this.#t.response && (e.once("finish", () => {
				setTimeout(() => {
					e.destroy(new d.ResponseTimeoutError(e, this.#n));
				}, this.#t.response);
			}), e.once("response", () => {
				clearTimeout(void 0);
			})), this.#t.transfer && e.once("response", (t) => {
				setTimeout(() => {
					t.destroy(new d.TransferTimeoutError(e, this.#n));
				}, this.#t.transfer), t.once("close", () => {
					clearTimeout(void 0);
				});
			}), super.addRequest(e, t);
		}
		createSocket(e, t, n) {
			super.createSocket(e, t, (r, i) => {
				r && this.#s(e, t), n(r, i);
			});
		}
		#s(e, t) {
			let n = this.getName(t), r = this.requests[n];
			if (!r || r.length === 0) return;
			let i = r.indexOf(e);
			if (i !== -1 && r.splice(i, 1), r.length === 0) {
				delete this.requests[n];
				return;
			}
			if ((this.sockets[n] ? this.sockets[n].length : 0) >= this.maxSockets || this.totalSocketCount >= this.maxTotalSockets) return;
			let a = r.shift();
			r.length === 0 && delete this.requests[n], this.createSocket(a, t, (e, t) => {
				e ? a.onSocket(null, e) : a.onSocket(t);
			});
		}
	};
})), bc = /* @__PURE__ */ w(((e, t) => {
	var { LRUCache: n } = zn(), { normalizeOptions: r, cacheOptions: i } = Bs(), { getProxy: a, proxyCache: o } = vc(), s = zs(), c = yc(), l = new n({ max: 20 });
	t.exports = {
		getAgent: (e, { agent: t, proxy: n, noProxy: o, ...s } = {}) => {
			if (t != null) return t;
			e = new URL(e);
			let u = a(e, {
				proxy: n,
				noProxy: o
			}), d = {
				...r(s),
				proxy: u
			}, f = i({
				...d,
				secureEndpoint: e.protocol === "https:"
			});
			if (l.has(f)) return l.get(f);
			let p = new c(d);
			return l.set(f, p), p;
		},
		Agent: c,
		HttpAgent: c,
		HttpsAgent: c,
		cache: {
			proxy: o,
			agent: l,
			dns: s.cache,
			clear: () => {
				o.clear(), l.clear(), s.cache.clear();
			}
		}
	};
})), xc = /* @__PURE__ */ T({
	author: () => Ac,
	default: () => Ic,
	dependencies: () => jc,
	description: () => wc,
	devDependencies: () => Mc,
	engines: () => Nc,
	files: () => Ec,
	keywords: () => kc,
	license: () => "ISC",
	main: () => Tc,
	name: () => Sc,
	repository: () => Oc,
	scripts: () => Dc,
	tap: () => Pc,
	templateOSS: () => Fc,
	version: () => Cc
}), Sc, Cc, wc, Tc, Ec, Dc, Oc, kc, Ac, jc, Mc, Nc, Pc, Fc, Ic, Lc = C((() => {
	Sc = "make-fetch-happen", Cc = "15.0.6", wc = "Opinionated, caching, retrying fetch client", Tc = "lib/index.js", Ec = ["bin/", "lib/"], Dc = {
		test: "tap",
		posttest: "npm run lint",
		eslint: "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
		lint: "npm run eslint",
		lintfix: "npm run eslint -- --fix",
		postlint: "template-oss-check",
		snap: "tap",
		"template-oss-apply": "template-oss-apply --force"
	}, Oc = {
		type: "git",
		url: "git+https://github.com/npm/make-fetch-happen.git"
	}, kc = [
		"http",
		"request",
		"fetch",
		"mean girls",
		"caching",
		"cache",
		"subresource integrity"
	], Ac = "GitHub Inc.", jc = {
		"@gar/promise-retry": "^1.0.0",
		"@npmcli/agent": "^4.0.0",
		"@npmcli/redact": "^4.0.0",
		cacache: "^20.0.1",
		"http-cache-semantics": "^4.1.1",
		minipass: "^7.0.2",
		"minipass-fetch": "^5.0.0",
		"minipass-flush": "^1.0.5",
		"minipass-pipeline": "^1.2.4",
		negotiator: "^1.0.0",
		"proc-log": "^6.0.0",
		ssri: "^13.0.0"
	}, Mc = {
		"@npmcli/eslint-config": "^5.0.0",
		"@npmcli/template-oss": "4.25.0",
		nock: "^13.2.4",
		"safe-buffer": "^5.2.1",
		"standard-version": "^9.3.2",
		tap: "^16.0.0"
	}, Nc = { node: "^20.17.0 || >=22.9.0" }, Pc = {
		color: 1,
		files: "test/*.js",
		"check-coverage": !0,
		timeout: 60,
		"nyc-arg": ["--exclude", "tap-snapshots/**"]
	}, Fc = {
		"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
		version: "4.25.0",
		publish: "true"
	}, Ic = {
		name: Sc,
		version: Cc,
		description: wc,
		main: Tc,
		files: Ec,
		scripts: Dc,
		repository: Oc,
		keywords: kc,
		author: Ac,
		license: "ISC",
		dependencies: jc,
		devDependencies: Mc,
		engines: Nc,
		tap: Pc,
		templateOSS: Fc
	};
})), Rc = /* @__PURE__ */ w(((e, t) => {
	var { Minipass: n } = wa(), r = no(), { promiseRetry: i } = Rs(), a = zo(), { log: o } = xo(), { redact: s } = wo(), c = Fs(), { getAgent: l } = bc(), u = (Lc(), O(xc).default), d = `${u.name}/${u.version} (+https://npm.im/${u.name})`, f = [
		"ECONNRESET",
		"ECONNREFUSED",
		"EADDRINUSE",
		"ETIMEDOUT",
		"ECONNECTIONTIMEOUT",
		"EIDLETIMEOUT",
		"ERESPONSETIMEOUT",
		"ETRANSFERTIMEOUT"
	], p = ["request-timeout"];
	t.exports = (e, t) => {
		let u = l(e.url, {
			...t,
			signal: void 0
		});
		e.headers.has("connection") || e.headers.set("connection", u ? "keep-alive" : "close"), e.headers.has("user-agent") || e.headers.set("user-agent", d);
		let m = {
			...t,
			agent: u,
			redirect: "manual"
		};
		return i(async (i, l) => {
			let u = new r.Request(e, m), d = s(u.url);
			try {
				let e = await r(u, m);
				if (m.integrity && e.status === 200) {
					let t = a.integrityStream({
						algorithms: m.algorithms,
						integrity: m.integrity,
						size: m.size
					}), n = new c({ events: ["integrity", "size"] }, e.body, t);
					t.on("integrity", (e) => n.emit("integrity", e)), t.on("size", (e) => n.emit("size", e)), e = new r.Response(n, e), e.body.hasIntegrityEmitter = !0;
				}
				e.headers.set("x-fetch-attempts", l);
				let s = n.isStream(u.body);
				return u.method !== "POST" && !s && ([
					408,
					420,
					429
				].includes(e.status) || e.status >= 500) ? (typeof t.onRetry == "function" && t.onRetry(e), o.http("fetch", `${u.method} ${d} attempt ${l} failed with ${e.status}`), i(e)) : e;
			} catch (e) {
				let n = e.code === "EPROMISERETRY" ? e.retried.code : e.code, a = e.retried instanceof r.Response || f.includes(n) && p.includes(e.type);
				if (u.method === "POST" || a) throw e;
				return typeof t.onRetry == "function" && t.onRetry(e), o.http("fetch", `${u.method} ${d} attempt ${l} failed with ${e.code}`), i(e);
			}
		}, t.retry).catch((e) => {
			if (e.status >= 400 && e.type !== "system") return e;
			throw e;
		});
	};
})), zc = /* @__PURE__ */ w(((e, t) => {
	var { Request: n, Response: r } = no(), { Minipass: i } = wa(), a = Uo(), o = Ps(), s = k("url"), c = Fs(), l = Bo(), u = Is(), d = Rc(), f = (e, t) => Object.prototype.hasOwnProperty.call(e, t), p = [
		"accept-charset",
		"accept-encoding",
		"accept-language",
		"accept",
		"cache-control"
	], m = [
		"cache-control",
		"content-encoding",
		"content-language",
		"content-type",
		"date",
		"etag",
		"expires",
		"last-modified",
		"link",
		"location",
		"pragma",
		"vary"
	], h = (e, t, n) => {
		let r = {
			time: Date.now(),
			url: e.url,
			reqHeaders: {},
			resHeaders: {},
			options: { compress: n.compress == null ? e.compress : n.compress }
		};
		t.status !== 200 && t.status !== 304 && (r.status = t.status);
		for (let t of p) e.headers.has(t) && (r.reqHeaders[t] = e.headers.get(t));
		let i = e.headers.get("host"), a = new s.URL(e.url);
		if (i && a.host !== i && (r.reqHeaders.host = i), t.headers.has("vary")) {
			let n = t.headers.get("vary");
			if (n !== "*") {
				let t = n.trim().toLowerCase().split(/\s*,\s*/);
				for (let n of t) e.headers.has(n) && (r.reqHeaders[n] = e.headers.get(n));
			}
		}
		for (let e of m) t.headers.has(e) && (r.resHeaders[e] = t.headers.get(e));
		for (let e of n.cacheAdditionalHeaders) t.headers.has(e) && (r.resHeaders[e] = t.headers.get(e));
		return r;
	}, g = Symbol("request"), _ = Symbol("response"), v = Symbol("policy");
	t.exports = class e {
		constructor({ entry: e, request: t, response: n, options: r }) {
			e ? (this.key = e.key, this.entry = e, this.entry.metadata.time = this.entry.metadata.time || this.entry.time) : this.key = u(t), this.options = r, this[g] = t, this[_] = n, this[v] = null;
		}
		static async find(t, n) {
			try {
				var r = await o.index.compact(n.cachePath, u(t), (t, r) => {
					let i = new e({
						entry: t,
						options: n
					}), a = new e({
						entry: r,
						options: n
					});
					return i.policy.satisfies(a.request);
				}, { validateEntry: (e) => e.metadata && e.metadata.resHeaders && e.metadata.resHeaders["content-encoding"] === null ? !1 : e.integrity === null ? !!(e.metadata && e.metadata.status) : !0 });
			} catch {
				return;
			}
			if (n.cache === "reload") return;
			let i;
			for (let a of r) {
				let r = new e({
					entry: a,
					options: n
				});
				if (r.policy.satisfies(t)) {
					i = r;
					break;
				}
			}
			return i;
		}
		static async invalidate(e, t) {
			let n = u(e);
			try {
				await o.rm.entry(t.cachePath, n, { removeFully: !0 });
			} catch {}
		}
		get request() {
			return this[g] || (this[g] = new n(this.entry.metadata.url, {
				method: "GET",
				headers: this.entry.metadata.reqHeaders,
				...this.entry.metadata.options
			})), this[g];
		}
		get response() {
			return this[_] || (this[_] = new r(null, {
				url: this.entry.metadata.url,
				counter: this.options.counter,
				status: this.entry.metadata.status || 200,
				headers: {
					...this.entry.metadata.resHeaders,
					"content-length": this.entry.size
				}
			})), this[_];
		}
		get policy() {
			return this[v] || (this[v] = new l({
				entry: this.entry,
				request: this.request,
				response: this.response,
				options: this.options
			})), this[v];
		}
		async store(e) {
			if (this.request.method !== "GET" || ![
				200,
				301,
				308
			].includes(this.response.status) || !this.policy.storable()) return this.response.headers.set("x-local-cache-status", "skip"), this.response;
			let t = this.response.headers.get("content-length"), n = {
				algorithms: this.options.algorithms,
				metadata: h(this.request, this.response, this.options),
				size: t,
				integrity: this.options.integrity,
				integrityEmitter: this.response.body.hasIntegrityEmitter && this.response.body
			}, s = null;
			if (this.response.status === 200) {
				let e, t, r = new Promise((n, r) => {
					e = n, t = r;
				}).catch((e) => {
					s.emit("error", e);
				});
				s = new c({ events: ["integrity", "size"] }, new a({ flush() {
					return r;
				} })), s.hasIntegrityEmitter = !0;
				let l = () => {
					let r = new i(), a = o.put.stream(this.options.cachePath, this.key, n);
					a.on("integrity", (e) => s.emit("integrity", e)), a.on("size", (e) => s.emit("size", e)), r.pipe(a), a.promise().then(e, t), s.unshift(r), s.unshift(this.response.body);
				};
				s.once("resume", l), s.once("end", () => s.removeListener("resume", l));
			} else await o.index.insert(this.options.cachePath, this.key, null, n);
			return this.response.headers.set("x-local-cache", encodeURIComponent(this.options.cachePath)), this.response.headers.set("x-local-cache-key", encodeURIComponent(this.key)), this.response.headers.set("x-local-cache-mode", "stream"), this.response.headers.set("x-local-cache-status", e), this.response.headers.set("x-local-cache-time", (/* @__PURE__ */ new Date()).toISOString()), new r(s, {
				url: this.response.url,
				status: this.response.status,
				headers: this.response.headers,
				counter: this.options.counter
			});
		}
		async respond(t, n, a) {
			let s;
			if (t === "HEAD" || [301, 308].includes(this.response.status)) s = this.response;
			else {
				let t = new i(), a = { ...this.policy.responseHeaders() }, c = () => {
					let n = o.get.stream.byDigest(this.options.cachePath, this.entry.integrity, { memoize: this.options.memoize });
					n.on("error", async (r) => {
						n.pause(), r.code === "EINTEGRITY" && await o.rm.content(this.options.cachePath, this.entry.integrity, { memoize: this.options.memoize }), (r.code === "ENOENT" || r.code === "EINTEGRITY") && await e.invalidate(this.request, this.options), t.emit("error", r), n.resume();
					}), t.emit("integrity", this.entry.integrity), t.emit("size", Number(a["content-length"])), n.pipe(t);
				};
				t.once("resume", c), t.once("end", () => t.removeListener("resume", c)), s = new r(t, {
					url: this.entry.metadata.url,
					counter: n.counter,
					status: 200,
					headers: a
				});
			}
			return s.headers.set("x-local-cache", encodeURIComponent(this.options.cachePath)), s.headers.set("x-local-cache-hash", encodeURIComponent(this.entry.integrity)), s.headers.set("x-local-cache-key", encodeURIComponent(this.key)), s.headers.set("x-local-cache-mode", "stream"), s.headers.set("x-local-cache-status", a), s.headers.set("x-local-cache-time", new Date(this.entry.metadata.time).toUTCString()), s;
		}
		async revalidate(t, r) {
			let i = new n(t, { headers: this.policy.revalidationHeaders(t) });
			try {
				var a = await d(i, {
					...r,
					headers: void 0
				});
			} catch (e) {
				if (!this.policy.mustRevalidate) return this.respond(t.method, r, "stale");
				throw e;
			}
			if (this.policy.revalidated(i, a)) {
				let e = h(t, a, r);
				for (let t of m) !f(e.resHeaders, t) && f(this.entry.metadata.resHeaders, t) && (e.resHeaders[t] = this.entry.metadata.resHeaders[t]);
				for (let t of r.cacheAdditionalHeaders) {
					let n = f(e.resHeaders, t), r = f(this.entry.metadata.resHeaders, t), i = f(this.policy.response.headers, t);
					!n && r && (e.resHeaders[t] = this.entry.metadata.resHeaders[t]), !i && n && (this.policy.response.headers[t] = e.resHeaders[t]);
				}
				try {
					await o.index.insert(r.cachePath, this.key, this.entry.integrity, {
						size: this.entry.size,
						metadata: e
					});
				} catch {}
				return this.respond(t.method, r, "revalidated");
			}
			return new e({
				request: t,
				response: a,
				options: r
			}).store("updated");
		}
	};
})), Bc = /* @__PURE__ */ w(((e, t) => {
	var { NotCachedError: n } = Vo(), r = zc(), i = Rc(), a = async (e, t) => {
		let a = await r.find(e, t);
		if (!a) {
			if (t.cache === "only-if-cached") throw new n(e.url);
			return new r({
				request: e,
				response: await i(e, t),
				options: t
			}).store("miss");
		}
		if (t.cache === "no-cache") return a.revalidate(e, t);
		let o = a.policy.needsRevalidation(e);
		return t.cache === "force-cache" || t.cache === "only-if-cached" || !o ? a.respond(e.method, t, o ? "stale" : "hit") : a.revalidate(e, t);
	};
	a.invalidate = async (e, t) => {
		if (t.cachePath) return r.invalidate(e, t);
	}, t.exports = a;
})), Vc = /* @__PURE__ */ w(((e, t) => {
	var { FetchError: n, Request: r, isRedirect: i } = no(), a = k("url"), o = Bo(), s = Bc(), c = Rc(), l = (e, t, r) => {
		if (!i(t.status) || r.redirect === "manual") return !1;
		if (r.redirect === "error") throw new n(`redirect mode is set to error: ${e.url}`, "no-redirect", { code: "ENOREDIRECT" });
		if (!t.headers.has("location")) throw new n(`redirect location header missing for: ${e.url}`, "no-location", { code: "EINVALIDREDIRECT" });
		if (e.counter >= e.follow) throw new n(`maximum redirect reached at: ${e.url}`, "max-redirect", { code: "EMAXREDIRECT" });
		return !0;
	}, u = (e, t, n) => {
		let i = { ...n }, o = t.headers.get("location"), s = new a.URL(o, /^https?:/.test(o) ? void 0 : e.url);
		return new a.URL(e.url).hostname !== s.hostname && (e.headers.delete("authorization"), e.headers.delete("cookie")), (t.status === 303 || e.method === "POST" && [301, 302].includes(t.status)) && (i.method = "GET", i.body = null, e.headers.delete("content-length")), i.headers = {}, e.headers.forEach((e, t) => {
			i.headers[t] = e;
		}), i.counter = ++e.counter, {
			request: new r(a.format(s), i),
			options: i
		};
	}, d = async (e, t) => {
		let n = o.storable(e, t) ? await s(e, t) : await c(e, t);
		if (!["GET", "HEAD"].includes(e.method) && n.status >= 200 && n.status <= 399 && await s.invalidate(e, t), !l(e, n, t)) return n;
		let r = u(e, n, t);
		return d(r.request, r.options);
	};
	t.exports = d;
})), Hc = /* @__PURE__ */ w(((e, t) => {
	var { FetchError: n, Headers: r, Request: i, Response: a } = no(), o = Mo(), s = Vc(), c = (e, t) => {
		let n = o(t);
		return s(new i(e, n), n);
	};
	c.defaults = (e, t = {}, n = c) => {
		typeof e == "object" && (t = e, e = null);
		let r = (r, i = {}) => n(r || e, {
			...t,
			...i,
			headers: {
				...t.headers,
				...i.headers
			}
		});
		return r.defaults = (e, t = {}) => c.defaults(e, t, r), r;
	}, t.exports = c, t.exports.FetchError = n, t.exports.Headers = r, t.exports.Request = i, t.exports.Response = a;
})), Uc = /* @__PURE__ */ w(((e, t) => {
	var n = {}, r = n.LEFT_BRACE = 1, i = n.RIGHT_BRACE = 2, a = n.LEFT_BRACKET = 3, o = n.RIGHT_BRACKET = 4, s = n.COLON = 5, c = n.COMMA = 6, l = n.TRUE = 7, u = n.FALSE = 8, d = n.NULL = 9, f = n.STRING = 10, p = n.NUMBER = 11, m = n.START = 17, h = n.STOP = 18, g = n.TRUE1 = 33, _ = n.TRUE2 = 34, v = n.TRUE3 = 35, y = n.FALSE1 = 49, b = n.FALSE2 = 50, x = n.FALSE3 = 51, S = n.FALSE4 = 52, C = n.NULL1 = 65, w = n.NULL2 = 66, T = n.NULL3 = 67, E = n.NUMBER1 = 81, D = n.NUMBER3 = 83, O = n.STRING1 = 97, k = n.STRING2 = 98, A = n.STRING3 = 99, j = n.STRING4 = 100, M = n.STRING5 = 101, N = n.STRING6 = 102, P = n.VALUE = 113, F = n.KEY = 114, I = n.OBJECT = 129, L = n.ARRAY = 130, R = 92, z = 47, B = 8, V = 12, H = 10, U = 13, ee = 9, W = 64 * 1024;
	function G() {
		this.tState = m, this.value = void 0, this.string = void 0, this.stringBuffer = Buffer.alloc ? Buffer.alloc(W) : new Buffer(W), this.stringBufferOffset = 0, this.unicode = void 0, this.highSurrogate = void 0, this.key = void 0, this.mode = void 0, this.stack = [], this.state = P, this.bytes_remaining = 0, this.bytes_in_sequence = 0, this.temp_buffs = {
			2: new Buffer(2),
			3: new Buffer(3),
			4: new Buffer(4)
		}, this.offset = -1;
	}
	G.toknam = function(e) {
		for (var t = Object.keys(n), r = 0, i = t.length; r < i; r++) {
			var a = t[r];
			if (n[a] === e) return a;
		}
		return e && "0x" + e.toString(16);
	};
	var K = G.prototype;
	K.onError = function(e) {
		throw e;
	}, K.charError = function(e, t) {
		this.tState = h, this.onError(/* @__PURE__ */ Error("Unexpected " + JSON.stringify(String.fromCharCode(e[t])) + " at position " + t + " in state " + G.toknam(this.tState)));
	}, K.appendStringChar = function(e) {
		this.stringBufferOffset >= W && (this.string += this.stringBuffer.toString("utf8"), this.stringBufferOffset = 0), this.stringBuffer[this.stringBufferOffset++] = e;
	}, K.appendStringBuf = function(e, t, n) {
		var r = e.length;
		typeof t == "number" && (r = typeof n == "number" ? n < 0 ? e.length - t + n : n - t : e.length - t), r < 0 && (r = 0), this.stringBufferOffset + r > W && (this.string += this.stringBuffer.toString("utf8", 0, this.stringBufferOffset), this.stringBufferOffset = 0), e.copy(this.stringBuffer, this.stringBufferOffset, t, n), this.stringBufferOffset += r;
	}, K.write = function(e) {
		typeof e == "string" && (e = new Buffer(e));
		for (var t, n = 0, h = e.length; n < h; n++) if (this.tState === m) {
			if (t = e[n], this.offset++, t === 123) this.onToken(r, "{");
			else if (t === 125) this.onToken(i, "}");
			else if (t === 91) this.onToken(a, "[");
			else if (t === 93) this.onToken(o, "]");
			else if (t === 58) this.onToken(s, ":");
			else if (t === 44) this.onToken(c, ",");
			else if (t === 116) this.tState = g;
			else if (t === 102) this.tState = y;
			else if (t === 110) this.tState = C;
			else if (t === 34) this.string = "", this.stringBufferOffset = 0, this.tState = O;
			else if (t === 45) this.string = "-", this.tState = E;
			else if (t >= 48 && t < 64) this.string = String.fromCharCode(t), this.tState = D;
			else if (!(t === 32 || t === 9 || t === 10 || t === 13)) return this.charError(e, n);
		} else if (this.tState === O) if (t = e[n], this.bytes_remaining > 0) {
			for (var P = 0; P < this.bytes_remaining; P++) this.temp_buffs[this.bytes_in_sequence][this.bytes_in_sequence - this.bytes_remaining + P] = e[P];
			this.appendStringBuf(this.temp_buffs[this.bytes_in_sequence]), this.bytes_in_sequence = this.bytes_remaining = 0, n = n + P - 1;
		} else if (this.bytes_remaining === 0 && t >= 128) {
			if (t <= 193 || t > 244) return this.onError(/* @__PURE__ */ Error("Invalid UTF-8 character at position " + n + " in state " + G.toknam(this.tState)));
			if (t >= 194 && t <= 223 && (this.bytes_in_sequence = 2), t >= 224 && t <= 239 && (this.bytes_in_sequence = 3), t >= 240 && t <= 244 && (this.bytes_in_sequence = 4), this.bytes_in_sequence + n > e.length) {
				for (var F = 0; F <= e.length - 1 - n; F++) this.temp_buffs[this.bytes_in_sequence][F] = e[n + F];
				this.bytes_remaining = n + this.bytes_in_sequence - e.length, n = e.length - 1;
			} else this.appendStringBuf(e, n, n + this.bytes_in_sequence), n = n + this.bytes_in_sequence - 1;
		} else if (t === 34) this.tState = m, this.string += this.stringBuffer.toString("utf8", 0, this.stringBufferOffset), this.stringBufferOffset = 0, this.onToken(f, this.string), this.offset += Buffer.byteLength(this.string, "utf8") + 1, this.string = void 0;
		else if (t === 92) this.tState = k;
		else if (t >= 32) this.appendStringChar(t);
		else return this.charError(e, n);
		else if (this.tState === k) if (t = e[n], t === 34) this.appendStringChar(t), this.tState = O;
		else if (t === 92) this.appendStringChar(R), this.tState = O;
		else if (t === 47) this.appendStringChar(z), this.tState = O;
		else if (t === 98) this.appendStringChar(B), this.tState = O;
		else if (t === 102) this.appendStringChar(V), this.tState = O;
		else if (t === 110) this.appendStringChar(H), this.tState = O;
		else if (t === 114) this.appendStringChar(U), this.tState = O;
		else if (t === 116) this.appendStringChar(ee), this.tState = O;
		else if (t === 117) this.unicode = "", this.tState = A;
		else return this.charError(e, n);
		else if (this.tState === A || this.tState === j || this.tState === M || this.tState === N) if (t = e[n], t >= 48 && t < 64 || t > 64 && t <= 70 || t > 96 && t <= 102) {
			if (this.unicode += String.fromCharCode(t), this.tState++ === N) {
				var I = parseInt(this.unicode, 16);
				this.unicode = void 0, this.highSurrogate !== void 0 && I >= 56320 && I < 57344 ? (this.appendStringBuf(new Buffer(String.fromCharCode(this.highSurrogate, I))), this.highSurrogate = void 0) : this.highSurrogate === void 0 && I >= 55296 && I < 56320 ? this.highSurrogate = I : (this.highSurrogate !== void 0 && (this.appendStringBuf(new Buffer(String.fromCharCode(this.highSurrogate))), this.highSurrogate = void 0), this.appendStringBuf(new Buffer(String.fromCharCode(I)))), this.tState = O;
			}
		} else return this.charError(e, n);
		else if (this.tState === E || this.tState === D) switch (t = e[n], t) {
			case 48:
			case 49:
			case 50:
			case 51:
			case 52:
			case 53:
			case 54:
			case 55:
			case 56:
			case 57:
			case 46:
			case 101:
			case 69:
			case 43:
			case 45:
				this.string += String.fromCharCode(t), this.tState = D;
				break;
			default:
				this.tState = m;
				var L = Number(this.string);
				if (isNaN(L)) return this.charError(e, n);
				this.string.match(/[0-9]+/) == this.string && L.toString() != this.string ? this.onToken(f, this.string) : this.onToken(p, L), this.offset += this.string.length - 1, this.string = void 0, n--;
				break;
		}
		else if (this.tState === g) if (e[n] === 114) this.tState = _;
		else return this.charError(e, n);
		else if (this.tState === _) if (e[n] === 117) this.tState = v;
		else return this.charError(e, n);
		else if (this.tState === v) if (e[n] === 101) this.tState = m, this.onToken(l, !0), this.offset += 3;
		else return this.charError(e, n);
		else if (this.tState === y) if (e[n] === 97) this.tState = b;
		else return this.charError(e, n);
		else if (this.tState === b) if (e[n] === 108) this.tState = x;
		else return this.charError(e, n);
		else if (this.tState === x) if (e[n] === 115) this.tState = S;
		else return this.charError(e, n);
		else if (this.tState === S) if (e[n] === 101) this.tState = m, this.onToken(u, !1), this.offset += 4;
		else return this.charError(e, n);
		else if (this.tState === C) if (e[n] === 117) this.tState = w;
		else return this.charError(e, n);
		else if (this.tState === w) if (e[n] === 108) this.tState = T;
		else return this.charError(e, n);
		else if (this.tState === T) if (e[n] === 108) this.tState = m, this.onToken(d, null), this.offset += 3;
		else return this.charError(e, n);
	}, K.onToken = function(e, t) {}, K.parseError = function(e, t) {
		this.tState = h, this.onError(/* @__PURE__ */ Error("Unexpected " + G.toknam(e) + (t ? "(" + JSON.stringify(t) + ")" : "") + " in state " + G.toknam(this.state)));
	}, K.push = function() {
		this.stack.push({
			value: this.value,
			key: this.key,
			mode: this.mode
		});
	}, K.pop = function() {
		var e = this.value, t = this.stack.pop();
		this.value = t.value, this.key = t.key, this.mode = t.mode, this.emit(e), this.mode || (this.state = P);
	}, K.emit = function(e) {
		this.mode && (this.state = c), this.onValue(e);
	}, K.onValue = function(e) {}, K.onToken = function(e, t) {
		if (this.state === P) if (e === f || e === p || e === l || e === u || e === d) this.value && (this.value[this.key] = t), this.emit(t);
		else if (e === r) this.push(), this.value ? this.value = this.value[this.key] = {} : this.value = {}, this.key = void 0, this.state = F, this.mode = I;
		else if (e === a) this.push(), this.value ? this.value = this.value[this.key] = [] : this.value = [], this.key = 0, this.mode = L, this.state = P;
		else if (e === i) if (this.mode === I) this.pop();
		else return this.parseError(e, t);
		else if (e === o) if (this.mode === L) this.pop();
		else return this.parseError(e, t);
		else return this.parseError(e, t);
		else if (this.state === F) if (e === f) this.key = t, this.state = s;
		else if (e === i) this.pop();
		else return this.parseError(e, t);
		else if (this.state === s) if (e === s) this.state = P;
		else return this.parseError(e, t);
		else if (this.state === c) if (e === c) this.mode === L ? (this.key++, this.state = P) : this.mode === I && (this.state = F);
		else if (e === o && this.mode === L || e === i && this.mode === I) this.pop();
		else return this.parseError(e, t);
		else return this.parseError(e, t);
	}, G.C = n, t.exports = G;
})), Wc = /* @__PURE__ */ w(((e, t) => {
	var n = Uc(), { Minipass: r } = wa(), i = class extends Error {
		constructor(e, t) {
			super(e.message), Error.captureStackTrace(this, t || this.constructor);
		}
		get name() {
			return "JSONStreamError";
		}
	}, a = (e, t) => typeof e == "string" ? String(t) === e : e && typeof e.test == "function" ? e.test(t) : typeof e == "boolean" || typeof e == "object" ? e : typeof e == "function" ? e(t) : !1;
	t.exports = class e extends r {
		#e = 0;
		#t = !1;
		#n = null;
		#r = null;
		#i = null;
		#a;
		#o;
		#s = null;
		#c = null;
		constructor(e) {
			super({
				...e,
				objectMode: !0
			});
			let t = this.#o = new n();
			t.onValue = (e) => this.#f(e), this.#a = t.onToken, t.onToken = (e, t) => this.#d(e, t), t.onError = (e) => this.#u(e), this.#s = typeof e.path == "string" ? e.path.split(".").map((e) => e === "$*" ? { emitKey: !0 } : e === "*" ? !0 : e === "" ? { recurse: !0 } : e) : Array.isArray(e.path) && e.path.length ? e.path : null, typeof e.map == "function" && (this.#i = e.map);
		}
		#l(e, t) {
			this.#r !== !1 && (this.#r = this.#r || {}, this.#r[e] = t), this.#n !== !1 && this.#r === !1 && (this.#n = this.#n || {}, this.#n[e] = t);
		}
		#u(e) {
			let t = this.#t ? this.end : this.write;
			return this.#t = !1, this.emit("error", new i(e, t));
		}
		#d(e, t) {
			let n = this.#o;
			if (this.#a.call(this.#o, e, t), n.stack.length === 0 && this.#c) {
				let e = this.#c;
				this.#s || super.write(e), this.#c = null, this.#e = 0;
			}
		}
		#f(e) {
			let t = this.#o;
			if (this.#c = e, !this.#s) return;
			let n = 0, r = 0, i = !1;
			for (; n < this.#s.length;) {
				let o = this.#s[n];
				if (r++, o && !o.recurse) {
					let s = r === t.stack.length ? t : t.stack[r];
					if (!s) return;
					if (!a(o, s.key)) {
						this.#l(s.key, e);
						return;
					}
					i = !!o.emitKey, n++;
				} else {
					if (n++, n >= this.#s.length) return;
					let i = this.#s[n];
					if (!i) return;
					for (;;) {
						let o = r === t.stack.length ? t : t.stack[r];
						if (!o) return;
						if (a(i, o.key)) {
							n++, Object.isFrozen(t.stack[r]) || (t.stack[r].value = null);
							break;
						} else this.#l(o.key, e);
						r++;
					}
				}
			}
			if (this.#r) {
				let e = this.#r;
				this.#r = !1, this.emit("header", e);
			}
			if (r !== t.stack.length) return;
			this.#e++;
			let o = t.stack.slice(1).map((e) => e.key).concat([t.key]);
			if (e != null) {
				let n = this.#i ? this.#i(e, o) : e;
				if (n != null) {
					let e = i ? { value: n } : n;
					i && (e.key = t.key), super.write(e);
				}
			}
			t.value && delete t.value[t.key];
			for (let e of t.stack) e.value = null;
		}
		write(e, t) {
			if (typeof e == "string") e = Buffer.from(e, t);
			else if (!Buffer.isBuffer(e)) return this.emit("error", /* @__PURE__ */ TypeError("Can only parse JSON from string or buffer input"));
			return this.#o.write(e), this.flowing;
		}
		end(e, t) {
			this.#t = !0, e && this.write(e, t);
			let n = this.#r;
			this.#r = null;
			let r = this.#n;
			return this.#n = null, n && this.emit("header", n), r && this.emit("footer", r), super.end();
		}
		static get JSONStreamError() {
			return i;
		}
		static parse(t, n) {
			return new e({
				path: t,
				map: n
			});
		}
	};
})), Gc = /* @__PURE__ */ w(((e, t) => {
	var { HttpErrorAuthOTP: n } = Ca(), r = To(), i = jo(), a = Hc(), o = Wc(), s = Ao(), c = k("querystring"), l = k("url"), u = Ea(), { Minipass: d } = wa(), f = bo(), p = (e) => {
		try {
			return !!new l.URL(e);
		} catch {
			return !1;
		}
	};
	t.exports = m;
	function m(e, t = {}) {
		let o = {
			...f,
			...t
		}, s = p(e), h = o.registry || f.registry;
		s || (h = o.registry = o.spec && _(o.spec, o) || o.registry || h, e = `${h.trim().replace(/\/?$/g, "")}/${e.trim().replace(/^\//, "")}`, new l.URL(e));
		let g = o.method || "GET", b = Date.now(), x = i(e, o), S = y(e, x, o), C = o.body, w = d.isStream(C), T = C && typeof C == "object" && typeof C.then == "function";
		if (C && !w && !T && typeof C != "string" && !Buffer.isBuffer(C) ? (S["content-type"] = S["content-type"] || "application/json", C = JSON.stringify(C)) : C && !S["content-type"] && (S["content-type"] = "application/octet-stream"), o.gzip) if (S["content-encoding"] = "gzip", w) {
			let e = new u.Gzip();
			C.on("error", (t) => e.emit("error", t)), C = C.pipe(e);
		} else T || (C = new u.Gzip().end(C).concat());
		let E = new l.URL(e);
		if (o.query) {
			let t = typeof o.query == "string" ? c.parse(o.query) : o.query;
			Object.keys(t).forEach((e) => {
				t[e] !== void 0 && E.searchParams.set(e, t[e]);
			}), e = l.format(E);
		}
		return E.searchParams.get("write") === "true" && g === "GET" && (o.offline = !1, o.preferOffline = !1, o.preferOnline = !0), Promise.resolve(C).then(async (t) => {
			let i = a(e, {
				agent: o.agent,
				algorithms: o.algorithms,
				body: t,
				cache: v(o),
				cachePath: o.cache,
				ca: o.ca,
				cert: x.cert || o.cert,
				headers: S,
				integrity: o.integrity,
				key: x.key || o.key,
				localAddress: o.localAddress,
				maxSockets: o.maxSockets,
				memoize: o.memoize,
				method: g,
				noProxy: o.noProxy,
				proxy: o.httpsProxy || o.proxy,
				retry: o.retry ? o.retry : {
					retries: o.fetchRetries,
					factor: o.fetchRetryFactor,
					minTimeout: o.fetchRetryMintimeout,
					maxTimeout: o.fetchRetryMaxtimeout
				},
				strictSSL: o.strictSSL,
				timeout: o.timeout || 30 * 1e3,
				signal: o.signal
			}).then((t) => r({
				method: g,
				uri: e,
				res: t,
				registry: h,
				startTime: b,
				auth: x,
				opts: o
			}));
			return typeof o.otpPrompt == "function" ? i.catch(async (t) => {
				if (t instanceof n) {
					let n;
					try {
						n = await o.otpPrompt();
					} catch {}
					if (!n) throw t;
					return m(e, {
						...o,
						otp: n
					});
				}
				throw t;
			}) : i;
		});
	}
	t.exports.getAuth = i, t.exports.json = h;
	function h(e, t) {
		return m(e, t).then((e) => e.json());
	}
	t.exports.json.stream = g;
	function g(e, t, n = {}) {
		let r = {
			...f,
			...n
		}, i = o.parse(t, r.mapJSON);
		return m(e, r).then((e) => e.body.on(
			"error",
			/* istanbul ignore next: unlikely and difficult to test */
			(e) => i.emit("error", e)
		).pipe(i)).catch((e) => i.emit("error", e)), i;
	}
	t.exports.pickRegistry = _;
	function _(e, t = {}) {
		e = s(e);
		let n = e.scope && t[e.scope.replace(/^@?/, "@") + ":registry"];
		return !n && t.scope && (n = t[t.scope.replace(/^@?/, "@") + ":registry"]), n ||= t.registry || f.registry, n;
	}
	function v(e) {
		return e.offline ? "only-if-cached" : e.preferOffline ? "force-cache" : e.preferOnline ? "no-cache" : "default";
	}
	function y(e, t, n) {
		let r = Object.assign({ "user-agent": n.userAgent }, n.headers || {});
		return n.authType && (r["npm-auth-type"] = n.authType), n.scope && (r["npm-scope"] = n.scope), n.npmSession && (r["npm-session"] = n.npmSession), n.npmCommand && (r["npm-command"] = n.npmCommand), t.token ? r.authorization = `Bearer ${t.token}` : t.auth && (r.authorization = `Basic ${t.auth}`), n.otp && (r["npm-otp"] = n.otp), r;
	}
})), Kc = /* @__PURE__ */ D(xa(), 1), qc = /* @__PURE__ */ D(Sa(), 1), Jc = /* @__PURE__ */ D(Gc(), 1), Yc, Xc;
function Zc(e) {
	if (typeof e != "string") throw TypeError(`Expected a string, got ${typeof e}`);
	if (Yc === void 0 && (Yc = r.homedir()), Yc && /^~(?=$|\/|\\)/.test(e)) return e.replace(/^~/, Yc);
	let t = e.match(/^~([^/\\]+)(.*)/);
	if (t && (Xc === void 0 && (Xc = r.userInfo().username), Xc)) {
		let e = t[1], n = t[2];
		if (e === Xc) return Yc + n;
	}
	return e;
}
//#endregion
//#region node_modules/yocto-queue/index.js
var Qc = class {
	value;
	next;
	constructor(e) {
		this.value = e;
	}
}, $c = class {
	#e;
	#t;
	#n;
	constructor() {
		this.clear();
	}
	enqueue(e) {
		let t = new Qc(e);
		this.#e ? (this.#t.next = t, this.#t = t) : (this.#e = t, this.#t = t), this.#n++;
	}
	dequeue() {
		let e = this.#e;
		if (e) return this.#e = this.#e.next, this.#n--, this.#e || (this.#t = void 0), e.value;
	}
	peek() {
		if (this.#e) return this.#e.value;
	}
	clear() {
		this.#e = void 0, this.#t = void 0, this.#n = 0;
	}
	get size() {
		return this.#n;
	}
	*[Symbol.iterator]() {
		let e = this.#e;
		for (; e;) yield e.value, e = e.next;
	}
	*drain() {
		for (; this.#e;) yield this.dequeue();
	}
};
//#endregion
//#region node_modules/p-limit/index.js
function el(e) {
	if (!((Number.isInteger(e) || e === Infinity) && e > 0)) throw TypeError("Expected `concurrency` to be a number from 1 and up");
	let t = new $c(), n = 0, r = () => {
		n--, t.size > 0 && t.dequeue()();
	}, i = async (e, t, i) => {
		n++;
		let a = (async () => e(...i))();
		t(a);
		try {
			await a;
		} catch {}
		r();
	}, a = (r, a, o) => {
		t.enqueue(i.bind(void 0, r, a, o)), (async () => {
			await Promise.resolve(), n < e && t.size > 0 && t.dequeue()();
		})();
	}, o = (e, ...t) => new Promise((n) => {
		a(e, n, t);
	});
	return Object.defineProperties(o, {
		activeCount: { get: () => n },
		pendingCount: { get: () => t.size },
		clearQueue: { value: () => {
			t.clear();
		} }
	}), o;
}
//#endregion
//#region node_modules/p-locate/index.js
var tl = class extends Error {
	constructor(e) {
		super(), this.value = e;
	}
}, nl = async (e, t) => t(await e), rl = async (e) => {
	let t = await Promise.all(e);
	if (t[1] === !0) throw new tl(t[0]);
	return !1;
};
async function il(e, t, { concurrency: n = Infinity, preserveOrder: r = !0 } = {}) {
	let i = el(n), a = [...e].map((e) => [e, i(nl, e, t)]), o = el(r ? 1 : Infinity);
	try {
		await Promise.all(a.map((e) => o(rl, e)));
	} catch (e) {
		if (e instanceof tl) return e.value;
		throw e;
	}
}
//#endregion
//#region node_modules/locate-path/index.js
var al = {
	directory: "isDirectory",
	file: "isFile"
};
function ol(e) {
	if (!(e === "both" || Object.hasOwn(al, e))) throw Error(`Invalid type specified: ${e}`);
}
var sl = (e, t) => e === "both" ? t.isFile() || t.isDirectory() : t[al[e]](), cl = (e) => e instanceof URL ? s(e) : e;
async function ll(e, { cwd: n = i.cwd(), type: r = "file", allowSymlinks: a = !0, concurrency: o, preserveOrder: s } = {}) {
	ol(r), n = cl(n);
	let c = a ? p.stat : p.lstat;
	return il(e, async (e) => {
		try {
			return sl(r, await c(t.resolve(n, e)));
		} catch {
			return !1;
		}
	}, {
		concurrency: o,
		preserveOrder: s
	});
}
function ul(e, { cwd: n = i.cwd(), type: r = "file", allowSymlinks: a = !0 } = {}) {
	ol(r), n = cl(n);
	let o = a ? f.statSync : f.lstatSync;
	for (let i of e) try {
		let e = o(t.resolve(n, i), { throwIfNoEntry: !1 });
		if (!e) continue;
		if (sl(r, e)) return i;
	} catch {}
}
u(h);
function dl(e) {
	return e instanceof URL ? s(e) : e;
}
//#endregion
//#region node_modules/find-up/index.js
var fl = Symbol("findUpStop");
async function pl(e, n = {}) {
	let r = t.resolve(dl(n.cwd) ?? ""), { root: i } = t.parse(r), a = t.resolve(r, dl(n.stopAt) ?? i), o = n.limit ?? Infinity, s = [e].flat(), c = async (t) => {
		if (typeof e != "function") return ll(s, t);
		let n = await e(t.cwd);
		return typeof n == "string" ? ll([n], t) : n;
	}, l = [];
	for (;;) {
		let e = await c({
			...n,
			cwd: r
		});
		if (e === fl || (e && l.push(t.resolve(r, e)), r === a || l.length >= o)) break;
		r = t.dirname(r);
	}
	return l;
}
function ml(e, n = {}) {
	let r = t.resolve(dl(n.cwd) ?? ""), { root: i } = t.parse(r), a = t.resolve(r, dl(n.stopAt) ?? i), o = n.limit ?? Infinity, s = [e].flat(), c = (t) => {
		if (typeof e != "function") return ul(s, t);
		let n = e(t.cwd);
		return typeof n == "string" ? ul([n], t) : n;
	}, l = [];
	for (;;) {
		let e = c({
			...n,
			cwd: r
		});
		if (e === fl || (e && l.push(t.resolve(r, e)), r === a || l.length >= o)) break;
		r = t.dirname(r);
	}
	return l;
}
async function hl(e, t = {}) {
	return (await pl(e, {
		...t,
		limit: 1
	}))[0];
}
function gl(e, t = {}) {
	return ml(e, {
		...t,
		limit: 1
	})[0];
}
//#endregion
//#region src/lib/figgy-pudding/index.js
var _l = class e {
	constructor(e, t, n) {
		this.__specs = e || {}, this.__opts = t || {}, this.__providers = Sl(n.filter((e) => typeof e == "object" && !!e)), this.__isFiggyPudding = !0;
	}
	get(e) {
		return vl(this, e, !0);
	}
	toJSON() {
		let e = {};
		return this.forEach((t, n) => {
			e[n] = t;
		}), e;
	}
	forEach(e, t = this) {
		for (let [n, r] of this.entries()) e.call(t, r, n, this);
	}
	*entries(e) {
		for (let e of Object.keys(this.__specs)) yield [e, this.get(e)];
		let t = e || this.__opts.other;
		if (t) {
			let e = /* @__PURE__ */ new Set();
			for (let n of this.__providers) {
				let r = n.entries ? n.entries(t) : Cl(n);
				for (let [n, i] of r) t(n) && !e.has(n) && (e.add(n), yield [n, i]);
			}
		}
	}
	concat(...t) {
		return new Proxy(new e(this.__specs, this.__opts, Sl(this.__providers).concat(t)), bl);
	}
};
function vl(e, t, n) {
	let r = e.__specs[t];
	r ||= {};
	let i;
	for (let n of e.__providers) if (i = yl(t, n), i !== void 0) break;
	return i === void 0 && r.default !== void 0 ? typeof r.default == "function" ? r.default(e) : r.default : i;
}
function yl(e, t) {
	let n;
	return n = t.__isFiggyPudding ? vl(t, e, !1) : t[e], n;
}
var bl = { get(e, t) {
	return typeof t == "symbol" || t.slice(0, 2) === "__" || t in _l.prototype ? e[t] : e.get(t);
} };
function xl(e, t) {
	function n(...n) {
		return new Proxy(new _l(e, t, n), bl);
	}
	return n;
}
function Sl(e) {
	let t = [];
	return e.forEach((e) => t.unshift(e)), t;
}
function Cl(e) {
	return Object.keys(e).map((t) => [t, e[t]]);
}
//#endregion
//#region src/lib/libnpmconfig/index.js
var wl = xl({}, { other() {
	return !0;
} }), Tl = xl({
	cache: { default: t.join(process.env.HOME || r.homedir(), ".npm") },
	configNames: { default: ["npmrc", ".npmrc"] },
	envPrefix: { default: /^npm_config_/i },
	cwd: { default: () => process.cwd() },
	globalconfig: { default: () => t.join(Ol(), "etc", "npmrc") },
	userconfig: { default: t.join(process.env.HOME || r.homedir(), ".npmrc") }
});
function El(e, n) {
	let r = Tl(n), i = {};
	Object.keys(process.env).forEach((e) => {
		if (!e.match(r.envPrefix)) return;
		let t = e.toLowerCase().replace(r.envPrefix, "").replace(/(?!^)_/g, "-");
		i[t] = process.env[e];
	});
	let a = wl(e), o = r.userconfig || a.userconfig || i.userconfig, s = o && Dl(o), c = r.globalconfig || a.globalconfig || i.globalconfig, l = c && Dl(c), u = gl(r.configNames, { cwd: r.cwd }), d = {};
	u && u !== o && (d = Dl(u));
	let f = wl(r, l, s, d, i, a);
	return f.cache ? f.concat({ cache: t.resolve(a.cache || i.cache ? r.cwd : d.cache ? t.dirname(u) : s.cache ? t.dirname(o) : l.cache ? t.dirname(c) : t.dirname(o), f.cache) }) : f;
}
function Dl(e) {
	let t;
	try {
		t = f.readFileSync(e, "utf8");
	} catch (e) {
		if (e.code === "ENOENT") return "";
		throw e;
	}
	return qc.default.parse(t);
}
function Ol() {
	if (process.env.PREFIX) return process.env.PREFIX;
	if (process.platform === "win32") return t.dirname(process.execPath);
	{
		let e = t.dirname(t.dirname(process.execPath));
		return process.env.DESTDIR && (e = t.join(process.env.DESTDIR, e)), e;
	}
}
//#endregion
//#region src/lib/spawnCommand.ts
var kl = (e, t = process.platform) => t === "win32" && e !== "bun" ? [`${e}.cmd`, e] : [e];
async function Al(e, t, n, r) {
	let i = kl(e);
	for (let [e, a] of i.entries()) try {
		return await (0, Gi.default)(a, t, n, r);
	} catch (t) {
		if (t.code !== "ENOENT" || e === i.length - 1) throw t;
	}
	throw Error(`No spawn commands available for ${e}`);
}
//#endregion
//#region src/package-managers/filters.ts
function jl(e, t) {
	return t.deprecated || !e.deprecated;
}
function Ml(e, t) {
	return t.pre ? !0 : !e.version || !Dr(e.version);
}
function Nl(e, t) {
	if (!t) return !0;
	let n = Y.default.minVersion(t)?.version;
	if (!n) return !0;
	let r = e?.engines?.node;
	return !r || Y.default.satisfies(n, r);
}
function Pl(e, t) {
	return t ? Object.values(t).every((t) => t[e.name] === void 0 || Y.default.satisfies(e.version, t[e.name])) : !0;
}
var Fl = (e, t, n, r) => {
	if (!t) return !1;
	if (!r || !n) return !0;
	let i = new Date(n), a = typeof r == "function" ? r(e ?? "") ?? 0 : r, o = typeof a == "string" ? Xn(a) ?? 0 : a;
	return Date.now() - i.getTime() >= o * 864e5;
};
function Il(e) {
	let t = [
		(t) => jl(t, e),
		(t) => Ml(t, e),
		e.enginesNode ? (t) => Nl(t, e.nodeEngineVersion) : null,
		e.peerDependencies ? (t) => Pl(t, e.peerDependencies) : null
	];
	return (e) => t.every((t) => t ? t(e) : !0);
}
//#endregion
//#region src/package-managers/npm.ts
var Ll = /* @__PURE__ */ T({
	default: () => Ql,
	defaultPrefix: () => $l,
	distTag: () => iu,
	getEngines: () => nu,
	getPeerDependencies: () => tu,
	greatest: () => eu,
	latest: () => au,
	list: () => ru,
	minor: () => su,
	newest: () => ou,
	normalizeNpmConfig: () => Wl,
	npmApi: () => Gl,
	packageAuthorChanged: () => Jl,
	parseJson: () => ql,
	patch: () => cu,
	semver: () => lu
}), Rl = /* @__PURE__ */ new Set([
	"-",
	"||",
	"&&",
	"<",
	"<=",
	">",
	">="
]), zl = (e) => (0, tr.parseRange)(e).some((e) => Rl.has(e.operator || "")), Bl = (e) => e && (!Y.default.validRange(e) || gr(e)), Vl = async (e, t, n, r = {}, i) => {
	let a = Jc.default.pickRegistry(e, r), o = {
		"user-agent": r.userAgent || `npm-check-updates/${ge.version} node/${process.version}`,
		"ncu-version": ge.version,
		"ncu-pkg-id": `registry:${e}`,
		accept: r.fullMetadata ? "application/json" : "application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*",
		...r.headers
	}, s = new URL(encodeURIComponent(e), a.endsWith("/") ? a : `${a}/`);
	i && (s.pathname += `/${i}`);
	let c = {
		...r,
		headers: o,
		spec: e
	};
	try {
		if (r.fullMetadata) return Jc.default.json(s.href, c);
		{
			n ||= "latest";
			let r = await (0, Jc.default)(s.href, c), i = new sa({
				paths: ["$.*"],
				keepStack: !1
			}), a = { name: e }, o = !1, l = null;
			i.onValue = ({ key: e, value: n }) => {
				if (o || e === void 0) return;
				let r = e;
				t.includes(r) && (a[r] = n, Object.keys(a).length === t.length + 1 && (o = !0));
			}, i.onError = (e) => {
				l = e;
			};
			for await (let e of r.body) {
				if (i.write(e), l) throw l;
				if (o) break;
			}
			return a;
		}
	} catch (a) {
		if (a.code !== "E404" || r.fullMetadata) throw a;
		return Vl(e, t, n, {
			...r,
			fullMetadata: !0
		}, i);
	}
}, Hl = ({ packageName: e, currentVersion: t, options: n, versions: r, time: i, filter: a = () => !0, compare: o = Cr }) => {
	let s = Il(n), c = Y.default.validRange(t) ? Y.default.minVersion(t)?.version : null;
	if (!c) return {
		targetVersion: null,
		fallbackVersion: null,
		targetBlockedByCooldown: !1
	};
	let l = !Fl(e, c, i?.[c], n.cooldown), u = r.reduce((t, r) => {
		let c = r.version;
		if (!c || o(c, t.fallbackVersion) <= 0 || !s({
			...r,
			name: e
		}) || !a?.(c)) return t;
		let l = i?.[c], u = n.cooldown ? Fl(e, c, l, n.cooldown) : !0;
		return o(c, t.targetVersion) > 0 && (t.targetVersion = c, t.targetBlockedByCooldown = !u), u && (t.fallbackVersion = c), t;
	}, {
		targetVersion: c,
		fallbackVersion: c,
		targetBlockedByCooldown: l
	}), d = u.targetVersion, f = u.fallbackVersion;
	return f === u.targetVersion && (f = null), f && !Y.default.gt(f, c) && (f = null), l && d === c && (u.targetBlockedByCooldown = !1), {
		...u,
		targetVersion: d,
		fallbackVersion: f
	};
}, Ul = ({ packageName: e, currentVersion: t, options: n, time: r, targetVersion: i, fallbackVersion: a, targetBlockedByCooldown: o }) => {
	let s = {
		version: i,
		...i && r?.[i] ? { time: r[i] } : null
	};
	if (n.cooldown && i && o) {
		let n = Y.default.validRange(t) ? Y.default.minVersion(t)?.version : null, i = {
			name: e,
			currentVersion: t,
			...n ? { currentVersionTime: r?.[n] } : null,
			...s
		};
		if (a) {
			let e = r?.[a];
			return i.fallbackVersion = a, {
				version: a,
				...e ? { time: e } : null,
				cooldownInfo: i
			};
		}
		return { cooldownInfo: i };
	}
	return s;
}, Wl = (e, n) => {
	let r = {
		cafile: (e) => {
			if (!e) return;
			let r = f.readFileSync(t.resolve(n || "", Zc(e)), "utf8"), i = "-----END CERTIFICATE-----";
			return { ca: r.split(i).filter((e) => !!e.trim()).map((e) => `${e.trimStart()}${i}`) };
		},
		maxsockets: "maxSockets",
		"strict-ssl": "strictSSL"
	}, i = {
		all: "boolean",
		allowsameversion: "boolean",
		audit: "boolean",
		binlinks: "boolean",
		color: "boolean",
		commithooks: "boolean",
		description: "boolean",
		dev: "boolean",
		diffignoreallspace: "boolean",
		diffnameonly: "boolean",
		diffnoprefix: "boolean",
		difftext: "boolean",
		dryrun: "boolean",
		enginestrict: "boolean",
		force: "boolean",
		foregroundscripts: "boolean",
		formatpackagelock: "boolean",
		fund: "boolean",
		gittagversion: "boolean",
		global: "boolean",
		globalstyle: "boolean",
		ifpresent: "boolean",
		ignorescripts: "boolean",
		includestaged: "boolean",
		includeworkspaceroot: "boolean",
		installlinks: "boolean",
		json: "boolean",
		legacybundling: "boolean",
		legacypeerdeps: "boolean",
		link: "boolean",
		long: "boolean",
		offline: "boolean",
		omitlockfileregistryresolved: "boolean",
		packagelock: "boolean",
		packagelockonly: "boolean",
		parseable: "boolean",
		preferoffline: "boolean",
		preferonline: "boolean",
		progress: "boolean",
		readonly: "boolean",
		rebuildbundle: "boolean",
		save: "boolean",
		savebundle: "boolean",
		savedev: "boolean",
		saveexact: "boolean",
		saveoptional: "boolean",
		savepeer: "boolean",
		saveprod: "boolean",
		shrinkwrap: "boolean",
		signgitcommit: "boolean",
		signgittag: "boolean",
		strictpeerdeps: "boolean",
		strictssl: "boolean",
		timing: "boolean",
		unicode: "boolean",
		updatenotifier: "boolean",
		usage: "boolean",
		version: "boolean",
		versions: "boolean",
		workspacesupdate: "boolean",
		diffunified: "number",
		fetchretries: "number",
		fetchretryfactor: "number",
		fetchretrymaxtimeout: "number",
		fetchretrymintimeout: "number",
		fetchtimeout: "number",
		logsmax: "number",
		maxsockets: "number",
		searchlimit: "number",
		searchstaleness: "number",
		ssopollfrequency: "number",
		timeout: "number"
	}, a = (e) => !!e && e !== "false" && e !== "0", o = (e) => parseInt(e) || 0;
	return Dn(e, (e, t) => {
		let n = typeof t == "string" ? i[e.replace(/-/g, "").toLowerCase()] === "boolean" ? a(t) : i[e.replace(/-/g, "").toLowerCase()] === "number" ? o(t) : t.replace(/\${([^}]+)}/, (e, t) => process.env[t]) : t, { [e]: s } = r;
		return typeof s == "string" ? { [s]: n } : typeof s == "function" ? { ...s(n.toString()) } : { [e.match(/^[a-z]/i) ? ba(e) : e]: n };
	});
}, Gl = {};
Gl.findNpmConfig = (0, Kc.default)((e) => {
	let t;
	if (e) try {
		t = qc.default.parse(f.readFileSync(e, "utf-8"));
	} catch (e) {
		if (e.code === "ENOENT") return null;
		throw e;
	}
	else t = {
		...El(null, { userconfig: process.env.npm_config_userconfig || process.env.NPM_CONFIG_USERCONFIG }).toJSON(),
		cache: !1
	};
	return Wl(t, e);
});
var Kl = Gl.findNpmConfig();
function ql(e, t) {
	let n;
	try {
		n = JSON.parse(e);
	} catch (n) {
		throw Error(`Expected JSON from "${t.command}".${t.packageName ? ` There could be problems with the ${t.packageName} package.` : ""} ${e ? "Instead received: " + e : "Received empty response."}`, { cause: n });
	}
	return n;
}
async function Jl(e, t, n, r = {}, i) {
	let a = await Vl(e, ["versions"], null, {
		...i,
		...Kl,
		fullMetadata: !0,
		...r.registry ? {
			registry: r.registry,
			silent: !0
		} : null
	});
	if (a.versions) {
		let e = Object.keys(a.versions), r = Y.default.minSatisfying(e, t), i = Y.default.maxSatisfying(e, n);
		if (r && i && a.versions[r]._npmUser && a.versions[i]._npmUser) return a.versions[r]._npmUser?.name !== a.versions[i]._npmUser?.name;
	}
	return !1;
}
var Yl = (e) => !!(e && (e.name || e.engines || e.version || e.versions));
Gl.mockFetchUpgradedPackument = (e) => (t, n, r, i) => {
	let a = typeof e == "function" ? e(i)?.[t] : typeof e == "string" || Yl(e) ? e : e[t], o = Yl(a) ? a.version : a;
	if (!o) throw Error(`fetchUpgradedPackument is mocked, but no mock version was supplied for ${t}. Make sure that all dependencies are mocked. `);
	let s = Yl(a) && a.time ? a.time?.[o] : (/* @__PURE__ */ new Date()).toISOString(), c = {
		name: t,
		"dist-tags": { [i.distTag || "latest"]: o },
		engines: { node: "" },
		time: { [o]: s },
		version: o,
		versions: {},
		...Yl(a) ? a : null
	}, { versions: l, ...u } = c;
	return Promise.resolve({
		...c,
		versions: { ...Yl(a) && a.versions || { [o]: u } }
	});
};
var Xl = (0, Kc.default)(({ npmConfigLocal: e, npmConfigUser: n, npmConfigWorkspaceProject: r }, i) => {
	let a = i.packageFile ? t.join(i.packageFile, "../.npmrc") : null, o = i.packageFile ? Gl.findNpmConfig(a || void 0) : null, s = i.cwd ? t.join(i.cwd, ".npmrc") : null, c = i.cwd ? Gl.findNpmConfig(s) : null;
	if (r && Object.keys(r).length > 0) {
		Z(i, "\nnpm config (workspace project):", "verbose");
		let { cache: e, ...t } = r;
		Jr(i, t, "verbose");
	}
	if (n && Object.keys(n).length > 0) {
		Z(i, "\nnpm config (user):", "verbose");
		let { cache: e, ...t } = n;
		Jr(i, t, "verbose");
	}
	if (e && Object.keys(e).length > 0) {
		Z(i, "\nnpm config (local override):", "verbose");
		let { cache: t, ...n } = e;
		Jr(i, n, "verbose");
	}
	if (o && Object.keys(o).length > 0) {
		Z(i, `\nnpm config (project: ${a}):`, "verbose");
		let { cache: e, ...t } = o;
		Jr(i, t, "verbose");
	}
	if (c && Object.keys(c).length > 0) {
		Z(i, `\nnpm config (cwd: ${s}):`, "verbose");
		let { cache: e, ...t } = c;
		Jr(i, t, "verbose");
	}
	let l = {
		...r,
		...n,
		...e,
		...o,
		...c,
		...i.registry ? {
			registry: i.registry,
			silent: !0
		} : null,
		...i.timeout ? { timeout: i.timeout } : null
	};
	if (r || e || o || c) {
		Z(i, "\nmerged npm config:", "verbose");
		let { cache: e, ...t } = l;
		Jr(i, t, "verbose");
	}
	return l;
});
async function Zl(e, t, n, r, i = 0, a, o) {
	let s = `STUB_VERSIONS_${process.env.MOCHA_WORKER_ID ?? "0"}`;
	if (process.env[s]) {
		let i = JSON.parse(process.env[s]);
		return Gl.mockFetchUpgradedPackument(i)(e, t, n, r);
	}
	if (Bl(n)) return {};
	let c = r.format?.includes("time") && !t.includes("time") ? [...t, "time"] : t, l = c.includes("time"), u = Xl({
		npmConfigUser: {
			...Kl,
			fullMetadata: l
		},
		npmConfigLocal: a,
		npmConfigWorkspaceProject: o
	}, r), d;
	try {
		let n = r.distTag || "latest";
		d = await Vl(e, Array.from(/* @__PURE__ */ new Set([
			"dist-tags",
			...t,
			...r.deprecated ? [] : ["deprecated", "versions"],
			...r.enginesNode ? ["engines", "versions"] : []
		])), l ? null : n, u);
	} catch (t) {
		if (r.retry && ++i <= r.retry) return Zl(e, c, n, r, i, a);
		throw t;
	}
	return d;
}
Gl.fetchUpgradedPackumentMemo = (0, Kc.default)(Zl, { serializer: (([e, t, n, r, i, a, o]) => {
	let { packageFile: s, ...c } = r;
	return JSON.stringify([
		e,
		t,
		Bl(n),
		c,
		i,
		a,
		o
	]);
}) });
async function Ql(e, t = {}, n = {}, r = {}) {
	let { stdout: i } = await Al("npm", [
		...t.global ? ["--global"] : [],
		...t.prefix ? [`--prefix=${t.prefix}`] : [],
		"--json",
		...Array.isArray(e) ? e : [e]
	], n, r);
	return i;
}
async function $l(e) {
	if (e.prefix) return e.prefix;
	let t;
	try {
		let { stdout: e } = await Al("npm", [
			"config",
			"get",
			"prefix"
		]);
		t = e;
	} catch (t) {
		Z(e, "Error executing `npm config get prefix`. Caught and ignored. Unsolved: https://github.com/raineorshine/npm-check-updates/issues/703. ERROR: " + (t.message || t || "").toString(), "verbose", "error");
	}
	return e.global && t?.match("Cellar") ? "/usr/local" : process.platform === "win32" && e.global && !process.env.prefix ? t ? t.trim() : `${process.env.AppData}\\npm` : void 0;
}
var eu = async (e, t, n = {}, r, i, a) => {
	let o = ["versions"];
	n.cooldown && o.push("time");
	let s = await Gl.fetchUpgradedPackumentMemo(e, o, t, n, 0, r, i), c = {
		packageName: e,
		currentVersion: t,
		options: n,
		versions: Object.values(s?.versions ?? {}),
		time: s?.time
	}, l = Hl(c);
	if (a) {
		let e = l.targetBlockedByCooldown ? l.fallbackVersion : l.targetVersion;
		return {
			version: e,
			...e && s?.time?.[e] ? { time: s.time[e] } : null
		};
	}
	return Ul({
		...c,
		...l
	});
}, tu = async (e, t, n) => {
	let r = [
		"view",
		`${e}@${t}`,
		"peerDependencies"
	], i = await Ql(r, {}, { rejectOnError: !1 }, n);
	return i ? ql(i, { command: [...r, "--json"].join(" ") }) : {};
}, nu = async (e, t, n = {}, r) => (await Vl(e, ["engines"], null, {
	...r,
	...Kl,
	...n.registry ? {
		registry: n.registry,
		silent: !0
	} : null
}, t)).engines || {}, ru = async (e = {}) => {
	let t = ql(await Ql(["ls", "--depth=0"], {
		...e.global ? { global: !0 } : null,
		...e.prefix ? { prefix: e.prefix } : null
	}, { rejectOnError: !1 }, { ...e.cwd ? { cwd: e.cwd } : null }), { command: `npm${process.platform === "win32" ? ".cmd" : ""} ls --json${e.global ? " --global" : ""}` }).dependencies;
	return Dn(t, (e, t) => ({ [e]: t.version || t.required?.version }));
}, iu = async (e, t, n = {}, r, i) => {
	let a = ["dist-tags"];
	n.cooldown && a.push("time");
	let o = await Gl.fetchUpgradedPackumentMemo(e, a, t, n, 0, r, i), s = o?.["dist-tags"]?.[n.distTag || "latest"];
	if (!s) return {};
	let c = o?.versions ? o.versions?.[s] : {
		name: e,
		version: s
	}, l = o?.time?.[s], u = l ? { time: l } : null, d = Y.default.validRange(t) && Y.default.minVersion(t)?.version || "0.0.0", f = c.version === d || c && Fl(e, c.version, l, n.cooldown);
	return f && Il(n)(c) ? {
		version: c.version,
		...u
	} : n.cooldown ? (s && c && !f && Z(n, `Skipping ${e}@${s} due to cooldown${l ? ` (published ${l})` : ""}.`, "verbose"), { cooldownInfo: {
		name: e,
		currentVersion: t,
		currentVersionTime: o?.time?.[d],
		version: c.version,
		...u
	} }) : n.distTag && n.distTag !== "latest" ? {} : eu(e, t, n, r, i, "distTag");
}, au = async (e, t, n = {}, r, i) => {
	let a = await iu(e, t, {
		...n,
		distTag: "latest"
	}, r, i);
	if (a.cooldownInfo) {
		let o = await eu(e, t, n, r, i, "latest");
		if (o.version) return a.cooldownInfo.fallbackVersion = o.version, {
			...o,
			...a
		};
	}
	return a;
}, ou = async (e, t, n = {}, r, i) => {
	let a = await Gl.fetchUpgradedPackumentMemo(e, ["time", "versions"], t, n, 0, r, i), o = Object.values(a?.versions ?? {}), s = a?.time, c = !s || Object.keys(s).length === 0, l = {
		packageName: e,
		currentVersion: t,
		options: n,
		versions: o,
		time: s
	}, u = c ? {
		targetVersion: t,
		fallbackVersion: null,
		targetBlockedByCooldown: !1
	} : Hl({
		...l,
		compare: (e, t) => {
			let n = a?.time?.[e] || "", r = a?.time?.[t] || "";
			return n > r ? 1 : n < r ? -1 : 0;
		}
	});
	return Ul({
		...l,
		...u
	});
}, su = async (e, t, n = {}, r, i) => {
	let a = ["versions"];
	n.cooldown && a.push("time");
	let o = await Gl.fetchUpgradedPackumentMemo(e, a, t, n, 0, r, i), s = {
		packageName: e,
		currentVersion: t,
		options: n,
		versions: Object.values(o?.versions ?? {}),
		time: o?.time
	}, c = Hl({
		...s,
		filter: Tr(t, "minor")
	});
	return Ul({
		...s,
		...c
	});
}, cu = async (e, t, n = {}, r, i) => {
	let a = ["versions"];
	n.cooldown && a.push("time");
	let o = await Gl.fetchUpgradedPackumentMemo(e, a, t, n, 0, r, i), s = {
		packageName: e,
		currentVersion: t,
		options: n,
		versions: Object.values(o?.versions ?? {}),
		time: o?.time
	}, c = Hl({
		...s,
		filter: Tr(t, "patch")
	});
	return Ul({
		...s,
		...c
	});
}, lu = async (e, t, n = {}, r, i) => {
	if (zl(t)) return { version: null };
	let a = ["versions"];
	n.cooldown && a.push("time");
	let o = await Gl.fetchUpgradedPackumentMemo(e, a, t, n, 0, r, i), s = {
		packageName: e,
		currentVersion: t,
		options: n,
		versions: Object.values(o?.versions ?? {}),
		time: o?.time
	}, c = Hl({
		...s,
		filter: Er(t)
	});
	return Ul({
		...s,
		...c
	});
}, uu = /* @__PURE__ */ T({
	default: () => du,
	defaultPrefix: () => fu,
	distTag: () => iu,
	getEngines: () => nu,
	getPeerDependencies: () => tu,
	greatest: () => eu,
	latest: () => au,
	list: () => pu,
	minor: () => su,
	newest: () => ou,
	packageAuthorChanged: () => Jl,
	patch: () => cu,
	semver: () => lu
});
async function du(e, t = {}, n = {}, r = {}) {
	return (0, Gi.default)("bun", [
		...t.global ? ["--global"] : [],
		...t.prefix ? [`--prefix=${t.prefix}`] : [],
		...Array.isArray(e) ? e : [e]
	], n, r);
}
var fu = async (e) => e.global ? e.prefix || process.env.BUN_INSTALL || t.dirname((await (0, Gi.default)("bun", [
	"pm",
	"-g",
	"bin"
])).stdout) : void 0, pu = async (e = {}) => {
	let { stdout: t } = await du(["pm", "ls"], {
		...e.global ? { global: !0 } : null,
		...e.prefix ? { prefix: e.prefix } : null
	}, { rejectOnError: !1 }, {
		env: {
			...process.env,
			NO_COLOR: "1"
		},
		...e.cwd ? { cwd: e.cwd } : null
	});
	return Dn(d(t).split("\n"), (e) => {
		let t = e.match(/.* (.+?)@(.+)/);
		if (t) {
			let [, e, n] = t;
			return { [e]: n };
		}
		return null;
	});
}, mu = /* @__PURE__ */ w(((e) => {
	var t = Symbol.for("yaml.alias"), n = Symbol.for("yaml.document"), r = Symbol.for("yaml.map"), i = Symbol.for("yaml.pair"), a = Symbol.for("yaml.scalar"), o = Symbol.for("yaml.seq"), s = Symbol.for("yaml.node.type"), c = (e) => !!e && typeof e == "object" && e[s] === t, l = (e) => !!e && typeof e == "object" && e[s] === n, u = (e) => !!e && typeof e == "object" && e[s] === r, d = (e) => !!e && typeof e == "object" && e[s] === i, f = (e) => !!e && typeof e == "object" && e[s] === a, p = (e) => !!e && typeof e == "object" && e[s] === o;
	function m(e) {
		if (e && typeof e == "object") switch (e[s]) {
			case r:
			case o: return !0;
		}
		return !1;
	}
	function h(e) {
		if (e && typeof e == "object") switch (e[s]) {
			case t:
			case r:
			case a:
			case o: return !0;
		}
		return !1;
	}
	e.ALIAS = t, e.DOC = n, e.MAP = r, e.NODE_TYPE = s, e.PAIR = i, e.SCALAR = a, e.SEQ = o, e.hasAnchor = (e) => (f(e) || m(e)) && !!e.anchor, e.isAlias = c, e.isCollection = m, e.isDocument = l, e.isMap = u, e.isNode = h, e.isPair = d, e.isScalar = f, e.isSeq = p;
})), hu = /* @__PURE__ */ w(((e) => {
	var t = mu(), n = Symbol("break visit"), r = Symbol("skip children"), i = Symbol("remove node");
	function a(e, n) {
		let r = l(n);
		t.isDocument(e) ? o(null, e.contents, r, Object.freeze([e])) === i && (e.contents = null) : o(null, e, r, Object.freeze([]));
	}
	a.BREAK = n, a.SKIP = r, a.REMOVE = i;
	function o(e, r, a, s) {
		let c = u(e, r, a, s);
		if (t.isNode(c) || t.isPair(c)) return d(e, s, c), o(e, c, a, s);
		if (typeof c != "symbol") {
			if (t.isCollection(r)) {
				s = Object.freeze(s.concat(r));
				for (let e = 0; e < r.items.length; ++e) {
					let t = o(e, r.items[e], a, s);
					if (typeof t == "number") e = t - 1;
					else if (t === n) return n;
					else t === i && (r.items.splice(e, 1), --e);
				}
			} else if (t.isPair(r)) {
				s = Object.freeze(s.concat(r));
				let e = o("key", r.key, a, s);
				if (e === n) return n;
				e === i && (r.key = null);
				let t = o("value", r.value, a, s);
				if (t === n) return n;
				t === i && (r.value = null);
			}
		}
		return c;
	}
	async function s(e, n) {
		let r = l(n);
		t.isDocument(e) ? await c(null, e.contents, r, Object.freeze([e])) === i && (e.contents = null) : await c(null, e, r, Object.freeze([]));
	}
	s.BREAK = n, s.SKIP = r, s.REMOVE = i;
	async function c(e, r, a, o) {
		let s = await u(e, r, a, o);
		if (t.isNode(s) || t.isPair(s)) return d(e, o, s), c(e, s, a, o);
		if (typeof s != "symbol") {
			if (t.isCollection(r)) {
				o = Object.freeze(o.concat(r));
				for (let e = 0; e < r.items.length; ++e) {
					let t = await c(e, r.items[e], a, o);
					if (typeof t == "number") e = t - 1;
					else if (t === n) return n;
					else t === i && (r.items.splice(e, 1), --e);
				}
			} else if (t.isPair(r)) {
				o = Object.freeze(o.concat(r));
				let e = await c("key", r.key, a, o);
				if (e === n) return n;
				e === i && (r.key = null);
				let t = await c("value", r.value, a, o);
				if (t === n) return n;
				t === i && (r.value = null);
			}
		}
		return s;
	}
	function l(e) {
		return typeof e == "object" && (e.Collection || e.Node || e.Value) ? Object.assign({
			Alias: e.Node,
			Map: e.Node,
			Scalar: e.Node,
			Seq: e.Node
		}, e.Value && {
			Map: e.Value,
			Scalar: e.Value,
			Seq: e.Value
		}, e.Collection && {
			Map: e.Collection,
			Seq: e.Collection
		}, e) : e;
	}
	function u(e, n, r, i) {
		if (typeof r == "function") return r(e, n, i);
		if (t.isMap(n)) return r.Map?.(e, n, i);
		if (t.isSeq(n)) return r.Seq?.(e, n, i);
		if (t.isPair(n)) return r.Pair?.(e, n, i);
		if (t.isScalar(n)) return r.Scalar?.(e, n, i);
		if (t.isAlias(n)) return r.Alias?.(e, n, i);
	}
	function d(e, n, r) {
		let i = n[n.length - 1];
		if (t.isCollection(i)) i.items[e] = r;
		else if (t.isPair(i)) e === "key" ? i.key = r : i.value = r;
		else if (t.isDocument(i)) i.contents = r;
		else {
			let e = t.isAlias(i) ? "alias" : "scalar";
			throw Error(`Cannot replace node with ${e} parent`);
		}
	}
	e.visit = a, e.visitAsync = s;
})), gu = /* @__PURE__ */ w(((e) => {
	var t = mu(), n = hu(), r = {
		"!": "%21",
		",": "%2C",
		"[": "%5B",
		"]": "%5D",
		"{": "%7B",
		"}": "%7D"
	}, i = (e) => e.replace(/[!,[\]{}]/g, (e) => r[e]), a = class e {
		constructor(t, n) {
			this.docStart = null, this.docEnd = !1, this.yaml = Object.assign({}, e.defaultYaml, t), this.tags = Object.assign({}, e.defaultTags, n);
		}
		clone() {
			let t = new e(this.yaml, this.tags);
			return t.docStart = this.docStart, t;
		}
		atDocument() {
			let t = new e(this.yaml, this.tags);
			switch (this.yaml.version) {
				case "1.1":
					this.atNextDocument = !0;
					break;
				case "1.2":
					this.atNextDocument = !1, this.yaml = {
						explicit: e.defaultYaml.explicit,
						version: "1.2"
					}, this.tags = Object.assign({}, e.defaultTags);
					break;
			}
			return t;
		}
		add(t, n) {
			this.atNextDocument &&= (this.yaml = {
				explicit: e.defaultYaml.explicit,
				version: "1.1"
			}, this.tags = Object.assign({}, e.defaultTags), !1);
			let r = t.trim().split(/[ \t]+/), i = r.shift();
			switch (i) {
				case "%TAG": {
					if (r.length !== 2 && (n(0, "%TAG directive should contain exactly two parts"), r.length < 2)) return !1;
					let [e, t] = r;
					return this.tags[e] = t, !0;
				}
				case "%YAML": {
					if (this.yaml.explicit = !0, r.length !== 1) return n(0, "%YAML directive should contain exactly one part"), !1;
					let [e] = r;
					if (e === "1.1" || e === "1.2") return this.yaml.version = e, !0;
					{
						let t = /^\d+\.\d+$/.test(e);
						return n(6, `Unsupported YAML version ${e}`, t), !1;
					}
				}
				default: return n(0, `Unknown directive ${i}`, !0), !1;
			}
		}
		tagName(e, t) {
			if (e === "!") return "!";
			if (e[0] !== "!") return t(`Not a valid tag: ${e}`), null;
			if (e[1] === "<") {
				let n = e.slice(2, -1);
				return n === "!" || n === "!!" ? (t(`Verbatim tags aren't resolved, so ${e} is invalid.`), null) : (e[e.length - 1] !== ">" && t("Verbatim tags must end with a >"), n);
			}
			let [, n, r] = e.match(/^(.*!)([^!]*)$/s);
			r || t(`The ${e} tag has no suffix`);
			let i = this.tags[n];
			if (i) try {
				return i + decodeURIComponent(r);
			} catch (e) {
				return t(String(e)), null;
			}
			return n === "!" ? e : (t(`Could not resolve tag: ${e}`), null);
		}
		tagString(e) {
			for (let [t, n] of Object.entries(this.tags)) if (e.startsWith(n)) return t + i(e.substring(n.length));
			return e[0] === "!" ? e : `!<${e}>`;
		}
		toString(e) {
			let r = this.yaml.explicit ? [`%YAML ${this.yaml.version || "1.2"}`] : [], i = Object.entries(this.tags), a;
			if (e && i.length > 0 && t.isNode(e.contents)) {
				let r = {};
				n.visit(e.contents, (e, n) => {
					t.isNode(n) && n.tag && (r[n.tag] = !0);
				}), a = Object.keys(r);
			} else a = [];
			for (let [t, n] of i) t === "!!" && n === "tag:yaml.org,2002:" || (!e || a.some((e) => e.startsWith(n))) && r.push(`%TAG ${t} ${n}`);
			return r.join("\n");
		}
	};
	a.defaultYaml = {
		explicit: !1,
		version: "1.2"
	}, a.defaultTags = { "!!": "tag:yaml.org,2002:" }, e.Directives = a;
})), _u = /* @__PURE__ */ w(((e) => {
	var t = mu(), n = hu();
	function r(e) {
		if (/[\x00-\x19\s,[\]{}]/.test(e)) {
			let t = `Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;
			throw Error(t);
		}
		return !0;
	}
	function i(e) {
		let t = /* @__PURE__ */ new Set();
		return n.visit(e, { Value(e, n) {
			n.anchor && t.add(n.anchor);
		} }), t;
	}
	function a(e, t) {
		for (let n = 1;; ++n) {
			let r = `${e}${n}`;
			if (!t.has(r)) return r;
		}
	}
	function o(e, n) {
		let r = [], o = /* @__PURE__ */ new Map(), s = null;
		return {
			onAnchor: (t) => {
				r.push(t), s ??= i(e);
				let o = a(n, s);
				return s.add(o), o;
			},
			setAnchors: () => {
				for (let e of r) {
					let n = o.get(e);
					if (typeof n == "object" && n.anchor && (t.isScalar(n.node) || t.isCollection(n.node))) n.node.anchor = n.anchor;
					else {
						let t = /* @__PURE__ */ Error("Failed to resolve repeated object (this should not happen)");
						throw t.source = e, t;
					}
				}
			},
			sourceObjects: o
		};
	}
	e.anchorIsValid = r, e.anchorNames = i, e.createNodeAnchors = o, e.findNewAnchor = a;
})), vu = /* @__PURE__ */ w(((e) => {
	function t(e, n, r, i) {
		if (i && typeof i == "object") if (Array.isArray(i)) for (let n = 0, r = i.length; n < r; ++n) {
			let r = i[n], a = t(e, i, String(n), r);
			a === void 0 ? delete i[n] : a !== r && (i[n] = a);
		}
		else if (i instanceof Map) for (let n of Array.from(i.keys())) {
			let r = i.get(n), a = t(e, i, n, r);
			a === void 0 ? i.delete(n) : a !== r && i.set(n, a);
		}
		else if (i instanceof Set) for (let n of Array.from(i)) {
			let r = t(e, i, n, n);
			r === void 0 ? i.delete(n) : r !== n && (i.delete(n), i.add(r));
		}
		else for (let [n, r] of Object.entries(i)) {
			let a = t(e, i, n, r);
			a === void 0 ? delete i[n] : a !== r && (i[n] = a);
		}
		return e.call(n, r, i);
	}
	e.applyReviver = t;
})), yu = /* @__PURE__ */ w(((e) => {
	var t = mu();
	function n(e, r, i) {
		if (Array.isArray(e)) return e.map((e, t) => n(e, String(t), i));
		if (e && typeof e.toJSON == "function") {
			if (!i || !t.hasAnchor(e)) return e.toJSON(r, i);
			let n = {
				aliasCount: 0,
				count: 1,
				res: void 0
			};
			i.anchors.set(e, n), i.onCreate = (e) => {
				n.res = e, delete i.onCreate;
			};
			let a = e.toJSON(r, i);
			return i.onCreate && i.onCreate(a), a;
		}
		return typeof e == "bigint" && !i?.keep ? Number(e) : e;
	}
	e.toJS = n;
})), bu = /* @__PURE__ */ w(((e) => {
	var t = vu(), n = mu(), r = yu();
	e.NodeBase = class {
		constructor(e) {
			Object.defineProperty(this, n.NODE_TYPE, { value: e });
		}
		clone() {
			let e = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
			return this.range && (e.range = this.range.slice()), e;
		}
		toJS(e, { mapAsMap: i, maxAliasCount: a, onAnchor: o, reviver: s } = {}) {
			if (!n.isDocument(e)) throw TypeError("A document argument is required");
			let c = {
				anchors: /* @__PURE__ */ new Map(),
				doc: e,
				keep: !0,
				mapAsMap: i === !0,
				mapKeyWarned: !1,
				maxAliasCount: typeof a == "number" ? a : 100
			}, l = r.toJS(this, "", c);
			if (typeof o == "function") for (let { count: e, res: t } of c.anchors.values()) o(t, e);
			return typeof s == "function" ? t.applyReviver(s, { "": l }, "", l) : l;
		}
	};
})), xu = /* @__PURE__ */ w(((e) => {
	var t = _u(), n = hu(), r = mu(), i = bu(), a = yu(), o = class extends i.NodeBase {
		constructor(e) {
			super(r.ALIAS), this.source = e, Object.defineProperty(this, "tag", { set() {
				throw Error("Alias nodes cannot have tags");
			} });
		}
		resolve(e, t) {
			if (t?.maxAliasCount === 0) throw ReferenceError("Alias resolution is disabled");
			let i;
			t?.aliasResolveCache ? i = t.aliasResolveCache : (i = [], n.visit(e, { Node: (e, t) => {
				(r.isAlias(t) || r.hasAnchor(t)) && i.push(t);
			} }), t && (t.aliasResolveCache = i));
			let a;
			for (let e of i) {
				if (e === this) break;
				e.anchor === this.source && (a = e);
			}
			return a;
		}
		toJSON(e, t) {
			if (!t) return { source: this.source };
			let { anchors: n, doc: r, maxAliasCount: i } = t, o = this.resolve(r, t);
			if (!o) {
				let e = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
				throw ReferenceError(e);
			}
			let c = n.get(o);
			/* istanbul ignore if */
			if (c ||= (a.toJS(o, null, t), n.get(o)), c?.res === void 0) throw ReferenceError("This should not happen: Alias anchor was not resolved?");
			if (i >= 0 && (c.count += 1, c.aliasCount === 0 && (c.aliasCount = s(r, o, n)), c.count * c.aliasCount > i)) throw ReferenceError("Excessive alias count indicates a resource exhaustion attack");
			return c.res;
		}
		toString(e, n, r) {
			let i = `*${this.source}`;
			if (e) {
				if (t.anchorIsValid(this.source), e.options.verifyAliasOrder && !e.anchors.has(this.source)) {
					let e = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
					throw Error(e);
				}
				if (e.implicitKey) return `${i} `;
			}
			return i;
		}
	};
	function s(e, t, n) {
		if (r.isAlias(t)) {
			let r = t.resolve(e), i = n && r && n.get(r);
			return i ? i.count * i.aliasCount : 0;
		} else if (r.isCollection(t)) {
			let r = 0;
			for (let i of t.items) {
				let t = s(e, i, n);
				t > r && (r = t);
			}
			return r;
		} else if (r.isPair(t)) {
			let r = s(e, t.key, n), i = s(e, t.value, n);
			return Math.max(r, i);
		}
		return 1;
	}
	e.Alias = o;
})), Su = /* @__PURE__ */ w(((e) => {
	var t = mu(), n = bu(), r = yu(), i = (e) => !e || typeof e != "function" && typeof e != "object", a = class extends n.NodeBase {
		constructor(e) {
			super(t.SCALAR), this.value = e;
		}
		toJSON(e, t) {
			return t?.keep ? this.value : r.toJS(this.value, e, t);
		}
		toString() {
			return String(this.value);
		}
	};
	a.BLOCK_FOLDED = "BLOCK_FOLDED", a.BLOCK_LITERAL = "BLOCK_LITERAL", a.PLAIN = "PLAIN", a.QUOTE_DOUBLE = "QUOTE_DOUBLE", a.QUOTE_SINGLE = "QUOTE_SINGLE", e.Scalar = a, e.isScalarValue = i;
})), Cu = /* @__PURE__ */ w(((e) => {
	var t = xu(), n = mu(), r = Su(), i = "tag:yaml.org,2002:";
	function a(e, t, n) {
		if (t) {
			let e = n.filter((e) => e.tag === t), r = e.find((e) => !e.format) ?? e[0];
			if (!r) throw Error(`Tag ${t} not found`);
			return r;
		}
		return n.find((t) => t.identify?.(e) && !t.format);
	}
	function o(e, o, s) {
		if (n.isDocument(e) && (e = e.contents), n.isNode(e)) return e;
		if (n.isPair(e)) {
			let t = s.schema[n.MAP].createNode?.(s.schema, null, s);
			return t.items.push(e), t;
		}
		(e instanceof String || e instanceof Number || e instanceof Boolean || typeof BigInt < "u" && e instanceof BigInt) && (e = e.valueOf());
		let { aliasDuplicateObjects: c, onAnchor: l, onTagObj: u, schema: d, sourceObjects: f } = s, p;
		if (c && e && typeof e == "object") {
			if (p = f.get(e), p) return p.anchor ??= l(e), new t.Alias(p.anchor);
			p = {
				anchor: null,
				node: null
			}, f.set(e, p);
		}
		o?.startsWith("!!") && (o = i + o.slice(2));
		let m = a(e, o, d.tags);
		if (!m) {
			if (e && typeof e.toJSON == "function" && (e = e.toJSON()), !e || typeof e != "object") {
				let t = new r.Scalar(e);
				return p && (p.node = t), t;
			}
			m = e instanceof Map ? d[n.MAP] : Symbol.iterator in Object(e) ? d[n.SEQ] : d[n.MAP];
		}
		u && (u(m), delete s.onTagObj);
		let h = m?.createNode ? m.createNode(s.schema, e, s) : typeof m?.nodeClass?.from == "function" ? m.nodeClass.from(s.schema, e, s) : new r.Scalar(e);
		return o ? h.tag = o : m.default || (h.tag = m.tag), p && (p.node = h), h;
	}
	e.createNode = o;
})), wu = /* @__PURE__ */ w(((e) => {
	var t = Cu(), n = mu(), r = bu();
	function i(e, n, r) {
		let i = r;
		for (let e = n.length - 1; e >= 0; --e) {
			let t = n[e];
			if (typeof t == "number" && Number.isInteger(t) && t >= 0) {
				let e = [];
				e[t] = i, i = e;
			} else i = /* @__PURE__ */ new Map([[t, i]]);
		}
		return t.createNode(i, void 0, {
			aliasDuplicateObjects: !1,
			keepUndefined: !1,
			onAnchor: () => {
				throw Error("This should not happen, please report a bug.");
			},
			schema: e,
			sourceObjects: /* @__PURE__ */ new Map()
		});
	}
	var a = (e) => e == null || typeof e == "object" && !!e[Symbol.iterator]().next().done;
	e.Collection = class extends r.NodeBase {
		constructor(e, t) {
			super(e), Object.defineProperty(this, "schema", {
				value: t,
				configurable: !0,
				enumerable: !1,
				writable: !0
			});
		}
		clone(e) {
			let t = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
			return e && (t.schema = e), t.items = t.items.map((t) => n.isNode(t) || n.isPair(t) ? t.clone(e) : t), this.range && (t.range = this.range.slice()), t;
		}
		addIn(e, t) {
			if (a(e)) this.add(t);
			else {
				let [r, ...a] = e, o = this.get(r, !0);
				if (n.isCollection(o)) o.addIn(a, t);
				else if (o === void 0 && this.schema) this.set(r, i(this.schema, a, t));
				else throw Error(`Expected YAML collection at ${r}. Remaining path: ${a}`);
			}
		}
		deleteIn(e) {
			let [t, ...r] = e;
			if (r.length === 0) return this.delete(t);
			let i = this.get(t, !0);
			if (n.isCollection(i)) return i.deleteIn(r);
			throw Error(`Expected YAML collection at ${t}. Remaining path: ${r}`);
		}
		getIn(e, t) {
			let [r, ...i] = e, a = this.get(r, !0);
			return i.length === 0 ? !t && n.isScalar(a) ? a.value : a : n.isCollection(a) ? a.getIn(i, t) : void 0;
		}
		hasAllNullValues(e) {
			return this.items.every((t) => {
				if (!n.isPair(t)) return !1;
				let r = t.value;
				return r == null || e && n.isScalar(r) && r.value == null && !r.commentBefore && !r.comment && !r.tag;
			});
		}
		hasIn(e) {
			let [t, ...r] = e;
			if (r.length === 0) return this.has(t);
			let i = this.get(t, !0);
			return n.isCollection(i) ? i.hasIn(r) : !1;
		}
		setIn(e, t) {
			let [r, ...a] = e;
			if (a.length === 0) this.set(r, t);
			else {
				let e = this.get(r, !0);
				if (n.isCollection(e)) e.setIn(a, t);
				else if (e === void 0 && this.schema) this.set(r, i(this.schema, a, t));
				else throw Error(`Expected YAML collection at ${r}. Remaining path: ${a}`);
			}
		}
	}, e.collectionFromPath = i, e.isEmptyPath = a;
})), Tu = /* @__PURE__ */ w(((e) => {
	var t = (e) => e.replace(/^(?!$)(?: $)?/gm, "#");
	function n(e, t) {
		return /^\n+$/.test(e) ? e.substring(1) : t ? e.replace(/^(?! *$)/gm, t) : e;
	}
	e.indentComment = n, e.lineComment = (e, t, r) => e.endsWith("\n") ? n(r, t) : r.includes("\n") ? "\n" + n(r, t) : (e.endsWith(" ") ? "" : " ") + r, e.stringifyComment = t;
})), Eu = /* @__PURE__ */ w(((e) => {
	var t = "flow", n = "block", r = "quoted";
	function i(e, t, i = "flow", { indentAtStart: o, lineWidth: s = 80, minContentWidth: c = 20, onFold: l, onOverflow: u } = {}) {
		if (!s || s < 0) return e;
		s < c && (c = 0);
		let d = Math.max(1 + c, 1 + s - t.length);
		if (e.length <= d) return e;
		let f = [], p = {}, m = s - t.length;
		typeof o == "number" && (o > s - Math.max(2, c) ? f.push(0) : m = s - o);
		let h, g, _ = !1, v = -1, y = -1, b = -1;
		i === n && (v = a(e, v, t.length), v !== -1 && (m = v + d));
		for (let o; o = e[v += 1];) {
			if (i === r && o === "\\") {
				switch (y = v, e[v + 1]) {
					case "x":
						v += 3;
						break;
					case "u":
						v += 5;
						break;
					case "U":
						v += 9;
						break;
					default: v += 1;
				}
				b = v;
			}
			if (o === "\n") i === n && (v = a(e, v, t.length)), m = v + t.length + d, h = void 0;
			else {
				if (o === " " && g && g !== " " && g !== "\n" && g !== "	") {
					let t = e[v + 1];
					t && t !== " " && t !== "\n" && t !== "	" && (h = v);
				}
				if (v >= m) if (h) f.push(h), m = h + d, h = void 0;
				else if (i === r) {
					for (; g === " " || g === "	";) g = o, o = e[v += 1], _ = !0;
					let t = v > b + 1 ? v - 2 : y - 1;
					if (p[t]) return e;
					f.push(t), p[t] = !0, m = t + d, h = void 0;
				} else _ = !0;
			}
			g = o;
		}
		if (_ && u && u(), f.length === 0) return e;
		l && l();
		let x = e.slice(0, f[0]);
		for (let n = 0; n < f.length; ++n) {
			let a = f[n], o = f[n + 1] || e.length;
			a === 0 ? x = `\n${t}${e.slice(0, o)}` : (i === r && p[a] && (x += `${e[a]}\\`), x += `\n${t}${e.slice(a + 1, o)}`);
		}
		return x;
	}
	function a(e, t, n) {
		let r = t, i = t + 1, a = e[i];
		for (; a === " " || a === "	";) if (t < i + n) a = e[++t];
		else {
			do
				a = e[++t];
			while (a && a !== "\n");
			r = t, i = t + 1, a = e[i];
		}
		return r;
	}
	e.FOLD_BLOCK = n, e.FOLD_FLOW = t, e.FOLD_QUOTED = r, e.foldFlowLines = i;
})), Du = /* @__PURE__ */ w(((e) => {
	var t = Su(), n = Eu(), r = (e, t) => ({
		indentAtStart: t ? e.indent.length : e.indentAtStart,
		lineWidth: e.options.lineWidth,
		minContentWidth: e.options.minContentWidth
	}), i = (e) => /^(%|---|\.\.\.)/m.test(e);
	function a(e, t, n) {
		if (!t || t < 0) return !1;
		let r = t - n, i = e.length;
		if (i <= r) return !1;
		for (let t = 0, n = 0; t < i; ++t) if (e[t] === "\n") {
			if (t - n > r) return !0;
			if (n = t + 1, i - n <= r) return !1;
		}
		return !0;
	}
	function o(e, t) {
		let a = JSON.stringify(e);
		if (t.options.doubleQuotedAsJSON) return a;
		let { implicitKey: o } = t, s = t.options.doubleQuotedMinMultiLineLength, c = t.indent || (i(e) ? "  " : ""), l = "", u = 0;
		for (let e = 0, t = a[e]; t; t = a[++e]) if (t === " " && a[e + 1] === "\\" && a[e + 2] === "n" && (l += a.slice(u, e) + "\\ ", e += 1, u = e, t = "\\"), t === "\\") switch (a[e + 1]) {
			case "u":
				{
					l += a.slice(u, e);
					let t = a.substr(e + 2, 4);
					switch (t) {
						case "0000":
							l += "\\0";
							break;
						case "0007":
							l += "\\a";
							break;
						case "000b":
							l += "\\v";
							break;
						case "001b":
							l += "\\e";
							break;
						case "0085":
							l += "\\N";
							break;
						case "00a0":
							l += "\\_";
							break;
						case "2028":
							l += "\\L";
							break;
						case "2029":
							l += "\\P";
							break;
						default: t.substr(0, 2) === "00" ? l += "\\x" + t.substr(2) : l += a.substr(e, 6);
					}
					e += 5, u = e + 1;
				}
				break;
			case "n":
				if (o || a[e + 2] === "\"" || a.length < s) e += 1;
				else {
					for (l += a.slice(u, e) + "\n\n"; a[e + 2] === "\\" && a[e + 3] === "n" && a[e + 4] !== "\"";) l += "\n", e += 2;
					l += c, a[e + 2] === " " && (l += "\\"), e += 1, u = e + 1;
				}
				break;
			default: e += 1;
		}
		return l = u ? l + a.slice(u) : a, o ? l : n.foldFlowLines(l, c, n.FOLD_QUOTED, r(t, !1));
	}
	function s(e, t) {
		if (t.options.singleQuote === !1 || t.implicitKey && e.includes("\n") || /[ \t]\n|\n[ \t]/.test(e)) return o(e, t);
		let a = t.indent || (i(e) ? "  " : ""), s = "'" + e.replace(/'/g, "''").replace(/\n+/g, `$&\n${a}`) + "'";
		return t.implicitKey ? s : n.foldFlowLines(s, a, n.FOLD_FLOW, r(t, !1));
	}
	function c(e, t) {
		let { singleQuote: n } = t.options, r;
		if (n === !1) r = o;
		else {
			let t = e.includes("\""), i = e.includes("'");
			r = t && !i ? s : i && !t ? o : n ? s : o;
		}
		return r(e, t);
	}
	var l;
	try {
		l = /* @__PURE__ */ RegExp("(^|(?<!\n))\n+(?!\n|$)", "g");
	} catch {
		l = /\n+(?!\n|$)/g;
	}
	function u({ comment: e, type: o, value: s }, u, d, f) {
		let { blockQuote: p, commentString: m, lineWidth: h } = u.options;
		if (!p || /\n[\t ]+$/.test(s)) return c(s, u);
		let g = u.indent || (u.forceBlockIndent || i(s) ? "  " : ""), _ = p === "literal" ? !0 : p === "folded" || o === t.Scalar.BLOCK_FOLDED ? !1 : o === t.Scalar.BLOCK_LITERAL ? !0 : !a(s, h, g.length);
		if (!s) return _ ? "|\n" : ">\n";
		let v, y;
		for (y = s.length; y > 0; --y) {
			let e = s[y - 1];
			if (e !== "\n" && e !== "	" && e !== " ") break;
		}
		let b = s.substring(y), x = b.indexOf("\n");
		x === -1 ? v = "-" : s === b || x !== b.length - 1 ? (v = "+", f && f()) : v = "", b &&= (s = s.slice(0, -b.length), b[b.length - 1] === "\n" && (b = b.slice(0, -1)), b.replace(l, `$&${g}`));
		let S = !1, C, w = -1;
		for (C = 0; C < s.length; ++C) {
			let e = s[C];
			if (e === " ") S = !0;
			else if (e === "\n") w = C;
			else break;
		}
		let T = s.substring(0, w < C ? w + 1 : C);
		T &&= (s = s.substring(T.length), T.replace(/\n+/g, `$&${g}`));
		let E = (S ? g ? "2" : "1" : "") + v;
		if (e && (E += " " + m(e.replace(/ ?[\r\n]+/g, " ")), d && d()), !_) {
			let e = s.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${g}`), i = !1, a = r(u, !0);
			p !== "folded" && o !== t.Scalar.BLOCK_FOLDED && (a.onOverflow = () => {
				i = !0;
			});
			let c = n.foldFlowLines(`${T}${e}${b}`, g, n.FOLD_BLOCK, a);
			if (!i) return `>${E}\n${g}${c}`;
		}
		return s = s.replace(/\n+/g, `$&${g}`), `|${E}\n${g}${T}${s}${b}`;
	}
	function d(e, a, o, s) {
		let { type: l, value: d } = e, { actualString: f, implicitKey: p, indent: m, indentStep: h, inFlow: g } = a;
		if (p && d.includes("\n") || g && /[[\]{},]/.test(d)) return c(d, a);
		if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(d)) return p || g || !d.includes("\n") ? c(d, a) : u(e, a, o, s);
		if (!p && !g && l !== t.Scalar.PLAIN && d.includes("\n")) return u(e, a, o, s);
		if (i(d)) {
			if (m === "") return a.forceBlockIndent = !0, u(e, a, o, s);
			if (p && m === h) return c(d, a);
		}
		let _ = d.replace(/\n+/g, `$&\n${m}`);
		if (f) {
			let e = (e) => e.default && e.tag !== "tag:yaml.org,2002:str" && e.test?.test(_), { compat: t, tags: n } = a.doc.schema;
			if (n.some(e) || t?.some(e)) return c(d, a);
		}
		return p ? _ : n.foldFlowLines(_, m, n.FOLD_FLOW, r(a, !1));
	}
	function f(e, n, r, i) {
		let { implicitKey: a, inFlow: l } = n, f = typeof e.value == "string" ? e : Object.assign({}, e, { value: String(e.value) }), { type: p } = e;
		p !== t.Scalar.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(f.value) && (p = t.Scalar.QUOTE_DOUBLE);
		let m = (e) => {
			switch (e) {
				case t.Scalar.BLOCK_FOLDED:
				case t.Scalar.BLOCK_LITERAL: return a || l ? c(f.value, n) : u(f, n, r, i);
				case t.Scalar.QUOTE_DOUBLE: return o(f.value, n);
				case t.Scalar.QUOTE_SINGLE: return s(f.value, n);
				case t.Scalar.PLAIN: return d(f, n, r, i);
				default: return null;
			}
		}, h = m(p);
		if (h === null) {
			let { defaultKeyType: e, defaultStringType: t } = n.options, r = a && e || t;
			if (h = m(r), h === null) throw Error(`Unsupported default string type ${r}`);
		}
		return h;
	}
	e.stringifyString = f;
})), Ou = /* @__PURE__ */ w(((e) => {
	var t = _u(), n = mu(), r = Tu(), i = Du();
	function a(e, t) {
		let n = Object.assign({
			blockQuote: !0,
			commentString: r.stringifyComment,
			defaultKeyType: null,
			defaultStringType: "PLAIN",
			directives: null,
			doubleQuotedAsJSON: !1,
			doubleQuotedMinMultiLineLength: 40,
			falseStr: "false",
			flowCollectionPadding: !0,
			indentSeq: !0,
			lineWidth: 80,
			minContentWidth: 20,
			nullStr: "null",
			simpleKeys: !1,
			singleQuote: null,
			trailingComma: !1,
			trueStr: "true",
			verifyAliasOrder: !0
		}, e.schema.toStringOptions, t), i;
		switch (n.collectionStyle) {
			case "block":
				i = !1;
				break;
			case "flow":
				i = !0;
				break;
			default: i = null;
		}
		return {
			anchors: /* @__PURE__ */ new Set(),
			doc: e,
			flowCollectionPadding: n.flowCollectionPadding ? " " : "",
			indent: "",
			indentStep: typeof n.indent == "number" ? " ".repeat(n.indent) : "  ",
			inFlow: i,
			options: n
		};
	}
	function o(e, t) {
		if (t.tag) {
			let n = e.filter((e) => e.tag === t.tag);
			if (n.length > 0) return n.find((e) => e.format === t.format) ?? n[0];
		}
		let r, i;
		if (n.isScalar(t)) {
			i = t.value;
			let n = e.filter((e) => e.identify?.(i));
			if (n.length > 1) {
				let e = n.filter((e) => e.test);
				e.length > 0 && (n = e);
			}
			r = n.find((e) => e.format === t.format) ?? n.find((e) => !e.format);
		} else i = t, r = e.find((e) => e.nodeClass && i instanceof e.nodeClass);
		if (!r) {
			let e = i?.constructor?.name ?? (i === null ? "null" : typeof i);
			throw Error(`Tag not resolved for ${e} value`);
		}
		return r;
	}
	function s(e, r, { anchors: i, doc: a }) {
		if (!a.directives) return "";
		let o = [], s = (n.isScalar(e) || n.isCollection(e)) && e.anchor;
		s && t.anchorIsValid(s) && (i.add(s), o.push(`&${s}`));
		let c = e.tag ?? (r.default ? null : r.tag);
		return c && o.push(a.directives.tagString(c)), o.join(" ");
	}
	function c(e, t, r, a) {
		if (n.isPair(e)) return e.toString(t, r, a);
		if (n.isAlias(e)) {
			if (t.doc.directives) return e.toString(t);
			if (t.resolvedAliases?.has(e)) throw TypeError("Cannot stringify circular structure without alias nodes");
			t.resolvedAliases ? t.resolvedAliases.add(e) : t.resolvedAliases = /* @__PURE__ */ new Set([e]), e = e.resolve(t.doc);
		}
		let c, l = n.isNode(e) ? e : t.doc.createNode(e, { onTagObj: (e) => c = e });
		c ??= o(t.doc.schema.tags, l);
		let u = s(l, c, t);
		u.length > 0 && (t.indentAtStart = (t.indentAtStart ?? 0) + u.length + 1);
		let d = typeof c.stringify == "function" ? c.stringify(l, t, r, a) : n.isScalar(l) ? i.stringifyString(l, t, r, a) : l.toString(t, r, a);
		return u ? n.isScalar(l) || d[0] === "{" || d[0] === "[" ? `${u} ${d}` : `${u}\n${t.indent}${d}` : d;
	}
	e.createStringifyContext = a, e.stringify = c;
})), ku = /* @__PURE__ */ w(((e) => {
	var t = mu(), n = Su(), r = Ou(), i = Tu();
	function a({ key: e, value: a }, o, s, c) {
		let { allNullValues: l, doc: u, indent: d, indentStep: f, options: { commentString: p, indentSeq: m, simpleKeys: h } } = o, g = t.isNode(e) && e.comment || null;
		if (h) {
			if (g) throw Error("With simple keys, key nodes cannot have comments");
			if (t.isCollection(e) || !t.isNode(e) && typeof e == "object") throw Error("With simple keys, collection cannot be used as a key value");
		}
		let _ = !h && (!e || g && a == null && !o.inFlow || t.isCollection(e) || (t.isScalar(e) ? e.type === n.Scalar.BLOCK_FOLDED || e.type === n.Scalar.BLOCK_LITERAL : typeof e == "object"));
		o = Object.assign({}, o, {
			allNullValues: !1,
			implicitKey: !_ && (h || !l),
			indent: d + f
		});
		let v = !1, y = !1, b = r.stringify(e, o, () => v = !0, () => y = !0);
		if (!_ && !o.inFlow && b.length > 1024) {
			if (h) throw Error("With simple keys, single line scalar must not span more than 1024 characters");
			_ = !0;
		}
		if (o.inFlow) {
			if (l || a == null) return v && s && s(), b === "" ? "?" : _ ? `? ${b}` : b;
		} else if (l && !h || a == null && _) return b = `? ${b}`, g && !v ? b += i.lineComment(b, o.indent, p(g)) : y && c && c(), b;
		v && (g = null), _ ? (g && (b += i.lineComment(b, o.indent, p(g))), b = `? ${b}\n${d}:`) : (b = `${b}:`, g && (b += i.lineComment(b, o.indent, p(g))));
		let x, S, C;
		t.isNode(a) ? (x = !!a.spaceBefore, S = a.commentBefore, C = a.comment) : (x = !1, S = null, C = null, a && typeof a == "object" && (a = u.createNode(a))), o.implicitKey = !1, !_ && !g && t.isScalar(a) && (o.indentAtStart = b.length + 1), y = !1, !m && f.length >= 2 && !o.inFlow && !_ && t.isSeq(a) && !a.flow && !a.tag && !a.anchor && (o.indent = o.indent.substring(2));
		let w = !1, T = r.stringify(a, o, () => w = !0, () => y = !0), E = " ";
		if (g || x || S) {
			if (E = x ? "\n" : "", S) {
				let e = p(S);
				E += `\n${i.indentComment(e, o.indent)}`;
			}
			T === "" && !o.inFlow ? E === "\n" && C && (E = "\n\n") : E += `\n${o.indent}`;
		} else if (!_ && t.isCollection(a)) {
			let e = T[0], t = T.indexOf("\n"), n = t !== -1, r = o.inFlow ?? a.flow ?? a.items.length === 0;
			if (n || !r) {
				let r = !1;
				if (n && (e === "&" || e === "!")) {
					let n = T.indexOf(" ");
					e === "&" && n !== -1 && n < t && T[n + 1] === "!" && (n = T.indexOf(" ", n + 1)), (n === -1 || t < n) && (r = !0);
				}
				r || (E = `\n${o.indent}`);
			}
		} else (T === "" || T[0] === "\n") && (E = "");
		return b += E + T, o.inFlow ? w && s && s() : C && !w ? b += i.lineComment(b, o.indent, p(C)) : y && c && c(), b;
	}
	e.stringifyPair = a;
})), Au = /* @__PURE__ */ w(((e) => {
	var t = k("process");
	function n(e, ...t) {
		e === "debug" && console.log(...t);
	}
	function r(e, n) {
		(e === "debug" || e === "warn") && (typeof t.emitWarning == "function" ? t.emitWarning(n) : console.warn(n));
	}
	e.debug = n, e.warn = r;
})), ju = /* @__PURE__ */ w(((e) => {
	var t = mu(), n = Su(), r = "<<", i = {
		identify: (e) => e === r || typeof e == "symbol" && e.description === r,
		default: "key",
		tag: "tag:yaml.org,2002:merge",
		test: /^<<$/,
		resolve: () => Object.assign(new n.Scalar(Symbol(r)), { addToJSMap: o }),
		stringify: () => r
	}, a = (e, r) => (i.identify(r) || t.isScalar(r) && (!r.type || r.type === n.Scalar.PLAIN) && i.identify(r.value)) && e?.doc.schema.tags.some((e) => e.tag === i.tag && e.default);
	function o(e, n, r) {
		let i = c(e, r);
		if (t.isSeq(i)) for (let t of i.items) s(e, n, t);
		else if (Array.isArray(i)) for (let t of i) s(e, n, t);
		else s(e, n, i);
	}
	function s(e, n, r) {
		let i = c(e, r);
		if (!t.isMap(i)) throw Error("Merge sources must be maps or map aliases");
		let a = i.toJSON(null, e, Map);
		for (let [e, t] of a) n instanceof Map ? n.has(e) || n.set(e, t) : n instanceof Set ? n.add(e) : Object.prototype.hasOwnProperty.call(n, e) || Object.defineProperty(n, e, {
			value: t,
			writable: !0,
			enumerable: !0,
			configurable: !0
		});
		return n;
	}
	function c(e, n) {
		return e && t.isAlias(n) ? n.resolve(e.doc, e) : n;
	}
	e.addMergeToJSMap = o, e.isMergeKey = a, e.merge = i;
})), Mu = /* @__PURE__ */ w(((e) => {
	var t = Au(), n = ju(), r = Ou(), i = mu(), a = yu();
	function o(e, t, { key: r, value: o }) {
		if (i.isNode(r) && r.addToJSMap) r.addToJSMap(e, t, o);
		else if (n.isMergeKey(e, r)) n.addMergeToJSMap(e, t, o);
		else {
			let n = a.toJS(r, "", e);
			if (t instanceof Map) t.set(n, a.toJS(o, n, e));
			else if (t instanceof Set) t.add(n);
			else {
				let i = s(r, n, e), c = a.toJS(o, i, e);
				i in t ? Object.defineProperty(t, i, {
					value: c,
					writable: !0,
					enumerable: !0,
					configurable: !0
				}) : t[i] = c;
			}
		}
		return t;
	}
	function s(e, n, a) {
		if (n === null) return "";
		if (typeof n != "object") return String(n);
		if (i.isNode(e) && a?.doc) {
			let n = r.createStringifyContext(a.doc, {});
			n.anchors = /* @__PURE__ */ new Set();
			for (let e of a.anchors.keys()) n.anchors.add(e.anchor);
			n.inFlow = !0, n.inStringifyKey = !0;
			let i = e.toString(n);
			if (!a.mapKeyWarned) {
				let e = JSON.stringify(i);
				e.length > 40 && (e = e.substring(0, 36) + "...\""), t.warn(a.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`), a.mapKeyWarned = !0;
			}
			return i;
		}
		return JSON.stringify(n);
	}
	e.addPairToJSMap = o;
})), Nu = /* @__PURE__ */ w(((e) => {
	var t = Cu(), n = ku(), r = Mu(), i = mu();
	function a(e, n, r) {
		return new o(t.createNode(e, void 0, r), t.createNode(n, void 0, r));
	}
	var o = class e {
		constructor(e, t = null) {
			Object.defineProperty(this, i.NODE_TYPE, { value: i.PAIR }), this.key = e, this.value = t;
		}
		clone(t) {
			let { key: n, value: r } = this;
			return i.isNode(n) && (n = n.clone(t)), i.isNode(r) && (r = r.clone(t)), new e(n, r);
		}
		toJSON(e, t) {
			let n = t?.mapAsMap ? /* @__PURE__ */ new Map() : {};
			return r.addPairToJSMap(t, n, this);
		}
		toString(e, t, r) {
			return e?.doc ? n.stringifyPair(this, e, t, r) : JSON.stringify(this);
		}
	};
	e.Pair = o, e.createPair = a;
})), Pu = /* @__PURE__ */ w(((e) => {
	var t = mu(), n = Ou(), r = Tu();
	function i(e, t, n) {
		return (t.inFlow ?? e.flow ? o : a)(e, t, n);
	}
	function a({ comment: e, items: i }, a, { blockItemPrefix: o, flowChars: c, itemIndent: l, onChompKeep: u, onComment: d }) {
		let { indent: f, options: { commentString: p } } = a, m = Object.assign({}, a, {
			indent: l,
			type: null
		}), h = !1, g = [];
		for (let e = 0; e < i.length; ++e) {
			let c = i[e], u = null;
			if (t.isNode(c)) !h && c.spaceBefore && g.push(""), s(a, g, c.commentBefore, h), c.comment && (u = c.comment);
			else if (t.isPair(c)) {
				let e = t.isNode(c.key) ? c.key : null;
				e && (!h && e.spaceBefore && g.push(""), s(a, g, e.commentBefore, h));
			}
			h = !1;
			let d = n.stringify(c, m, () => u = null, () => h = !0);
			u && (d += r.lineComment(d, l, p(u))), h && u && (h = !1), g.push(o + d);
		}
		let _;
		if (g.length === 0) _ = c.start + c.end;
		else {
			_ = g[0];
			for (let e = 1; e < g.length; ++e) {
				let t = g[e];
				_ += t ? `\n${f}${t}` : "\n";
			}
		}
		return e ? (_ += "\n" + r.indentComment(p(e), f), d && d()) : h && u && u(), _;
	}
	function o({ items: e }, i, { flowChars: a, itemIndent: o }) {
		let { indent: c, indentStep: l, flowCollectionPadding: u, options: { commentString: d } } = i;
		o += l;
		let f = Object.assign({}, i, {
			indent: o,
			inFlow: !0,
			type: null
		}), p = !1, m = 0, h = [];
		for (let a = 0; a < e.length; ++a) {
			let c = e[a], l = null;
			if (t.isNode(c)) c.spaceBefore && h.push(""), s(i, h, c.commentBefore, !1), c.comment && (l = c.comment);
			else if (t.isPair(c)) {
				let e = t.isNode(c.key) ? c.key : null;
				e && (e.spaceBefore && h.push(""), s(i, h, e.commentBefore, !1), e.comment && (p = !0));
				let n = t.isNode(c.value) ? c.value : null;
				n ? (n.comment && (l = n.comment), n.commentBefore && (p = !0)) : c.value == null && e?.comment && (l = e.comment);
			}
			l && (p = !0);
			let u = n.stringify(c, f, () => l = null);
			p ||= h.length > m || u.includes("\n"), a < e.length - 1 ? u += "," : i.options.trailingComma && (i.options.lineWidth > 0 && (p ||= h.reduce((e, t) => e + t.length + 2, 2) + (u.length + 2) > i.options.lineWidth), p && (u += ",")), l && (u += r.lineComment(u, o, d(l))), h.push(u), m = h.length;
		}
		let { start: g, end: _ } = a;
		if (h.length === 0) return g + _;
		if (!p) {
			let e = h.reduce((e, t) => e + t.length + 2, 2);
			p = i.options.lineWidth > 0 && e > i.options.lineWidth;
		}
		if (p) {
			let e = g;
			for (let t of h) e += t ? `\n${l}${c}${t}` : "\n";
			return `${e}\n${c}${_}`;
		} else return `${g}${u}${h.join(" ")}${u}${_}`;
	}
	function s({ indent: e, options: { commentString: t } }, n, i, a) {
		if (i && a && (i = i.replace(/^\n+/, "")), i) {
			let a = r.indentComment(t(i), e);
			n.push(a.trimStart());
		}
	}
	e.stringifyCollection = i;
})), Fu = /* @__PURE__ */ w(((e) => {
	var t = Pu(), n = Mu(), r = wu(), i = mu(), a = Nu(), o = Su();
	function s(e, t) {
		let n = i.isScalar(t) ? t.value : t;
		for (let r of e) if (i.isPair(r) && (r.key === t || r.key === n || i.isScalar(r.key) && r.key.value === n)) return r;
	}
	e.YAMLMap = class extends r.Collection {
		static get tagName() {
			return "tag:yaml.org,2002:map";
		}
		constructor(e) {
			super(i.MAP, e), this.items = [];
		}
		static from(e, t, n) {
			let { keepUndefined: r, replacer: i } = n, o = new this(e), s = (e, s) => {
				if (typeof i == "function") s = i.call(t, e, s);
				else if (Array.isArray(i) && !i.includes(e)) return;
				(s !== void 0 || r) && o.items.push(a.createPair(e, s, n));
			};
			if (t instanceof Map) for (let [e, n] of t) s(e, n);
			else if (t && typeof t == "object") for (let e of Object.keys(t)) s(e, t[e]);
			return typeof e.sortMapEntries == "function" && o.items.sort(e.sortMapEntries), o;
		}
		add(e, t) {
			let n;
			n = i.isPair(e) ? e : !e || typeof e != "object" || !("key" in e) ? new a.Pair(e, e?.value) : new a.Pair(e.key, e.value);
			let r = s(this.items, n.key), c = this.schema?.sortMapEntries;
			if (r) {
				if (!t) throw Error(`Key ${n.key} already set`);
				i.isScalar(r.value) && o.isScalarValue(n.value) ? r.value.value = n.value : r.value = n.value;
			} else if (c) {
				let e = this.items.findIndex((e) => c(n, e) < 0);
				e === -1 ? this.items.push(n) : this.items.splice(e, 0, n);
			} else this.items.push(n);
		}
		delete(e) {
			let t = s(this.items, e);
			return t ? this.items.splice(this.items.indexOf(t), 1).length > 0 : !1;
		}
		get(e, t) {
			let n = s(this.items, e)?.value;
			return (!t && i.isScalar(n) ? n.value : n) ?? void 0;
		}
		has(e) {
			return !!s(this.items, e);
		}
		set(e, t) {
			this.add(new a.Pair(e, t), !0);
		}
		toJSON(e, t, r) {
			let i = r ? new r() : t?.mapAsMap ? /* @__PURE__ */ new Map() : {};
			t?.onCreate && t.onCreate(i);
			for (let e of this.items) n.addPairToJSMap(t, i, e);
			return i;
		}
		toString(e, n, r) {
			if (!e) return JSON.stringify(this);
			for (let e of this.items) if (!i.isPair(e)) throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);
			return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })), t.stringifyCollection(this, e, {
				blockItemPrefix: "",
				flowChars: {
					start: "{",
					end: "}"
				},
				itemIndent: e.indent || "",
				onChompKeep: r,
				onComment: n
			});
		}
	}, e.findPair = s;
})), Iu = /* @__PURE__ */ w(((e) => {
	var t = mu(), n = Fu();
	e.map = {
		collection: "map",
		default: !0,
		nodeClass: n.YAMLMap,
		tag: "tag:yaml.org,2002:map",
		resolve(e, n) {
			return t.isMap(e) || n("Expected a mapping for this tag"), e;
		},
		createNode: (e, t, r) => n.YAMLMap.from(e, t, r)
	};
})), Lu = /* @__PURE__ */ w(((e) => {
	var t = Cu(), n = Pu(), r = wu(), i = mu(), a = Su(), o = yu(), s = class extends r.Collection {
		static get tagName() {
			return "tag:yaml.org,2002:seq";
		}
		constructor(e) {
			super(i.SEQ, e), this.items = [];
		}
		add(e) {
			this.items.push(e);
		}
		delete(e) {
			let t = c(e);
			return typeof t == "number" ? this.items.splice(t, 1).length > 0 : !1;
		}
		get(e, t) {
			let n = c(e);
			if (typeof n != "number") return;
			let r = this.items[n];
			return !t && i.isScalar(r) ? r.value : r;
		}
		has(e) {
			let t = c(e);
			return typeof t == "number" && t < this.items.length;
		}
		set(e, t) {
			let n = c(e);
			if (typeof n != "number") throw Error(`Expected a valid index, not ${e}.`);
			let r = this.items[n];
			i.isScalar(r) && a.isScalarValue(t) ? r.value = t : this.items[n] = t;
		}
		toJSON(e, t) {
			let n = [];
			t?.onCreate && t.onCreate(n);
			let r = 0;
			for (let e of this.items) n.push(o.toJS(e, String(r++), t));
			return n;
		}
		toString(e, t, r) {
			return e ? n.stringifyCollection(this, e, {
				blockItemPrefix: "- ",
				flowChars: {
					start: "[",
					end: "]"
				},
				itemIndent: (e.indent || "") + "  ",
				onChompKeep: r,
				onComment: t
			}) : JSON.stringify(this);
		}
		static from(e, n, r) {
			let { replacer: i } = r, a = new this(e);
			if (n && Symbol.iterator in Object(n)) {
				let e = 0;
				for (let o of n) {
					if (typeof i == "function") {
						let t = n instanceof Set ? o : String(e++);
						o = i.call(n, t, o);
					}
					a.items.push(t.createNode(o, void 0, r));
				}
			}
			return a;
		}
	};
	function c(e) {
		let t = i.isScalar(e) ? e.value : e;
		return t && typeof t == "string" && (t = Number(t)), typeof t == "number" && Number.isInteger(t) && t >= 0 ? t : null;
	}
	e.YAMLSeq = s;
})), Ru = /* @__PURE__ */ w(((e) => {
	var t = mu(), n = Lu();
	e.seq = {
		collection: "seq",
		default: !0,
		nodeClass: n.YAMLSeq,
		tag: "tag:yaml.org,2002:seq",
		resolve(e, n) {
			return t.isSeq(e) || n("Expected a sequence for this tag"), e;
		},
		createNode: (e, t, r) => n.YAMLSeq.from(e, t, r)
	};
})), zu = /* @__PURE__ */ w(((e) => {
	var t = Du();
	e.string = {
		identify: (e) => typeof e == "string",
		default: !0,
		tag: "tag:yaml.org,2002:str",
		resolve: (e) => e,
		stringify(e, n, r, i) {
			return n = Object.assign({ actualString: !0 }, n), t.stringifyString(e, n, r, i);
		}
	};
})), Bu = /* @__PURE__ */ w(((e) => {
	var t = Su(), n = {
		identify: (e) => e == null,
		createNode: () => new t.Scalar(null),
		default: !0,
		tag: "tag:yaml.org,2002:null",
		test: /^(?:~|[Nn]ull|NULL)?$/,
		resolve: () => new t.Scalar(null),
		stringify: ({ source: e }, t) => typeof e == "string" && n.test.test(e) ? e : t.options.nullStr
	};
	e.nullTag = n;
})), Vu = /* @__PURE__ */ w(((e) => {
	var t = Su(), n = {
		identify: (e) => typeof e == "boolean",
		default: !0,
		tag: "tag:yaml.org,2002:bool",
		test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
		resolve: (e) => new t.Scalar(e[0] === "t" || e[0] === "T"),
		stringify({ source: e, value: t }, r) {
			return e && n.test.test(e) && t === (e[0] === "t" || e[0] === "T") ? e : t ? r.options.trueStr : r.options.falseStr;
		}
	};
	e.boolTag = n;
})), Hu = /* @__PURE__ */ w(((e) => {
	function t({ format: e, minFractionDigits: t, tag: n, value: r }) {
		if (typeof r == "bigint") return String(r);
		let i = typeof r == "number" ? r : Number(r);
		if (!isFinite(i)) return isNaN(i) ? ".nan" : i < 0 ? "-.inf" : ".inf";
		let a = Object.is(r, -0) ? "-0" : JSON.stringify(r);
		if (!e && t && (!n || n === "tag:yaml.org,2002:float") && /^-?\d/.test(a) && !a.includes("e")) {
			let e = a.indexOf(".");
			e < 0 && (e = a.length, a += ".");
			let n = t - (a.length - e - 1);
			for (; n-- > 0;) a += "0";
		}
		return a;
	}
	e.stringifyNumber = t;
})), Uu = /* @__PURE__ */ w(((e) => {
	var t = Su(), n = Hu(), r = {
		identify: (e) => typeof e == "number",
		default: !0,
		tag: "tag:yaml.org,2002:float",
		test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
		resolve: (e) => e.slice(-3).toLowerCase() === "nan" ? NaN : e[0] === "-" ? -Infinity : Infinity,
		stringify: n.stringifyNumber
	};
	e.float = {
		identify: (e) => typeof e == "number",
		default: !0,
		tag: "tag:yaml.org,2002:float",
		test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,
		resolve(e) {
			let n = new t.Scalar(parseFloat(e)), r = e.indexOf(".");
			return r !== -1 && e[e.length - 1] === "0" && (n.minFractionDigits = e.length - r - 1), n;
		},
		stringify: n.stringifyNumber
	}, e.floatExp = {
		identify: (e) => typeof e == "number",
		default: !0,
		tag: "tag:yaml.org,2002:float",
		format: "EXP",
		test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,
		resolve: (e) => parseFloat(e),
		stringify(e) {
			let t = Number(e.value);
			return isFinite(t) ? t.toExponential() : n.stringifyNumber(e);
		}
	}, e.floatNaN = r;
})), Wu = /* @__PURE__ */ w(((e) => {
	var t = Hu(), n = (e) => typeof e == "bigint" || Number.isInteger(e), r = (e, t, n, { intAsBigInt: r }) => r ? BigInt(e) : parseInt(e.substring(t), n);
	function i(e, r, i) {
		let { value: a } = e;
		return n(a) && a >= 0 ? i + a.toString(r) : t.stringifyNumber(e);
	}
	e.int = {
		identify: n,
		default: !0,
		tag: "tag:yaml.org,2002:int",
		test: /^[-+]?[0-9]+$/,
		resolve: (e, t, n) => r(e, 0, 10, n),
		stringify: t.stringifyNumber
	}, e.intHex = {
		identify: (e) => n(e) && e >= 0,
		default: !0,
		tag: "tag:yaml.org,2002:int",
		format: "HEX",
		test: /^0x[0-9a-fA-F]+$/,
		resolve: (e, t, n) => r(e, 2, 16, n),
		stringify: (e) => i(e, 16, "0x")
	}, e.intOct = {
		identify: (e) => n(e) && e >= 0,
		default: !0,
		tag: "tag:yaml.org,2002:int",
		format: "OCT",
		test: /^0o[0-7]+$/,
		resolve: (e, t, n) => r(e, 2, 8, n),
		stringify: (e) => i(e, 8, "0o")
	};
})), Gu = /* @__PURE__ */ w(((e) => {
	var t = Iu(), n = Bu(), r = Ru(), i = zu(), a = Vu(), o = Uu(), s = Wu();
	e.schema = [
		t.map,
		r.seq,
		i.string,
		n.nullTag,
		a.boolTag,
		s.intOct,
		s.int,
		s.intHex,
		o.floatNaN,
		o.floatExp,
		o.float
	];
})), Ku = /* @__PURE__ */ w(((e) => {
	var t = Su(), n = Iu(), r = Ru();
	function i(e) {
		return typeof e == "bigint" || Number.isInteger(e);
	}
	var a = ({ value: e }) => JSON.stringify(e), o = [
		{
			identify: (e) => typeof e == "string",
			default: !0,
			tag: "tag:yaml.org,2002:str",
			resolve: (e) => e,
			stringify: a
		},
		{
			identify: (e) => e == null,
			createNode: () => new t.Scalar(null),
			default: !0,
			tag: "tag:yaml.org,2002:null",
			test: /^null$/,
			resolve: () => null,
			stringify: a
		},
		{
			identify: (e) => typeof e == "boolean",
			default: !0,
			tag: "tag:yaml.org,2002:bool",
			test: /^true$|^false$/,
			resolve: (e) => e === "true",
			stringify: a
		},
		{
			identify: i,
			default: !0,
			tag: "tag:yaml.org,2002:int",
			test: /^-?(?:0|[1-9][0-9]*)$/,
			resolve: (e, t, { intAsBigInt: n }) => n ? BigInt(e) : parseInt(e, 10),
			stringify: ({ value: e }) => i(e) ? e.toString() : JSON.stringify(e)
		},
		{
			identify: (e) => typeof e == "number",
			default: !0,
			tag: "tag:yaml.org,2002:float",
			test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
			resolve: (e) => parseFloat(e),
			stringify: a
		}
	];
	e.schema = [n.map, r.seq].concat(o, {
		default: !0,
		tag: "",
		test: /^/,
		resolve(e, t) {
			return t(`Unresolved plain scalar ${JSON.stringify(e)}`), e;
		}
	});
})), qu = /* @__PURE__ */ w(((e) => {
	var t = k("buffer"), n = Su(), r = Du();
	e.binary = {
		identify: (e) => e instanceof Uint8Array,
		default: !1,
		tag: "tag:yaml.org,2002:binary",
		resolve(e, n) {
			if (typeof t.Buffer == "function") return t.Buffer.from(e, "base64");
			if (typeof atob == "function") {
				let t = atob(e.replace(/[\n\r]/g, "")), n = new Uint8Array(t.length);
				for (let e = 0; e < t.length; ++e) n[e] = t.charCodeAt(e);
				return n;
			} else return n("This environment does not support reading binary tags; either Buffer or atob is required"), e;
		},
		stringify({ comment: e, type: i, value: a }, o, s, c) {
			if (!a) return "";
			let l = a, u;
			if (typeof t.Buffer == "function") u = l instanceof t.Buffer ? l.toString("base64") : t.Buffer.from(l.buffer).toString("base64");
			else if (typeof btoa == "function") {
				let e = "";
				for (let t = 0; t < l.length; ++t) e += String.fromCharCode(l[t]);
				u = btoa(e);
			} else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");
			if (i ??= n.Scalar.BLOCK_LITERAL, i !== n.Scalar.QUOTE_DOUBLE) {
				let e = Math.max(o.options.lineWidth - o.indent.length, o.options.minContentWidth), t = Math.ceil(u.length / e), r = Array(t);
				for (let n = 0, i = 0; n < t; ++n, i += e) r[n] = u.substr(i, e);
				u = r.join(i === n.Scalar.BLOCK_LITERAL ? "\n" : " ");
			}
			return r.stringifyString({
				comment: e,
				type: i,
				value: u
			}, o, s, c);
		}
	};
})), Ju = /* @__PURE__ */ w(((e) => {
	var t = mu(), n = Nu(), r = Su(), i = Lu();
	function a(e, i) {
		if (t.isSeq(e)) for (let a = 0; a < e.items.length; ++a) {
			let o = e.items[a];
			if (!t.isPair(o)) {
				if (t.isMap(o)) {
					o.items.length > 1 && i("Each pair must have its own sequence indicator");
					let e = o.items[0] || new n.Pair(new r.Scalar(null));
					if (o.commentBefore && (e.key.commentBefore = e.key.commentBefore ? `${o.commentBefore}\n${e.key.commentBefore}` : o.commentBefore), o.comment) {
						let t = e.value ?? e.key;
						t.comment = t.comment ? `${o.comment}\n${t.comment}` : o.comment;
					}
					o = e;
				}
				e.items[a] = t.isPair(o) ? o : new n.Pair(o);
			}
		}
		else i("Expected a sequence for this tag");
		return e;
	}
	function o(e, t, r) {
		let { replacer: a } = r, o = new i.YAMLSeq(e);
		o.tag = "tag:yaml.org,2002:pairs";
		let s = 0;
		if (t && Symbol.iterator in Object(t)) for (let e of t) {
			typeof a == "function" && (e = a.call(t, String(s++), e));
			let i, c;
			if (Array.isArray(e)) if (e.length === 2) i = e[0], c = e[1];
			else throw TypeError(`Expected [key, value] tuple: ${e}`);
			else if (e && e instanceof Object) {
				let t = Object.keys(e);
				if (t.length === 1) i = t[0], c = e[i];
				else throw TypeError(`Expected tuple with one key, not ${t.length} keys`);
			} else i = e;
			o.items.push(n.createPair(i, c, r));
		}
		return o;
	}
	var s = {
		collection: "seq",
		default: !1,
		tag: "tag:yaml.org,2002:pairs",
		resolve: a,
		createNode: o
	};
	e.createPairs = o, e.pairs = s, e.resolvePairs = a;
})), Yu = /* @__PURE__ */ w(((e) => {
	var t = mu(), n = yu(), r = Fu(), i = Lu(), a = Ju(), o = class e extends i.YAMLSeq {
		constructor() {
			super(), this.add = r.YAMLMap.prototype.add.bind(this), this.delete = r.YAMLMap.prototype.delete.bind(this), this.get = r.YAMLMap.prototype.get.bind(this), this.has = r.YAMLMap.prototype.has.bind(this), this.set = r.YAMLMap.prototype.set.bind(this), this.tag = e.tag;
		}
		toJSON(e, r) {
			if (!r) return super.toJSON(e);
			let i = /* @__PURE__ */ new Map();
			r?.onCreate && r.onCreate(i);
			for (let e of this.items) {
				let a, o;
				if (t.isPair(e) ? (a = n.toJS(e.key, "", r), o = n.toJS(e.value, a, r)) : a = n.toJS(e, "", r), i.has(a)) throw Error("Ordered maps must not include duplicate keys");
				i.set(a, o);
			}
			return i;
		}
		static from(e, t, n) {
			let r = a.createPairs(e, t, n), i = new this();
			return i.items = r.items, i;
		}
	};
	o.tag = "tag:yaml.org,2002:omap";
	var s = {
		collection: "seq",
		identify: (e) => e instanceof Map,
		nodeClass: o,
		default: !1,
		tag: "tag:yaml.org,2002:omap",
		resolve(e, n) {
			let r = a.resolvePairs(e, n), i = [];
			for (let { key: e } of r.items) t.isScalar(e) && (i.includes(e.value) ? n(`Ordered maps must not include duplicate keys: ${e.value}`) : i.push(e.value));
			return Object.assign(new o(), r);
		},
		createNode: (e, t, n) => o.from(e, t, n)
	};
	e.YAMLOMap = o, e.omap = s;
})), Xu = /* @__PURE__ */ w(((e) => {
	var t = Su();
	function n({ value: e, source: t }, n) {
		return t && (e ? r : i).test.test(t) ? t : e ? n.options.trueStr : n.options.falseStr;
	}
	var r = {
		identify: (e) => e === !0,
		default: !0,
		tag: "tag:yaml.org,2002:bool",
		test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
		resolve: () => new t.Scalar(!0),
		stringify: n
	}, i = {
		identify: (e) => e === !1,
		default: !0,
		tag: "tag:yaml.org,2002:bool",
		test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
		resolve: () => new t.Scalar(!1),
		stringify: n
	};
	e.falseTag = i, e.trueTag = r;
})), Zu = /* @__PURE__ */ w(((e) => {
	var t = Su(), n = Hu(), r = {
		identify: (e) => typeof e == "number",
		default: !0,
		tag: "tag:yaml.org,2002:float",
		test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
		resolve: (e) => e.slice(-3).toLowerCase() === "nan" ? NaN : e[0] === "-" ? -Infinity : Infinity,
		stringify: n.stringifyNumber
	};
	e.float = {
		identify: (e) => typeof e == "number",
		default: !0,
		tag: "tag:yaml.org,2002:float",
		test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,
		resolve(e) {
			let n = new t.Scalar(parseFloat(e.replace(/_/g, ""))), r = e.indexOf(".");
			if (r !== -1) {
				let t = e.substring(r + 1).replace(/_/g, "");
				t[t.length - 1] === "0" && (n.minFractionDigits = t.length);
			}
			return n;
		},
		stringify: n.stringifyNumber
	}, e.floatExp = {
		identify: (e) => typeof e == "number",
		default: !0,
		tag: "tag:yaml.org,2002:float",
		format: "EXP",
		test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,
		resolve: (e) => parseFloat(e.replace(/_/g, "")),
		stringify(e) {
			let t = Number(e.value);
			return isFinite(t) ? t.toExponential() : n.stringifyNumber(e);
		}
	}, e.floatNaN = r;
})), Qu = /* @__PURE__ */ w(((e) => {
	var t = Hu(), n = (e) => typeof e == "bigint" || Number.isInteger(e);
	function r(e, t, n, { intAsBigInt: r }) {
		let i = e[0];
		if ((i === "-" || i === "+") && (t += 1), e = e.substring(t).replace(/_/g, ""), r) {
			switch (n) {
				case 2:
					e = `0b${e}`;
					break;
				case 8:
					e = `0o${e}`;
					break;
				case 16:
					e = `0x${e}`;
					break;
			}
			let t = BigInt(e);
			return i === "-" ? BigInt(-1) * t : t;
		}
		let a = parseInt(e, n);
		return i === "-" ? -1 * a : a;
	}
	function i(e, r, i) {
		let { value: a } = e;
		if (n(a)) {
			let e = a.toString(r);
			return a < 0 ? "-" + i + e.substr(1) : i + e;
		}
		return t.stringifyNumber(e);
	}
	var a = {
		identify: n,
		default: !0,
		tag: "tag:yaml.org,2002:int",
		format: "BIN",
		test: /^[-+]?0b[0-1_]+$/,
		resolve: (e, t, n) => r(e, 2, 2, n),
		stringify: (e) => i(e, 2, "0b")
	}, o = {
		identify: n,
		default: !0,
		tag: "tag:yaml.org,2002:int",
		format: "OCT",
		test: /^[-+]?0[0-7_]+$/,
		resolve: (e, t, n) => r(e, 1, 8, n),
		stringify: (e) => i(e, 8, "0")
	}, s = {
		identify: n,
		default: !0,
		tag: "tag:yaml.org,2002:int",
		test: /^[-+]?[0-9][0-9_]*$/,
		resolve: (e, t, n) => r(e, 0, 10, n),
		stringify: t.stringifyNumber
	}, c = {
		identify: n,
		default: !0,
		tag: "tag:yaml.org,2002:int",
		format: "HEX",
		test: /^[-+]?0x[0-9a-fA-F_]+$/,
		resolve: (e, t, n) => r(e, 2, 16, n),
		stringify: (e) => i(e, 16, "0x")
	};
	e.int = s, e.intBin = a, e.intHex = c, e.intOct = o;
})), $u = /* @__PURE__ */ w(((e) => {
	var t = mu(), n = Nu(), r = Fu(), i = class e extends r.YAMLMap {
		constructor(t) {
			super(t), this.tag = e.tag;
		}
		add(e) {
			let i;
			i = t.isPair(e) ? e : e && typeof e == "object" && "key" in e && "value" in e && e.value === null ? new n.Pair(e.key, null) : new n.Pair(e, null), r.findPair(this.items, i.key) || this.items.push(i);
		}
		get(e, n) {
			let i = r.findPair(this.items, e);
			return !n && t.isPair(i) ? t.isScalar(i.key) ? i.key.value : i.key : i;
		}
		set(e, t) {
			if (typeof t != "boolean") throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);
			let i = r.findPair(this.items, e);
			i && !t ? this.items.splice(this.items.indexOf(i), 1) : !i && t && this.items.push(new n.Pair(e));
		}
		toJSON(e, t) {
			return super.toJSON(e, t, Set);
		}
		toString(e, t, n) {
			if (!e) return JSON.stringify(this);
			if (this.hasAllNullValues(!0)) return super.toString(Object.assign({}, e, { allNullValues: !0 }), t, n);
			throw Error("Set items must all have null values");
		}
		static from(e, t, r) {
			let { replacer: i } = r, a = new this(e);
			if (t && Symbol.iterator in Object(t)) for (let e of t) typeof i == "function" && (e = i.call(t, e, e)), a.items.push(n.createPair(e, null, r));
			return a;
		}
	};
	i.tag = "tag:yaml.org,2002:set";
	var a = {
		collection: "map",
		identify: (e) => e instanceof Set,
		nodeClass: i,
		default: !1,
		tag: "tag:yaml.org,2002:set",
		createNode: (e, t, n) => i.from(e, t, n),
		resolve(e, n) {
			if (t.isMap(e)) {
				if (e.hasAllNullValues(!0)) return Object.assign(new i(), e);
				n("Set items must all have null values");
			} else n("Expected a mapping for this tag");
			return e;
		}
	};
	e.YAMLSet = i, e.set = a;
})), ed = /* @__PURE__ */ w(((e) => {
	var t = Hu();
	function n(e, t) {
		let n = e[0], r = n === "-" || n === "+" ? e.substring(1) : e, i = (e) => t ? BigInt(e) : Number(e), a = r.replace(/_/g, "").split(":").reduce((e, t) => e * i(60) + i(t), i(0));
		return n === "-" ? i(-1) * a : a;
	}
	function r(e) {
		let { value: n } = e, r = (e) => e;
		if (typeof n == "bigint") r = (e) => BigInt(e);
		else if (isNaN(n) || !isFinite(n)) return t.stringifyNumber(e);
		let i = "";
		n < 0 && (i = "-", n *= r(-1));
		let a = r(60), o = [n % a];
		return n < 60 ? o.unshift(0) : (n = (n - o[0]) / a, o.unshift(n % a), n >= 60 && (n = (n - o[0]) / a, o.unshift(n))), i + o.map((e) => String(e).padStart(2, "0")).join(":").replace(/000000\d*$/, "");
	}
	var i = {
		identify: (e) => typeof e == "bigint" || Number.isInteger(e),
		default: !0,
		tag: "tag:yaml.org,2002:int",
		format: "TIME",
		test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,
		resolve: (e, t, { intAsBigInt: r }) => n(e, r),
		stringify: r
	}, a = {
		identify: (e) => typeof e == "number",
		default: !0,
		tag: "tag:yaml.org,2002:float",
		format: "TIME",
		test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,
		resolve: (e) => n(e, !1),
		stringify: r
	}, o = {
		identify: (e) => e instanceof Date,
		default: !0,
		tag: "tag:yaml.org,2002:timestamp",
		test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),
		resolve(e) {
			let t = e.match(o.test);
			if (!t) throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");
			let [, r, i, a, s, c, l] = t.map(Number), u = t[7] ? Number((t[7] + "00").substr(1, 3)) : 0, d = Date.UTC(r, i - 1, a, s || 0, c || 0, l || 0, u), f = t[8];
			if (f && f !== "Z") {
				let e = n(f, !1);
				Math.abs(e) < 30 && (e *= 60), d -= 6e4 * e;
			}
			return new Date(d);
		},
		stringify: ({ value: e }) => e?.toISOString().replace(/(T00:00:00)?\.000Z$/, "") ?? ""
	};
	e.floatTime = a, e.intTime = i, e.timestamp = o;
})), td = /* @__PURE__ */ w(((e) => {
	var t = Iu(), n = Bu(), r = Ru(), i = zu(), a = qu(), o = Xu(), s = Zu(), c = Qu(), l = ju(), u = Yu(), d = Ju(), f = $u(), p = ed();
	e.schema = [
		t.map,
		r.seq,
		i.string,
		n.nullTag,
		o.trueTag,
		o.falseTag,
		c.intBin,
		c.intOct,
		c.int,
		c.intHex,
		s.floatNaN,
		s.floatExp,
		s.float,
		a.binary,
		l.merge,
		u.omap,
		d.pairs,
		f.set,
		p.intTime,
		p.floatTime,
		p.timestamp
	];
})), nd = /* @__PURE__ */ w(((e) => {
	var t = Iu(), n = Bu(), r = Ru(), i = zu(), a = Vu(), o = Uu(), s = Wu(), c = Gu(), l = Ku(), u = qu(), d = ju(), f = Yu(), p = Ju(), m = td(), h = $u(), g = ed(), _ = /* @__PURE__ */ new Map([
		["core", c.schema],
		["failsafe", [
			t.map,
			r.seq,
			i.string
		]],
		["json", l.schema],
		["yaml11", m.schema],
		["yaml-1.1", m.schema]
	]), v = {
		binary: u.binary,
		bool: a.boolTag,
		float: o.float,
		floatExp: o.floatExp,
		floatNaN: o.floatNaN,
		floatTime: g.floatTime,
		int: s.int,
		intHex: s.intHex,
		intOct: s.intOct,
		intTime: g.intTime,
		map: t.map,
		merge: d.merge,
		null: n.nullTag,
		omap: f.omap,
		pairs: p.pairs,
		seq: r.seq,
		set: h.set,
		timestamp: g.timestamp
	}, y = {
		"tag:yaml.org,2002:binary": u.binary,
		"tag:yaml.org,2002:merge": d.merge,
		"tag:yaml.org,2002:omap": f.omap,
		"tag:yaml.org,2002:pairs": p.pairs,
		"tag:yaml.org,2002:set": h.set,
		"tag:yaml.org,2002:timestamp": g.timestamp
	};
	function b(e, t, n) {
		let r = _.get(t);
		if (r && !e) return n && !r.includes(d.merge) ? r.concat(d.merge) : r.slice();
		let i = r;
		if (!i) if (Array.isArray(e)) i = [];
		else {
			let e = Array.from(_.keys()).filter((e) => e !== "yaml11").map((e) => JSON.stringify(e)).join(", ");
			throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`);
		}
		if (Array.isArray(e)) for (let t of e) i = i.concat(t);
		else typeof e == "function" && (i = e(i.slice()));
		return n && (i = i.concat(d.merge)), i.reduce((e, t) => {
			let n = typeof t == "string" ? v[t] : t;
			if (!n) {
				let e = JSON.stringify(t), n = Object.keys(v).map((e) => JSON.stringify(e)).join(", ");
				throw Error(`Unknown custom tag ${e}; use one of ${n}`);
			}
			return e.includes(n) || e.push(n), e;
		}, []);
	}
	e.coreKnownTags = y, e.getTags = b;
})), rd = /* @__PURE__ */ w(((e) => {
	var t = mu(), n = Iu(), r = Ru(), i = zu(), a = nd(), o = (e, t) => e.key < t.key ? -1 : +(e.key > t.key);
	e.Schema = class e {
		constructor({ compat: e, customTags: s, merge: c, resolveKnownTags: l, schema: u, sortMapEntries: d, toStringDefaults: f }) {
			this.compat = Array.isArray(e) ? a.getTags(e, "compat") : e ? a.getTags(null, e) : null, this.name = typeof u == "string" && u || "core", this.knownTags = l ? a.coreKnownTags : {}, this.tags = a.getTags(s, this.name, c), this.toStringOptions = f ?? null, Object.defineProperty(this, t.MAP, { value: n.map }), Object.defineProperty(this, t.SCALAR, { value: i.string }), Object.defineProperty(this, t.SEQ, { value: r.seq }), this.sortMapEntries = typeof d == "function" ? d : d === !0 ? o : null;
		}
		clone() {
			let t = Object.create(e.prototype, Object.getOwnPropertyDescriptors(this));
			return t.tags = this.tags.slice(), t;
		}
	};
})), id = /* @__PURE__ */ w(((e) => {
	var t = mu(), n = Ou(), r = Tu();
	function i(e, i) {
		let a = [], o = i.directives === !0;
		if (i.directives !== !1 && e.directives) {
			let t = e.directives.toString(e);
			t ? (a.push(t), o = !0) : e.directives.docStart && (o = !0);
		}
		o && a.push("---");
		let s = n.createStringifyContext(e, i), { commentString: c } = s.options;
		if (e.commentBefore) {
			a.length !== 1 && a.unshift("");
			let t = c(e.commentBefore);
			a.unshift(r.indentComment(t, ""));
		}
		let l = !1, u = null;
		if (e.contents) {
			if (t.isNode(e.contents)) {
				if (e.contents.spaceBefore && o && a.push(""), e.contents.commentBefore) {
					let t = c(e.contents.commentBefore);
					a.push(r.indentComment(t, ""));
				}
				s.forceBlockIndent = !!e.comment, u = e.contents.comment;
			}
			let i = u ? void 0 : () => l = !0, d = n.stringify(e.contents, s, () => u = null, i);
			u && (d += r.lineComment(d, "", c(u))), (d[0] === "|" || d[0] === ">") && a[a.length - 1] === "---" ? a[a.length - 1] = `--- ${d}` : a.push(d);
		} else a.push(n.stringify(e.contents, s));
		if (e.directives?.docEnd) if (e.comment) {
			let t = c(e.comment);
			t.includes("\n") ? (a.push("..."), a.push(r.indentComment(t, ""))) : a.push(`... ${t}`);
		} else a.push("...");
		else {
			let t = e.comment;
			t && l && (t = t.replace(/^\n+/, "")), t && ((!l || u) && a[a.length - 1] !== "" && a.push(""), a.push(r.indentComment(c(t), "")));
		}
		return a.join("\n") + "\n";
	}
	e.stringifyDocument = i;
})), ad = /* @__PURE__ */ w(((e) => {
	var t = xu(), n = wu(), r = mu(), i = Nu(), a = yu(), o = rd(), s = id(), c = _u(), l = vu(), u = Cu(), d = gu(), f = class e {
		constructor(e, t, n) {
			this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this, r.NODE_TYPE, { value: r.DOC });
			let i = null;
			typeof t == "function" || Array.isArray(t) ? i = t : n === void 0 && t && (n = t, t = void 0);
			let a = Object.assign({
				intAsBigInt: !1,
				keepSourceTokens: !1,
				logLevel: "warn",
				prettyErrors: !0,
				strict: !0,
				stringKeys: !1,
				uniqueKeys: !0,
				version: "1.2"
			}, n);
			this.options = a;
			let { version: o } = a;
			n?._directives ? (this.directives = n._directives.atDocument(), this.directives.yaml.explicit && (o = this.directives.yaml.version)) : this.directives = new d.Directives({ version: o }), this.setSchema(o, n), this.contents = e === void 0 ? null : this.createNode(e, i, n);
		}
		clone() {
			let t = Object.create(e.prototype, { [r.NODE_TYPE]: { value: r.DOC } });
			return t.commentBefore = this.commentBefore, t.comment = this.comment, t.errors = this.errors.slice(), t.warnings = this.warnings.slice(), t.options = Object.assign({}, this.options), this.directives && (t.directives = this.directives.clone()), t.schema = this.schema.clone(), t.contents = r.isNode(this.contents) ? this.contents.clone(t.schema) : this.contents, this.range && (t.range = this.range.slice()), t;
		}
		add(e) {
			p(this.contents) && this.contents.add(e);
		}
		addIn(e, t) {
			p(this.contents) && this.contents.addIn(e, t);
		}
		createAlias(e, n) {
			if (!e.anchor) {
				let t = c.anchorNames(this);
				e.anchor = !n || t.has(n) ? c.findNewAnchor(n || "a", t) : n;
			}
			return new t.Alias(e.anchor);
		}
		createNode(e, t, n) {
			let i;
			if (typeof t == "function") e = t.call({ "": e }, "", e), i = t;
			else if (Array.isArray(t)) {
				let e = t.filter((e) => typeof e == "number" || e instanceof String || e instanceof Number).map(String);
				e.length > 0 && (t = t.concat(e)), i = t;
			} else n === void 0 && t && (n = t, t = void 0);
			let { aliasDuplicateObjects: a, anchorPrefix: o, flow: s, keepUndefined: l, onTagObj: d, tag: f } = n ?? {}, { onAnchor: p, setAnchors: m, sourceObjects: h } = c.createNodeAnchors(this, o || "a"), g = {
				aliasDuplicateObjects: a ?? !0,
				keepUndefined: l ?? !1,
				onAnchor: p,
				onTagObj: d,
				replacer: i,
				schema: this.schema,
				sourceObjects: h
			}, _ = u.createNode(e, f, g);
			return s && r.isCollection(_) && (_.flow = !0), m(), _;
		}
		createPair(e, t, n = {}) {
			let r = this.createNode(e, null, n), a = this.createNode(t, null, n);
			return new i.Pair(r, a);
		}
		delete(e) {
			return p(this.contents) ? this.contents.delete(e) : !1;
		}
		deleteIn(e) {
			return n.isEmptyPath(e) ? this.contents == null ? !1 : (this.contents = null, !0) : p(this.contents) ? this.contents.deleteIn(e) : !1;
		}
		get(e, t) {
			return r.isCollection(this.contents) ? this.contents.get(e, t) : void 0;
		}
		getIn(e, t) {
			return n.isEmptyPath(e) ? !t && r.isScalar(this.contents) ? this.contents.value : this.contents : r.isCollection(this.contents) ? this.contents.getIn(e, t) : void 0;
		}
		has(e) {
			return r.isCollection(this.contents) ? this.contents.has(e) : !1;
		}
		hasIn(e) {
			return n.isEmptyPath(e) ? this.contents !== void 0 : r.isCollection(this.contents) ? this.contents.hasIn(e) : !1;
		}
		set(e, t) {
			this.contents == null ? this.contents = n.collectionFromPath(this.schema, [e], t) : p(this.contents) && this.contents.set(e, t);
		}
		setIn(e, t) {
			n.isEmptyPath(e) ? this.contents = t : this.contents == null ? this.contents = n.collectionFromPath(this.schema, Array.from(e), t) : p(this.contents) && this.contents.setIn(e, t);
		}
		setSchema(e, t = {}) {
			typeof e == "number" && (e = String(e));
			let n;
			switch (e) {
				case "1.1":
					this.directives ? this.directives.yaml.version = "1.1" : this.directives = new d.Directives({ version: "1.1" }), n = {
						resolveKnownTags: !1,
						schema: "yaml-1.1"
					};
					break;
				case "1.2":
				case "next":
					this.directives ? this.directives.yaml.version = e : this.directives = new d.Directives({ version: e }), n = {
						resolveKnownTags: !0,
						schema: "core"
					};
					break;
				case null:
					this.directives && delete this.directives, n = null;
					break;
				default: {
					let t = JSON.stringify(e);
					throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`);
				}
			}
			if (t.schema instanceof Object) this.schema = t.schema;
			else if (n) this.schema = new o.Schema(Object.assign(n, t));
			else throw Error("With a null YAML version, the { schema: Schema } option is required");
		}
		toJS({ json: e, jsonArg: t, mapAsMap: n, maxAliasCount: r, onAnchor: i, reviver: o } = {}) {
			let s = {
				anchors: /* @__PURE__ */ new Map(),
				doc: this,
				keep: !e,
				mapAsMap: n === !0,
				mapKeyWarned: !1,
				maxAliasCount: typeof r == "number" ? r : 100
			}, c = a.toJS(this.contents, t ?? "", s);
			if (typeof i == "function") for (let { count: e, res: t } of s.anchors.values()) i(t, e);
			return typeof o == "function" ? l.applyReviver(o, { "": c }, "", c) : c;
		}
		toJSON(e, t) {
			return this.toJS({
				json: !0,
				jsonArg: e,
				mapAsMap: !1,
				onAnchor: t
			});
		}
		toString(e = {}) {
			if (this.errors.length > 0) throw Error("Document with errors cannot be stringified");
			if ("indent" in e && (!Number.isInteger(e.indent) || Number(e.indent) <= 0)) {
				let t = JSON.stringify(e.indent);
				throw Error(`"indent" option must be a positive integer, not ${t}`);
			}
			return s.stringifyDocument(this, e);
		}
	};
	function p(e) {
		if (r.isCollection(e)) return !0;
		throw Error("Expected a YAML collection as document contents");
	}
	e.Document = f;
})), od = /* @__PURE__ */ w(((e) => {
	var t = class extends Error {
		constructor(e, t, n, r) {
			super(), this.name = e, this.code = n, this.message = r, this.pos = t;
		}
	}, n = class extends t {
		constructor(e, t, n) {
			super("YAMLParseError", e, t, n);
		}
	}, r = class extends t {
		constructor(e, t, n) {
			super("YAMLWarning", e, t, n);
		}
	};
	e.YAMLError = t, e.YAMLParseError = n, e.YAMLWarning = r, e.prettifyError = (e, t) => (n) => {
		if (n.pos[0] === -1) return;
		n.linePos = n.pos.map((e) => t.linePos(e));
		let { line: r, col: i } = n.linePos[0];
		n.message += ` at line ${r}, column ${i}`;
		let a = i - 1, o = e.substring(t.lineStarts[r - 1], t.lineStarts[r]).replace(/[\n\r]+$/, "");
		if (a >= 60 && o.length > 80) {
			let e = Math.min(a - 39, o.length - 79);
			o = "…" + o.substring(e), a -= e - 1;
		}
		if (o.length > 80 && (o = o.substring(0, 79) + "…"), r > 1 && /^ *$/.test(o.substring(0, a))) {
			let n = e.substring(t.lineStarts[r - 2], t.lineStarts[r - 1]);
			n.length > 80 && (n = n.substring(0, 79) + "…\n"), o = n + o;
		}
		if (/[^ ]/.test(o)) {
			let e = 1, t = n.linePos[1];
			t?.line === r && t.col > i && (e = Math.max(1, Math.min(t.col - i, 80 - a)));
			let s = " ".repeat(a) + "^".repeat(e);
			n.message += `:\n\n${o}\n${s}\n`;
		}
	};
})), sd = /* @__PURE__ */ w(((e) => {
	function t(e, { flow: t, indicator: n, next: r, offset: i, onError: a, parentIndent: o, startOnNewline: s }) {
		let c = !1, l = s, u = s, d = "", f = "", p = !1, m = !1, h = null, g = null, _ = null, v = null, y = null, b = null, x = null;
		for (let i of e) switch (m &&= (i.type !== "space" && i.type !== "newline" && i.type !== "comma" && a(i.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), !1), h &&= (l && i.type !== "comment" && i.type !== "newline" && a(h, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), null), i.type) {
			case "space":
				!t && (n !== "doc-start" || r?.type !== "flow-collection") && i.source.includes("	") && (h = i), u = !0;
				break;
			case "comment": {
				u || a(i, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
				let e = i.source.substring(1) || " ";
				d ? d += f + e : d = e, f = "", l = !1;
				break;
			}
			case "newline":
				l ? d ? d += i.source : (!b || n !== "seq-item-ind") && (c = !0) : f += i.source, l = !0, p = !0, (g || _) && (v = i), u = !0;
				break;
			case "anchor":
				g && a(i, "MULTIPLE_ANCHORS", "A node can have at most one anchor"), i.source.endsWith(":") && a(i.offset + i.source.length - 1, "BAD_ALIAS", "Anchor ending in : is ambiguous", !0), g = i, x ??= i.offset, l = !1, u = !1, m = !0;
				break;
			case "tag":
				_ && a(i, "MULTIPLE_TAGS", "A node can have at most one tag"), _ = i, x ??= i.offset, l = !1, u = !1, m = !0;
				break;
			case n:
				(g || _) && a(i, "BAD_PROP_ORDER", `Anchors and tags must be after the ${i.source} indicator`), b && a(i, "UNEXPECTED_TOKEN", `Unexpected ${i.source} in ${t ?? "collection"}`), b = i, l = n === "seq-item-ind" || n === "explicit-key-ind", u = !1;
				break;
			case "comma": if (t) {
				y && a(i, "UNEXPECTED_TOKEN", `Unexpected , in ${t}`), y = i, l = !1, u = !1;
				break;
			}
			default: a(i, "UNEXPECTED_TOKEN", `Unexpected ${i.type} token`), l = !1, u = !1;
		}
		let S = e[e.length - 1], C = S ? S.offset + S.source.length : i;
		return m && r && r.type !== "space" && r.type !== "newline" && r.type !== "comma" && (r.type !== "scalar" || r.source !== "") && a(r.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), h && (l && h.indent <= o || r?.type === "block-map" || r?.type === "block-seq") && a(h, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), {
			comma: y,
			found: b,
			spaceBefore: c,
			comment: d,
			hasNewline: p,
			anchor: g,
			tag: _,
			newlineAfterProp: v,
			end: C,
			start: x ?? C
		};
	}
	e.resolveProps = t;
})), cd = /* @__PURE__ */ w(((e) => {
	function t(e) {
		if (!e) return null;
		switch (e.type) {
			case "alias":
			case "scalar":
			case "double-quoted-scalar":
			case "single-quoted-scalar":
				if (e.source.includes("\n")) return !0;
				if (e.end) {
					for (let t of e.end) if (t.type === "newline") return !0;
				}
				return !1;
			case "flow-collection":
				for (let n of e.items) {
					for (let e of n.start) if (e.type === "newline") return !0;
					if (n.sep) {
						for (let e of n.sep) if (e.type === "newline") return !0;
					}
					if (t(n.key) || t(n.value)) return !0;
				}
				return !1;
			default: return !0;
		}
	}
	e.containsNewline = t;
})), ld = /* @__PURE__ */ w(((e) => {
	var t = cd();
	function n(e, n, r) {
		if (n?.type === "flow-collection") {
			let i = n.end[0];
			i.indent === e && (i.source === "]" || i.source === "}") && t.containsNewline(n) && r(i, "BAD_INDENT", "Flow end indicator should be more indented than parent", !0);
		}
	}
	e.flowIndentCheck = n;
})), ud = /* @__PURE__ */ w(((e) => {
	var t = mu();
	function n(e, n, r) {
		let { uniqueKeys: i } = e.options;
		if (i === !1) return !1;
		let a = typeof i == "function" ? i : (e, n) => e === n || t.isScalar(e) && t.isScalar(n) && e.value === n.value;
		return n.some((e) => a(e.key, r));
	}
	e.mapIncludes = n;
})), dd = /* @__PURE__ */ w(((e) => {
	var t = Nu(), n = Fu(), r = sd(), i = cd(), a = ld(), o = ud(), s = "All mapping items must start at the same column";
	function c({ composeNode: e, composeEmptyNode: c }, l, u, d, f) {
		let p = new ((f?.nodeClass) ?? n.YAMLMap)(l.schema);
		l.atRoot &&= !1;
		let m = u.offset, h = null;
		for (let n of u.items) {
			let { start: f, key: g, sep: _, value: v } = n, y = r.resolveProps(f, {
				indicator: "explicit-key-ind",
				next: g ?? _?.[0],
				offset: m,
				onError: d,
				parentIndent: u.indent,
				startOnNewline: !0
			}), b = !y.found;
			if (b) {
				if (g && (g.type === "block-seq" ? d(m, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in g && g.indent !== u.indent && d(m, "BAD_INDENT", s)), !y.anchor && !y.tag && !_) {
					h = y.end, y.comment && (p.comment ? p.comment += "\n" + y.comment : p.comment = y.comment);
					continue;
				}
				(y.newlineAfterProp || i.containsNewline(g)) && d(g ?? f[f.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
			} else y.found?.indent !== u.indent && d(m, "BAD_INDENT", s);
			l.atKey = !0;
			let x = y.end, S = g ? e(l, g, y, d) : c(l, x, f, null, y, d);
			l.schema.compat && a.flowIndentCheck(u.indent, g, d), l.atKey = !1, o.mapIncludes(l, p.items, S) && d(x, "DUPLICATE_KEY", "Map keys must be unique");
			let C = r.resolveProps(_ ?? [], {
				indicator: "map-value-ind",
				next: v,
				offset: S.range[2],
				onError: d,
				parentIndent: u.indent,
				startOnNewline: !g || g.type === "block-scalar"
			});
			if (m = C.end, C.found) {
				b && (v?.type === "block-map" && !C.hasNewline && d(m, "BLOCK_AS_IMPLICIT_KEY", "Nested mappings are not allowed in compact mappings"), l.options.strict && y.start < C.found.offset - 1024 && d(S.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));
				let r = v ? e(l, v, C, d) : c(l, m, _, null, C, d);
				l.schema.compat && a.flowIndentCheck(u.indent, v, d), m = r.range[2];
				let i = new t.Pair(S, r);
				l.options.keepSourceTokens && (i.srcToken = n), p.items.push(i);
			} else {
				b && d(S.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values"), C.comment && (S.comment ? S.comment += "\n" + C.comment : S.comment = C.comment);
				let e = new t.Pair(S);
				l.options.keepSourceTokens && (e.srcToken = n), p.items.push(e);
			}
		}
		return h && h < m && d(h, "IMPOSSIBLE", "Map comment with trailing content"), p.range = [
			u.offset,
			m,
			h ?? m
		], p;
	}
	e.resolveBlockMap = c;
})), fd = /* @__PURE__ */ w(((e) => {
	var t = Lu(), n = sd(), r = ld();
	function i({ composeNode: e, composeEmptyNode: i }, a, o, s, c) {
		let l = new ((c?.nodeClass) ?? t.YAMLSeq)(a.schema);
		a.atRoot &&= !1, a.atKey &&= !1;
		let u = o.offset, d = null;
		for (let { start: t, value: c } of o.items) {
			let f = n.resolveProps(t, {
				indicator: "seq-item-ind",
				next: c,
				offset: u,
				onError: s,
				parentIndent: o.indent,
				startOnNewline: !0
			});
			if (!f.found) if (f.anchor || f.tag || c) c?.type === "block-seq" ? s(f.end, "BAD_INDENT", "All sequence items must start at the same column") : s(u, "MISSING_CHAR", "Sequence item without - indicator");
			else {
				d = f.end, f.comment && (l.comment = f.comment);
				continue;
			}
			let p = c ? e(a, c, f, s) : i(a, f.end, t, null, f, s);
			a.schema.compat && r.flowIndentCheck(o.indent, c, s), u = p.range[2], l.items.push(p);
		}
		return l.range = [
			o.offset,
			u,
			d ?? u
		], l;
	}
	e.resolveBlockSeq = i;
})), pd = /* @__PURE__ */ w(((e) => {
	function t(e, t, n, r) {
		let i = "";
		if (e) {
			let a = !1, o = "";
			for (let s of e) {
				let { source: e, type: c } = s;
				switch (c) {
					case "space":
						a = !0;
						break;
					case "comment": {
						n && !a && r(s, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
						let t = e.substring(1) || " ";
						i ? i += o + t : i = t, o = "";
						break;
					}
					case "newline":
						i && (o += e), a = !0;
						break;
					default: r(s, "UNEXPECTED_TOKEN", `Unexpected ${c} at node end`);
				}
				t += e.length;
			}
		}
		return {
			comment: i,
			offset: t
		};
	}
	e.resolveEnd = t;
})), md = /* @__PURE__ */ w(((e) => {
	var t = mu(), n = Nu(), r = Fu(), i = Lu(), a = pd(), o = sd(), s = cd(), c = ud(), l = "Block collections are not allowed within flow collections", u = (e) => e && (e.type === "block-map" || e.type === "block-seq");
	function d({ composeNode: e, composeEmptyNode: d }, f, p, m, h) {
		let g = p.start.source === "{", _ = g ? "flow map" : "flow sequence", v = new ((h?.nodeClass) ?? (g ? r.YAMLMap : i.YAMLSeq))(f.schema);
		v.flow = !0;
		let y = f.atRoot;
		y && (f.atRoot = !1), f.atKey &&= !1;
		let b = p.offset + p.start.source.length;
		for (let i = 0; i < p.items.length; ++i) {
			let a = p.items[i], { start: h, key: y, sep: x, value: S } = a, C = o.resolveProps(h, {
				flow: _,
				indicator: "explicit-key-ind",
				next: y ?? x?.[0],
				offset: b,
				onError: m,
				parentIndent: p.indent,
				startOnNewline: !1
			});
			if (!C.found) {
				if (!C.anchor && !C.tag && !x && !S) {
					i === 0 && C.comma ? m(C.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${_}`) : i < p.items.length - 1 && m(C.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${_}`), C.comment && (v.comment ? v.comment += "\n" + C.comment : v.comment = C.comment), b = C.end;
					continue;
				}
				!g && f.options.strict && s.containsNewline(y) && m(y, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
			}
			if (i === 0) C.comma && m(C.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${_}`);
			else if (C.comma || m(C.start, "MISSING_CHAR", `Missing , between ${_} items`), C.comment) {
				let e = "";
				loop: for (let t of h) switch (t.type) {
					case "comma":
					case "space": break;
					case "comment":
						e = t.source.substring(1);
						break loop;
					default: break loop;
				}
				if (e) {
					let n = v.items[v.items.length - 1];
					t.isPair(n) && (n = n.value ?? n.key), n.comment ? n.comment += "\n" + e : n.comment = e, C.comment = C.comment.substring(e.length + 1);
				}
			}
			if (!g && !x && !C.found) {
				let t = S ? e(f, S, C, m) : d(f, C.end, x, null, C, m);
				v.items.push(t), b = t.range[2], u(S) && m(t.range, "BLOCK_IN_FLOW", l);
			} else {
				f.atKey = !0;
				let t = C.end, i = y ? e(f, y, C, m) : d(f, t, h, null, C, m);
				u(y) && m(i.range, "BLOCK_IN_FLOW", l), f.atKey = !1;
				let s = o.resolveProps(x ?? [], {
					flow: _,
					indicator: "map-value-ind",
					next: S,
					offset: i.range[2],
					onError: m,
					parentIndent: p.indent,
					startOnNewline: !1
				});
				if (s.found) {
					if (!g && !C.found && f.options.strict) {
						if (x) for (let e of x) {
							if (e === s.found) break;
							if (e.type === "newline") {
								m(e, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
								break;
							}
						}
						C.start < s.found.offset - 1024 && m(s.found, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit flow sequence key");
					}
				} else S && ("source" in S && S.source?.[0] === ":" ? m(S, "MISSING_CHAR", `Missing space after : in ${_}`) : m(s.start, "MISSING_CHAR", `Missing , or : between ${_} items`));
				let w = S ? e(f, S, s, m) : s.found ? d(f, s.end, x, null, s, m) : null;
				w ? u(S) && m(w.range, "BLOCK_IN_FLOW", l) : s.comment && (i.comment ? i.comment += "\n" + s.comment : i.comment = s.comment);
				let T = new n.Pair(i, w);
				if (f.options.keepSourceTokens && (T.srcToken = a), g) {
					let e = v;
					c.mapIncludes(f, e.items, i) && m(t, "DUPLICATE_KEY", "Map keys must be unique"), e.items.push(T);
				} else {
					let e = new r.YAMLMap(f.schema);
					e.flow = !0, e.items.push(T);
					let t = (w ?? i).range;
					e.range = [
						i.range[0],
						t[1],
						t[2]
					], v.items.push(e);
				}
				b = w ? w.range[2] : s.end;
			}
		}
		let x = g ? "}" : "]", [S, ...C] = p.end, w = b;
		if (S?.source === x) w = S.offset + S.source.length;
		else {
			let e = _[0].toUpperCase() + _.substring(1), t = y ? `${e} must end with a ${x}` : `${e} in block collection must be sufficiently indented and end with a ${x}`;
			m(b, y ? "MISSING_CHAR" : "BAD_INDENT", t), S && S.source.length !== 1 && C.unshift(S);
		}
		if (C.length > 0) {
			let e = a.resolveEnd(C, w, f.options.strict, m);
			e.comment && (v.comment ? v.comment += "\n" + e.comment : v.comment = e.comment), v.range = [
				p.offset,
				w,
				e.offset
			];
		} else v.range = [
			p.offset,
			w,
			w
		];
		return v;
	}
	e.resolveFlowCollection = d;
})), hd = /* @__PURE__ */ w(((e) => {
	var t = mu(), n = Su(), r = Fu(), i = Lu(), a = dd(), o = fd(), s = md();
	function c(e, t, n, r, i, c) {
		let l = n.type === "block-map" ? a.resolveBlockMap(e, t, n, r, c) : n.type === "block-seq" ? o.resolveBlockSeq(e, t, n, r, c) : s.resolveFlowCollection(e, t, n, r, c), u = l.constructor;
		return i === "!" || i === u.tagName ? (l.tag = u.tagName, l) : (i && (l.tag = i), l);
	}
	function l(e, a, o, s, l) {
		let u = s.tag, d = u ? a.directives.tagName(u.source, (e) => l(u, "TAG_RESOLVE_FAILED", e)) : null;
		if (o.type === "block-seq") {
			let { anchor: e, newlineAfterProp: t } = s, n = e && u ? e.offset > u.offset ? e : u : e ?? u;
			n && (!t || t.offset < n.offset) && l(n, "MISSING_CHAR", "Missing newline after block sequence props");
		}
		let f = o.type === "block-map" ? "map" : o.type === "block-seq" ? "seq" : o.start.source === "{" ? "map" : "seq";
		if (!u || !d || d === "!" || d === r.YAMLMap.tagName && f === "map" || d === i.YAMLSeq.tagName && f === "seq") return c(e, a, o, l, d);
		let p = a.schema.tags.find((e) => e.tag === d && e.collection === f);
		if (!p) {
			let t = a.schema.knownTags[d];
			if (t?.collection === f) a.schema.tags.push(Object.assign({}, t, { default: !1 })), p = t;
			else return t ? l(u, "BAD_COLLECTION_TYPE", `${t.tag} used for ${f} collection, but expects ${t.collection ?? "scalar"}`, !0) : l(u, "TAG_RESOLVE_FAILED", `Unresolved tag: ${d}`, !0), c(e, a, o, l, d);
		}
		let m = c(e, a, o, l, d, p), h = p.resolve?.(m, (e) => l(u, "TAG_RESOLVE_FAILED", e), a.options) ?? m, g = t.isNode(h) ? h : new n.Scalar(h);
		return g.range = m.range, g.tag = d, p?.format && (g.format = p.format), g;
	}
	e.composeCollection = l;
})), gd = /* @__PURE__ */ w(((e) => {
	var t = Su();
	function n(e, n, a) {
		let o = n.offset, s = r(n, e.options.strict, a);
		if (!s) return {
			value: "",
			type: null,
			comment: "",
			range: [
				o,
				o,
				o
			]
		};
		let c = s.mode === ">" ? t.Scalar.BLOCK_FOLDED : t.Scalar.BLOCK_LITERAL, l = n.source ? i(n.source) : [], u = l.length;
		for (let e = l.length - 1; e >= 0; --e) {
			let t = l[e][1];
			if (t === "" || t === "\r") u = e;
			else break;
		}
		if (u === 0) {
			let e = s.chomp === "+" && l.length > 0 ? "\n".repeat(Math.max(1, l.length - 1)) : "", t = o + s.length;
			return n.source && (t += n.source.length), {
				value: e,
				type: c,
				comment: s.comment,
				range: [
					o,
					t,
					t
				]
			};
		}
		let d = n.indent + s.indent, f = n.offset + s.length, p = 0;
		for (let t = 0; t < u; ++t) {
			let [n, r] = l[t];
			if (r === "" || r === "\r") s.indent === 0 && n.length > d && (d = n.length);
			else {
				n.length < d && a(f + n.length, "MISSING_CHAR", "Block scalars with more-indented leading empty lines must use an explicit indentation indicator"), s.indent === 0 && (d = n.length), p = t, d === 0 && !e.atRoot && a(f, "BAD_INDENT", "Block scalar values in collections must be indented");
				break;
			}
			f += n.length + r.length + 1;
		}
		for (let e = l.length - 1; e >= u; --e) l[e][0].length > d && (u = e + 1);
		let m = "", h = "", g = !1;
		for (let e = 0; e < p; ++e) m += l[e][0].slice(d) + "\n";
		for (let e = p; e < u; ++e) {
			let [n, r] = l[e];
			f += n.length + r.length + 1;
			let i = r[r.length - 1] === "\r";
			/* istanbul ignore if already caught in lexer */
			if (i && (r = r.slice(0, -1)), r && n.length < d) {
				let e = `Block scalar lines must not be less indented than their ${s.indent ? "explicit indentation indicator" : "first line"}`;
				a(f - r.length - (i ? 2 : 1), "BAD_INDENT", e), n = "";
			}
			c === t.Scalar.BLOCK_LITERAL ? (m += h + n.slice(d) + r, h = "\n") : n.length > d || r[0] === "	" ? (h === " " ? h = "\n" : !g && h === "\n" && (h = "\n\n"), m += h + n.slice(d) + r, h = "\n", g = !0) : r === "" ? h === "\n" ? m += "\n" : h = "\n" : (m += h + r, h = " ", g = !1);
		}
		switch (s.chomp) {
			case "-": break;
			case "+":
				for (let e = u; e < l.length; ++e) m += "\n" + l[e][0].slice(d);
				m[m.length - 1] !== "\n" && (m += "\n");
				break;
			default: m += "\n";
		}
		let _ = o + s.length + n.source.length;
		return {
			value: m,
			type: c,
			comment: s.comment,
			range: [
				o,
				_,
				_
			]
		};
	}
	function r({ offset: e, props: t }, n, r) {
		/* istanbul ignore if should not happen */
		if (t[0].type !== "block-scalar-header") return r(t[0], "IMPOSSIBLE", "Block scalar header not found"), null;
		let { source: i } = t[0], a = i[0], o = 0, s = "", c = -1;
		for (let t = 1; t < i.length; ++t) {
			let n = i[t];
			if (!s && (n === "-" || n === "+")) s = n;
			else {
				let r = Number(n);
				!o && r ? o = r : c === -1 && (c = e + t);
			}
		}
		c !== -1 && r(c, "UNEXPECTED_TOKEN", `Block scalar header includes extra characters: ${i}`);
		let l = !1, u = "", d = i.length;
		for (let e = 1; e < t.length; ++e) {
			let i = t[e];
			switch (i.type) {
				case "space": l = !0;
				case "newline":
					d += i.source.length;
					break;
				case "comment":
					n && !l && r(i, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters"), d += i.source.length, u = i.source.substring(1);
					break;
				case "error":
					r(i, "UNEXPECTED_TOKEN", i.message), d += i.source.length;
					break;
				/* istanbul ignore next should not happen */
				default: {
					r(i, "UNEXPECTED_TOKEN", `Unexpected token in block scalar header: ${i.type}`);
					let e = i.source;
					e && typeof e == "string" && (d += e.length);
				}
			}
		}
		return {
			mode: a,
			indent: o,
			chomp: s,
			comment: u,
			length: d
		};
	}
	function i(e) {
		let t = e.split(/\n( *)/), n = t[0], r = n.match(/^( *)/), i = [r?.[1] ? [r[1], n.slice(r[1].length)] : ["", n]];
		for (let e = 1; e < t.length; e += 2) i.push([t[e], t[e + 1]]);
		return i;
	}
	e.resolveBlockScalar = n;
})), _d = /* @__PURE__ */ w(((e) => {
	var t = Su(), n = pd();
	function r(e, r, o) {
		let { offset: c, type: l, source: u, end: d } = e, f, p, m = (e, t, n) => o(c + e, t, n);
		switch (l) {
			case "scalar":
				f = t.Scalar.PLAIN, p = i(u, m);
				break;
			case "single-quoted-scalar":
				f = t.Scalar.QUOTE_SINGLE, p = a(u, m);
				break;
			case "double-quoted-scalar":
				f = t.Scalar.QUOTE_DOUBLE, p = s(u, m);
				break;
			/* istanbul ignore next should not happen */
			default: return o(e, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${l}`), {
				value: "",
				type: null,
				comment: "",
				range: [
					c,
					c + u.length,
					c + u.length
				]
			};
		}
		let h = c + u.length, g = n.resolveEnd(d, h, r, o);
		return {
			value: p,
			type: f,
			comment: g.comment,
			range: [
				c,
				h,
				g.offset
			]
		};
	}
	function i(e, t) {
		let n = "";
		switch (e[0]) {
			/* istanbul ignore next should not happen */
			case "	":
				n = "a tab character";
				break;
			case ",":
				n = "flow indicator character ,";
				break;
			case "%":
				n = "directive indicator character %";
				break;
			case "|":
			case ">":
				n = `block scalar indicator ${e[0]}`;
				break;
			case "@":
			case "`":
				n = `reserved character ${e[0]}`;
				break;
		}
		return n && t(0, "BAD_SCALAR_START", `Plain value cannot start with ${n}`), o(e);
	}
	function a(e, t) {
		return (e[e.length - 1] !== "'" || e.length === 1) && t(e.length, "MISSING_CHAR", "Missing closing 'quote"), o(e.slice(1, -1)).replace(/''/g, "'");
	}
	function o(e) {
		let t, n;
		try {
			t = /* @__PURE__ */ RegExp("(.*?)(?<![ 	])[ 	]*\r?\n", "sy"), n = /* @__PURE__ */ RegExp("[ 	]*(.*?)(?:(?<![ 	])[ 	]*)?\r?\n", "sy");
		} catch {
			t = /(.*?)[ \t]*\r?\n/sy, n = /[ \t]*(.*?)[ \t]*\r?\n/sy;
		}
		let r = t.exec(e);
		if (!r) return e;
		let i = r[1], a = " ", o = t.lastIndex;
		for (n.lastIndex = o; r = n.exec(e);) r[1] === "" ? a === "\n" ? i += a : a = "\n" : (i += a + r[1], a = " "), o = n.lastIndex;
		let s = /[ \t]*(.*)/sy;
		return s.lastIndex = o, r = s.exec(e), i + a + (r?.[1] ?? "");
	}
	function s(e, t) {
		let n = "";
		for (let r = 1; r < e.length - 1; ++r) {
			let i = e[r];
			if (!(i === "\r" && e[r + 1] === "\n")) if (i === "\n") {
				let { fold: t, offset: i } = c(e, r);
				n += t, r = i;
			} else if (i === "\\") {
				let i = e[++r], a = l[i];
				if (a) n += a;
				else if (i === "\n") for (i = e[r + 1]; i === " " || i === "	";) i = e[++r + 1];
				else if (i === "\r" && e[r + 1] === "\n") for (i = e[++r + 1]; i === " " || i === "	";) i = e[++r + 1];
				else if (i === "x" || i === "u" || i === "U") {
					let a = i === "x" ? 2 : i === "u" ? 4 : 8;
					n += u(e, r + 1, a, t), r += a;
				} else {
					let i = e.substr(r - 1, 2);
					t(r - 1, "BAD_DQ_ESCAPE", `Invalid escape sequence ${i}`), n += i;
				}
			} else if (i === " " || i === "	") {
				let t = r, a = e[r + 1];
				for (; a === " " || a === "	";) a = e[++r + 1];
				a !== "\n" && !(a === "\r" && e[r + 2] === "\n") && (n += r > t ? e.slice(t, r + 1) : i);
			} else n += i;
		}
		return (e[e.length - 1] !== "\"" || e.length === 1) && t(e.length, "MISSING_CHAR", "Missing closing \"quote"), n;
	}
	function c(e, t) {
		let n = "", r = e[t + 1];
		for (; (r === " " || r === "	" || r === "\n" || r === "\r") && !(r === "\r" && e[t + 2] !== "\n");) r === "\n" && (n += "\n"), t += 1, r = e[t + 1];
		return n ||= " ", {
			fold: n,
			offset: t
		};
	}
	var l = {
		0: "\0",
		a: "\x07",
		b: "\b",
		e: "\x1B",
		f: "\f",
		n: "\n",
		r: "\r",
		t: "	",
		v: "\v",
		N: "",
		_: "\xA0",
		L: "\u2028",
		P: "\u2029",
		" ": " ",
		"\"": "\"",
		"/": "/",
		"\\": "\\",
		"	": "	"
	};
	function u(e, t, n, r) {
		let i = e.substr(t, n), a = i.length === n && /^[0-9a-fA-F]+$/.test(i) ? parseInt(i, 16) : NaN;
		try {
			return String.fromCodePoint(a);
		} catch {
			let i = e.substr(t - 2, n + 2);
			return r(t - 2, "BAD_DQ_ESCAPE", `Invalid escape sequence ${i}`), i;
		}
	}
	e.resolveFlowScalar = r;
})), vd = /* @__PURE__ */ w(((e) => {
	var t = mu(), n = Su(), r = gd(), i = _d();
	function a(e, a, c, l) {
		let { value: u, type: d, comment: f, range: p } = a.type === "block-scalar" ? r.resolveBlockScalar(e, a, l) : i.resolveFlowScalar(a, e.options.strict, l), m = c ? e.directives.tagName(c.source, (e) => l(c, "TAG_RESOLVE_FAILED", e)) : null, h;
		h = e.options.stringKeys && e.atKey ? e.schema[t.SCALAR] : m ? o(e.schema, u, m, c, l) : a.type === "scalar" ? s(e, u, a, l) : e.schema[t.SCALAR];
		let g;
		try {
			let r = h.resolve(u, (e) => l(c ?? a, "TAG_RESOLVE_FAILED", e), e.options);
			g = t.isScalar(r) ? r : new n.Scalar(r);
		} catch (e) {
			let t = e instanceof Error ? e.message : String(e);
			l(c ?? a, "TAG_RESOLVE_FAILED", t), g = new n.Scalar(u);
		}
		return g.range = p, g.source = u, d && (g.type = d), m && (g.tag = m), h.format && (g.format = h.format), f && (g.comment = f), g;
	}
	function o(e, n, r, i, a) {
		if (r === "!") return e[t.SCALAR];
		let o = [];
		for (let t of e.tags) if (!t.collection && t.tag === r) if (t.default && t.test) o.push(t);
		else return t;
		for (let e of o) if (e.test?.test(n)) return e;
		let s = e.knownTags[r];
		return s && !s.collection ? (e.tags.push(Object.assign({}, s, {
			default: !1,
			test: void 0
		})), s) : (a(i, "TAG_RESOLVE_FAILED", `Unresolved tag: ${r}`, r !== "tag:yaml.org,2002:str"), e[t.SCALAR]);
	}
	function s({ atKey: e, directives: n, schema: r }, i, a, o) {
		let s = r.tags.find((t) => (t.default === !0 || e && t.default === "key") && t.test?.test(i)) || r[t.SCALAR];
		if (r.compat) {
			let e = r.compat.find((e) => e.default && e.test?.test(i)) ?? r[t.SCALAR];
			s.tag !== e.tag && o(a, "TAG_RESOLVE_FAILED", `Value may be parsed as either ${n.tagString(s.tag)} or ${n.tagString(e.tag)}`, !0);
		}
		return s;
	}
	e.composeScalar = a;
})), yd = /* @__PURE__ */ w(((e) => {
	function t(e, t, n) {
		if (t) {
			n ??= t.length;
			for (let r = n - 1; r >= 0; --r) {
				let n = t[r];
				switch (n.type) {
					case "space":
					case "comment":
					case "newline":
						e -= n.source.length;
						continue;
				}
				for (n = t[++r]; n?.type === "space";) e += n.source.length, n = t[++r];
				break;
			}
		}
		return e;
	}
	e.emptyScalarPosition = t;
})), bd = /* @__PURE__ */ w(((e) => {
	var t = xu(), n = mu(), r = hd(), i = vd(), a = pd(), o = yd(), s = {
		composeNode: c,
		composeEmptyNode: l
	};
	function c(e, t, a, o) {
		let c = e.atKey, { spaceBefore: d, comment: f, anchor: p, tag: m } = a, h, g = !0;
		switch (t.type) {
			case "alias":
				h = u(e, t, o), (p || m) && o(t, "ALIAS_PROPS", "An alias node must not specify any properties");
				break;
			case "scalar":
			case "single-quoted-scalar":
			case "double-quoted-scalar":
			case "block-scalar":
				h = i.composeScalar(e, t, m, o), p && (h.anchor = p.source.substring(1));
				break;
			case "block-map":
			case "block-seq":
			case "flow-collection":
				try {
					h = r.composeCollection(s, e, t, a, o), p && (h.anchor = p.source.substring(1));
				} catch (e) {
					o(t, "RESOURCE_EXHAUSTION", e instanceof Error ? e.message : String(e));
				}
				break;
			default: o(t, "UNEXPECTED_TOKEN", t.type === "error" ? t.message : `Unsupported token (type: ${t.type})`), g = !1;
		}
		return h ??= l(e, t.offset, void 0, null, a, o), p && h.anchor === "" && o(p, "BAD_ALIAS", "Anchor cannot be an empty string"), c && e.options.stringKeys && (!n.isScalar(h) || typeof h.value != "string" || h.tag && h.tag !== "tag:yaml.org,2002:str") && o(m ?? t, "NON_STRING_KEY", "With stringKeys, all keys must be strings"), d && (h.spaceBefore = !0), f && (t.type === "scalar" && t.source === "" ? h.comment = f : h.commentBefore = f), e.options.keepSourceTokens && g && (h.srcToken = t), h;
	}
	function l(e, t, n, r, { spaceBefore: a, comment: s, anchor: c, tag: l, end: u }, d) {
		let f = {
			type: "scalar",
			offset: o.emptyScalarPosition(t, n, r),
			indent: -1,
			source: ""
		}, p = i.composeScalar(e, f, l, d);
		return c && (p.anchor = c.source.substring(1), p.anchor === "" && d(c, "BAD_ALIAS", "Anchor cannot be an empty string")), a && (p.spaceBefore = !0), s && (p.comment = s, p.range[2] = u), p;
	}
	function u({ options: e }, { offset: n, source: r, end: i }, o) {
		let s = new t.Alias(r.substring(1));
		s.source === "" && o(n, "BAD_ALIAS", "Alias cannot be an empty string"), s.source.endsWith(":") && o(n + r.length - 1, "BAD_ALIAS", "Alias ending in : is ambiguous", !0);
		let c = n + r.length, l = a.resolveEnd(i, c, e.strict, o);
		return s.range = [
			n,
			c,
			l.offset
		], l.comment && (s.comment = l.comment), s;
	}
	e.composeEmptyNode = l, e.composeNode = c;
})), xd = /* @__PURE__ */ w(((e) => {
	var t = ad(), n = bd(), r = pd(), i = sd();
	function a(e, a, { offset: o, start: s, value: c, end: l }, u) {
		let d = Object.assign({ _directives: a }, e), f = new t.Document(void 0, d), p = {
			atKey: !1,
			atRoot: !0,
			directives: f.directives,
			options: f.options,
			schema: f.schema
		}, m = i.resolveProps(s, {
			indicator: "doc-start",
			next: c ?? l?.[0],
			offset: o,
			onError: u,
			parentIndent: 0,
			startOnNewline: !0
		});
		m.found && (f.directives.docStart = !0, c && (c.type === "block-map" || c.type === "block-seq") && !m.hasNewline && u(m.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker")), f.contents = c ? n.composeNode(p, c, m, u) : n.composeEmptyNode(p, m.end, s, null, m, u);
		let h = f.contents.range[2], g = r.resolveEnd(l, h, !1, u);
		return g.comment && (f.comment = g.comment), f.range = [
			o,
			h,
			g.offset
		], f;
	}
	e.composeDoc = a;
})), Sd = /* @__PURE__ */ w(((e) => {
	var t = k("process"), n = gu(), r = ad(), i = od(), a = mu(), o = xd(), s = pd();
	function c(e) {
		if (typeof e == "number") return [e, e + 1];
		if (Array.isArray(e)) return e.length === 2 ? e : [e[0], e[1]];
		let { offset: t, source: n } = e;
		return [t, t + (typeof n == "string" ? n.length : 1)];
	}
	function l(e) {
		let t = "", n = !1, r = !1;
		for (let i = 0; i < e.length; ++i) {
			let a = e[i];
			switch (a[0]) {
				case "#":
					t += (t === "" ? "" : r ? "\n\n" : "\n") + (a.substring(1) || " "), n = !0, r = !1;
					break;
				case "%":
					e[i + 1]?.[0] !== "#" && (i += 1), n = !1;
					break;
				default: n || (r = !0), n = !1;
			}
		}
		return {
			comment: t,
			afterEmptyLine: r
		};
	}
	e.Composer = class {
		constructor(e = {}) {
			this.doc = null, this.atDirectives = !1, this.prelude = [], this.errors = [], this.warnings = [], this.onError = (e, t, n, r) => {
				let a = c(e);
				r ? this.warnings.push(new i.YAMLWarning(a, t, n)) : this.errors.push(new i.YAMLParseError(a, t, n));
			}, this.directives = new n.Directives({ version: e.version || "1.2" }), this.options = e;
		}
		decorate(e, t) {
			let { comment: n, afterEmptyLine: r } = l(this.prelude);
			if (n) {
				let i = e.contents;
				if (t) e.comment = e.comment ? `${e.comment}\n${n}` : n;
				else if (r || e.directives.docStart || !i) e.commentBefore = n;
				else if (a.isCollection(i) && !i.flow && i.items.length > 0) {
					let e = i.items[0];
					a.isPair(e) && (e = e.key);
					let t = e.commentBefore;
					e.commentBefore = t ? `${n}\n${t}` : n;
				} else {
					let e = i.commentBefore;
					i.commentBefore = e ? `${n}\n${e}` : n;
				}
			}
			if (t) {
				for (let t = 0; t < this.errors.length; ++t) e.errors.push(this.errors[t]);
				for (let t = 0; t < this.warnings.length; ++t) e.warnings.push(this.warnings[t]);
			} else e.errors = this.errors, e.warnings = this.warnings;
			this.prelude = [], this.errors = [], this.warnings = [];
		}
		streamInfo() {
			return {
				comment: l(this.prelude).comment,
				directives: this.directives,
				errors: this.errors,
				warnings: this.warnings
			};
		}
		*compose(e, t = !1, n = -1) {
			for (let t of e) yield* this.next(t);
			yield* this.end(t, n);
		}
		*next(e) {
			switch (t.env.LOG_STREAM && console.dir(e, { depth: null }), e.type) {
				case "directive":
					this.directives.add(e.source, (t, n, r) => {
						let i = c(e);
						i[0] += t, this.onError(i, "BAD_DIRECTIVE", n, r);
					}), this.prelude.push(e.source), this.atDirectives = !0;
					break;
				case "document": {
					let t = o.composeDoc(this.options, this.directives, e, this.onError);
					this.atDirectives && !t.directives.docStart && this.onError(e, "MISSING_CHAR", "Missing directives-end/doc-start indicator line"), this.decorate(t, !1), this.doc && (yield this.doc), this.doc = t, this.atDirectives = !1;
					break;
				}
				case "byte-order-mark":
				case "space": break;
				case "comment":
				case "newline":
					this.prelude.push(e.source);
					break;
				case "error": {
					let t = e.source ? `${e.message}: ${JSON.stringify(e.source)}` : e.message, n = new i.YAMLParseError(c(e), "UNEXPECTED_TOKEN", t);
					this.atDirectives || !this.doc ? this.errors.push(n) : this.doc.errors.push(n);
					break;
				}
				case "doc-end": {
					if (!this.doc) {
						this.errors.push(new i.YAMLParseError(c(e), "UNEXPECTED_TOKEN", "Unexpected doc-end without preceding document"));
						break;
					}
					this.doc.directives.docEnd = !0;
					let t = s.resolveEnd(e.end, e.offset + e.source.length, this.doc.options.strict, this.onError);
					if (this.decorate(this.doc, !0), t.comment) {
						let e = this.doc.comment;
						this.doc.comment = e ? `${e}\n${t.comment}` : t.comment;
					}
					this.doc.range[2] = t.offset;
					break;
				}
				default: this.errors.push(new i.YAMLParseError(c(e), "UNEXPECTED_TOKEN", `Unsupported token ${e.type}`));
			}
		}
		*end(e = !1, t = -1) {
			if (this.doc) this.decorate(this.doc, !0), yield this.doc, this.doc = null;
			else if (e) {
				let e = Object.assign({ _directives: this.directives }, this.options), n = new r.Document(void 0, e);
				this.atDirectives && this.onError(t, "MISSING_CHAR", "Missing directives-end indicator line"), n.range = [
					0,
					t,
					t
				], this.decorate(n, !1), yield n;
			}
		}
	};
})), Cd = /* @__PURE__ */ w(((e) => {
	var t = gd(), n = _d(), r = od(), i = Du();
	function a(e, i = !0, a) {
		if (e) {
			let o = (e, t, n) => {
				let i = typeof e == "number" ? e : Array.isArray(e) ? e[0] : e.offset;
				if (a) a(i, t, n);
				else throw new r.YAMLParseError([i, i + 1], t, n);
			};
			switch (e.type) {
				case "scalar":
				case "single-quoted-scalar":
				case "double-quoted-scalar": return n.resolveFlowScalar(e, i, o);
				case "block-scalar": return t.resolveBlockScalar({ options: { strict: i } }, e, o);
			}
		}
		return null;
	}
	function o(e, t) {
		let { implicitKey: n = !1, indent: r, inFlow: a = !1, offset: o = -1, type: s = "PLAIN" } = t, c = i.stringifyString({
			type: s,
			value: e
		}, {
			implicitKey: n,
			indent: r > 0 ? " ".repeat(r) : "",
			inFlow: a,
			options: {
				blockQuote: !0,
				lineWidth: -1
			}
		}), u = t.end ?? [{
			type: "newline",
			offset: -1,
			indent: r,
			source: "\n"
		}];
		switch (c[0]) {
			case "|":
			case ">": {
				let e = c.indexOf("\n"), t = c.substring(0, e), n = c.substring(e + 1) + "\n", i = [{
					type: "block-scalar-header",
					offset: o,
					indent: r,
					source: t
				}];
				return l(i, u) || i.push({
					type: "newline",
					offset: -1,
					indent: r,
					source: "\n"
				}), {
					type: "block-scalar",
					offset: o,
					indent: r,
					props: i,
					source: n
				};
			}
			case "\"": return {
				type: "double-quoted-scalar",
				offset: o,
				indent: r,
				source: c,
				end: u
			};
			case "'": return {
				type: "single-quoted-scalar",
				offset: o,
				indent: r,
				source: c,
				end: u
			};
			default: return {
				type: "scalar",
				offset: o,
				indent: r,
				source: c,
				end: u
			};
		}
	}
	function s(e, t, n = {}) {
		let { afterKey: r = !1, implicitKey: a = !1, inFlow: o = !1, type: s } = n, l = "indent" in e ? e.indent : null;
		if (r && typeof l == "number" && (l += 2), !s) switch (e.type) {
			case "single-quoted-scalar":
				s = "QUOTE_SINGLE";
				break;
			case "double-quoted-scalar":
				s = "QUOTE_DOUBLE";
				break;
			case "block-scalar": {
				let t = e.props[0];
				if (t.type !== "block-scalar-header") throw Error("Invalid block scalar header");
				s = t.source[0] === ">" ? "BLOCK_FOLDED" : "BLOCK_LITERAL";
				break;
			}
			default: s = "PLAIN";
		}
		let d = i.stringifyString({
			type: s,
			value: t
		}, {
			implicitKey: a || l === null,
			indent: l !== null && l > 0 ? " ".repeat(l) : "",
			inFlow: o,
			options: {
				blockQuote: !0,
				lineWidth: -1
			}
		});
		switch (d[0]) {
			case "|":
			case ">":
				c(e, d);
				break;
			case "\"":
				u(e, d, "double-quoted-scalar");
				break;
			case "'":
				u(e, d, "single-quoted-scalar");
				break;
			default: u(e, d, "scalar");
		}
	}
	function c(e, t) {
		let n = t.indexOf("\n"), r = t.substring(0, n), i = t.substring(n + 1) + "\n";
		if (e.type === "block-scalar") {
			let t = e.props[0];
			if (t.type !== "block-scalar-header") throw Error("Invalid block scalar header");
			t.source = r, e.source = i;
		} else {
			let { offset: t } = e, n = "indent" in e ? e.indent : -1, a = [{
				type: "block-scalar-header",
				offset: t,
				indent: n,
				source: r
			}];
			l(a, "end" in e ? e.end : void 0) || a.push({
				type: "newline",
				offset: -1,
				indent: n,
				source: "\n"
			});
			for (let t of Object.keys(e)) t !== "type" && t !== "offset" && delete e[t];
			Object.assign(e, {
				type: "block-scalar",
				indent: n,
				props: a,
				source: i
			});
		}
	}
	function l(e, t) {
		if (t) for (let n of t) switch (n.type) {
			case "space":
			case "comment":
				e.push(n);
				break;
			case "newline": return e.push(n), !0;
		}
		return !1;
	}
	function u(e, t, n) {
		switch (e.type) {
			case "scalar":
			case "double-quoted-scalar":
			case "single-quoted-scalar":
				e.type = n, e.source = t;
				break;
			case "block-scalar": {
				let r = e.props.slice(1), i = t.length;
				e.props[0].type === "block-scalar-header" && (i -= e.props[0].source.length);
				for (let e of r) e.offset += i;
				delete e.props, Object.assign(e, {
					type: n,
					source: t,
					end: r
				});
				break;
			}
			case "block-map":
			case "block-seq": {
				let r = {
					type: "newline",
					offset: e.offset + t.length,
					indent: e.indent,
					source: "\n"
				};
				delete e.items, Object.assign(e, {
					type: n,
					source: t,
					end: [r]
				});
				break;
			}
			default: {
				let r = "indent" in e ? e.indent : -1, i = "end" in e && Array.isArray(e.end) ? e.end.filter((e) => e.type === "space" || e.type === "comment" || e.type === "newline") : [];
				for (let t of Object.keys(e)) t !== "type" && t !== "offset" && delete e[t];
				Object.assign(e, {
					type: n,
					indent: r,
					source: t,
					end: i
				});
			}
		}
	}
	e.createScalarToken = o, e.resolveAsScalar = a, e.setScalarValue = s;
})), wd = /* @__PURE__ */ w(((e) => {
	var t = (e) => "type" in e ? n(e) : r(e);
	function n(e) {
		switch (e.type) {
			case "block-scalar": {
				let t = "";
				for (let r of e.props) t += n(r);
				return t + e.source;
			}
			case "block-map":
			case "block-seq": {
				let t = "";
				for (let n of e.items) t += r(n);
				return t;
			}
			case "flow-collection": {
				let t = e.start.source;
				for (let n of e.items) t += r(n);
				for (let n of e.end) t += n.source;
				return t;
			}
			case "document": {
				let t = r(e);
				if (e.end) for (let n of e.end) t += n.source;
				return t;
			}
			default: {
				let t = e.source;
				if ("end" in e && e.end) for (let n of e.end) t += n.source;
				return t;
			}
		}
	}
	function r({ start: e, key: t, sep: r, value: i }) {
		let a = "";
		for (let t of e) a += t.source;
		if (t && (a += n(t)), r) for (let e of r) a += e.source;
		return i && (a += n(i)), a;
	}
	e.stringify = t;
})), Td = /* @__PURE__ */ w(((e) => {
	var t = Symbol("break visit"), n = Symbol("skip children"), r = Symbol("remove item");
	function i(e, t) {
		"type" in e && e.type === "document" && (e = {
			start: e.start,
			value: e.value
		}), a(Object.freeze([]), e, t);
	}
	i.BREAK = t, i.SKIP = n, i.REMOVE = r, i.itemAtPath = (e, t) => {
		let n = e;
		for (let [e, r] of t) {
			let t = n?.[e];
			if (t && "items" in t) n = t.items[r];
			else return;
		}
		return n;
	}, i.parentCollection = (e, t) => {
		let n = i.itemAtPath(e, t.slice(0, -1)), r = t[t.length - 1][0], a = n?.[r];
		if (a && "items" in a) return a;
		throw Error("Parent collection not found");
	};
	function a(e, n, i) {
		let o = i(n, e);
		if (typeof o == "symbol") return o;
		for (let s of ["key", "value"]) {
			let c = n[s];
			if (c && "items" in c) {
				for (let n = 0; n < c.items.length; ++n) {
					let o = a(Object.freeze(e.concat([[s, n]])), c.items[n], i);
					if (typeof o == "number") n = o - 1;
					else if (o === t) return t;
					else o === r && (c.items.splice(n, 1), --n);
				}
				typeof o == "function" && s === "key" && (o = o(n, e));
			}
		}
		return typeof o == "function" ? o(n, e) : o;
	}
	e.visit = i;
})), Ed = /* @__PURE__ */ w(((e) => {
	var t = Cd(), n = wd(), r = Td(), i = "﻿", a = "", o = "", s = "", c = (e) => !!e && "items" in e, l = (e) => !!e && (e.type === "scalar" || e.type === "single-quoted-scalar" || e.type === "double-quoted-scalar" || e.type === "block-scalar");
	/* istanbul ignore next */
	function u(e) {
		switch (e) {
			case i: return "<BOM>";
			case a: return "<DOC>";
			case o: return "<FLOW_END>";
			case s: return "<SCALAR>";
			default: return JSON.stringify(e);
		}
	}
	function d(e) {
		switch (e) {
			case i: return "byte-order-mark";
			case a: return "doc-mode";
			case o: return "flow-error-end";
			case s: return "scalar";
			case "---": return "doc-start";
			case "...": return "doc-end";
			case "":
			case "\n":
			case "\r\n": return "newline";
			case "-": return "seq-item-ind";
			case "?": return "explicit-key-ind";
			case ":": return "map-value-ind";
			case "{": return "flow-map-start";
			case "}": return "flow-map-end";
			case "[": return "flow-seq-start";
			case "]": return "flow-seq-end";
			case ",": return "comma";
		}
		switch (e[0]) {
			case " ":
			case "	": return "space";
			case "#": return "comment";
			case "%": return "directive-line";
			case "*": return "alias";
			case "&": return "anchor";
			case "!": return "tag";
			case "'": return "single-quoted-scalar";
			case "\"": return "double-quoted-scalar";
			case "|":
			case ">": return "block-scalar-header";
		}
		return null;
	}
	e.createScalarToken = t.createScalarToken, e.resolveAsScalar = t.resolveAsScalar, e.setScalarValue = t.setScalarValue, e.stringify = n.stringify, e.visit = r.visit, e.BOM = i, e.DOCUMENT = a, e.FLOW_END = o, e.SCALAR = s, e.isCollection = c, e.isScalar = l, e.prettyToken = u, e.tokenType = d;
})), Dd = /* @__PURE__ */ w(((e) => {
	var t = Ed();
	function n(e) {
		switch (e) {
			case void 0:
			case " ":
			case "\n":
			case "\r":
			case "	": return !0;
			default: return !1;
		}
	}
	var r = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), i = /* @__PURE__ */ new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), a = /* @__PURE__ */ new Set(",[]{}"), o = /* @__PURE__ */ new Set(" ,[]{}\n\r	"), s = (e) => !e || o.has(e);
	e.Lexer = class {
		constructor() {
			this.atEnd = !1, this.blockScalarIndent = -1, this.blockScalarKeep = !1, this.buffer = "", this.flowKey = !1, this.flowLevel = 0, this.indentNext = 0, this.indentValue = 0, this.lineEndPos = null, this.next = null, this.pos = 0;
		}
		*lex(e, t = !1) {
			if (e) {
				if (typeof e != "string") throw TypeError("source is not a string");
				this.buffer = this.buffer ? this.buffer + e : e, this.lineEndPos = null;
			}
			this.atEnd = !t;
			let n = this.next ?? "stream";
			for (; n && (t || this.hasChars(1));) n = yield* this.parseNext(n);
		}
		atLineEnd() {
			let e = this.pos, t = this.buffer[e];
			for (; t === " " || t === "	";) t = this.buffer[++e];
			return !t || t === "#" || t === "\n" ? !0 : t === "\r" ? this.buffer[e + 1] === "\n" : !1;
		}
		charAt(e) {
			return this.buffer[this.pos + e];
		}
		continueScalar(e) {
			let t = this.buffer[e];
			if (this.indentNext > 0) {
				let n = 0;
				for (; t === " ";) t = this.buffer[++n + e];
				if (t === "\r") {
					let t = this.buffer[n + e + 1];
					if (t === "\n" || !t && !this.atEnd) return e + n + 1;
				}
				return t === "\n" || n >= this.indentNext || !t && !this.atEnd ? e + n : -1;
			}
			if (t === "-" || t === ".") {
				let t = this.buffer.substr(e, 3);
				if ((t === "---" || t === "...") && n(this.buffer[e + 3])) return -1;
			}
			return e;
		}
		getLine() {
			let e = this.lineEndPos;
			return (typeof e != "number" || e !== -1 && e < this.pos) && (e = this.buffer.indexOf("\n", this.pos), this.lineEndPos = e), e === -1 ? this.atEnd ? this.buffer.substring(this.pos) : null : (this.buffer[e - 1] === "\r" && --e, this.buffer.substring(this.pos, e));
		}
		hasChars(e) {
			return this.pos + e <= this.buffer.length;
		}
		setNext(e) {
			return this.buffer = this.buffer.substring(this.pos), this.pos = 0, this.lineEndPos = null, this.next = e, null;
		}
		peek(e) {
			return this.buffer.substr(this.pos, e);
		}
		*parseNext(e) {
			switch (e) {
				case "stream": return yield* this.parseStream();
				case "line-start": return yield* this.parseLineStart();
				case "block-start": return yield* this.parseBlockStart();
				case "doc": return yield* this.parseDocument();
				case "flow": return yield* this.parseFlowCollection();
				case "quoted-scalar": return yield* this.parseQuotedScalar();
				case "block-scalar": return yield* this.parseBlockScalar();
				case "plain-scalar": return yield* this.parsePlainScalar();
			}
		}
		*parseStream() {
			let e = this.getLine();
			if (e === null) return this.setNext("stream");
			if (e[0] === t.BOM && (yield* this.pushCount(1), e = e.substring(1)), e[0] === "%") {
				let t = e.length, n = e.indexOf("#");
				for (; n !== -1;) {
					let r = e[n - 1];
					if (r === " " || r === "	") {
						t = n - 1;
						break;
					} else n = e.indexOf("#", n + 1);
				}
				for (;;) {
					let n = e[t - 1];
					if (n === " " || n === "	") --t;
					else break;
				}
				let r = (yield* this.pushCount(t)) + (yield* this.pushSpaces(!0));
				return yield* this.pushCount(e.length - r), this.pushNewline(), "stream";
			}
			if (this.atLineEnd()) {
				let t = yield* this.pushSpaces(!0);
				return yield* this.pushCount(e.length - t), yield* this.pushNewline(), "stream";
			}
			return yield t.DOCUMENT, yield* this.parseLineStart();
		}
		*parseLineStart() {
			let e = this.charAt(0);
			if (!e && !this.atEnd) return this.setNext("line-start");
			if (e === "-" || e === ".") {
				if (!this.atEnd && !this.hasChars(4)) return this.setNext("line-start");
				let e = this.peek(3);
				if ((e === "---" || e === "...") && n(this.charAt(3))) return yield* this.pushCount(3), this.indentValue = 0, this.indentNext = 0, e === "---" ? "doc" : "stream";
			}
			return this.indentValue = yield* this.pushSpaces(!1), this.indentNext > this.indentValue && !n(this.charAt(1)) && (this.indentNext = this.indentValue), yield* this.parseBlockStart();
		}
		*parseBlockStart() {
			let [e, t] = this.peek(2);
			if (!t && !this.atEnd) return this.setNext("block-start");
			if ((e === "-" || e === "?" || e === ":") && n(t)) {
				let e = (yield* this.pushCount(1)) + (yield* this.pushSpaces(!0));
				return this.indentNext = this.indentValue + 1, this.indentValue += e, "block-start";
			}
			return "doc";
		}
		*parseDocument() {
			yield* this.pushSpaces(!0);
			let e = this.getLine();
			if (e === null) return this.setNext("doc");
			let t = yield* this.pushIndicators();
			switch (e[t]) {
				case "#": yield* this.pushCount(e.length - t);
				case void 0: return yield* this.pushNewline(), yield* this.parseLineStart();
				case "{":
				case "[": return yield* this.pushCount(1), this.flowKey = !1, this.flowLevel = 1, "flow";
				case "}":
				case "]": return yield* this.pushCount(1), "doc";
				case "*": return yield* this.pushUntil(s), "doc";
				case "\"":
				case "'": return yield* this.parseQuotedScalar();
				case "|":
				case ">": return t += yield* this.parseBlockScalarHeader(), t += yield* this.pushSpaces(!0), yield* this.pushCount(e.length - t), yield* this.pushNewline(), yield* this.parseBlockScalar();
				default: return yield* this.parsePlainScalar();
			}
		}
		*parseFlowCollection() {
			let e, r, i = -1;
			do
				e = yield* this.pushNewline(), e > 0 ? (r = yield* this.pushSpaces(!1), this.indentValue = i = r) : r = 0, r += yield* this.pushSpaces(!0);
			while (e + r > 0);
			let a = this.getLine();
			if (a === null) return this.setNext("flow");
			if ((i !== -1 && i < this.indentNext && a[0] !== "#" || i === 0 && (a.startsWith("---") || a.startsWith("...")) && n(a[3])) && !(i === this.indentNext - 1 && this.flowLevel === 1 && (a[0] === "]" || a[0] === "}"))) return this.flowLevel = 0, yield t.FLOW_END, yield* this.parseLineStart();
			let o = 0;
			for (; a[o] === ",";) o += yield* this.pushCount(1), o += yield* this.pushSpaces(!0), this.flowKey = !1;
			switch (o += yield* this.pushIndicators(), a[o]) {
				case void 0: return "flow";
				case "#": return yield* this.pushCount(a.length - o), "flow";
				case "{":
				case "[": return yield* this.pushCount(1), this.flowKey = !1, this.flowLevel += 1, "flow";
				case "}":
				case "]": return yield* this.pushCount(1), this.flowKey = !0, --this.flowLevel, this.flowLevel ? "flow" : "doc";
				case "*": return yield* this.pushUntil(s), "flow";
				case "\"":
				case "'": return this.flowKey = !0, yield* this.parseQuotedScalar();
				case ":": {
					let e = this.charAt(1);
					if (this.flowKey || n(e) || e === ",") return this.flowKey = !1, yield* this.pushCount(1), yield* this.pushSpaces(!0), "flow";
				}
				default: return this.flowKey = !1, yield* this.parsePlainScalar();
			}
		}
		*parseQuotedScalar() {
			let e = this.charAt(0), t = this.buffer.indexOf(e, this.pos + 1);
			if (e === "'") for (; t !== -1 && this.buffer[t + 1] === "'";) t = this.buffer.indexOf("'", t + 2);
			else for (; t !== -1;) {
				let e = 0;
				for (; this.buffer[t - 1 - e] === "\\";) e += 1;
				if (e % 2 == 0) break;
				t = this.buffer.indexOf("\"", t + 1);
			}
			let n = this.buffer.substring(0, t), r = n.indexOf("\n", this.pos);
			if (r !== -1) {
				for (; r !== -1;) {
					let e = this.continueScalar(r + 1);
					if (e === -1) break;
					r = n.indexOf("\n", e);
				}
				r !== -1 && (t = r - (n[r - 1] === "\r" ? 2 : 1));
			}
			if (t === -1) {
				if (!this.atEnd) return this.setNext("quoted-scalar");
				t = this.buffer.length;
			}
			return yield* this.pushToIndex(t + 1, !1), this.flowLevel ? "flow" : "doc";
		}
		*parseBlockScalarHeader() {
			this.blockScalarIndent = -1, this.blockScalarKeep = !1;
			let e = this.pos;
			for (;;) {
				let t = this.buffer[++e];
				if (t === "+") this.blockScalarKeep = !0;
				else if (t > "0" && t <= "9") this.blockScalarIndent = Number(t) - 1;
				else if (t !== "-") break;
			}
			return yield* this.pushUntil((e) => n(e) || e === "#");
		}
		*parseBlockScalar() {
			let e = this.pos - 1, n = 0, r;
			loop: for (let t = this.pos; r = this.buffer[t]; ++t) switch (r) {
				case " ":
					n += 1;
					break;
				case "\n":
					e = t, n = 0;
					break;
				case "\r": {
					let e = this.buffer[t + 1];
					if (!e && !this.atEnd) return this.setNext("block-scalar");
					if (e === "\n") break;
				}
				default: break loop;
			}
			if (!r && !this.atEnd) return this.setNext("block-scalar");
			if (n >= this.indentNext) {
				this.blockScalarIndent === -1 ? this.indentNext = n : this.indentNext = this.blockScalarIndent + (this.indentNext === 0 ? 1 : this.indentNext);
				do {
					let t = this.continueScalar(e + 1);
					if (t === -1) break;
					e = this.buffer.indexOf("\n", t);
				} while (e !== -1);
				if (e === -1) {
					if (!this.atEnd) return this.setNext("block-scalar");
					e = this.buffer.length;
				}
			}
			let i = e + 1;
			for (r = this.buffer[i]; r === " ";) r = this.buffer[++i];
			if (r === "	") {
				for (; r === "	" || r === " " || r === "\r" || r === "\n";) r = this.buffer[++i];
				e = i - 1;
			} else if (!this.blockScalarKeep) do {
				let t = e - 1, r = this.buffer[t];
				r === "\r" && (r = this.buffer[--t]);
				let i = t;
				for (; r === " ";) r = this.buffer[--t];
				if (r === "\n" && t >= this.pos && t + 1 + n > i) e = t;
				else break;
			} while (!0);
			return yield t.SCALAR, yield* this.pushToIndex(e + 1, !0), yield* this.parseLineStart();
		}
		*parsePlainScalar() {
			let e = this.flowLevel > 0, r = this.pos - 1, i = this.pos - 1, o;
			for (; o = this.buffer[++i];) if (o === ":") {
				let t = this.buffer[i + 1];
				if (n(t) || e && a.has(t)) break;
				r = i;
			} else if (n(o)) {
				let t = this.buffer[i + 1];
				if (o === "\r" && (t === "\n" ? (i += 1, o = "\n", t = this.buffer[i + 1]) : r = i), t === "#" || e && a.has(t)) break;
				if (o === "\n") {
					let e = this.continueScalar(i + 1);
					if (e === -1) break;
					i = Math.max(i, e - 2);
				}
			} else {
				if (e && a.has(o)) break;
				r = i;
			}
			return !o && !this.atEnd ? this.setNext("plain-scalar") : (yield t.SCALAR, yield* this.pushToIndex(r + 1, !0), e ? "flow" : "doc");
		}
		*pushCount(e) {
			return e > 0 ? (yield this.buffer.substr(this.pos, e), this.pos += e, e) : 0;
		}
		*pushToIndex(e, t) {
			let n = this.buffer.slice(this.pos, e);
			return n ? (yield n, this.pos += n.length, n.length) : (t && (yield ""), 0);
		}
		*pushIndicators() {
			let e = 0;
			loop: for (;;) {
				switch (this.charAt(0)) {
					case "!":
						e += yield* this.pushTag(), e += yield* this.pushSpaces(!0);
						continue loop;
					case "&":
						e += yield* this.pushUntil(s), e += yield* this.pushSpaces(!0);
						continue loop;
					case "-":
					case "?":
					case ":": {
						let t = this.flowLevel > 0, r = this.charAt(1);
						if (n(r) || t && a.has(r)) {
							t ? this.flowKey &&= !1 : this.indentNext = this.indentValue + 1, e += yield* this.pushCount(1), e += yield* this.pushSpaces(!0);
							continue loop;
						}
					}
				}
				break loop;
			}
			return e;
		}
		*pushTag() {
			if (this.charAt(1) === "<") {
				let e = this.pos + 2, t = this.buffer[e];
				for (; !n(t) && t !== ">";) t = this.buffer[++e];
				return yield* this.pushToIndex(t === ">" ? e + 1 : e, !1);
			} else {
				let e = this.pos + 1, t = this.buffer[e];
				for (; t;) if (i.has(t)) t = this.buffer[++e];
				else if (t === "%" && r.has(this.buffer[e + 1]) && r.has(this.buffer[e + 2])) t = this.buffer[e += 3];
				else break;
				return yield* this.pushToIndex(e, !1);
			}
		}
		*pushNewline() {
			let e = this.buffer[this.pos];
			return e === "\n" ? yield* this.pushCount(1) : e === "\r" && this.charAt(1) === "\n" ? yield* this.pushCount(2) : 0;
		}
		*pushSpaces(e) {
			let t = this.pos - 1, n;
			do
				n = this.buffer[++t];
			while (n === " " || e && n === "	");
			let r = t - this.pos;
			return r > 0 && (yield this.buffer.substr(this.pos, r), this.pos = t), r;
		}
		*pushUntil(e) {
			let t = this.pos, n = this.buffer[t];
			for (; !e(n);) n = this.buffer[++t];
			return yield* this.pushToIndex(t, !1);
		}
	};
})), Od = /* @__PURE__ */ w(((e) => {
	e.LineCounter = class {
		constructor() {
			this.lineStarts = [], this.addNewLine = (e) => this.lineStarts.push(e), this.linePos = (e) => {
				let t = 0, n = this.lineStarts.length;
				for (; t < n;) {
					let r = t + n >> 1;
					this.lineStarts[r] < e ? t = r + 1 : n = r;
				}
				if (this.lineStarts[t] === e) return {
					line: t + 1,
					col: 1
				};
				if (t === 0) return {
					line: 0,
					col: e
				};
				let r = this.lineStarts[t - 1];
				return {
					line: t,
					col: e - r + 1
				};
			};
		}
	};
})), kd = /* @__PURE__ */ w(((e) => {
	var t = k("process"), n = Ed(), r = Dd();
	function i(e, t) {
		for (let n = 0; n < e.length; ++n) if (e[n].type === t) return !0;
		return !1;
	}
	function a(e) {
		for (let t = 0; t < e.length; ++t) switch (e[t].type) {
			case "space":
			case "comment":
			case "newline": break;
			default: return t;
		}
		return -1;
	}
	function o(e) {
		switch (e?.type) {
			case "alias":
			case "scalar":
			case "single-quoted-scalar":
			case "double-quoted-scalar":
			case "flow-collection": return !0;
			default: return !1;
		}
	}
	function s(e) {
		switch (e.type) {
			case "document": return e.start;
			case "block-map": {
				let t = e.items[e.items.length - 1];
				return t.sep ?? t.start;
			}
			case "block-seq": return e.items[e.items.length - 1].start;
			/* istanbul ignore next should not happen */
			default: return [];
		}
	}
	function c(e) {
		if (e.length === 0) return [];
		let t = e.length;
		loop: for (; --t >= 0;) switch (e[t].type) {
			case "doc-start":
			case "explicit-key-ind":
			case "map-value-ind":
			case "seq-item-ind":
			case "newline": break loop;
		}
		for (; e[++t]?.type === "space";);
		return e.splice(t, e.length);
	}
	function l(e, t) {
		if (t.length < 1e5) Array.prototype.push.apply(e, t);
		else for (let n = 0; n < t.length; ++n) e.push(t[n]);
	}
	function u(e) {
		if (e.start.type === "flow-seq-start") for (let t of e.items) t.sep && !t.value && !i(t.start, "explicit-key-ind") && !i(t.sep, "map-value-ind") && (t.key && (t.value = t.key), delete t.key, o(t.value) ? t.value.end ? l(t.value.end, t.sep) : t.value.end = t.sep : l(t.start, t.sep), delete t.sep);
	}
	e.Parser = class {
		constructor(e) {
			this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new r.Lexer(), this.onNewLine = e;
		}
		*parse(e, t = !1) {
			this.onNewLine && this.offset === 0 && this.onNewLine(0);
			for (let n of this.lexer.lex(e, t)) yield* this.next(n);
			t || (yield* this.end());
		}
		*next(e) {
			if (this.source = e, t.env.LOG_TOKENS && console.log("|", n.prettyToken(e)), this.atScalar) {
				this.atScalar = !1, yield* this.step(), this.offset += e.length;
				return;
			}
			let r = n.tokenType(e);
			if (!r) {
				let t = `Not a YAML token: ${e}`;
				yield* this.pop({
					type: "error",
					offset: this.offset,
					message: t,
					source: e
				}), this.offset += e.length;
			} else if (r === "scalar") this.atNewLine = !1, this.atScalar = !0, this.type = "scalar";
			else {
				switch (this.type = r, yield* this.step(), r) {
					case "newline":
						this.atNewLine = !0, this.indent = 0, this.onNewLine && this.onNewLine(this.offset + e.length);
						break;
					case "space":
						this.atNewLine && e[0] === " " && (this.indent += e.length);
						break;
					case "explicit-key-ind":
					case "map-value-ind":
					case "seq-item-ind":
						this.atNewLine && (this.indent += e.length);
						break;
					case "doc-mode":
					case "flow-error-end": return;
					default: this.atNewLine = !1;
				}
				this.offset += e.length;
			}
		}
		*end() {
			for (; this.stack.length > 0;) yield* this.pop();
		}
		get sourceToken() {
			return {
				type: this.type,
				offset: this.offset,
				indent: this.indent,
				source: this.source
			};
		}
		*step() {
			let e = this.peek(1);
			if (this.type === "doc-end" && e?.type !== "doc-end") {
				for (; this.stack.length > 0;) yield* this.pop();
				this.stack.push({
					type: "doc-end",
					offset: this.offset,
					source: this.source
				});
				return;
			}
			if (!e) return yield* this.stream();
			switch (e.type) {
				case "document": return yield* this.document(e);
				case "alias":
				case "scalar":
				case "single-quoted-scalar":
				case "double-quoted-scalar": return yield* this.scalar(e);
				case "block-scalar": return yield* this.blockScalar(e);
				case "block-map": return yield* this.blockMap(e);
				case "block-seq": return yield* this.blockSequence(e);
				case "flow-collection": return yield* this.flowCollection(e);
				case "doc-end": return yield* this.documentEnd(e);
			}
			/* istanbul ignore next should not happen */
			yield* this.pop();
		}
		peek(e) {
			return this.stack[this.stack.length - e];
		}
		*pop(e) {
			let t = e ?? this.stack.pop();
			/* istanbul ignore if should not happen */
			if (!t) yield {
				type: "error",
				offset: this.offset,
				source: "",
				message: "Tried to pop an empty stack"
			};
			else if (this.stack.length === 0) yield t;
			else {
				let e = this.peek(1);
				switch (t.type === "block-scalar" ? t.indent = "indent" in e ? e.indent : 0 : t.type === "flow-collection" && e.type === "document" && (t.indent = 0), t.type === "flow-collection" && u(t), e.type) {
					case "document":
						e.value = t;
						break;
					case "block-scalar":
						e.props.push(t);
						break;
					case "block-map": {
						let n = e.items[e.items.length - 1];
						if (n.value) {
							e.items.push({
								start: [],
								key: t,
								sep: []
							}), this.onKeyLine = !0;
							return;
						} else if (n.sep) n.value = t;
						else {
							Object.assign(n, {
								key: t,
								sep: []
							}), this.onKeyLine = !n.explicitKey;
							return;
						}
						break;
					}
					case "block-seq": {
						let n = e.items[e.items.length - 1];
						n.value ? e.items.push({
							start: [],
							value: t
						}) : n.value = t;
						break;
					}
					case "flow-collection": {
						let n = e.items[e.items.length - 1];
						!n || n.value ? e.items.push({
							start: [],
							key: t,
							sep: []
						}) : n.sep ? n.value = t : Object.assign(n, {
							key: t,
							sep: []
						});
						return;
					}
					/* istanbul ignore next should not happen */
					default: yield* this.pop(), yield* this.pop(t);
				}
				if ((e.type === "document" || e.type === "block-map" || e.type === "block-seq") && (t.type === "block-map" || t.type === "block-seq")) {
					let n = t.items[t.items.length - 1];
					n && !n.sep && !n.value && n.start.length > 0 && a(n.start) === -1 && (t.indent === 0 || n.start.every((e) => e.type !== "comment" || e.indent < t.indent)) && (e.type === "document" ? e.end = n.start : e.items.push({ start: n.start }), t.items.splice(-1, 1));
				}
			}
		}
		*stream() {
			switch (this.type) {
				case "directive-line":
					yield {
						type: "directive",
						offset: this.offset,
						source: this.source
					};
					return;
				case "byte-order-mark":
				case "space":
				case "comment":
				case "newline":
					yield this.sourceToken;
					return;
				case "doc-mode":
				case "doc-start": {
					let e = {
						type: "document",
						offset: this.offset,
						start: []
					};
					this.type === "doc-start" && e.start.push(this.sourceToken), this.stack.push(e);
					return;
				}
			}
			yield {
				type: "error",
				offset: this.offset,
				message: `Unexpected ${this.type} token in YAML stream`,
				source: this.source
			};
		}
		*document(e) {
			if (e.value) return yield* this.lineEnd(e);
			switch (this.type) {
				case "doc-start":
					a(e.start) === -1 ? e.start.push(this.sourceToken) : (yield* this.pop(), yield* this.step());
					return;
				case "anchor":
				case "tag":
				case "space":
				case "comment":
				case "newline":
					e.start.push(this.sourceToken);
					return;
			}
			let t = this.startBlockValue(e);
			t ? this.stack.push(t) : yield {
				type: "error",
				offset: this.offset,
				message: `Unexpected ${this.type} token in YAML document`,
				source: this.source
			};
		}
		*scalar(e) {
			if (this.type === "map-value-ind") {
				let t = c(s(this.peek(2))), n;
				e.end ? (n = e.end, n.push(this.sourceToken), delete e.end) : n = [this.sourceToken];
				let r = {
					type: "block-map",
					offset: e.offset,
					indent: e.indent,
					items: [{
						start: t,
						key: e,
						sep: n
					}]
				};
				this.onKeyLine = !0, this.stack[this.stack.length - 1] = r;
			} else yield* this.lineEnd(e);
		}
		*blockScalar(e) {
			switch (this.type) {
				case "space":
				case "comment":
				case "newline":
					e.props.push(this.sourceToken);
					return;
				case "scalar":
					if (e.source = this.source, this.atNewLine = !0, this.indent = 0, this.onNewLine) {
						let e = this.source.indexOf("\n") + 1;
						for (; e !== 0;) this.onNewLine(this.offset + e), e = this.source.indexOf("\n", e) + 1;
					}
					yield* this.pop();
					break;
				/* istanbul ignore next should not happen */
				default: yield* this.pop(), yield* this.step();
			}
		}
		*blockMap(e) {
			let t = e.items[e.items.length - 1];
			switch (this.type) {
				case "newline":
					if (this.onKeyLine = !1, t.value) {
						let n = "end" in t.value ? t.value.end : void 0;
						(Array.isArray(n) ? n[n.length - 1] : void 0)?.type === "comment" ? n?.push(this.sourceToken) : e.items.push({ start: [this.sourceToken] });
					} else t.sep ? t.sep.push(this.sourceToken) : t.start.push(this.sourceToken);
					return;
				case "space":
				case "comment":
					if (t.value) e.items.push({ start: [this.sourceToken] });
					else if (t.sep) t.sep.push(this.sourceToken);
					else {
						if (this.atIndentedComment(t.start, e.indent)) {
							let n = e.items[e.items.length - 2]?.value?.end;
							if (Array.isArray(n)) {
								l(n, t.start), n.push(this.sourceToken), e.items.pop();
								return;
							}
						}
						t.start.push(this.sourceToken);
					}
					return;
			}
			if (this.indent >= e.indent) {
				let n = !this.onKeyLine && this.indent === e.indent, r = n && (t.sep || t.explicitKey) && this.type !== "seq-item-ind", a = [];
				if (r && t.sep && !t.value) {
					let n = [];
					for (let r = 0; r < t.sep.length; ++r) {
						let i = t.sep[r];
						switch (i.type) {
							case "newline":
								n.push(r);
								break;
							case "space": break;
							case "comment":
								i.indent > e.indent && (n.length = 0);
								break;
							default: n.length = 0;
						}
					}
					n.length >= 2 && (a = t.sep.splice(n[1]));
				}
				switch (this.type) {
					case "anchor":
					case "tag":
						r || t.value ? (a.push(this.sourceToken), e.items.push({ start: a }), this.onKeyLine = !0) : t.sep ? t.sep.push(this.sourceToken) : t.start.push(this.sourceToken);
						return;
					case "explicit-key-ind":
						!t.sep && !t.explicitKey ? (t.start.push(this.sourceToken), t.explicitKey = !0) : r || t.value ? (a.push(this.sourceToken), e.items.push({
							start: a,
							explicitKey: !0
						})) : this.stack.push({
							type: "block-map",
							offset: this.offset,
							indent: this.indent,
							items: [{
								start: [this.sourceToken],
								explicitKey: !0
							}]
						}), this.onKeyLine = !0;
						return;
					case "map-value-ind":
						if (t.explicitKey) if (!t.sep) if (i(t.start, "newline")) Object.assign(t, {
							key: null,
							sep: [this.sourceToken]
						});
						else {
							let e = c(t.start);
							this.stack.push({
								type: "block-map",
								offset: this.offset,
								indent: this.indent,
								items: [{
									start: e,
									key: null,
									sep: [this.sourceToken]
								}]
							});
						}
						else if (t.value) e.items.push({
							start: [],
							key: null,
							sep: [this.sourceToken]
						});
						else if (i(t.sep, "map-value-ind")) this.stack.push({
							type: "block-map",
							offset: this.offset,
							indent: this.indent,
							items: [{
								start: a,
								key: null,
								sep: [this.sourceToken]
							}]
						});
						else if (o(t.key) && !i(t.sep, "newline")) {
							let e = c(t.start), n = t.key, r = t.sep;
							r.push(this.sourceToken), delete t.key, delete t.sep, this.stack.push({
								type: "block-map",
								offset: this.offset,
								indent: this.indent,
								items: [{
									start: e,
									key: n,
									sep: r
								}]
							});
						} else a.length > 0 ? t.sep = t.sep.concat(a, this.sourceToken) : t.sep.push(this.sourceToken);
						else t.sep ? t.value || r ? e.items.push({
							start: a,
							key: null,
							sep: [this.sourceToken]
						}) : i(t.sep, "map-value-ind") ? this.stack.push({
							type: "block-map",
							offset: this.offset,
							indent: this.indent,
							items: [{
								start: [],
								key: null,
								sep: [this.sourceToken]
							}]
						}) : t.sep.push(this.sourceToken) : Object.assign(t, {
							key: null,
							sep: [this.sourceToken]
						});
						this.onKeyLine = !0;
						return;
					case "alias":
					case "scalar":
					case "single-quoted-scalar":
					case "double-quoted-scalar": {
						let n = this.flowScalar(this.type);
						r || t.value ? (e.items.push({
							start: a,
							key: n,
							sep: []
						}), this.onKeyLine = !0) : t.sep ? this.stack.push(n) : (Object.assign(t, {
							key: n,
							sep: []
						}), this.onKeyLine = !0);
						return;
					}
					default: {
						let r = this.startBlockValue(e);
						if (r) {
							if (r.type === "block-seq") {
								if (!t.explicitKey && t.sep && !i(t.sep, "newline")) {
									yield* this.pop({
										type: "error",
										offset: this.offset,
										message: "Unexpected block-seq-ind on same line with key",
										source: this.source
									});
									return;
								}
							} else n && e.items.push({ start: a });
							this.stack.push(r);
							return;
						}
					}
				}
			}
			yield* this.pop(), yield* this.step();
		}
		*blockSequence(e) {
			let t = e.items[e.items.length - 1];
			switch (this.type) {
				case "newline":
					if (t.value) {
						let n = "end" in t.value ? t.value.end : void 0;
						(Array.isArray(n) ? n[n.length - 1] : void 0)?.type === "comment" ? n?.push(this.sourceToken) : e.items.push({ start: [this.sourceToken] });
					} else t.start.push(this.sourceToken);
					return;
				case "space":
				case "comment":
					if (t.value) e.items.push({ start: [this.sourceToken] });
					else {
						if (this.atIndentedComment(t.start, e.indent)) {
							let n = e.items[e.items.length - 2]?.value?.end;
							if (Array.isArray(n)) {
								l(n, t.start), n.push(this.sourceToken), e.items.pop();
								return;
							}
						}
						t.start.push(this.sourceToken);
					}
					return;
				case "anchor":
				case "tag":
					if (t.value || this.indent <= e.indent) break;
					t.start.push(this.sourceToken);
					return;
				case "seq-item-ind":
					if (this.indent !== e.indent) break;
					t.value || i(t.start, "seq-item-ind") ? e.items.push({ start: [this.sourceToken] }) : t.start.push(this.sourceToken);
					return;
			}
			if (this.indent > e.indent) {
				let t = this.startBlockValue(e);
				if (t) {
					this.stack.push(t);
					return;
				}
			}
			yield* this.pop(), yield* this.step();
		}
		*flowCollection(e) {
			let t = e.items[e.items.length - 1];
			if (this.type === "flow-error-end") {
				let e;
				do
					yield* this.pop(), e = this.peek(1);
				while (e?.type === "flow-collection");
			} else if (e.end.length === 0) {
				switch (this.type) {
					case "comma":
					case "explicit-key-ind":
						!t || t.sep ? e.items.push({ start: [this.sourceToken] }) : t.start.push(this.sourceToken);
						return;
					case "map-value-ind":
						!t || t.value ? e.items.push({
							start: [],
							key: null,
							sep: [this.sourceToken]
						}) : t.sep ? t.sep.push(this.sourceToken) : Object.assign(t, {
							key: null,
							sep: [this.sourceToken]
						});
						return;
					case "space":
					case "comment":
					case "newline":
					case "anchor":
					case "tag":
						!t || t.value ? e.items.push({ start: [this.sourceToken] }) : t.sep ? t.sep.push(this.sourceToken) : t.start.push(this.sourceToken);
						return;
					case "alias":
					case "scalar":
					case "single-quoted-scalar":
					case "double-quoted-scalar": {
						let n = this.flowScalar(this.type);
						!t || t.value ? e.items.push({
							start: [],
							key: n,
							sep: []
						}) : t.sep ? this.stack.push(n) : Object.assign(t, {
							key: n,
							sep: []
						});
						return;
					}
					case "flow-map-end":
					case "flow-seq-end":
						e.end.push(this.sourceToken);
						return;
				}
				let n = this.startBlockValue(e);
				/* istanbul ignore else should not happen */
				n ? this.stack.push(n) : (yield* this.pop(), yield* this.step());
			} else {
				let t = this.peek(2);
				if (t.type === "block-map" && (this.type === "map-value-ind" && t.indent === e.indent || this.type === "newline" && !t.items[t.items.length - 1].sep)) yield* this.pop(), yield* this.step();
				else if (this.type === "map-value-ind" && t.type !== "flow-collection") {
					let n = c(s(t));
					u(e);
					let r = e.end.splice(1, e.end.length);
					r.push(this.sourceToken);
					let i = {
						type: "block-map",
						offset: e.offset,
						indent: e.indent,
						items: [{
							start: n,
							key: e,
							sep: r
						}]
					};
					this.onKeyLine = !0, this.stack[this.stack.length - 1] = i;
				} else yield* this.lineEnd(e);
			}
		}
		flowScalar(e) {
			if (this.onNewLine) {
				let e = this.source.indexOf("\n") + 1;
				for (; e !== 0;) this.onNewLine(this.offset + e), e = this.source.indexOf("\n", e) + 1;
			}
			return {
				type: e,
				offset: this.offset,
				indent: this.indent,
				source: this.source
			};
		}
		startBlockValue(e) {
			switch (this.type) {
				case "alias":
				case "scalar":
				case "single-quoted-scalar":
				case "double-quoted-scalar": return this.flowScalar(this.type);
				case "block-scalar-header": return {
					type: "block-scalar",
					offset: this.offset,
					indent: this.indent,
					props: [this.sourceToken],
					source: ""
				};
				case "flow-map-start":
				case "flow-seq-start": return {
					type: "flow-collection",
					offset: this.offset,
					indent: this.indent,
					start: this.sourceToken,
					items: [],
					end: []
				};
				case "seq-item-ind": return {
					type: "block-seq",
					offset: this.offset,
					indent: this.indent,
					items: [{ start: [this.sourceToken] }]
				};
				case "explicit-key-ind": {
					this.onKeyLine = !0;
					let t = c(s(e));
					return t.push(this.sourceToken), {
						type: "block-map",
						offset: this.offset,
						indent: this.indent,
						items: [{
							start: t,
							explicitKey: !0
						}]
					};
				}
				case "map-value-ind": {
					this.onKeyLine = !0;
					let t = c(s(e));
					return {
						type: "block-map",
						offset: this.offset,
						indent: this.indent,
						items: [{
							start: t,
							key: null,
							sep: [this.sourceToken]
						}]
					};
				}
			}
			return null;
		}
		atIndentedComment(e, t) {
			return this.type !== "comment" || this.indent <= t ? !1 : e.every((e) => e.type === "newline" || e.type === "space");
		}
		*documentEnd(e) {
			this.type !== "doc-mode" && (e.end ? e.end.push(this.sourceToken) : e.end = [this.sourceToken], this.type === "newline" && (yield* this.pop()));
		}
		*lineEnd(e) {
			switch (this.type) {
				case "comma":
				case "doc-start":
				case "doc-end":
				case "flow-seq-end":
				case "flow-map-end":
				case "map-value-ind":
					yield* this.pop(), yield* this.step();
					break;
				case "newline": this.onKeyLine = !1;
				default: e.end ? e.end.push(this.sourceToken) : e.end = [this.sourceToken], this.type === "newline" && (yield* this.pop());
			}
		}
	};
})), Ad = /* @__PURE__ */ w(((e) => {
	var t = Sd(), n = ad(), r = od(), i = Au(), a = mu(), o = Od(), s = kd();
	function c(e) {
		let t = e.prettyErrors !== !1;
		return {
			lineCounter: e.lineCounter || t && new o.LineCounter() || null,
			prettyErrors: t
		};
	}
	function l(e, n = {}) {
		let { lineCounter: i, prettyErrors: a } = c(n), o = new s.Parser(i?.addNewLine), l = new t.Composer(n), u = Array.from(l.compose(o.parse(e)));
		if (a && i) for (let t of u) t.errors.forEach(r.prettifyError(e, i)), t.warnings.forEach(r.prettifyError(e, i));
		return u.length > 0 ? u : Object.assign([], { empty: !0 }, l.streamInfo());
	}
	function u(e, n = {}) {
		let { lineCounter: i, prettyErrors: a } = c(n), o = new s.Parser(i?.addNewLine), l = new t.Composer(n), u = null;
		for (let t of l.compose(o.parse(e), !0, e.length)) if (!u) u = t;
		else if (u.options.logLevel !== "silent") {
			u.errors.push(new r.YAMLParseError(t.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
			break;
		}
		return a && i && (u.errors.forEach(r.prettifyError(e, i)), u.warnings.forEach(r.prettifyError(e, i))), u;
	}
	function d(e, t, n) {
		let r;
		typeof t == "function" ? r = t : n === void 0 && t && typeof t == "object" && (n = t);
		let a = u(e, n);
		if (!a) return null;
		if (a.warnings.forEach((e) => i.warn(a.options.logLevel, e)), a.errors.length > 0) {
			if (a.options.logLevel !== "silent") throw a.errors[0];
			a.errors = [];
		}
		return a.toJS(Object.assign({ reviver: r }, n));
	}
	function f(e, t, r) {
		let i = null;
		if (typeof t == "function" || Array.isArray(t) ? i = t : r === void 0 && t && (r = t), typeof r == "string" && (r = r.length), typeof r == "number") {
			let e = Math.round(r);
			r = e < 1 ? void 0 : e > 8 ? { indent: 8 } : { indent: e };
		}
		if (e === void 0) {
			let { keepUndefined: e } = r ?? t ?? {};
			if (!e) return;
		}
		return a.isDocument(e) && !i ? e.toString(r) : new n.Document(e, i, r).toString(r);
	}
	e.parse = d, e.parseAllDocuments = l, e.parseDocument = u, e.stringify = f;
})), jd = /* @__PURE__ */ w(((e) => {
	var t = Sd(), n = ad(), r = rd(), i = od(), a = xu(), o = mu(), s = Nu(), c = Su(), l = Fu(), u = Lu(), d = Ed(), f = Dd(), p = Od(), m = kd(), h = Ad(), g = hu();
	e.Composer = t.Composer, e.Document = n.Document, e.Schema = r.Schema, e.YAMLError = i.YAMLError, e.YAMLParseError = i.YAMLParseError, e.YAMLWarning = i.YAMLWarning, e.Alias = a.Alias, e.isAlias = o.isAlias, e.isCollection = o.isCollection, e.isDocument = o.isDocument, e.isMap = o.isMap, e.isNode = o.isNode, e.isPair = o.isPair, e.isScalar = o.isScalar, e.isSeq = o.isSeq, e.Pair = s.Pair, e.Scalar = c.Scalar, e.YAMLMap = l.YAMLMap, e.YAMLSeq = u.YAMLSeq, e.CST = d, e.Lexer = f.Lexer, e.LineCounter = p.LineCounter, e.Parser = m.Parser, e.parse = h.parse, e.parseAllDocuments = h.parseAllDocuments, e.parseDocument = h.parseDocument, e.stringify = h.stringify, e.visit = g.visit, e.visitAsync = g.visitAsync;
})), Md = /* @__PURE__ */ T({
	default: () => Xd,
	defaultPrefix: () => $l,
	distTag: () => Ud,
	getEngines: () => nu,
	getPeerDependencies: () => tu,
	greatest: () => Wd,
	latest: () => Gd,
	list: () => Vd,
	minor: () => Kd,
	newest: () => qd,
	packageAuthorChanged: () => Jl,
	patch: () => Jd,
	pnpmApi: () => Zd,
	semver: () => Yd
}), Nd = jd(), Pd = (0, Kc.default)(async (e) => {
	let r = await hl("pnpm-workspace.yaml");
	if (!r) return {};
	let i = t.dirname(r), a = t.join(i, ".npmrc"), o;
	try {
		o = await n.readFile(a, "utf-8");
	} catch {
		return {};
	}
	Z(e, `\nUsing pnpm workspace config at ${a}:`, "verbose");
	let s = Wl(qc.default.parse(o), i);
	return Z(e, s, "verbose"), s;
}), Fd = (e) => {
	let t = typeof e == "number" ? e : typeof e == "string" && e.trim() !== "" ? Number(e) : NaN;
	return typeof t == "number" && !isNaN(t) && t >= 0 ? t : void 0;
}, Id = (e) => {
	if (Array.isArray(e)) return e.filter((e) => typeof e == "string");
	if (typeof e == "string") {
		let t = e.trim();
		if (t.startsWith("[")) try {
			let e = JSON.parse(t);
			if (Array.isArray(e)) return e.filter((e) => typeof e == "string");
		} catch {}
		return t === "" ? [] : [t];
	}
	return [];
}, Ld = (e) => ({
	minimumReleaseAge: Fd(e.minimumReleaseAge ?? e["minimum-release-age"]),
	minimumReleaseAgeExclude: Id(e.minimumReleaseAgeExclude ?? e["minimum-release-age-exclude"])
}), Rd = () => {
	if (process.env.XDG_CONFIG_HOME) return t.join(process.env.XDG_CONFIG_HOME, "pnpm");
	if (process.platform === "win32") {
		let e = process.env.LOCALAPPDATA || t.join(r.homedir(), "AppData", "Local");
		return t.join(e, "pnpm", "config");
	}
	return process.platform === "darwin" ? t.join(r.homedir(), "Library", "Preferences", "pnpm") : t.join(r.homedir(), ".config", "pnpm");
}, zd = async (e, t) => {
	let r;
	try {
		r = await n.readFile(e, "utf-8");
	} catch {
		return null;
	}
	let i;
	try {
		i = (t === "yaml" ? (0, Nd.parse)(r) : qc.default.parse(r)) ?? {};
	} catch {
		return null;
	}
	return Ld(i);
}, Bd = async () => {
	let e = Rd(), n = await hl("pnpm-workspace.yaml"), r = await Promise.all([
		n ? zd(n, "yaml") : Promise.resolve(null),
		zd(t.join(e, "config.yaml"), "yaml"),
		zd(t.join(e, "rc"), "ini")
	]), i = r.find((e) => e?.minimumReleaseAge != null)?.minimumReleaseAge;
	return i == null ? null : {
		minimumReleaseAge: i,
		minimumReleaseAgeExclude: [...new Set(r.flatMap((e) => e?.minimumReleaseAgeExclude ?? []))]
	};
}, Vd = async (e = {}) => {
	if (!e.global) return ru(e);
	let { stdout: t } = await Al("pnpm", [
		"ls",
		"-g",
		"--json"
	]);
	return Dn(JSON.parse(t)[0].dependencies || {}, (e, { version: t }) => ({ [e]: t }));
}, Hd = (e) => async (t, n, r = {}) => e(t, n, r, {}, await Pd(r)), Ud = Hd(iu), Wd = Hd(eu), Gd = Hd(au), Kd = Hd(su), qd = Hd(ou), Jd = Hd(cu), Yd = Hd(lu);
async function Xd(e, t = {}, n, r) {
	let { stdout: i } = await Al("pnpm", [
		...t.global ? "global" : [],
		...Array.isArray(e) ? e : [e],
		...t.prefix ? `--prefix=${t.prefix}` : []
	], r, n);
	return i;
}
var Zd = { getPnpmWorkspaceMinimumReleaseAge: Bd }, Qd = /* @__PURE__ */ w(((e, t) => {
	var n = k("stream").Transform;
	function r(e) {
		if (!(this instanceof r)) throw TypeError("Cannot call a class as a function");
		e ||= {}, n.call(this, { objectMode: !0 }), this._memory = "", this._emitInvalidLines = e.emitInvalidLines || !1;
	}
	r.prototype = Object.create(n.prototype), r.prototype._handleLines = function(e, t) {
		for (var n = 0; n < e.length; n++) if (e[n] !== "") {
			var r = null, i = null;
			try {
				i = JSON.parse(e[n]);
			} catch (t) {
				t.source = e[n], r = t;
			}
			if (r) if (this._emitInvalidLines) this.emit("invalid-line", r);
			else return t(r);
			else this.push(i);
		}
		t(null);
	}, r.prototype._transform = function(e, t, n) {
		var r = (this._memory + e.toString()).split("\n");
		this._memory = r.pop(), this._handleLines(r, n);
	}, r.prototype._flush = function(e) {
		if (!this._memory) return e(null);
		var t = this._memory;
		this._memory = "", this._handleLines([t], e);
	}, t.exports = r;
})), $d = /* @__PURE__ */ w(((e, t) => {
	var n = k("stream").Transform;
	function r() {
		if (!(this instanceof r)) throw TypeError("Cannot call a class as a function");
		n.call(this, { objectMode: !0 });
	}
	r.prototype = Object.create(n.prototype), r.prototype._transform = function(e, t, n) {
		var r;
		try {
			r = JSON.stringify(e);
		} catch (t) {
			return t.source = e, n(t);
		}
		n(null, r + "\n");
	}, t.exports = r;
})), ef = /* @__PURE__ */ w(((e) => {
	var t = Qd();
	$d(), e.parse = function(e) {
		return new t(e);
	};
})), tf = /* @__PURE__ */ T({
	default: () => ff,
	defaultPrefix: () => pf,
	distTag: () => gf,
	getEngines: () => wf,
	getPathToLookForYarnrc: () => sf,
	getPeerDependencies: () => Cf,
	greatest: () => _f,
	latest: () => vf,
	list: () => mf,
	minor: () => yf,
	newest: () => bf,
	npmAuthTokenKeyValue: () => af,
	packageAuthorChanged: () => Tf,
	patch: () => xf,
	semver: () => Sf,
	yarnApi: () => Ef
}), nf = /* @__PURE__ */ D(ef(), 1), rf = (e, t) => e.replace(/\$\{([^:-]+)(?:(:)?-([^}]*))?\}/g, (e, n, r, i, a) => t[n] || (i ? a : "")), af = (e) => (t, n) => {
	if (n.npmAuthToken) {
		let r = n.npmRegistryServer || e[`@${t}:registry`];
		if (r) {
			let e = r.replace(/^https?:/, "");
			return e.endsWith("/") && (e = e.slice(0, -1)), { [`${e}/:_authToken`]: rf(n.npmAuthToken, process.env) };
		}
	}
	return null;
}, of = (e, t) => t.npmRegistryServer ? { [`@${e}:registry`]: rf(t.npmRegistryServer, process.env) } : null;
async function sf(e, r = n.readdir) {
	if (e.global) return;
	let i = (await Di(e, r))?.directoryPath;
	if (i) return t.join(i, ".yarnrc.yml");
}
var cf = (0, Kc.default)(async (e) => {
	let i = await sf(e), a = t.join(r.homedir(), ".yarnrc.yml"), o = typeof i == "string" && await Fn(i), s = await Fn(a), c = o ? await n.readFile(i, "utf-8") : "", l = s ? await n.readFile(a, "utf-8") : "", u = (0, Nd.parse)(c), d = (0, Nd.parse)(l), f = {
		...Dn(d?.npmScopes || {}, of),
		...Dn(u?.npmScopes || {}, of)
	};
	return f = {
		...f,
		...Dn(d?.npmScopes || {}, af(f)),
		...Dn(u?.npmScopes || {}, af(f))
	}, o && (Z(e, `\nUsing local yarn config at ${i}:`, "verbose"), Z(e, u, "verbose")), s && (Z(e, `\nUsing user yarn config at ${a}:`, "verbose"), Z(e, d, "verbose")), Object.keys(f) && (Z(e, "\nMerged yarn config in npm format:", "verbose"), Z(e, f, "verbose")), f;
}), lf = (0, Kc.default)(async (e) => {
	let i = await sf(e), a = t.join(r.homedir(), ".yarnrc.yml");
	for (let e of [i, a]) {
		if (!e || !await Fn(e)) continue;
		let t;
		try {
			t = await n.readFile(e, "utf-8");
		} catch {
			continue;
		}
		let r;
		try {
			r = (0, Nd.parse)(t) ?? {};
		} catch {
			continue;
		}
		let { npmMinimalAgeGate: i } = r, a;
		if (typeof i == "number") {
			if (isNaN(i) || i <= 0) continue;
			a = i;
		} else if (typeof i == "string") {
			let e = Xn(i);
			if (e === null || e <= 0) continue;
			a = e * 1440;
		} else continue;
		let o = r.npmPreapprovedPackages, s = Array.isArray(o) ? o.filter((e) => typeof e == "string") : [];
		return {
			npmMinimalAgeGate: a,
			npmPreapprovedPackages: s
		};
	}
	return null;
});
function uf(e) {
	return new Promise((t, n) => {
		let r = {}, i = nf.parse();
		i.on("data", (e) => {
			if (e.type === "info" && !e.data.match(/^Visit/)) {
				let [, t, n] = e.data.match(/"(@?.*)@(.*)"/) || [];
				r[t] = {
					version: n,
					from: t
				};
			} else e.type === "error" && n(Error(e.data));
		}), i.on("end", () => {
			t({ dependencies: r });
		}), i.on("error", n), i.write(e), i.end();
	});
}
function df(e) {
	return new Promise((t, n) => {
		let r = nf.parse(), i = !1;
		r.on("data", (e) => {
			i || (i = !0, t(JSON.stringify(e)));
		}), r.on("error", n), r.write(e), r.end();
	});
}
async function ff(e, t = {}, n = {}, r = {}) {
	let { stdout: i } = await Al("yarn", [
		...t.global ? ["global"] : [],
		...t.prefix ? [`--prefix=${t.prefix}`] : [],
		"--depth=0",
		"--json",
		"--no-progress",
		...Array.isArray(e) ? e : [e]
	], n, r);
	return i;
}
async function pf(e) {
	if (e.prefix) return e.prefix;
	let t;
	try {
		t = (await Al("yarn", ["global", "dir"])).stdout;
	} catch {
		t = null;
	}
	return e.global && t && t.match("Cellar") ? "/usr/local" : process.platform === "win32" && e.global && !process.env.prefix ? t ? t.trim() : `${process.env.LOCALAPPDATA}\\Yarn\\Data\\global` : null;
}
var mf = async (e = {}, t) => Dn((await uf(await ff("list", e, {}, {
	...e.cwd ? { cwd: e.cwd } : {},
	...t
}))).dependencies, (e, t) => ({ [e]: t.version || t.required?.version })), hf = (e) => async (t, n, r = {}) => e(t, n, r, await cf(r)), gf = hf(iu), _f = hf(eu), vf = hf(au), yf = hf(su), bf = hf(ou), xf = hf(cu), Sf = hf(lu), Cf = async (e, t, n) => {
	let { stdout: r } = await Al("yarn", ["--version"], { rejectOnError: !1 }, n);
	if (r.startsWith("1")) {
		let r = [
			"--json",
			"info",
			`${e}@${t}`,
			"peerDependencies"
		], { stdout: i } = await Al("yarn", r, { rejectOnError: !1 }, n);
		return i && ql(i, { command: r.join(" ") }).data || {};
	} else {
		let r = [
			"--json",
			"npm",
			"info",
			`${e}@${t}`,
			"--fields",
			"peerDependencies"
		], { stdout: i } = await Al("yarn", r, { rejectOnError: !1 }, n);
		if (!i) return {};
		try {
			return ql(i, { command: r.join(" ") }).peerDependencies || {};
		} catch (e) {
			try {
				let e = await df(i);
				if (e) return ql(e, { command: r.join(" ") }).peerDependencies || {};
			} catch {}
			throw e;
		}
	}
}, wf = async (e, t, n = {}) => nu(e, t, n, await cf(n)), Tf = async (e, t, n, r = {}) => Jl(e, t, n, r, await cf(r)), Ef = { getYarnMinimalAgeGate: lf };
//#endregion
//#region src/lib/programError.ts
function Df(e, t, { color: n = !0 } = {}) {
	if (e.cli) Z(e, n ? X.red(t) : t, null, "error"), process.exit(1);
	else throw Error(t);
}
//#endregion
//#region src/lib/loadPackageInfoFromFile.ts
var Of = async (e, t) => {
	let r, i;
	try {
		i = await n.readFile(t, "utf-8"), r = JSON.parse(i);
	} catch {
		Df(e, `Missing or invalid ${t}`);
	}
	return {
		name: void 0,
		pkg: r,
		pkgFile: i,
		filepath: t
	};
}, kf, Af = {
	lang: void 0,
	message: void 0,
	abortEarly: void 0,
	abortPipeEarly: void 0
};
/* @__NO_SIDE_EFFECTS__ */
function jf(e) {
	return !e && !kf ? Af : {
		lang: e?.lang ?? kf?.lang,
		message: e?.message,
		abortEarly: e?.abortEarly ?? kf?.abortEarly,
		abortPipeEarly: e?.abortPipeEarly ?? kf?.abortPipeEarly
	};
}
var Mf;
/* @__NO_SIDE_EFFECTS__ */
function Nf(e) {
	return Mf?.get(e);
}
var Pf;
/* @__NO_SIDE_EFFECTS__ */
function Ff(e) {
	return Pf?.get(e);
}
var If;
/* @__NO_SIDE_EFFECTS__ */
function Lf(e, t) {
	return If?.get(e)?.get(t);
}
/* @__NO_SIDE_EFFECTS__ */
function Rf(e) {
	let t = typeof e;
	return t === "string" ? `"${e}"` : t === "number" || t === "bigint" || t === "boolean" ? `${e}` : t === "object" || t === "function" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? "null" : t;
}
function zf(e, t, n, r, i) {
	let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */ Rf(a), c = {
		kind: e.kind,
		type: e.type,
		input: a,
		expected: o,
		received: s,
		message: `Invalid ${t}: ${o ? `Expected ${o} but r` : "R"}eceived ${s}`,
		requirement: e.requirement,
		path: i?.path,
		issues: i?.issues,
		lang: r.lang,
		abortEarly: r.abortEarly,
		abortPipeEarly: r.abortPipeEarly
	}, l = e.kind === "schema", u = i?.message ?? e.message ?? /* @__PURE__ */ Lf(e.reference, c.lang) ?? (l ? /* @__PURE__ */ Ff(c.lang) : null) ?? r.message ?? /* @__PURE__ */ Nf(c.lang);
	u !== void 0 && (c.message = typeof u == "function" ? u(c) : u), l && (n.typed = !1), n.issues ? n.issues.push(c) : n.issues = [c];
}
var Bf = /* @__PURE__ */ new WeakMap();
/* @__NO_SIDE_EFFECTS__ */
function Vf(e) {
	let t = Bf.get(e);
	return t || (t = {
		version: 1,
		vendor: "valibot",
		validate(t) {
			return e["~run"]({ value: t }, /* @__PURE__ */ jf());
		}
	}, Bf.set(e, t)), t;
}
/* @__NO_SIDE_EFFECTS__ */
function Hf(e, t) {
	return Object.prototype.hasOwnProperty.call(e, t) && t !== "__proto__" && t !== "prototype" && t !== "constructor";
}
/* @__NO_SIDE_EFFECTS__ */
function Uf(e, t) {
	let n = [...new Set(e)];
	return n.length > 1 ? `(${n.join(` ${t} `)})` : n[0] ?? "never";
}
var Wf = class extends Error {
	constructor(e) {
		super(e[0].message), this.name = "ValiError", this.issues = e;
	}
};
/* @__NO_SIDE_EFFECTS__ */
function Gf(e, t, n) {
	return typeof e.fallback == "function" ? e.fallback(t, n) : e.fallback;
}
/* @__NO_SIDE_EFFECTS__ */
function Kf(e, t) {
	return {
		...e,
		fallback: t,
		get "~standard"() {
			return /* @__PURE__ */ Vf(this);
		},
		"~run"(t, n) {
			let r = e["~run"](t, n);
			return r.issues ? {
				typed: !0,
				value: /* @__PURE__ */ Gf(this, r, n)
			} : r;
		}
	};
}
/* @__NO_SIDE_EFFECTS__ */
function qf(e, t, n) {
	return typeof e.default == "function" ? e.default(t, n) : e.default;
}
/* @__NO_SIDE_EFFECTS__ */
function Jf(e, t) {
	return {
		kind: "schema",
		type: "array",
		reference: Jf,
		expects: "Array",
		async: !1,
		item: e,
		message: t,
		get "~standard"() {
			return /* @__PURE__ */ Vf(this);
		},
		"~run"(e, t) {
			let n = e.value;
			if (Array.isArray(n)) {
				e.typed = !0, e.value = [];
				for (let r = 0; r < n.length; r++) {
					let i = n[r], a = this.item["~run"]({ value: i }, t);
					if (a.issues) {
						let o = {
							type: "array",
							origin: "value",
							input: n,
							key: r,
							value: i
						};
						for (let t of a.issues) t.path ? t.path.unshift(o) : t.path = [o], e.issues?.push(t);
						if (e.issues ||= a.issues, t.abortEarly) {
							e.typed = !1;
							break;
						}
					}
					a.typed || (e.typed = !1), e.value.push(a.value);
				}
			} else zf(this, "type", e, t);
			return e;
		}
	};
}
/* @__NO_SIDE_EFFECTS__ */
function Yf(e, t) {
	return {
		kind: "schema",
		type: "loose_object",
		reference: Yf,
		expects: "Object",
		async: !1,
		entries: e,
		message: t,
		get "~standard"() {
			return /* @__PURE__ */ Vf(this);
		},
		"~run"(e, t) {
			let n = e.value;
			if (n && typeof n == "object") {
				e.typed = !0, e.value = {};
				for (let r in this.entries) {
					let i = this.entries[r];
					if (r in n || (i.type === "exact_optional" || i.type === "optional" || i.type === "nullish") && i.default !== void 0) {
						let a = r in n ? n[r] : /* @__PURE__ */ qf(i), o = i["~run"]({ value: a }, t);
						if (o.issues) {
							let i = {
								type: "object",
								origin: "value",
								input: n,
								key: r,
								value: a
							};
							for (let t of o.issues) t.path ? t.path.unshift(i) : t.path = [i], e.issues?.push(t);
							if (e.issues ||= o.issues, t.abortEarly) {
								e.typed = !1;
								break;
							}
						}
						o.typed || (e.typed = !1), e.value[r] = o.value;
					} else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ Gf(i);
					else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (zf(this, "key", e, t, {
						input: void 0,
						expected: `"${r}"`,
						path: [{
							type: "object",
							origin: "key",
							input: n,
							key: r,
							value: n[r]
						}]
					}), t.abortEarly)) break;
				}
				if (!e.issues || !t.abortEarly) for (let t in n) /* @__PURE__ */ Hf(n, t) && !(t in this.entries) && (e.value[t] = n[t]);
			} else zf(this, "type", e, t);
			return e;
		}
	};
}
/* @__NO_SIDE_EFFECTS__ */
function Xf(e, t) {
	return {
		kind: "schema",
		type: "object",
		reference: Xf,
		expects: "Object",
		async: !1,
		entries: e,
		message: t,
		get "~standard"() {
			return /* @__PURE__ */ Vf(this);
		},
		"~run"(e, t) {
			let n = e.value;
			if (n && typeof n == "object") {
				e.typed = !0, e.value = {};
				for (let r in this.entries) {
					let i = this.entries[r];
					if (r in n || (i.type === "exact_optional" || i.type === "optional" || i.type === "nullish") && i.default !== void 0) {
						let a = r in n ? n[r] : /* @__PURE__ */ qf(i), o = i["~run"]({ value: a }, t);
						if (o.issues) {
							let i = {
								type: "object",
								origin: "value",
								input: n,
								key: r,
								value: a
							};
							for (let t of o.issues) t.path ? t.path.unshift(i) : t.path = [i], e.issues?.push(t);
							if (e.issues ||= o.issues, t.abortEarly) {
								e.typed = !1;
								break;
							}
						}
						o.typed || (e.typed = !1), e.value[r] = o.value;
					} else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ Gf(i);
					else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (zf(this, "key", e, t, {
						input: void 0,
						expected: `"${r}"`,
						path: [{
							type: "object",
							origin: "key",
							input: n,
							key: r,
							value: n[r]
						}]
					}), t.abortEarly)) break;
				}
			} else zf(this, "type", e, t);
			return e;
		}
	};
}
/* @__NO_SIDE_EFFECTS__ */
function Zf(e, t) {
	return {
		kind: "schema",
		type: "optional",
		reference: Zf,
		expects: `(${e.expects} | undefined)`,
		async: !1,
		wrapped: e,
		default: t,
		get "~standard"() {
			return /* @__PURE__ */ Vf(this);
		},
		"~run"(e, t) {
			return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ qf(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
		}
	};
}
/* @__NO_SIDE_EFFECTS__ */
function Qf(e, t, n) {
	return {
		kind: "schema",
		type: "record",
		reference: Qf,
		expects: "Object",
		async: !1,
		key: e,
		value: t,
		message: n,
		get "~standard"() {
			return /* @__PURE__ */ Vf(this);
		},
		"~run"(e, t) {
			let n = e.value;
			if (n && typeof n == "object") {
				e.typed = !0, e.value = {};
				for (let r in n) if (/* @__PURE__ */ Hf(n, r)) {
					let i = n[r], a = this.key["~run"]({ value: r }, t);
					if (a.issues) {
						let o = {
							type: "object",
							origin: "key",
							input: n,
							key: r,
							value: i
						};
						for (let t of a.issues) t.path = [o], e.issues?.push(t);
						if (e.issues ||= a.issues, t.abortEarly) {
							e.typed = !1;
							break;
						}
					}
					let o = this.value["~run"]({ value: i }, t);
					if (o.issues) {
						let a = {
							type: "object",
							origin: "value",
							input: n,
							key: r,
							value: i
						};
						for (let t of o.issues) t.path ? t.path.unshift(a) : t.path = [a], e.issues?.push(t);
						if (e.issues ||= o.issues, t.abortEarly) {
							e.typed = !1;
							break;
						}
					}
					(!a.typed || !o.typed) && (e.typed = !1), a.typed && (e.value[a.value] = o.value);
				}
			} else zf(this, "type", e, t);
			return e;
		}
	};
}
/* @__NO_SIDE_EFFECTS__ */
function $f(e) {
	return {
		kind: "schema",
		type: "string",
		reference: $f,
		expects: "string",
		async: !1,
		message: e,
		get "~standard"() {
			return /* @__PURE__ */ Vf(this);
		},
		"~run"(e, t) {
			return typeof e.value == "string" ? e.typed = !0 : zf(this, "type", e, t), e;
		}
	};
}
/* @__NO_SIDE_EFFECTS__ */
function ep(e) {
	let t;
	if (e) for (let n of e) if (t) for (let e of n.issues) t.push(e);
	else t = n.issues;
	return t;
}
/* @__NO_SIDE_EFFECTS__ */
function tp(e, t) {
	return {
		kind: "schema",
		type: "union",
		reference: tp,
		expects: /* @__PURE__ */ Uf(e.map((e) => e.expects), "|"),
		async: !1,
		options: e,
		message: t,
		get "~standard"() {
			return /* @__PURE__ */ Vf(this);
		},
		"~run"(e, t) {
			let n, r, i;
			for (let a of this.options) {
				let o = a["~run"]({ value: e.value }, t);
				if (o.typed) if (o.issues) r ? r.push(o) : r = [o];
				else {
					n = o;
					break;
				}
				else i ? i.push(o) : i = [o];
			}
			if (n) return n;
			if (r) {
				if (r.length === 1) return r[0];
				zf(this, "type", e, t, { issues: /* @__PURE__ */ ep(r) }), e.typed = !0;
			} else if (i?.length === 1) return i[0];
			else zf(this, "type", e, t, { issues: /* @__PURE__ */ ep(i) });
			return e;
		}
	};
}
function np(e, t, n) {
	let r = e["~run"]({ value: t }, /* @__PURE__ */ jf(n));
	if (r.issues) throw new Wf(r.issues);
	return r.value;
}
//#endregion
//#region src/types/CatalogConfig.ts
var rp = {
	catalog: /* @__PURE__ */ Zf(/* @__PURE__ */ Qf(/* @__PURE__ */ $f(), /* @__PURE__ */ $f())),
	catalogs: /* @__PURE__ */ Kf(/* @__PURE__ */ Zf(/* @__PURE__ */ Qf(/* @__PURE__ */ $f(), /* @__PURE__ */ Qf(/* @__PURE__ */ $f(), /* @__PURE__ */ $f()))), void 0)
}, ip = /* @__PURE__ */ Xf({
	...rp,
	workspaces: /* @__PURE__ */ Kf(/* @__PURE__ */ Zf(/* @__PURE__ */ tp([/* @__PURE__ */ Jf(/* @__PURE__ */ $f()), /* @__PURE__ */ Yf(rp)])), void 0)
}), ap = (e) => np(ip, e), op = {
	dev: "devDependencies",
	peer: "peerDependencies",
	prod: "dependencies",
	optional: "optionalDependencies"
}, sp = (e) => (e ? typeof e == "string" ? e.split(",") : e : wi.dep.default).map((e) => op[e] || e);
//#endregion
//#region src/lib/upgradeJsonCatalogDependencies.ts
async function cp(e, t, r) {
	let i = await n.readFile(e, "utf-8");
	return Object.entries(r).filter(([e]) => t[e]).reduce((e, [n, r]) => {
		let i = t[n], a = `("${nr(n)}"\\s*:\\s*")(${nr(i)})(")`, o = new RegExp(a, "g");
		return e.replace(o, `$1${r}$3`);
	}, i);
}
//#endregion
//#region src/lib/upgradeYamlCatalogDependencies.ts
function lp(e, { options: t, filePath: n }) {
	let r = e instanceof Error ? e.message : String(e), i = `Invalid YAML syntax${n ? ` in ${n}` : ""}. Unable to read catalog dependencies.\n${r}`;
	throw t && Df(t, i), Error(i);
}
function up(e, t, { newName: n, newValue: r }) {
	let i = t.slice(0, -1), a = t.at(-1), o = e.getIn(i);
	if (!o || !(0, Nd.isCollection)(o)) return !1;
	let s = o.items.find((e) => (0, Nd.isPair)(e) && (0, Nd.isScalar)(e.key) && e.key.value === a);
	if (!s || !(0, Nd.isPair)(s)) return !1;
	if (n && Nd.CST.setScalarValue(s.srcToken.key, n), r) {
		if (!Nd.CST.isScalar(s.srcToken?.value)) return !1;
		Nd.CST.setScalarValue(s.srcToken.value, r);
	}
	return !0;
}
function dp({ fileContent: e, upgrade: t, options: n, filePath: r }) {
	let { path: i } = t;
	if (!(i.length > 1) && i[0] !== "catalog" && i[0] !== "catalogs") return null;
	let { newValue: a } = t, o, s;
	try {
		o = (0, Nd.parseDocument)(e, { keepSourceTokens: !0 });
	} catch (e) {
		lp(e, {
			options: n,
			filePath: r
		});
	}
	o.errors.length > 0 && lp(o.errors[0], {
		options: n,
		filePath: r
	});
	try {
		s = ap(o.toJSON());
	} catch {
		return null;
	}
	let c = s.workspaces && !Array.isArray(s.workspaces) ? s.workspaces : void 0;
	return (i[0] === "catalog" ? s.catalog?.[i[1]] : i[0] === "catalogs" ? s.catalogs?.[i[1]]?.[i[2]] : i[0] === "workspaces" && i[1] === "catalog" ? c?.catalog?.[i[2]] : i[0] === "workspaces" && i[1] === "catalogs" ? c?.catalogs?.[i[2]]?.[i[3]] : void 0) === a ? e : up(o, i, {
		newValue: a,
		newName: t.path.at(-1)
	}) ? Nd.CST.stringify(o.contents.srcToken) : null;
}
//#endregion
//#region src/lib/upgradePackageData.ts
async function fp(e, r, i, a, o) {
	if (o) {
		let s = t.basename(o), c = t.extname(o);
		if (o.includes("#catalog")) {
			let e = o.replace("#catalog", "");
			if (t.extname(e) === ".json") return cp(e, r, i);
		}
		if (s === "pnpm-workspace.yaml" || s === ".yarnrc.yml") {
			let e = await n.readFile(o, "utf-8"), t = ap((0, Nd.parseDocument)(e).toJSON()), r = [];
			if (t.catalogs) for (let [e, n] of Object.entries(t.catalogs)) for (let [t, a] of Object.entries(i)) n[t] && r.push({
				path: [
					"catalogs",
					e,
					t
				],
				newValue: a
			});
			if (t.catalog) for (let [e, n] of Object.entries(i)) t.catalog?.[e] && r.push({
				path: ["catalog", e],
				newValue: n
			});
			let s = t.workspaces;
			if (s && !Array.isArray(s)) {
				if (s.catalogs) for (let [e, t] of Object.entries(s.catalogs)) for (let [n, a] of Object.entries(i)) t[n] && r.push({
					path: [
						"workspaces",
						"catalogs",
						e,
						n
					],
					newValue: a
				});
				if (s.catalog) for (let [e, t] of Object.entries(i)) s.catalog?.[e] && r.push({
					path: [
						"workspaces",
						"catalog",
						e
					],
					newValue: t
				});
			}
			let c = e;
			for (let e of r) {
				let t = dp({
					fileContent: c,
					upgrade: e,
					options: a,
					filePath: o
				});
				t && (c = t);
			}
			return c;
		}
		if (c === ".json") {
			let t = JSON.parse(e), n = t.catalog || t.catalogs, a = t.workspaces && !Array.isArray(t.workspaces) && (t.workspaces.catalog || t.workspaces.catalogs);
			if (n || a) return cp(o, r, i);
		}
	}
	let s = [...sp(a.dep), "overrides"], c = RegExp(`"(${s.join("|")})"s*:[^}]*`, "g"), l = e.replace(c, (e) => Object.entries(i).reduce((e, [t]) => {
		let n = `"${nr(t)}"\\s*:\\s*("|{\\s*"."\\s*:\\s*")(${nr(r[t])})"`, a = new RegExp(n, "g");
		return e.replace(a, (e, n) => `"${t}${n ? `": ${n}` : ": "}${i[t]}"`);
	}, e));
	if (s.includes("packageManager")) {
		let t = JSON.parse(e);
		if (t.packageManager) {
			let [e] = t.packageManager.split("@");
			i[e] && (l = l.replace(/"packageManager"\s*:\s*".*?@[^"]*"/, `"packageManager": "${e}@${i[e]}"`));
		}
	}
	return l;
}
//#endregion
//#region src/lib/doctor.ts
var pp = (e, t, n, { spawnOptions: r, spawnPleaseOptions: i } = {}) => {
	n && console.log(X.blue([t.packageManager, ...e].join(" ")));
	let a = {
		cwd: t.cwd || process.cwd(),
		env: {
			...process.env,
			...t.packageManager === "pnpm" ? null : { CI: "1" },
			FORCE_COLOR: "1",
			...r?.env
		},
		...r
	}, o = {
		...t.global ? { global: !0 } : null,
		...t.prefix ? { prefix: t.prefix } : null
	};
	return (t.packageManager === "pnpm" ? Xd : t.packageManager === "yarn" ? ff : t.packageManager === "bun" ? du : Ql)(e, o, i, a);
}, mp = async (e) => {
	(e.packageData || e.packageFile) && (console.error("--packageData and --packageFile are not allowed with --doctor. You must execute \"ncu --doctor\" in a directory with a package file so it can install dependencies and test them."), process.exit(1));
	let t;
	try {
		t = await Of(e, "package.json");
	} catch {
		console.error("Missing or invalid package.json"), process.exit(1);
	}
	return !e.doctorTest && !t.pkg.scripts?.test && (console.error("No npm \"test\" script defined. You must define a \"test\" script in the \"scripts\" section of your package.json to use --doctor."), process.exit(1)), t;
}, hp = async (e, t) => {
	Mn();
	let r = t.packageManager === "yarn" ? "yarn.lock" : t.packageManager === "pnpm" ? "pnpm-lock.yaml" : t.packageManager === "bun" ? "bun.lock" : "package-lock.json", { pkg: i, pkgFile: a } = await mp(t), o = {
		...i.dependencies,
		...i.devDependencies,
		...i.optionalDependencies
	}, s = async () => {
		if (t.doctorInstall) {
			let [e, ...n] = t.doctorInstall.split(" ");
			console.log(X.blue(t.doctorInstall)), await (0, Gi.default)(e, n);
		} else await pp(["install"], { packageManager: t.packageManager }, !0);
	}, c = async () => {
		let e = {
			stderr: (e) => {
				console.error(X.red(e.toString()));
			},
			stdout: (e) => {
				process.stdout.write(e.toString());
			}
		};
		if (t.doctorTest) {
			let n = t.doctorTest.matchAll(/"(.+?)"|'(.+?)'|[^ ]+/g), r = [];
			for (let e of n) r = [...r, e[2] || e[1] || e[0]];
			let [i, ...a] = r;
			console.log(X.blue(t.doctorTest)), await (0, Gi.default)(i, a, e);
		} else await pp(["run", "test"], { packageManager: t.packageManager }, !0, { spawnPleaseOptions: e });
	};
	console.log("Running tests before upgrading"), await s();
	let l = "";
	try {
		l = await n.readFile(r, "utf-8");
	} catch {
		if (t.packageManager === "bun") {
			r = "bun.lockb";
			try {
				l = await n.readFile(r, "utf-8");
			} catch {}
		}
	}
	try {
		await c();
	} catch {
		console.error("Tests failed before we even got started!"), process.exit(1);
	}
	t.interactive || console.log("Upgrading all dependencies and re-running tests"), console.log(X.blue("ncu " + process.argv.slice(2).filter((e) => e !== "--doctor").join(" "))), process.env.NCU_DOCTOR = "1";
	let u = await e({
		...t,
		silent: !0,
		doctor: !1
	});
	if (Object.keys(u || {}).length === 0) {
		console.log("All dependencies are up-to-date " + X.green.bold(":)"));
		return;
	}
	let d = !1;
	try {
		await s(), d = !0, await c(), console.log(`${X.green("✓")} Tests pass`), await ni(t, {
			current: o,
			upgraded: u,
			total: Object.keys(u || {}).length
		}), console.log(`\n${t.interactive ? "Chosen" : "All"} dependencies upgraded and installed ${X.green(":)")}`);
	} catch {
		console.error(X.red(d ? "Tests failed" : "Install failed")), console.log("Identifying broken dependencies"), await n.writeFile("package.json", a), l ? await n.writeFile(r, l) : await n.rm(r, {
			recursive: !0,
			force: !0
		});
		let e = a;
		if (d) try {
			await s();
		} catch (e) {
			let n = (t.packageManager || "npm") + " install";
			throw Error(`Error: Doctor mode was about to test individual upgrades, but ${X.cyan(n)} failed after rolling back to your existing package and lock files. This is unexpected since the initial install before any upgrades succeeded. Either npm failed to revert a partial install, or failed anomalously on the second run. Please check your internet connection and retry. If doctor mode fails consistently, report a bug with your complete list of dependency versions at https://github.com/raineorshine/npm-check-updates/issues.`, { cause: e });
		}
		let f, p;
		for ([f, p] of Object.entries(u)) try {
			if (await pp([...t.packageManager === "yarn" || t.packageManager === "pnpm" || t.packageManager === "bun" ? ["add"] : ["install", "--no-save"], `${f}@${p}`], { packageManager: t.packageManager }, !0), i.scripts?.prepare) try {
				await pp(["run", "prepare"], { packageManager: t.packageManager }, !0);
			} catch (e) {
				throw console.error(X.red("Prepare script failed")), e;
			}
			await c(), console.log(`  ${X.green("✓")} ${f} ${o[f]} → ${p}`), e = await fp(e, { [f]: o[f] }, { [f]: p }, t), l = await n.readFile(r, "utf-8");
		} catch (i) {
			console.error(`  ${X.red("✗")} ${f} ${o[f]} → ${p}\n`), console.error(X.red(i)), await n.writeFile(r, l), (t.packageManager === "yarn" || t.packageManager === "pnpm" || t.packageManager === "bun") && await n.writeFile("package.json", e);
		}
		e !== a && (console.log("Saving partially upgraded package.json"), await n.writeFile("package.json", e)), await s();
	}
};
//#endregion
//#region src/lib/findPackage.ts
async function gp(e) {
	let r, i = null, a = e.packageFile || "package.json";
	async function o(r, i) {
		if (r != null) {
			let n = t.resolve(r);
			Z(e, `${e.upgrade ? "Upgrading" : "Checking"} ${n}`);
		} else Df(e, `${X.red(`No ${i}`)}\n\nPlease add a ${i} to the current directory, specify the ${X.cyan("--packageFile")} or ${X.cyan("--packageData")} options, or pipe a ${i} to stdin and specify ${X.cyan("--stdin")}.`, { color: !1 });
		try {
			return await n.readFile(r, "utf-8");
		} catch (t) {
			Df(e, t);
		}
	}
	if (Z(e, "Running in local mode", "verbose"), Z(e, "Finding package file data", "verbose"), e.packageData) i = null, r = Promise.resolve(e.packageData);
	else if (e.packageFile) i = e.packageFile, r = o(i, a);
	else if (e.stdin) {
		Z(e, "Waiting for package data on stdin", "verbose");
		let t = await g(process.stdin), n = t.trim().length > 0 ? t : null;
		i = n || !a ? null : await hl(a), r = n || o(i, a);
	} else i = a ? await hl(!e.packageFile && e.packageManager === "deno" ? ["deno.json", "deno.jsonc"] : a, { cwd: e.cwd || process.cwd() }) : null, r = o(i, a);
	return {
		pkgData: await r,
		pkgFile: i || null,
		pkgPath: a
	};
}
//#endregion
//#region node_modules/fast-glob/out/utils/array.js
var _p = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.splitWhen = e.flatten = void 0;
	function t(e) {
		return e.reduce((e, t) => [].concat(e, t), []);
	}
	e.flatten = t;
	function n(e, t) {
		let n = [[]], r = 0;
		for (let i of e) t(i) ? (r++, n[r] = []) : n[r].push(i);
		return n;
	}
	e.splitWhen = n;
})), vp = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.isEnoentCodeError = void 0;
	function t(e) {
		return e.code === "ENOENT";
	}
	e.isEnoentCodeError = t;
})), yp = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.createDirentFromStats = void 0;
	var t = class {
		constructor(e, t) {
			this.name = e, this.isBlockDevice = t.isBlockDevice.bind(t), this.isCharacterDevice = t.isCharacterDevice.bind(t), this.isDirectory = t.isDirectory.bind(t), this.isFIFO = t.isFIFO.bind(t), this.isFile = t.isFile.bind(t), this.isSocket = t.isSocket.bind(t), this.isSymbolicLink = t.isSymbolicLink.bind(t);
		}
	};
	function n(e, n) {
		return new t(e, n);
	}
	e.createDirentFromStats = n;
})), bp = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.convertPosixPathToPattern = e.convertWindowsPathToPattern = e.convertPathToPattern = e.escapePosixPath = e.escapeWindowsPath = e.escape = e.removeLeadingDotSegment = e.makeAbsolute = e.unixify = void 0;
	var t = k("os"), n = k("path"), r = t.platform() === "win32", i = 2, a = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g, o = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g, s = /^\\\\([.?])/, c = /\\(?![!()+@[\]{}])/g;
	function l(e) {
		return e.replace(/\\/g, "/");
	}
	e.unixify = l;
	function u(e, t) {
		return n.resolve(e, t);
	}
	e.makeAbsolute = u;
	function d(e) {
		if (e.charAt(0) === ".") {
			let t = e.charAt(1);
			if (t === "/" || t === "\\") return e.slice(i);
		}
		return e;
	}
	e.removeLeadingDotSegment = d, e.escape = r ? f : p;
	function f(e) {
		return e.replace(o, "\\$2");
	}
	e.escapeWindowsPath = f;
	function p(e) {
		return e.replace(a, "\\$2");
	}
	e.escapePosixPath = p, e.convertPathToPattern = r ? m : h;
	function m(e) {
		return f(e).replace(s, "//$1").replace(c, "/");
	}
	e.convertWindowsPathToPattern = m;
	function h(e) {
		return p(e);
	}
	e.convertPosixPathToPattern = h;
})), xp = /* @__PURE__ */ w(((e, t) => {
	t.exports = function(e) {
		if (typeof e != "string" || e === "") return !1;
		for (var t; t = /(\\).|([@?!+*]\(.*\))/g.exec(e);) {
			if (t[2]) return !0;
			e = e.slice(t.index + t[0].length);
		}
		return !1;
	};
})), Sp = /* @__PURE__ */ w(((e, t) => {
	var n = xp(), r = {
		"{": "}",
		"(": ")",
		"[": "]"
	}, i = function(e) {
		if (e[0] === "!") return !0;
		for (var t = 0, n = -2, i = -2, a = -2, o = -2, s = -2; t < e.length;) {
			if (e[t] === "*" || e[t + 1] === "?" && /[\].+)]/.test(e[t]) || i !== -1 && e[t] === "[" && e[t + 1] !== "]" && (i < t && (i = e.indexOf("]", t)), i > t && (s === -1 || s > i || (s = e.indexOf("\\", t), s === -1 || s > i))) || a !== -1 && e[t] === "{" && e[t + 1] !== "}" && (a = e.indexOf("}", t), a > t && (s = e.indexOf("\\", t), s === -1 || s > a)) || o !== -1 && e[t] === "(" && e[t + 1] === "?" && /[:!=]/.test(e[t + 2]) && e[t + 3] !== ")" && (o = e.indexOf(")", t), o > t && (s = e.indexOf("\\", t), s === -1 || s > o)) || n !== -1 && e[t] === "(" && e[t + 1] !== "|" && (n < t && (n = e.indexOf("|", t)), n !== -1 && e[n + 1] !== ")" && (o = e.indexOf(")", n), o > n && (s = e.indexOf("\\", n), s === -1 || s > o)))) return !0;
			if (e[t] === "\\") {
				var c = e[t + 1];
				t += 2;
				var l = r[c];
				if (l) {
					var u = e.indexOf(l, t);
					u !== -1 && (t = u + 1);
				}
				if (e[t] === "!") return !0;
			} else t++;
		}
		return !1;
	}, a = function(e) {
		if (e[0] === "!") return !0;
		for (var t = 0; t < e.length;) {
			if (/[*?{}()[\]]/.test(e[t])) return !0;
			if (e[t] === "\\") {
				var n = e[t + 1];
				t += 2;
				var i = r[n];
				if (i) {
					var a = e.indexOf(i, t);
					a !== -1 && (t = a + 1);
				}
				if (e[t] === "!") return !0;
			} else t++;
		}
		return !1;
	};
	t.exports = function(e, t) {
		if (typeof e != "string" || e === "") return !1;
		if (n(e)) return !0;
		var r = i;
		return t && t.strict === !1 && (r = a), r(e);
	};
})), Cp = /* @__PURE__ */ w(((e, t) => {
	var n = Sp(), r = k("path").posix.dirname, i = k("os").platform() === "win32", a = "/", o = /\\/g, s = /[\{\[].*[\}\]]$/, c = /(^|[^\\])([\{\[]|\([^\)]+$)/, l = /\\([\!\*\?\|\[\]\(\)\{\}])/g;
	t.exports = function(e, t) {
		Object.assign({ flipBackslashes: !0 }, t).flipBackslashes && i && e.indexOf(a) < 0 && (e = e.replace(o, a)), s.test(e) && (e += a), e += "a";
		do
			e = r(e);
		while (n(e) || c.test(e));
		return e.replace(l, "$1");
	};
})), wp = /* @__PURE__ */ w(((e) => {
	e.isInteger = (e) => typeof e == "number" ? Number.isInteger(e) : typeof e == "string" && e.trim() !== "" ? Number.isInteger(Number(e)) : !1, e.find = (e, t) => e.nodes.find((e) => e.type === t), e.exceedsLimit = (t, n, r = 1, i) => i === !1 || !e.isInteger(t) || !e.isInteger(n) ? !1 : (Number(n) - Number(t)) / Number(r) >= i, e.escapeNode = (e, t = 0, n) => {
		let r = e.nodes[t];
		r && (n && r.type === n || r.type === "open" || r.type === "close") && r.escaped !== !0 && (r.value = "\\" + r.value, r.escaped = !0);
	}, e.encloseBrace = (e) => e.type === "brace" ? e.commas >> 0 + e.ranges >> 0 ? !1 : (e.invalid = !0, !0) : !1, e.isInvalidBrace = (e) => e.type === "brace" ? e.invalid === !0 || e.dollar ? !0 : !(e.commas >> 0 + e.ranges >> 0) || e.open !== !0 || e.close !== !0 ? (e.invalid = !0, !0) : !1 : !1, e.isOpenOrClose = (e) => e.type === "open" || e.type === "close" ? !0 : e.open === !0 || e.close === !0, e.reduce = (e) => e.reduce((e, t) => (t.type === "text" && e.push(t.value), t.type === "range" && (t.type = "text"), e), []), e.flatten = (...e) => {
		let t = [], n = (e) => {
			for (let r = 0; r < e.length; r++) {
				let i = e[r];
				if (Array.isArray(i)) {
					n(i);
					continue;
				}
				i !== void 0 && t.push(i);
			}
			return t;
		};
		return n(e), t;
	};
})), Tp = /* @__PURE__ */ w(((e, t) => {
	var n = wp();
	t.exports = (e, t = {}) => {
		let r = (e, i = {}) => {
			let a = t.escapeInvalid && n.isInvalidBrace(i), o = e.invalid === !0 && t.escapeInvalid === !0, s = "";
			if (e.value) return (a || o) && n.isOpenOrClose(e) ? "\\" + e.value : e.value;
			if (e.value) return e.value;
			if (e.nodes) for (let t of e.nodes) s += r(t);
			return s;
		};
		return r(e);
	};
})), Ep = /* @__PURE__ */ w(((e, t) => {
	t.exports = function(e) {
		return typeof e == "number" ? e - e === 0 : typeof e == "string" && e.trim() !== "" ? Number.isFinite ? Number.isFinite(+e) : isFinite(+e) : !1;
	};
})), Dp = /* @__PURE__ */ w(((e, t) => {
	var n = Ep(), r = (e, t, a) => {
		if (n(e) === !1) throw TypeError("toRegexRange: expected the first argument to be a number");
		if (t === void 0 || e === t) return String(e);
		if (n(t) === !1) throw TypeError("toRegexRange: expected the second argument to be a number.");
		let o = {
			relaxZeros: !0,
			...a
		};
		typeof o.strictZeros == "boolean" && (o.relaxZeros = o.strictZeros === !1);
		let c = String(o.relaxZeros), l = String(o.shorthand), u = String(o.capture), d = String(o.wrap), f = e + ":" + t + "=" + c + l + u + d;
		if (r.cache.hasOwnProperty(f)) return r.cache[f].result;
		let p = Math.min(e, t), m = Math.max(e, t);
		if (Math.abs(p - m) === 1) {
			let n = e + "|" + t;
			return o.capture ? `(${n})` : o.wrap === !1 ? n : `(?:${n})`;
		}
		let h = g(e) || g(t), _ = {
			min: e,
			max: t,
			a: p,
			b: m
		}, v = [], y = [];
		return h && (_.isPadded = h, _.maxLen = String(_.max).length), p < 0 && (y = s(m < 0 ? Math.abs(m) : 1, Math.abs(p), _, o), p = _.a = 0), m >= 0 && (v = s(p, m, _, o)), _.negatives = y, _.positives = v, _.result = i(y, v, o), o.capture === !0 ? _.result = `(${_.result})` : o.wrap !== !1 && v.length + y.length > 1 && (_.result = `(?:${_.result})`), r.cache[f] = _, _.result;
	};
	function i(e, t, n) {
		let r = c(e, t, "-", !1, n) || [], i = c(t, e, "", !1, n) || [], a = c(e, t, "-?", !0, n) || [];
		return r.concat(a).concat(i).join("|");
	}
	function a(e, t) {
		let n = 1, r = 1, i = f(e, n), a = /* @__PURE__ */ new Set([t]);
		for (; e <= i && i <= t;) a.add(i), n += 1, i = f(e, n);
		for (i = p(t + 1, r) - 1; e < i && i <= t;) a.add(i), r += 1, i = p(t + 1, r) - 1;
		return a = [...a], a.sort(u), a;
	}
	function o(e, t, n) {
		if (e === t) return {
			pattern: e,
			count: [],
			digits: 0
		};
		let r = l(e, t), i = r.length, a = "", o = 0;
		for (let e = 0; e < i; e++) {
			let [t, i] = r[e];
			t === i ? a += t : t !== "0" || i !== "9" ? a += h(t, i, n) : o++;
		}
		return o && (a += n.shorthand === !0 ? "\\d" : "[0-9]"), {
			pattern: a,
			count: [o],
			digits: i
		};
	}
	function s(e, t, n, r) {
		let i = a(e, t), s = [], c = e, l;
		for (let e = 0; e < i.length; e++) {
			let t = i[e], a = o(String(c), String(t), r), u = "";
			if (!n.isPadded && l && l.pattern === a.pattern) {
				l.count.length > 1 && l.count.pop(), l.count.push(a.count[0]), l.string = l.pattern + m(l.count), c = t + 1;
				continue;
			}
			n.isPadded && (u = _(t, n, r)), a.string = u + a.pattern + m(a.count), s.push(a), c = t + 1, l = a;
		}
		return s;
	}
	function c(e, t, n, r, i) {
		let a = [];
		for (let i of e) {
			let { string: e } = i;
			!r && !d(t, "string", e) && a.push(n + e), r && d(t, "string", e) && a.push(n + e);
		}
		return a;
	}
	function l(e, t) {
		let n = [];
		for (let r = 0; r < e.length; r++) n.push([e[r], t[r]]);
		return n;
	}
	function u(e, t) {
		return e > t ? 1 : t > e ? -1 : 0;
	}
	function d(e, t, n) {
		return e.some((e) => e[t] === n);
	}
	function f(e, t) {
		return Number(String(e).slice(0, -t) + "9".repeat(t));
	}
	function p(e, t) {
		return e - e % 10 ** t;
	}
	function m(e) {
		let [t = 0, n = ""] = e;
		return n || t > 1 ? `{${t + (n ? "," + n : "")}}` : "";
	}
	function h(e, t, n) {
		return `[${e}${t - e === 1 ? "" : "-"}${t}]`;
	}
	function g(e) {
		return /^-?(0+)\d/.test(e);
	}
	function _(e, t, n) {
		if (!t.isPadded) return e;
		let r = Math.abs(t.maxLen - String(e).length), i = n.relaxZeros !== !1;
		switch (r) {
			case 0: return "";
			case 1: return i ? "0?" : "0";
			case 2: return i ? "0{0,2}" : "00";
			default: return i ? `0{0,${r}}` : `0{${r}}`;
		}
	}
	r.cache = {}, r.clearCache = () => r.cache = {}, t.exports = r;
})), Op = /* @__PURE__ */ w(((e, t) => {
	var n = k("util"), r = Dp(), i = (e) => typeof e == "object" && !!e && !Array.isArray(e), a = (e) => (t) => e === !0 ? Number(t) : String(t), o = (e) => typeof e == "number" || typeof e == "string" && e !== "", s = (e) => Number.isInteger(+e), c = (e) => {
		let t = `${e}`, n = -1;
		if (t[0] === "-" && (t = t.slice(1)), t === "0") return !1;
		for (; t[++n] === "0";);
		return n > 0;
	}, l = (e, t, n) => typeof e == "string" || typeof t == "string" ? !0 : n.stringify === !0, u = (e, t, n) => {
		if (t > 0) {
			let n = e[0] === "-" ? "-" : "";
			n && (e = e.slice(1)), e = n + e.padStart(n ? t - 1 : t, "0");
		}
		return n === !1 ? String(e) : e;
	}, d = (e, t) => {
		let n = e[0] === "-" ? "-" : "";
		for (n && (e = e.slice(1), t--); e.length < t;) e = "0" + e;
		return n ? "-" + e : e;
	}, f = (e, t, n) => {
		e.negatives.sort((e, t) => e < t ? -1 : +(e > t)), e.positives.sort((e, t) => e < t ? -1 : +(e > t));
		let r = t.capture ? "" : "?:", i = "", a = "", o;
		return e.positives.length && (i = e.positives.map((e) => d(String(e), n)).join("|")), e.negatives.length && (a = `-(${r}${e.negatives.map((e) => d(String(e), n)).join("|")})`), o = i && a ? `${i}|${a}` : i || a, t.wrap ? `(${r}${o})` : o;
	}, p = (e, t, n, i) => {
		if (n) return r(e, t, {
			wrap: !1,
			...i
		});
		let a = String.fromCharCode(e);
		return e === t ? a : `[${a}-${String.fromCharCode(t)}]`;
	}, m = (e, t, n) => {
		if (Array.isArray(e)) {
			let t = n.wrap === !0, r = n.capture ? "" : "?:";
			return t ? `(${r}${e.join("|")})` : e.join("|");
		}
		return r(e, t, n);
	}, h = (...e) => /* @__PURE__ */ RangeError("Invalid range arguments: " + n.inspect(...e)), g = (e, t, n) => {
		if (n.strictRanges === !0) throw h([e, t]);
		return [];
	}, _ = (e, t) => {
		if (t.strictRanges === !0) throw TypeError(`Expected step "${e}" to be a number`);
		return [];
	}, v = (e, t, n = 1, r = {}) => {
		let i = Number(e), o = Number(t);
		if (!Number.isInteger(i) || !Number.isInteger(o)) {
			if (r.strictRanges === !0) throw h([e, t]);
			return [];
		}
		i === 0 && (i = 0), o === 0 && (o = 0);
		let s = i > o, g = String(e), _ = String(t), v = String(n);
		n = Math.max(Math.abs(n), 1);
		let y = c(g) || c(_) || c(v), b = y ? Math.max(g.length, _.length, v.length) : 0, x = y === !1 && l(e, t, r) === !1, S = r.transform || a(x);
		if (r.toRegex && n === 1) return p(d(e, b), d(t, b), !0, r);
		let C = {
			negatives: [],
			positives: []
		}, w = (e) => C[e < 0 ? "negatives" : "positives"].push(Math.abs(e)), T = [], E = 0;
		for (; s ? i >= o : i <= o;) r.toRegex === !0 && n > 1 ? w(i) : T.push(u(S(i, E), b, x)), i = s ? i - n : i + n, E++;
		return r.toRegex === !0 ? n > 1 ? f(C, r, b) : m(T, null, {
			wrap: !1,
			...r
		}) : T;
	}, y = (e, t, n = 1, r = {}) => {
		if (!s(e) && e.length > 1 || !s(t) && t.length > 1) return g(e, t, r);
		let i = r.transform || ((e) => String.fromCharCode(e)), a = `${e}`.charCodeAt(0), o = `${t}`.charCodeAt(0), c = a > o, l = Math.min(a, o), u = Math.max(a, o);
		if (r.toRegex && n === 1) return p(l, u, !1, r);
		let d = [], f = 0;
		for (; c ? a >= o : a <= o;) d.push(i(a, f)), a = c ? a - n : a + n, f++;
		return r.toRegex === !0 ? m(d, null, {
			wrap: !1,
			options: r
		}) : d;
	}, b = (e, t, n, r = {}) => {
		if (t == null && o(e)) return [e];
		if (!o(e) || !o(t)) return g(e, t, r);
		if (typeof n == "function") return b(e, t, 1, { transform: n });
		if (i(n)) return b(e, t, 0, n);
		let a = { ...r };
		return a.capture === !0 && (a.wrap = !0), n = n || a.step || 1, s(n) ? s(e) && s(t) ? v(e, t, n, a) : y(e, t, Math.max(Math.abs(n), 1), a) : n != null && !i(n) ? _(n, a) : b(e, t, 1, n);
	};
	t.exports = b;
})), kp = /* @__PURE__ */ w(((e, t) => {
	var n = Op(), r = wp();
	t.exports = (e, t = {}) => {
		let i = (e, a = {}) => {
			let o = r.isInvalidBrace(a), s = e.invalid === !0 && t.escapeInvalid === !0, c = o === !0 || s === !0, l = t.escapeInvalid === !0 ? "\\" : "", u = "";
			if (e.isOpen === !0) return l + e.value;
			if (e.isClose === !0) return console.log("node.isClose", l, e.value), l + e.value;
			if (e.type === "open") return c ? l + e.value : "(";
			if (e.type === "close") return c ? l + e.value : ")";
			if (e.type === "comma") return e.prev.type === "comma" ? "" : c ? e.value : "|";
			if (e.value) return e.value;
			if (e.nodes && e.ranges > 0) {
				let i = r.reduce(e.nodes), a = n(...i, {
					...t,
					wrap: !1,
					toRegex: !0,
					strictZeros: !0
				});
				if (a.length !== 0) return i.length > 1 && a.length > 1 ? `(${a})` : a;
			}
			if (e.nodes) for (let t of e.nodes) u += i(t, e);
			return u;
		};
		return i(e);
	};
})), Ap = /* @__PURE__ */ w(((e, t) => {
	var n = Op(), r = Tp(), i = wp(), a = (e = "", t = "", n = !1) => {
		let r = [];
		if (e = [].concat(e), t = [].concat(t), !t.length) return e;
		if (!e.length) return n ? i.flatten(t).map((e) => `{${e}}`) : t;
		for (let i of e) if (Array.isArray(i)) for (let e of i) r.push(a(e, t, n));
		else for (let e of t) n === !0 && typeof e == "string" && (e = `{${e}}`), r.push(Array.isArray(e) ? a(i, e, n) : i + e);
		return i.flatten(r);
	};
	t.exports = (e, t = {}) => {
		let o = t.rangeLimit === void 0 ? 1e3 : t.rangeLimit, s = (e, c = {}) => {
			e.queue = [];
			let l = c, u = c.queue;
			for (; l.type !== "brace" && l.type !== "root" && l.parent;) l = l.parent, u = l.queue;
			if (e.invalid || e.dollar) {
				u.push(a(u.pop(), r(e, t)));
				return;
			}
			if (e.type === "brace" && e.invalid !== !0 && e.nodes.length === 2) {
				u.push(a(u.pop(), ["{}"]));
				return;
			}
			if (e.nodes && e.ranges > 0) {
				let s = i.reduce(e.nodes);
				if (i.exceedsLimit(...s, t.step, o)) throw RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
				let c = n(...s, t);
				c.length === 0 && (c = r(e, t)), u.push(a(u.pop(), c)), e.nodes = [];
				return;
			}
			let d = i.encloseBrace(e), f = e.queue, p = e;
			for (; p.type !== "brace" && p.type !== "root" && p.parent;) p = p.parent, f = p.queue;
			for (let t = 0; t < e.nodes.length; t++) {
				let n = e.nodes[t];
				if (n.type === "comma" && e.type === "brace") {
					t === 1 && f.push(""), f.push("");
					continue;
				}
				if (n.type === "close") {
					u.push(a(u.pop(), f, d));
					continue;
				}
				if (n.value && n.type !== "open") {
					f.push(a(f.pop(), n.value));
					continue;
				}
				n.nodes && s(n, e);
			}
			return f;
		};
		return i.flatten(s(e));
	};
})), jp = /* @__PURE__ */ w(((e, t) => {
	t.exports = {
		MAX_LENGTH: 1e4,
		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: "﻿"
	};
})), Mp = /* @__PURE__ */ w(((e, t) => {
	var n = Tp(), { MAX_LENGTH: r, CHAR_BACKSLASH: i, CHAR_BACKTICK: a, CHAR_COMMA: o, CHAR_DOT: s, CHAR_LEFT_PARENTHESES: c, CHAR_RIGHT_PARENTHESES: l, CHAR_LEFT_CURLY_BRACE: u, CHAR_RIGHT_CURLY_BRACE: d, CHAR_LEFT_SQUARE_BRACKET: f, CHAR_RIGHT_SQUARE_BRACKET: p, CHAR_DOUBLE_QUOTE: m, CHAR_SINGLE_QUOTE: h, CHAR_NO_BREAK_SPACE: g, CHAR_ZERO_WIDTH_NOBREAK_SPACE: _ } = jp();
	t.exports = (e, t = {}) => {
		if (typeof e != "string") throw TypeError("Expected a string");
		let v = t || {}, y = typeof v.maxLength == "number" ? Math.min(r, v.maxLength) : r;
		if (e.length > y) throw SyntaxError(`Input length (${e.length}), exceeds max characters (${y})`);
		let b = {
			type: "root",
			input: e,
			nodes: []
		}, x = [b], S = b, C = b, w = 0, T = e.length, E = 0, D = 0, O, k = () => e[E++], A = (e) => {
			if (e.type === "text" && C.type === "dot" && (C.type = "text"), C && C.type === "text" && e.type === "text") {
				C.value += e.value;
				return;
			}
			return S.nodes.push(e), e.parent = S, e.prev = C, C = e, e;
		};
		for (A({ type: "bos" }); E < T;) if (S = x[x.length - 1], O = k(), !(O === _ || O === g)) {
			if (O === i) {
				A({
					type: "text",
					value: (t.keepEscaping ? O : "") + k()
				});
				continue;
			}
			if (O === p) {
				A({
					type: "text",
					value: "\\" + O
				});
				continue;
			}
			if (O === f) {
				w++;
				let e;
				for (; E < T && (e = k());) {
					if (O += e, e === f) {
						w++;
						continue;
					}
					if (e === i) {
						O += k();
						continue;
					}
					if (e === p && (w--, w === 0)) break;
				}
				A({
					type: "text",
					value: O
				});
				continue;
			}
			if (O === c) {
				S = A({
					type: "paren",
					nodes: []
				}), x.push(S), A({
					type: "text",
					value: O
				});
				continue;
			}
			if (O === l) {
				if (S.type !== "paren") {
					A({
						type: "text",
						value: O
					});
					continue;
				}
				S = x.pop(), A({
					type: "text",
					value: O
				}), S = x[x.length - 1];
				continue;
			}
			if (O === m || O === h || O === a) {
				let e = O, n;
				for (t.keepQuotes !== !0 && (O = ""); E < T && (n = k());) {
					if (n === i) {
						O += n + k();
						continue;
					}
					if (n === e) {
						t.keepQuotes === !0 && (O += n);
						break;
					}
					O += n;
				}
				A({
					type: "text",
					value: O
				});
				continue;
			}
			if (O === u) {
				D++, S = A({
					type: "brace",
					open: !0,
					close: !1,
					dollar: C.value && C.value.slice(-1) === "$" || S.dollar === !0,
					depth: D,
					commas: 0,
					ranges: 0,
					nodes: []
				}), x.push(S), A({
					type: "open",
					value: O
				});
				continue;
			}
			if (O === d) {
				if (S.type !== "brace") {
					A({
						type: "text",
						value: O
					});
					continue;
				}
				S = x.pop(), S.close = !0, A({
					type: "close",
					value: O
				}), D--, S = x[x.length - 1];
				continue;
			}
			if (O === o && D > 0) {
				if (S.ranges > 0) {
					S.ranges = 0;
					let e = S.nodes.shift();
					S.nodes = [e, {
						type: "text",
						value: n(S)
					}];
				}
				A({
					type: "comma",
					value: O
				}), S.commas++;
				continue;
			}
			if (O === s && D > 0 && S.commas === 0) {
				let e = S.nodes;
				if (D === 0 || e.length === 0) {
					A({
						type: "text",
						value: O
					});
					continue;
				}
				if (C.type === "dot") {
					if (S.range = [], C.value += O, C.type = "range", S.nodes.length !== 3 && S.nodes.length !== 5) {
						S.invalid = !0, S.ranges = 0, C.type = "text";
						continue;
					}
					S.ranges++, S.args = [];
					continue;
				}
				if (C.type === "range") {
					e.pop();
					let t = e[e.length - 1];
					t.value += C.value + O, C = t, S.ranges--;
					continue;
				}
				A({
					type: "dot",
					value: O
				});
				continue;
			}
			A({
				type: "text",
				value: O
			});
		}
		do
			if (S = x.pop(), S.type !== "root") {
				S.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 e = x[x.length - 1], t = e.nodes.indexOf(S);
				e.nodes.splice(t, 1, ...S.nodes);
			}
		while (x.length > 0);
		return A({ type: "eos" }), b;
	};
})), Np = /* @__PURE__ */ w(((e, t) => {
	var n = Tp(), r = kp(), i = Ap(), a = Mp(), o = (e, t = {}) => {
		let n = [];
		if (Array.isArray(e)) for (let r of e) {
			let e = o.create(r, t);
			Array.isArray(e) ? n.push(...e) : n.push(e);
		}
		else n = [].concat(o.create(e, t));
		return t && t.expand === !0 && t.nodupes === !0 && (n = [...new Set(n)]), n;
	};
	o.parse = (e, t = {}) => a(e, t), o.stringify = (e, t = {}) => n(typeof e == "string" ? o.parse(e, t) : e, t), o.compile = (e, t = {}) => (typeof e == "string" && (e = o.parse(e, t)), r(e, t)), o.expand = (e, t = {}) => {
		typeof e == "string" && (e = o.parse(e, t));
		let n = i(e, t);
		return t.noempty === !0 && (n = n.filter(Boolean)), t.nodupes === !0 && (n = [...new Set(n)]), n;
	}, o.create = (e, t = {}) => e === "" || e.length < 3 ? [e] : t.expand === !0 ? o.expand(e, t) : o.compile(e, t), t.exports = o;
})), Pp = /* @__PURE__ */ w(((e, t) => {
	var n = k("path"), r = "\\\\/", i = `[^${r}]`, a = 0, o = "\\.", s = "\\+", c = "\\?", l = "\\/", u = "(?=.)", d = "[^/]", f = `(?:${l}|$)`, p = `(?:^|${l})`, m = `${o}{1,2}${f}`, h = {
		DOT_LITERAL: o,
		PLUS_LITERAL: s,
		QMARK_LITERAL: c,
		SLASH_LITERAL: l,
		ONE_CHAR: u,
		QMARK: d,
		END_ANCHOR: f,
		DOTS_SLASH: m,
		NO_DOT: `(?!${o})`,
		NO_DOTS: `(?!${p}${m})`,
		NO_DOT_SLASH: `(?!${o}{0,1}${f})`,
		NO_DOTS_SLASH: `(?!${m})`,
		QMARK_NO_DOT: `[^.${l}]`,
		STAR: `${d}*?`,
		START_ANCHOR: p
	}, g = {
		...h,
		SLASH_LITERAL: `[${r}]`,
		QMARK: i,
		STAR: `${i}*?`,
		DOTS_SLASH: `${o}{1,2}(?:[${r}]|$)`,
		NO_DOT: `(?!${o})`,
		NO_DOTS: `(?!(?:^|[${r}])${o}{1,2}(?:[${r}]|$))`,
		NO_DOT_SLASH: `(?!${o}{0,1}(?:[${r}]|$))`,
		NO_DOTS_SLASH: `(?!${o}{1,2}(?:[${r}]|$))`,
		QMARK_NO_DOT: `[^.${r}]`,
		START_ANCHOR: `(?:^|[${r}])`,
		END_ANCHOR: `(?:[${r}]|$)`
	};
	t.exports = {
		DEFAULT_MAX_EXTGLOB_RECURSION: a,
		MAX_LENGTH: 1024 * 64,
		POSIX_REGEX_SOURCE: {
			__proto__: null,
			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"
		},
		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: {
			__proto__: null,
			"***": "*",
			"**/**": "**",
			"**/**/**": "**"
		},
		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: n.sep,
		extglobChars(e) {
			return {
				"!": {
					type: "negate",
					open: "(?:(?!(?:",
					close: `))${e.STAR})`
				},
				"?": {
					type: "qmark",
					open: "(?:",
					close: ")?"
				},
				"+": {
					type: "plus",
					open: "(?:",
					close: ")+"
				},
				"*": {
					type: "star",
					open: "(?:",
					close: ")*"
				},
				"@": {
					type: "at",
					open: "(?:",
					close: ")"
				}
			};
		},
		globChars(e) {
			return e === !0 ? g : h;
		}
	};
})), Fp = /* @__PURE__ */ w(((e) => {
	var t = k("path"), n = process.platform === "win32", { REGEX_BACKSLASH: r, REGEX_REMOVE_BACKSLASH: i, REGEX_SPECIAL_CHARS: a, REGEX_SPECIAL_CHARS_GLOBAL: o } = Pp();
	e.isObject = (e) => typeof e == "object" && !!e && !Array.isArray(e), e.hasRegexChars = (e) => a.test(e), e.isRegexChar = (t) => t.length === 1 && e.hasRegexChars(t), e.escapeRegex = (e) => e.replace(o, "\\$1"), e.toPosixSlashes = (e) => e.replace(r, "/"), e.removeBackslashes = (e) => e.replace(i, (e) => e === "\\" ? "" : e), e.supportsLookbehinds = () => {
		let e = process.version.slice(1).split(".").map(Number);
		return e.length === 3 && e[0] >= 9 || e[0] === 8 && e[1] >= 10;
	}, e.isWindows = (e) => e && typeof e.windows == "boolean" ? e.windows : n === !0 || t.sep === "\\", e.escapeLast = (t, n, r) => {
		let i = t.lastIndexOf(n, r);
		return i === -1 ? t : t[i - 1] === "\\" ? e.escapeLast(t, n, i - 1) : `${t.slice(0, i)}\\${t.slice(i)}`;
	}, e.removePrefix = (e, t = {}) => {
		let n = e;
		return n.startsWith("./") && (n = n.slice(2), t.prefix = "./"), n;
	}, e.wrapOutput = (e, t = {}, n = {}) => {
		let r = `${n.contains ? "" : "^"}(?:${e})${n.contains ? "" : "$"}`;
		return t.negated === !0 && (r = `(?:^(?!${r}).*$)`), r;
	};
})), Ip = /* @__PURE__ */ w(((e, t) => {
	var n = Fp(), { CHAR_ASTERISK: r, CHAR_AT: i, CHAR_BACKWARD_SLASH: a, CHAR_COMMA: o, CHAR_DOT: s, CHAR_EXCLAMATION_MARK: c, CHAR_FORWARD_SLASH: l, CHAR_LEFT_CURLY_BRACE: u, CHAR_LEFT_PARENTHESES: d, CHAR_LEFT_SQUARE_BRACKET: f, CHAR_PLUS: p, CHAR_QUESTION_MARK: m, CHAR_RIGHT_CURLY_BRACE: h, CHAR_RIGHT_PARENTHESES: g, CHAR_RIGHT_SQUARE_BRACKET: _ } = Pp(), v = (e) => e === l || e === a, y = (e) => {
		e.isPrefix !== !0 && (e.depth = e.isGlobstar ? Infinity : 1);
	};
	t.exports = (e, t) => {
		let b = t || {}, x = e.length - 1, S = b.parts === !0 || b.scanToEnd === !0, C = [], w = [], T = [], E = e, D = -1, O = 0, k = 0, A = !1, j = !1, M = !1, N = !1, P = !1, F = !1, I = !1, L = !1, R = !1, z = !1, B = 0, V, H, U = {
			value: "",
			depth: 0,
			isGlob: !1
		}, ee = () => D >= x, W = () => E.charCodeAt(D + 1), G = () => (V = H, E.charCodeAt(++D));
		for (; D < x;) {
			H = G();
			let e;
			if (H === a) {
				I = U.backslashes = !0, H = G(), H === u && (F = !0);
				continue;
			}
			if (F === !0 || H === u) {
				for (B++; ee() !== !0 && (H = G());) {
					if (H === a) {
						I = U.backslashes = !0, G();
						continue;
					}
					if (H === u) {
						B++;
						continue;
					}
					if (F !== !0 && H === s && (H = G()) === s) {
						if (A = U.isBrace = !0, M = U.isGlob = !0, z = !0, S === !0) continue;
						break;
					}
					if (F !== !0 && H === o) {
						if (A = U.isBrace = !0, M = U.isGlob = !0, z = !0, S === !0) continue;
						break;
					}
					if (H === h && (B--, B === 0)) {
						F = !1, A = U.isBrace = !0, z = !0;
						break;
					}
				}
				if (S === !0) continue;
				break;
			}
			if (H === l) {
				if (C.push(D), w.push(U), U = {
					value: "",
					depth: 0,
					isGlob: !1
				}, z === !0) continue;
				if (V === s && D === O + 1) {
					O += 2;
					continue;
				}
				k = D + 1;
				continue;
			}
			if (b.noext !== !0 && (H === p || H === i || H === r || H === m || H === c) && W() === d) {
				if (M = U.isGlob = !0, N = U.isExtglob = !0, z = !0, H === c && D === O && (R = !0), S === !0) {
					for (; ee() !== !0 && (H = G());) {
						if (H === a) {
							I = U.backslashes = !0, H = G();
							continue;
						}
						if (H === g) {
							M = U.isGlob = !0, z = !0;
							break;
						}
					}
					continue;
				}
				break;
			}
			if (H === r) {
				if (V === r && (P = U.isGlobstar = !0), M = U.isGlob = !0, z = !0, S === !0) continue;
				break;
			}
			if (H === m) {
				if (M = U.isGlob = !0, z = !0, S === !0) continue;
				break;
			}
			if (H === f) {
				for (; ee() !== !0 && (e = G());) {
					if (e === a) {
						I = U.backslashes = !0, G();
						continue;
					}
					if (e === _) {
						j = U.isBracket = !0, M = U.isGlob = !0, z = !0;
						break;
					}
				}
				if (S === !0) continue;
				break;
			}
			if (b.nonegate !== !0 && H === c && D === O) {
				L = U.negated = !0, O++;
				continue;
			}
			if (b.noparen !== !0 && H === d) {
				if (M = U.isGlob = !0, S === !0) {
					for (; ee() !== !0 && (H = G());) {
						if (H === d) {
							I = U.backslashes = !0, H = G();
							continue;
						}
						if (H === g) {
							z = !0;
							break;
						}
					}
					continue;
				}
				break;
			}
			if (M === !0) {
				if (z = !0, S === !0) continue;
				break;
			}
		}
		b.noext === !0 && (N = !1, M = !1);
		let K = E, te = "", ne = "";
		O > 0 && (te = E.slice(0, O), E = E.slice(O), k -= O), K && M === !0 && k > 0 ? (K = E.slice(0, k), ne = E.slice(k)) : M === !0 ? (K = "", ne = E) : K = E, K && K !== "" && K !== "/" && K !== E && v(K.charCodeAt(K.length - 1)) && (K = K.slice(0, -1)), b.unescape === !0 && (ne &&= n.removeBackslashes(ne), K && I === !0 && (K = n.removeBackslashes(K)));
		let re = {
			prefix: te,
			input: e,
			start: O,
			base: K,
			glob: ne,
			isBrace: A,
			isBracket: j,
			isGlob: M,
			isExtglob: N,
			isGlobstar: P,
			negated: L,
			negatedExtglob: R
		};
		if (b.tokens === !0 && (re.maxDepth = 0, v(H) || w.push(U), re.tokens = w), b.parts === !0 || b.tokens === !0) {
			let t;
			for (let n = 0; n < C.length; n++) {
				let r = t ? t + 1 : O, i = C[n], a = e.slice(r, i);
				b.tokens && (n === 0 && O !== 0 ? (w[n].isPrefix = !0, w[n].value = te) : w[n].value = a, y(w[n]), re.maxDepth += w[n].depth), (n !== 0 || a !== "") && T.push(a), t = i;
			}
			if (t && t + 1 < e.length) {
				let n = e.slice(t + 1);
				T.push(n), b.tokens && (w[w.length - 1].value = n, y(w[w.length - 1]), re.maxDepth += w[w.length - 1].depth);
			}
			re.slashes = C, re.parts = T;
		}
		return re;
	};
})), Lp = /* @__PURE__ */ w(((e, t) => {
	var n = Pp(), r = Fp(), { MAX_LENGTH: i, POSIX_REGEX_SOURCE: a, REGEX_NON_SPECIAL_CHARS: o, REGEX_SPECIAL_CHARS_BACKREF: s, REPLACEMENTS: c } = n, l = (e, t) => {
		if (typeof t.expandRange == "function") return t.expandRange(...e, t);
		e.sort();
		let n = `[${e.join("-")}]`;
		try {
			new RegExp(n);
		} catch {
			return e.map((e) => r.escapeRegex(e)).join("..");
		}
		return n;
	}, u = (e, t) => `Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`, d = (e) => {
		let t = [], n = 0, r = 0, i = 0, a = "", o = !1;
		for (let s of e) {
			if (o === !0) {
				a += s, o = !1;
				continue;
			}
			if (s === "\\") {
				a += s, o = !0;
				continue;
			}
			if (s === "\"") {
				i = i === 1 ? 0 : 1, a += s;
				continue;
			}
			if (i === 0) {
				if (s === "[") n++;
				else if (s === "]" && n > 0) n--;
				else if (n === 0) {
					if (s === "(") r++;
					else if (s === ")" && r > 0) r--;
					else if (s === "|" && r === 0) {
						t.push(a), a = "";
						continue;
					}
				}
			}
			a += s;
		}
		return t.push(a), t;
	}, f = (e) => {
		let t = !1;
		for (let n of e) {
			if (t === !0) {
				t = !1;
				continue;
			}
			if (n === "\\") {
				t = !0;
				continue;
			}
			if (/[?*+@!()[\]{}]/.test(n)) return !1;
		}
		return !0;
	}, p = (e) => {
		let t = e.trim(), n = !0;
		for (; n === !0;) n = !1, /^@\([^\\()[\]{}|]+\)$/.test(t) && (t = t.slice(2, -1), n = !0);
		if (f(t)) return t.replace(/\\(.)/g, "$1");
	}, m = (e) => {
		let t = e.map(p).filter(Boolean);
		for (let e = 0; e < t.length; e++) for (let n = e + 1; n < t.length; n++) {
			let r = t[e], i = t[n], a = r[0];
			if (!(!a || r !== a.repeat(r.length) || i !== a.repeat(i.length)) && (r === i || r.startsWith(i) || i.startsWith(r))) return !0;
		}
		return !1;
	}, h = (e, t = !0) => {
		if (e[0] !== "+" && e[0] !== "*" || e[1] !== "(") return;
		let n = 0, r = 0, i = 0, a = !1;
		for (let o = 1; o < e.length; o++) {
			let s = e[o];
			if (a === !0) {
				a = !1;
				continue;
			}
			if (s === "\\") {
				a = !0;
				continue;
			}
			if (s === "\"") {
				i = i === 1 ? 0 : 1;
				continue;
			}
			if (i !== 1) {
				if (s === "[") {
					n++;
					continue;
				}
				if (s === "]" && n > 0) {
					n--;
					continue;
				}
				if (!(n > 0)) {
					if (s === "(") {
						r++;
						continue;
					}
					if (s === ")" && (r--, r === 0)) return t === !0 && o !== e.length - 1 ? void 0 : {
						type: e[0],
						body: e.slice(2, o),
						end: o
					};
				}
			}
		}
	}, g = (e) => {
		let t = 0, n = [];
		for (; t < e.length;) {
			let r = h(e.slice(t), !1);
			if (!r || r.type !== "*") return;
			let i = d(r.body).map((e) => e.trim());
			if (i.length !== 1) return;
			let a = p(i[0]);
			if (!a || a.length !== 1) return;
			n.push(a), t += r.end + 1;
		}
		if (!(n.length < 1)) return `${n.length === 1 ? r.escapeRegex(n[0]) : `[${n.map((e) => r.escapeRegex(e)).join("")}]`}*`;
	}, _ = (e) => {
		let t = 0, n = e.trim(), r = h(n);
		for (; r;) t++, n = r.body.trim(), r = h(n);
		return t;
	}, v = (e, t) => {
		if (t.maxExtglobRecursion === !1) return { risky: !1 };
		let r = typeof t.maxExtglobRecursion == "number" ? t.maxExtglobRecursion : n.DEFAULT_MAX_EXTGLOB_RECURSION, i = d(e).map((e) => e.trim());
		if (i.length > 1 && (i.some((e) => e === "") || i.some((e) => /^[*?]+$/.test(e)) || m(i))) return { risky: !0 };
		for (let e of i) {
			let t = g(e);
			if (t) return {
				risky: !0,
				safeOutput: t
			};
			if (_(e) > r) return { risky: !0 };
		}
		return { risky: !1 };
	}, y = (e, t) => {
		if (typeof e != "string") throw TypeError("Expected a string");
		e = c[e] || e;
		let d = { ...t }, f = typeof d.maxLength == "number" ? Math.min(i, d.maxLength) : i, p = e.length;
		if (p > f) throw SyntaxError(`Input length: ${p}, exceeds maximum allowed length: ${f}`);
		let m = {
			type: "bos",
			value: "",
			output: d.prepend || ""
		}, h = [m], g = d.capture ? "" : "?:", _ = r.isWindows(t), b = n.globChars(_), x = n.extglobChars(b), { DOT_LITERAL: S, PLUS_LITERAL: C, SLASH_LITERAL: w, ONE_CHAR: T, DOTS_SLASH: E, NO_DOT: D, NO_DOT_SLASH: O, NO_DOTS_SLASH: k, QMARK: A, QMARK_NO_DOT: j, STAR: M, START_ANCHOR: N } = b, P = (e) => `(${g}(?:(?!${N}${e.dot ? E : S}).)*?)`, F = d.dot ? "" : D, I = d.dot ? A : j, L = d.bash === !0 ? P(d) : M;
		d.capture && (L = `(${L})`), typeof d.noext == "boolean" && (d.noextglob = d.noext);
		let R = {
			input: e,
			index: -1,
			start: 0,
			dot: d.dot === !0,
			consumed: "",
			output: "",
			prefix: "",
			backtrack: !1,
			negated: !1,
			brackets: 0,
			braces: 0,
			parens: 0,
			quotes: 0,
			globstar: !1,
			tokens: h
		};
		e = r.removePrefix(e, R), p = e.length;
		let z = [], B = [], V = [], H = m, U, ee = () => R.index === p - 1, W = R.peek = (t = 1) => e[R.index + t], G = R.advance = () => e[++R.index] || "", K = () => e.slice(R.index + 1), te = (e = "", t = 0) => {
			R.consumed += e, R.index += t;
		}, ne = (e) => {
			R.output += e.output == null ? e.value : e.output, te(e.value);
		}, re = () => {
			let e = 1;
			for (; W() === "!" && (W(2) !== "(" || W(3) === "?");) G(), R.start++, e++;
			return e % 2 == 0 ? !1 : (R.negated = !0, R.start++, !0);
		}, ie = (e) => {
			R[e]++, V.push(e);
		}, q = (e) => {
			R[e]--, V.pop();
		}, J = (e) => {
			if (H.type === "globstar") {
				let t = R.braces > 0 && (e.type === "comma" || e.type === "brace"), n = e.extglob === !0 || z.length && (e.type === "pipe" || e.type === "paren");
				e.type !== "slash" && e.type !== "paren" && !t && !n && (R.output = R.output.slice(0, -H.output.length), H.type = "star", H.value = "*", H.output = L, R.output += H.output);
			}
			if (z.length && e.type !== "paren" && (z[z.length - 1].inner += e.value), (e.value || e.output) && ne(e), H && H.type === "text" && e.type === "text") {
				H.value += e.value, H.output = (H.output || "") + e.value;
				return;
			}
			e.prev = H, h.push(e), H = e;
		}, ae = (e, t) => {
			let n = {
				...x[t],
				conditions: 1,
				inner: ""
			};
			n.prev = H, n.parens = R.parens, n.output = R.output, n.startIndex = R.index, n.tokensIndex = h.length;
			let r = (d.capture ? "(" : "") + n.open;
			ie("parens"), J({
				type: e,
				value: t,
				output: R.output ? "" : T
			}), J({
				type: "paren",
				extglob: !0,
				value: G(),
				output: r
			}), z.push(n);
		}, oe = (n) => {
			let i = e.slice(n.startIndex, R.index + 1), a = v(e.slice(n.startIndex + 2, R.index), d);
			if ((n.type === "plus" || n.type === "star") && a.risky) {
				let e = a.safeOutput ? (n.output ? "" : T) + (d.capture ? `(${a.safeOutput})` : a.safeOutput) : void 0, t = h[n.tokensIndex];
				t.type = "text", t.value = i, t.output = e || r.escapeRegex(i);
				for (let e = n.tokensIndex + 1; e < h.length; e++) h[e].value = "", h[e].output = "", delete h[e].suffix;
				R.output = n.output + t.output, R.backtrack = !0, J({
					type: "paren",
					extglob: !0,
					value: U,
					output: ""
				}), q("parens");
				return;
			}
			let o = n.close + (d.capture ? ")" : ""), s;
			if (n.type === "negate") {
				let e = L;
				n.inner && n.inner.length > 1 && n.inner.includes("/") && (e = P(d)), (e !== L || ee() || /^\)+$/.test(K())) && (o = n.close = `)$))${e}`), n.inner.includes("*") && (s = K()) && /^\.[^\\/.]+$/.test(s) && (o = n.close = `)${y(s, {
					...t,
					fastpaths: !1
				}).output})${e})`), n.prev.type === "bos" && (R.negatedExtglob = !0);
			}
			J({
				type: "paren",
				extglob: !0,
				value: U,
				output: o
			}), q("parens");
		};
		if (d.fastpaths !== !1 && !/(^[*!]|[/()[\]{}"])/.test(e)) {
			let n = !1, i = e.replace(s, (e, t, r, i, a, o) => i === "\\" ? (n = !0, e) : i === "?" ? t ? t + i + (a ? A.repeat(a.length) : "") : o === 0 ? I + (a ? A.repeat(a.length) : "") : A.repeat(r.length) : i === "." ? S.repeat(r.length) : i === "*" ? t ? t + i + (a ? L : "") : L : t ? e : `\\${e}`);
			return n === !0 && (i = d.unescape === !0 ? i.replace(/\\/g, "") : i.replace(/\\+/g, (e) => e.length % 2 == 0 ? "\\\\" : e ? "\\" : "")), i === e && d.contains === !0 ? (R.output = e, R) : (R.output = r.wrapOutput(i, R, t), R);
		}
		for (; !ee();) {
			if (U = G(), U === "\0") continue;
			if (U === "\\") {
				let e = W();
				if (e === "/" && d.bash !== !0 || e === "." || e === ";") continue;
				if (!e) {
					U += "\\", J({
						type: "text",
						value: U
					});
					continue;
				}
				let t = /^\\+/.exec(K()), n = 0;
				if (t && t[0].length > 2 && (n = t[0].length, R.index += n, n % 2 != 0 && (U += "\\")), d.unescape === !0 ? U = G() : U += G(), R.brackets === 0) {
					J({
						type: "text",
						value: U
					});
					continue;
				}
			}
			if (R.brackets > 0 && (U !== "]" || H.value === "[" || H.value === "[^")) {
				if (d.posix !== !1 && U === ":") {
					let e = H.value.slice(1);
					if (e.includes("[") && (H.posix = !0, e.includes(":"))) {
						let e = H.value.lastIndexOf("["), t = H.value.slice(0, e), n = a[H.value.slice(e + 2)];
						if (n) {
							H.value = t + n, R.backtrack = !0, G(), !m.output && h.indexOf(H) === 1 && (m.output = T);
							continue;
						}
					}
				}
				(U === "[" && W() !== ":" || U === "-" && W() === "]") && (U = `\\${U}`), U === "]" && (H.value === "[" || H.value === "[^") && (U = `\\${U}`), d.posix === !0 && U === "!" && H.value === "[" && (U = "^"), H.value += U, ne({ value: U });
				continue;
			}
			if (R.quotes === 1 && U !== "\"") {
				U = r.escapeRegex(U), H.value += U, ne({ value: U });
				continue;
			}
			if (U === "\"") {
				R.quotes = R.quotes === 1 ? 0 : 1, d.keepQuotes === !0 && J({
					type: "text",
					value: U
				});
				continue;
			}
			if (U === "(") {
				ie("parens"), J({
					type: "paren",
					value: U
				});
				continue;
			}
			if (U === ")") {
				if (R.parens === 0 && d.strictBrackets === !0) throw SyntaxError(u("opening", "("));
				let e = z[z.length - 1];
				if (e && R.parens === e.parens + 1) {
					oe(z.pop());
					continue;
				}
				J({
					type: "paren",
					value: U,
					output: R.parens ? ")" : "\\)"
				}), q("parens");
				continue;
			}
			if (U === "[") {
				if (d.nobracket === !0 || !K().includes("]")) {
					if (d.nobracket !== !0 && d.strictBrackets === !0) throw SyntaxError(u("closing", "]"));
					U = `\\${U}`;
				} else ie("brackets");
				J({
					type: "bracket",
					value: U
				});
				continue;
			}
			if (U === "]") {
				if (d.nobracket === !0 || H && H.type === "bracket" && H.value.length === 1) {
					J({
						type: "text",
						value: U,
						output: `\\${U}`
					});
					continue;
				}
				if (R.brackets === 0) {
					if (d.strictBrackets === !0) throw SyntaxError(u("opening", "["));
					J({
						type: "text",
						value: U,
						output: `\\${U}`
					});
					continue;
				}
				q("brackets");
				let e = H.value.slice(1);
				if (H.posix !== !0 && e[0] === "^" && !e.includes("/") && (U = `/${U}`), H.value += U, ne({ value: U }), d.literalBrackets === !1 || r.hasRegexChars(e)) continue;
				let t = r.escapeRegex(H.value);
				if (R.output = R.output.slice(0, -H.value.length), d.literalBrackets === !0) {
					R.output += t, H.value = t;
					continue;
				}
				H.value = `(${g}${t}|${H.value})`, R.output += H.value;
				continue;
			}
			if (U === "{" && d.nobrace !== !0) {
				ie("braces");
				let e = {
					type: "brace",
					value: U,
					output: "(",
					outputIndex: R.output.length,
					tokensIndex: R.tokens.length
				};
				B.push(e), J(e);
				continue;
			}
			if (U === "}") {
				let e = B[B.length - 1];
				if (d.nobrace === !0 || !e) {
					J({
						type: "text",
						value: U,
						output: U
					});
					continue;
				}
				let t = ")";
				if (e.dots === !0) {
					let e = h.slice(), n = [];
					for (let t = e.length - 1; t >= 0 && (h.pop(), e[t].type !== "brace"); t--) e[t].type !== "dots" && n.unshift(e[t].value);
					t = l(n, d), R.backtrack = !0;
				}
				if (e.comma !== !0 && e.dots !== !0) {
					let n = R.output.slice(0, e.outputIndex), r = R.tokens.slice(e.tokensIndex);
					e.value = e.output = "\\{", U = t = "\\}", R.output = n;
					for (let e of r) R.output += e.output || e.value;
				}
				J({
					type: "brace",
					value: U,
					output: t
				}), q("braces"), B.pop();
				continue;
			}
			if (U === "|") {
				z.length > 0 && z[z.length - 1].conditions++, J({
					type: "text",
					value: U
				});
				continue;
			}
			if (U === ",") {
				let e = U, t = B[B.length - 1];
				t && V[V.length - 1] === "braces" && (t.comma = !0, e = "|"), J({
					type: "comma",
					value: U,
					output: e
				});
				continue;
			}
			if (U === "/") {
				if (H.type === "dot" && R.index === R.start + 1) {
					R.start = R.index + 1, R.consumed = "", R.output = "", h.pop(), H = m;
					continue;
				}
				J({
					type: "slash",
					value: U,
					output: w
				});
				continue;
			}
			if (U === ".") {
				if (R.braces > 0 && H.type === "dot") {
					H.value === "." && (H.output = S);
					let e = B[B.length - 1];
					H.type = "dots", H.output += U, H.value += U, e.dots = !0;
					continue;
				}
				if (R.braces + R.parens === 0 && H.type !== "bos" && H.type !== "slash") {
					J({
						type: "text",
						value: U,
						output: S
					});
					continue;
				}
				J({
					type: "dot",
					value: U,
					output: S
				});
				continue;
			}
			if (U === "?") {
				if (!(H && H.value === "(") && d.noextglob !== !0 && W() === "(" && W(2) !== "?") {
					ae("qmark", U);
					continue;
				}
				if (H && H.type === "paren") {
					let e = W(), t = U;
					if (e === "<" && !r.supportsLookbehinds()) throw Error("Node.js v10 or higher is required for regex lookbehinds");
					(H.value === "(" && !/[!=<:]/.test(e) || e === "<" && !/<([!=]|\w+>)/.test(K())) && (t = `\\${U}`), J({
						type: "text",
						value: U,
						output: t
					});
					continue;
				}
				if (d.dot !== !0 && (H.type === "slash" || H.type === "bos")) {
					J({
						type: "qmark",
						value: U,
						output: j
					});
					continue;
				}
				J({
					type: "qmark",
					value: U,
					output: A
				});
				continue;
			}
			if (U === "!") {
				if (d.noextglob !== !0 && W() === "(" && (W(2) !== "?" || !/[!=<:]/.test(W(3)))) {
					ae("negate", U);
					continue;
				}
				if (d.nonegate !== !0 && R.index === 0) {
					re();
					continue;
				}
			}
			if (U === "+") {
				if (d.noextglob !== !0 && W() === "(" && W(2) !== "?") {
					ae("plus", U);
					continue;
				}
				if (H && H.value === "(" || d.regex === !1) {
					J({
						type: "plus",
						value: U,
						output: C
					});
					continue;
				}
				if (H && (H.type === "bracket" || H.type === "paren" || H.type === "brace") || R.parens > 0) {
					J({
						type: "plus",
						value: U
					});
					continue;
				}
				J({
					type: "plus",
					value: C
				});
				continue;
			}
			if (U === "@") {
				if (d.noextglob !== !0 && W() === "(" && W(2) !== "?") {
					J({
						type: "at",
						extglob: !0,
						value: U,
						output: ""
					});
					continue;
				}
				J({
					type: "text",
					value: U
				});
				continue;
			}
			if (U !== "*") {
				(U === "$" || U === "^") && (U = `\\${U}`);
				let e = o.exec(K());
				e && (U += e[0], R.index += e[0].length), J({
					type: "text",
					value: U
				});
				continue;
			}
			if (H && (H.type === "globstar" || H.star === !0)) {
				H.type = "star", H.star = !0, H.value += U, H.output = L, R.backtrack = !0, R.globstar = !0, te(U);
				continue;
			}
			let t = K();
			if (d.noextglob !== !0 && /^\([^?]/.test(t)) {
				ae("star", U);
				continue;
			}
			if (H.type === "star") {
				if (d.noglobstar === !0) {
					te(U);
					continue;
				}
				let n = H.prev, r = n.prev, i = n.type === "slash" || n.type === "bos", a = r && (r.type === "star" || r.type === "globstar");
				if (d.bash === !0 && (!i || t[0] && t[0] !== "/")) {
					J({
						type: "star",
						value: U,
						output: ""
					});
					continue;
				}
				let o = R.braces > 0 && (n.type === "comma" || n.type === "brace"), s = z.length && (n.type === "pipe" || n.type === "paren");
				if (!i && n.type !== "paren" && !o && !s) {
					J({
						type: "star",
						value: U,
						output: ""
					});
					continue;
				}
				for (; t.slice(0, 3) === "/**";) {
					let n = e[R.index + 4];
					if (n && n !== "/") break;
					t = t.slice(3), te("/**", 3);
				}
				if (n.type === "bos" && ee()) {
					H.type = "globstar", H.value += U, H.output = P(d), R.output = H.output, R.globstar = !0, te(U);
					continue;
				}
				if (n.type === "slash" && n.prev.type !== "bos" && !a && ee()) {
					R.output = R.output.slice(0, -(n.output + H.output).length), n.output = `(?:${n.output}`, H.type = "globstar", H.output = P(d) + (d.strictSlashes ? ")" : "|$)"), H.value += U, R.globstar = !0, R.output += n.output + H.output, te(U);
					continue;
				}
				if (n.type === "slash" && n.prev.type !== "bos" && t[0] === "/") {
					let e = t[1] === void 0 ? "" : "|$";
					R.output = R.output.slice(0, -(n.output + H.output).length), n.output = `(?:${n.output}`, H.type = "globstar", H.output = `${P(d)}${w}|${w}${e})`, H.value += U, R.output += n.output + H.output, R.globstar = !0, te(U + G()), J({
						type: "slash",
						value: "/",
						output: ""
					});
					continue;
				}
				if (n.type === "bos" && t[0] === "/") {
					H.type = "globstar", H.value += U, H.output = `(?:^|${w}|${P(d)}${w})`, R.output = H.output, R.globstar = !0, te(U + G()), J({
						type: "slash",
						value: "/",
						output: ""
					});
					continue;
				}
				R.output = R.output.slice(0, -H.output.length), H.type = "globstar", H.output = P(d), H.value += U, R.output += H.output, R.globstar = !0, te(U);
				continue;
			}
			let n = {
				type: "star",
				value: U,
				output: L
			};
			if (d.bash === !0) {
				n.output = ".*?", (H.type === "bos" || H.type === "slash") && (n.output = F + n.output), J(n);
				continue;
			}
			if (H && (H.type === "bracket" || H.type === "paren") && d.regex === !0) {
				n.output = U, J(n);
				continue;
			}
			(R.index === R.start || H.type === "slash" || H.type === "dot") && (H.type === "dot" ? (R.output += O, H.output += O) : d.dot === !0 ? (R.output += k, H.output += k) : (R.output += F, H.output += F), W() !== "*" && (R.output += T, H.output += T)), J(n);
		}
		for (; R.brackets > 0;) {
			if (d.strictBrackets === !0) throw SyntaxError(u("closing", "]"));
			R.output = r.escapeLast(R.output, "["), q("brackets");
		}
		for (; R.parens > 0;) {
			if (d.strictBrackets === !0) throw SyntaxError(u("closing", ")"));
			R.output = r.escapeLast(R.output, "("), q("parens");
		}
		for (; R.braces > 0;) {
			if (d.strictBrackets === !0) throw SyntaxError(u("closing", "}"));
			R.output = r.escapeLast(R.output, "{"), q("braces");
		}
		if (d.strictSlashes !== !0 && (H.type === "star" || H.type === "bracket") && J({
			type: "maybe_slash",
			value: "",
			output: `${w}?`
		}), R.backtrack === !0) {
			R.output = "";
			for (let e of R.tokens) R.output += e.output == null ? e.value : e.output, e.suffix && (R.output += e.suffix);
		}
		return R;
	};
	y.fastpaths = (e, t) => {
		let a = { ...t }, o = typeof a.maxLength == "number" ? Math.min(i, a.maxLength) : i, s = e.length;
		if (s > o) throw SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${o}`);
		e = c[e] || e;
		let l = r.isWindows(t), { DOT_LITERAL: u, SLASH_LITERAL: d, ONE_CHAR: f, DOTS_SLASH: p, NO_DOT: m, NO_DOTS: h, NO_DOTS_SLASH: g, STAR: _, START_ANCHOR: v } = n.globChars(l), y = a.dot ? h : m, b = a.dot ? g : m, x = a.capture ? "" : "?:", S = {
			negated: !1,
			prefix: ""
		}, C = a.bash === !0 ? ".*?" : _;
		a.capture && (C = `(${C})`);
		let w = (e) => e.noglobstar === !0 ? C : `(${x}(?:(?!${v}${e.dot ? p : u}).)*?)`, T = (e) => {
			switch (e) {
				case "*": return `${y}${f}${C}`;
				case ".*": return `${u}${f}${C}`;
				case "*.*": return `${y}${C}${u}${f}${C}`;
				case "*/*": return `${y}${C}${d}${f}${b}${C}`;
				case "**": return y + w(a);
				case "**/*": return `(?:${y}${w(a)}${d})?${b}${f}${C}`;
				case "**/*.*": return `(?:${y}${w(a)}${d})?${b}${C}${u}${f}${C}`;
				case "**/.*": return `(?:${y}${w(a)}${d})?${u}${f}${C}`;
				default: {
					let t = /^(.*?)\.(\w+)$/.exec(e);
					if (!t) return;
					let n = T(t[1]);
					return n ? n + u + t[2] : void 0;
				}
			}
		}, E = T(r.removePrefix(e, S));
		return E && a.strictSlashes !== !0 && (E += `${d}?`), E;
	}, t.exports = y;
})), Rp = /* @__PURE__ */ w(((e, t) => {
	var n = k("path"), r = Ip(), i = Lp(), a = Fp(), o = Pp(), s = (e) => e && typeof e == "object" && !Array.isArray(e), c = (e, t, n = !1) => {
		if (Array.isArray(e)) {
			let r = e.map((e) => c(e, t, n));
			return (e) => {
				for (let t of r) {
					let n = t(e);
					if (n) return n;
				}
				return !1;
			};
		}
		let r = s(e) && e.tokens && e.input;
		if (e === "" || typeof e != "string" && !r) throw TypeError("Expected pattern to be a non-empty string");
		let i = t || {}, o = a.isWindows(t), l = r ? c.compileRe(e, t) : c.makeRe(e, t, !1, !0), u = l.state;
		delete l.state;
		let d = () => !1;
		if (i.ignore) {
			let e = {
				...t,
				ignore: null,
				onMatch: null,
				onResult: null
			};
			d = c(i.ignore, e, n);
		}
		let f = (n, r = !1) => {
			let { isMatch: a, match: s, output: f } = c.test(n, l, t, {
				glob: e,
				posix: o
			}), p = {
				glob: e,
				state: u,
				regex: l,
				posix: o,
				input: n,
				output: f,
				match: s,
				isMatch: a
			};
			return typeof i.onResult == "function" && i.onResult(p), a === !1 ? (p.isMatch = !1, r ? p : !1) : d(n) ? (typeof i.onIgnore == "function" && i.onIgnore(p), p.isMatch = !1, r ? p : !1) : (typeof i.onMatch == "function" && i.onMatch(p), r ? p : !0);
		};
		return n && (f.state = u), f;
	};
	c.test = (e, t, n, { glob: r, posix: i } = {}) => {
		if (typeof e != "string") throw TypeError("Expected input to be a string");
		if (e === "") return {
			isMatch: !1,
			output: ""
		};
		let o = n || {}, s = o.format || (i ? a.toPosixSlashes : null), l = e === r, u = l && s ? s(e) : e;
		return l === !1 && (u = s ? s(e) : e, l = u === r), (l === !1 || o.capture === !0) && (l = o.matchBase === !0 || o.basename === !0 ? c.matchBase(e, t, n, i) : t.exec(u)), {
			isMatch: !!l,
			match: l,
			output: u
		};
	}, c.matchBase = (e, t, r, i = a.isWindows(r)) => (t instanceof RegExp ? t : c.makeRe(t, r)).test(n.basename(e)), c.isMatch = (e, t, n) => c(t, n)(e), c.parse = (e, t) => Array.isArray(e) ? e.map((e) => c.parse(e, t)) : i(e, {
		...t,
		fastpaths: !1
	}), c.scan = (e, t) => r(e, t), c.compileRe = (e, t, n = !1, r = !1) => {
		if (n === !0) return e.output;
		let i = t || {}, a = i.contains ? "" : "^", o = i.contains ? "" : "$", s = `${a}(?:${e.output})${o}`;
		e && e.negated === !0 && (s = `^(?!${s}).*$`);
		let l = c.toRegex(s, t);
		return r === !0 && (l.state = e), l;
	}, c.makeRe = (e, t = {}, n = !1, r = !1) => {
		if (!e || typeof e != "string") throw TypeError("Expected a non-empty string");
		let a = {
			negated: !1,
			fastpaths: !0
		};
		return t.fastpaths !== !1 && (e[0] === "." || e[0] === "*") && (a.output = i.fastpaths(e, t)), a.output || (a = i(e, t)), c.compileRe(a, t, n, r);
	}, c.toRegex = (e, t) => {
		try {
			let n = t || {};
			return new RegExp(e, n.flags || (n.nocase ? "i" : ""));
		} catch (e) {
			if (t && t.debug === !0) throw e;
			return /$^/;
		}
	}, c.constants = o, t.exports = c;
})), zp = /* @__PURE__ */ w(((e, t) => {
	t.exports = Rp();
})), Bp = /* @__PURE__ */ w(((e, t) => {
	var n = k("util"), r = Np(), i = zp(), a = Fp(), o = (e) => e === "" || e === "./", s = (e) => {
		let t = e.indexOf("{");
		return t > -1 && e.indexOf("}", t) > -1;
	}, c = (e, t, n) => {
		t = [].concat(t), e = [].concat(e);
		let r = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), s = 0, c = (e) => {
			o.add(e.output), n && n.onResult && n.onResult(e);
		};
		for (let o = 0; o < t.length; o++) {
			let l = i(String(t[o]), {
				...n,
				onResult: c
			}, !0), u = l.state.negated || l.state.negatedExtglob;
			u && s++;
			for (let t of e) {
				let e = l(t, !0);
				(u ? !e.isMatch : e.isMatch) && (u ? r.add(e.output) : (r.delete(e.output), a.add(e.output)));
			}
		}
		let l = (s === t.length ? [...o] : [...a]).filter((e) => !r.has(e));
		if (n && l.length === 0) {
			if (n.failglob === !0) throw Error(`No matches found for "${t.join(", ")}"`);
			if (n.nonull === !0 || n.nullglob === !0) return n.unescape ? t.map((e) => e.replace(/\\/g, "")) : t;
		}
		return l;
	};
	c.match = c, c.matcher = (e, t) => i(e, t), c.isMatch = (e, t, n) => i(t, n)(e), c.any = c.isMatch, c.not = (e, t, n = {}) => {
		t = [].concat(t).map(String);
		let r = /* @__PURE__ */ new Set(), i = [], a = (e) => {
			n.onResult && n.onResult(e), i.push(e.output);
		}, o = new Set(c(e, t, {
			...n,
			onResult: a
		}));
		for (let e of i) o.has(e) || r.add(e);
		return [...r];
	}, c.contains = (e, t, r) => {
		if (typeof e != "string") throw TypeError(`Expected a string: "${n.inspect(e)}"`);
		if (Array.isArray(t)) return t.some((t) => c.contains(e, t, r));
		if (typeof t == "string") {
			if (o(e) || o(t)) return !1;
			if (e.includes(t) || e.startsWith("./") && e.slice(2).includes(t)) return !0;
		}
		return c.isMatch(e, t, {
			...r,
			contains: !0
		});
	}, c.matchKeys = (e, t, n) => {
		if (!a.isObject(e)) throw TypeError("Expected the first argument to be an object");
		let r = c(Object.keys(e), t, n), i = {};
		for (let t of r) i[t] = e[t];
		return i;
	}, c.some = (e, t, n) => {
		let r = [].concat(e);
		for (let e of [].concat(t)) {
			let t = i(String(e), n);
			if (r.some((e) => t(e))) return !0;
		}
		return !1;
	}, c.every = (e, t, n) => {
		let r = [].concat(e);
		for (let e of [].concat(t)) {
			let t = i(String(e), n);
			if (!r.every((e) => t(e))) return !1;
		}
		return !0;
	}, c.all = (e, t, r) => {
		if (typeof e != "string") throw TypeError(`Expected a string: "${n.inspect(e)}"`);
		return [].concat(t).every((t) => i(t, r)(e));
	}, c.capture = (e, t, n) => {
		let r = a.isWindows(n), o = i.makeRe(String(e), {
			...n,
			capture: !0
		}).exec(r ? a.toPosixSlashes(t) : t);
		if (o) return o.slice(1).map((e) => e === void 0 ? "" : e);
	}, c.makeRe = (...e) => i.makeRe(...e), c.scan = (...e) => i.scan(...e), c.parse = (e, t) => {
		let n = [];
		for (let a of [].concat(e || [])) for (let e of r(String(a), t)) n.push(i.parse(e, t));
		return n;
	}, c.braces = (e, t) => {
		if (typeof e != "string") throw TypeError("Expected a string");
		return t && t.nobrace === !0 || !s(e) ? [e] : r(e, t);
	}, c.braceExpand = (e, t) => {
		if (typeof e != "string") throw TypeError("Expected a string");
		return c.braces(e, {
			...t,
			expand: !0
		});
	}, c.hasBraces = s, t.exports = c;
})), Vp = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.isAbsolute = e.partitionAbsoluteAndRelative = e.removeDuplicateSlashes = e.matchAny = e.convertPatternsToRe = e.makeRe = e.getPatternParts = e.expandBraceExpansion = e.expandPatternsWithBraceExpansion = e.isAffectDepthOfReadingPattern = e.endsWithSlashGlobStar = e.hasGlobStar = e.getBaseDirectory = e.isPatternRelatedToParentDirectory = e.getPatternsOutsideCurrentDirectory = e.getPatternsInsideCurrentDirectory = e.getPositivePatterns = e.getNegativePatterns = e.isPositivePattern = e.isNegativePattern = e.convertToNegativePattern = e.convertToPositivePattern = e.isDynamicPattern = e.isStaticPattern = void 0;
	var t = k("path"), n = Cp(), r = Bp(), i = "**", a = "\\", o = /[*?]|^!/, s = /\[[^[]*]/, c = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/, l = /[!*+?@]\([^(]*\)/, u = /,|\.\./, d = /(?!^)\/{2,}/g;
	function f(e, t = {}) {
		return !p(e, t);
	}
	e.isStaticPattern = f;
	function p(e, t = {}) {
		return e === "" ? !1 : !!(t.caseSensitiveMatch === !1 || e.includes(a) || o.test(e) || s.test(e) || c.test(e) || t.extglob !== !1 && l.test(e) || t.braceExpansion !== !1 && m(e));
	}
	e.isDynamicPattern = p;
	function m(e) {
		let t = e.indexOf("{");
		if (t === -1) return !1;
		let n = e.indexOf("}", t + 1);
		if (n === -1) return !1;
		let r = e.slice(t, n);
		return u.test(r);
	}
	function h(e) {
		return _(e) ? e.slice(1) : e;
	}
	e.convertToPositivePattern = h;
	function g(e) {
		return "!" + e;
	}
	e.convertToNegativePattern = g;
	function _(e) {
		return e.startsWith("!") && e[1] !== "(";
	}
	e.isNegativePattern = _;
	function v(e) {
		return !_(e);
	}
	e.isPositivePattern = v;
	function y(e) {
		return e.filter(_);
	}
	e.getNegativePatterns = y;
	function b(e) {
		return e.filter(v);
	}
	e.getPositivePatterns = b;
	function x(e) {
		return e.filter((e) => !C(e));
	}
	e.getPatternsInsideCurrentDirectory = x;
	function S(e) {
		return e.filter(C);
	}
	e.getPatternsOutsideCurrentDirectory = S;
	function C(e) {
		return e.startsWith("..") || e.startsWith("./..");
	}
	e.isPatternRelatedToParentDirectory = C;
	function w(e) {
		return n(e, { flipBackslashes: !1 });
	}
	e.getBaseDirectory = w;
	function T(e) {
		return e.includes(i);
	}
	e.hasGlobStar = T;
	function E(e) {
		return e.endsWith("/**");
	}
	e.endsWithSlashGlobStar = E;
	function D(e) {
		let n = t.basename(e);
		return E(e) || f(n);
	}
	e.isAffectDepthOfReadingPattern = D;
	function O(e) {
		return e.reduce((e, t) => e.concat(A(t)), []);
	}
	e.expandPatternsWithBraceExpansion = O;
	function A(e) {
		let t = r.braces(e, {
			expand: !0,
			nodupes: !0,
			keepEscaping: !0
		});
		return t.sort((e, t) => e.length - t.length), t.filter((e) => e !== "");
	}
	e.expandBraceExpansion = A;
	function j(e, t) {
		let { parts: n } = r.scan(e, Object.assign(Object.assign({}, t), { parts: !0 }));
		return n.length === 0 && (n = [e]), n[0].startsWith("/") && (n[0] = n[0].slice(1), n.unshift("")), n;
	}
	e.getPatternParts = j;
	function M(e, t) {
		return r.makeRe(e, t);
	}
	e.makeRe = M;
	function N(e, t) {
		return e.map((e) => M(e, t));
	}
	e.convertPatternsToRe = N;
	function P(e, t) {
		return t.some((t) => t.test(e));
	}
	e.matchAny = P;
	function F(e) {
		return e.replace(d, "/");
	}
	e.removeDuplicateSlashes = F;
	function I(e) {
		let t = [], n = [];
		for (let r of e) L(r) ? t.push(r) : n.push(r);
		return [t, n];
	}
	e.partitionAbsoluteAndRelative = I;
	function L(e) {
		return t.isAbsolute(e);
	}
	e.isAbsolute = L;
})), Hp = /* @__PURE__ */ w(((e, t) => {
	var n = k("stream").PassThrough, r = Array.prototype.slice;
	t.exports = i;
	function i() {
		let e = [], t = r.call(arguments), i = !1, o = t[t.length - 1];
		o && !Array.isArray(o) && o.pipe == null ? t.pop() : o = {};
		let s = o.end !== !1, c = o.pipeError === !0;
		o.objectMode ??= !0, o.highWaterMark ??= 64 * 1024;
		let l = n(o);
		function u() {
			for (let t = 0, n = arguments.length; t < n; t++) e.push(a(arguments[t], o));
			return d(), this;
		}
		function d() {
			if (i) return;
			i = !0;
			let t = e.shift();
			if (!t) {
				process.nextTick(f);
				return;
			}
			Array.isArray(t) || (t = [t]);
			let n = t.length + 1;
			function r() {
				--n > 0 || (i = !1, d());
			}
			function a(e) {
				function t() {
					e.removeListener("merge2UnpipeEnd", t), e.removeListener("end", t), c && e.removeListener("error", n), r();
				}
				function n(e) {
					l.emit("error", e);
				}
				if (e._readableState.endEmitted) return r();
				e.on("merge2UnpipeEnd", t), e.on("end", t), c && e.on("error", n), e.pipe(l, { end: !1 }), e.resume();
			}
			for (let e = 0; e < t.length; e++) a(t[e]);
			r();
		}
		function f() {
			i = !1, l.emit("queueDrain"), s && l.end();
		}
		return l.setMaxListeners(0), l.add = u, l.on("unpipe", function(e) {
			e.emit("merge2UnpipeEnd");
		}), t.length && u.apply(null, t), l;
	}
	function a(e, t) {
		if (Array.isArray(e)) for (let n = 0, r = e.length; n < r; n++) e[n] = a(e[n], t);
		else {
			if (!e._readableState && e.pipe && (e = e.pipe(n(t))), !e._readableState || !e.pause || !e.pipe) throw Error("Only readable stream can be merged.");
			e.pause();
		}
		return e;
	}
})), Up = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.merge = void 0;
	var t = Hp();
	function n(e) {
		let n = t(e);
		return e.forEach((e) => {
			e.once("error", (e) => n.emit("error", e));
		}), n.once("close", () => r(e)), n.once("end", () => r(e)), n;
	}
	e.merge = n;
	function r(e) {
		e.forEach((e) => e.emit("close"));
	}
})), Wp = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.isEmpty = e.isString = void 0;
	function t(e) {
		return typeof e == "string";
	}
	e.isString = t;
	function n(e) {
		return e === "";
	}
	e.isEmpty = n;
})), Gp = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.string = e.stream = e.pattern = e.path = e.fs = e.errno = e.array = void 0, e.array = _p(), e.errno = vp(), e.fs = yp(), e.path = bp(), e.pattern = Vp(), e.stream = Up(), e.string = Wp();
})), Kp = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.convertPatternGroupToTask = e.convertPatternGroupsToTasks = e.groupPatternsByBaseDirectory = e.getNegativePatternsAsPositive = e.getPositivePatterns = e.convertPatternsToTasks = e.generate = void 0;
	var t = Gp();
	function n(e, n) {
		let s = r(e, n), c = r(n.ignore, n), l = a(s), u = o(s, c), d = l.filter((e) => t.pattern.isStaticPattern(e, n)), f = l.filter((e) => t.pattern.isDynamicPattern(e, n)), p = i(d, u, !1), m = i(f, u, !0);
		return p.concat(m);
	}
	e.generate = n;
	function r(e, n) {
		let r = e;
		return n.braceExpansion && (r = t.pattern.expandPatternsWithBraceExpansion(r)), n.baseNameMatch && (r = r.map((e) => e.includes("/") ? e : `**/${e}`)), r.map((e) => t.pattern.removeDuplicateSlashes(e));
	}
	function i(e, n, r) {
		let i = [], a = t.pattern.getPatternsOutsideCurrentDirectory(e), o = t.pattern.getPatternsInsideCurrentDirectory(e), u = s(a), d = s(o);
		return i.push(...c(u, n, r)), "." in d ? i.push(l(".", o, n, r)) : i.push(...c(d, n, r)), i;
	}
	e.convertPatternsToTasks = i;
	function a(e) {
		return t.pattern.getPositivePatterns(e);
	}
	e.getPositivePatterns = a;
	function o(e, n) {
		return t.pattern.getNegativePatterns(e).concat(n).map(t.pattern.convertToPositivePattern);
	}
	e.getNegativePatternsAsPositive = o;
	function s(e) {
		return e.reduce((e, n) => {
			let r = t.pattern.getBaseDirectory(n);
			return r in e ? e[r].push(n) : e[r] = [n], e;
		}, {});
	}
	e.groupPatternsByBaseDirectory = s;
	function c(e, t, n) {
		return Object.keys(e).map((r) => l(r, e[r], t, n));
	}
	e.convertPatternGroupsToTasks = c;
	function l(e, n, r, i) {
		return {
			dynamic: i,
			positive: n,
			negative: r,
			base: e,
			patterns: [].concat(n, r.map(t.pattern.convertToNegativePattern))
		};
	}
	e.convertPatternGroupToTask = l;
})), qp = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.read = void 0;
	function t(e, t, i) {
		t.fs.lstat(e, (a, o) => {
			if (a !== null) {
				n(i, a);
				return;
			}
			if (!o.isSymbolicLink() || !t.followSymbolicLink) {
				r(i, o);
				return;
			}
			t.fs.stat(e, (e, a) => {
				if (e !== null) {
					if (t.throwErrorOnBrokenSymbolicLink) {
						n(i, e);
						return;
					}
					r(i, o);
					return;
				}
				t.markSymbolicLink && (a.isSymbolicLink = () => !0), r(i, a);
			});
		});
	}
	e.read = t;
	function n(e, t) {
		e(t);
	}
	function r(e, t) {
		e(null, t);
	}
})), Jp = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.read = void 0;
	function t(e, t) {
		let n = t.fs.lstatSync(e);
		if (!n.isSymbolicLink() || !t.followSymbolicLink) return n;
		try {
			let n = t.fs.statSync(e);
			return t.markSymbolicLink && (n.isSymbolicLink = () => !0), n;
		} catch (e) {
			if (!t.throwErrorOnBrokenSymbolicLink) return n;
			throw e;
		}
	}
	e.read = t;
})), Yp = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.createFileSystemAdapter = e.FILE_SYSTEM_ADAPTER = void 0;
	var t = k("fs");
	e.FILE_SYSTEM_ADAPTER = {
		lstat: t.lstat,
		stat: t.stat,
		lstatSync: t.lstatSync,
		statSync: t.statSync
	};
	function n(t) {
		return t === void 0 ? e.FILE_SYSTEM_ADAPTER : Object.assign(Object.assign({}, e.FILE_SYSTEM_ADAPTER), t);
	}
	e.createFileSystemAdapter = n;
})), Xp = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 });
	var t = Yp();
	e.default = class {
		constructor(e = {}) {
			this._options = e, this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, !0), this.fs = t.createFileSystemAdapter(this._options.fs), this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, !1), this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, !0);
		}
		_getValue(e, t) {
			return e ?? t;
		}
	};
})), Zp = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.statSync = e.stat = e.Settings = void 0;
	var t = qp(), n = Jp(), r = Xp();
	e.Settings = r.default;
	function i(e, n, r) {
		if (typeof n == "function") {
			t.read(e, o(), n);
			return;
		}
		t.read(e, o(n), r);
	}
	e.stat = i;
	function a(e, t) {
		let r = o(t);
		return n.read(e, r);
	}
	e.statSync = a;
	function o(e = {}) {
		return e instanceof r.default ? e : new r.default(e);
	}
})), Qp = /* @__PURE__ */ w(((e, t) => {
	var n;
	t.exports = typeof queueMicrotask == "function" ? queueMicrotask.bind(typeof window < "u" ? window : global) : (e) => (n ||= Promise.resolve()).then(e).catch((e) => setTimeout(() => {
		throw e;
	}, 0));
})), $p = /* @__PURE__ */ w(((e, t) => {
	t.exports = r;
	var n = Qp();
	function r(e, t) {
		let r, i, a, o = !0;
		Array.isArray(e) ? (r = [], i = e.length) : (a = Object.keys(e), r = {}, i = a.length);
		function s(e) {
			function i() {
				t && t(e, r), t = null;
			}
			o ? n(i) : i();
		}
		function c(e, t, n) {
			r[e] = n, (--i === 0 || t) && s(t);
		}
		i ? a ? a.forEach(function(t) {
			e[t](function(e, n) {
				c(t, e, n);
			});
		}) : e.forEach(function(e, t) {
			e(function(e, n) {
				c(t, e, n);
			});
		}) : s(null), o = !1;
	}
})), em = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0;
	var t = process.versions.node.split(".");
	if (t[0] === void 0 || t[1] === void 0) throw Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);
	var n = Number.parseInt(t[0], 10), r = Number.parseInt(t[1], 10), i = 10;
	e.IS_SUPPORT_READDIR_WITH_FILE_TYPES = n > i || n === i && r >= 10;
})), tm = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.createDirentFromStats = void 0;
	var t = class {
		constructor(e, t) {
			this.name = e, this.isBlockDevice = t.isBlockDevice.bind(t), this.isCharacterDevice = t.isCharacterDevice.bind(t), this.isDirectory = t.isDirectory.bind(t), this.isFIFO = t.isFIFO.bind(t), this.isFile = t.isFile.bind(t), this.isSocket = t.isSocket.bind(t), this.isSymbolicLink = t.isSymbolicLink.bind(t);
		}
	};
	function n(e, n) {
		return new t(e, n);
	}
	e.createDirentFromStats = n;
})), nm = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.fs = void 0, e.fs = tm();
})), rm = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.joinPathSegments = void 0;
	function t(e, t, n) {
		return e.endsWith(n) ? e + t : e + n + t;
	}
	e.joinPathSegments = t;
})), im = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.readdir = e.readdirWithFileTypes = e.read = void 0;
	var t = Zp(), n = $p(), r = em(), i = nm(), a = rm();
	function o(e, t, n) {
		if (!t.stats && r.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
			s(e, t, n);
			return;
		}
		l(e, t, n);
	}
	e.read = o;
	function s(e, t, r) {
		t.fs.readdir(e, { withFileTypes: !0 }, (i, o) => {
			if (i !== null) {
				u(r, i);
				return;
			}
			let s = o.map((n) => ({
				dirent: n,
				name: n.name,
				path: a.joinPathSegments(e, n.name, t.pathSegmentSeparator)
			}));
			if (!t.followSymbolicLinks) {
				d(r, s);
				return;
			}
			n(s.map((e) => c(e, t)), (e, t) => {
				if (e !== null) {
					u(r, e);
					return;
				}
				d(r, t);
			});
		});
	}
	e.readdirWithFileTypes = s;
	function c(e, t) {
		return (n) => {
			if (!e.dirent.isSymbolicLink()) {
				n(null, e);
				return;
			}
			t.fs.stat(e.path, (r, a) => {
				if (r !== null) {
					if (t.throwErrorOnBrokenSymbolicLink) {
						n(r);
						return;
					}
					n(null, e);
					return;
				}
				e.dirent = i.fs.createDirentFromStats(e.name, a), n(null, e);
			});
		};
	}
	function l(e, r, o) {
		r.fs.readdir(e, (s, c) => {
			if (s !== null) {
				u(o, s);
				return;
			}
			n(c.map((n) => {
				let o = a.joinPathSegments(e, n, r.pathSegmentSeparator);
				return (e) => {
					t.stat(o, r.fsStatSettings, (t, a) => {
						if (t !== null) {
							e(t);
							return;
						}
						let s = {
							name: n,
							path: o,
							dirent: i.fs.createDirentFromStats(n, a)
						};
						r.stats && (s.stats = a), e(null, s);
					});
				};
			}), (e, t) => {
				if (e !== null) {
					u(o, e);
					return;
				}
				d(o, t);
			});
		});
	}
	e.readdir = l;
	function u(e, t) {
		e(t);
	}
	function d(e, t) {
		e(null, t);
	}
})), am = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.readdir = e.readdirWithFileTypes = e.read = void 0;
	var t = Zp(), n = em(), r = nm(), i = rm();
	function a(e, t) {
		return !t.stats && n.IS_SUPPORT_READDIR_WITH_FILE_TYPES ? o(e, t) : s(e, t);
	}
	e.read = a;
	function o(e, t) {
		return t.fs.readdirSync(e, { withFileTypes: !0 }).map((n) => {
			let a = {
				dirent: n,
				name: n.name,
				path: i.joinPathSegments(e, n.name, t.pathSegmentSeparator)
			};
			if (a.dirent.isSymbolicLink() && t.followSymbolicLinks) try {
				let e = t.fs.statSync(a.path);
				a.dirent = r.fs.createDirentFromStats(a.name, e);
			} catch (e) {
				if (t.throwErrorOnBrokenSymbolicLink) throw e;
			}
			return a;
		});
	}
	e.readdirWithFileTypes = o;
	function s(e, n) {
		return n.fs.readdirSync(e).map((a) => {
			let o = i.joinPathSegments(e, a, n.pathSegmentSeparator), s = t.statSync(o, n.fsStatSettings), c = {
				name: a,
				path: o,
				dirent: r.fs.createDirentFromStats(a, s)
			};
			return n.stats && (c.stats = s), c;
		});
	}
	e.readdir = s;
})), om = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.createFileSystemAdapter = e.FILE_SYSTEM_ADAPTER = void 0;
	var t = k("fs");
	e.FILE_SYSTEM_ADAPTER = {
		lstat: t.lstat,
		stat: t.stat,
		lstatSync: t.lstatSync,
		statSync: t.statSync,
		readdir: t.readdir,
		readdirSync: t.readdirSync
	};
	function n(t) {
		return t === void 0 ? e.FILE_SYSTEM_ADAPTER : Object.assign(Object.assign({}, e.FILE_SYSTEM_ADAPTER), t);
	}
	e.createFileSystemAdapter = n;
})), sm = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 });
	var t = k("path"), n = Zp(), r = om();
	e.default = class {
		constructor(e = {}) {
			this._options = e, this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, !1), this.fs = r.createFileSystemAdapter(this._options.fs), this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, t.sep), this.stats = this._getValue(this._options.stats, !1), this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, !0), this.fsStatSettings = new n.Settings({
				followSymbolicLink: this.followSymbolicLinks,
				fs: this.fs,
				throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink
			});
		}
		_getValue(e, t) {
			return e ?? t;
		}
	};
})), cm = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.Settings = e.scandirSync = e.scandir = void 0;
	var t = im(), n = am(), r = sm();
	e.Settings = r.default;
	function i(e, n, r) {
		if (typeof n == "function") {
			t.read(e, o(), n);
			return;
		}
		t.read(e, o(n), r);
	}
	e.scandir = i;
	function a(e, t) {
		let r = o(t);
		return n.read(e, r);
	}
	e.scandirSync = a;
	function o(e = {}) {
		return e instanceof r.default ? e : new r.default(e);
	}
})), lm = /* @__PURE__ */ w(((e, t) => {
	function n(e) {
		var t = new e(), n = t;
		function r() {
			var r = t;
			return r.next ? t = r.next : (t = new e(), n = t), r.next = null, r;
		}
		function i(e) {
			n.next = e, n = e;
		}
		return {
			get: r,
			release: i
		};
	}
	t.exports = n;
})), um = /* @__PURE__ */ w(((e, t) => {
	var n = lm();
	function r(e, t, r) {
		if (typeof e == "function" && (r = t, t = e, e = null), !(r >= 1)) throw Error("fastqueue concurrency must be equal to or greater than 1");
		var o = n(a), s = null, c = null, l = 0, u = null, d = {
			push: v,
			drain: i,
			saturated: i,
			pause: p,
			paused: !1,
			get concurrency() {
				return r;
			},
			set concurrency(e) {
				if (!(e >= 1)) throw Error("fastqueue concurrency must be equal to or greater than 1");
				if (r = e, !d.paused) for (; s && l < r;) l++, b();
			},
			running: f,
			resume: g,
			idle: _,
			length: m,
			getQueue: h,
			unshift: y,
			empty: i,
			kill: x,
			killAndDrain: S,
			error: w,
			abort: C
		};
		return d;
		function f() {
			return l;
		}
		function p() {
			d.paused = !0;
		}
		function m() {
			for (var e = s, t = 0; e;) e = e.next, t++;
			return t;
		}
		function h() {
			for (var e = s, t = []; e;) t.push(e.value), e = e.next;
			return t;
		}
		function g() {
			if (d.paused) {
				if (d.paused = !1, s === null) {
					l++, b();
					return;
				}
				for (; s && l < r;) l++, b();
			}
		}
		function _() {
			return l === 0 && d.length() === 0;
		}
		function v(n, a) {
			var f = o.get();
			f.context = e, f.release = b, f.value = n, f.callback = a || i, f.errorHandler = u, l >= r || d.paused ? c ? (c.next = f, c = f) : (s = f, c = f, d.saturated()) : (l++, t.call(e, f.value, f.worked));
		}
		function y(n, a) {
			var f = o.get();
			f.context = e, f.release = b, f.value = n, f.callback = a || i, f.errorHandler = u, l >= r || d.paused ? s ? (f.next = s, s = f) : (s = f, c = f, d.saturated()) : (l++, t.call(e, f.value, f.worked));
		}
		function b(n) {
			n && o.release(n);
			var i = s;
			i && l <= r ? d.paused ? l-- : (c === s && (c = null), s = i.next, i.next = null, t.call(e, i.value, i.worked), c === null && d.empty()) : --l === 0 && d.drain();
		}
		function x() {
			s = null, c = null, d.drain = i;
		}
		function S() {
			s = null, c = null, d.drain(), d.drain = i;
		}
		function C() {
			var e = s;
			for (s = null, c = null; e;) {
				var t = e.next, n = e.callback, r = e.errorHandler, a = e.value, o = e.context;
				e.value = null, e.callback = i, e.errorHandler = null, r && r(/* @__PURE__ */ Error("abort"), a), n.call(o, /* @__PURE__ */ Error("abort")), e.release(e), e = t;
			}
			d.drain = i;
		}
		function w(e) {
			u = e;
		}
	}
	function i() {}
	function a() {
		this.value = null, this.callback = i, this.next = null, this.release = i, this.context = null, this.errorHandler = null;
		var e = this;
		this.worked = function(t, n) {
			var r = e.callback, a = e.errorHandler, o = e.value;
			e.value = null, e.callback = i, e.errorHandler && a(t, o), r.call(e.context, t, n), e.release(e);
		};
	}
	function o(e, t, n) {
		typeof e == "function" && (n = t, t = e, e = null);
		function a(e, n) {
			t.call(this, e).then(function(e) {
				n(null, e);
			}, n);
		}
		var o = r(e, a, n), s = o.push, c = o.unshift;
		return o.push = l, o.unshift = u, o.drained = d, o;
		function l(e) {
			var t = new Promise(function(t, n) {
				s(e, function(e, r) {
					if (e) {
						n(e);
						return;
					}
					t(r);
				});
			});
			return t.catch(i), t;
		}
		function u(e) {
			var t = new Promise(function(t, n) {
				c(e, function(e, r) {
					if (e) {
						n(e);
						return;
					}
					t(r);
				});
			});
			return t.catch(i), t;
		}
		function d() {
			return new Promise(function(e) {
				process.nextTick(function() {
					if (o.idle()) e();
					else {
						var t = o.drain;
						o.drain = function() {
							typeof t == "function" && t(), e(), o.drain = t;
						};
					}
				});
			});
		}
	}
	t.exports = r, t.exports.promise = o;
})), dm = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.joinPathSegments = e.replacePathSegmentSeparator = e.isAppliedFilter = e.isFatalError = void 0;
	function t(e, t) {
		return e.errorFilter === null ? !0 : !e.errorFilter(t);
	}
	e.isFatalError = t;
	function n(e, t) {
		return e === null || e(t);
	}
	e.isAppliedFilter = n;
	function r(e, t) {
		return e.split(/[/\\]/).join(t);
	}
	e.replacePathSegmentSeparator = r;
	function i(e, t, n) {
		return e === "" ? t : e.endsWith(n) ? e + t : e + n + t;
	}
	e.joinPathSegments = i;
})), fm = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 });
	var t = dm();
	e.default = class {
		constructor(e, n) {
			this._root = e, this._settings = n, this._root = t.replacePathSegmentSeparator(e, n.pathSegmentSeparator);
		}
	};
})), pm = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 });
	var t = k("events"), n = cm(), r = um(), i = dm(), a = fm();
	e.default = class extends a.default {
		constructor(e, i) {
			super(e, i), this._settings = i, this._scandir = n.scandir, this._emitter = new t.EventEmitter(), this._queue = r(this._worker.bind(this), this._settings.concurrency), this._isFatalError = !1, this._isDestroyed = !1, this._queue.drain = () => {
				this._isFatalError || this._emitter.emit("end");
			};
		}
		read() {
			return this._isFatalError = !1, this._isDestroyed = !1, setImmediate(() => {
				this._pushToQueue(this._root, this._settings.basePath);
			}), this._emitter;
		}
		get isDestroyed() {
			return this._isDestroyed;
		}
		destroy() {
			if (this._isDestroyed) throw Error("The reader is already destroyed");
			this._isDestroyed = !0, this._queue.killAndDrain();
		}
		onEntry(e) {
			this._emitter.on("entry", e);
		}
		onError(e) {
			this._emitter.once("error", e);
		}
		onEnd(e) {
			this._emitter.once("end", e);
		}
		_pushToQueue(e, t) {
			let n = {
				directory: e,
				base: t
			};
			this._queue.push(n, (e) => {
				e !== null && this._handleError(e);
			});
		}
		_worker(e, t) {
			this._scandir(e.directory, this._settings.fsScandirSettings, (n, r) => {
				if (n !== null) {
					t(n, void 0);
					return;
				}
				for (let t of r) this._handleEntry(t, e.base);
				t(null, void 0);
			});
		}
		_handleError(e) {
			this._isDestroyed || !i.isFatalError(this._settings, e) || (this._isFatalError = !0, this._isDestroyed = !0, this._emitter.emit("error", e));
		}
		_handleEntry(e, t) {
			if (this._isDestroyed || this._isFatalError) return;
			let n = e.path;
			t !== void 0 && (e.path = i.joinPathSegments(t, e.name, this._settings.pathSegmentSeparator)), i.isAppliedFilter(this._settings.entryFilter, e) && this._emitEntry(e), e.dirent.isDirectory() && i.isAppliedFilter(this._settings.deepFilter, e) && this._pushToQueue(n, t === void 0 ? void 0 : e.path);
		}
		_emitEntry(e) {
			this._emitter.emit("entry", e);
		}
	};
})), mm = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 });
	var t = pm();
	e.default = class {
		constructor(e, n) {
			this._root = e, this._settings = n, this._reader = new t.default(this._root, this._settings), this._storage = [];
		}
		read(e) {
			this._reader.onError((t) => {
				n(e, t);
			}), this._reader.onEntry((e) => {
				this._storage.push(e);
			}), this._reader.onEnd(() => {
				r(e, this._storage);
			}), this._reader.read();
		}
	};
	function n(e, t) {
		e(t);
	}
	function r(e, t) {
		e(null, t);
	}
})), hm = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 });
	var t = k("stream"), n = pm();
	e.default = class {
		constructor(e, r) {
			this._root = e, this._settings = r, this._reader = new n.default(this._root, this._settings), this._stream = new t.Readable({
				objectMode: !0,
				read: () => {},
				destroy: () => {
					this._reader.isDestroyed || this._reader.destroy();
				}
			});
		}
		read() {
			return this._reader.onError((e) => {
				this._stream.emit("error", e);
			}), this._reader.onEntry((e) => {
				this._stream.push(e);
			}), this._reader.onEnd(() => {
				this._stream.push(null);
			}), this._reader.read(), this._stream;
		}
	};
})), gm = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 });
	var t = cm(), n = dm(), r = fm();
	e.default = class extends r.default {
		constructor() {
			super(...arguments), this._scandir = t.scandirSync, this._storage = [], this._queue = /* @__PURE__ */ new Set();
		}
		read() {
			return this._pushToQueue(this._root, this._settings.basePath), this._handleQueue(), this._storage;
		}
		_pushToQueue(e, t) {
			this._queue.add({
				directory: e,
				base: t
			});
		}
		_handleQueue() {
			for (let e of this._queue.values()) this._handleDirectory(e.directory, e.base);
		}
		_handleDirectory(e, t) {
			try {
				let n = this._scandir(e, this._settings.fsScandirSettings);
				for (let e of n) this._handleEntry(e, t);
			} catch (e) {
				this._handleError(e);
			}
		}
		_handleError(e) {
			if (n.isFatalError(this._settings, e)) throw e;
		}
		_handleEntry(e, t) {
			let r = e.path;
			t !== void 0 && (e.path = n.joinPathSegments(t, e.name, this._settings.pathSegmentSeparator)), n.isAppliedFilter(this._settings.entryFilter, e) && this._pushToStorage(e), e.dirent.isDirectory() && n.isAppliedFilter(this._settings.deepFilter, e) && this._pushToQueue(r, t === void 0 ? void 0 : e.path);
		}
		_pushToStorage(e) {
			this._storage.push(e);
		}
	};
})), _m = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 });
	var t = gm();
	e.default = class {
		constructor(e, n) {
			this._root = e, this._settings = n, this._reader = new t.default(this._root, this._settings);
		}
		read() {
			return this._reader.read();
		}
	};
})), vm = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 });
	var t = k("path"), n = cm();
	e.default = class {
		constructor(e = {}) {
			this._options = e, this.basePath = this._getValue(this._options.basePath, void 0), this.concurrency = this._getValue(this._options.concurrency, Infinity), this.deepFilter = this._getValue(this._options.deepFilter, null), this.entryFilter = this._getValue(this._options.entryFilter, null), this.errorFilter = this._getValue(this._options.errorFilter, null), this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, t.sep), this.fsScandirSettings = new n.Settings({
				followSymbolicLinks: this._options.followSymbolicLinks,
				fs: this._options.fs,
				pathSegmentSeparator: this._options.pathSegmentSeparator,
				stats: this._options.stats,
				throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink
			});
		}
		_getValue(e, t) {
			return e ?? t;
		}
	};
})), ym = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.Settings = e.walkStream = e.walkSync = e.walk = void 0;
	var t = mm(), n = hm(), r = _m(), i = vm();
	e.Settings = i.default;
	function a(e, n, r) {
		if (typeof n == "function") {
			new t.default(e, c()).read(n);
			return;
		}
		new t.default(e, c(n)).read(r);
	}
	e.walk = a;
	function o(e, t) {
		let n = c(t);
		return new r.default(e, n).read();
	}
	e.walkSync = o;
	function s(e, t) {
		let r = c(t);
		return new n.default(e, r).read();
	}
	e.walkStream = s;
	function c(e = {}) {
		return e instanceof i.default ? e : new i.default(e);
	}
})), bm = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 });
	var t = k("path"), n = Zp(), r = Gp();
	e.default = class {
		constructor(e) {
			this._settings = e, this._fsStatSettings = new n.Settings({
				followSymbolicLink: this._settings.followSymbolicLinks,
				fs: this._settings.fs,
				throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks
			});
		}
		_getFullEntryPath(e) {
			return t.resolve(this._settings.cwd, e);
		}
		_makeEntry(e, t) {
			let n = {
				name: t,
				path: t,
				dirent: r.fs.createDirentFromStats(t, e)
			};
			return this._settings.stats && (n.stats = e), n;
		}
		_isFatalError(e) {
			return !r.errno.isEnoentCodeError(e) && !this._settings.suppressErrors;
		}
	};
})), xm = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 });
	var t = k("stream"), n = Zp(), r = ym(), i = bm();
	e.default = class extends i.default {
		constructor() {
			super(...arguments), this._walkStream = r.walkStream, this._stat = n.stat;
		}
		dynamic(e, t) {
			return this._walkStream(e, t);
		}
		static(e, n) {
			let r = e.map(this._getFullEntryPath, this), i = new t.PassThrough({ objectMode: !0 });
			i._write = (t, a, o) => this._getEntry(r[t], e[t], n).then((e) => {
				e !== null && n.entryFilter(e) && i.push(e), t === r.length - 1 && i.end(), o();
			}).catch(o);
			for (let e = 0; e < r.length; e++) i.write(e);
			return i;
		}
		_getEntry(e, t, n) {
			return this._getStat(e).then((e) => this._makeEntry(e, t)).catch((e) => {
				if (n.errorFilter(e)) return null;
				throw e;
			});
		}
		_getStat(e) {
			return new Promise((t, n) => {
				this._stat(e, this._fsStatSettings, (e, r) => e === null ? t(r) : n(e));
			});
		}
	};
})), Sm = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 });
	var t = ym(), n = bm(), r = xm();
	e.default = class extends n.default {
		constructor() {
			super(...arguments), this._walkAsync = t.walk, this._readerStream = new r.default(this._settings);
		}
		dynamic(e, t) {
			return new Promise((n, r) => {
				this._walkAsync(e, t, (e, t) => {
					e === null ? n(t) : r(e);
				});
			});
		}
		async static(e, t) {
			let n = [], r = this._readerStream.static(e, t);
			return new Promise((e, t) => {
				r.once("error", t), r.on("data", (e) => n.push(e)), r.once("end", () => e(n));
			});
		}
	};
})), Cm = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 });
	var t = Gp();
	e.default = class {
		constructor(e, t, n) {
			this._patterns = e, this._settings = t, this._micromatchOptions = n, this._storage = [], this._fillStorage();
		}
		_fillStorage() {
			for (let e of this._patterns) {
				let t = this._getPatternSegments(e), n = this._splitSegmentsIntoSections(t);
				this._storage.push({
					complete: n.length <= 1,
					pattern: e,
					segments: t,
					sections: n
				});
			}
		}
		_getPatternSegments(e) {
			return t.pattern.getPatternParts(e, this._micromatchOptions).map((e) => t.pattern.isDynamicPattern(e, this._settings) ? {
				dynamic: !0,
				pattern: e,
				patternRe: t.pattern.makeRe(e, this._micromatchOptions)
			} : {
				dynamic: !1,
				pattern: e
			});
		}
		_splitSegmentsIntoSections(e) {
			return t.array.splitWhen(e, (e) => e.dynamic && t.pattern.hasGlobStar(e.pattern));
		}
	};
})), wm = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 });
	var t = Cm();
	e.default = class extends t.default {
		match(e) {
			let t = e.split("/"), n = t.length, r = this._storage.filter((e) => !e.complete || e.segments.length > n);
			for (let e of r) {
				let r = e.sections[0];
				if (!e.complete && n > r.length || t.every((t, n) => {
					let r = e.segments[n];
					return !!(r.dynamic && r.patternRe.test(t) || !r.dynamic && r.pattern === t);
				})) return !0;
			}
			return !1;
		}
	};
})), Tm = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 });
	var t = Gp(), n = wm();
	e.default = class {
		constructor(e, t) {
			this._settings = e, this._micromatchOptions = t;
		}
		getFilter(e, t, n) {
			let r = this._getMatcher(t), i = this._getNegativePatternsRe(n);
			return (t) => this._filter(e, t, r, i);
		}
		_getMatcher(e) {
			return new n.default(e, this._settings, this._micromatchOptions);
		}
		_getNegativePatternsRe(e) {
			let n = e.filter(t.pattern.isAffectDepthOfReadingPattern);
			return t.pattern.convertPatternsToRe(n, this._micromatchOptions);
		}
		_filter(e, n, r, i) {
			if (this._isSkippedByDeep(e, n.path) || this._isSkippedSymbolicLink(n)) return !1;
			let a = t.path.removeLeadingDotSegment(n.path);
			return this._isSkippedByPositivePatterns(a, r) ? !1 : this._isSkippedByNegativePatterns(a, i);
		}
		_isSkippedByDeep(e, t) {
			return this._settings.deep === Infinity ? !1 : this._getEntryLevel(e, t) >= this._settings.deep;
		}
		_getEntryLevel(e, t) {
			let n = t.split("/").length;
			return e === "" ? n : n - e.split("/").length;
		}
		_isSkippedSymbolicLink(e) {
			return !this._settings.followSymbolicLinks && e.dirent.isSymbolicLink();
		}
		_isSkippedByPositivePatterns(e, t) {
			return !this._settings.baseNameMatch && !t.match(e);
		}
		_isSkippedByNegativePatterns(e, n) {
			return !t.pattern.matchAny(e, n);
		}
	};
})), Em = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 });
	var t = Gp();
	e.default = class {
		constructor(e, t) {
			this._settings = e, this._micromatchOptions = t, this.index = /* @__PURE__ */ new Map();
		}
		getFilter(e, n) {
			let [r, i] = t.pattern.partitionAbsoluteAndRelative(n), a = {
				positive: { all: t.pattern.convertPatternsToRe(e, this._micromatchOptions) },
				negative: {
					absolute: t.pattern.convertPatternsToRe(r, Object.assign(Object.assign({}, this._micromatchOptions), { dot: !0 })),
					relative: t.pattern.convertPatternsToRe(i, Object.assign(Object.assign({}, this._micromatchOptions), { dot: !0 }))
				}
			};
			return (e) => this._filter(e, a);
		}
		_filter(e, n) {
			let r = t.path.removeLeadingDotSegment(e.path);
			if (this._settings.unique && this._isDuplicateEntry(r) || this._onlyFileFilter(e) || this._onlyDirectoryFilter(e)) return !1;
			let i = this._isMatchToPatternsSet(r, n, e.dirent.isDirectory());
			return this._settings.unique && i && this._createIndexRecord(r), i;
		}
		_isDuplicateEntry(e) {
			return this.index.has(e);
		}
		_createIndexRecord(e) {
			this.index.set(e, void 0);
		}
		_onlyFileFilter(e) {
			return this._settings.onlyFiles && !e.dirent.isFile();
		}
		_onlyDirectoryFilter(e) {
			return this._settings.onlyDirectories && !e.dirent.isDirectory();
		}
		_isMatchToPatternsSet(e, t, n) {
			return !(!this._isMatchToPatterns(e, t.positive.all, n) || this._isMatchToPatterns(e, t.negative.relative, n) || this._isMatchToAbsoluteNegative(e, t.negative.absolute, n));
		}
		_isMatchToAbsoluteNegative(e, n, r) {
			if (n.length === 0) return !1;
			let i = t.path.makeAbsolute(this._settings.cwd, e);
			return this._isMatchToPatterns(i, n, r);
		}
		_isMatchToPatterns(e, n, r) {
			if (n.length === 0) return !1;
			let i = t.pattern.matchAny(e, n);
			return !i && r ? t.pattern.matchAny(e + "/", n) : i;
		}
	};
})), Dm = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 });
	var t = Gp();
	e.default = class {
		constructor(e) {
			this._settings = e;
		}
		getFilter() {
			return (e) => this._isNonFatalError(e);
		}
		_isNonFatalError(e) {
			return t.errno.isEnoentCodeError(e) || this._settings.suppressErrors;
		}
	};
})), Om = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 });
	var t = Gp();
	e.default = class {
		constructor(e) {
			this._settings = e;
		}
		getTransformer() {
			return (e) => this._transform(e);
		}
		_transform(e) {
			let n = e.path;
			return this._settings.absolute && (n = t.path.makeAbsolute(this._settings.cwd, n), n = t.path.unixify(n)), this._settings.markDirectories && e.dirent.isDirectory() && (n += "/"), this._settings.objectMode ? Object.assign(Object.assign({}, e), { path: n }) : n;
		}
	};
})), km = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 });
	var t = k("path"), n = Tm(), r = Em(), i = Dm(), a = Om();
	e.default = class {
		constructor(e) {
			this._settings = e, this.errorFilter = new i.default(this._settings), this.entryFilter = new r.default(this._settings, this._getMicromatchOptions()), this.deepFilter = new n.default(this._settings, this._getMicromatchOptions()), this.entryTransformer = new a.default(this._settings);
		}
		_getRootDirectory(e) {
			return t.resolve(this._settings.cwd, e.base);
		}
		_getReaderOptions(e) {
			let t = e.base === "." ? "" : e.base;
			return {
				basePath: t,
				pathSegmentSeparator: "/",
				concurrency: this._settings.concurrency,
				deepFilter: this.deepFilter.getFilter(t, e.positive, e.negative),
				entryFilter: this.entryFilter.getFilter(e.positive, e.negative),
				errorFilter: this.errorFilter.getFilter(),
				followSymbolicLinks: this._settings.followSymbolicLinks,
				fs: this._settings.fs,
				stats: this._settings.stats,
				throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,
				transform: this.entryTransformer.getTransformer()
			};
		}
		_getMicromatchOptions() {
			return {
				dot: this._settings.dot,
				matchBase: this._settings.baseNameMatch,
				nobrace: !this._settings.braceExpansion,
				nocase: !this._settings.caseSensitiveMatch,
				noext: !this._settings.extglob,
				noglobstar: !this._settings.globstar,
				posix: !0,
				strictSlashes: !1
			};
		}
	};
})), Am = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 });
	var t = Sm(), n = km();
	e.default = class extends n.default {
		constructor() {
			super(...arguments), this._reader = new t.default(this._settings);
		}
		async read(e) {
			let t = this._getRootDirectory(e), n = this._getReaderOptions(e);
			return (await this.api(t, e, n)).map((e) => n.transform(e));
		}
		api(e, t, n) {
			return t.dynamic ? this._reader.dynamic(e, n) : this._reader.static(t.patterns, n);
		}
	};
})), jm = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 });
	var t = k("stream"), n = xm(), r = km();
	e.default = class extends r.default {
		constructor() {
			super(...arguments), this._reader = new n.default(this._settings);
		}
		read(e) {
			let n = this._getRootDirectory(e), r = this._getReaderOptions(e), i = this.api(n, e, r), a = new t.Readable({
				objectMode: !0,
				read: () => {}
			});
			return i.once("error", (e) => a.emit("error", e)).on("data", (e) => a.emit("data", r.transform(e))).once("end", () => a.emit("end")), a.once("close", () => i.destroy()), a;
		}
		api(e, t, n) {
			return t.dynamic ? this._reader.dynamic(e, n) : this._reader.static(t.patterns, n);
		}
	};
})), Mm = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 });
	var t = Zp(), n = ym(), r = bm();
	e.default = class extends r.default {
		constructor() {
			super(...arguments), this._walkSync = n.walkSync, this._statSync = t.statSync;
		}
		dynamic(e, t) {
			return this._walkSync(e, t);
		}
		static(e, t) {
			let n = [];
			for (let r of e) {
				let e = this._getFullEntryPath(r), i = this._getEntry(e, r, t);
				i === null || !t.entryFilter(i) || n.push(i);
			}
			return n;
		}
		_getEntry(e, t, n) {
			try {
				let n = this._getStat(e);
				return this._makeEntry(n, t);
			} catch (e) {
				if (n.errorFilter(e)) return null;
				throw e;
			}
		}
		_getStat(e) {
			return this._statSync(e, this._fsStatSettings);
		}
	};
})), Nm = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 });
	var t = Mm(), n = km();
	e.default = class extends n.default {
		constructor() {
			super(...arguments), this._reader = new t.default(this._settings);
		}
		read(e) {
			let t = this._getRootDirectory(e), n = this._getReaderOptions(e);
			return this.api(t, e, n).map(n.transform);
		}
		api(e, t, n) {
			return t.dynamic ? this._reader.dynamic(e, n) : this._reader.static(t.patterns, n);
		}
	};
})), Pm = /* @__PURE__ */ w(((e) => {
	Object.defineProperty(e, "__esModule", { value: !0 }), e.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
	var t = k("fs"), n = k("os"), r = Math.max(n.cpus().length, 1);
	e.DEFAULT_FILE_SYSTEM_ADAPTER = {
		lstat: t.lstat,
		lstatSync: t.lstatSync,
		stat: t.stat,
		statSync: t.statSync,
		readdir: t.readdir,
		readdirSync: t.readdirSync
	}, e.default = class {
		constructor(e = {}) {
			this._options = e, this.absolute = this._getValue(this._options.absolute, !1), this.baseNameMatch = this._getValue(this._options.baseNameMatch, !1), this.braceExpansion = this._getValue(this._options.braceExpansion, !0), this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, !0), this.concurrency = this._getValue(this._options.concurrency, r), this.cwd = this._getValue(this._options.cwd, process.cwd()), this.deep = this._getValue(this._options.deep, Infinity), this.dot = this._getValue(this._options.dot, !1), this.extglob = this._getValue(this._options.extglob, !0), this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, !0), this.fs = this._getFileSystemMethods(this._options.fs), this.globstar = this._getValue(this._options.globstar, !0), this.ignore = this._getValue(this._options.ignore, []), this.markDirectories = this._getValue(this._options.markDirectories, !1), this.objectMode = this._getValue(this._options.objectMode, !1), this.onlyDirectories = this._getValue(this._options.onlyDirectories, !1), this.onlyFiles = this._getValue(this._options.onlyFiles, !0), this.stats = this._getValue(this._options.stats, !1), this.suppressErrors = this._getValue(this._options.suppressErrors, !1), this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, !1), this.unique = this._getValue(this._options.unique, !0), this.onlyDirectories && (this.onlyFiles = !1), this.stats && (this.objectMode = !0), this.ignore = [].concat(this.ignore);
		}
		_getValue(e, t) {
			return e === void 0 ? t : e;
		}
		_getFileSystemMethods(t = {}) {
			return Object.assign(Object.assign({}, e.DEFAULT_FILE_SYSTEM_ADAPTER), t);
		}
	};
})), Fm = /* @__PURE__ */ D((/* @__PURE__ */ w(((e, t) => {
	var n = Kp(), r = Am(), i = jm(), a = Nm(), o = Pm(), s = Gp();
	async function c(e, t) {
		u(e);
		let n = l(e, r.default, t), i = await Promise.all(n);
		return s.array.flatten(i);
	}
	(function(e) {
		e.glob = e, e.globSync = t, e.globStream = r, e.async = e;
		function t(e, t) {
			u(e);
			let n = l(e, a.default, t);
			return s.array.flatten(n);
		}
		e.sync = t;
		function r(e, t) {
			u(e);
			let n = l(e, i.default, t);
			return s.stream.merge(n);
		}
		e.stream = r;
		function c(e, t) {
			u(e);
			let r = [].concat(e), i = new o.default(t);
			return n.generate(r, i);
		}
		e.generateTasks = c;
		function d(e, t) {
			u(e);
			let n = new o.default(t);
			return s.pattern.isDynamicPattern(e, n);
		}
		e.isDynamicPattern = d;
		function f(e) {
			return u(e), s.path.escape(e);
		}
		e.escapePath = f;
		function p(e) {
			return u(e), s.path.convertPathToPattern(e);
		}
		e.convertPathToPattern = p, (function(e) {
			function t(e) {
				return u(e), s.path.escapePosixPath(e);
			}
			e.escapePath = t;
			function n(e) {
				return u(e), s.path.convertPosixPathToPattern(e);
			}
			e.convertPathToPattern = n;
		})(e.posix ||= {}), (function(e) {
			function t(e) {
				return u(e), s.path.escapeWindowsPath(e);
			}
			e.escapePath = t;
			function n(e) {
				return u(e), s.path.convertWindowsPathToPattern(e);
			}
			e.convertPathToPattern = n;
		})(e.win32 ||= {});
	})(c ||= {});
	function l(e, t, r) {
		let i = [].concat(e), a = new o.default(r), s = n.generate(i, a), c = new t(a);
		return s.map(c.read, c);
	}
	function u(e) {
		if (![].concat(e).every((e) => s.string.isString(e) && !s.string.isEmpty(e))) throw TypeError("Patterns must be a string (non empty) or an array of strings");
	}
	t.exports = c;
})))(), 1), Im = { ignore: ["**/node_modules/**", "**/.pnpm-store/**"] }, Lm = async (e) => {
	let r = t.join(t.dirname(e), "pnpm-workspace.yaml"), i;
	try {
		i = await n.readFile(r, "utf-8");
	} catch {
		return null;
	}
	return (0, Nd.parse)(i);
}, Rm = async (e) => {
	let r = t.join(t.dirname(e), ".yarnrc.yml"), i;
	try {
		i = await n.readFile(r, "utf-8");
	} catch {
		return null;
	}
	return (0, Nd.parse)(i);
}, zm = async (e, t) => {
	let r = {};
	if (e.packageManager === "pnpm") {
		let e = await Lm(t);
		e && !Array.isArray(e) && (e.catalog && Object.assign(r, e.catalog), e.catalogs && Object.assign(r, ...Object.values(e.catalogs)), e.workspaces && !Array.isArray(e.workspaces) && (e.workspaces.catalog && Object.assign(r, e.workspaces.catalog), e.workspaces.catalogs && Object.assign(r, ...Object.values(e.workspaces.catalogs))));
	}
	if (e.packageManager === "yarn") {
		let e = await Rm(t);
		e && (e.catalog && Object.assign(r, e.catalog), e.catalogs && Object.assign(r, ...Object.values(e.catalogs)));
	}
	let i = JSON.parse(await n.readFile(t, "utf-8"));
	return Object.assign(r, i.catalog, ...Object.values(i.catalogs ?? {})), i.workspaces && !Array.isArray(i.workspaces) && Object.assign(r, i.workspaces.catalog, ...Object.values(i.workspaces.catalogs ?? {})), Object.keys(r).length > 0 ? r : null;
};
async function Bm(e, n, r, i) {
	let { pkgData: a, pkgPath: o } = await gp({
		...e,
		packageFile: r,
		loglevel: "silent"
	}), s = (typeof a == "string" ? JSON.parse(a) : a).workspaces || await Lm(o || ""), c = Array.isArray(s) ? s : s?.packages;
	c || Df(e, `workspaces property missing from package.json. --workspace${e.workspaces ? "s" : ""} only works when you specify a "workspaces" property in your package.json.`);
	let l = e.packageFile ? t.dirname(t.resolve(e.packageFile)) : i, u = await (0, Fm.default)((c || []).map((e) => t.join(l, e, "package.json").replace(/\\/g, "/")), Im), d = await Promise.all(u.map(async (t) => {
		let n = await Of(e, t);
		return n.name = n.pkg.name || t.split("/").slice(-2)[0], n;
	})), f = d.map((e) => e.name || "");
	return e.workspaces === !0 ? [d, f] : [d.filter((r) => e.workspace?.some((e) => c?.some((i) => r.name === e || r.filepath === t.join(l, t.dirname(i), e, n).replace(/\\/g, "/")))), f];
}
async function Vm(e, n) {
	if (!n) return null;
	let r = await zm(e, n);
	if (!r) return null;
	let i = {
		name: "catalog-dependencies",
		version: "1.0.0",
		dependencies: r
	};
	return {
		filepath: e.packageManager === "pnpm" ? t.join(t.dirname(n), "pnpm-workspace.yaml") : e.packageManager === "yarn" ? t.join(t.dirname(n), ".yarnrc.yml") : `${n}#catalog`,
		pkg: i,
		pkgFile: JSON.stringify(i, null, 2),
		name: "catalogs"
	};
}
async function Hm(e) {
	let n = e.packageFile || "package.json", r = e.cwd ? Zc(e.cwd) : "./", i = e.packageFile || (e.cwd ? t.join(r, "package.json") : "package.json"), a = e.workspaces === !0 || e.workspace !== void 0 && e.workspace.length !== 0, o = [];
	if (!a || e.root === !0) {
		let t = await (0, Fm.default)(i.replace(/\\/g, "/"), Im), n = await Promise.all(t.map(async (t) => await Of(e, t)));
		o = [...o, ...n];
	}
	if (!a) return [o, []];
	let s = null;
	if (a) {
		let { pkgPath: t } = await gp({
			...e,
			packageFile: i,
			loglevel: "silent"
		});
		t && (s = await Vm(e, t));
	}
	let [c, l] = await Bm(e, n, i, r);
	return o = [...o, ...c], s && (o = [...o, s]), [o, l];
}
//#endregion
//#region src/lib/getNcuRc.ts
var Um = (/* @__PURE__ */ w(((e, t) => {
	var n = k("path"), r = k("fs"), i = k("os"), a = k("url"), o = r.promises.readFile;
	function s(e, t) {
		return [
			"package.json",
			`.${e}rc.json`,
			`.${e}rc.js`,
			`.${e}rc.cjs`,
			...t ? [] : [`.${e}rc.mjs`],
			`.config/${e}rc`,
			`.config/${e}rc.json`,
			`.config/${e}rc.js`,
			`.config/${e}rc.cjs`,
			...t ? [] : [`.config/${e}rc.mjs`],
			`${e}.config.js`,
			`${e}.config.cjs`,
			...t ? [] : [`${e}.config.mjs`]
		];
	}
	function c(e) {
		return n.dirname(e) || n.sep;
	}
	var l = (e, t) => JSON.parse(t), u = typeof __webpack_require__ == "function" ? __non_webpack_require__ : k, d = Object.freeze({
		".js": u,
		".json": u,
		".cjs": u,
		noExt: l
	});
	t.exports.defaultLoadersSync = d;
	var f = async (e) => {
		try {
			return (await import(
				/* webpackIgnore: true */
				a.pathToFileURL(e).href
)).default;
		} catch (t) {
			try {
				return u(e);
			} catch (e) {
				throw e.code === "ERR_REQUIRE_ESM" || e instanceof SyntaxError && e.toString().includes("Cannot use import statement outside a module") ? t : e;
			}
		}
	}, p = Object.freeze({
		".js": f,
		".mjs": f,
		".cjs": f,
		".json": l,
		noExt: l
	});
	t.exports.defaultLoaders = p;
	function m(e, t, r) {
		let a = {
			stopDir: i.homedir(),
			searchPlaces: s(e, r),
			ignoreEmptySearchPlaces: !0,
			cache: !0,
			transform: (e) => e,
			packageProp: [e],
			...t,
			loaders: {
				...r ? d : p,
				...t.loaders
			}
		};
		return a.searchPlaces.forEach((e) => {
			let t = n.extname(e) || "noExt", r = a.loaders[t];
			if (!r) throw Error(`Missing loader for extension "${e}"`);
			if (typeof r != "function") throw Error(`Loader for extension "${e}" is not a function: Received ${typeof r}.`);
		}), a;
	}
	function h(e, t) {
		return typeof e == "string" && e in t ? t[e] : (Array.isArray(e) ? e : e.split(".")).reduce((e, t) => e === void 0 ? e : e[t], t) || null;
	}
	function g(e) {
		if (!e) throw Error("load must pass a non-empty string");
	}
	function _(e, t) {
		if (!e) throw Error(`No loader specified for extension "${t}"`);
		if (typeof e != "function") throw Error("loader is not a function");
	}
	var v = (e) => (t, n, r) => (e && t.set(n, r), r);
	t.exports.lilconfig = function(e, t) {
		let { ignoreEmptySearchPlaces: i, loaders: a, packageProp: s, searchPlaces: l, stopDir: u, transform: d, cache: f } = m(e, t ?? {}, !1), p = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), b = v(f);
		return {
			async search(e = process.cwd()) {
				let t = {
					config: null,
					filepath: ""
				}, m = /* @__PURE__ */ new Set(), g = e;
				dirLoop: for (;;) {
					if (f) {
						let e = p.get(g);
						if (e !== void 0) {
							for (let t of m) p.set(t, e);
							return e;
						}
						m.add(g);
					}
					for (let e of l) {
						let c = n.join(g, e);
						try {
							await r.promises.access(c);
						} catch {
							continue;
						}
						let l = String(await o(c)), u = n.extname(e) || "noExt", d = a[u];
						if (e === "package.json") {
							let e = h(s, await d(c, l));
							if (e != null) {
								t.config = e, t.filepath = c;
								break dirLoop;
							}
							continue;
						}
						let f = l.trim() === "";
						if (!(f && i)) {
							f ? (t.isEmpty = !0, t.config = void 0) : (_(d, u), t.config = await d(c, l)), t.filepath = c;
							break dirLoop;
						}
					}
					if (g === u || g === c(g)) break dirLoop;
					g = c(g);
				}
				let v = t.filepath === "" && t.config === null ? d(null) : d(t);
				if (f) for (let e of m) p.set(e, v);
				return v;
			},
			async load(e) {
				g(e);
				let t = n.resolve(process.cwd(), e);
				if (f && y.has(t)) return y.get(t);
				let { base: r, ext: c } = n.parse(t), l = c || "noExt", u = a[l];
				_(u, l);
				let p = String(await o(t));
				if (r === "package.json") return b(y, t, d({
					config: h(s, await u(t, p)),
					filepath: t
				}));
				let m = {
					config: null,
					filepath: t
				}, v = p.trim() === "";
				return v && i ? b(y, t, d({
					config: void 0,
					filepath: t,
					isEmpty: !0
				})) : (m.config = v ? void 0 : await u(t, p), b(y, t, d(v ? {
					...m,
					isEmpty: v,
					config: void 0
				} : m)));
			},
			clearLoadCache() {
				f && y.clear();
			},
			clearSearchCache() {
				f && p.clear();
			},
			clearCaches() {
				f && (y.clear(), p.clear());
			}
		};
	}, t.exports.lilconfigSync = function(e, t) {
		let { ignoreEmptySearchPlaces: i, loaders: a, packageProp: o, searchPlaces: s, stopDir: l, transform: u, cache: d } = m(e, t ?? {}, !0), f = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), y = v(d);
		return {
			search(e = process.cwd()) {
				let t = {
					config: null,
					filepath: ""
				}, p = /* @__PURE__ */ new Set(), m = e;
				dirLoop: for (;;) {
					if (d) {
						let e = f.get(m);
						if (e !== void 0) {
							for (let t of p) f.set(t, e);
							return e;
						}
						p.add(m);
					}
					for (let e of s) {
						let s = n.join(m, e);
						try {
							r.accessSync(s);
						} catch {
							continue;
						}
						let c = n.extname(e) || "noExt", l = a[c], u = String(r.readFileSync(s));
						if (e === "package.json") {
							let e = h(o, l(s, u));
							if (e != null) {
								t.config = e, t.filepath = s;
								break dirLoop;
							}
							continue;
						}
						let d = u.trim() === "";
						if (!(d && i)) {
							d ? (t.isEmpty = !0, t.config = void 0) : (_(l, c), t.config = l(s, u)), t.filepath = s;
							break dirLoop;
						}
					}
					if (m === l || m === c(m)) break dirLoop;
					m = c(m);
				}
				let g = t.filepath === "" && t.config === null ? u(null) : u(t);
				if (d) for (let e of p) f.set(e, g);
				return g;
			},
			load(e) {
				g(e);
				let t = n.resolve(process.cwd(), e);
				if (d && p.has(t)) return p.get(t);
				let { base: s, ext: c } = n.parse(t), l = c || "noExt", f = a[l];
				_(f, l);
				let m = String(r.readFileSync(t));
				if (s === "package.json") return u({
					config: h(o, f(t, m)),
					filepath: t
				});
				let v = {
					config: null,
					filepath: t
				}, b = m.trim() === "";
				return b && i ? y(p, t, u({
					filepath: t,
					config: void 0,
					isEmpty: !0
				})) : (v.config = b ? void 0 : f(t, m), y(p, t, u(b ? {
					...v,
					isEmpty: b,
					config: void 0
				} : v)));
			},
			clearLoadCache() {
				d && p.clear();
			},
			clearSearchCache() {
				d && f.clear();
			},
			clearCaches() {
				d && (p.clear(), f.clear());
			}
		};
	};
})))(), Wm = (e, t) => {
	try {
		return (0, Nd.parse)(t);
	} catch (t) {
		throw Error(`YAML Error in ${e}:\n${t.message}`, { cause: t });
	}
};
function Gm(e, n) {
	let r = t.basename(n), i = e.includes("__filename is not defined") || e.includes("__dirname is not defined") || e.includes("require is not defined") || e.includes("module is not defined") || e.includes("exports is not defined"), a = e.includes("Cannot use import statement outside a module") || e.includes("Unexpected token 'export'") || e.includes("Unexpected token 'import'") || e.includes("SyntaxError: export ") || e.includes("SyntaxError") && e.includes("import"), o = n.endsWith(".js") && !n.endsWith(".cjs") && !n.endsWith(".mjs");
	return i && o ? `${r} uses CommonJS syntax (require/module.exports) but your package.json has "type": "module".\n\nRecommended: Convert to ESM syntax:\n  import { ... } from '...'\n  export default { ... }\n\nAlternative: Rename to ${r.replace(".js", ".cjs")} to keep CommonJS syntax.` : a && o ? `${r} uses ESM syntax (import/export) but your package.json has "type": "commonjs".\n\nRecommended: Add "type": "module" to your package.json to use ESM throughout your project.\n\nAlternative: Rename to ${r.replace(".js", ".mjs")} to keep CommonJS in package.json.` : null;
}
async function Km({ configFileName: e, configFilePath: n, packageFile: i, global: a, options: o }) {
	let s = jn(o?.color), c = (0, Um.lilconfig)("ncu", {
		searchPlaces: [
			".ncurc",
			".ncurc.json",
			".ncurc.yaml",
			".ncurc.yml",
			".ncurc.mjs",
			".ncurc.cjs",
			".ncurc.js"
		],
		loaders: {
			noExt: Wm,
			".yaml": Wm,
			".yml": Wm
		}
	}), l = n || (a ? r.homedir() : i ? t.dirname(i) : process.cwd()), u = null, d;
	try {
		e ? (d = t.isAbsolute(e) ? e : t.join(l, e), u = await c.load(d)) : u = await c.search(l);
	} catch (t) {
		let n = t.message || "", r = d || e || ".ncurc.js";
		e && (t.code === "ENOENT" || n.includes("no such file or directory")) && Df(o, `Config file ${e} not found in ${l}`);
		let i = Gm(n, r);
		i && Df(o, i), Df(o, `Config file error: ${n}`);
	}
	let f = u?.filepath, { $schema: p, ...m } = u?.config || {}, h = m || {};
	typeof h.format == "string" && (h.format = wi.format.parse(h.format));
	let g = Object.keys(h).filter((e) => !wi[e]);
	return g.length > 0 && (console.error(s.red(`Unknown option${g.length === 1 ? "" : "s"} found in config file:`), s.gray(g.join(", "))), console.info("Using config file " + f), console.info(`You can change the config file path with ${s.blue("--configFilePath")}`)), {
		filePath: f,
		args: Object.entries(h).flatMap(([e, t]) => typeof t == "boolean" || wi[e]?.type === "boolean" ? t ? [`--${e}`] : [] : [`--${e}`, t]),
		config: h
	};
}
//#endregion
//#region node_modules/picomatch/lib/constants.js
var qm = /* @__PURE__ */ w(((e, t) => {
	var n = "\\\\/", r = `[^${n}]`, i = 0, a = "\\.", o = "\\+", s = "\\?", c = "\\/", l = "(?=.)", u = "[^/]", d = `(?:${c}|$)`, f = `(?:^|${c})`, p = `${a}{1,2}${d}`, m = {
		DOT_LITERAL: a,
		PLUS_LITERAL: o,
		QMARK_LITERAL: s,
		SLASH_LITERAL: c,
		ONE_CHAR: l,
		QMARK: u,
		END_ANCHOR: d,
		DOTS_SLASH: p,
		NO_DOT: `(?!${a})`,
		NO_DOTS: `(?!${f}${p})`,
		NO_DOT_SLASH: `(?!${a}{0,1}${d})`,
		NO_DOTS_SLASH: `(?!${p})`,
		QMARK_NO_DOT: `[^.${c}]`,
		STAR: `${u}*?`,
		START_ANCHOR: f,
		SEP: "/"
	}, h = {
		...m,
		SLASH_LITERAL: `[${n}]`,
		QMARK: r,
		STAR: `${r}*?`,
		DOTS_SLASH: `${a}{1,2}(?:[${n}]|$)`,
		NO_DOT: `(?!${a})`,
		NO_DOTS: `(?!(?:^|[${n}])${a}{1,2}(?:[${n}]|$))`,
		NO_DOT_SLASH: `(?!${a}{0,1}(?:[${n}]|$))`,
		NO_DOTS_SLASH: `(?!${a}{1,2}(?:[${n}]|$))`,
		QMARK_NO_DOT: `[^.${n}]`,
		START_ANCHOR: `(?:^|[${n}])`,
		END_ANCHOR: `(?:[${n}]|$)`,
		SEP: "\\"
	};
	t.exports = {
		DEFAULT_MAX_EXTGLOB_RECURSION: i,
		MAX_LENGTH: 1024 * 64,
		POSIX_REGEX_SOURCE: {
			__proto__: null,
			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"
		},
		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: {
			__proto__: null,
			"***": "*",
			"**/**": "**",
			"**/**/**": "**"
		},
		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,
		extglobChars(e) {
			return {
				"!": {
					type: "negate",
					open: "(?:(?!(?:",
					close: `))${e.STAR})`
				},
				"?": {
					type: "qmark",
					open: "(?:",
					close: ")?"
				},
				"+": {
					type: "plus",
					open: "(?:",
					close: ")+"
				},
				"*": {
					type: "star",
					open: "(?:",
					close: ")*"
				},
				"@": {
					type: "at",
					open: "(?:",
					close: ")"
				}
			};
		},
		globChars(e) {
			return e === !0 ? h : m;
		}
	};
})), Jm = /* @__PURE__ */ w(((e) => {
	var { REGEX_BACKSLASH: t, REGEX_REMOVE_BACKSLASH: n, REGEX_SPECIAL_CHARS: r, REGEX_SPECIAL_CHARS_GLOBAL: i } = qm();
	e.isObject = (e) => typeof e == "object" && !!e && !Array.isArray(e), e.hasRegexChars = (e) => r.test(e), e.isRegexChar = (t) => t.length === 1 && e.hasRegexChars(t), e.escapeRegex = (e) => e.replace(i, "\\$1"), e.toPosixSlashes = (e) => e.replace(t, "/"), e.isWindows = () => {
		if (typeof navigator < "u" && navigator.platform) {
			let e = navigator.platform.toLowerCase();
			return e === "win32" || e === "windows";
		}
		return typeof process < "u" && process.platform ? process.platform === "win32" : !1;
	}, e.removeBackslashes = (e) => e.replace(n, (e) => e === "\\" ? "" : e), e.escapeLast = (t, n, r) => {
		let i = t.lastIndexOf(n, r);
		return i === -1 ? t : t[i - 1] === "\\" ? e.escapeLast(t, n, i - 1) : `${t.slice(0, i)}\\${t.slice(i)}`;
	}, e.removePrefix = (e, t = {}) => {
		let n = e;
		return n.startsWith("./") && (n = n.slice(2), t.prefix = "./"), n;
	}, e.wrapOutput = (e, t = {}, n = {}) => {
		let r = `${n.contains ? "" : "^"}(?:${e})${n.contains ? "" : "$"}`;
		return t.negated === !0 && (r = `(?:^(?!${r}).*$)`), r;
	}, e.basename = (e, { windows: t } = {}) => {
		let n = e.split(t ? /[\\/]/ : "/"), r = n[n.length - 1];
		return r === "" ? n[n.length - 2] : r;
	};
})), Ym = /* @__PURE__ */ w(((e, t) => {
	var n = Jm(), { CHAR_ASTERISK: r, CHAR_AT: i, CHAR_BACKWARD_SLASH: a, CHAR_COMMA: o, CHAR_DOT: s, CHAR_EXCLAMATION_MARK: c, CHAR_FORWARD_SLASH: l, CHAR_LEFT_CURLY_BRACE: u, CHAR_LEFT_PARENTHESES: d, CHAR_LEFT_SQUARE_BRACKET: f, CHAR_PLUS: p, CHAR_QUESTION_MARK: m, CHAR_RIGHT_CURLY_BRACE: h, CHAR_RIGHT_PARENTHESES: g, CHAR_RIGHT_SQUARE_BRACKET: _ } = qm(), v = (e) => e === l || e === a, y = (e) => {
		e.isPrefix !== !0 && (e.depth = e.isGlobstar ? Infinity : 1);
	};
	t.exports = (e, t) => {
		let b = t || {}, x = e.length - 1, S = b.parts === !0 || b.scanToEnd === !0, C = [], w = [], T = [], E = e, D = -1, O = 0, k = 0, A = !1, j = !1, M = !1, N = !1, P = !1, F = !1, I = !1, L = !1, R = !1, z = !1, B = 0, V, H, U = {
			value: "",
			depth: 0,
			isGlob: !1
		}, ee = () => D >= x, W = () => E.charCodeAt(D + 1), G = () => (V = H, E.charCodeAt(++D));
		for (; D < x;) {
			H = G();
			let e;
			if (H === a) {
				I = U.backslashes = !0, H = G(), H === u && (F = !0);
				continue;
			}
			if (F === !0 || H === u) {
				for (B++; ee() !== !0 && (H = G());) {
					if (H === a) {
						I = U.backslashes = !0, G();
						continue;
					}
					if (H === u) {
						B++;
						continue;
					}
					if (F !== !0 && H === s && (H = G()) === s) {
						if (A = U.isBrace = !0, M = U.isGlob = !0, z = !0, S === !0) continue;
						break;
					}
					if (F !== !0 && H === o) {
						if (A = U.isBrace = !0, M = U.isGlob = !0, z = !0, S === !0) continue;
						break;
					}
					if (H === h && (B--, B === 0)) {
						F = !1, A = U.isBrace = !0, z = !0;
						break;
					}
				}
				if (S === !0) continue;
				break;
			}
			if (H === l) {
				if (C.push(D), w.push(U), U = {
					value: "",
					depth: 0,
					isGlob: !1
				}, z === !0) continue;
				if (V === s && D === O + 1) {
					O += 2;
					continue;
				}
				k = D + 1;
				continue;
			}
			if (b.noext !== !0 && (H === p || H === i || H === r || H === m || H === c) && W() === d) {
				if (M = U.isGlob = !0, N = U.isExtglob = !0, z = !0, H === c && D === O && (R = !0), S === !0) {
					for (; ee() !== !0 && (H = G());) {
						if (H === a) {
							I = U.backslashes = !0, H = G();
							continue;
						}
						if (H === g) {
							M = U.isGlob = !0, z = !0;
							break;
						}
					}
					continue;
				}
				break;
			}
			if (H === r) {
				if (V === r && (P = U.isGlobstar = !0), M = U.isGlob = !0, z = !0, S === !0) continue;
				break;
			}
			if (H === m) {
				if (M = U.isGlob = !0, z = !0, S === !0) continue;
				break;
			}
			if (H === f) {
				for (; ee() !== !0 && (e = G());) {
					if (e === a) {
						I = U.backslashes = !0, G();
						continue;
					}
					if (e === _) {
						j = U.isBracket = !0, M = U.isGlob = !0, z = !0;
						break;
					}
				}
				if (S === !0) continue;
				break;
			}
			if (b.nonegate !== !0 && H === c && D === O) {
				L = U.negated = !0, O++;
				continue;
			}
			if (b.noparen !== !0 && H === d) {
				if (M = U.isGlob = !0, S === !0) {
					for (; ee() !== !0 && (H = G());) {
						if (H === d) {
							I = U.backslashes = !0, H = G();
							continue;
						}
						if (H === g) {
							z = !0;
							break;
						}
					}
					continue;
				}
				break;
			}
			if (M === !0) {
				if (z = !0, S === !0) continue;
				break;
			}
		}
		b.noext === !0 && (N = !1, M = !1);
		let K = E, te = "", ne = "";
		O > 0 && (te = E.slice(0, O), E = E.slice(O), k -= O), K && M === !0 && k > 0 ? (K = E.slice(0, k), ne = E.slice(k)) : M === !0 ? (K = "", ne = E) : K = E, K && K !== "" && K !== "/" && K !== E && v(K.charCodeAt(K.length - 1)) && (K = K.slice(0, -1)), b.unescape === !0 && (ne &&= n.removeBackslashes(ne), K && I === !0 && (K = n.removeBackslashes(K)));
		let re = {
			prefix: te,
			input: e,
			start: O,
			base: K,
			glob: ne,
			isBrace: A,
			isBracket: j,
			isGlob: M,
			isExtglob: N,
			isGlobstar: P,
			negated: L,
			negatedExtglob: R
		};
		if (b.tokens === !0 && (re.maxDepth = 0, v(H) || w.push(U), re.tokens = w), b.parts === !0 || b.tokens === !0) {
			let t;
			for (let n = 0; n < C.length; n++) {
				let r = t ? t + 1 : O, i = C[n], a = e.slice(r, i);
				b.tokens && (n === 0 && O !== 0 ? (w[n].isPrefix = !0, w[n].value = te) : w[n].value = a, y(w[n]), re.maxDepth += w[n].depth), (n !== 0 || a !== "") && T.push(a), t = i;
			}
			if (t && t + 1 < e.length) {
				let n = e.slice(t + 1);
				T.push(n), b.tokens && (w[w.length - 1].value = n, y(w[w.length - 1]), re.maxDepth += w[w.length - 1].depth);
			}
			re.slashes = C, re.parts = T;
		}
		return re;
	};
})), Xm = /* @__PURE__ */ w(((e, t) => {
	var n = qm(), r = Jm(), { MAX_LENGTH: i, POSIX_REGEX_SOURCE: a, REGEX_NON_SPECIAL_CHARS: o, REGEX_SPECIAL_CHARS_BACKREF: s, REPLACEMENTS: c } = n, l = (e, t) => {
		if (typeof t.expandRange == "function") return t.expandRange(...e, t);
		e.sort();
		let n = `[${e.join("-")}]`;
		try {
			new RegExp(n);
		} catch {
			return e.map((e) => r.escapeRegex(e)).join("..");
		}
		return n;
	}, u = (e, t) => `Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`, d = (e) => {
		let t = [], n = 0, r = 0, i = 0, a = "", o = !1;
		for (let s of e) {
			if (o === !0) {
				a += s, o = !1;
				continue;
			}
			if (s === "\\") {
				a += s, o = !0;
				continue;
			}
			if (s === "\"") {
				i = i === 1 ? 0 : 1, a += s;
				continue;
			}
			if (i === 0) {
				if (s === "[") n++;
				else if (s === "]" && n > 0) n--;
				else if (n === 0) {
					if (s === "(") r++;
					else if (s === ")" && r > 0) r--;
					else if (s === "|" && r === 0) {
						t.push(a), a = "";
						continue;
					}
				}
			}
			a += s;
		}
		return t.push(a), t;
	}, f = (e) => {
		let t = !1;
		for (let n of e) {
			if (t === !0) {
				t = !1;
				continue;
			}
			if (n === "\\") {
				t = !0;
				continue;
			}
			if (/[?*+@!()[\]{}]/.test(n)) return !1;
		}
		return !0;
	}, p = (e) => {
		let t = e.trim(), n = !0;
		for (; n === !0;) n = !1, /^@\([^\\()[\]{}|]+\)$/.test(t) && (t = t.slice(2, -1), n = !0);
		if (f(t)) return t.replace(/\\(.)/g, "$1");
	}, m = (e) => {
		let t = e.map(p).filter(Boolean);
		for (let e = 0; e < t.length; e++) for (let n = e + 1; n < t.length; n++) {
			let r = t[e], i = t[n], a = r[0];
			if (!(!a || r !== a.repeat(r.length) || i !== a.repeat(i.length)) && (r === i || r.startsWith(i) || i.startsWith(r))) return !0;
		}
		return !1;
	}, h = (e, t = !0) => {
		if (e[0] !== "+" && e[0] !== "*" || e[1] !== "(") return;
		let n = 0, r = 0, i = 0, a = !1;
		for (let o = 1; o < e.length; o++) {
			let s = e[o];
			if (a === !0) {
				a = !1;
				continue;
			}
			if (s === "\\") {
				a = !0;
				continue;
			}
			if (s === "\"") {
				i = i === 1 ? 0 : 1;
				continue;
			}
			if (i !== 1) {
				if (s === "[") {
					n++;
					continue;
				}
				if (s === "]" && n > 0) {
					n--;
					continue;
				}
				if (!(n > 0)) {
					if (s === "(") {
						r++;
						continue;
					}
					if (s === ")" && (r--, r === 0)) return t === !0 && o !== e.length - 1 ? void 0 : {
						type: e[0],
						body: e.slice(2, o),
						end: o
					};
				}
			}
		}
	}, g = (e) => {
		let t = 0, n = [];
		for (; t < e.length;) {
			let r = h(e.slice(t), !1);
			if (!r || r.type !== "*") return;
			let i = d(r.body).map((e) => e.trim());
			if (i.length !== 1) return;
			let a = p(i[0]);
			if (!a || a.length !== 1) return;
			n.push(a), t += r.end + 1;
		}
		if (!(n.length < 1)) return `${n.length === 1 ? r.escapeRegex(n[0]) : `[${n.map((e) => r.escapeRegex(e)).join("")}]`}*`;
	}, _ = (e) => {
		let t = 0, n = e.trim(), r = h(n);
		for (; r;) t++, n = r.body.trim(), r = h(n);
		return t;
	}, v = (e, t) => {
		if (t.maxExtglobRecursion === !1) return { risky: !1 };
		let r = typeof t.maxExtglobRecursion == "number" ? t.maxExtglobRecursion : n.DEFAULT_MAX_EXTGLOB_RECURSION, i = d(e).map((e) => e.trim());
		if (i.length > 1 && (i.some((e) => e === "") || i.some((e) => /^[*?]+$/.test(e)) || m(i))) return { risky: !0 };
		for (let e of i) {
			let t = g(e);
			if (t) return {
				risky: !0,
				safeOutput: t
			};
			if (_(e) > r) return { risky: !0 };
		}
		return { risky: !1 };
	}, y = (e, t) => {
		if (typeof e != "string") throw TypeError("Expected a string");
		e = c[e] || e;
		let d = { ...t }, f = typeof d.maxLength == "number" ? Math.min(i, d.maxLength) : i, p = e.length;
		if (p > f) throw SyntaxError(`Input length: ${p}, exceeds maximum allowed length: ${f}`);
		let m = {
			type: "bos",
			value: "",
			output: d.prepend || ""
		}, h = [m], g = d.capture ? "" : "?:", _ = n.globChars(d.windows), b = n.extglobChars(_), { DOT_LITERAL: x, PLUS_LITERAL: S, SLASH_LITERAL: C, ONE_CHAR: w, DOTS_SLASH: T, NO_DOT: E, NO_DOT_SLASH: D, NO_DOTS_SLASH: O, QMARK: k, QMARK_NO_DOT: A, STAR: j, START_ANCHOR: M } = _, N = (e) => `(${g}(?:(?!${M}${e.dot ? T : x}).)*?)`, P = d.dot ? "" : E, F = d.dot ? k : A, I = d.bash === !0 ? N(d) : j;
		d.capture && (I = `(${I})`), typeof d.noext == "boolean" && (d.noextglob = d.noext);
		let L = {
			input: e,
			index: -1,
			start: 0,
			dot: d.dot === !0,
			consumed: "",
			output: "",
			prefix: "",
			backtrack: !1,
			negated: !1,
			brackets: 0,
			braces: 0,
			parens: 0,
			quotes: 0,
			globstar: !1,
			tokens: h
		};
		e = r.removePrefix(e, L), p = e.length;
		let R = [], z = [], B = [], V = m, H, U = () => L.index === p - 1, ee = L.peek = (t = 1) => e[L.index + t], W = L.advance = () => e[++L.index] || "", G = () => e.slice(L.index + 1), K = (e = "", t = 0) => {
			L.consumed += e, L.index += t;
		}, te = (e) => {
			L.output += e.output == null ? e.value : e.output, K(e.value);
		}, ne = () => {
			let e = 1;
			for (; ee() === "!" && (ee(2) !== "(" || ee(3) === "?");) W(), L.start++, e++;
			return e % 2 == 0 ? !1 : (L.negated = !0, L.start++, !0);
		}, re = (e) => {
			L[e]++, B.push(e);
		}, ie = (e) => {
			L[e]--, B.pop();
		}, q = (e) => {
			if (V.type === "globstar") {
				let t = L.braces > 0 && (e.type === "comma" || e.type === "brace"), n = e.extglob === !0 || R.length && (e.type === "pipe" || e.type === "paren");
				e.type !== "slash" && e.type !== "paren" && !t && !n && (L.output = L.output.slice(0, -V.output.length), V.type = "star", V.value = "*", V.output = I, L.output += V.output);
			}
			if (R.length && e.type !== "paren" && (R[R.length - 1].inner += e.value), (e.value || e.output) && te(e), V && V.type === "text" && e.type === "text") {
				V.output = (V.output || V.value) + e.value, V.value += e.value;
				return;
			}
			e.prev = V, h.push(e), V = e;
		}, J = (e, t) => {
			let n = {
				...b[t],
				conditions: 1,
				inner: ""
			};
			n.prev = V, n.parens = L.parens, n.output = L.output, n.startIndex = L.index, n.tokensIndex = h.length;
			let r = (d.capture ? "(" : "") + n.open;
			re("parens"), q({
				type: e,
				value: t,
				output: L.output ? "" : w
			}), q({
				type: "paren",
				extglob: !0,
				value: W(),
				output: r
			}), R.push(n);
		}, ae = (n) => {
			let i = e.slice(n.startIndex, L.index + 1), a = v(e.slice(n.startIndex + 2, L.index), d);
			if ((n.type === "plus" || n.type === "star") && a.risky) {
				let e = a.safeOutput ? (n.output ? "" : w) + (d.capture ? `(${a.safeOutput})` : a.safeOutput) : void 0, t = h[n.tokensIndex];
				t.type = "text", t.value = i, t.output = e || r.escapeRegex(i);
				for (let e = n.tokensIndex + 1; e < h.length; e++) h[e].value = "", h[e].output = "", delete h[e].suffix;
				L.output = n.output + t.output, L.backtrack = !0, q({
					type: "paren",
					extglob: !0,
					value: H,
					output: ""
				}), ie("parens");
				return;
			}
			let o = n.close + (d.capture ? ")" : ""), s;
			if (n.type === "negate") {
				let e = I;
				n.inner && n.inner.length > 1 && n.inner.includes("/") && (e = N(d)), (e !== I || U() || /^\)+$/.test(G())) && (o = n.close = `)$))${e}`), n.inner.includes("*") && (s = G()) && /^\.[^\\/.]+$/.test(s) && (o = n.close = `)${y(s, {
					...t,
					fastpaths: !1
				}).output})${e})`), n.prev.type === "bos" && (L.negatedExtglob = !0);
			}
			q({
				type: "paren",
				extglob: !0,
				value: H,
				output: o
			}), ie("parens");
		};
		if (d.fastpaths !== !1 && !/(^[*!]|[/()[\]{}"])/.test(e)) {
			let n = !1, i = e.replace(s, (e, t, r, i, a, o) => i === "\\" ? (n = !0, e) : i === "?" ? t ? t + i + (a ? k.repeat(a.length) : "") : o === 0 ? F + (a ? k.repeat(a.length) : "") : k.repeat(r.length) : i === "." ? x.repeat(r.length) : i === "*" ? t ? t + i + (a ? I : "") : I : t ? e : `\\${e}`);
			return n === !0 && (i = d.unescape === !0 ? i.replace(/\\/g, "") : i.replace(/\\+/g, (e) => e.length % 2 == 0 ? "\\\\" : e ? "\\" : "")), i === e && d.contains === !0 ? (L.output = e, L) : (L.output = r.wrapOutput(i, L, t), L);
		}
		for (; !U();) {
			if (H = W(), H === "\0") continue;
			if (H === "\\") {
				let e = ee();
				if (e === "/" && d.bash !== !0 || e === "." || e === ";") continue;
				if (!e) {
					H += "\\", q({
						type: "text",
						value: H
					});
					continue;
				}
				let t = /^\\+/.exec(G()), n = 0;
				if (t && t[0].length > 2 && (n = t[0].length, L.index += n, n % 2 != 0 && (H += "\\")), d.unescape === !0 ? H = W() : H += W(), L.brackets === 0) {
					q({
						type: "text",
						value: H
					});
					continue;
				}
			}
			if (L.brackets > 0 && (H !== "]" || V.value === "[" || V.value === "[^")) {
				if (d.posix !== !1 && H === ":") {
					let e = V.value.slice(1);
					if (e.includes("[") && (V.posix = !0, e.includes(":"))) {
						let e = V.value.lastIndexOf("["), t = V.value.slice(0, e), n = a[V.value.slice(e + 2)];
						if (n) {
							V.value = t + n, L.backtrack = !0, W(), !m.output && h.indexOf(V) === 1 && (m.output = w);
							continue;
						}
					}
				}
				(H === "[" && ee() !== ":" || H === "-" && ee() === "]") && (H = `\\${H}`), H === "]" && (V.value === "[" || V.value === "[^") && (H = `\\${H}`), d.posix === !0 && H === "!" && V.value === "[" && (H = "^"), V.value += H, te({ value: H });
				continue;
			}
			if (L.quotes === 1 && H !== "\"") {
				H = r.escapeRegex(H), V.value += H, te({ value: H });
				continue;
			}
			if (H === "\"") {
				L.quotes = L.quotes === 1 ? 0 : 1, d.keepQuotes === !0 && q({
					type: "text",
					value: H
				});
				continue;
			}
			if (H === "(") {
				re("parens"), q({
					type: "paren",
					value: H
				});
				continue;
			}
			if (H === ")") {
				if (L.parens === 0 && d.strictBrackets === !0) throw SyntaxError(u("opening", "("));
				let e = R[R.length - 1];
				if (e && L.parens === e.parens + 1) {
					ae(R.pop());
					continue;
				}
				q({
					type: "paren",
					value: H,
					output: L.parens ? ")" : "\\)"
				}), ie("parens");
				continue;
			}
			if (H === "[") {
				if (d.nobracket === !0 || !G().includes("]")) {
					if (d.nobracket !== !0 && d.strictBrackets === !0) throw SyntaxError(u("closing", "]"));
					H = `\\${H}`;
				} else re("brackets");
				q({
					type: "bracket",
					value: H
				});
				continue;
			}
			if (H === "]") {
				if (d.nobracket === !0 || V && V.type === "bracket" && V.value.length === 1) {
					q({
						type: "text",
						value: H,
						output: `\\${H}`
					});
					continue;
				}
				if (L.brackets === 0) {
					if (d.strictBrackets === !0) throw SyntaxError(u("opening", "["));
					q({
						type: "text",
						value: H,
						output: `\\${H}`
					});
					continue;
				}
				ie("brackets");
				let e = V.value.slice(1);
				if (V.posix !== !0 && e[0] === "^" && !e.includes("/") && (H = `/${H}`), V.value += H, te({ value: H }), d.literalBrackets === !1 || r.hasRegexChars(e)) continue;
				let t = r.escapeRegex(V.value);
				if (L.output = L.output.slice(0, -V.value.length), d.literalBrackets === !0) {
					L.output += t, V.value = t;
					continue;
				}
				V.value = `(${g}${t}|${V.value})`, L.output += V.value;
				continue;
			}
			if (H === "{" && d.nobrace !== !0) {
				re("braces");
				let e = {
					type: "brace",
					value: H,
					output: "(",
					outputIndex: L.output.length,
					tokensIndex: L.tokens.length
				};
				z.push(e), q(e);
				continue;
			}
			if (H === "}") {
				let e = z[z.length - 1];
				if (d.nobrace === !0 || !e) {
					q({
						type: "text",
						value: H,
						output: H
					});
					continue;
				}
				let t = ")";
				if (e.dots === !0) {
					let e = h.slice(), n = [];
					for (let t = e.length - 1; t >= 0 && (h.pop(), e[t].type !== "brace"); t--) e[t].type !== "dots" && n.unshift(e[t].value);
					t = l(n, d), L.backtrack = !0;
				}
				if (e.comma !== !0 && e.dots !== !0) {
					let n = L.output.slice(0, e.outputIndex), r = L.tokens.slice(e.tokensIndex);
					e.value = e.output = "\\{", H = t = "\\}", L.output = n;
					for (let e of r) L.output += e.output || e.value;
				}
				q({
					type: "brace",
					value: H,
					output: t
				}), ie("braces"), z.pop();
				continue;
			}
			if (H === "|") {
				R.length > 0 && R[R.length - 1].conditions++, q({
					type: "text",
					value: H
				});
				continue;
			}
			if (H === ",") {
				let e = H, t = z[z.length - 1];
				t && B[B.length - 1] === "braces" && (t.comma = !0, e = "|"), q({
					type: "comma",
					value: H,
					output: e
				});
				continue;
			}
			if (H === "/") {
				if (V.type === "dot" && L.index === L.start + 1) {
					L.start = L.index + 1, L.consumed = "", L.output = "", h.pop(), V = m;
					continue;
				}
				q({
					type: "slash",
					value: H,
					output: C
				});
				continue;
			}
			if (H === ".") {
				if (L.braces > 0 && V.type === "dot") {
					V.value === "." && (V.output = x);
					let e = z[z.length - 1];
					V.type = "dots", V.output += H, V.value += H, e.dots = !0;
					continue;
				}
				if (L.braces + L.parens === 0 && V.type !== "bos" && V.type !== "slash") {
					q({
						type: "text",
						value: H,
						output: x
					});
					continue;
				}
				q({
					type: "dot",
					value: H,
					output: x
				});
				continue;
			}
			if (H === "?") {
				if (!(V && V.value === "(") && d.noextglob !== !0 && ee() === "(" && ee(2) !== "?") {
					J("qmark", H);
					continue;
				}
				if (V && V.type === "paren") {
					let e = ee(), t = H;
					(V.value === "(" && !/[!=<:]/.test(e) || e === "<" && !/<([!=]|\w+>)/.test(G())) && (t = `\\${H}`), q({
						type: "text",
						value: H,
						output: t
					});
					continue;
				}
				if (d.dot !== !0 && (V.type === "slash" || V.type === "bos")) {
					q({
						type: "qmark",
						value: H,
						output: A
					});
					continue;
				}
				q({
					type: "qmark",
					value: H,
					output: k
				});
				continue;
			}
			if (H === "!") {
				if (d.noextglob !== !0 && ee() === "(" && (ee(2) !== "?" || !/[!=<:]/.test(ee(3)))) {
					J("negate", H);
					continue;
				}
				if (d.nonegate !== !0 && L.index === 0) {
					ne();
					continue;
				}
			}
			if (H === "+") {
				if (d.noextglob !== !0 && ee() === "(" && ee(2) !== "?") {
					J("plus", H);
					continue;
				}
				if (V && V.value === "(" || d.regex === !1) {
					q({
						type: "plus",
						value: H,
						output: S
					});
					continue;
				}
				if (V && (V.type === "bracket" || V.type === "paren" || V.type === "brace") || L.parens > 0) {
					q({
						type: "plus",
						value: H
					});
					continue;
				}
				q({
					type: "plus",
					value: S
				});
				continue;
			}
			if (H === "@") {
				if (d.noextglob !== !0 && ee() === "(" && ee(2) !== "?") {
					q({
						type: "at",
						extglob: !0,
						value: H,
						output: ""
					});
					continue;
				}
				q({
					type: "text",
					value: H
				});
				continue;
			}
			if (H !== "*") {
				(H === "$" || H === "^") && (H = `\\${H}`);
				let e = o.exec(G());
				e && (H += e[0], L.index += e[0].length), q({
					type: "text",
					value: H
				});
				continue;
			}
			if (V && (V.type === "globstar" || V.star === !0)) {
				V.type = "star", V.star = !0, V.value += H, V.output = I, L.backtrack = !0, L.globstar = !0, K(H);
				continue;
			}
			let t = G();
			if (d.noextglob !== !0 && /^\([^?]/.test(t)) {
				J("star", H);
				continue;
			}
			if (V.type === "star") {
				if (d.noglobstar === !0) {
					K(H);
					continue;
				}
				let n = V.prev, r = n.prev, i = n.type === "slash" || n.type === "bos", a = r && (r.type === "star" || r.type === "globstar");
				if (d.bash === !0 && (!i || t[0] && t[0] !== "/")) {
					q({
						type: "star",
						value: H,
						output: ""
					});
					continue;
				}
				let o = L.braces > 0 && (n.type === "comma" || n.type === "brace"), s = R.length && (n.type === "pipe" || n.type === "paren");
				if (!i && n.type !== "paren" && !o && !s) {
					q({
						type: "star",
						value: H,
						output: ""
					});
					continue;
				}
				for (; t.slice(0, 3) === "/**";) {
					let n = e[L.index + 4];
					if (n && n !== "/") break;
					t = t.slice(3), K("/**", 3);
				}
				if (n.type === "bos" && U()) {
					V.type = "globstar", V.value += H, V.output = N(d), L.output = V.output, L.globstar = !0, K(H);
					continue;
				}
				if (n.type === "slash" && n.prev.type !== "bos" && !a && U()) {
					L.output = L.output.slice(0, -(n.output + V.output).length), n.output = `(?:${n.output}`, V.type = "globstar", V.output = N(d) + (d.strictSlashes ? ")" : "|$)"), V.value += H, L.globstar = !0, L.output += n.output + V.output, K(H);
					continue;
				}
				if (n.type === "slash" && n.prev.type !== "bos" && t[0] === "/") {
					let e = t[1] === void 0 ? "" : "|$";
					L.output = L.output.slice(0, -(n.output + V.output).length), n.output = `(?:${n.output}`, V.type = "globstar", V.output = `${N(d)}${C}|${C}${e})`, V.value += H, L.output += n.output + V.output, L.globstar = !0, K(H + W()), q({
						type: "slash",
						value: "/",
						output: ""
					});
					continue;
				}
				if (n.type === "bos" && t[0] === "/") {
					V.type = "globstar", V.value += H, V.output = `(?:^|${C}|${N(d)}${C})`, L.output = V.output, L.globstar = !0, K(H + W()), q({
						type: "slash",
						value: "/",
						output: ""
					});
					continue;
				}
				L.output = L.output.slice(0, -V.output.length), V.type = "globstar", V.output = N(d), V.value += H, L.output += V.output, L.globstar = !0, K(H);
				continue;
			}
			let n = {
				type: "star",
				value: H,
				output: I
			};
			if (d.bash === !0) {
				n.output = ".*?", (V.type === "bos" || V.type === "slash") && (n.output = P + n.output), q(n);
				continue;
			}
			if (V && (V.type === "bracket" || V.type === "paren") && d.regex === !0) {
				n.output = H, q(n);
				continue;
			}
			(L.index === L.start || V.type === "slash" || V.type === "dot") && (V.type === "dot" ? (L.output += D, V.output += D) : d.dot === !0 ? (L.output += O, V.output += O) : (L.output += P, V.output += P), ee() !== "*" && (L.output += w, V.output += w)), q(n);
		}
		for (; L.brackets > 0;) {
			if (d.strictBrackets === !0) throw SyntaxError(u("closing", "]"));
			L.output = r.escapeLast(L.output, "["), ie("brackets");
		}
		for (; L.parens > 0;) {
			if (d.strictBrackets === !0) throw SyntaxError(u("closing", ")"));
			L.output = r.escapeLast(L.output, "("), ie("parens");
		}
		for (; L.braces > 0;) {
			if (d.strictBrackets === !0) throw SyntaxError(u("closing", "}"));
			L.output = r.escapeLast(L.output, "{"), ie("braces");
		}
		if (d.strictSlashes !== !0 && (V.type === "star" || V.type === "bracket") && q({
			type: "maybe_slash",
			value: "",
			output: `${C}?`
		}), L.backtrack === !0) {
			L.output = "";
			for (let e of L.tokens) L.output += e.output == null ? e.value : e.output, e.suffix && (L.output += e.suffix);
		}
		return L;
	};
	y.fastpaths = (e, t) => {
		let a = { ...t }, o = typeof a.maxLength == "number" ? Math.min(i, a.maxLength) : i, s = e.length;
		if (s > o) throw SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${o}`);
		e = c[e] || e;
		let { DOT_LITERAL: l, SLASH_LITERAL: u, ONE_CHAR: d, DOTS_SLASH: f, NO_DOT: p, NO_DOTS: m, NO_DOTS_SLASH: h, STAR: g, START_ANCHOR: _ } = n.globChars(a.windows), v = a.dot ? m : p, y = a.dot ? h : p, b = a.capture ? "" : "?:", x = {
			negated: !1,
			prefix: ""
		}, S = a.bash === !0 ? ".*?" : g;
		a.capture && (S = `(${S})`);
		let C = (e) => e.noglobstar === !0 ? S : `(${b}(?:(?!${_}${e.dot ? f : l}).)*?)`, w = (e) => {
			switch (e) {
				case "*": return `${v}${d}${S}`;
				case ".*": return `${l}${d}${S}`;
				case "*.*": return `${v}${S}${l}${d}${S}`;
				case "*/*": return `${v}${S}${u}${d}${y}${S}`;
				case "**": return v + C(a);
				case "**/*": return `(?:${v}${C(a)}${u})?${y}${d}${S}`;
				case "**/*.*": return `(?:${v}${C(a)}${u})?${y}${S}${l}${d}${S}`;
				case "**/.*": return `(?:${v}${C(a)}${u})?${l}${d}${S}`;
				default: {
					let t = /^(.*?)\.(\w+)$/.exec(e);
					if (!t) return;
					let n = w(t[1]);
					return n ? n + l + t[2] : void 0;
				}
			}
		}, T = w(r.removePrefix(e, x));
		return T && a.strictSlashes !== !0 && (T += `${u}?`), T;
	}, t.exports = y;
})), Zm = /* @__PURE__ */ w(((e, t) => {
	var n = Ym(), r = Xm(), i = Jm(), a = qm(), o = (e) => e && typeof e == "object" && !Array.isArray(e), s = (e, t, n = !1) => {
		if (Array.isArray(e)) {
			let r = e.map((e) => s(e, t, n));
			return (e) => {
				for (let t of r) {
					let n = t(e);
					if (n) return n;
				}
				return !1;
			};
		}
		let r = o(e) && e.tokens && e.input;
		if (e === "" || typeof e != "string" && !r) throw TypeError("Expected pattern to be a non-empty string");
		let i = t || {}, a = i.windows, c = r ? s.compileRe(e, t) : s.makeRe(e, t, !1, !0), l = c.state;
		delete c.state;
		let u = () => !1;
		if (i.ignore) {
			let e = {
				...t,
				ignore: null,
				onMatch: null,
				onResult: null
			};
			u = s(i.ignore, e, n);
		}
		let d = (n, r = !1) => {
			let { isMatch: o, match: d, output: f } = s.test(n, c, t, {
				glob: e,
				posix: a
			}), p = {
				glob: e,
				state: l,
				regex: c,
				posix: a,
				input: n,
				output: f,
				match: d,
				isMatch: o
			};
			return typeof i.onResult == "function" && i.onResult(p), o === !1 ? (p.isMatch = !1, r ? p : !1) : u(n) ? (typeof i.onIgnore == "function" && i.onIgnore(p), p.isMatch = !1, r ? p : !1) : (typeof i.onMatch == "function" && i.onMatch(p), r ? p : !0);
		};
		return n && (d.state = l), d;
	};
	s.test = (e, t, n, { glob: r, posix: a } = {}) => {
		if (typeof e != "string") throw TypeError("Expected input to be a string");
		if (e === "") return {
			isMatch: !1,
			output: ""
		};
		let o = n || {}, c = o.format || (a ? i.toPosixSlashes : null), l = e === r, u = l && c ? c(e) : e;
		return l === !1 && (u = c ? c(e) : e, l = u === r), (l === !1 || o.capture === !0) && (l = o.matchBase === !0 || o.basename === !0 ? s.matchBase(e, t, n, a) : t.exec(u)), {
			isMatch: !!l,
			match: l,
			output: u
		};
	}, s.matchBase = (e, t, n) => (t instanceof RegExp ? t : s.makeRe(t, n)).test(i.basename(e)), s.isMatch = (e, t, n) => s(t, n)(e), s.parse = (e, t) => Array.isArray(e) ? e.map((e) => s.parse(e, t)) : r(e, {
		...t,
		fastpaths: !1
	}), s.scan = (e, t) => n(e, t), s.compileRe = (e, t, n = !1, r = !1) => {
		if (n === !0) return e.output;
		let i = t || {}, a = i.contains ? "" : "^", o = i.contains ? "" : "$", c = `${a}(?:${e.output})${o}`;
		e && e.negated === !0 && (c = `^(?!${c}).*$`);
		let l = s.toRegex(c, t);
		return r === !0 && (l.state = e), l;
	}, s.makeRe = (e, t = {}, n = !1, i = !1) => {
		if (!e || typeof e != "string") throw TypeError("Expected a non-empty string");
		let a = {
			negated: !1,
			fastpaths: !0
		};
		return t.fastpaths !== !1 && (e[0] === "." || e[0] === "*") && (a.output = r.fastpaths(e, t)), a.output || (a = r(e, t)), s.compileRe(a, t, n, i);
	}, s.toRegex = (e, t) => {
		try {
			let n = t || {};
			return new RegExp(e, n.flags || (n.nocase ? "i" : ""));
		} catch (e) {
			if (t && t.debug === !0) throw e;
			return /$^/;
		}
	}, s.constants = a, t.exports = s;
})), Qm = /* @__PURE__ */ D((/* @__PURE__ */ w(((e, t) => {
	var n = Zm(), r = Jm();
	function i(e, t, i = !1) {
		return t && (t.windows === null || t.windows === void 0) && (t = {
			...t,
			windows: r.isWindows()
		}), n(e, t, i);
	}
	Object.assign(i, n), t.exports = i;
})))(), 1), $m = /* @__PURE__ */ T({
	greatest: () => ih,
	greatestLevel: () => ah,
	latest: () => rh,
	minor: () => oh,
	newest: () => lh,
	patch: () => sh,
	semver: () => ch
}), eh = u(m.execFile);
async function th(e) {
	let t = (await eh("git", [
		"ls-remote",
		"--tags",
		e
	])).stdout, n = {};
	for (let e of t.trim().split("\n")) {
		let t = e.split("	");
		n[t[1].replace(/^refs\/tags\/|\^{}$/g, "")] = t[0];
	}
	return n;
}
async function nh(e, t, n) {
	t = t.replace(/^github:/, "");
	let { auth: r, protocol: i, host: a, path: o } = (0, er.default)(t), s;
	try {
		if (i !== null) s = await th(`${i ? i.replace("git+", "") : "https:"}//${r ? r + "@" : ""}${a}/${o?.replace(/^:/, "")}`);
		else try {
			s = await th(`ssh://git@${a}/${o?.replace(/^:/, "")}`);
		} catch {
			s = await th(`https://${r ? r + "@" : ""}${a}/${o}`);
		}
	} catch {
		Z(n ?? {}, `Invalid, private repo, or no tags for ${e}: ${t}`, "verbose");
		return;
	}
	return Object.keys(s).map(Nr).filter((e) => Y.default.valid(e)).sort(Cr);
}
var rh = async (e, t, n) => {
	let r = await nh(e, t, n);
	if (!r) return { version: null };
	let i = n?.pre ? r : r.filter((e) => !Dr(e)), a = i[i.length - 1];
	return { version: a ? Ur(t, a) : null };
}, ih = async (e, t, n) => {
	let r = await nh(e, t, n);
	if (!r) return { version: null };
	let i = r[r.length - 1];
	return { version: i ? Ur(t, i) : null };
}, ah = (e) => async (t, n, r = {}) => {
	let i = decodeURIComponent((0, er.default)(n).branch).replace(/^semver:/, ""), a = await nh(t, n, r);
	if (!a) return { version: null };
	let o = wr(a.map((e) => e.replace(/^v/, "")), i, e);
	return { version: o ? Ur(n, o) : null };
}, oh = ah("minor"), sh = ah("patch"), ch = async (e, t, n) => ({ version: null }), lh = ih, uh = /* @__PURE__ */ T({ latest: () => ph }), dh = (e) => e && e.startsWith("http://") || e.startsWith("https://"), fh = (0, Kc.default)(async (e) => {
	let t = e.registry, r;
	if (dh(t)) r = await (await fetch(t)).text();
	else try {
		r = await n.readFile(t, "utf8");
	} catch {
		Df(e, `\nThe specified static registry file does not exist: ${e.registry}`);
	}
	return JSON.parse(r);
}), ph = async (e, t, n) => ({ version: (await fh(n || {}))[e] || null }), mh = {
	npm: Ll,
	pnpm: Md,
	yarn: tf,
	bun: uu,
	gitTags: $m,
	staticRegistry: uh
}, hh = [
	"latest",
	"newest",
	"greatest",
	"minor",
	"patch",
	"semver"
];
//#endregion
//#region src/lib/initOptions.ts
function gh(e) {
	if (typeof e == "string") return e.trim();
	if (Array.isArray(e) && (e.length === 0 || typeof e[0] == "string")) {
		let t = e.map((e) => typeof e == "string" ? e.trim() : e).filter((e) => e);
		return t.length > 0 ? t : void 0;
	} else return e;
}
function _h(e) {
	try {
		return new URL(e), !0;
	} catch {
		return !1;
	}
}
var vh = (e, t = Math.round(e * 10) / 10) => `${t} day${t === 1 ? "" : "s"}`;
async function yh(e, { cli: t } = {}) {
	let n = jn(e.color), r;
	if (!t) {
		r = { ...e };
		let t = Ti.reduce((e, t) => ({
			...e,
			...t.default == null ? null : { [t.long]: t.default }
		}), {}), n = {
			jsonUpgraded: !0,
			silent: e.silent || e.loglevel === void 0 && !e.verbose,
			args: []
		};
		e = {
			...t,
			...n,
			...e
		};
	}
	let i = {
		...e,
		...e.packageData && typeof e.packageData != "string" ? { packageData: JSON.stringify(e.packageData, null, 2) } : null,
		cli: t,
		...t ? null : { raw: r }
	}, a = i.silent || i.format?.includes("lines") ? "silent" : i.verbose ? "verbose" : i.loglevel, o = Object.keys(i).filter((e) => e.startsWith("json")).some((e) => i[e]);
	!o && a !== "silent" && i.rcConfigPath && !i.doctor && Z(i, `Using config file ${i.rcConfigPath}`);
	let s = Ti.filter(({ long: e, deprecated: t }) => t && i[e] || e === "packageManager" && i.packageManager === "staticRegistry");
	if (s.length > 0) {
		for (let { long: e, description: t } of s) {
			let r = e === "packageManager" ? "--packageManager staticRegistry is deprecated. Use --registryType json." : `--${e}: ${t}`;
			Z(i, n.yellow(r), "warn");
		}
		Z(i, "", "warn");
	}
	for (let { long: e, choices: t } of Ti) {
		if (!t || t.length === 0) continue;
		let n = i[e], r = Array.isArray(n) ? n : [n];
		r.length !== 0 && r.every((e) => !t.includes(e)) && Df(i, `Invalid option value: --${e} ${n}. Valid values are: ${t.join(", ")}.`);
	}
	i.cwd && !await Fn(i.cwd) && Df(i, `No such directory: ${i.cwd}`);
	let c = gh(i.args), l = gh(i.filter), u = gh(i.filterVersion), d = gh(i.reject), f = gh(i.rejectVersion), p = i.registryType || (i.registry?.endsWith(".json") ? "json" : "npm");
	i.filter && c && c.join(" ") !== (Array.isArray(l) ? l.join(" ") : l) ? Df(i, "Cannot specify a filter using both --filter and args. Did you forget to quote an argument?\nSee: https://github.com/raineorshine/npm-check-updates/issues/759#issuecomment-723587297") : i.packageFile && i.deep ? Df(i, "Cannot specify both --packageFile and --deep. --deep is an alias for --packageFile '**/package.json'") : i.format?.includes("lines") && i.jsonUpgraded ? Df(i, "Cannot specify both --format lines and --jsonUpgraded.") : i.format?.includes("lines") && i.jsonAll ? Df(i, "Cannot specify both --format lines and --jsonAll.") : i.format?.includes("lines") && i.format.length > 1 ? Df(i, "Cannot use --format lines with other formatting options.") : i.workspace?.length && i.workspaces ? Df(i, "Cannot specify both --workspace and --workspaces.") : i.deep && (i.workspace?.length || i.workspaces) ? Df(i, `Cannot specify both --deep and --workspace${i.workspaces ? "s" : ""}.`) : i.doctor && (i.workspace?.length || i.workspaces) ? Df(i, `Doctor mode is not currently supported with --workspace${i.workspaces ? "s" : ""}.`) : i.packageManager === "staticRegistry" && !i.registry ? Df(i, "When --package-manager staticRegistry is specified, you must provide the path for the registry file with --registry.") : i.registryType === "json" && !i.registry ? Df(i, "When --registryType json is specified, you must provide the path for the registry file with --registry. Run \"ncu --help registryType\" for details.") : p !== "json" && i.registry && !_h(i.registry) && Df(i, `--registry must be a valid URL. Invalid value: "${i.registry}"`);
	let m = await ji(i);
	if (i.cooldown != null) {
		if (typeof i.cooldown == "string") {
			let e = Xn(i.cooldown);
			e === null ? Df(i, `Invalid cooldown value: "${i.cooldown}". Use a number (days) or a string like "7d", "12h", or "30m".`) : i.cooldown = e;
		}
		let e = typeof i.cooldown == "number" && !isNaN(i.cooldown) && i.cooldown >= 0, t = typeof i.cooldown == "function";
		!e && !t && Df(i, "Cooldown must be a non-negative number (days), a string like \"7d\", \"12h\", or \"30m\", or a predicate function.");
	} else if (m === "pnpm") {
		let e = await Zd.getPnpmWorkspaceMinimumReleaseAge();
		if (e != null) {
			let { minimumReleaseAge: t, minimumReleaseAgeExclude: n } = e, r = t / 1440;
			if (n.length > 0) {
				let e = n.map((e) => (0, Qm.default)(e));
				i.cooldown = (t) => e.some((e) => e(t)) ? null : r, Z({
					...i,
					json: o
				}, `Using minimumReleaseAge from pnpm-workspace.yaml: ${vh(r)} (${n.length} excluded pattern${n.length === 1 ? "" : "s"})`);
			} else i.cooldown = r, Z({
				...i,
				json: o
			}, `Using minimumReleaseAge from pnpm-workspace.yaml: ${vh(r)}`);
		}
	} else if (m === "yarn") {
		let e = await Ef.getYarnMinimalAgeGate(i);
		if (e != null) {
			let { npmMinimalAgeGate: t, npmPreapprovedPackages: n } = e, r = t / 1440;
			if (n.length > 0) {
				let e = n.map((e) => (0, Qm.default)(e));
				i.cooldown = (t) => e.some((e) => e(t)) ? null : r, Z({
					...i,
					json: o
				}, `Using npmMinimalAgeGate from .yarnrc.yml: ${r} day${r === 1 ? "" : "s"} (${n.length} pre-approved package${n.length === 1 ? "" : "s"})`);
			} else i.cooldown = r, Z({
				...i,
				json: o
			}, `Using npmMinimalAgeGate from .yarnrc.yml: ${vh(r)}`);
		}
	} else {
		let e = Gl.findNpmConfig(), t = e?.minReleaseAge;
		if (t != null) {
			let n = typeof t == "string" ? Xn(t) ?? parseInt(t, 10) : typeof t == "number" ? t : null;
			if (n != null && !isNaN(n)) {
				let t = e?.minReleaseAgeExclude, r = [...new Set((Array.isArray(t) ? t : typeof t == "string" ? [t] : []).flatMap((e) => e.split(",")).map((e) => e.trim()).filter((e) => e))];
				if (r.length > 0) {
					let e = r.map((e) => ({
						pattern: e,
						match: (0, Qm.default)(e, {
							nonegate: !0,
							noext: !0
						})
					}));
					i.cooldown = (t) => e.some(({ pattern: e, match: n }) => t === e || n(t)) ? null : n, Z({
						...i,
						json: o
					}, `Using min-release-age from .npmrc: ${vh(n)} (${r.length} excluded pattern${r.length === 1 ? "" : "s"})`);
				} else i.cooldown = n, Z({
					...i,
					json: o
				}, `Using min-release-age from .npmrc: ${vh(n)}`);
			}
		}
	}
	let h = i.target || "latest", g = h === "newest" || h === "greatest", _ = {
		...i,
		...i.deep ? { packageFile: "**/package.json" } : null,
		...m === "deno" ? { dep: ["imports"] } : null,
		...i.format && i.format.length > 0 ? { format: i.format } : null,
		filter: c || l,
		filterVersion: u,
		json: o,
		loglevel: a,
		minimal: i.minimal === void 0 ? !1 : i.minimal,
		...i.pre != null || g ? { pre: i.pre == null ? g : !!i.pre } : null,
		reject: d,
		rejectVersion: f,
		target: h,
		...i.interactive && i.upgrade === void 0 ? { upgrade: !o } : null,
		packageManager: m,
		...i.prefix ? { prefix: await (mh[m || ""]?.defaultPrefix || mh.npm.defaultPrefix)(i) } : null,
		registryType: p
	};
	_.cacher = await di(_);
	let v = Dn(_, (e, t) => t === void 0 ? null : { [e]: t });
	return !i.packageManager && m !== "npm" && Z(v, `Using ${m}`), v;
}
//#endregion
//#region src/lib/mergeOptions.ts
function bh(e, t) {
	return Array.from(/* @__PURE__ */ new Set([...e || [], ...t || []]));
}
function xh(e, t) {
	let n = e || {}, r = t || {}, i = {
		...n,
		...r
	};
	for (let e of Object.keys(i)) Array.isArray(n[e]) && Array.isArray(r[e]) && (i[e] = bh(n[e], r[e]));
	return i;
}
//#endregion
//#region src/lib/filterAndReject.ts
var Sh = (/* @__PURE__ */ w(((e, t) => {
	var n = (e) => typeof e == "function" ? e : () => e, r = (...e) => (...t) => e.length === 0 || !!n(e[0])(...t) && r(...e.slice(1))(...t), i = (...e) => (...t) => e.length > 0 && (!!n(e[0])(...t) || i(...e.slice(1))(...t));
	t.exports = {
		and: r,
		or: i
	};
})))();
function Ch(e) {
	let t;
	if (!e) t = () => !0;
	else if (typeof e == "string") if (e[0] === "/" && e.at(-1) === "/") {
		let n = new RegExp(e.slice(1, -1));
		t = (e) => n.test(e);
	} else {
		let n = e.split(/[\s,]+/);
		t = (e) => n.some((0, Sh.or)((t) => (0, Qm.default)(t)(e), (t) => !t.includes("/") && e.includes("/") && (0, Qm.default)(t)(e.replace(/\//g, "_"))));
	}
	else if (Array.isArray(e)) t = (t, n) => e.some((e) => Ch(e)(t, n));
	else if (e instanceof RegExp) t = (t) => e.test(t);
	else if (typeof e == "function") t = (t, n) => e(t, (0, tr.parseRange)(n ?? t));
	else throw TypeError("Invalid filter. Must be a RegExp, array, or comma-or-space-delimited list.");
	return t;
}
function wh(e, t, n, r) {
	return (0, Sh.and)((n, r) => (0, Sh.and)(e ? Ch(e) : !0, t ? (...e) => !Ch(t)(...e) : !0)(n, r), (e, t) => (0, Sh.and)(n ? Ch(n) : !0, r ? (...e) => !Ch(r)(...e) : !0)(t));
}
//#endregion
//#region src/lib/getPackageManager.ts
function Th(e, t) {
	return !t || t === "deno" ? mh.npm : e.registryType === "json" ? mh.staticRegistry : (mh[t] || Df(e, `Invalid package manager: ${t}`), mh[t]);
}
//#endregion
//#region src/lib/getInstalledPackages.ts
async function Eh(e = {}) {
	let t = await Th(e, e.packageManager).list?.({
		cwd: e.cwd,
		prefix: e.prefix,
		global: e.global
	});
	t || Df(e, "Unable to retrieve package list");
	let n = wh(e.filter, e.reject, e.filterVersion, e.rejectVersion), r = {};
	try {
		r = Pn(t, (e, t) => !!t && !_r(t) && n(e, t));
	} catch (t) {
		Df(e, "Invalid filter: " + t.message || t);
	}
	return r;
}
//#endregion
//#region src/lib/quoteGlobalPackageSpec.ts
var Dh = (e) => /^@[^/]*\./.test(e) ? `"${e}"` : e, Oh = /* @__PURE__ */ T({
	default: () => kh,
	pMapSkip: () => Ah
});
async function kh(e, t, { concurrency: n = Infinity, stopOnError: r = !0, signal: i } = {}) {
	return new Promise((a, o) => {
		if (e[Symbol.iterator] === void 0 && e[Symbol.asyncIterator] === void 0) throw TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);
		if (typeof t != "function") throw TypeError("Mapper function is required");
		if (!(Number.isSafeInteger(n) && n >= 1 || n === Infinity)) throw TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${n}\` (${typeof n})`);
		let s = [], c = [], l = /* @__PURE__ */ new Map(), u = !1, d = !1, f = !1, p = 0, m = 0, h = e[Symbol.iterator] === void 0 ? e[Symbol.asyncIterator]() : e[Symbol.iterator](), g = () => {
			y(i.reason);
		}, _ = () => {
			i?.removeEventListener("abort", g);
		}, v = (e) => {
			a(e), _();
		}, y = (e) => {
			u = !0, d = !0, o(e), _();
		};
		i && (i.aborted && y(i.reason), i.addEventListener("abort", g, { once: !0 }));
		let b = async () => {
			if (d) return;
			let e = await h.next(), n = m;
			if (m++, e.done) {
				if (f = !0, p === 0 && !d) {
					if (!r && c.length > 0) {
						y(AggregateError(c));
						return;
					}
					if (d = !0, l.size === 0) {
						v(s);
						return;
					}
					let e = [];
					for (let [t, n] of s.entries()) l.get(t) !== Ah && e.push(n);
					v(e);
				}
				return;
			}
			p++, (async () => {
				try {
					let r = await e.value;
					if (d) return;
					let i = await t(r, n);
					i === Ah && l.set(n, i), s[n] = i, p--, await b();
				} catch (e) {
					if (r) y(e);
					else {
						c.push(e), p--;
						try {
							await b();
						} catch (e) {
							y(e);
						}
					}
				}
			})();
		};
		(async () => {
			for (let e = 0; e < n; e++) {
				try {
					await b();
				} catch (e) {
					y(e);
					break;
				}
				if (f || u) break;
			}
		})();
	});
}
var Ah, jh = C((() => {
	Ah = Symbol("skip");
})), Mh = /* @__PURE__ */ w(((e, t) => {
	e = t.exports = n;
	function n(e, t) {
		if (this.stream = t.stream || process.stderr, typeof t == "number") {
			var n = t;
			t = {}, t.total = n;
		} else {
			if (t ||= {}, typeof e != "string") throw Error("format required");
			if (typeof t.total != "number") throw Error("total required");
		}
		this.fmt = e, this.curr = t.curr || 0, this.total = t.total, this.width = t.width || this.total, this.clear = t.clear, this.chars = {
			complete: t.complete || "=",
			incomplete: t.incomplete || "-",
			head: t.head || t.complete || "="
		}, this.renderThrottle = t.renderThrottle === 0 ? 0 : t.renderThrottle || 16, this.lastRender = -Infinity, this.callback = t.callback || function() {}, this.tokens = {}, this.lastDraw = "";
	}
	n.prototype.tick = function(e, t) {
		if (e !== 0 && (e ||= 1), typeof e == "object" && (t = e, e = 1), t && (this.tokens = t), this.curr == 0 && (this.start = /* @__PURE__ */ new Date()), this.curr += e, this.render(), this.curr >= this.total) {
			this.render(void 0, !0), this.complete = !0, this.terminate(), this.callback(this);
			return;
		}
	}, n.prototype.render = function(e, t) {
		if (t = t === void 0 ? !1 : t, e && (this.tokens = e), this.stream.isTTY) {
			var n = Date.now(), r = n - this.lastRender;
			if (!(!t && r < this.renderThrottle)) {
				this.lastRender = n;
				var i = this.curr / this.total;
				i = Math.min(Math.max(i, 0), 1);
				var a = Math.floor(i * 100), o, s, c, l = /* @__PURE__ */ new Date() - this.start, u = a == 100 ? 0 : l * (this.total / this.curr - 1), d = this.curr / (l / 1e3), f = this.fmt.replace(":current", this.curr).replace(":total", this.total).replace(":elapsed", isNaN(l) ? "0.0" : (l / 1e3).toFixed(1)).replace(":eta", isNaN(u) || !isFinite(u) ? "0.0" : (u / 1e3).toFixed(1)).replace(":percent", a.toFixed(0) + "%").replace(":rate", Math.round(d)), p = Math.max(0, this.stream.columns - f.replace(":bar", "").length);
				p && process.platform === "win32" && --p;
				var m = Math.min(this.width, p);
				if (c = Math.round(m * i), s = Array(Math.max(0, c + 1)).join(this.chars.complete), o = Array(Math.max(0, m - c + 1)).join(this.chars.incomplete), c > 0 && (s = s.slice(0, -1) + this.chars.head), f = f.replace(":bar", s + o), this.tokens) for (var h in this.tokens) f = f.replace(":" + h, this.tokens[h]);
				this.lastDraw !== f && (this.stream.cursorTo(0), this.stream.write(f), this.stream.clearLine(1), this.lastDraw = f);
			}
		}
	}, n.prototype.update = function(e, t) {
		var n = Math.floor(e * this.total) - this.curr;
		this.tick(n, t);
	}, n.prototype.interrupt = function(e) {
		this.stream.clearLine(), this.stream.cursorTo(0), this.stream.write(e), this.stream.write("\n"), this.stream.write(this.lastDraw);
	}, n.prototype.terminate = function() {
		this.clear ? this.stream.clearLine && (this.stream.clearLine(), this.stream.cursorTo(0)) : this.stream.write("\n");
	};
})), Nh = /* @__PURE__ */ w(((e, t) => {
	t.exports = Mh();
}));
//#endregion
//#region src/lib/getPeerDependenciesFromRegistry.ts
jh();
var Ph = /* @__PURE__ */ D(Nh(), 1);
function Fh(e, t) {
	let n = /* @__PURE__ */ new Set(), r = [[t]];
	for (; r.length > 0;) {
		let t = [];
		for (let i of r) {
			let r = i[0];
			if (n.has(r)) continue;
			n.add(r);
			let a = Object.keys(e[r] ?? {});
			for (let e of a) {
				if (e === i.at(-1)) return {
					isCircular: !0,
					offendingPackage: r
				};
				t.push([e, ...i]);
			}
		}
		r = t;
	}
	return { isCircular: !1 };
}
async function Ih(e, t) {
	let n = Th(t, t.packageManager);
	if (!n.getPeerDependencies) return {};
	let r = Object.keys(e).length, i;
	!t.json && t.loglevel !== "silent" && t.loglevel !== "verbose" && r > 0 && (i = new Ph.default("[:bar] :current/:total :percent", {
		total: r,
		width: 20
	}), i.render());
	let a = await kh(Object.entries(e), async ([e, r]) => {
		let a, o = t.cacher?.getPeers(e, r);
		return o ? a = o : (a = await n.getPeerDependencies(e, r, { cwd: t.cwd }), t.cacher?.setPeers(e, r, a)), i && i.tick(), {
			pkg: e,
			dependencies: a
		};
	}, { concurrency: t.concurrency }), o = {};
	for (let { pkg: e, dependencies: t } of a) {
		o[e] = t;
		let n = Fh(o, e);
		n.isCircular && delete o[e][n.offendingPackage];
	}
	return await t.cacher?.save(), t.cacher?.log(!0), o;
}
//#endregion
//#region src/lib/pick.ts
function Lh(e, t) {
	let n = {};
	for (let r of t) n[r] = e[r];
	return n;
}
function Rh(e, t) {
	let n = {};
	for (let [r, i] of Object.entries(e ?? {})) {
		let e = r;
		t(i, e) && (n[e] = i);
	}
	return n;
}
//#endregion
//#region src/lib/queryVersions.ts
jh();
async function zh(e, t = {}) {
	let n = jn(t.color), r = Object.keys(e), i = Th(t, t.packageManager), a;
	!t.json && t.loglevel !== "silent" && t.loglevel !== "verbose" && r.length > 0 && (a = new Ph.default("[:bar] :current/:total :percent", {
		total: r.length,
		width: 20
	}), a.render());
	async function o(r) {
		let o = Ir(e[r]), [s, c] = o || [r, e[r]];
		if (qn(c)) return a?.tick(), { version: null };
		let l = t.target || "latest", u = typeof l == "string" ? l : l(s, (0, tr.parseRange)(c)), [d, f] = u.startsWith("@") ? ["distTag", u.slice(1)] : [u, "latest"];
		if (!t.cooldown) {
			let e = t.cacher?.get(s, d);
			if (e?.version && (e?.time || !t.format?.includes("time"))) return a?.tick(), e;
		}
		let p, m = zr(e[r]), h = m ? mh.gitTags : i, g = m ? "github urls" : t.packageManager || "npm", _ = h[d];
		if (!_) {
			let e = hh.filter((e) => e in h);
			Df(t, n.red(`\nUnsupported target "${d}" using ${g}`) + "\nSupported version targets are: " + e.join(", ") + (m ? "" : ", and tags (e.g. @next)"), { color: !1 });
		}
		try {
			try {
				p = await _(s, c, {
					...t,
					distTag: f,
					pre: t.pre == null ? u.startsWith("@") || Dr(c) : t.pre,
					retry: t.retry ?? 2
				});
			} catch (e) {
				p = { error: e?.body?.error || e.toString() };
			}
			p.version = !m && o && p?.version ? Fr(s, p.version) : p?.version ?? null;
		} catch (e) {
			let r = e ? (e.message || e).toString() : "";
			if (r.match(/E504|Gateway Timeout/i)) return { error: `${r}. All ${t.retry} retry attempts failed.` };
			if (r.match(/E400|E404|ENOTFOUND|404 Not Found|400 Bad Request/i)) return { error: `${r.replace(/ - Not found$/i, "")}. All ${t.retry} retry attempts failed. Either your internet connection is down, the registry is inaccessible, the authentication credentials are invalid, or the package does not exist.` };
			if (e.code === "ERR_INVALID_URL") return { error: r || "Invalid URL" };
			throw !process.env.NCU_TESTS && /(Response|network) timeout/i.test(r) && console.error("\n\n" + n.red("FetchError: Request Timeout. npm-registry-fetch defaults to 30000 (30 seconds). Try setting the --timeout option (in milliseconds) to override this.") + "\n"), e;
		}
		return a?.tick(), p.version && !t.cooldown && t.cacher?.set(s, d, p.version, p.time), p;
	}
	let s = await kh(r, o, { concurrency: t.concurrency });
	return await t.cacher?.save(), t.cacher?.log(), Dn(s, (e, t) => e.version || e.error || e.cooldownInfo ? { [r[t]]: e } : null);
}
//#endregion
//#region src/lib/getPreferredWildcard.ts
function Bh(e) {
	if (Object.keys(e).length === 0) return null;
	let t = Object.values(e).reduce((e, t) => {
		let n = cr.find((e) => t && t.includes(e));
		return n !== void 0 && (e[n] ||= [], e[n].push(t)), e;
	}, {}), n = rr(Object.entries(t).map(([e, t]) => ({
		wildcard: e,
		instances: t
	})), (e) => -e.instances.length);
	return n.length > 0 ? n[0].wildcard : null;
}
//#endregion
//#region src/lib/isUpgradeable.ts
function Vh(e, t, { downgrade: n } = {}) {
	if (!Y.default.validRange(e) || gr(e)) return !1;
	let [r] = tr.default.parseRange(e);
	if (!r) throw Error(`"${e}" could not be parsed by semver-utils. This is probably a bug. Please file an issue at https://github.com/raineorshine/npm-check-updates.`);
	let i = Nr(t), a = fr(r), o = !!Y.default.validRange(a), s = !!Y.default.valid(i);
	return o && s && (!Sr(i, a) || !Y.default.satisfies(i, r.operator === "<" ? e : a) && (n || !Y.default.ltr(i, a)));
}
//#endregion
//#region src/lib/upgradeDependencies.ts
function Hh(e, t, n = {}) {
	let r = n.target || "latest";
	e = Pn(e, (e, t) => !!t);
	let i = Bh(e) || "^", a = (e, t) => Vr(e, t, {
		wildcard: i,
		removeRange: n.removeRange
	});
	return [
		(e) => Rh(e, (e, n) => n in t),
		(e) => Object.entries(e).reduce((e, [n, r]) => {
			let i = t[n], a = null, o = null;
			if (Lr(r) && (a = Ir(r)[1]), Lr(i) && (o = Ir(i)[1]), zr(r)) {
				let [e] = (0, tr.parseRange)(Br(r));
				a = fr(e);
			}
			if (zr(i)) {
				let [e] = (0, tr.parseRange)(Br(i));
				o = fr(e);
			}
			return e[n] = {
				current: r,
				currentParsed: a,
				latest: i,
				latestParsed: o
			}, e;
		}, {}),
		(e) => Rh(e, ({ current: e, currentParsed: t, latest: n, latestParsed: i }, a) => {
			let o = Dr(e) && (typeof r == "string" ? r : r(a, (0, tr.parseRange)(e))).startsWith("@");
			return Vh(t || e, i || n, { downgrade: o });
		}),
		(e) => Object.entries(e).reduce((e, [t, { current: n, currentParsed: r, latest: i, latestParsed: o }]) => {
			let s = a(r || n, o || i);
			return e[t] = Lr(n) ? Rr(n, s) : zr(n) ? Ur(n, s) : s, e;
		}, {})
	].reduce((e, t) => t(e), e);
}
//#endregion
//#region src/lib/upgradePackageDefinitions.ts
var Uh = (e, t, n) => {
	let r = {
		...e,
		...t
	}, i = Rh(t, (e, t) => {
		let i = n[t];
		return i ? Object.entries(i).every(([e, t]) => r[e] === void 0 || !Y.default.validRange(t) || !Y.default.validRange(r[e]) || Y.default.intersects(r[e], t)) : !0;
	}), a = Object.keys(t).length > Object.keys(i).length, o = n;
	return a && (o = Rh(n, (e, n) => i[n] || !t[n])), {
		violated: a,
		filteredUpgradedDependencies: i,
		upgradedPeerDependencies: o
	};
};
async function Wh(e, t) {
	let n = await zh(e, t), r = Dn(n, (n, r) => r?.version && (!t.filterResults || t.filterResults(n, {
		currentVersion: e[n],
		currentVersionSemver: (0, tr.parseRange)(e[n]),
		upgradedVersion: r.version,
		upgradedVersionSemver: (0, tr.parse)(r.version)
	})) ? { [n]: r.version } : null), i = Rh(Hh(e, r, t), (n, i) => !t.jsonUpgraded || !t.minimal || !Y.default.satisfies(r[i], e[i])), a = Rh(r, (e, t) => i[t]), o = [
		i,
		n,
		t.peerDependencies
	];
	if (!t.peer || Object.keys(a).length === 0) return o;
	if (t.peer && Object.keys(a).length > 0) {
		let r = await Ih(a, t), s;
		if (l(t.peerDependencies, {
			...t.peerDependencies,
			...r
		})) {
			if (s = Uh(e, i, t.peerDependencies), !s.violated) return o;
		} else s = {
			violated: !1,
			filteredUpgradedDependencies: i,
			upgradedPeerDependencies: r
		};
		let c = 0;
		do {
			if (c++ > 6) throw Error("Stuck in a while loop. Please report an issue");
			let r = {
				...t.peerDependencies,
				...s.upgradedPeerDependencies
			};
			if (l(t.peerDependencies, r)) return [
				{},
				n,
				t.peerDependencies
			];
			let [i, a, u] = await Wh({
				...e,
				...s.filteredUpgradedDependencies
			}, {
				...t,
				peerDependencies: r,
				loglevel: "silent"
			});
			o = [
				{
					...s.filteredUpgradedDependencies,
					...i
				},
				{
					...n,
					...a
				},
				u
			], s = Uh(e, o[0], o[2]);
		} while (s.violated);
	}
	return o;
}
//#endregion
//#region src/lib/runGlobal.ts
async function Gh(e) {
	Z(e, "\nOptions:", "verbose"), Jr(e, e, "verbose"), Z(e, "\nGetting installed packages", "verbose");
	let t = {};
	try {
		let { cli: n, cwd: r, filter: i, filterVersion: a, global: o, packageManager: s, prefix: c, reject: l, rejectVersion: u } = e;
		t = await Eh({
			cli: n,
			cwd: r,
			filter: i,
			filterVersion: a,
			global: o,
			packageManager: s,
			prefix: c,
			reject: l,
			rejectVersion: u
		});
	} catch (t) {
		Df(e, t.message);
	}
	Z(e, "globalPackages:", "verbose"), Z(e, t, "verbose"), Z(e, "", "verbose"), Z(e, `Fetching ${e.target} versions`, "verbose");
	let [n, r] = await Wh(t, e);
	Z(e, r, "verbose");
	let i = Dn(r, (e, t) => {
		let n = t.time ?? t.cooldownInfo?.currentVersionTime;
		return n ? { [e]: n } : null;
	}), a = Dn(r, (e, t) => t.cooldownInfo ? { [e]: t.cooldownInfo } : null), o = Object.values(a).length, s = Object.keys(n);
	await ni(e, {
		current: t,
		upgraded: n,
		skippedByCooldown: a,
		latest: r,
		numCooldown: o,
		total: s.length,
		time: i
	});
	let c = n ? s.map((e) => Dh(e + "@" + n[e])).join(" ") : "[package]";
	if (e.json) Kr(e, n);
	else if (c.length) {
		let t = e.packageManager === "yarn" ? "yarn global upgrade" : e.packageManager === "pnpm" ? "pnpm -g add" : e.packageManager === "bun" ? "bun add -g" : "npm -g install";
		Z(e, "\n" + X.cyan("ncu") + " itself cannot upgrade global packages. Run the following to upgrade all global packages: \n\n" + X.cyan(`${t} ` + c) + "\n");
	}
	return e.cli && e.errorLevel === 2 && s.length > 0 && process.exit(1), n;
}
//#endregion
//#region src/lib/getCurrentDependencies.ts
var Kh = (e, t) => Y.default.validRange(e) && Y.default.validRange(t) && Y.default.gt(Y.default.minVersion(e), Y.default.minVersion(t)), qh = (e) => {
	if (!e.packageManager) return {};
	let [t, n] = e.packageManager.split("@");
	return { [t]: n };
};
function Jh(e = {}, t = {}) {
	let n = sp(t.dep).reduce((t, n) => ({
		...t,
		...n === "packageManager" ? qh(e) : Pn(e[n] || {}, (e, n) => !Kh(n, t[e]))
	}), {}), r = Dn(t.workspacePackages || []), i = {};
	try {
		i = Pn(Pn(n, (e) => !r[e]), wh(t.filter || null, t.reject || null, t.filterVersion || null, t.rejectVersion || null));
	} catch (e) {
		Df(t, "Invalid filter: " + e.message || e);
	}
	return i;
}
//#endregion
//#region src/lib/getEnginesNodeFromRegistry.ts
async function Yh(e, t) {
	let n = Th(t, t.packageManager);
	if (!n.getEngines) return {};
	let r = Object.keys(e).length, i;
	!t.json && t.loglevel !== "silent" && t.loglevel !== "verbose" && r > 0 && (i = new Ph.default("[:bar] :current/:total :percent", {
		total: r,
		width: 20
	}), i.render());
	let a = {};
	for (let [r, o] of Object.entries(e)) {
		let e = (await n.getEngines(r, o, t)).node;
		i && i.tick(), a[r] = e;
	}
	return a;
}
//#endregion
//#region src/lib/getIgnoredUpgradesDueToEnginesNode.ts
var Xh = (e, t) => !e || Y.default.satisfies(t, e);
async function Zh(e, t, n = {}) {
	if (!n.nodeEngineVersion) return {};
	let r = Y.default.minVersion(n.nodeEngineVersion)?.version;
	if (!r) return {};
	let [i, a] = await Wh(e, {
		...n,
		enginesNode: !1,
		nodeEngineVersion: void 0,
		loglevel: "silent"
	}), o = await Yh(Dn(a, (e, t) => i[e] && t?.version ? { [e]: t.version } : null), n), s = {};
	for (let [n, a] of Object.entries(i)) t[n] === a || Xh(o[n], r) || (s[n] = {
		from: e[n],
		to: a,
		enginesNode: o[n]
	});
	return s;
}
//#endregion
//#region src/lib/getIgnoredUpgradesDueToPeerDeps.ts
async function Qh(e, t, n, r = {}) {
	let i = {
		...e,
		...t
	}, [a, o] = await Wh(e, {
		...r,
		peer: !1,
		peerDependencies: void 0,
		loglevel: "silent"
	}), s = await Ih(Object.fromEntries(Object.entries(a).map(([e, t]) => [e, Y.default.validRange(t) ? Y.default.minVersion(t)?.version ?? t : t])), r), c = {};
	for (let [r, l] of Object.entries(a)) {
		if (t[r] === l) continue;
		let a = {};
		for (let [e, t] of Object.entries(n)) t[r] !== void 0 && o[r]?.version && !Y.default.satisfies(o[r].version, t[r]) && (a[e] = Y.default.validRange(t[r]) ? t[r] : `a range that semver does not understand: ${t[r]}. This range does not work with semver.satisfies or semver.intersects, which npm-check-updates relies on to determine peer dependency compatibility. Either this is a mistake in ${e}, or it relies on a new syntax that is not compatible with the semver package.`);
		if (Object.keys(a).length === 0) {
			let e = s?.[r] || {};
			for (let [t, n] of Object.entries(e)) i[t] && Y.default.validRange(i[t]) && !(!Y.default.validRange(n) || Y.default.intersects(i[t], n)) && (a[r] = `${t} ${n}`);
		}
		c[r] = {
			from: e[r],
			to: l,
			reason: a
		};
	}
	return c;
}
//#endregion
//#region node_modules/jsonc-parser/lib/esm/impl/scanner.js
function $h(e, t = !1) {
	let n = e.length, r = 0, i = "", a = 0, o = 16, s = 0, c = 0, l = 0, u = 0, d = 0;
	function f(t, n) {
		let i = 0, a = 0;
		for (; i < t || !n;) {
			let t = e.charCodeAt(r);
			if (t >= 48 && t <= 57) a = a * 16 + t - 48;
			else if (t >= 65 && t <= 70) a = a * 16 + t - 65 + 10;
			else if (t >= 97 && t <= 102) a = a * 16 + t - 97 + 10;
			else break;
			r++, i++;
		}
		return i < t && (a = -1), a;
	}
	function p(e) {
		r = e, i = "", a = 0, o = 16, d = 0;
	}
	function m() {
		let t = r;
		if (e.charCodeAt(r) === 48) r++;
		else for (r++; r < e.length && ng(e.charCodeAt(r));) r++;
		if (r < e.length && e.charCodeAt(r) === 46) if (r++, r < e.length && ng(e.charCodeAt(r))) for (r++; r < e.length && ng(e.charCodeAt(r));) r++;
		else return d = 3, e.substring(t, r);
		let n = r;
		if (r < e.length && (e.charCodeAt(r) === 69 || e.charCodeAt(r) === 101)) if (r++, (r < e.length && e.charCodeAt(r) === 43 || e.charCodeAt(r) === 45) && r++, r < e.length && ng(e.charCodeAt(r))) {
			for (r++; r < e.length && ng(e.charCodeAt(r));) r++;
			n = r;
		} else d = 3;
		return e.substring(t, n);
	}
	function h() {
		let t = "", i = r;
		for (;;) {
			if (r >= n) {
				t += e.substring(i, r), d = 2;
				break;
			}
			let a = e.charCodeAt(r);
			if (a === 34) {
				t += e.substring(i, r), r++;
				break;
			}
			if (a === 92) {
				if (t += e.substring(i, r), r++, r >= n) {
					d = 2;
					break;
				}
				switch (e.charCodeAt(r++)) {
					case 34:
						t += "\"";
						break;
					case 92:
						t += "\\";
						break;
					case 47:
						t += "/";
						break;
					case 98:
						t += "\b";
						break;
					case 102:
						t += "\f";
						break;
					case 110:
						t += "\n";
						break;
					case 114:
						t += "\r";
						break;
					case 116:
						t += "	";
						break;
					case 117:
						let e = f(4, !0);
						e >= 0 ? t += String.fromCharCode(e) : d = 4;
						break;
					default: d = 5;
				}
				i = r;
				continue;
			}
			if (a >= 0 && a <= 31) if (tg(a)) {
				t += e.substring(i, r), d = 2;
				break;
			} else d = 6;
			r++;
		}
		return t;
	}
	function g() {
		if (i = "", d = 0, a = r, c = s, u = l, r >= n) return a = n, o = 17;
		let t = e.charCodeAt(r);
		if (eg(t)) {
			do
				r++, i += String.fromCharCode(t), t = e.charCodeAt(r);
			while (eg(t));
			return o = 15;
		}
		if (tg(t)) return r++, i += String.fromCharCode(t), t === 13 && e.charCodeAt(r) === 10 && (r++, i += "\n"), s++, l = r, o = 14;
		switch (t) {
			case 123: return r++, o = 1;
			case 125: return r++, o = 2;
			case 91: return r++, o = 3;
			case 93: return r++, o = 4;
			case 58: return r++, o = 6;
			case 44: return r++, o = 5;
			case 34: return r++, i = h(), o = 10;
			case 47:
				let c = r - 1;
				if (e.charCodeAt(r + 1) === 47) {
					for (r += 2; r < n && !tg(e.charCodeAt(r));) r++;
					return i = e.substring(c, r), o = 12;
				}
				if (e.charCodeAt(r + 1) === 42) {
					r += 2;
					let t = n - 1, a = !1;
					for (; r < t;) {
						let t = e.charCodeAt(r);
						if (t === 42 && e.charCodeAt(r + 1) === 47) {
							r += 2, a = !0;
							break;
						}
						r++, tg(t) && (t === 13 && e.charCodeAt(r) === 10 && r++, s++, l = r);
					}
					return a || (r++, d = 1), i = e.substring(c, r), o = 13;
				}
				return i += String.fromCharCode(t), r++, o = 16;
			case 45: if (i += String.fromCharCode(t), r++, r === n || !ng(e.charCodeAt(r))) return o = 16;
			case 48:
			case 49:
			case 50:
			case 51:
			case 52:
			case 53:
			case 54:
			case 55:
			case 56:
			case 57: return i += m(), o = 11;
			default:
				for (; r < n && _(t);) r++, t = e.charCodeAt(r);
				if (a !== r) {
					switch (i = e.substring(a, r), i) {
						case "true": return o = 8;
						case "false": return o = 9;
						case "null": return o = 7;
					}
					return o = 16;
				}
				return i += String.fromCharCode(t), r++, o = 16;
		}
	}
	function _(e) {
		if (eg(e) || tg(e)) return !1;
		switch (e) {
			case 125:
			case 93:
			case 123:
			case 91:
			case 34:
			case 58:
			case 44:
			case 47: return !1;
		}
		return !0;
	}
	function v() {
		let e;
		do
			e = g();
		while (e >= 12 && e <= 15);
		return e;
	}
	return {
		setPosition: p,
		getPosition: () => r,
		scan: t ? v : g,
		getToken: () => o,
		getTokenValue: () => i,
		getTokenOffset: () => a,
		getTokenLength: () => r - a,
		getTokenStartLine: () => c,
		getTokenStartCharacter: () => a - u,
		getTokenError: () => d
	};
}
function eg(e) {
	return e === 32 || e === 9;
}
function tg(e) {
	return e === 10 || e === 13;
}
function ng(e) {
	return e >= 48 && e <= 57;
}
var rg;
(function(e) {
	e[e.lineFeed = 10] = "lineFeed", e[e.carriageReturn = 13] = "carriageReturn", e[e.space = 32] = "space", e[e._0 = 48] = "_0", e[e._1 = 49] = "_1", e[e._2 = 50] = "_2", e[e._3 = 51] = "_3", e[e._4 = 52] = "_4", e[e._5 = 53] = "_5", e[e._6 = 54] = "_6", e[e._7 = 55] = "_7", e[e._8 = 56] = "_8", e[e._9 = 57] = "_9", e[e.a = 97] = "a", e[e.b = 98] = "b", e[e.c = 99] = "c", e[e.d = 100] = "d", e[e.e = 101] = "e", e[e.f = 102] = "f", e[e.g = 103] = "g", e[e.h = 104] = "h", e[e.i = 105] = "i", e[e.j = 106] = "j", e[e.k = 107] = "k", e[e.l = 108] = "l", e[e.m = 109] = "m", e[e.n = 110] = "n", e[e.o = 111] = "o", e[e.p = 112] = "p", e[e.q = 113] = "q", e[e.r = 114] = "r", e[e.s = 115] = "s", e[e.t = 116] = "t", e[e.u = 117] = "u", e[e.v = 118] = "v", e[e.w = 119] = "w", e[e.x = 120] = "x", e[e.y = 121] = "y", e[e.z = 122] = "z", e[e.A = 65] = "A", e[e.B = 66] = "B", e[e.C = 67] = "C", e[e.D = 68] = "D", e[e.E = 69] = "E", e[e.F = 70] = "F", e[e.G = 71] = "G", e[e.H = 72] = "H", e[e.I = 73] = "I", e[e.J = 74] = "J", e[e.K = 75] = "K", e[e.L = 76] = "L", e[e.M = 77] = "M", e[e.N = 78] = "N", e[e.O = 79] = "O", e[e.P = 80] = "P", e[e.Q = 81] = "Q", e[e.R = 82] = "R", e[e.S = 83] = "S", e[e.T = 84] = "T", e[e.U = 85] = "U", e[e.V = 86] = "V", e[e.W = 87] = "W", e[e.X = 88] = "X", e[e.Y = 89] = "Y", e[e.Z = 90] = "Z", e[e.asterisk = 42] = "asterisk", e[e.backslash = 92] = "backslash", e[e.closeBrace = 125] = "closeBrace", e[e.closeBracket = 93] = "closeBracket", e[e.colon = 58] = "colon", e[e.comma = 44] = "comma", e[e.dot = 46] = "dot", e[e.doubleQuote = 34] = "doubleQuote", e[e.minus = 45] = "minus", e[e.openBrace = 123] = "openBrace", e[e.openBracket = 91] = "openBracket", e[e.plus = 43] = "plus", e[e.slash = 47] = "slash", e[e.formFeed = 12] = "formFeed", e[e.tab = 9] = "tab";
})(rg ||= {}), Array(20).fill(0).map((e, t) => " ".repeat(t));
var ig = 200;
Array(ig).fill(0).map((e, t) => "\n" + " ".repeat(t)), Array(ig).fill(0).map((e, t) => "\r" + " ".repeat(t)), Array(ig).fill(0).map((e, t) => "\r\n" + " ".repeat(t)), Array(ig).fill(0).map((e, t) => "\n" + "	".repeat(t)), Array(ig).fill(0).map((e, t) => "\r" + "	".repeat(t)), Array(ig).fill(0).map((e, t) => "\r\n" + "	".repeat(t));
//#endregion
//#region node_modules/jsonc-parser/lib/esm/impl/parser.js
var ag;
(function(e) {
	e.DEFAULT = { allowTrailingComma: !1 };
})(ag ||= {});
function og(e, t = [], n = ag.DEFAULT) {
	let r = null, i = [], a = [];
	function o(e) {
		Array.isArray(i) ? i.push(e) : r !== null && (i[r] = e);
	}
	return sg(e, {
		onObjectBegin: () => {
			let e = {};
			o(e), a.push(i), i = e, r = null;
		},
		onObjectProperty: (e) => {
			r = e;
		},
		onObjectEnd: () => {
			i = a.pop();
		},
		onArrayBegin: () => {
			let e = [];
			o(e), a.push(i), i = e, r = null;
		},
		onArrayEnd: () => {
			i = a.pop();
		},
		onLiteralValue: o,
		onError: (e, n, r) => {
			t.push({
				error: e,
				offset: n,
				length: r
			});
		}
	}, n), i[0];
}
function sg(e, t, n = ag.DEFAULT) {
	let r = $h(e, !1), i = [], a = 0;
	function o(e) {
		return e ? () => a === 0 && e(r.getTokenOffset(), r.getTokenLength(), r.getTokenStartLine(), r.getTokenStartCharacter()) : () => !0;
	}
	function s(e) {
		return e ? (t) => a === 0 && e(t, r.getTokenOffset(), r.getTokenLength(), r.getTokenStartLine(), r.getTokenStartCharacter()) : () => !0;
	}
	function c(e) {
		return e ? (t) => a === 0 && e(t, r.getTokenOffset(), r.getTokenLength(), r.getTokenStartLine(), r.getTokenStartCharacter(), () => i.slice()) : () => !0;
	}
	function l(e) {
		return e ? () => {
			a > 0 ? a++ : e(r.getTokenOffset(), r.getTokenLength(), r.getTokenStartLine(), r.getTokenStartCharacter(), () => i.slice()) === !1 && (a = 1);
		} : () => !0;
	}
	function u(e) {
		return e ? () => {
			a > 0 && a--, a === 0 && e(r.getTokenOffset(), r.getTokenLength(), r.getTokenStartLine(), r.getTokenStartCharacter());
		} : () => !0;
	}
	let d = l(t.onObjectBegin), f = c(t.onObjectProperty), p = u(t.onObjectEnd), m = l(t.onArrayBegin), h = u(t.onArrayEnd), g = c(t.onLiteralValue), _ = s(t.onSeparator), v = o(t.onComment), y = s(t.onError), b = n && n.disallowComments, x = n && n.allowTrailingComma;
	function S() {
		for (;;) {
			let e = r.scan();
			switch (r.getTokenError()) {
				case 4:
					C(14);
					break;
				case 5:
					C(15);
					break;
				case 3:
					C(13);
					break;
				case 1:
					b || C(11);
					break;
				case 2:
					C(12);
					break;
				case 6:
					C(16);
					break;
			}
			switch (e) {
				case 12:
				case 13:
					b ? C(10) : v();
					break;
				case 16:
					C(1);
					break;
				case 15:
				case 14: break;
				default: return e;
			}
		}
	}
	function C(e, t = [], n = []) {
		if (y(e), t.length + n.length > 0) {
			let e = r.getToken();
			for (; e !== 17;) {
				if (t.indexOf(e) !== -1) {
					S();
					break;
				} else if (n.indexOf(e) !== -1) break;
				e = S();
			}
		}
	}
	function w(e) {
		let t = r.getTokenValue();
		return e ? g(t) : (f(t), i.push(t)), S(), !0;
	}
	function T() {
		switch (r.getToken()) {
			case 11:
				let e = r.getTokenValue(), t = Number(e);
				isNaN(t) && (C(2), t = 0), g(t);
				break;
			case 7:
				g(null);
				break;
			case 8:
				g(!0);
				break;
			case 9:
				g(!1);
				break;
			default: return !1;
		}
		return S(), !0;
	}
	function E() {
		return r.getToken() === 10 ? (w(!1), r.getToken() === 6 ? (_(":"), S(), k() || C(4, [], [2, 5])) : C(5, [], [2, 5]), i.pop(), !0) : (C(3, [], [2, 5]), !1);
	}
	function D() {
		d(), S();
		let e = !1;
		for (; r.getToken() !== 2 && r.getToken() !== 17;) {
			if (r.getToken() === 5) {
				if (e || C(4, [], []), _(","), S(), r.getToken() === 2 && x) break;
			} else e && C(6, [], []);
			E() || C(4, [], [2, 5]), e = !0;
		}
		return p(), r.getToken() === 2 ? S() : C(7, [2], []), !0;
	}
	function O() {
		m(), S();
		let e = !0, t = !1;
		for (; r.getToken() !== 4 && r.getToken() !== 17;) {
			if (r.getToken() === 5) {
				if (t || C(4, [], []), _(","), S(), r.getToken() === 4 && x) break;
			} else t && C(6, [], []);
			e ? (i.push(0), e = !1) : i[i.length - 1]++, k() || C(4, [], [4, 5]), t = !0;
		}
		return h(), e || i.pop(), r.getToken() === 4 ? S() : C(8, [4], []), !0;
	}
	function k() {
		switch (r.getToken()) {
			case 3: return O();
			case 1: return D();
			case 10: return w(!0);
			default: return T();
		}
	}
	return S(), r.getToken() === 17 ? n.allowEmptyContent ? !0 : (C(4, [], []), !1) : k() ? (r.getToken() !== 17 && C(9, [], []), !0) : (C(4, [], []), !1);
}
function cg(e, t) {
	let n = $h(e), r = [], i, a = 0, o;
	do
		switch (o = n.getPosition(), i = n.scan(), i) {
			case 12:
			case 13:
			case 17:
				a !== o && r.push(e.substring(a, o)), t !== void 0 && r.push(n.getTokenValue().replace(/[^\r\n]/g, t)), a = n.getPosition();
				break;
		}
	while (i !== 17);
	return r.join("");
}
//#endregion
//#region node_modules/jsonc-parser/lib/esm/main.js
var lg;
(function(e) {
	e[e.None = 0] = "None", e[e.UnexpectedEndOfComment = 1] = "UnexpectedEndOfComment", e[e.UnexpectedEndOfString = 2] = "UnexpectedEndOfString", e[e.UnexpectedEndOfNumber = 3] = "UnexpectedEndOfNumber", e[e.InvalidUnicode = 4] = "InvalidUnicode", e[e.InvalidEscapeCharacter = 5] = "InvalidEscapeCharacter", e[e.InvalidCharacter = 6] = "InvalidCharacter";
})(lg ||= {});
var ug;
(function(e) {
	e[e.OpenBraceToken = 1] = "OpenBraceToken", e[e.CloseBraceToken = 2] = "CloseBraceToken", e[e.OpenBracketToken = 3] = "OpenBracketToken", e[e.CloseBracketToken = 4] = "CloseBracketToken", e[e.CommaToken = 5] = "CommaToken", e[e.ColonToken = 6] = "ColonToken", e[e.NullKeyword = 7] = "NullKeyword", e[e.TrueKeyword = 8] = "TrueKeyword", e[e.FalseKeyword = 9] = "FalseKeyword", e[e.StringLiteral = 10] = "StringLiteral", e[e.NumericLiteral = 11] = "NumericLiteral", e[e.LineCommentTrivia = 12] = "LineCommentTrivia", e[e.BlockCommentTrivia = 13] = "BlockCommentTrivia", e[e.LineBreakTrivia = 14] = "LineBreakTrivia", e[e.Trivia = 15] = "Trivia", e[e.Unknown = 16] = "Unknown", e[e.EOF = 17] = "EOF";
})(ug ||= {});
var dg = og, fg = cg, pg;
(function(e) {
	e[e.InvalidSymbol = 1] = "InvalidSymbol", e[e.InvalidNumberFormat = 2] = "InvalidNumberFormat", e[e.PropertyNameExpected = 3] = "PropertyNameExpected", e[e.ValueExpected = 4] = "ValueExpected", e[e.ColonExpected = 5] = "ColonExpected", e[e.CommaExpected = 6] = "CommaExpected", e[e.CloseBraceExpected = 7] = "CloseBraceExpected", e[e.CloseBracketExpected = 8] = "CloseBracketExpected", e[e.EndOfFileExpected = 9] = "EndOfFileExpected", e[e.InvalidCommentToken = 10] = "InvalidCommentToken", e[e.UnexpectedEndOfComment = 11] = "UnexpectedEndOfComment", e[e.UnexpectedEndOfString = 12] = "UnexpectedEndOfString", e[e.UnexpectedEndOfNumber = 13] = "UnexpectedEndOfNumber", e[e.InvalidUnicode = 14] = "InvalidUnicode", e[e.InvalidEscapeCharacter = 15] = "InvalidEscapeCharacter", e[e.InvalidCharacter = 16] = "InvalidCharacter";
})(pg ||= {});
function mg(e) {
	switch (e) {
		case 1: return "InvalidSymbol";
		case 2: return "InvalidNumberFormat";
		case 3: return "PropertyNameExpected";
		case 4: return "ValueExpected";
		case 5: return "ColonExpected";
		case 6: return "CommaExpected";
		case 7: return "CloseBraceExpected";
		case 8: return "CloseBracketExpected";
		case 9: return "EndOfFileExpected";
		case 10: return "InvalidCommentToken";
		case 11: return "UnexpectedEndOfComment";
		case 12: return "UnexpectedEndOfString";
		case 13: return "UnexpectedEndOfNumber";
		case 14: return "InvalidUnicode";
		case 15: return "InvalidEscapeCharacter";
		case 16: return "InvalidCharacter";
	}
	return "<unknown ParseErrorCode>";
}
//#endregion
//#region src/lib/utils/parseJson.ts
var hg = process.stdout.columns || 80;
function gg(e) {
	return `${e.length ? e.slice(0, Math.min(e.length, hg)) : "<empty>"}\n`;
}
function _g(e) {
	return e > hg ? "" : `${" ".repeat(e - 1)}^\n`;
}
function vg(e, t, n) {
	let r = e.length;
	if (r === 0) return "<empty>";
	if (r === 1) return `${gg(e[0])}${_g(n)}`;
	let i = Math.min(t + 2, r), a = "";
	for (let r = Math.max(t - 2, 1); r <= i; r++) a += gg(e[r - 1]), r === t && (a += _g(n));
	return `${a}\n`;
}
function yg(e) {
	e = fg(e);
	try {
		return JSON.parse(e);
	} catch {
		let t = [], n = dg(e, t);
		if (t.length === 0) return n;
		let r = "", i = e.split("\n");
		for (let e of t) {
			let t = e.offset, n = 1, a = 1, o = 0;
			for (let e of i) {
				if (o + e.length >= t) {
					a = t - o + 1;
					break;
				}
				o += e.length + 1, n++;
			}
			r += `Error at line ${n}, column ${a}: ${mg(e.error)}\n${vg(i, n, a)}\n`;
		}
		throw SyntaxError(r);
	}
}
//#endregion
//#region src/lib/runLocal.ts
var bg = "\n  ↑/↓: Select a package\n  Space: Toggle selection\n  a: Toggle all\n  Esc/q: Quit\n  Enter: Upgrade";
function xg(e, t) {
	let n = e ? bg.split("\n").length : 0;
	return process.stdout.rows ? Math.max(3, process.stdout.rows - n - 1 - (t?.length ?? 0) * 2) : 50;
}
async function Sg(e, t, n) {
	let r = Th(n, n.packageManager), i = {};
	for (let a of Object.keys(t)) {
		let o = e[a] || null, s = t[a] || null;
		i[a] = await r.packageAuthorChanged(a, o, s, n);
	}
	return i;
}
var Cg = async (e, t, n, r, i, a) => {
	let o = [], s = process.stdout.rows > 18, c = Dn((await Qr({
		from: e,
		to: t,
		skippedByCooldown: n,
		format: a.format,
		pkgFile: i || void 0,
		time: r
	})).toString().split("\n"), (e) => ({ [e.trim().split(" ")[0]]: e.trim() }));
	if (Object.keys(t).length > 0) if (Z(a, ""), a.format?.includes("group")) {
		let n = yr(t, e, a);
		o = (await (0, he.default)({
			choices: [...n.flatMap(({ heading: e, groupName: t, packages: n }) => [{
				title: "\n" + e,
				heading: !0
			}, ...Object.keys(n).sort().map((e) => ({
				title: c[e],
				value: e,
				selected: ["patch", "minor"].includes(t)
			}))]), {
				title: " ",
				heading: !0
			}],
			hint: s && bg,
			instructions: !1,
			message: "Choose which packages to update",
			name: "value",
			optionsPerPage: xg(s, n),
			type: "multiselect",
			onState: (e) => {
				e.aborted && process.nextTick(() => process.exit(1));
			}
		})).value;
	} else o = (await (0, he.default)({
		choices: [...Object.keys(t).sort().map((e) => ({
			title: c[e],
			value: e,
			selected: !0
		})), {
			title: " ",
			heading: !0
		}],
		hint: s && bg + "\n",
		instructions: !1,
		message: "Choose which packages to update",
		name: "value",
		optionsPerPage: xg(s),
		type: "multiselect",
		onState: (e) => {
			e.aborted && process.nextTick(() => process.exit(1));
		}
	})).value;
	return Dn(o, (e) => ({ [e]: t[e] }));
};
async function wg(e, t, r) {
	Z(e, "\nOptions:", "verbose"), Jr(e, e, "verbose");
	let i;
	try {
		t ? i = yg(t) : Df(e, "Missing package data");
	} catch (t) {
		Df(e, `Invalid package file${r ? `: ${r}` : " from stdin"}. Error details:\n${t.message}`);
	}
	let a = Jh(i, e);
	Z(e, "\nCurrent versions:", "verbose"), Z(e, a, "verbose"), e.enginesNode && (e.nodeEngineVersion = i?.engines?.node), e.peer && (e.peerDependencies = await Ih(Object.fromEntries(Object.entries(a).map(([e, t]) => [e, Y.default.validRange(t) ? Y.default.minVersion(t)?.version ?? t : t])), e));
	let [o, s, c] = await Wh(a, e), l = Dn(s, (e, t) => t.version ? { [e]: t.version } : null), u = Dn(s, (e, t) => t.error ? { [e]: t.error } : null), d = Dn(s, (e, t) => {
		let n = t.time ?? t.cooldownInfo?.currentVersionTime;
		return n ? { [e]: n } : null;
	}), f = Dn(s, (e, t) => t.cooldownInfo ? { [e]: t.cooldownInfo } : null), p = Object.values(f).length;
	e.peer && (Z(e, "\nupgradedPeerDependencies:", "verbose"), Z(e, c, "verbose")), Z(e, `\n${typeof e.target == "string" ? `${e.target[0].toUpperCase()}${e.target.slice(1)}` : "Fetched"} versions:`, "verbose"), Z(e, l, "verbose"), Z(e, "\nUpgraded versions:", "verbose"), Z(e, o, "verbose");
	let m = e.minimal ? Dn(o, (e, t) => Y.default.satisfies(l[e], a[e]) ? null : { [e]: t }) : o, h = (e.format || []).includes("ownerChanged") ? await Sg(a, m, e) : void 0, g = e.interactive ? await Cg(a, m, f, d, r, e) : m;
	if (!e.json || e.deep) {
		if (await ni(e.interactive ? {
			...e,
			format: (e.format || []).filter((e) => e !== "group")
		} : e, {
			current: a,
			upgraded: g,
			skippedByCooldown: f,
			total: Object.keys(o).length,
			latest: s,
			numCooldown: p,
			ownersChangedDeps: h,
			pkgFile: r || void 0,
			errors: u,
			time: d
		}), e.peer) {
			let t = await Qh(a, o, c, e);
			Object.keys(t).length > 0 && ri(e, t);
		}
		if (e.enginesNode) {
			let t = await Zh(a, o, e);
			Object.keys(t).length > 0 && ii(e, t);
		}
	}
	let _ = await fp(t, a, g, e, r || void 0), v = e.jsonAll ? r?.endsWith(".yaml") || r?.endsWith(".yml") ? (0, Nd.parseDocument)(_).toJSON() : yg(_) : e.jsonDeps && r?.endsWith(".json") ? Lh(yg(_), sp(e.dep)) : g, y;
	if (e.json && !e.deep && Kr(e, v), Object.keys(m).length > 0 && r) if (e.upgrade) y = n.writeFile(r.replace("#catalog", ""), _);
	else {
		let t = process.env.npm_lifecycle_event === "npx" ? "npx npm-check-updates" : "ncu", n = process.argv.slice(2).map((e) => e.includes(" ") ? `"${e}"` : e).join(" "), r = n && " " + n;
		Z(e, `\nRun ${X.cyan(`${t}${r} -u`)} to upgrade ${e.packageFile || "package.json"}`);
	}
	return await y, v;
}
//#endregion
//#region src/lib/defineConfig.ts
function Tg(e) {
	return e;
}
//#endregion
//#region src/index.ts
process.env.INJECT_PROMPTS && he.default.inject(JSON.parse(process.env.INJECT_PROMPTS));
var Eg = !1, Dg = null;
process.on("unhandledRejection", (e) => {
	console.error(e), Eg = !0;
}), process.on("exit", () => {
	Eg && Dg && Df(Dg, `Unhandled Rejection! This is a bug and should be reported: ${ge.bugs.url}`);
});
var Og = (e) => {
	e.global && (process.env.VOLTA_HOME || process.env.PATH?.includes("\\Volta")) && (Z(e, "It appears you are using Volta. `npm-check-updates --global` cannot be used with Volta because Volta has its own system for managing global packages which circumvents npm.\n\nIf you are still receiving this message after uninstalling Volta, ensure your PATH does not contain an entry for Volta and your shell profile does not define VOLTA_HOME. You may need to reboot for changes to your shell profile to take effect.", "error"), process.exit(1));
}, kg = async (e, n) => {
	let r = {
		...e,
		cwd: e.cwd || t.resolve(n, ".."),
		packageFile: n
	};
	return e.packageManager === "staticRegistry" ? await ji({
		...r,
		packageManager: void 0
	}) : e.packageManager && e.packageManager !== "npm" ? e.packageManager : await ji(r);
}, Ag = (e, t, n) => {
	let r = !n.deep && !n.workspaces && !n.workspace ? { [e[0]]: t } : t;
	return Object.values(r).some((e) => Object.keys(e).length > 0);
}, jg = async (e, n, r) => {
	if (r.install === "never") {
		Z(r, "");
		return;
	}
	if (!Ag(e, n, r)) return;
	let i = await kg(r, e[0]), a = `Run ${X.cyan(i + " install")}${e.length > 1 && !r.workspace && !r.workspaces ? " in each project directory" : ""} to install new versions`, o = r.interactive && (process.env.NCU_TESTS || !process.env.NCU_DOCTOR), s;
	if (o && r.install === "prompt" && (Z(r, ""), s = await (0, he.default)({
		type: "confirm",
		name: "value",
		message: `${a}?`,
		initial: !0,
		onState: (e) => {
			e.aborted && process.nextTick(() => process.exit(1));
		}
	})), r.install === "always" || o && s.value) {
		r.install === "always" && Z(r, ""), Z(r, "Installing dependencies...");
		let n = r.workspaces || r.workspace?.length ? ["package.json"] : e;
		for (let e of n) {
			let n = await kg(r, e), i = r.cwd || t.resolve(e, ".."), a = "";
			try {
				await Al(n, ["install"], {
					stdout: (e) => {
						a += e;
					},
					stderr: (e) => {
						console.error(X.red(e.toString()));
					}
				}, {
					cwd: i,
					env: {
						...process.env,
						...r.color === !1 ? null : { FORCE_COLOR: !0 },
						...n === "pnpm" ? { npm_config_strict_peer_dependencies: !1 } : null
					}
				}), Z(r, a), Z(r, "Done");
			} catch (e) {
				console.error(e?.message || e || a), Df(r, "Install failed. This is not a bug in npm-check-updates. The most common causes are invalid peer dependencies, networking issues, or failing postinstall scripts. Consider using --peer to filter updates to compatible versions (takes longer) or --doctor to identify breaking upgrades.");
			}
		}
	} else o || Z(r, `\n${a}.`);
};
async function Mg(e, n) {
	let [r, i] = await Hm(e), a = r.map((e) => e.filepath), o = e.workspaces || !!e.workspace?.length;
	e.deep = e.deep || o || r.length > 1;
	let s;
	if (e.global) {
		let t = await Gh(e);
		return clearTimeout(n), t;
	} else if (e.deep) {
		let n = {};
		for (let [a, o] of r.entries()) {
			let r = a > 0, s = (await Km({
				packageFile: o.filepath,
				options: e
			})).config;
			e.mergeConfig && Object.keys(s).length && (s = xh(e, s));
			let c = {
				...e,
				...s,
				packageFile: o.filepath,
				workspacePackages: i
			}, l, u, d;
			if (o.filepath.includes("#") || o.name === "catalogs") {
				l = o.pkgFile, u = o.filepath, d = o.filepath.includes("#catalog") ? o.filepath.replace("#catalog", "") : o.filepath;
				let e = t.resolve(d);
				r && Z(c, ""), Z(c, `${c.upgrade ? "Upgrading" : "Checking"} ${e} catalog dependencies`);
			} else {
				r && Z(c, "");
				let e = await gp(c);
				l = e.pkgData, u = e.pkgFile || o.filepath, d = u;
			}
			let f = c.cwd ? t.relative(t.resolve(c.cwd), d).replace(/\\/g, "/") : d;
			n[f] = await wg(c, l, u);
		}
		s = n, e.json && Kr(e, s);
	} else {
		r.length === 1 && r[0].filepath !== (e.packageFile || "package.json") && (e.packageFile = r[0].filepath);
		let { pkgData: t, pkgFile: n } = await gp(e);
		a.length === 0 && n && (a = [n]), s = await wg(e, t, n);
	}
	return clearTimeout(n), e.errorLevel === 2 && Ag(a, s, e) && Df(e, "\nDependencies not up-to-date"), e.upgrade && (e.packageManager === "deno" ? Z(e, "") : await jg(a, s, e)), s;
}
async function Ng(e = {}, { cli: t } = {}) {
	Eg = !1;
	let n = await yh(e, { cli: t });
	Dg = n, Mn(n.color), Og(n), Z(n, "Initializing", "verbose"), n.cacheClear && await ui(n);
	let r, i = new Promise(() => null);
	if (n.timeout) {
		let e = typeof n.timeout == "string" ? Number.parseInt(n.timeout, 10) : n.timeout;
		i = new Promise((t, i) => {
			r = setTimeout(() => {
				let t = `Exceeded global timeout of ${e}ms`;
				i(t);
				try {
					Df(n, t);
				} catch {}
			}, e);
		});
	}
	if (n.doctor) {
		if (n.upgrade) return Promise.race([i, hp(Ng, n)]);
		Z(n, `Usage: ncu --doctor\n\n${typeof wi.doctor.help == "function" ? wi.doctor.help({}) : wi.doctor.help}`, "warn");
	} else return Promise.race([i, Mg(n, r)]);
}
//#endregion
export { k as _, Si as a, En as c, Ye as d, Ng as default, Ng as run, Tg as defineConfig, be as f, T as g, C as h, Ti as i, At as l, w as m, Km as n, Mn as o, ge as p, wi as r, jn as s, Rh as t, ot as u, O as v, D as y };

//# sourceMappingURL=index.js.map