storybook
Version:
Storybook framework-agnostic API
1,253 lines (1,219 loc) • 366 kB
JavaScript
import ESM_COMPAT_Module from "node:module";
import { fileURLToPath as ESM_COMPAT_fileURLToPath } from 'node:url';
import { dirname as ESM_COMPAT_dirname } from 'node:path';
const __filename = ESM_COMPAT_fileURLToPath(import.meta.url);
const __dirname = ESM_COMPAT_dirname(__filename);
const require = ESM_COMPAT_Module.createRequire(import.meta.url);
var qf = Object.create;
var vt = Object.defineProperty;
var Nf = Object.getOwnPropertyDescriptor;
var jf = Object.getOwnPropertyNames;
var Gf = Object.getPrototypeOf, Wf = Object.prototype.hasOwnProperty;
var s = (t, e) => vt(t, "name", { value: e, configurable: !0 }), k = /* @__PURE__ */ ((t) => typeof require < "u" ? require : typeof Proxy <
"u" ? new Proxy(t, {
get: (e, r) => (typeof require < "u" ? require : e)[r]
}) : t)(function(t) {
if (typeof require < "u") return require.apply(this, arguments);
throw Error('Dynamic require of "' + t + '" is not supported');
});
var wn = (t, e) => () => (t && (e = t(t = 0)), e);
var c = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), tr = (t, e) => {
for (var r in e)
vt(t, r, { get: e[r], enumerable: !0 });
}, An = (t, e, r, u) => {
if (e && typeof e == "object" || typeof e == "function")
for (let n of jf(e))
!Wf.call(t, n) && n !== r && vt(t, n, { get: () => e[n], enumerable: !(u = Nf(e, n)) || u.enumerable });
return t;
};
var P = (t, e, r) => (r = t != null ? qf(Gf(t)) : {}, An(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
e || !t || !t.__esModule ? vt(r, "default", { value: t, enumerable: !0 }) : r,
t
)), Vf = (t) => An(vt({}, "__esModule", { value: !0 }), t);
// ../node_modules/are-we-there-yet/lib/tracker-base.js
var mu = c((DE, Sn) => {
"use strict";
var Uf = k("events"), Yf = 0, pu = class extends Uf {
static {
s(this, "TrackerBase");
}
constructor(e) {
super(), this.id = ++Yf, this.name = e;
}
};
Sn.exports = pu;
});
// ../node_modules/are-we-there-yet/lib/tracker.js
var rr = c((lE, Tn) => {
"use strict";
var Hf = mu(), gu = class extends Hf {
static {
s(this, "Tracker");
}
constructor(e, r) {
super(e), this.workDone = 0, this.workTodo = r || 0;
}
completed() {
return this.workTodo === 0 ? 0 : this.workDone / this.workTodo;
}
addWork(e) {
this.workTodo += e, this.emit("change", this.name, this.completed(), this);
}
completeWork(e) {
this.workDone += e, this.workDone > this.workTodo && (this.workDone = this.workTodo), this.emit("change", this.name, this.completed(),
this);
}
finish() {
this.workTodo = this.workDone = 1, this.emit("change", this.name, 1, this);
}
};
Tn.exports = gu;
});
// ../node_modules/are-we-there-yet/lib/tracker-stream.js
var Cu = c((cE, $n) => {
"use strict";
var zf = k("stream"), Kf = rr(), Fu = class extends zf.Transform {
static {
s(this, "TrackerStream");
}
constructor(e, r, u) {
super(u), this.tracker = new Kf(e, r), this.name = e, this.id = this.tracker.id, this.tracker.on("change", this.trackerChange.bind(this));
}
trackerChange(e, r) {
this.emit("change", e, r, this);
}
_transform(e, r, u) {
this.tracker.completeWork(e.length ? e.length : 1), this.push(e), u();
}
_flush(e) {
this.tracker.finish(), e();
}
completed() {
return this.tracker.completed();
}
addWork(e) {
return this.tracker.addWork(e);
}
finish() {
return this.tracker.finish();
}
};
$n.exports = Fu;
});
// ../node_modules/are-we-there-yet/lib/tracker-group.js
var In = c((fE, _n) => {
"use strict";
var Zf = mu(), On = rr(), Jf = Cu(), Eu = class t extends Zf {
static {
s(this, "TrackerGroup");
}
parentGroup = null;
trackers = [];
completion = {};
weight = {};
totalWeight = 0;
finished = !1;
bubbleChange = Xf(this);
nameInTree() {
for (var e = [], r = this; r; )
e.unshift(r.name), r = r.parentGroup;
return e.join("/");
}
addUnit(e, r) {
if (e.addUnit) {
for (var u = this; u; ) {
if (e === u)
throw new Error(
"Attempted to add tracker group " + e.name + " to tree that already includes it " + this.nameInTree(this)
);
u = u.parentGroup;
}
e.parentGroup = this;
}
return this.weight[e.id] = r || 1, this.totalWeight += this.weight[e.id], this.trackers.push(e), this.completion[e.id] = e.completed(),
e.on("change", this.bubbleChange), this.finished || this.emit("change", e.name, this.completion[e.id], e), e;
}
completed() {
if (this.trackers.length === 0)
return 0;
for (var e = 1 / this.totalWeight, r = 0, u = 0; u < this.trackers.length; u++) {
var n = this.trackers[u].id;
r += e * this.weight[n] * this.completion[n];
}
return r;
}
newGroup(e, r) {
return this.addUnit(new t(e), r);
}
newItem(e, r, u) {
return this.addUnit(new On(e, r), u);
}
newStream(e, r, u) {
return this.addUnit(new Jf(e, r), u);
}
finish() {
this.finished = !0, this.trackers.length || this.addUnit(new On(), 1, !0);
for (var e = 0; e < this.trackers.length; e++) {
var r = this.trackers[e];
r.finish(), r.removeListener("change", this.bubbleChange);
}
this.emit("change", this.name, 1, this);
}
debug(e = 0) {
let r = " ".repeat(e), u = `${r}${this.name || "top"}: ${this.completed()}
`;
return this.trackers.forEach(function(n) {
u += n instanceof t ? n.debug(e + 1) : `${r} ${n.name}: ${n.completed()}
`;
}), u;
}
};
function Xf(t) {
return function(e, r, u) {
t.completion[u.id] = r, !t.finished && t.emit("change", e || t.name, t.completed(), t);
};
}
s(Xf, "bubbleChange");
_n.exports = Eu;
});
// ../node_modules/are-we-there-yet/lib/index.js
var Ln = c((ur) => {
"use strict";
ur.TrackerGroup = In();
ur.Tracker = rr();
ur.TrackerStream = Cu();
});
// ../node_modules/console-control-strings/index.js
var ir = c((N) => {
"use strict";
var H = "\x1B[";
N.up = /* @__PURE__ */ s(function(e) {
return H + (e || "") + "A";
}, "up");
N.down = /* @__PURE__ */ s(function(e) {
return H + (e || "") + "B";
}, "down");
N.forward = /* @__PURE__ */ s(function(e) {
return H + (e || "") + "C";
}, "forward");
N.back = /* @__PURE__ */ s(function(e) {
return H + (e || "") + "D";
}, "back");
N.nextLine = /* @__PURE__ */ s(function(e) {
return H + (e || "") + "E";
}, "nextLine");
N.previousLine = /* @__PURE__ */ s(function(e) {
return H + (e || "") + "F";
}, "previousLine");
N.horizontalAbsolute = /* @__PURE__ */ s(function(e) {
if (e == null) throw new Error("horizontalAboslute requires a column to position to");
return H + e + "G";
}, "horizontalAbsolute");
N.eraseData = /* @__PURE__ */ s(function() {
return H + "J";
}, "eraseData");
N.eraseLine = /* @__PURE__ */ s(function() {
return H + "K";
}, "eraseLine");
N.goto = function(t, e) {
return H + e + ";" + t + "H";
};
N.gotoSOL = function() {
return "\r";
};
N.beep = function() {
return "\x07";
};
N.hideCursor = /* @__PURE__ */ s(function() {
return H + "?25l";
}, "hideCursor");
N.showCursor = /* @__PURE__ */ s(function() {
return H + "?25h";
}, "showCursor");
var kn = {
reset: 0,
// styles
bold: 1,
italic: 3,
underline: 4,
inverse: 7,
// resets
stopBold: 22,
stopItalic: 23,
stopUnderline: 24,
stopInverse: 27,
// colors
white: 37,
black: 30,
blue: 34,
cyan: 36,
green: 32,
magenta: 35,
red: 31,
yellow: 33,
bgWhite: 47,
bgBlack: 40,
bgBlue: 44,
bgCyan: 46,
bgGreen: 42,
bgMagenta: 45,
bgRed: 41,
bgYellow: 43,
grey: 90,
brightBlack: 90,
brightRed: 91,
brightGreen: 92,
brightYellow: 93,
brightBlue: 94,
brightMagenta: 95,
brightCyan: 96,
brightWhite: 97,
bgGrey: 100,
bgBrightBlack: 100,
bgBrightRed: 101,
bgBrightGreen: 102,
bgBrightYellow: 103,
bgBrightBlue: 104,
bgBrightMagenta: 105,
bgBrightCyan: 106,
bgBrightWhite: 107
};
N.color = /* @__PURE__ */ s(function(e) {
return (arguments.length !== 1 || !Array.isArray(e)) && (e = Array.prototype.slice.call(arguments)), H + e.map(Qf).join(";") + "m";
}, "color");
function Qf(t) {
if (kn[t] != null) return kn[t];
throw new Error("Unknown color or style name: " + t);
}
s(Qf, "colorNameToCode");
});
// ../node_modules/string-width/node_modules/ansi-regex/index.js
var Mn = c((CE, Pn) => {
"use strict";
Pn.exports = ({ onlyFirst: t = !1 } = {}) => {
let e = [
"[\\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(e, t ? void 0 : "g");
};
});
// ../node_modules/string-width/node_modules/strip-ansi/index.js
var qn = c((EE, Rn) => {
"use strict";
var e0 = Mn();
Rn.exports = (t) => typeof t == "string" ? t.replace(e0(), "") : t;
});
// ../node_modules/is-fullwidth-code-point/index.js
var jn = c((bE, bu) => {
"use strict";
var Nn = /* @__PURE__ */ s((t) => Number.isNaN(t) ? !1 : t >= 4352 && (t <= 4447 || // Hangul Jamo
t === 9001 || // LEFT-POINTING ANGLE BRACKET
t === 9002 || // RIGHT-POINTING ANGLE BRACKET
// CJK Radicals Supplement .. Enclosed CJK Letters and Months
11904 <= t && t <= 12871 && t !== 12351 || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
12880 <= t && t <= 19903 || // CJK Unified Ideographs .. Yi Radicals
19968 <= t && t <= 42182 || // Hangul Jamo Extended-A
43360 <= t && t <= 43388 || // Hangul Syllables
44032 <= t && t <= 55203 || // CJK Compatibility Ideographs
63744 <= t && t <= 64255 || // Vertical Forms
65040 <= t && t <= 65049 || // CJK Compatibility Forms .. Small Form Variants
65072 <= t && t <= 65131 || // Halfwidth and Fullwidth Forms
65281 <= t && t <= 65376 || 65504 <= t && t <= 65510 || // Kana Supplement
110592 <= t && t <= 110593 || // Enclosed Ideographic Supplement
127488 <= t && t <= 127569 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
131072 <= t && t <= 262141), "isFullwidthCodePoint");
bu.exports = Nn;
bu.exports.default = Nn;
});
// ../node_modules/string-width/node_modules/emoji-regex/index.js
var Wn = c((vE, Gn) => {
"use strict";
Gn.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;
};
});
// ../node_modules/string-width/index.js
var Ze = c((yE, xu) => {
"use strict";
var t0 = qn(), r0 = jn(), u0 = Wn(), Vn = /* @__PURE__ */ s((t) => {
if (typeof t != "string" || t.length === 0 || (t = t0(t), t.length === 0))
return 0;
t = t.replace(u0(), " ");
let e = 0;
for (let r = 0; r < t.length; r++) {
let u = t.codePointAt(r);
u <= 31 || u >= 127 && u <= 159 || u >= 768 && u <= 879 || (u > 65535 && r++, e += r0(u) ? 2 : 1);
}
return e;
}, "stringWidth");
xu.exports = Vn;
xu.exports.default = Vn;
});
// ../node_modules/wide-align/align.js
var Un = c((nr) => {
"use strict";
var vu = Ze();
nr.center = n0;
nr.left = i0;
nr.right = s0;
function sr(t) {
var e = "", r = " ", u = t;
do
u % 2 && (e += r), u = Math.floor(u / 2), r += r;
while (u);
return e;
}
s(sr, "createPadding");
function i0(t, e) {
var r = t.trimRight();
if (r.length === 0 && t.length >= e) return t;
var u = "", n = vu(r);
return n < e && (u = sr(e - n)), r + u;
}
s(i0, "alignLeft");
function s0(t, e) {
var r = t.trimLeft();
if (r.length === 0 && t.length >= e) return t;
var u = "", n = vu(r);
return n < e && (u = sr(e - n)), u + r;
}
s(s0, "alignRight");
function n0(t, e) {
var r = t.trim();
if (r.length === 0 && t.length >= e) return t;
var u = "", n = "", o = vu(r);
if (o < e) {
var i = parseInt((e - o) / 2, 10);
u = sr(i), n = sr(e - (o + i));
}
return u + r + n;
}
s(n0, "alignCenter");
});
// ../node_modules/aproba/index.js
var Dr = c((SE, Zn) => {
"use strict";
Zn.exports = zn;
function o0(t) {
return t != null && typeof t == "object" && t.hasOwnProperty("callee");
}
s(o0, "isArguments");
var ie = {
"*": { label: "any", check: /* @__PURE__ */ s(() => !0, "check") },
A: { label: "array", check: /* @__PURE__ */ s((t) => Array.isArray(t) || o0(t), "check") },
S: { label: "string", check: /* @__PURE__ */ s((t) => typeof t == "string", "check") },
N: { label: "number", check: /* @__PURE__ */ s((t) => typeof t == "number", "check") },
F: { label: "function", check: /* @__PURE__ */ s((t) => typeof t == "function", "check") },
O: { label: "object", check: /* @__PURE__ */ s((t) => typeof t == "object" && t != null && !ie.A.check(t) && !ie.E.check(t), "check") },
B: { label: "boolean", check: /* @__PURE__ */ s((t) => typeof t == "boolean", "check") },
E: { label: "error", check: /* @__PURE__ */ s((t) => t instanceof Error, "check") },
Z: { label: "null", check: /* @__PURE__ */ s((t) => t == null, "check") }
};
function or(t, e) {
let r = e[t.length] = e[t.length] || [];
r.indexOf(t) === -1 && r.push(t);
}
s(or, "addSchema");
function zn(t, e) {
if (arguments.length !== 2) throw Hn(["SA"], arguments.length);
if (!t) throw Yn(0, "rawSchemas");
if (!e) throw Yn(1, "args");
if (!ie.S.check(t)) throw yu(0, ["string"], t);
if (!ie.A.check(e)) throw yu(1, ["array"], e);
let r = t.split("|"), u = {};
r.forEach((o) => {
for (let i = 0; i < o.length; ++i) {
let D = o[i];
if (!ie[D]) throw D0(i, D);
}
if (/E.*E/.test(o)) throw a0(o);
or(o, u), /E/.test(o) && (or(o.replace(/E.*$/, "E"), u), or(o.replace(/E/, "Z"), u), o.length === 1 && or("", u));
});
let n = u[e.length];
if (!n)
throw Hn(Object.keys(u), e.length);
for (let o = 0; o < e.length; ++o) {
let i = n.filter((D) => {
let a = D[o], l = ie[a].check;
return l(e[o]);
});
if (!i.length) {
let D = n.map((a) => ie[a[o]].label).filter((a) => a != null);
throw yu(o, D, e[o]);
}
n = i;
}
}
s(zn, "validate");
function Yn(t) {
return yt("EMISSINGARG", "Missing required argument #" + (t + 1));
}
s(Yn, "missingRequiredArg");
function D0(t, e) {
return yt("EUNKNOWNTYPE", "Unknown type " + e + " in argument #" + (t + 1));
}
s(D0, "unknownType");
function yu(t, e, r) {
let u;
return Object.keys(ie).forEach((n) => {
ie[n].check(r) && (u = ie[n].label);
}), yt("EINVALIDTYPE", "Argument #" + (t + 1) + ": Expected " + Kn(e) + " but got " + u);
}
s(yu, "invalidType");
function Kn(t) {
return t.join(", ").replace(/, ([^,]+)$/, " or $1");
}
s(Kn, "englishList");
function Hn(t, e) {
let r = Kn(t), u = t.every((n) => n.length === 1) ? "argument" : "arguments";
return yt("EWRONGARGCOUNT", "Expected " + r + " " + u + " but got " + e);
}
s(Hn, "wrongNumberOfArgs");
function a0(t) {
return yt(
"ETOOMANYERRORTYPES",
'Only one error type per argument signature is allowed, more than one found in "' + t + '"'
);
}
s(a0, "moreThanOneError");
function yt(t, e) {
let r = new Error(e);
return r.code = t, Error.captureStackTrace && Error.captureStackTrace(r, zn), r;
}
s(yt, "newException");
});
// ../node_modules/gauge/node_modules/ansi-regex/index.js
var Xn = c(($E, Jn) => {
"use strict";
Jn.exports = ({ onlyFirst: t = !1 } = {}) => {
let e = [
"[\\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(e, t ? void 0 : "g");
};
});
// ../node_modules/gauge/node_modules/strip-ansi/index.js
var eo = c((OE, Qn) => {
"use strict";
var l0 = Xn();
Qn.exports = (t) => typeof t == "string" ? t.replace(l0(), "") : t;
});
// ../node_modules/gauge/lib/wide-truncate.js
var wu = c((_E, to) => {
"use strict";
var Bu = Ze(), h0 = eo();
to.exports = c0;
function c0(t, e) {
if (Bu(t) === 0)
return t;
if (e <= 0)
return "";
if (Bu(t) <= e)
return t;
for (var r = h0(t), u = t.length + r.length, n = t.slice(0, e + u); Bu(n) > e; )
n = n.slice(0, -1);
return n;
}
s(c0, "wideTruncate");
});
// ../node_modules/gauge/lib/error.js
var ro = c((ar) => {
"use strict";
var d0 = k("util"), f0 = ar.User = /* @__PURE__ */ s(function t(e) {
var r = new Error(e);
return Error.captureStackTrace(r, t), r.code = "EGAUGE", r;
}, "User");
ar.MissingTemplateValue = /* @__PURE__ */ s(function t(e, r) {
var u = new f0(d0.format('Missing template value "%s"', e.type));
return Error.captureStackTrace(u, t), u.template = e, u.values = r, u;
}, "MissingTemplateValue");
ar.Internal = /* @__PURE__ */ s(function t(e) {
var r = new Error(e);
return Error.captureStackTrace(r, t), r.code = "EGAUGEINTERNAL", r;
}, "Internal");
});
// ../node_modules/gauge/lib/template-item.js
var io = c((PE, uo) => {
"use strict";
var p0 = Ze();
uo.exports = Je;
function Au(t) {
return typeof t != "string" ? !1 : t.slice(-1) === "%";
}
s(Au, "isPercent");
function Su(t) {
return Number(t.slice(0, -1)) / 100;
}
s(Su, "percent");
function Je(t, e) {
if (this.overallOutputLength = e, this.finished = !1, this.type = null, this.value = null, this.length = null, this.maxLength = null, this.
minLength = null, this.kerning = null, this.align = "left", this.padLeft = 0, this.padRight = 0, this.index = null, this.first = null, this.
last = null, typeof t == "string")
this.value = t;
else
for (var r in t)
this[r] = t[r];
return Au(this.length) && (this.length = Math.round(this.overallOutputLength * Su(this.length))), Au(this.minLength) && (this.minLength =
Math.round(this.overallOutputLength * Su(this.minLength))), Au(this.maxLength) && (this.maxLength = Math.round(this.overallOutputLength *
Su(this.maxLength))), this;
}
s(Je, "TemplateItem");
Je.prototype = {};
Je.prototype.getBaseLength = function() {
var t = this.length;
return t == null && typeof this.value == "string" && this.maxLength == null && this.minLength == null && (t = p0(this.value)), t;
};
Je.prototype.getLength = function() {
var t = this.getBaseLength();
return t == null ? null : t + this.padLeft + this.padRight;
};
Je.prototype.getMaxLength = function() {
return this.maxLength == null ? null : this.maxLength + this.padLeft + this.padRight;
};
Je.prototype.getMinLength = function() {
return this.minLength == null ? null : this.minLength + this.padLeft + this.padRight;
};
});
// ../node_modules/gauge/lib/render-template.js
var Tu = c((RE, Do) => {
"use strict";
var Bt = Un(), m0 = Dr(), so = wu(), Xe = ro(), g0 = io();
function F0(t) {
return function(e) {
return y0(e, t);
};
}
s(F0, "renderValueWithValues");
var C0 = Do.exports = function(t, e, r) {
var u = x0(t, e, r), n = u.map(F0(r)).join("");
return Bt.left(so(n, t), t);
};
function no(t) {
var e = t.type[0].toUpperCase() + t.type.slice(1);
return "pre" + e;
}
s(no, "preType");
function oo(t) {
var e = t.type[0].toUpperCase() + t.type.slice(1);
return "post" + e;
}
s(oo, "postType");
function E0(t, e) {
if (t.type)
return e[no(t)] || e[oo(t)];
}
s(E0, "hasPreOrPost");
function b0(t, e) {
var r = Object.assign({}, t), u = Object.create(e), n = [], o = no(r), i = oo(r);
return u[o] && (n.push({ value: u[o] }), u[o] = null), r.minLength = null, r.length = null, r.maxLength = null, n.push(r), u[r.type] = u[r.
type], u[i] && (n.push({ value: u[i] }), u[i] = null), function(D, a, l) {
return C0(l, n, u);
};
}
s(b0, "generatePreAndPost");
function x0(t, e, r) {
function u(d, m, g) {
var F = new g0(d, t), E = F.type;
if (F.value == null)
if (E in r)
F.value = r[E];
else {
if (F.default == null)
throw new Xe.MissingTemplateValue(F, r);
F.value = F.default;
}
return F.value == null || F.value === "" ? null : (F.index = m, F.first = m === 0, F.last = m === g.length - 1, E0(F, r) && (F.value =
b0(F, r)), F);
}
s(u, "cloneAndObjectify");
var n = e.map(u).filter(function(d) {
return d != null;
}), o = t, i = n.length;
function D(d) {
d > o && (d = o), o -= d;
}
s(D, "consumeSpace");
function a(d, m) {
if (d.finished)
throw new Xe.Internal("Tried to finish template item that was already finished");
if (m === 1 / 0)
throw new Xe.Internal("Length of template item cannot be infinity");
if (m != null && (d.length = m), d.minLength = null, d.maxLength = null, --i, d.finished = !0, d.length == null && (d.length = d.getBaseLength()),
d.length == null)
throw new Xe.Internal("Finished template items must have a length");
D(d.getLength());
}
s(a, "finishSizing"), n.forEach(function(d) {
if (d.kerning) {
var m = d.first ? 0 : n[d.index - 1].padRight;
!d.first && m < d.kerning && (d.padLeft = d.kerning - m), d.last || (d.padRight = d.kerning);
}
}), n.forEach(function(d) {
d.getBaseLength() != null && a(d);
});
var l = 0, h, p;
do
h = !1, p = Math.round(o / i), n.forEach(function(d) {
d.finished || d.maxLength && d.getMaxLength() < p && (a(d, d.maxLength), h = !0);
});
while (h && l++ < n.length);
if (h)
throw new Xe.Internal("Resize loop iterated too many times while determining maxLength");
l = 0;
do
h = !1, p = Math.round(o / i), n.forEach(function(d) {
d.finished || d.minLength && d.getMinLength() >= p && (a(d, d.minLength), h = !0);
});
while (h && l++ < n.length);
if (h)
throw new Xe.Internal("Resize loop iterated too many times while determining minLength");
return p = Math.round(o / i), n.forEach(function(d) {
d.finished || a(d, p);
}), n;
}
s(x0, "prepareItems");
function v0(t, e, r) {
return m0("OON", arguments), t.type ? t.value(e, e[t.type + "Theme"] || {}, r) : t.value(e, {}, r);
}
s(v0, "renderFunction");
function y0(t, e) {
var r = t.getBaseLength(), u = typeof t.value == "function" ? v0(t, e, r) : t.value;
if (u == null || u === "")
return "";
var n = Bt[t.align] || Bt.left, o = t.padLeft ? Bt.left("", t.padLeft) : "", i = t.padRight ? Bt.right("", t.padRight) : "", D = so(String(
u), r), a = n(D, r);
return o + a + i;
}
s(y0, "renderValue");
});
// ../node_modules/gauge/lib/plumbing.js
var lo = c((NE, ao) => {
"use strict";
var Pe = ir(), B0 = Tu(), lr = Dr(), be = ao.exports = function(t, e, r) {
r || (r = 80), lr("OAN", [t, e, r]), this.showing = !1, this.theme = t, this.width = r, this.template = e;
};
be.prototype = {};
be.prototype.setTheme = function(t) {
lr("O", [t]), this.theme = t;
};
be.prototype.setTemplate = function(t) {
lr("A", [t]), this.template = t;
};
be.prototype.setWidth = function(t) {
lr("N", [t]), this.width = t;
};
be.prototype.hide = function() {
return Pe.gotoSOL() + Pe.eraseLine();
};
be.prototype.hideCursor = Pe.hideCursor;
be.prototype.showCursor = Pe.showCursor;
be.prototype.show = function(t) {
var e = Object.create(this.theme);
for (var r in t)
e[r] = t[r];
return B0(this.width, this.template, e).trim() + Pe.color("reset") + Pe.eraseLine() + Pe.gotoSOL();
};
});
// ../node_modules/has-unicode/index.js
var co = c((GE, ho) => {
"use strict";
var w0 = k("os"), jE = ho.exports = function() {
if (w0.type() == "Windows_NT")
return !1;
var t = /UTF-?8$/i, e = process.env.LC_ALL || process.env.LC_CTYPE || process.env.LANG;
return t.test(e);
};
});
// ../node_modules/color-support/index.js
var mo = c((WE, po) => {
po.exports = fo({ alwaysReturn: !0 }, fo);
function Qe(t, e) {
return t.level = 0, t.hasBasic = !1, t.has256 = !1, t.has16m = !1, e.alwaysReturn ? t : !1;
}
s(Qe, "hasNone");
function hr(t) {
return t.hasBasic = !0, t.has256 = !1, t.has16m = !1, t.level = 1, t;
}
s(hr, "hasBasic");
function et(t) {
return t.hasBasic = !0, t.has256 = !0, t.has16m = !1, t.level = 2, t;
}
s(et, "has256");
function cr(t) {
return t.hasBasic = !0, t.has256 = !0, t.has16m = !0, t.level = 3, t;
}
s(cr, "has16m");
function fo(t, e) {
if (t = t || {}, e = e || {}, typeof t.level == "number")
switch (t.level) {
case 0:
return Qe(e, t);
case 1:
return hr(e);
case 2:
return et(e);
case 3:
return cr(e);
}
if (e.level = 0, e.hasBasic = !1, e.has256 = !1, e.has16m = !1, typeof process > "u" || !process || !process.stdout || !process.env || !process.
platform)
return Qe(e, t);
var r = t.env || process.env, u = t.stream || process.stdout, n = t.term || r.TERM || "", o = t.platform || process.platform;
if (!t.ignoreTTY && !u.isTTY || !t.ignoreDumb && n === "dumb" && !r.COLORTERM)
return Qe(e, t);
if (o === "win32")
return hr(e);
if (r.TMUX)
return et(e);
if (!t.ignoreCI && (r.CI || r.TEAMCITY_VERSION))
return r.TRAVIS ? et(e) : Qe(e, t);
switch (r.TERM_PROGRAM) {
case "iTerm.app":
var i = r.TERM_PROGRAM_VERSION || "0.";
return /^[0-2]\./.test(i) ? et(e) : cr(e);
case "HyperTerm":
case "Hyper":
return cr(e);
case "MacTerm":
return cr(e);
case "Apple_Terminal":
return et(e);
}
return /^xterm-256/.test(n) ? et(e) : /^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(n) || r.COLORTERM ? hr(e) : Qe(e, t);
}
s(fo, "colorSupport");
});
// ../node_modules/gauge/lib/has-color.js
var Fo = c((UE, go) => {
"use strict";
var A0 = mo();
go.exports = A0().hasBasic;
});
// ../node_modules/gauge/node_modules/signal-exit/dist/mjs/signals.js
var xe, Co = wn(() => {
xe = [];
xe.push("SIGHUP", "SIGINT", "SIGTERM");
process.platform !== "win32" && xe.push(
"SIGALRM",
"SIGABRT",
"SIGVTALRM",
"SIGXCPU",
"SIGXFSZ",
"SIGUSR2",
"SIGTRAP",
"SIGSYS",
"SIGQUIT",
"SIGIOT"
// should detect profiler and enable/disable accordingly.
// see #21
// 'SIGPROF'
);
process.platform === "linux" && xe.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
});
// ../node_modules/gauge/node_modules/signal-exit/dist/mjs/index.js
var Eo = {};
tr(Eo, {
load: () => O0,
onExit: () => $0,
signals: () => xe,
unload: () => _0
});
var dr, $u, Ou, S0, _u, fr, T0, Iu, Lu, ku, $0, O0, _0, bo = wn(() => {
Co();
dr = /* @__PURE__ */ s((t) => !!t && typeof t == "object" && typeof t.removeListener == "function" && typeof t.emit == "function" && typeof t.
reallyExit == "function" && typeof t.listeners == "function" && typeof t.kill == "function" && typeof t.pid == "number" && typeof t.on == "\
function", "processOk"), $u = Symbol.for("signal-exit emitter"), Ou = globalThis, S0 = Object.defineProperty.bind(Object), _u = class {
static {
s(this, "Emitter");
}
emitted = {
afterExit: !1,
exit: !1
};
listeners = {
afterExit: [],
exit: []
};
count = 0;
id = Math.random();
constructor() {
if (Ou[$u])
return Ou[$u];
S0(Ou, $u, {
value: this,
writable: !1,
enumerable: !1,
configurable: !1
});
}
on(e, r) {
this.listeners[e].push(r);
}
removeListener(e, r) {
let u = this.listeners[e], n = u.indexOf(r);
n !== -1 && (n === 0 && u.length === 1 ? u.length = 0 : u.splice(n, 1));
}
emit(e, r, u) {
if (this.emitted[e])
return !1;
this.emitted[e] = !0;
let n = !1;
for (let o of this.listeners[e])
n = o(r, u) === !0 || n;
return e === "exit" && (n = this.emit("afterExit", r, u) || n), n;
}
}, fr = class {
static {
s(this, "SignalExitBase");
}
}, T0 = /* @__PURE__ */ s((t) => ({
onExit(e, r) {
return t.onExit(e, r);
},
load() {
return t.load();
},
unload() {
return t.unload();
}
}), "signalExitWrap"), Iu = class extends fr {
static {
s(this, "SignalExitFallback");
}
onExit() {
return () => {
};
}
load() {
}
unload() {
}
}, Lu = class extends fr {
static {
s(this, "SignalExit");
}
// "SIGHUP" throws an `ENOSYS` error on Windows,
// so use a supported signal instead
/* c8 ignore start */
#u = ku.platform === "win32" ? "SIGINT" : "SIGHUP";
/* c8 ignore stop */
#t = new _u();
#e;
#s;
#n;
#i = {};
#r = !1;
constructor(e) {
super(), this.#e = e, this.#i = {};
for (let r of xe)
this.#i[r] = () => {
let u = this.#e.listeners(r), { count: n } = this.#t, o = e;
if (typeof o.__signal_exit_emitter__ == "object" && typeof o.__signal_exit_emitter__.count == "number" && (n += o.__signal_exit_emitter__.
count), u.length === n) {
this.unload();
let i = this.#t.emit("exit", null, r), D = r === "SIGHUP" ? this.#u : r;
i || e.kill(e.pid, D);
}
};
this.#n = e.reallyExit, this.#s = e.emit;
}
onExit(e, r) {
if (!dr(this.#e))
return () => {
};
this.#r === !1 && this.load();
let u = r?.alwaysLast ? "afterExit" : "exit";
return this.#t.on(u, e), () => {
this.#t.removeListener(u, e), this.#t.listeners.exit.length === 0 && this.#t.listeners.afterExit.length === 0 && this.unload();
};
}
load() {
if (!this.#r) {
this.#r = !0, this.#t.count += 1;
for (let e of xe)
try {
let r = this.#i[e];
r && this.#e.on(e, r);
} catch {
}
this.#e.emit = (e, ...r) => this.#D(e, ...r), this.#e.reallyExit = (e) => this.#o(e);
}
}
unload() {
this.#r && (this.#r = !1, xe.forEach((e) => {
let r = this.#i[e];
if (!r)
throw new Error("Listener not defined for signal: " + e);
try {
this.#e.removeListener(e, r);
} catch {
}
}), this.#e.emit = this.#s, this.#e.reallyExit = this.#n, this.#t.count -= 1);
}
#o(e) {
return dr(this.#e) ? (this.#e.exitCode = e || 0, this.#t.emit("exit", this.#e.exitCode, null), this.#n.call(this.#e, this.#e.exitCode)) :
0;
}
#D(e, ...r) {
let u = this.#s;
if (e === "exit" && dr(this.#e)) {
typeof r[0] == "number" && (this.#e.exitCode = r[0]);
let n = u.call(this.#e, e, ...r);
return this.#t.emit("exit", this.#e.exitCode, null), n;
} else
return u.call(this.#e, e, ...r);
}
}, ku = globalThis.process, {
onExit: (
/**
* Called when the process is exiting, whether via signal, explicit
* exit, or running out of stuff to do.
*
* If the global process object is not suitable for instrumentation,
* then this will be a no-op.
*
* Returns a function that may be used to unload signal-exit.
*/
$0
),
load: (
/**
* Load the listeners. Likely you never need to call this, unless
* doing a rather deep integration with signal-exit functionality.
* Mostly exposed for the benefit of testing.
*
* @internal
*/
O0
),
unload: (
/**
* Unload the listeners. Likely you never need to call this, unless
* doing a rather deep integration with signal-exit functionality.
* Mostly exposed for the benefit of testing.
*
* @internal
*/
_0
)
} = T0(dr(ku) ? new Lu(ku) : new Iu());
});
// ../node_modules/gauge/lib/spin.js
var vo = c((KE, xo) => {
"use strict";
xo.exports = /* @__PURE__ */ s(function(e, r) {
return e[r % e.length];
}, "spin");
});
// ../node_modules/gauge/lib/progress-bar.js
var wo = c((JE, Bo) => {
"use strict";
var I0 = Dr(), L0 = Tu(), k0 = wu(), P0 = Ze();
Bo.exports = function(t, e, r) {
if (I0("ONN", [t, e, r]), r < 0 && (r = 0), r > 1 && (r = 1), e <= 0)
return "";
var u = Math.round(e * r), n = e - u, o = [
{ type: "complete", value: yo(t.complete, u), length: u },
{ type: "remaining", value: yo(t.remaining, n), length: n }
];
return L0(e, o, t);
};
function yo(t, e) {
var r = "", u = e;
do
u % 2 && (r += t), u = Math.floor(u / 2), t += t;
while (u && P0(r) < e);
return k0(r, e);
}
s(yo, "repeat");
});
// ../node_modules/gauge/lib/base-theme.js
var So = c((QE, Ao) => {
"use strict";
var M0 = vo(), R0 = wo();
Ao.exports = {
activityIndicator: /* @__PURE__ */ s(function(t, e) {
if (t.spun != null)
return M0(e, t.spun);
}, "activityIndicator"),
progressbar: /* @__PURE__ */ s(function(t, e, r) {
if (t.completed != null)
return R0(e, r, t.completed);
}, "progressbar")
};
});
// ../node_modules/gauge/lib/theme-set.js
var $o = c((t8, To) => {
"use strict";
To.exports = function() {
return z.newThemeSet();
};
var z = {};
z.baseTheme = So();
z.newTheme = function(t, e) {
return e || (e = t, t = this.baseTheme), Object.assign({}, t, e);
};
z.getThemeNames = function() {
return Object.keys(this.themes);
};
z.addTheme = function(t, e, r) {
this.themes[t] = this.newTheme(e, r);
};
z.addToAllThemes = function(t) {
var e = this.themes;
Object.keys(e).forEach(function(r) {
Object.assign(e[r], t);
}), Object.assign(this.baseTheme, t);
};
z.getTheme = function(t) {
if (!this.themes[t])
throw this.newMissingThemeError(t);
return this.themes[t];
};
z.setDefault = function(t, e) {
e == null && (e = t, t = {});
var r = t.platform == null ? "fallback" : t.platform, u = !!t.hasUnicode, n = !!t.hasColor;
this.defaults[r] || (this.defaults[r] = { true: {}, false: {} }), this.defaults[r][u][n] = e;
};
z.getDefault = function(t) {
t || (t = {});
var e = t.platform || process.platform, r = this.defaults[e] || this.defaults.fallback, u = !!t.hasUnicode, n = !!t.hasColor;
if (!r)
throw this.newMissingDefaultThemeError(e, u, n);
if (!r[u][n]) {
if (u && n && r[!u][n])
u = !1;
else if (u && n && r[u][!n])
n = !1;
else if (u && n && r[!u][!n])
u = !1, n = !1;
else if (u && !n && r[!u][n])
u = !1;
else if (!u && n && r[u][!n])
n = !1;
else if (r === this.defaults.fallback)
throw this.newMissingDefaultThemeError(e, u, n);
}
return r[u][n] ? this.getTheme(r[u][n]) : this.getDefault(Object.assign({}, t, { platform: "fallback" }));
};
z.newMissingThemeError = /* @__PURE__ */ s(function t(e) {
var r = new Error('Could not find a gauge theme named "' + e + '"');
return Error.captureStackTrace.call(r, t), r.theme = e, r.code = "EMISSINGTHEME", r;
}, "newMissingThemeError");
z.newMissingDefaultThemeError = /* @__PURE__ */ s(function t(e, r, u) {
var n = new Error(
`Could not find a gauge theme for your platform/unicode/color use combo:
platform = ` + e + `
hasUnicode = ` + r + `
hasColor = ` + u
);
return Error.captureStackTrace.call(n, t), n.platform = e, n.hasUnicode = r, n.hasColor = u, n.code = "EMISSINGTHEME", n;
}, "newMissingDefaultThemeError");
z.newThemeSet = function() {
var t = /* @__PURE__ */ s(function(e) {
return t.getDefault(e);
}, "themeset");
return Object.assign(t, z, {
themes: Object.assign({}, this.themes),
baseTheme: Object.assign({}, this.baseTheme),
defaults: JSON.parse(JSON.stringify(this.defaults || {}))
});
};
});
// ../node_modules/gauge/lib/themes.js
var _o = c((u8, Oo) => {
"use strict";
var ve = ir().color, q0 = $o(), Z = Oo.exports = new q0();
Z.addTheme("ASCII", {
preProgressbar: "[",
postProgressbar: "]",
progressbarTheme: {
complete: "#",
remaining: "."
},
activityIndicatorTheme: "-\\|/",
preSubsection: ">"
});
Z.addTheme("colorASCII", Z.getTheme("ASCII"), {
progressbarTheme: {
preComplete: ve("bgBrightWhite", "brightWhite"),
complete: "#",
postComplete: ve("reset"),
preRemaining: ve("bgBrightBlack", "brightBlack"),
remaining: ".",
postRemaining: ve("reset")
}
});
Z.addTheme("brailleSpinner", {
preProgressbar: "(",
postProgressbar: ")",
progressbarTheme: {
complete: "#",
remaining: "\u2802"
},
activityIndicatorTheme: "\u280B\u2819\u2839\u2838\u283C\u2834\u2826\u2827\u2807\u280F",
preSubsection: ">"
});
Z.addTheme("colorBrailleSpinner", Z.getTheme("brailleSpinner"), {
progressbarTheme: {
preComplete: ve("bgBrightWhite", "brightWhite"),
complete: "#",
postComplete: ve("reset"),
preRemaining: ve("bgBrightBlack", "brightBlack"),
remaining: "\u2802",
postRemaining: ve("reset")
}
});
Z.setDefault({}, "ASCII");
Z.setDefault({ hasColor: !0 }, "colorASCII");
Z.setDefault({ platform: "darwin", hasUnicode: !0 }, "brailleSpinner");
Z.setDefault({ platform: "darwin", hasUnicode: !0, hasColor: !0 }, "colorBrailleSpinner");
Z.setDefault({ platform: "linux", hasUnicode: !0 }, "brailleSpinner");
Z.setDefault({ platform: "linux", hasUnicode: !0, hasColor: !0 }, "colorBrailleSpinner");
});
// ../node_modules/gauge/lib/set-interval.js
var Lo = c((i8, Io) => {
"use strict";
Io.exports = setInterval;
});
// ../node_modules/gauge/lib/process.js
var Pu = c((s8, ko) => {
"use strict";
ko.exports = process;
});
// ../node_modules/gauge/lib/set-immediate.js
var Po = c((n8, Mu) => {
"use strict";
var N0 = Pu();
try {
Mu.exports = setImmediate;
} catch {
Mu.exports = N0.nextTick;
}
});
// ../node_modules/gauge/lib/index.js
var Ro = c((o8, Mo) => {
"use strict";
var j0 = lo(), G0 = co(), W0 = Fo(), V0 = (bo(), Vf(Eo)).onExit, U0 = _o(), Y0 = Lo(), Me = Pu(), H0 = Po();
Mo.exports = M;
function pr(t, e) {
return function() {
return e.call(t);
};
}
s(pr, "callWith");
function M(t, e) {
var r, u;
t && t.write ? (u = t, r = e || {}) : e && e.write ? (u = e, r = t || {}) : (u = Me.stderr, r = t || e || {}), this._status = {
spun: 0,
section: "",
subsection: ""
}, this._paused = !1, this._disabled = !0, this._showing = !1, this._onScreen = !1, this._needsRedraw = !1, this._hideCursor = r.hideCursor ==
null ? !0 : r.hideCursor, this._fixedFramerate = r.fixedFramerate == null ? !/^v0\.8\./.test(Me.version) : r.fixedFramerate, this._lastUpdateAt =
null, this._updateInterval = r.updateInterval == null ? 50 : r.updateInterval, this._themes = r.themes || U0, this._t