@chrisluyi/daas-cli 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,3405 @@
1
+ #!/usr/bin/env bun
2
+ // @bun
3
+ var __create = Object.create;
4
+ var __getProtoOf = Object.getPrototypeOf;
5
+ var __defProp = Object.defineProperty;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __toESM = (mod, isNodeMode, target) => {
9
+ target = mod != null ? __create(__getProtoOf(mod)) : {};
10
+ const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
11
+ for (let key of __getOwnPropNames(mod))
12
+ if (!__hasOwnProp.call(to, key))
13
+ __defProp(to, key, {
14
+ get: () => mod[key],
15
+ enumerable: true
16
+ });
17
+ return to;
18
+ };
19
+ var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
20
+ var __export = (target, all) => {
21
+ for (var name in all)
22
+ __defProp(target, name, {
23
+ get: all[name],
24
+ enumerable: true,
25
+ configurable: true,
26
+ set: (newValue) => all[name] = () => newValue
27
+ });
28
+ };
29
+ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
30
+
31
+ // ../../node_modules/.bun/consola@3.4.2/node_modules/consola/dist/chunks/prompt.mjs
32
+ var exports_prompt = {};
33
+ __export(exports_prompt, {
34
+ prompt: () => prompt,
35
+ kCancel: () => kCancel
36
+ });
37
+ import g, { stdin, stdout } from "process";
38
+ import f from "readline";
39
+ import { WriteStream } from "tty";
40
+ function getDefaultExportFromCjs(x) {
41
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
42
+ }
43
+ function requireSrc() {
44
+ if (hasRequiredSrc)
45
+ return src;
46
+ hasRequiredSrc = 1;
47
+ const ESC = "\x1B";
48
+ const CSI = `${ESC}[`;
49
+ const beep = "\x07";
50
+ const cursor = {
51
+ to(x, y) {
52
+ if (!y)
53
+ return `${CSI}${x + 1}G`;
54
+ return `${CSI}${y + 1};${x + 1}H`;
55
+ },
56
+ move(x, y) {
57
+ let ret = "";
58
+ if (x < 0)
59
+ ret += `${CSI}${-x}D`;
60
+ else if (x > 0)
61
+ ret += `${CSI}${x}C`;
62
+ if (y < 0)
63
+ ret += `${CSI}${-y}A`;
64
+ else if (y > 0)
65
+ ret += `${CSI}${y}B`;
66
+ return ret;
67
+ },
68
+ up: (count = 1) => `${CSI}${count}A`,
69
+ down: (count = 1) => `${CSI}${count}B`,
70
+ forward: (count = 1) => `${CSI}${count}C`,
71
+ backward: (count = 1) => `${CSI}${count}D`,
72
+ nextLine: (count = 1) => `${CSI}E`.repeat(count),
73
+ prevLine: (count = 1) => `${CSI}F`.repeat(count),
74
+ left: `${CSI}G`,
75
+ hide: `${CSI}?25l`,
76
+ show: `${CSI}?25h`,
77
+ save: `${ESC}7`,
78
+ restore: `${ESC}8`
79
+ };
80
+ const scroll = {
81
+ up: (count = 1) => `${CSI}S`.repeat(count),
82
+ down: (count = 1) => `${CSI}T`.repeat(count)
83
+ };
84
+ const erase = {
85
+ screen: `${CSI}2J`,
86
+ up: (count = 1) => `${CSI}1J`.repeat(count),
87
+ down: (count = 1) => `${CSI}J`.repeat(count),
88
+ line: `${CSI}2K`,
89
+ lineEnd: `${CSI}K`,
90
+ lineStart: `${CSI}1K`,
91
+ lines(count) {
92
+ let clear = "";
93
+ for (let i = 0;i < count; i++)
94
+ clear += this.line + (i < count - 1 ? cursor.up() : "");
95
+ if (count)
96
+ clear += cursor.left;
97
+ return clear;
98
+ }
99
+ };
100
+ src = { cursor, scroll, erase, beep };
101
+ return src;
102
+ }
103
+ function requirePicocolors() {
104
+ if (hasRequiredPicocolors)
105
+ return picocolors.exports;
106
+ hasRequiredPicocolors = 1;
107
+ let p = process || {}, argv2 = p.argv || [], env2 = p.env || {};
108
+ let isColorSupported2 = !(!!env2.NO_COLOR || argv2.includes("--no-color")) && (!!env2.FORCE_COLOR || argv2.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env2.TERM !== "dumb" || !!env2.CI);
109
+ let formatter = (open, close, replace = open) => (input) => {
110
+ let string = "" + input, index = string.indexOf(close, open.length);
111
+ return ~index ? open + replaceClose2(string, close, replace, index) + close : open + string + close;
112
+ };
113
+ let replaceClose2 = (string, close, replace, index) => {
114
+ let result = "", cursor = 0;
115
+ do {
116
+ result += string.substring(cursor, index) + replace;
117
+ cursor = index + close.length;
118
+ index = string.indexOf(close, cursor);
119
+ } while (~index);
120
+ return result + string.substring(cursor);
121
+ };
122
+ let createColors2 = (enabled = isColorSupported2) => {
123
+ let f2 = enabled ? formatter : () => String;
124
+ return {
125
+ isColorSupported: enabled,
126
+ reset: f2("\x1B[0m", "\x1B[0m"),
127
+ bold: f2("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
128
+ dim: f2("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
129
+ italic: f2("\x1B[3m", "\x1B[23m"),
130
+ underline: f2("\x1B[4m", "\x1B[24m"),
131
+ inverse: f2("\x1B[7m", "\x1B[27m"),
132
+ hidden: f2("\x1B[8m", "\x1B[28m"),
133
+ strikethrough: f2("\x1B[9m", "\x1B[29m"),
134
+ black: f2("\x1B[30m", "\x1B[39m"),
135
+ red: f2("\x1B[31m", "\x1B[39m"),
136
+ green: f2("\x1B[32m", "\x1B[39m"),
137
+ yellow: f2("\x1B[33m", "\x1B[39m"),
138
+ blue: f2("\x1B[34m", "\x1B[39m"),
139
+ magenta: f2("\x1B[35m", "\x1B[39m"),
140
+ cyan: f2("\x1B[36m", "\x1B[39m"),
141
+ white: f2("\x1B[37m", "\x1B[39m"),
142
+ gray: f2("\x1B[90m", "\x1B[39m"),
143
+ bgBlack: f2("\x1B[40m", "\x1B[49m"),
144
+ bgRed: f2("\x1B[41m", "\x1B[49m"),
145
+ bgGreen: f2("\x1B[42m", "\x1B[49m"),
146
+ bgYellow: f2("\x1B[43m", "\x1B[49m"),
147
+ bgBlue: f2("\x1B[44m", "\x1B[49m"),
148
+ bgMagenta: f2("\x1B[45m", "\x1B[49m"),
149
+ bgCyan: f2("\x1B[46m", "\x1B[49m"),
150
+ bgWhite: f2("\x1B[47m", "\x1B[49m"),
151
+ blackBright: f2("\x1B[90m", "\x1B[39m"),
152
+ redBright: f2("\x1B[91m", "\x1B[39m"),
153
+ greenBright: f2("\x1B[92m", "\x1B[39m"),
154
+ yellowBright: f2("\x1B[93m", "\x1B[39m"),
155
+ blueBright: f2("\x1B[94m", "\x1B[39m"),
156
+ magentaBright: f2("\x1B[95m", "\x1B[39m"),
157
+ cyanBright: f2("\x1B[96m", "\x1B[39m"),
158
+ whiteBright: f2("\x1B[97m", "\x1B[39m"),
159
+ bgBlackBright: f2("\x1B[100m", "\x1B[49m"),
160
+ bgRedBright: f2("\x1B[101m", "\x1B[49m"),
161
+ bgGreenBright: f2("\x1B[102m", "\x1B[49m"),
162
+ bgYellowBright: f2("\x1B[103m", "\x1B[49m"),
163
+ bgBlueBright: f2("\x1B[104m", "\x1B[49m"),
164
+ bgMagentaBright: f2("\x1B[105m", "\x1B[49m"),
165
+ bgCyanBright: f2("\x1B[106m", "\x1B[49m"),
166
+ bgWhiteBright: f2("\x1B[107m", "\x1B[49m")
167
+ };
168
+ };
169
+ picocolors.exports = createColors2();
170
+ picocolors.exports.createColors = createColors2;
171
+ return picocolors.exports;
172
+ }
173
+ function J({ onlyFirst: t = false } = {}) {
174
+ const F = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
175
+ return new RegExp(F, t ? undefined : "g");
176
+ }
177
+ function T$1(t) {
178
+ if (typeof t != "string")
179
+ throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);
180
+ return t.replace(Q, "");
181
+ }
182
+ function O(t) {
183
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
184
+ }
185
+ function A$1(t, u = {}) {
186
+ if (typeof t != "string" || t.length === 0 || (u = { ambiguousIsNarrow: true, ...u }, t = T$1(t), t.length === 0))
187
+ return 0;
188
+ t = t.replace(FD(), " ");
189
+ const F = u.ambiguousIsNarrow ? 1 : 2;
190
+ let e2 = 0;
191
+ for (const s of t) {
192
+ const i = s.codePointAt(0);
193
+ if (i <= 31 || i >= 127 && i <= 159 || i >= 768 && i <= 879)
194
+ continue;
195
+ switch (DD.eastAsianWidth(s)) {
196
+ case "F":
197
+ case "W":
198
+ e2 += 2;
199
+ break;
200
+ case "A":
201
+ e2 += F;
202
+ break;
203
+ default:
204
+ e2 += 1;
205
+ }
206
+ }
207
+ return e2;
208
+ }
209
+ function sD() {
210
+ const t = new Map;
211
+ for (const [u, F] of Object.entries(r)) {
212
+ for (const [e2, s] of Object.entries(F))
213
+ r[e2] = { open: `\x1B[${s[0]}m`, close: `\x1B[${s[1]}m` }, F[e2] = r[e2], t.set(s[0], s[1]);
214
+ Object.defineProperty(r, u, { value: F, enumerable: false });
215
+ }
216
+ return Object.defineProperty(r, "codes", { value: t, enumerable: false }), r.color.close = "\x1B[39m", r.bgColor.close = "\x1B[49m", r.color.ansi = L$1(), r.color.ansi256 = N(), r.color.ansi16m = I(), r.bgColor.ansi = L$1(m), r.bgColor.ansi256 = N(m), r.bgColor.ansi16m = I(m), Object.defineProperties(r, { rgbToAnsi256: { value: (u, F, e2) => u === F && F === e2 ? u < 8 ? 16 : u > 248 ? 231 : Math.round((u - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u / 255 * 5) + 6 * Math.round(F / 255 * 5) + Math.round(e2 / 255 * 5), enumerable: false }, hexToRgb: { value: (u) => {
217
+ const F = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));
218
+ if (!F)
219
+ return [0, 0, 0];
220
+ let [e2] = F;
221
+ e2.length === 3 && (e2 = [...e2].map((i) => i + i).join(""));
222
+ const s = Number.parseInt(e2, 16);
223
+ return [s >> 16 & 255, s >> 8 & 255, s & 255];
224
+ }, enumerable: false }, hexToAnsi256: { value: (u) => r.rgbToAnsi256(...r.hexToRgb(u)), enumerable: false }, ansi256ToAnsi: { value: (u) => {
225
+ if (u < 8)
226
+ return 30 + u;
227
+ if (u < 16)
228
+ return 90 + (u - 8);
229
+ let F, e2, s;
230
+ if (u >= 232)
231
+ F = ((u - 232) * 10 + 8) / 255, e2 = F, s = F;
232
+ else {
233
+ u -= 16;
234
+ const C = u % 36;
235
+ F = Math.floor(u / 36) / 5, e2 = Math.floor(C / 6) / 5, s = C % 6 / 5;
236
+ }
237
+ const i = Math.max(F, e2, s) * 2;
238
+ if (i === 0)
239
+ return 30;
240
+ let D = 30 + (Math.round(s) << 2 | Math.round(e2) << 1 | Math.round(F));
241
+ return i === 2 && (D += 60), D;
242
+ }, enumerable: false }, rgbToAnsi: { value: (u, F, e2) => r.ansi256ToAnsi(r.rgbToAnsi256(u, F, e2)), enumerable: false }, hexToAnsi: { value: (u) => r.ansi256ToAnsi(r.hexToAnsi256(u)), enumerable: false } }), r;
243
+ }
244
+ function G(t, u, F) {
245
+ return String(t).normalize().replace(/\r\n/g, `
246
+ `).split(`
247
+ `).map((e2) => oD(e2, u, F)).join(`
248
+ `);
249
+ }
250
+ function k$1(t, u) {
251
+ if (typeof t == "string")
252
+ return c.aliases.get(t) === u;
253
+ for (const F of t)
254
+ if (F !== undefined && k$1(F, u))
255
+ return true;
256
+ return false;
257
+ }
258
+ function lD(t, u) {
259
+ if (t === u)
260
+ return;
261
+ const F = t.split(`
262
+ `), e2 = u.split(`
263
+ `), s = [];
264
+ for (let i = 0;i < Math.max(F.length, e2.length); i++)
265
+ F[i] !== e2[i] && s.push(i);
266
+ return s;
267
+ }
268
+ function d$1(t, u) {
269
+ const F = t;
270
+ F.isTTY && F.setRawMode(u);
271
+ }
272
+
273
+ class x {
274
+ constructor(u, F = true) {
275
+ h(this, "input"), h(this, "output"), h(this, "_abortSignal"), h(this, "rl"), h(this, "opts"), h(this, "_render"), h(this, "_track", false), h(this, "_prevFrame", ""), h(this, "_subscribers", new Map), h(this, "_cursor", 0), h(this, "state", "initial"), h(this, "error", ""), h(this, "value");
276
+ const { input: e2 = stdin, output: s = stdout, render: i, signal: D, ...C } = u;
277
+ this.opts = C, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = i.bind(this), this._track = F, this._abortSignal = D, this.input = e2, this.output = s;
278
+ }
279
+ unsubscribe() {
280
+ this._subscribers.clear();
281
+ }
282
+ setSubscriber(u, F) {
283
+ const e2 = this._subscribers.get(u) ?? [];
284
+ e2.push(F), this._subscribers.set(u, e2);
285
+ }
286
+ on(u, F) {
287
+ this.setSubscriber(u, { cb: F });
288
+ }
289
+ once(u, F) {
290
+ this.setSubscriber(u, { cb: F, once: true });
291
+ }
292
+ emit(u, ...F) {
293
+ const e2 = this._subscribers.get(u) ?? [], s = [];
294
+ for (const i of e2)
295
+ i.cb(...F), i.once && s.push(() => e2.splice(e2.indexOf(i), 1));
296
+ for (const i of s)
297
+ i();
298
+ }
299
+ prompt() {
300
+ return new Promise((u, F) => {
301
+ if (this._abortSignal) {
302
+ if (this._abortSignal.aborted)
303
+ return this.state = "cancel", this.close(), u(S);
304
+ this._abortSignal.addEventListener("abort", () => {
305
+ this.state = "cancel", this.close();
306
+ }, { once: true });
307
+ }
308
+ const e2 = new WriteStream(0);
309
+ e2._write = (s, i, D) => {
310
+ this._track && (this.value = this.rl?.line.replace(/\t/g, ""), this._cursor = this.rl?.cursor ?? 0, this.emit("value", this.value)), D();
311
+ }, this.input.pipe(e2), this.rl = f.createInterface({ input: this.input, output: e2, tabSize: 2, prompt: "", escapeCodeTimeout: 50 }), f.emitKeypressEvents(this.input, this.rl), this.rl.prompt(), this.opts.initialValue !== undefined && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), d$1(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
312
+ this.output.write(srcExports.cursor.show), this.output.off("resize", this.render), d$1(this.input, false), u(this.value);
313
+ }), this.once("cancel", () => {
314
+ this.output.write(srcExports.cursor.show), this.output.off("resize", this.render), d$1(this.input, false), u(S);
315
+ });
316
+ });
317
+ }
318
+ onKeypress(u, F) {
319
+ if (this.state === "error" && (this.state = "active"), F?.name && (!this._track && c.aliases.has(F.name) && this.emit("cursor", c.aliases.get(F.name)), c.actions.has(F.name) && this.emit("cursor", F.name)), u && (u.toLowerCase() === "y" || u.toLowerCase() === "n") && this.emit("confirm", u.toLowerCase() === "y"), u === "\t" && this.opts.placeholder && (this.value || (this.rl?.write(this.opts.placeholder), this.emit("value", this.opts.placeholder))), u && this.emit("key", u.toLowerCase()), F?.name === "return") {
320
+ if (this.opts.validate) {
321
+ const e2 = this.opts.validate(this.value);
322
+ e2 && (this.error = e2 instanceof Error ? e2.message : e2, this.state = "error", this.rl?.write(this.value));
323
+ }
324
+ this.state !== "error" && (this.state = "submit");
325
+ }
326
+ k$1([u, F?.name, F?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
327
+ }
328
+ close() {
329
+ this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
330
+ `), d$1(this.input, false), this.rl?.close(), this.rl = undefined, this.emit(`${this.state}`, this.value), this.unsubscribe();
331
+ }
332
+ restoreCursor() {
333
+ const u = G(this._prevFrame, process.stdout.columns, { hard: true }).split(`
334
+ `).length - 1;
335
+ this.output.write(srcExports.cursor.move(-999, u * -1));
336
+ }
337
+ render() {
338
+ const u = G(this._render(this) ?? "", process.stdout.columns, { hard: true });
339
+ if (u !== this._prevFrame) {
340
+ if (this.state === "initial")
341
+ this.output.write(srcExports.cursor.hide);
342
+ else {
343
+ const F = lD(this._prevFrame, u);
344
+ if (this.restoreCursor(), F && F?.length === 1) {
345
+ const e2 = F[0];
346
+ this.output.write(srcExports.cursor.move(0, e2)), this.output.write(srcExports.erase.lines(1));
347
+ const s = u.split(`
348
+ `);
349
+ this.output.write(s[e2]), this._prevFrame = u, this.output.write(srcExports.cursor.move(0, s.length - e2 - 1));
350
+ return;
351
+ }
352
+ if (F && F?.length > 1) {
353
+ const e2 = F[0];
354
+ this.output.write(srcExports.cursor.move(0, e2)), this.output.write(srcExports.erase.down());
355
+ const s = u.split(`
356
+ `).slice(e2);
357
+ this.output.write(s.join(`
358
+ `)), this._prevFrame = u;
359
+ return;
360
+ }
361
+ this.output.write(srcExports.erase.down());
362
+ }
363
+ this.output.write(u), this.state === "initial" && (this.state = "active"), this._prevFrame = u;
364
+ }
365
+ }
366
+ }
367
+ function ce() {
368
+ return g.platform !== "win32" ? g.env.TERM !== "linux" : !!g.env.CI || !!g.env.WT_SESSION || !!g.env.TERMINUS_SUBLIME || g.env.ConEmuTask === "{cmd::Cmder}" || g.env.TERM_PROGRAM === "Terminus-Sublime" || g.env.TERM_PROGRAM === "vscode" || g.env.TERM === "xterm-256color" || g.env.TERM === "alacritty" || g.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
369
+ }
370
+ async function prompt(message, opts = {}) {
371
+ const handleCancel = (value) => {
372
+ if (typeof value !== "symbol" || value.toString() !== "Symbol(clack:cancel)") {
373
+ return value;
374
+ }
375
+ switch (opts.cancel) {
376
+ case "reject": {
377
+ const error = new Error("Prompt cancelled.");
378
+ error.name = "ConsolaPromptCancelledError";
379
+ if (Error.captureStackTrace) {
380
+ Error.captureStackTrace(error, prompt);
381
+ }
382
+ throw error;
383
+ }
384
+ case "undefined": {
385
+ return;
386
+ }
387
+ case "null": {
388
+ return null;
389
+ }
390
+ case "symbol": {
391
+ return kCancel;
392
+ }
393
+ default:
394
+ case "default": {
395
+ return opts.default ?? opts.initial;
396
+ }
397
+ }
398
+ };
399
+ if (!opts.type || opts.type === "text") {
400
+ return await he({
401
+ message,
402
+ defaultValue: opts.default,
403
+ placeholder: opts.placeholder,
404
+ initialValue: opts.initial
405
+ }).then(handleCancel);
406
+ }
407
+ if (opts.type === "confirm") {
408
+ return await ye({
409
+ message,
410
+ initialValue: opts.initial
411
+ }).then(handleCancel);
412
+ }
413
+ if (opts.type === "select") {
414
+ return await ve({
415
+ message,
416
+ options: opts.options.map((o2) => typeof o2 === "string" ? { value: o2, label: o2 } : o2),
417
+ initialValue: opts.initial
418
+ }).then(handleCancel);
419
+ }
420
+ if (opts.type === "multiselect") {
421
+ return await fe({
422
+ message,
423
+ options: opts.options.map((o2) => typeof o2 === "string" ? { value: o2, label: o2 } : o2),
424
+ required: opts.required,
425
+ initialValues: opts.initial
426
+ }).then(handleCancel);
427
+ }
428
+ throw new Error(`Unknown prompt type: ${opts.type}`);
429
+ }
430
+ var src, hasRequiredSrc, srcExports, picocolors, hasRequiredPicocolors, picocolorsExports, e, Q, P$1, X, DD, uD = function() {
431
+ return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\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])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\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\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\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-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*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\u26A7\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-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\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[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
432
+ }, FD, m = 10, L$1 = (t = 0) => (u) => `\x1B[${u + t}m`, N = (t = 0) => (u) => `\x1B[${38 + t};5;${u}m`, I = (t = 0) => (u, F, e2) => `\x1B[${38 + t};2;${u};${F};${e2}m`, r, tD, eD, iD, v, CD = 39, w$1 = "\x07", W$1 = "[", rD = "]", R = "m", y, V$1 = (t) => `${v.values().next().value}${W$1}${t}${R}`, z = (t) => `${v.values().next().value}${y}${t}${w$1}`, ED = (t) => t.split(" ").map((u) => A$1(u)), _ = (t, u, F) => {
433
+ const e2 = [...u];
434
+ let s = false, i = false, D = A$1(T$1(t[t.length - 1]));
435
+ for (const [C, o] of e2.entries()) {
436
+ const E = A$1(o);
437
+ if (D + E <= F ? t[t.length - 1] += o : (t.push(o), D = 0), v.has(o) && (s = true, i = e2.slice(C + 1).join("").startsWith(y)), s) {
438
+ i ? o === w$1 && (s = false, i = false) : o === R && (s = false);
439
+ continue;
440
+ }
441
+ D += E, D === F && C < e2.length - 1 && (t.push(""), D = 0);
442
+ }
443
+ !D && t[t.length - 1].length > 0 && t.length > 1 && (t[t.length - 2] += t.pop());
444
+ }, nD = (t) => {
445
+ const u = t.split(" ");
446
+ let F = u.length;
447
+ for (;F > 0 && !(A$1(u[F - 1]) > 0); )
448
+ F--;
449
+ return F === u.length ? t : u.slice(0, F).join(" ") + u.slice(F).join("");
450
+ }, oD = (t, u, F = {}) => {
451
+ if (F.trim !== false && t.trim() === "")
452
+ return "";
453
+ let e2 = "", s, i;
454
+ const D = ED(t);
455
+ let C = [""];
456
+ for (const [E, a] of t.split(" ").entries()) {
457
+ F.trim !== false && (C[C.length - 1] = C[C.length - 1].trimStart());
458
+ let n = A$1(C[C.length - 1]);
459
+ if (E !== 0 && (n >= u && (F.wordWrap === false || F.trim === false) && (C.push(""), n = 0), (n > 0 || F.trim === false) && (C[C.length - 1] += " ", n++)), F.hard && D[E] > u) {
460
+ const B = u - n, p = 1 + Math.floor((D[E] - B - 1) / u);
461
+ Math.floor((D[E] - 1) / u) < p && C.push(""), _(C, a, u);
462
+ continue;
463
+ }
464
+ if (n + D[E] > u && n > 0 && D[E] > 0) {
465
+ if (F.wordWrap === false && n < u) {
466
+ _(C, a, u);
467
+ continue;
468
+ }
469
+ C.push("");
470
+ }
471
+ if (n + D[E] > u && F.wordWrap === false) {
472
+ _(C, a, u);
473
+ continue;
474
+ }
475
+ C[C.length - 1] += a;
476
+ }
477
+ F.trim !== false && (C = C.map((E) => nD(E)));
478
+ const o = [...C.join(`
479
+ `)];
480
+ for (const [E, a] of o.entries()) {
481
+ if (e2 += a, v.has(a)) {
482
+ const { groups: B } = new RegExp(`(?:\\${W$1}(?<code>\\d+)m|\\${y}(?<uri>.*)${w$1})`).exec(o.slice(E).join("")) || { groups: {} };
483
+ if (B.code !== undefined) {
484
+ const p = Number.parseFloat(B.code);
485
+ s = p === CD ? undefined : p;
486
+ } else
487
+ B.uri !== undefined && (i = B.uri.length === 0 ? undefined : B.uri);
488
+ }
489
+ const n = iD.codes.get(Number(s));
490
+ o[E + 1] === `
491
+ ` ? (i && (e2 += z("")), s && n && (e2 += V$1(n))) : a === `
492
+ ` && (s && n && (e2 += V$1(s)), i && (e2 += z(i)));
493
+ }
494
+ return e2;
495
+ }, aD, c, S, AD, pD = (t, u, F) => (u in t) ? AD(t, u, { enumerable: true, configurable: true, writable: true, value: F }) : t[u] = F, h = (t, u, F) => (pD(t, typeof u != "symbol" ? u + "" : u, F), F), fD, bD, mD = (t, u, F) => (u in t) ? bD(t, u, { enumerable: true, configurable: true, writable: true, value: F }) : t[u] = F, Y = (t, u, F) => (mD(t, typeof u != "symbol" ? u + "" : u, F), F), wD, SD, $D = (t, u, F) => (u in t) ? SD(t, u, { enumerable: true, configurable: true, writable: true, value: F }) : t[u] = F, q = (t, u, F) => ($D(t, typeof u != "symbol" ? u + "" : u, F), F), jD, PD, V, u = (t, n) => V ? t : n, le, L, W, C, o, d, k, P, A, T, F, w = (t) => {
496
+ switch (t) {
497
+ case "initial":
498
+ case "active":
499
+ return e.cyan(le);
500
+ case "cancel":
501
+ return e.red(L);
502
+ case "error":
503
+ return e.yellow(W);
504
+ case "submit":
505
+ return e.green(C);
506
+ }
507
+ }, B = (t) => {
508
+ const { cursor: n, options: s, style: r2 } = t, i = t.maxItems ?? Number.POSITIVE_INFINITY, a = Math.max(process.stdout.rows - 4, 0), c2 = Math.min(a, Math.max(i, 5));
509
+ let l = 0;
510
+ n >= l + c2 - 3 ? l = Math.max(Math.min(n - c2 + 3, s.length - c2), 0) : n < l + 2 && (l = Math.max(n - 2, 0));
511
+ const $ = c2 < s.length && l > 0, p = c2 < s.length && l + c2 < s.length;
512
+ return s.slice(l, l + c2).map((M, v2, x2) => {
513
+ const j = v2 === 0 && $, E = v2 === x2.length - 1 && p;
514
+ return j || E ? e.dim("...") : r2(M, v2 + l === n);
515
+ });
516
+ }, he = (t) => new PD({ validate: t.validate, placeholder: t.placeholder, defaultValue: t.defaultValue, initialValue: t.initialValue, render() {
517
+ const n = `${e.gray(o)}
518
+ ${w(this.state)} ${t.message}
519
+ `, s = t.placeholder ? e.inverse(t.placeholder[0]) + e.dim(t.placeholder.slice(1)) : e.inverse(e.hidden("_")), r2 = this.value ? this.valueWithCursor : s;
520
+ switch (this.state) {
521
+ case "error":
522
+ return `${n.trim()}
523
+ ${e.yellow(o)} ${r2}
524
+ ${e.yellow(d)} ${e.yellow(this.error)}
525
+ `;
526
+ case "submit":
527
+ return `${n}${e.gray(o)} ${e.dim(this.value || t.placeholder)}`;
528
+ case "cancel":
529
+ return `${n}${e.gray(o)} ${e.strikethrough(e.dim(this.value ?? ""))}${this.value?.trim() ? `
530
+ ${e.gray(o)}` : ""}`;
531
+ default:
532
+ return `${n}${e.cyan(o)} ${r2}
533
+ ${e.cyan(d)}
534
+ `;
535
+ }
536
+ } }).prompt(), ye = (t) => {
537
+ const n = t.active ?? "Yes", s = t.inactive ?? "No";
538
+ return new fD({ active: n, inactive: s, initialValue: t.initialValue ?? true, render() {
539
+ const r2 = `${e.gray(o)}
540
+ ${w(this.state)} ${t.message}
541
+ `, i = this.value ? n : s;
542
+ switch (this.state) {
543
+ case "submit":
544
+ return `${r2}${e.gray(o)} ${e.dim(i)}`;
545
+ case "cancel":
546
+ return `${r2}${e.gray(o)} ${e.strikethrough(e.dim(i))}
547
+ ${e.gray(o)}`;
548
+ default:
549
+ return `${r2}${e.cyan(o)} ${this.value ? `${e.green(k)} ${n}` : `${e.dim(P)} ${e.dim(n)}`} ${e.dim("/")} ${this.value ? `${e.dim(P)} ${e.dim(s)}` : `${e.green(k)} ${s}`}
550
+ ${e.cyan(d)}
551
+ `;
552
+ }
553
+ } }).prompt();
554
+ }, ve = (t) => {
555
+ const n = (s, r2) => {
556
+ const i = s.label ?? String(s.value);
557
+ switch (r2) {
558
+ case "selected":
559
+ return `${e.dim(i)}`;
560
+ case "active":
561
+ return `${e.green(k)} ${i} ${s.hint ? e.dim(`(${s.hint})`) : ""}`;
562
+ case "cancelled":
563
+ return `${e.strikethrough(e.dim(i))}`;
564
+ default:
565
+ return `${e.dim(P)} ${e.dim(i)}`;
566
+ }
567
+ };
568
+ return new jD({ options: t.options, initialValue: t.initialValue, render() {
569
+ const s = `${e.gray(o)}
570
+ ${w(this.state)} ${t.message}
571
+ `;
572
+ switch (this.state) {
573
+ case "submit":
574
+ return `${s}${e.gray(o)} ${n(this.options[this.cursor], "selected")}`;
575
+ case "cancel":
576
+ return `${s}${e.gray(o)} ${n(this.options[this.cursor], "cancelled")}
577
+ ${e.gray(o)}`;
578
+ default:
579
+ return `${s}${e.cyan(o)} ${B({ cursor: this.cursor, options: this.options, maxItems: t.maxItems, style: (r2, i) => n(r2, i ? "active" : "inactive") }).join(`
580
+ ${e.cyan(o)} `)}
581
+ ${e.cyan(d)}
582
+ `;
583
+ }
584
+ } }).prompt();
585
+ }, fe = (t) => {
586
+ const n = (s, r2) => {
587
+ const i = s.label ?? String(s.value);
588
+ return r2 === "active" ? `${e.cyan(A)} ${i} ${s.hint ? e.dim(`(${s.hint})`) : ""}` : r2 === "selected" ? `${e.green(T)} ${e.dim(i)}` : r2 === "cancelled" ? `${e.strikethrough(e.dim(i))}` : r2 === "active-selected" ? `${e.green(T)} ${i} ${s.hint ? e.dim(`(${s.hint})`) : ""}` : r2 === "submitted" ? `${e.dim(i)}` : `${e.dim(F)} ${e.dim(i)}`;
589
+ };
590
+ return new wD({ options: t.options, initialValues: t.initialValues, required: t.required ?? true, cursorAt: t.cursorAt, validate(s) {
591
+ if (this.required && s.length === 0)
592
+ return `Please select at least one option.
593
+ ${e.reset(e.dim(`Press ${e.gray(e.bgWhite(e.inverse(" space ")))} to select, ${e.gray(e.bgWhite(e.inverse(" enter ")))} to submit`))}`;
594
+ }, render() {
595
+ const s = `${e.gray(o)}
596
+ ${w(this.state)} ${t.message}
597
+ `, r2 = (i, a) => {
598
+ const c2 = this.value.includes(i.value);
599
+ return a && c2 ? n(i, "active-selected") : c2 ? n(i, "selected") : n(i, a ? "active" : "inactive");
600
+ };
601
+ switch (this.state) {
602
+ case "submit":
603
+ return `${s}${e.gray(o)} ${this.options.filter(({ value: i }) => this.value.includes(i)).map((i) => n(i, "submitted")).join(e.dim(", ")) || e.dim("none")}`;
604
+ case "cancel": {
605
+ const i = this.options.filter(({ value: a }) => this.value.includes(a)).map((a) => n(a, "cancelled")).join(e.dim(", "));
606
+ return `${s}${e.gray(o)} ${i.trim() ? `${i}
607
+ ${e.gray(o)}` : ""}`;
608
+ }
609
+ case "error": {
610
+ const i = this.error.split(`
611
+ `).map((a, c2) => c2 === 0 ? `${e.yellow(d)} ${e.yellow(a)}` : ` ${a}`).join(`
612
+ `);
613
+ return `${s + e.yellow(o)} ${B({ options: this.options, cursor: this.cursor, maxItems: t.maxItems, style: r2 }).join(`
614
+ ${e.yellow(o)} `)}
615
+ ${i}
616
+ `;
617
+ }
618
+ default:
619
+ return `${s}${e.cyan(o)} ${B({ options: this.options, cursor: this.cursor, maxItems: t.maxItems, style: r2 }).join(`
620
+ ${e.cyan(o)} `)}
621
+ ${e.cyan(d)}
622
+ `;
623
+ }
624
+ } }).prompt();
625
+ }, kCancel;
626
+ var init_prompt = __esm(() => {
627
+ srcExports = requireSrc();
628
+ picocolors = { exports: {} };
629
+ picocolorsExports = /* @__PURE__ */ requirePicocolors();
630
+ e = /* @__PURE__ */ getDefaultExportFromCjs(picocolorsExports);
631
+ Q = J();
632
+ P$1 = { exports: {} };
633
+ (function(t) {
634
+ var u = {};
635
+ t.exports = u, u.eastAsianWidth = function(e2) {
636
+ var s = e2.charCodeAt(0), i = e2.length == 2 ? e2.charCodeAt(1) : 0, D = s;
637
+ return 55296 <= s && s <= 56319 && 56320 <= i && i <= 57343 && (s &= 1023, i &= 1023, D = s << 10 | i, D += 65536), D == 12288 || 65281 <= D && D <= 65376 || 65504 <= D && D <= 65510 ? "F" : D == 8361 || 65377 <= D && D <= 65470 || 65474 <= D && D <= 65479 || 65482 <= D && D <= 65487 || 65490 <= D && D <= 65495 || 65498 <= D && D <= 65500 || 65512 <= D && D <= 65518 ? "H" : 4352 <= D && D <= 4447 || 4515 <= D && D <= 4519 || 4602 <= D && D <= 4607 || 9001 <= D && D <= 9002 || 11904 <= D && D <= 11929 || 11931 <= D && D <= 12019 || 12032 <= D && D <= 12245 || 12272 <= D && D <= 12283 || 12289 <= D && D <= 12350 || 12353 <= D && D <= 12438 || 12441 <= D && D <= 12543 || 12549 <= D && D <= 12589 || 12593 <= D && D <= 12686 || 12688 <= D && D <= 12730 || 12736 <= D && D <= 12771 || 12784 <= D && D <= 12830 || 12832 <= D && D <= 12871 || 12880 <= D && D <= 13054 || 13056 <= D && D <= 19903 || 19968 <= D && D <= 42124 || 42128 <= D && D <= 42182 || 43360 <= D && D <= 43388 || 44032 <= D && D <= 55203 || 55216 <= D && D <= 55238 || 55243 <= D && D <= 55291 || 63744 <= D && D <= 64255 || 65040 <= D && D <= 65049 || 65072 <= D && D <= 65106 || 65108 <= D && D <= 65126 || 65128 <= D && D <= 65131 || 110592 <= D && D <= 110593 || 127488 <= D && D <= 127490 || 127504 <= D && D <= 127546 || 127552 <= D && D <= 127560 || 127568 <= D && D <= 127569 || 131072 <= D && D <= 194367 || 177984 <= D && D <= 196605 || 196608 <= D && D <= 262141 ? "W" : 32 <= D && D <= 126 || 162 <= D && D <= 163 || 165 <= D && D <= 166 || D == 172 || D == 175 || 10214 <= D && D <= 10221 || 10629 <= D && D <= 10630 ? "Na" : D == 161 || D == 164 || 167 <= D && D <= 168 || D == 170 || 173 <= D && D <= 174 || 176 <= D && D <= 180 || 182 <= D && D <= 186 || 188 <= D && D <= 191 || D == 198 || D == 208 || 215 <= D && D <= 216 || 222 <= D && D <= 225 || D == 230 || 232 <= D && D <= 234 || 236 <= D && D <= 237 || D == 240 || 242 <= D && D <= 243 || 247 <= D && D <= 250 || D == 252 || D == 254 || D == 257 || D == 273 || D == 275 || D == 283 || 294 <= D && D <= 295 || D == 299 || 305 <= D && D <= 307 || D == 312 || 319 <= D && D <= 322 || D == 324 || 328 <= D && D <= 331 || D == 333 || 338 <= D && D <= 339 || 358 <= D && D <= 359 || D == 363 || D == 462 || D == 464 || D == 466 || D == 468 || D == 470 || D == 472 || D == 474 || D == 476 || D == 593 || D == 609 || D == 708 || D == 711 || 713 <= D && D <= 715 || D == 717 || D == 720 || 728 <= D && D <= 731 || D == 733 || D == 735 || 768 <= D && D <= 879 || 913 <= D && D <= 929 || 931 <= D && D <= 937 || 945 <= D && D <= 961 || 963 <= D && D <= 969 || D == 1025 || 1040 <= D && D <= 1103 || D == 1105 || D == 8208 || 8211 <= D && D <= 8214 || 8216 <= D && D <= 8217 || 8220 <= D && D <= 8221 || 8224 <= D && D <= 8226 || 8228 <= D && D <= 8231 || D == 8240 || 8242 <= D && D <= 8243 || D == 8245 || D == 8251 || D == 8254 || D == 8308 || D == 8319 || 8321 <= D && D <= 8324 || D == 8364 || D == 8451 || D == 8453 || D == 8457 || D == 8467 || D == 8470 || 8481 <= D && D <= 8482 || D == 8486 || D == 8491 || 8531 <= D && D <= 8532 || 8539 <= D && D <= 8542 || 8544 <= D && D <= 8555 || 8560 <= D && D <= 8569 || D == 8585 || 8592 <= D && D <= 8601 || 8632 <= D && D <= 8633 || D == 8658 || D == 8660 || D == 8679 || D == 8704 || 8706 <= D && D <= 8707 || 8711 <= D && D <= 8712 || D == 8715 || D == 8719 || D == 8721 || D == 8725 || D == 8730 || 8733 <= D && D <= 8736 || D == 8739 || D == 8741 || 8743 <= D && D <= 8748 || D == 8750 || 8756 <= D && D <= 8759 || 8764 <= D && D <= 8765 || D == 8776 || D == 8780 || D == 8786 || 8800 <= D && D <= 8801 || 8804 <= D && D <= 8807 || 8810 <= D && D <= 8811 || 8814 <= D && D <= 8815 || 8834 <= D && D <= 8835 || 8838 <= D && D <= 8839 || D == 8853 || D == 8857 || D == 8869 || D == 8895 || D == 8978 || 9312 <= D && D <= 9449 || 9451 <= D && D <= 9547 || 9552 <= D && D <= 9587 || 9600 <= D && D <= 9615 || 9618 <= D && D <= 9621 || 9632 <= D && D <= 9633 || 9635 <= D && D <= 9641 || 9650 <= D && D <= 9651 || 9654 <= D && D <= 9655 || 9660 <= D && D <= 9661 || 9664 <= D && D <= 9665 || 9670 <= D && D <= 9672 || D == 9675 || 9678 <= D && D <= 9681 || 9698 <= D && D <= 9701 || D == 9711 || 9733 <= D && D <= 9734 || D == 9737 || 9742 <= D && D <= 9743 || 9748 <= D && D <= 9749 || D == 9756 || D == 9758 || D == 9792 || D == 9794 || 9824 <= D && D <= 9825 || 9827 <= D && D <= 9829 || 9831 <= D && D <= 9834 || 9836 <= D && D <= 9837 || D == 9839 || 9886 <= D && D <= 9887 || 9918 <= D && D <= 9919 || 9924 <= D && D <= 9933 || 9935 <= D && D <= 9953 || D == 9955 || 9960 <= D && D <= 9983 || D == 10045 || D == 10071 || 10102 <= D && D <= 10111 || 11093 <= D && D <= 11097 || 12872 <= D && D <= 12879 || 57344 <= D && D <= 63743 || 65024 <= D && D <= 65039 || D == 65533 || 127232 <= D && D <= 127242 || 127248 <= D && D <= 127277 || 127280 <= D && D <= 127337 || 127344 <= D && D <= 127386 || 917760 <= D && D <= 917999 || 983040 <= D && D <= 1048573 || 1048576 <= D && D <= 1114109 ? "A" : "N";
638
+ }, u.characterLength = function(e2) {
639
+ var s = this.eastAsianWidth(e2);
640
+ return s == "F" || s == "W" || s == "A" ? 2 : 1;
641
+ };
642
+ function F(e2) {
643
+ return e2.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
644
+ }
645
+ u.length = function(e2) {
646
+ for (var s = F(e2), i = 0, D = 0;D < s.length; D++)
647
+ i = i + this.characterLength(s[D]);
648
+ return i;
649
+ }, u.slice = function(e2, s, i) {
650
+ textLen = u.length(e2), s = s || 0, i = i || 1, s < 0 && (s = textLen + s), i < 0 && (i = textLen + i);
651
+ for (var D = "", C = 0, o = F(e2), E = 0;E < o.length; E++) {
652
+ var a = o[E], n = u.length(a);
653
+ if (C >= s - (n == 2 ? 1 : 0))
654
+ if (C + n <= i)
655
+ D += a;
656
+ else
657
+ break;
658
+ C += n;
659
+ }
660
+ return D;
661
+ };
662
+ })(P$1);
663
+ X = P$1.exports;
664
+ DD = O(X);
665
+ FD = O(uD);
666
+ r = { 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] } };
667
+ Object.keys(r.modifier);
668
+ tD = Object.keys(r.color);
669
+ eD = Object.keys(r.bgColor);
670
+ [...tD, ...eD];
671
+ iD = sD();
672
+ v = new Set(["\x1B", "\x9B"]);
673
+ y = `${rD}8;;`;
674
+ aD = ["up", "down", "left", "right", "space", "enter", "cancel"];
675
+ c = { actions: new Set(aD), aliases: new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["\x03", "cancel"], ["escape", "cancel"]]) };
676
+ globalThis.process.platform.startsWith("win");
677
+ S = Symbol("clack:cancel");
678
+ AD = Object.defineProperty;
679
+ fD = class fD extends x {
680
+ get cursor() {
681
+ return this.value ? 0 : 1;
682
+ }
683
+ get _value() {
684
+ return this.cursor === 0;
685
+ }
686
+ constructor(u) {
687
+ super(u, false), this.value = !!u.initialValue, this.on("value", () => {
688
+ this.value = this._value;
689
+ }), this.on("confirm", (F) => {
690
+ this.output.write(srcExports.cursor.move(0, -1)), this.value = F, this.state = "submit", this.close();
691
+ }), this.on("cursor", () => {
692
+ this.value = !this.value;
693
+ });
694
+ }
695
+ };
696
+ bD = Object.defineProperty;
697
+ wD = class extends x {
698
+ constructor(u) {
699
+ super(u, false), Y(this, "options"), Y(this, "cursor", 0), this.options = u.options, this.value = [...u.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: F }) => F === u.cursorAt), 0), this.on("key", (F) => {
700
+ F === "a" && this.toggleAll();
701
+ }), this.on("cursor", (F) => {
702
+ switch (F) {
703
+ case "left":
704
+ case "up":
705
+ this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
706
+ break;
707
+ case "down":
708
+ case "right":
709
+ this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
710
+ break;
711
+ case "space":
712
+ this.toggleValue();
713
+ break;
714
+ }
715
+ });
716
+ }
717
+ get _value() {
718
+ return this.options[this.cursor].value;
719
+ }
720
+ toggleAll() {
721
+ const u = this.value.length === this.options.length;
722
+ this.value = u ? [] : this.options.map((F) => F.value);
723
+ }
724
+ toggleValue() {
725
+ const u = this.value.includes(this._value);
726
+ this.value = u ? this.value.filter((F) => F !== this._value) : [...this.value, this._value];
727
+ }
728
+ };
729
+ SD = Object.defineProperty;
730
+ jD = class jD extends x {
731
+ constructor(u) {
732
+ super(u, false), q(this, "options"), q(this, "cursor", 0), this.options = u.options, this.cursor = this.options.findIndex(({ value: F }) => F === u.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (F) => {
733
+ switch (F) {
734
+ case "left":
735
+ case "up":
736
+ this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
737
+ break;
738
+ case "down":
739
+ case "right":
740
+ this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
741
+ break;
742
+ }
743
+ this.changeValue();
744
+ });
745
+ }
746
+ get _value() {
747
+ return this.options[this.cursor];
748
+ }
749
+ changeValue() {
750
+ this.value = this._value.value;
751
+ }
752
+ };
753
+ PD = class PD extends x {
754
+ get valueWithCursor() {
755
+ if (this.state === "submit")
756
+ return this.value;
757
+ if (this.cursor >= this.value.length)
758
+ return `${this.value}\u2588`;
759
+ const u = this.value.slice(0, this.cursor), [F, ...e$1] = this.value.slice(this.cursor);
760
+ return `${u}${e.inverse(F)}${e$1.join("")}`;
761
+ }
762
+ get cursor() {
763
+ return this._cursor;
764
+ }
765
+ constructor(u) {
766
+ super(u), this.on("finalize", () => {
767
+ this.value || (this.value = u.defaultValue);
768
+ });
769
+ }
770
+ };
771
+ V = ce();
772
+ le = u("\u276F", ">");
773
+ L = u("\u25A0", "x");
774
+ W = u("\u25B2", "x");
775
+ C = u("\u2714", "\u221A");
776
+ o = u("");
777
+ d = u("");
778
+ k = u("\u25CF", ">");
779
+ P = u("\u25CB", " ");
780
+ A = u("\u25FB", "[\u2022]");
781
+ T = u("\u25FC", "[+]");
782
+ F = u("\u25FB", "[ ]");
783
+ `${e.gray(o)} `;
784
+ kCancel = Symbol.for("cancel");
785
+ });
786
+
787
+ // ../../node_modules/.bun/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
788
+ var require_src = __commonJS((exports, module) => {
789
+ var ESC = "\x1B";
790
+ var CSI = `${ESC}[`;
791
+ var beep = "\x07";
792
+ var cursor = {
793
+ to(x2, y3) {
794
+ if (!y3)
795
+ return `${CSI}${x2 + 1}G`;
796
+ return `${CSI}${y3 + 1};${x2 + 1}H`;
797
+ },
798
+ move(x2, y3) {
799
+ let ret = "";
800
+ if (x2 < 0)
801
+ ret += `${CSI}${-x2}D`;
802
+ else if (x2 > 0)
803
+ ret += `${CSI}${x2}C`;
804
+ if (y3 < 0)
805
+ ret += `${CSI}${-y3}A`;
806
+ else if (y3 > 0)
807
+ ret += `${CSI}${y3}B`;
808
+ return ret;
809
+ },
810
+ up: (count = 1) => `${CSI}${count}A`,
811
+ down: (count = 1) => `${CSI}${count}B`,
812
+ forward: (count = 1) => `${CSI}${count}C`,
813
+ backward: (count = 1) => `${CSI}${count}D`,
814
+ nextLine: (count = 1) => `${CSI}E`.repeat(count),
815
+ prevLine: (count = 1) => `${CSI}F`.repeat(count),
816
+ left: `${CSI}G`,
817
+ hide: `${CSI}?25l`,
818
+ show: `${CSI}?25h`,
819
+ save: `${ESC}7`,
820
+ restore: `${ESC}8`
821
+ };
822
+ var scroll = {
823
+ up: (count = 1) => `${CSI}S`.repeat(count),
824
+ down: (count = 1) => `${CSI}T`.repeat(count)
825
+ };
826
+ var erase = {
827
+ screen: `${CSI}2J`,
828
+ up: (count = 1) => `${CSI}1J`.repeat(count),
829
+ down: (count = 1) => `${CSI}J`.repeat(count),
830
+ line: `${CSI}2K`,
831
+ lineEnd: `${CSI}K`,
832
+ lineStart: `${CSI}1K`,
833
+ lines(count) {
834
+ let clear = "";
835
+ for (let i2 = 0;i2 < count; i2++)
836
+ clear += this.line + (i2 < count - 1 ? cursor.up() : "");
837
+ if (count)
838
+ clear += cursor.left;
839
+ return clear;
840
+ }
841
+ };
842
+ module.exports = { cursor, scroll, erase, beep };
843
+ });
844
+
845
+ // ../../node_modules/.bun/picocolors@1.1.1/node_modules/picocolors/picocolors.js
846
+ var require_picocolors = __commonJS((exports, module) => {
847
+ var p = process || {};
848
+ var argv2 = p.argv || [];
849
+ var env2 = p.env || {};
850
+ var isColorSupported2 = !(!!env2.NO_COLOR || argv2.includes("--no-color")) && (!!env2.FORCE_COLOR || argv2.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env2.TERM !== "dumb" || !!env2.CI);
851
+ var formatter = (open, close, replace = open) => (input) => {
852
+ let string = "" + input, index = string.indexOf(close, open.length);
853
+ return ~index ? open + replaceClose2(string, close, replace, index) + close : open + string + close;
854
+ };
855
+ var replaceClose2 = (string, close, replace, index) => {
856
+ let result = "", cursor = 0;
857
+ do {
858
+ result += string.substring(cursor, index) + replace;
859
+ cursor = index + close.length;
860
+ index = string.indexOf(close, cursor);
861
+ } while (~index);
862
+ return result + string.substring(cursor);
863
+ };
864
+ var createColors2 = (enabled = isColorSupported2) => {
865
+ let f3 = enabled ? formatter : () => String;
866
+ return {
867
+ isColorSupported: enabled,
868
+ reset: f3("\x1B[0m", "\x1B[0m"),
869
+ bold: f3("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
870
+ dim: f3("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
871
+ italic: f3("\x1B[3m", "\x1B[23m"),
872
+ underline: f3("\x1B[4m", "\x1B[24m"),
873
+ inverse: f3("\x1B[7m", "\x1B[27m"),
874
+ hidden: f3("\x1B[8m", "\x1B[28m"),
875
+ strikethrough: f3("\x1B[9m", "\x1B[29m"),
876
+ black: f3("\x1B[30m", "\x1B[39m"),
877
+ red: f3("\x1B[31m", "\x1B[39m"),
878
+ green: f3("\x1B[32m", "\x1B[39m"),
879
+ yellow: f3("\x1B[33m", "\x1B[39m"),
880
+ blue: f3("\x1B[34m", "\x1B[39m"),
881
+ magenta: f3("\x1B[35m", "\x1B[39m"),
882
+ cyan: f3("\x1B[36m", "\x1B[39m"),
883
+ white: f3("\x1B[37m", "\x1B[39m"),
884
+ gray: f3("\x1B[90m", "\x1B[39m"),
885
+ bgBlack: f3("\x1B[40m", "\x1B[49m"),
886
+ bgRed: f3("\x1B[41m", "\x1B[49m"),
887
+ bgGreen: f3("\x1B[42m", "\x1B[49m"),
888
+ bgYellow: f3("\x1B[43m", "\x1B[49m"),
889
+ bgBlue: f3("\x1B[44m", "\x1B[49m"),
890
+ bgMagenta: f3("\x1B[45m", "\x1B[49m"),
891
+ bgCyan: f3("\x1B[46m", "\x1B[49m"),
892
+ bgWhite: f3("\x1B[47m", "\x1B[49m"),
893
+ blackBright: f3("\x1B[90m", "\x1B[39m"),
894
+ redBright: f3("\x1B[91m", "\x1B[39m"),
895
+ greenBright: f3("\x1B[92m", "\x1B[39m"),
896
+ yellowBright: f3("\x1B[93m", "\x1B[39m"),
897
+ blueBright: f3("\x1B[94m", "\x1B[39m"),
898
+ magentaBright: f3("\x1B[95m", "\x1B[39m"),
899
+ cyanBright: f3("\x1B[96m", "\x1B[39m"),
900
+ whiteBright: f3("\x1B[97m", "\x1B[39m"),
901
+ bgBlackBright: f3("\x1B[100m", "\x1B[49m"),
902
+ bgRedBright: f3("\x1B[101m", "\x1B[49m"),
903
+ bgGreenBright: f3("\x1B[102m", "\x1B[49m"),
904
+ bgYellowBright: f3("\x1B[103m", "\x1B[49m"),
905
+ bgBlueBright: f3("\x1B[104m", "\x1B[49m"),
906
+ bgMagentaBright: f3("\x1B[105m", "\x1B[49m"),
907
+ bgCyanBright: f3("\x1B[106m", "\x1B[49m"),
908
+ bgWhiteBright: f3("\x1B[107m", "\x1B[49m")
909
+ };
910
+ };
911
+ module.exports = createColors2();
912
+ module.exports.createColors = createColors2;
913
+ });
914
+
915
+ // ../../node_modules/.bun/consola@3.4.2/node_modules/consola/dist/core.mjs
916
+ var LogLevels = {
917
+ silent: Number.NEGATIVE_INFINITY,
918
+ fatal: 0,
919
+ error: 0,
920
+ warn: 1,
921
+ log: 2,
922
+ info: 3,
923
+ success: 3,
924
+ fail: 3,
925
+ ready: 3,
926
+ start: 3,
927
+ box: 3,
928
+ debug: 4,
929
+ trace: 5,
930
+ verbose: Number.POSITIVE_INFINITY
931
+ };
932
+ var LogTypes = {
933
+ silent: {
934
+ level: -1
935
+ },
936
+ fatal: {
937
+ level: LogLevels.fatal
938
+ },
939
+ error: {
940
+ level: LogLevels.error
941
+ },
942
+ warn: {
943
+ level: LogLevels.warn
944
+ },
945
+ log: {
946
+ level: LogLevels.log
947
+ },
948
+ info: {
949
+ level: LogLevels.info
950
+ },
951
+ success: {
952
+ level: LogLevels.success
953
+ },
954
+ fail: {
955
+ level: LogLevels.fail
956
+ },
957
+ ready: {
958
+ level: LogLevels.info
959
+ },
960
+ start: {
961
+ level: LogLevels.info
962
+ },
963
+ box: {
964
+ level: LogLevels.info
965
+ },
966
+ debug: {
967
+ level: LogLevels.debug
968
+ },
969
+ trace: {
970
+ level: LogLevels.trace
971
+ },
972
+ verbose: {
973
+ level: LogLevels.verbose
974
+ }
975
+ };
976
+ function isPlainObject$1(value) {
977
+ if (value === null || typeof value !== "object") {
978
+ return false;
979
+ }
980
+ const prototype = Object.getPrototypeOf(value);
981
+ if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) {
982
+ return false;
983
+ }
984
+ if (Symbol.iterator in value) {
985
+ return false;
986
+ }
987
+ if (Symbol.toStringTag in value) {
988
+ return Object.prototype.toString.call(value) === "[object Module]";
989
+ }
990
+ return true;
991
+ }
992
+ function _defu(baseObject, defaults, namespace = ".", merger) {
993
+ if (!isPlainObject$1(defaults)) {
994
+ return _defu(baseObject, {}, namespace, merger);
995
+ }
996
+ const object = Object.assign({}, defaults);
997
+ for (const key in baseObject) {
998
+ if (key === "__proto__" || key === "constructor") {
999
+ continue;
1000
+ }
1001
+ const value = baseObject[key];
1002
+ if (value === null || value === undefined) {
1003
+ continue;
1004
+ }
1005
+ if (merger && merger(object, key, value, namespace)) {
1006
+ continue;
1007
+ }
1008
+ if (Array.isArray(value) && Array.isArray(object[key])) {
1009
+ object[key] = [...value, ...object[key]];
1010
+ } else if (isPlainObject$1(value) && isPlainObject$1(object[key])) {
1011
+ object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
1012
+ } else {
1013
+ object[key] = value;
1014
+ }
1015
+ }
1016
+ return object;
1017
+ }
1018
+ function createDefu(merger) {
1019
+ return (...arguments_) => arguments_.reduce((p, c) => _defu(p, c, "", merger), {});
1020
+ }
1021
+ var defu = createDefu();
1022
+ function isPlainObject(obj) {
1023
+ return Object.prototype.toString.call(obj) === "[object Object]";
1024
+ }
1025
+ function isLogObj(arg) {
1026
+ if (!isPlainObject(arg)) {
1027
+ return false;
1028
+ }
1029
+ if (!arg.message && !arg.args) {
1030
+ return false;
1031
+ }
1032
+ if (arg.stack) {
1033
+ return false;
1034
+ }
1035
+ return true;
1036
+ }
1037
+ var paused = false;
1038
+ var queue = [];
1039
+
1040
+ class Consola {
1041
+ options;
1042
+ _lastLog;
1043
+ _mockFn;
1044
+ constructor(options = {}) {
1045
+ const types = options.types || LogTypes;
1046
+ this.options = defu({
1047
+ ...options,
1048
+ defaults: { ...options.defaults },
1049
+ level: _normalizeLogLevel(options.level, types),
1050
+ reporters: [...options.reporters || []]
1051
+ }, {
1052
+ types: LogTypes,
1053
+ throttle: 1000,
1054
+ throttleMin: 5,
1055
+ formatOptions: {
1056
+ date: true,
1057
+ colors: false,
1058
+ compact: true
1059
+ }
1060
+ });
1061
+ for (const type in types) {
1062
+ const defaults = {
1063
+ type,
1064
+ ...this.options.defaults,
1065
+ ...types[type]
1066
+ };
1067
+ this[type] = this._wrapLogFn(defaults);
1068
+ this[type].raw = this._wrapLogFn(defaults, true);
1069
+ }
1070
+ if (this.options.mockFn) {
1071
+ this.mockTypes();
1072
+ }
1073
+ this._lastLog = {};
1074
+ }
1075
+ get level() {
1076
+ return this.options.level;
1077
+ }
1078
+ set level(level) {
1079
+ this.options.level = _normalizeLogLevel(level, this.options.types, this.options.level);
1080
+ }
1081
+ prompt(message, opts) {
1082
+ if (!this.options.prompt) {
1083
+ throw new Error("prompt is not supported!");
1084
+ }
1085
+ return this.options.prompt(message, opts);
1086
+ }
1087
+ create(options) {
1088
+ const instance = new Consola({
1089
+ ...this.options,
1090
+ ...options
1091
+ });
1092
+ if (this._mockFn) {
1093
+ instance.mockTypes(this._mockFn);
1094
+ }
1095
+ return instance;
1096
+ }
1097
+ withDefaults(defaults) {
1098
+ return this.create({
1099
+ ...this.options,
1100
+ defaults: {
1101
+ ...this.options.defaults,
1102
+ ...defaults
1103
+ }
1104
+ });
1105
+ }
1106
+ withTag(tag) {
1107
+ return this.withDefaults({
1108
+ tag: this.options.defaults.tag ? this.options.defaults.tag + ":" + tag : tag
1109
+ });
1110
+ }
1111
+ addReporter(reporter) {
1112
+ this.options.reporters.push(reporter);
1113
+ return this;
1114
+ }
1115
+ removeReporter(reporter) {
1116
+ if (reporter) {
1117
+ const i = this.options.reporters.indexOf(reporter);
1118
+ if (i !== -1) {
1119
+ return this.options.reporters.splice(i, 1);
1120
+ }
1121
+ } else {
1122
+ this.options.reporters.splice(0);
1123
+ }
1124
+ return this;
1125
+ }
1126
+ setReporters(reporters) {
1127
+ this.options.reporters = Array.isArray(reporters) ? reporters : [reporters];
1128
+ return this;
1129
+ }
1130
+ wrapAll() {
1131
+ this.wrapConsole();
1132
+ this.wrapStd();
1133
+ }
1134
+ restoreAll() {
1135
+ this.restoreConsole();
1136
+ this.restoreStd();
1137
+ }
1138
+ wrapConsole() {
1139
+ for (const type in this.options.types) {
1140
+ if (!console["__" + type]) {
1141
+ console["__" + type] = console[type];
1142
+ }
1143
+ console[type] = this[type].raw;
1144
+ }
1145
+ }
1146
+ restoreConsole() {
1147
+ for (const type in this.options.types) {
1148
+ if (console["__" + type]) {
1149
+ console[type] = console["__" + type];
1150
+ delete console["__" + type];
1151
+ }
1152
+ }
1153
+ }
1154
+ wrapStd() {
1155
+ this._wrapStream(this.options.stdout, "log");
1156
+ this._wrapStream(this.options.stderr, "log");
1157
+ }
1158
+ _wrapStream(stream, type) {
1159
+ if (!stream) {
1160
+ return;
1161
+ }
1162
+ if (!stream.__write) {
1163
+ stream.__write = stream.write;
1164
+ }
1165
+ stream.write = (data) => {
1166
+ this[type].raw(String(data).trim());
1167
+ };
1168
+ }
1169
+ restoreStd() {
1170
+ this._restoreStream(this.options.stdout);
1171
+ this._restoreStream(this.options.stderr);
1172
+ }
1173
+ _restoreStream(stream) {
1174
+ if (!stream) {
1175
+ return;
1176
+ }
1177
+ if (stream.__write) {
1178
+ stream.write = stream.__write;
1179
+ delete stream.__write;
1180
+ }
1181
+ }
1182
+ pauseLogs() {
1183
+ paused = true;
1184
+ }
1185
+ resumeLogs() {
1186
+ paused = false;
1187
+ const _queue = queue.splice(0);
1188
+ for (const item of _queue) {
1189
+ item[0]._logFn(item[1], item[2]);
1190
+ }
1191
+ }
1192
+ mockTypes(mockFn) {
1193
+ const _mockFn = mockFn || this.options.mockFn;
1194
+ this._mockFn = _mockFn;
1195
+ if (typeof _mockFn !== "function") {
1196
+ return;
1197
+ }
1198
+ for (const type in this.options.types) {
1199
+ this[type] = _mockFn(type, this.options.types[type]) || this[type];
1200
+ this[type].raw = this[type];
1201
+ }
1202
+ }
1203
+ _wrapLogFn(defaults, isRaw) {
1204
+ return (...args) => {
1205
+ if (paused) {
1206
+ queue.push([this, defaults, args, isRaw]);
1207
+ return;
1208
+ }
1209
+ return this._logFn(defaults, args, isRaw);
1210
+ };
1211
+ }
1212
+ _logFn(defaults, args, isRaw) {
1213
+ if ((defaults.level || 0) > this.level) {
1214
+ return false;
1215
+ }
1216
+ const logObj = {
1217
+ date: /* @__PURE__ */ new Date,
1218
+ args: [],
1219
+ ...defaults,
1220
+ level: _normalizeLogLevel(defaults.level, this.options.types)
1221
+ };
1222
+ if (!isRaw && args.length === 1 && isLogObj(args[0])) {
1223
+ Object.assign(logObj, args[0]);
1224
+ } else {
1225
+ logObj.args = [...args];
1226
+ }
1227
+ if (logObj.message) {
1228
+ logObj.args.unshift(logObj.message);
1229
+ delete logObj.message;
1230
+ }
1231
+ if (logObj.additional) {
1232
+ if (!Array.isArray(logObj.additional)) {
1233
+ logObj.additional = logObj.additional.split(`
1234
+ `);
1235
+ }
1236
+ logObj.args.push(`
1237
+ ` + logObj.additional.join(`
1238
+ `));
1239
+ delete logObj.additional;
1240
+ }
1241
+ logObj.type = typeof logObj.type === "string" ? logObj.type.toLowerCase() : "log";
1242
+ logObj.tag = typeof logObj.tag === "string" ? logObj.tag : "";
1243
+ const resolveLog = (newLog = false) => {
1244
+ const repeated = (this._lastLog.count || 0) - this.options.throttleMin;
1245
+ if (this._lastLog.object && repeated > 0) {
1246
+ const args2 = [...this._lastLog.object.args];
1247
+ if (repeated > 1) {
1248
+ args2.push(`(repeated ${repeated} times)`);
1249
+ }
1250
+ this._log({ ...this._lastLog.object, args: args2 });
1251
+ this._lastLog.count = 1;
1252
+ }
1253
+ if (newLog) {
1254
+ this._lastLog.object = logObj;
1255
+ this._log(logObj);
1256
+ }
1257
+ };
1258
+ clearTimeout(this._lastLog.timeout);
1259
+ const diffTime = this._lastLog.time && logObj.date ? logObj.date.getTime() - this._lastLog.time.getTime() : 0;
1260
+ this._lastLog.time = logObj.date;
1261
+ if (diffTime < this.options.throttle) {
1262
+ try {
1263
+ const serializedLog = JSON.stringify([
1264
+ logObj.type,
1265
+ logObj.tag,
1266
+ logObj.args
1267
+ ]);
1268
+ const isSameLog = this._lastLog.serialized === serializedLog;
1269
+ this._lastLog.serialized = serializedLog;
1270
+ if (isSameLog) {
1271
+ this._lastLog.count = (this._lastLog.count || 0) + 1;
1272
+ if (this._lastLog.count > this.options.throttleMin) {
1273
+ this._lastLog.timeout = setTimeout(resolveLog, this.options.throttle);
1274
+ return;
1275
+ }
1276
+ }
1277
+ } catch {}
1278
+ }
1279
+ resolveLog(true);
1280
+ }
1281
+ _log(logObj) {
1282
+ for (const reporter of this.options.reporters) {
1283
+ reporter.log(logObj, {
1284
+ options: this.options
1285
+ });
1286
+ }
1287
+ }
1288
+ }
1289
+ function _normalizeLogLevel(input, types = {}, defaultLevel = 3) {
1290
+ if (input === undefined) {
1291
+ return defaultLevel;
1292
+ }
1293
+ if (typeof input === "number") {
1294
+ return input;
1295
+ }
1296
+ if (types[input] && types[input].level !== undefined) {
1297
+ return types[input].level;
1298
+ }
1299
+ return defaultLevel;
1300
+ }
1301
+ Consola.prototype.add = Consola.prototype.addReporter;
1302
+ Consola.prototype.remove = Consola.prototype.removeReporter;
1303
+ Consola.prototype.clear = Consola.prototype.removeReporter;
1304
+ Consola.prototype.withScope = Consola.prototype.withTag;
1305
+ Consola.prototype.mock = Consola.prototype.mockTypes;
1306
+ Consola.prototype.pause = Consola.prototype.pauseLogs;
1307
+ Consola.prototype.resume = Consola.prototype.resumeLogs;
1308
+ function createConsola(options = {}) {
1309
+ return new Consola(options);
1310
+ }
1311
+ // ../../node_modules/.bun/consola@3.4.2/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs
1312
+ import { formatWithOptions } from "util";
1313
+ import { sep } from "path";
1314
+ function parseStack(stack, message) {
1315
+ const cwd = process.cwd() + sep;
1316
+ const lines = stack.split(`
1317
+ `).splice(message.split(`
1318
+ `).length).map((l) => l.trim().replace("file://", "").replace(cwd, ""));
1319
+ return lines;
1320
+ }
1321
+ function writeStream(data, stream) {
1322
+ const write = stream.__write || stream.write;
1323
+ return write.call(stream, data);
1324
+ }
1325
+ var bracket = (x) => x ? `[${x}]` : "";
1326
+
1327
+ class BasicReporter {
1328
+ formatStack(stack, message, opts) {
1329
+ const indent = " ".repeat((opts?.errorLevel || 0) + 1);
1330
+ return indent + parseStack(stack, message).join(`
1331
+ ${indent}`);
1332
+ }
1333
+ formatError(err, opts) {
1334
+ const message = err.message ?? formatWithOptions(opts, err);
1335
+ const stack = err.stack ? this.formatStack(err.stack, message, opts) : "";
1336
+ const level = opts?.errorLevel || 0;
1337
+ const causedPrefix = level > 0 ? `${" ".repeat(level)}[cause]: ` : "";
1338
+ const causedError = err.cause ? `
1339
+
1340
+ ` + this.formatError(err.cause, { ...opts, errorLevel: level + 1 }) : "";
1341
+ return causedPrefix + message + `
1342
+ ` + stack + causedError;
1343
+ }
1344
+ formatArgs(args, opts) {
1345
+ const _args = args.map((arg) => {
1346
+ if (arg && typeof arg.stack === "string") {
1347
+ return this.formatError(arg, opts);
1348
+ }
1349
+ return arg;
1350
+ });
1351
+ return formatWithOptions(opts, ..._args);
1352
+ }
1353
+ formatDate(date, opts) {
1354
+ return opts.date ? date.toLocaleTimeString() : "";
1355
+ }
1356
+ filterAndJoin(arr) {
1357
+ return arr.filter(Boolean).join(" ");
1358
+ }
1359
+ formatLogObj(logObj, opts) {
1360
+ const message = this.formatArgs(logObj.args, opts);
1361
+ if (logObj.type === "box") {
1362
+ return `
1363
+ ` + [
1364
+ bracket(logObj.tag),
1365
+ logObj.title && logObj.title,
1366
+ ...message.split(`
1367
+ `)
1368
+ ].filter(Boolean).map((l) => " > " + l).join(`
1369
+ `) + `
1370
+ `;
1371
+ }
1372
+ return this.filterAndJoin([
1373
+ bracket(logObj.type),
1374
+ bracket(logObj.tag),
1375
+ message
1376
+ ]);
1377
+ }
1378
+ log(logObj, ctx) {
1379
+ const line = this.formatLogObj(logObj, {
1380
+ columns: ctx.options.stdout.columns || 0,
1381
+ ...ctx.options.formatOptions
1382
+ });
1383
+ return writeStream(line + `
1384
+ `, logObj.level < 2 ? ctx.options.stderr || process.stderr : ctx.options.stdout || process.stdout);
1385
+ }
1386
+ }
1387
+
1388
+ // ../../node_modules/.bun/consola@3.4.2/node_modules/consola/dist/index.mjs
1389
+ import g$1 from "process";
1390
+
1391
+ // ../../node_modules/.bun/consola@3.4.2/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs
1392
+ import * as tty from "tty";
1393
+ var {
1394
+ env = {},
1395
+ argv = [],
1396
+ platform = ""
1397
+ } = typeof process === "undefined" ? {} : process;
1398
+ var isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
1399
+ var isForced = "FORCE_COLOR" in env || argv.includes("--color");
1400
+ var isWindows = platform === "win32";
1401
+ var isDumbTerminal = env.TERM === "dumb";
1402
+ var isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;
1403
+ var isCI = "CI" in env && (("GITHUB_ACTIONS" in env) || ("GITLAB_CI" in env) || ("CIRCLECI" in env));
1404
+ var isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);
1405
+ function replaceClose(index, string, close, replace, head = string.slice(0, Math.max(0, index)) + replace, tail = string.slice(Math.max(0, index + close.length)), next = tail.indexOf(close)) {
1406
+ return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
1407
+ }
1408
+ function clearBleed(index, string, open, close, replace) {
1409
+ return index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
1410
+ }
1411
+ function filterEmpty(open, close, replace = open, at = open.length + 1) {
1412
+ return (string) => string || !(string === "" || string === undefined) ? clearBleed(("" + string).indexOf(close, at), string, open, close, replace) : "";
1413
+ }
1414
+ function init(open, close, replace) {
1415
+ return filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace);
1416
+ }
1417
+ var colorDefs = {
1418
+ reset: init(0, 0),
1419
+ bold: init(1, 22, "\x1B[22m\x1B[1m"),
1420
+ dim: init(2, 22, "\x1B[22m\x1B[2m"),
1421
+ italic: init(3, 23),
1422
+ underline: init(4, 24),
1423
+ inverse: init(7, 27),
1424
+ hidden: init(8, 28),
1425
+ strikethrough: init(9, 29),
1426
+ black: init(30, 39),
1427
+ red: init(31, 39),
1428
+ green: init(32, 39),
1429
+ yellow: init(33, 39),
1430
+ blue: init(34, 39),
1431
+ magenta: init(35, 39),
1432
+ cyan: init(36, 39),
1433
+ white: init(37, 39),
1434
+ gray: init(90, 39),
1435
+ bgBlack: init(40, 49),
1436
+ bgRed: init(41, 49),
1437
+ bgGreen: init(42, 49),
1438
+ bgYellow: init(43, 49),
1439
+ bgBlue: init(44, 49),
1440
+ bgMagenta: init(45, 49),
1441
+ bgCyan: init(46, 49),
1442
+ bgWhite: init(47, 49),
1443
+ blackBright: init(90, 39),
1444
+ redBright: init(91, 39),
1445
+ greenBright: init(92, 39),
1446
+ yellowBright: init(93, 39),
1447
+ blueBright: init(94, 39),
1448
+ magentaBright: init(95, 39),
1449
+ cyanBright: init(96, 39),
1450
+ whiteBright: init(97, 39),
1451
+ bgBlackBright: init(100, 49),
1452
+ bgRedBright: init(101, 49),
1453
+ bgGreenBright: init(102, 49),
1454
+ bgYellowBright: init(103, 49),
1455
+ bgBlueBright: init(104, 49),
1456
+ bgMagentaBright: init(105, 49),
1457
+ bgCyanBright: init(106, 49),
1458
+ bgWhiteBright: init(107, 49)
1459
+ };
1460
+ function createColors(useColor = isColorSupported) {
1461
+ return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
1462
+ }
1463
+ var colors = createColors();
1464
+ function getColor(color, fallback = "reset") {
1465
+ return colors[color] || colors[fallback];
1466
+ }
1467
+ var ansiRegex = [
1468
+ String.raw`[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)`,
1469
+ String.raw`(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))`
1470
+ ].join("|");
1471
+ function stripAnsi(text) {
1472
+ return text.replace(new RegExp(ansiRegex, "g"), "");
1473
+ }
1474
+ var boxStylePresets = {
1475
+ solid: {
1476
+ tl: "\u250C",
1477
+ tr: "\u2510",
1478
+ bl: "\u2514",
1479
+ br: "\u2518",
1480
+ h: "\u2500",
1481
+ v: "\u2502"
1482
+ },
1483
+ double: {
1484
+ tl: "\u2554",
1485
+ tr: "\u2557",
1486
+ bl: "\u255A",
1487
+ br: "\u255D",
1488
+ h: "\u2550",
1489
+ v: "\u2551"
1490
+ },
1491
+ doubleSingle: {
1492
+ tl: "\u2553",
1493
+ tr: "\u2556",
1494
+ bl: "\u2559",
1495
+ br: "\u255C",
1496
+ h: "\u2500",
1497
+ v: "\u2551"
1498
+ },
1499
+ doubleSingleRounded: {
1500
+ tl: "\u256D",
1501
+ tr: "\u256E",
1502
+ bl: "\u2570",
1503
+ br: "\u256F",
1504
+ h: "\u2500",
1505
+ v: "\u2551"
1506
+ },
1507
+ singleThick: {
1508
+ tl: "\u250F",
1509
+ tr: "\u2513",
1510
+ bl: "\u2517",
1511
+ br: "\u251B",
1512
+ h: "\u2501",
1513
+ v: "\u2503"
1514
+ },
1515
+ singleDouble: {
1516
+ tl: "\u2552",
1517
+ tr: "\u2555",
1518
+ bl: "\u2558",
1519
+ br: "\u255B",
1520
+ h: "\u2550",
1521
+ v: "\u2502"
1522
+ },
1523
+ singleDoubleRounded: {
1524
+ tl: "\u256D",
1525
+ tr: "\u256E",
1526
+ bl: "\u2570",
1527
+ br: "\u256F",
1528
+ h: "\u2550",
1529
+ v: "\u2502"
1530
+ },
1531
+ rounded: {
1532
+ tl: "\u256D",
1533
+ tr: "\u256E",
1534
+ bl: "\u2570",
1535
+ br: "\u256F",
1536
+ h: "\u2500",
1537
+ v: "\u2502"
1538
+ }
1539
+ };
1540
+ var defaultStyle = {
1541
+ borderColor: "white",
1542
+ borderStyle: "rounded",
1543
+ valign: "center",
1544
+ padding: 2,
1545
+ marginLeft: 1,
1546
+ marginTop: 1,
1547
+ marginBottom: 1
1548
+ };
1549
+ function box(text, _opts = {}) {
1550
+ const opts = {
1551
+ ..._opts,
1552
+ style: {
1553
+ ...defaultStyle,
1554
+ ..._opts.style
1555
+ }
1556
+ };
1557
+ const textLines = text.split(`
1558
+ `);
1559
+ const boxLines = [];
1560
+ const _color = getColor(opts.style.borderColor);
1561
+ const borderStyle = {
1562
+ ...typeof opts.style.borderStyle === "string" ? boxStylePresets[opts.style.borderStyle] || boxStylePresets.solid : opts.style.borderStyle
1563
+ };
1564
+ if (_color) {
1565
+ for (const key in borderStyle) {
1566
+ borderStyle[key] = _color(borderStyle[key]);
1567
+ }
1568
+ }
1569
+ const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;
1570
+ const height = textLines.length + paddingOffset;
1571
+ const width = Math.max(...textLines.map((line) => stripAnsi(line).length), opts.title ? stripAnsi(opts.title).length : 0) + paddingOffset;
1572
+ const widthOffset = width + paddingOffset;
1573
+ const leftSpace = opts.style.marginLeft > 0 ? " ".repeat(opts.style.marginLeft) : "";
1574
+ if (opts.style.marginTop > 0) {
1575
+ boxLines.push("".repeat(opts.style.marginTop));
1576
+ }
1577
+ if (opts.title) {
1578
+ const title = _color ? _color(opts.title) : opts.title;
1579
+ const left = borderStyle.h.repeat(Math.floor((width - stripAnsi(opts.title).length) / 2));
1580
+ const right = borderStyle.h.repeat(width - stripAnsi(opts.title).length - stripAnsi(left).length + paddingOffset);
1581
+ boxLines.push(`${leftSpace}${borderStyle.tl}${left}${title}${right}${borderStyle.tr}`);
1582
+ } else {
1583
+ boxLines.push(`${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`);
1584
+ }
1585
+ const valignOffset = opts.style.valign === "center" ? Math.floor((height - textLines.length) / 2) : opts.style.valign === "top" ? height - textLines.length - paddingOffset : height - textLines.length;
1586
+ for (let i = 0;i < height; i++) {
1587
+ if (i < valignOffset || i >= valignOffset + textLines.length) {
1588
+ boxLines.push(`${leftSpace}${borderStyle.v}${" ".repeat(widthOffset)}${borderStyle.v}`);
1589
+ } else {
1590
+ const line = textLines[i - valignOffset];
1591
+ const left = " ".repeat(paddingOffset);
1592
+ const right = " ".repeat(width - stripAnsi(line).length);
1593
+ boxLines.push(`${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`);
1594
+ }
1595
+ }
1596
+ boxLines.push(`${leftSpace}${borderStyle.bl}${borderStyle.h.repeat(widthOffset)}${borderStyle.br}`);
1597
+ if (opts.style.marginBottom > 0) {
1598
+ boxLines.push("".repeat(opts.style.marginBottom));
1599
+ }
1600
+ return boxLines.join(`
1601
+ `);
1602
+ }
1603
+
1604
+ // ../../node_modules/.bun/consola@3.4.2/node_modules/consola/dist/index.mjs
1605
+ var r2 = Object.create(null);
1606
+ var i = (e2) => globalThis.process?.env || import.meta.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (e2 ? r2 : globalThis);
1607
+ var o2 = new Proxy(r2, { get(e2, s) {
1608
+ return i()[s] ?? r2[s];
1609
+ }, has(e2, s) {
1610
+ const E = i();
1611
+ return s in E || s in r2;
1612
+ }, set(e2, s, E) {
1613
+ const B2 = i(true);
1614
+ return B2[s] = E, true;
1615
+ }, deleteProperty(e2, s) {
1616
+ if (!s)
1617
+ return false;
1618
+ const E = i(true);
1619
+ return delete E[s], true;
1620
+ }, ownKeys() {
1621
+ const e2 = i(true);
1622
+ return Object.keys(e2);
1623
+ } });
1624
+ var t = typeof process < "u" && process.env && "development" || "";
1625
+ var f2 = [["APPVEYOR"], ["AWS_AMPLIFY", "AWS_APP_ID", { ci: true }], ["AZURE_PIPELINES", "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"], ["AZURE_STATIC", "INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"], ["APPCIRCLE", "AC_APPCIRCLE"], ["BAMBOO", "bamboo_planKey"], ["BITBUCKET", "BITBUCKET_COMMIT"], ["BITRISE", "BITRISE_IO"], ["BUDDY", "BUDDY_WORKSPACE_ID"], ["BUILDKITE"], ["CIRCLE", "CIRCLECI"], ["CIRRUS", "CIRRUS_CI"], ["CLOUDFLARE_PAGES", "CF_PAGES", { ci: true }], ["CODEBUILD", "CODEBUILD_BUILD_ARN"], ["CODEFRESH", "CF_BUILD_ID"], ["DRONE"], ["DRONE", "DRONE_BUILD_EVENT"], ["DSARI"], ["GITHUB_ACTIONS"], ["GITLAB", "GITLAB_CI"], ["GITLAB", "CI_MERGE_REQUEST_ID"], ["GOCD", "GO_PIPELINE_LABEL"], ["LAYERCI"], ["HUDSON", "HUDSON_URL"], ["JENKINS", "JENKINS_URL"], ["MAGNUM"], ["NETLIFY"], ["NETLIFY", "NETLIFY_LOCAL", { ci: false }], ["NEVERCODE"], ["RENDER"], ["SAIL", "SAILCI"], ["SEMAPHORE"], ["SCREWDRIVER"], ["SHIPPABLE"], ["SOLANO", "TDDIUM"], ["STRIDER"], ["TEAMCITY", "TEAMCITY_VERSION"], ["TRAVIS"], ["VERCEL", "NOW_BUILDER"], ["VERCEL", "VERCEL", { ci: false }], ["VERCEL", "VERCEL_ENV", { ci: false }], ["APPCENTER", "APPCENTER_BUILD_ID"], ["CODESANDBOX", "CODESANDBOX_SSE", { ci: false }], ["CODESANDBOX", "CODESANDBOX_HOST", { ci: false }], ["STACKBLITZ"], ["STORMKIT"], ["CLEAVR"], ["ZEABUR"], ["CODESPHERE", "CODESPHERE_APP_ID", { ci: true }], ["RAILWAY", "RAILWAY_PROJECT_ID"], ["RAILWAY", "RAILWAY_SERVICE_ID"], ["DENO-DEPLOY", "DENO_DEPLOYMENT_ID"], ["FIREBASE_APP_HOSTING", "FIREBASE_APP_HOSTING", { ci: true }]];
1626
+ function b() {
1627
+ if (globalThis.process?.env)
1628
+ for (const e2 of f2) {
1629
+ const s = e2[1] || e2[0];
1630
+ if (globalThis.process?.env[s])
1631
+ return { name: e2[0].toLowerCase(), ...e2[2] };
1632
+ }
1633
+ return globalThis.process?.env?.SHELL === "/bin/jsh" && globalThis.process?.versions?.webcontainer ? { name: "stackblitz", ci: false } : { name: "", ci: false };
1634
+ }
1635
+ var l = b();
1636
+ l.name;
1637
+ function n(e2) {
1638
+ return e2 ? e2 !== "false" : false;
1639
+ }
1640
+ var I2 = globalThis.process?.platform || "";
1641
+ var T2 = n(o2.CI) || l.ci !== false;
1642
+ var a = n(globalThis.process?.stdout && globalThis.process?.stdout.isTTY);
1643
+ var g2 = n(o2.DEBUG);
1644
+ var R2 = t === "test" || n(o2.TEST);
1645
+ n(o2.MINIMAL);
1646
+ var A2 = /^win/i.test(I2);
1647
+ !n(o2.NO_COLOR) && (n(o2.FORCE_COLOR) || (a || A2) && o2.TERM);
1648
+ var C2 = (globalThis.process?.versions?.node || "").replace(/^v/, "") || null;
1649
+ Number(C2?.split(".")[0]);
1650
+ var y2 = globalThis.process || Object.create(null);
1651
+ var _2 = { versions: {} };
1652
+ new Proxy(y2, { get(e2, s) {
1653
+ if (s === "env")
1654
+ return o2;
1655
+ if (s in e2)
1656
+ return e2[s];
1657
+ if (s in _2)
1658
+ return _2[s];
1659
+ } });
1660
+ var c2 = globalThis.process?.release?.name === "node";
1661
+ var O2 = !!globalThis.Bun || !!globalThis.process?.versions?.bun;
1662
+ var D = !!globalThis.Deno;
1663
+ var L2 = !!globalThis.fastly;
1664
+ var S2 = !!globalThis.Netlify;
1665
+ var u2 = !!globalThis.EdgeRuntime;
1666
+ var N2 = globalThis.navigator?.userAgent === "Cloudflare-Workers";
1667
+ var F2 = [[S2, "netlify"], [u2, "edge-light"], [N2, "workerd"], [L2, "fastly"], [D, "deno"], [O2, "bun"], [c2, "node"]];
1668
+ function G2() {
1669
+ const e2 = F2.find((s) => s[0]);
1670
+ if (e2)
1671
+ return { name: e2[1] };
1672
+ }
1673
+ var P2 = G2();
1674
+ P2?.name;
1675
+ function ansiRegex2({ onlyFirst = false } = {}) {
1676
+ const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
1677
+ const pattern = [
1678
+ `[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`,
1679
+ "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"
1680
+ ].join("|");
1681
+ return new RegExp(pattern, onlyFirst ? undefined : "g");
1682
+ }
1683
+ var regex = ansiRegex2();
1684
+ function stripAnsi2(string) {
1685
+ if (typeof string !== "string") {
1686
+ throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
1687
+ }
1688
+ return string.replace(regex, "");
1689
+ }
1690
+ function isAmbiguous(x2) {
1691
+ return x2 === 161 || x2 === 164 || x2 === 167 || x2 === 168 || x2 === 170 || x2 === 173 || x2 === 174 || x2 >= 176 && x2 <= 180 || x2 >= 182 && x2 <= 186 || x2 >= 188 && x2 <= 191 || x2 === 198 || x2 === 208 || x2 === 215 || x2 === 216 || x2 >= 222 && x2 <= 225 || x2 === 230 || x2 >= 232 && x2 <= 234 || x2 === 236 || x2 === 237 || x2 === 240 || x2 === 242 || x2 === 243 || x2 >= 247 && x2 <= 250 || x2 === 252 || x2 === 254 || x2 === 257 || x2 === 273 || x2 === 275 || x2 === 283 || x2 === 294 || x2 === 295 || x2 === 299 || x2 >= 305 && x2 <= 307 || x2 === 312 || x2 >= 319 && x2 <= 322 || x2 === 324 || x2 >= 328 && x2 <= 331 || x2 === 333 || x2 === 338 || x2 === 339 || x2 === 358 || x2 === 359 || x2 === 363 || x2 === 462 || x2 === 464 || x2 === 466 || x2 === 468 || x2 === 470 || x2 === 472 || x2 === 474 || x2 === 476 || x2 === 593 || x2 === 609 || x2 === 708 || x2 === 711 || x2 >= 713 && x2 <= 715 || x2 === 717 || x2 === 720 || x2 >= 728 && x2 <= 731 || x2 === 733 || x2 === 735 || x2 >= 768 && x2 <= 879 || x2 >= 913 && x2 <= 929 || x2 >= 931 && x2 <= 937 || x2 >= 945 && x2 <= 961 || x2 >= 963 && x2 <= 969 || x2 === 1025 || x2 >= 1040 && x2 <= 1103 || x2 === 1105 || x2 === 8208 || x2 >= 8211 && x2 <= 8214 || x2 === 8216 || x2 === 8217 || x2 === 8220 || x2 === 8221 || x2 >= 8224 && x2 <= 8226 || x2 >= 8228 && x2 <= 8231 || x2 === 8240 || x2 === 8242 || x2 === 8243 || x2 === 8245 || x2 === 8251 || x2 === 8254 || x2 === 8308 || x2 === 8319 || x2 >= 8321 && x2 <= 8324 || x2 === 8364 || x2 === 8451 || x2 === 8453 || x2 === 8457 || x2 === 8467 || x2 === 8470 || x2 === 8481 || x2 === 8482 || x2 === 8486 || x2 === 8491 || x2 === 8531 || x2 === 8532 || x2 >= 8539 && x2 <= 8542 || x2 >= 8544 && x2 <= 8555 || x2 >= 8560 && x2 <= 8569 || x2 === 8585 || x2 >= 8592 && x2 <= 8601 || x2 === 8632 || x2 === 8633 || x2 === 8658 || x2 === 8660 || x2 === 8679 || x2 === 8704 || x2 === 8706 || x2 === 8707 || x2 === 8711 || x2 === 8712 || x2 === 8715 || x2 === 8719 || x2 === 8721 || x2 === 8725 || x2 === 8730 || x2 >= 8733 && x2 <= 8736 || x2 === 8739 || x2 === 8741 || x2 >= 8743 && x2 <= 8748 || x2 === 8750 || x2 >= 8756 && x2 <= 8759 || x2 === 8764 || x2 === 8765 || x2 === 8776 || x2 === 8780 || x2 === 8786 || x2 === 8800 || x2 === 8801 || x2 >= 8804 && x2 <= 8807 || x2 === 8810 || x2 === 8811 || x2 === 8814 || x2 === 8815 || x2 === 8834 || x2 === 8835 || x2 === 8838 || x2 === 8839 || x2 === 8853 || x2 === 8857 || x2 === 8869 || x2 === 8895 || x2 === 8978 || x2 >= 9312 && x2 <= 9449 || x2 >= 9451 && x2 <= 9547 || x2 >= 9552 && x2 <= 9587 || x2 >= 9600 && x2 <= 9615 || x2 >= 9618 && x2 <= 9621 || x2 === 9632 || x2 === 9633 || x2 >= 9635 && x2 <= 9641 || x2 === 9650 || x2 === 9651 || x2 === 9654 || x2 === 9655 || x2 === 9660 || x2 === 9661 || x2 === 9664 || x2 === 9665 || x2 >= 9670 && x2 <= 9672 || x2 === 9675 || x2 >= 9678 && x2 <= 9681 || x2 >= 9698 && x2 <= 9701 || x2 === 9711 || x2 === 9733 || x2 === 9734 || x2 === 9737 || x2 === 9742 || x2 === 9743 || x2 === 9756 || x2 === 9758 || x2 === 9792 || x2 === 9794 || x2 === 9824 || x2 === 9825 || x2 >= 9827 && x2 <= 9829 || x2 >= 9831 && x2 <= 9834 || x2 === 9836 || x2 === 9837 || x2 === 9839 || x2 === 9886 || x2 === 9887 || x2 === 9919 || x2 >= 9926 && x2 <= 9933 || x2 >= 9935 && x2 <= 9939 || x2 >= 9941 && x2 <= 9953 || x2 === 9955 || x2 === 9960 || x2 === 9961 || x2 >= 9963 && x2 <= 9969 || x2 === 9972 || x2 >= 9974 && x2 <= 9977 || x2 === 9979 || x2 === 9980 || x2 === 9982 || x2 === 9983 || x2 === 10045 || x2 >= 10102 && x2 <= 10111 || x2 >= 11094 && x2 <= 11097 || x2 >= 12872 && x2 <= 12879 || x2 >= 57344 && x2 <= 63743 || x2 >= 65024 && x2 <= 65039 || x2 === 65533 || x2 >= 127232 && x2 <= 127242 || x2 >= 127248 && x2 <= 127277 || x2 >= 127280 && x2 <= 127337 || x2 >= 127344 && x2 <= 127373 || x2 === 127375 || x2 === 127376 || x2 >= 127387 && x2 <= 127404 || x2 >= 917760 && x2 <= 917999 || x2 >= 983040 && x2 <= 1048573 || x2 >= 1048576 && x2 <= 1114109;
1692
+ }
1693
+ function isFullWidth(x2) {
1694
+ return x2 === 12288 || x2 >= 65281 && x2 <= 65376 || x2 >= 65504 && x2 <= 65510;
1695
+ }
1696
+ function isWide(x2) {
1697
+ return x2 >= 4352 && x2 <= 4447 || x2 === 8986 || x2 === 8987 || x2 === 9001 || x2 === 9002 || x2 >= 9193 && x2 <= 9196 || x2 === 9200 || x2 === 9203 || x2 === 9725 || x2 === 9726 || x2 === 9748 || x2 === 9749 || x2 >= 9776 && x2 <= 9783 || x2 >= 9800 && x2 <= 9811 || x2 === 9855 || x2 >= 9866 && x2 <= 9871 || x2 === 9875 || x2 === 9889 || x2 === 9898 || x2 === 9899 || x2 === 9917 || x2 === 9918 || x2 === 9924 || x2 === 9925 || x2 === 9934 || x2 === 9940 || x2 === 9962 || x2 === 9970 || x2 === 9971 || x2 === 9973 || x2 === 9978 || x2 === 9981 || x2 === 9989 || x2 === 9994 || x2 === 9995 || x2 === 10024 || x2 === 10060 || x2 === 10062 || x2 >= 10067 && x2 <= 10069 || x2 === 10071 || x2 >= 10133 && x2 <= 10135 || x2 === 10160 || x2 === 10175 || x2 === 11035 || x2 === 11036 || x2 === 11088 || x2 === 11093 || x2 >= 11904 && x2 <= 11929 || x2 >= 11931 && x2 <= 12019 || x2 >= 12032 && x2 <= 12245 || x2 >= 12272 && x2 <= 12287 || x2 >= 12289 && x2 <= 12350 || x2 >= 12353 && x2 <= 12438 || x2 >= 12441 && x2 <= 12543 || x2 >= 12549 && x2 <= 12591 || x2 >= 12593 && x2 <= 12686 || x2 >= 12688 && x2 <= 12773 || x2 >= 12783 && x2 <= 12830 || x2 >= 12832 && x2 <= 12871 || x2 >= 12880 && x2 <= 42124 || x2 >= 42128 && x2 <= 42182 || x2 >= 43360 && x2 <= 43388 || x2 >= 44032 && x2 <= 55203 || x2 >= 63744 && x2 <= 64255 || x2 >= 65040 && x2 <= 65049 || x2 >= 65072 && x2 <= 65106 || x2 >= 65108 && x2 <= 65126 || x2 >= 65128 && x2 <= 65131 || x2 >= 94176 && x2 <= 94180 || x2 === 94192 || x2 === 94193 || x2 >= 94208 && x2 <= 100343 || x2 >= 100352 && x2 <= 101589 || x2 >= 101631 && x2 <= 101640 || x2 >= 110576 && x2 <= 110579 || x2 >= 110581 && x2 <= 110587 || x2 === 110589 || x2 === 110590 || x2 >= 110592 && x2 <= 110882 || x2 === 110898 || x2 >= 110928 && x2 <= 110930 || x2 === 110933 || x2 >= 110948 && x2 <= 110951 || x2 >= 110960 && x2 <= 111355 || x2 >= 119552 && x2 <= 119638 || x2 >= 119648 && x2 <= 119670 || x2 === 126980 || x2 === 127183 || x2 === 127374 || x2 >= 127377 && x2 <= 127386 || x2 >= 127488 && x2 <= 127490 || x2 >= 127504 && x2 <= 127547 || x2 >= 127552 && x2 <= 127560 || x2 === 127568 || x2 === 127569 || x2 >= 127584 && x2 <= 127589 || x2 >= 127744 && x2 <= 127776 || x2 >= 127789 && x2 <= 127797 || x2 >= 127799 && x2 <= 127868 || x2 >= 127870 && x2 <= 127891 || x2 >= 127904 && x2 <= 127946 || x2 >= 127951 && x2 <= 127955 || x2 >= 127968 && x2 <= 127984 || x2 === 127988 || x2 >= 127992 && x2 <= 128062 || x2 === 128064 || x2 >= 128066 && x2 <= 128252 || x2 >= 128255 && x2 <= 128317 || x2 >= 128331 && x2 <= 128334 || x2 >= 128336 && x2 <= 128359 || x2 === 128378 || x2 === 128405 || x2 === 128406 || x2 === 128420 || x2 >= 128507 && x2 <= 128591 || x2 >= 128640 && x2 <= 128709 || x2 === 128716 || x2 >= 128720 && x2 <= 128722 || x2 >= 128725 && x2 <= 128727 || x2 >= 128732 && x2 <= 128735 || x2 === 128747 || x2 === 128748 || x2 >= 128756 && x2 <= 128764 || x2 >= 128992 && x2 <= 129003 || x2 === 129008 || x2 >= 129292 && x2 <= 129338 || x2 >= 129340 && x2 <= 129349 || x2 >= 129351 && x2 <= 129535 || x2 >= 129648 && x2 <= 129660 || x2 >= 129664 && x2 <= 129673 || x2 >= 129679 && x2 <= 129734 || x2 >= 129742 && x2 <= 129756 || x2 >= 129759 && x2 <= 129769 || x2 >= 129776 && x2 <= 129784 || x2 >= 131072 && x2 <= 196605 || x2 >= 196608 && x2 <= 262141;
1698
+ }
1699
+ function validate(codePoint) {
1700
+ if (!Number.isSafeInteger(codePoint)) {
1701
+ throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
1702
+ }
1703
+ }
1704
+ function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
1705
+ validate(codePoint);
1706
+ if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
1707
+ return 2;
1708
+ }
1709
+ return 1;
1710
+ }
1711
+ var emojiRegex = () => {
1712
+ return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
1713
+ };
1714
+ var segmenter = globalThis.Intl?.Segmenter ? new Intl.Segmenter : { segment: (str) => str.split("") };
1715
+ var defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
1716
+ function stringWidth$1(string, options = {}) {
1717
+ if (typeof string !== "string" || string.length === 0) {
1718
+ return 0;
1719
+ }
1720
+ const {
1721
+ ambiguousIsNarrow = true,
1722
+ countAnsiEscapeCodes = false
1723
+ } = options;
1724
+ if (!countAnsiEscapeCodes) {
1725
+ string = stripAnsi2(string);
1726
+ }
1727
+ if (string.length === 0) {
1728
+ return 0;
1729
+ }
1730
+ let width = 0;
1731
+ const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
1732
+ for (const { segment: character } of segmenter.segment(string)) {
1733
+ const codePoint = character.codePointAt(0);
1734
+ if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
1735
+ continue;
1736
+ }
1737
+ if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) {
1738
+ continue;
1739
+ }
1740
+ if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) {
1741
+ continue;
1742
+ }
1743
+ if (codePoint >= 55296 && codePoint <= 57343) {
1744
+ continue;
1745
+ }
1746
+ if (codePoint >= 65024 && codePoint <= 65039) {
1747
+ continue;
1748
+ }
1749
+ if (defaultIgnorableCodePointRegex.test(character)) {
1750
+ continue;
1751
+ }
1752
+ if (emojiRegex().test(character)) {
1753
+ width += 2;
1754
+ continue;
1755
+ }
1756
+ width += eastAsianWidth(codePoint, eastAsianWidthOptions);
1757
+ }
1758
+ return width;
1759
+ }
1760
+ function isUnicodeSupported() {
1761
+ const { env: env2 } = g$1;
1762
+ const { TERM, TERM_PROGRAM } = env2;
1763
+ if (g$1.platform !== "win32") {
1764
+ return TERM !== "linux";
1765
+ }
1766
+ return Boolean(env2.WT_SESSION) || Boolean(env2.TERMINUS_SUBLIME) || env2.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env2.TERMINAL_EMULATOR === "JetBrains-JediTerm";
1767
+ }
1768
+ var TYPE_COLOR_MAP = {
1769
+ info: "cyan",
1770
+ fail: "red",
1771
+ success: "green",
1772
+ ready: "green",
1773
+ start: "magenta"
1774
+ };
1775
+ var LEVEL_COLOR_MAP = {
1776
+ 0: "red",
1777
+ 1: "yellow"
1778
+ };
1779
+ var unicode = isUnicodeSupported();
1780
+ var s = (c3, fallback) => unicode ? c3 : fallback;
1781
+ var TYPE_ICONS = {
1782
+ error: s("\u2716", "\xD7"),
1783
+ fatal: s("\u2716", "\xD7"),
1784
+ ready: s("\u2714", "\u221A"),
1785
+ warn: s("\u26A0", "\u203C"),
1786
+ info: s("\u2139", "i"),
1787
+ success: s("\u2714", "\u221A"),
1788
+ debug: s("\u2699", "D"),
1789
+ trace: s("\u2192", "\u2192"),
1790
+ fail: s("\u2716", "\xD7"),
1791
+ start: s("\u25D0", "o"),
1792
+ log: ""
1793
+ };
1794
+ function stringWidth(str) {
1795
+ const hasICU = typeof Intl === "object";
1796
+ if (!hasICU || !Intl.Segmenter) {
1797
+ return stripAnsi(str).length;
1798
+ }
1799
+ return stringWidth$1(str);
1800
+ }
1801
+
1802
+ class FancyReporter extends BasicReporter {
1803
+ formatStack(stack, message, opts) {
1804
+ const indent = " ".repeat((opts?.errorLevel || 0) + 1);
1805
+ return `
1806
+ ${indent}` + parseStack(stack, message).map((line) => " " + line.replace(/^at +/, (m2) => colors.gray(m2)).replace(/\((.+)\)/, (_3, m2) => `(${colors.cyan(m2)})`)).join(`
1807
+ ${indent}`);
1808
+ }
1809
+ formatType(logObj, isBadge, opts) {
1810
+ const typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || "gray";
1811
+ if (isBadge) {
1812
+ return getBgColor(typeColor)(colors.black(` ${logObj.type.toUpperCase()} `));
1813
+ }
1814
+ const _type = typeof TYPE_ICONS[logObj.type] === "string" ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type;
1815
+ return _type ? getColor2(typeColor)(_type) : "";
1816
+ }
1817
+ formatLogObj(logObj, opts) {
1818
+ const [message, ...additional] = this.formatArgs(logObj.args, opts).split(`
1819
+ `);
1820
+ if (logObj.type === "box") {
1821
+ return box(characterFormat(message + (additional.length > 0 ? `
1822
+ ` + additional.join(`
1823
+ `) : "")), {
1824
+ title: logObj.title ? characterFormat(logObj.title) : undefined,
1825
+ style: logObj.style
1826
+ });
1827
+ }
1828
+ const date = this.formatDate(logObj.date, opts);
1829
+ const coloredDate = date && colors.gray(date);
1830
+ const isBadge = logObj.badge ?? logObj.level < 2;
1831
+ const type = this.formatType(logObj, isBadge, opts);
1832
+ const tag = logObj.tag ? colors.gray(logObj.tag) : "";
1833
+ let line;
1834
+ const left = this.filterAndJoin([type, characterFormat(message)]);
1835
+ const right = this.filterAndJoin(opts.columns ? [tag, coloredDate] : [tag]);
1836
+ const space = (opts.columns || 0) - stringWidth(left) - stringWidth(right) - 2;
1837
+ line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors.gray(`[${right}]`)} ` : "") + left;
1838
+ line += characterFormat(additional.length > 0 ? `
1839
+ ` + additional.join(`
1840
+ `) : "");
1841
+ if (logObj.type === "trace") {
1842
+ const _err = new Error("Trace: " + logObj.message);
1843
+ line += this.formatStack(_err.stack || "", _err.message);
1844
+ }
1845
+ return isBadge ? `
1846
+ ` + line + `
1847
+ ` : line;
1848
+ }
1849
+ }
1850
+ function characterFormat(str) {
1851
+ return str.replace(/`([^`]+)`/gm, (_3, m2) => colors.cyan(m2)).replace(/\s+_([^_]+)_\s+/gm, (_3, m2) => ` ${colors.underline(m2)} `);
1852
+ }
1853
+ function getColor2(color = "white") {
1854
+ return colors[color] || colors.white;
1855
+ }
1856
+ function getBgColor(color = "bgWhite") {
1857
+ return colors[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors.bgWhite;
1858
+ }
1859
+ function createConsola2(options = {}) {
1860
+ let level = _getDefaultLogLevel();
1861
+ if (process.env.CONSOLA_LEVEL) {
1862
+ level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level;
1863
+ }
1864
+ const consola2 = createConsola({
1865
+ level,
1866
+ defaults: { level },
1867
+ stdout: process.stdout,
1868
+ stderr: process.stderr,
1869
+ prompt: (...args) => Promise.resolve().then(() => (init_prompt(), exports_prompt)).then((m2) => m2.prompt(...args)),
1870
+ reporters: options.reporters || [
1871
+ options.fancy ?? !(T2 || R2) ? new FancyReporter : new BasicReporter
1872
+ ],
1873
+ ...options
1874
+ });
1875
+ return consola2;
1876
+ }
1877
+ function _getDefaultLogLevel() {
1878
+ if (g2) {
1879
+ return LogLevels.debug;
1880
+ }
1881
+ if (R2) {
1882
+ return LogLevels.warn;
1883
+ }
1884
+ return LogLevels.info;
1885
+ }
1886
+ var consola = createConsola2();
1887
+ // ../../node_modules/.bun/citty@0.1.6/node_modules/citty/dist/index.mjs
1888
+ function toArray(val) {
1889
+ if (Array.isArray(val)) {
1890
+ return val;
1891
+ }
1892
+ return val === undefined ? [] : [val];
1893
+ }
1894
+ function formatLineColumns(lines, linePrefix = "") {
1895
+ const maxLengh = [];
1896
+ for (const line of lines) {
1897
+ for (const [i2, element] of line.entries()) {
1898
+ maxLengh[i2] = Math.max(maxLengh[i2] || 0, element.length);
1899
+ }
1900
+ }
1901
+ return lines.map((l2) => l2.map((c3, i2) => linePrefix + c3[i2 === 0 ? "padStart" : "padEnd"](maxLengh[i2])).join(" ")).join(`
1902
+ `);
1903
+ }
1904
+ function resolveValue(input) {
1905
+ return typeof input === "function" ? input() : input;
1906
+ }
1907
+
1908
+ class CLIError extends Error {
1909
+ constructor(message, code) {
1910
+ super(message);
1911
+ this.code = code;
1912
+ this.name = "CLIError";
1913
+ }
1914
+ }
1915
+ var NUMBER_CHAR_RE = /\d/;
1916
+ var STR_SPLITTERS = ["-", "_", "/", "."];
1917
+ function isUppercase(char = "") {
1918
+ if (NUMBER_CHAR_RE.test(char)) {
1919
+ return;
1920
+ }
1921
+ return char !== char.toLowerCase();
1922
+ }
1923
+ function splitByCase(str, separators) {
1924
+ const splitters = separators ?? STR_SPLITTERS;
1925
+ const parts = [];
1926
+ if (!str || typeof str !== "string") {
1927
+ return parts;
1928
+ }
1929
+ let buff = "";
1930
+ let previousUpper;
1931
+ let previousSplitter;
1932
+ for (const char of str) {
1933
+ const isSplitter = splitters.includes(char);
1934
+ if (isSplitter === true) {
1935
+ parts.push(buff);
1936
+ buff = "";
1937
+ previousUpper = undefined;
1938
+ continue;
1939
+ }
1940
+ const isUpper = isUppercase(char);
1941
+ if (previousSplitter === false) {
1942
+ if (previousUpper === false && isUpper === true) {
1943
+ parts.push(buff);
1944
+ buff = char;
1945
+ previousUpper = isUpper;
1946
+ continue;
1947
+ }
1948
+ if (previousUpper === true && isUpper === false && buff.length > 1) {
1949
+ const lastChar = buff.at(-1);
1950
+ parts.push(buff.slice(0, Math.max(0, buff.length - 1)));
1951
+ buff = lastChar + char;
1952
+ previousUpper = isUpper;
1953
+ continue;
1954
+ }
1955
+ }
1956
+ buff += char;
1957
+ previousUpper = isUpper;
1958
+ previousSplitter = isSplitter;
1959
+ }
1960
+ parts.push(buff);
1961
+ return parts;
1962
+ }
1963
+ function upperFirst(str) {
1964
+ return str ? str[0].toUpperCase() + str.slice(1) : "";
1965
+ }
1966
+ function lowerFirst(str) {
1967
+ return str ? str[0].toLowerCase() + str.slice(1) : "";
1968
+ }
1969
+ function pascalCase(str, opts) {
1970
+ return str ? (Array.isArray(str) ? str : splitByCase(str)).map((p) => upperFirst(opts?.normalize ? p.toLowerCase() : p)).join("") : "";
1971
+ }
1972
+ function camelCase(str, opts) {
1973
+ return lowerFirst(pascalCase(str || "", opts));
1974
+ }
1975
+ function kebabCase(str, joiner) {
1976
+ return str ? (Array.isArray(str) ? str : splitByCase(str)).map((p) => p.toLowerCase()).join(joiner ?? "-") : "";
1977
+ }
1978
+ function toArr(any) {
1979
+ return any == undefined ? [] : Array.isArray(any) ? any : [any];
1980
+ }
1981
+ function toVal(out, key, val, opts) {
1982
+ let x2;
1983
+ const old = out[key];
1984
+ const nxt = ~opts.string.indexOf(key) ? val == undefined || val === true ? "" : String(val) : typeof val === "boolean" ? val : ~opts.boolean.indexOf(key) ? val === "false" ? false : val === "true" || (out._.push((x2 = +val, x2 * 0 === 0) ? x2 : val), !!val) : (x2 = +val, x2 * 0 === 0) ? x2 : val;
1985
+ out[key] = old == undefined ? nxt : Array.isArray(old) ? old.concat(nxt) : [old, nxt];
1986
+ }
1987
+ function parseRawArgs(args = [], opts = {}) {
1988
+ let k2;
1989
+ let arr;
1990
+ let arg;
1991
+ let name;
1992
+ let val;
1993
+ const out = { _: [] };
1994
+ let i2 = 0;
1995
+ let j = 0;
1996
+ let idx = 0;
1997
+ const len = args.length;
1998
+ const alibi = opts.alias !== undefined;
1999
+ const strict = opts.unknown !== undefined;
2000
+ const defaults = opts.default !== undefined;
2001
+ opts.alias = opts.alias || {};
2002
+ opts.string = toArr(opts.string);
2003
+ opts.boolean = toArr(opts.boolean);
2004
+ if (alibi) {
2005
+ for (k2 in opts.alias) {
2006
+ arr = opts.alias[k2] = toArr(opts.alias[k2]);
2007
+ for (i2 = 0;i2 < arr.length; i2++) {
2008
+ (opts.alias[arr[i2]] = arr.concat(k2)).splice(i2, 1);
2009
+ }
2010
+ }
2011
+ }
2012
+ for (i2 = opts.boolean.length;i2-- > 0; ) {
2013
+ arr = opts.alias[opts.boolean[i2]] || [];
2014
+ for (j = arr.length;j-- > 0; ) {
2015
+ opts.boolean.push(arr[j]);
2016
+ }
2017
+ }
2018
+ for (i2 = opts.string.length;i2-- > 0; ) {
2019
+ arr = opts.alias[opts.string[i2]] || [];
2020
+ for (j = arr.length;j-- > 0; ) {
2021
+ opts.string.push(arr[j]);
2022
+ }
2023
+ }
2024
+ if (defaults) {
2025
+ for (k2 in opts.default) {
2026
+ name = typeof opts.default[k2];
2027
+ arr = opts.alias[k2] = opts.alias[k2] || [];
2028
+ if (opts[name] !== undefined) {
2029
+ opts[name].push(k2);
2030
+ for (i2 = 0;i2 < arr.length; i2++) {
2031
+ opts[name].push(arr[i2]);
2032
+ }
2033
+ }
2034
+ }
2035
+ }
2036
+ const keys = strict ? Object.keys(opts.alias) : [];
2037
+ for (i2 = 0;i2 < len; i2++) {
2038
+ arg = args[i2];
2039
+ if (arg === "--") {
2040
+ out._ = out._.concat(args.slice(++i2));
2041
+ break;
2042
+ }
2043
+ for (j = 0;j < arg.length; j++) {
2044
+ if (arg.charCodeAt(j) !== 45) {
2045
+ break;
2046
+ }
2047
+ }
2048
+ if (j === 0) {
2049
+ out._.push(arg);
2050
+ } else if (arg.substring(j, j + 3) === "no-") {
2051
+ name = arg.slice(Math.max(0, j + 3));
2052
+ if (strict && !~keys.indexOf(name)) {
2053
+ return opts.unknown(arg);
2054
+ }
2055
+ out[name] = false;
2056
+ } else {
2057
+ for (idx = j + 1;idx < arg.length; idx++) {
2058
+ if (arg.charCodeAt(idx) === 61) {
2059
+ break;
2060
+ }
2061
+ }
2062
+ name = arg.substring(j, idx);
2063
+ val = arg.slice(Math.max(0, ++idx)) || i2 + 1 === len || ("" + args[i2 + 1]).charCodeAt(0) === 45 || args[++i2];
2064
+ arr = j === 2 ? [name] : name;
2065
+ for (idx = 0;idx < arr.length; idx++) {
2066
+ name = arr[idx];
2067
+ if (strict && !~keys.indexOf(name)) {
2068
+ return opts.unknown("-".repeat(j) + name);
2069
+ }
2070
+ toVal(out, name, idx + 1 < arr.length || val, opts);
2071
+ }
2072
+ }
2073
+ }
2074
+ if (defaults) {
2075
+ for (k2 in opts.default) {
2076
+ if (out[k2] === undefined) {
2077
+ out[k2] = opts.default[k2];
2078
+ }
2079
+ }
2080
+ }
2081
+ if (alibi) {
2082
+ for (k2 in out) {
2083
+ arr = opts.alias[k2] || [];
2084
+ while (arr.length > 0) {
2085
+ out[arr.shift()] = out[k2];
2086
+ }
2087
+ }
2088
+ }
2089
+ return out;
2090
+ }
2091
+ function parseArgs(rawArgs, argsDef) {
2092
+ const parseOptions = {
2093
+ boolean: [],
2094
+ string: [],
2095
+ mixed: [],
2096
+ alias: {},
2097
+ default: {}
2098
+ };
2099
+ const args = resolveArgs(argsDef);
2100
+ for (const arg of args) {
2101
+ if (arg.type === "positional") {
2102
+ continue;
2103
+ }
2104
+ if (arg.type === "string") {
2105
+ parseOptions.string.push(arg.name);
2106
+ } else if (arg.type === "boolean") {
2107
+ parseOptions.boolean.push(arg.name);
2108
+ }
2109
+ if (arg.default !== undefined) {
2110
+ parseOptions.default[arg.name] = arg.default;
2111
+ }
2112
+ if (arg.alias) {
2113
+ parseOptions.alias[arg.name] = arg.alias;
2114
+ }
2115
+ }
2116
+ const parsed = parseRawArgs(rawArgs, parseOptions);
2117
+ const [...positionalArguments] = parsed._;
2118
+ const parsedArgsProxy = new Proxy(parsed, {
2119
+ get(target, prop) {
2120
+ return target[prop] ?? target[camelCase(prop)] ?? target[kebabCase(prop)];
2121
+ }
2122
+ });
2123
+ for (const [, arg] of args.entries()) {
2124
+ if (arg.type === "positional") {
2125
+ const nextPositionalArgument = positionalArguments.shift();
2126
+ if (nextPositionalArgument !== undefined) {
2127
+ parsedArgsProxy[arg.name] = nextPositionalArgument;
2128
+ } else if (arg.default === undefined && arg.required !== false) {
2129
+ throw new CLIError(`Missing required positional argument: ${arg.name.toUpperCase()}`, "EARG");
2130
+ } else {
2131
+ parsedArgsProxy[arg.name] = arg.default;
2132
+ }
2133
+ } else if (arg.required && parsedArgsProxy[arg.name] === undefined) {
2134
+ throw new CLIError(`Missing required argument: --${arg.name}`, "EARG");
2135
+ }
2136
+ }
2137
+ return parsedArgsProxy;
2138
+ }
2139
+ function resolveArgs(argsDef) {
2140
+ const args = [];
2141
+ for (const [name, argDef] of Object.entries(argsDef || {})) {
2142
+ args.push({
2143
+ ...argDef,
2144
+ name,
2145
+ alias: toArray(argDef.alias)
2146
+ });
2147
+ }
2148
+ return args;
2149
+ }
2150
+ function defineCommand(def) {
2151
+ return def;
2152
+ }
2153
+ async function runCommand(cmd, opts) {
2154
+ const cmdArgs = await resolveValue(cmd.args || {});
2155
+ const parsedArgs = parseArgs(opts.rawArgs, cmdArgs);
2156
+ const context = {
2157
+ rawArgs: opts.rawArgs,
2158
+ args: parsedArgs,
2159
+ data: opts.data,
2160
+ cmd
2161
+ };
2162
+ if (typeof cmd.setup === "function") {
2163
+ await cmd.setup(context);
2164
+ }
2165
+ let result;
2166
+ try {
2167
+ const subCommands = await resolveValue(cmd.subCommands);
2168
+ if (subCommands && Object.keys(subCommands).length > 0) {
2169
+ const subCommandArgIndex = opts.rawArgs.findIndex((arg) => !arg.startsWith("-"));
2170
+ const subCommandName = opts.rawArgs[subCommandArgIndex];
2171
+ if (subCommandName) {
2172
+ if (!subCommands[subCommandName]) {
2173
+ throw new CLIError(`Unknown command \`${subCommandName}\``, "E_UNKNOWN_COMMAND");
2174
+ }
2175
+ const subCommand = await resolveValue(subCommands[subCommandName]);
2176
+ if (subCommand) {
2177
+ await runCommand(subCommand, {
2178
+ rawArgs: opts.rawArgs.slice(subCommandArgIndex + 1)
2179
+ });
2180
+ }
2181
+ } else if (!cmd.run) {
2182
+ throw new CLIError(`No command specified.`, "E_NO_COMMAND");
2183
+ }
2184
+ }
2185
+ if (typeof cmd.run === "function") {
2186
+ result = await cmd.run(context);
2187
+ }
2188
+ } finally {
2189
+ if (typeof cmd.cleanup === "function") {
2190
+ await cmd.cleanup(context);
2191
+ }
2192
+ }
2193
+ return { result };
2194
+ }
2195
+ async function resolveSubCommand(cmd, rawArgs, parent) {
2196
+ const subCommands = await resolveValue(cmd.subCommands);
2197
+ if (subCommands && Object.keys(subCommands).length > 0) {
2198
+ const subCommandArgIndex = rawArgs.findIndex((arg) => !arg.startsWith("-"));
2199
+ const subCommandName = rawArgs[subCommandArgIndex];
2200
+ const subCommand = await resolveValue(subCommands[subCommandName]);
2201
+ if (subCommand) {
2202
+ return resolveSubCommand(subCommand, rawArgs.slice(subCommandArgIndex + 1), cmd);
2203
+ }
2204
+ }
2205
+ return [cmd, parent];
2206
+ }
2207
+ async function showUsage(cmd, parent) {
2208
+ try {
2209
+ consola.log(await renderUsage(cmd, parent) + `
2210
+ `);
2211
+ } catch (error) {
2212
+ consola.error(error);
2213
+ }
2214
+ }
2215
+ async function renderUsage(cmd, parent) {
2216
+ const cmdMeta = await resolveValue(cmd.meta || {});
2217
+ const cmdArgs = resolveArgs(await resolveValue(cmd.args || {}));
2218
+ const parentMeta = await resolveValue(parent?.meta || {});
2219
+ const commandName = `${parentMeta.name ? `${parentMeta.name} ` : ""}` + (cmdMeta.name || process.argv[1]);
2220
+ const argLines = [];
2221
+ const posLines = [];
2222
+ const commandsLines = [];
2223
+ const usageLine = [];
2224
+ for (const arg of cmdArgs) {
2225
+ if (arg.type === "positional") {
2226
+ const name = arg.name.toUpperCase();
2227
+ const isRequired = arg.required !== false && arg.default === undefined;
2228
+ const defaultHint = arg.default ? `="${arg.default}"` : "";
2229
+ posLines.push([
2230
+ "`" + name + defaultHint + "`",
2231
+ arg.description || "",
2232
+ arg.valueHint ? `<${arg.valueHint}>` : ""
2233
+ ]);
2234
+ usageLine.push(isRequired ? `<${name}>` : `[${name}]`);
2235
+ } else {
2236
+ const isRequired = arg.required === true && arg.default === undefined;
2237
+ const argStr = (arg.type === "boolean" && arg.default === true ? [
2238
+ ...(arg.alias || []).map((a2) => `--no-${a2}`),
2239
+ `--no-${arg.name}`
2240
+ ].join(", ") : [...(arg.alias || []).map((a2) => `-${a2}`), `--${arg.name}`].join(", ")) + (arg.type === "string" && (arg.valueHint || arg.default) ? `=${arg.valueHint ? `<${arg.valueHint}>` : `"${arg.default || ""}"`}` : "");
2241
+ argLines.push([
2242
+ "`" + argStr + (isRequired ? " (required)" : "") + "`",
2243
+ arg.description || ""
2244
+ ]);
2245
+ if (isRequired) {
2246
+ usageLine.push(argStr);
2247
+ }
2248
+ }
2249
+ }
2250
+ if (cmd.subCommands) {
2251
+ const commandNames = [];
2252
+ const subCommands = await resolveValue(cmd.subCommands);
2253
+ for (const [name, sub] of Object.entries(subCommands)) {
2254
+ const subCmd = await resolveValue(sub);
2255
+ const meta = await resolveValue(subCmd?.meta);
2256
+ commandsLines.push([`\`${name}\``, meta?.description || ""]);
2257
+ commandNames.push(name);
2258
+ }
2259
+ usageLine.push(commandNames.join("|"));
2260
+ }
2261
+ const usageLines = [];
2262
+ const version = cmdMeta.version || parentMeta.version;
2263
+ usageLines.push(colors.gray(`${cmdMeta.description} (${commandName + (version ? ` v${version}` : "")})`), "");
2264
+ const hasOptions = argLines.length > 0 || posLines.length > 0;
2265
+ usageLines.push(`${colors.underline(colors.bold("USAGE"))} \`${commandName}${hasOptions ? " [OPTIONS]" : ""} ${usageLine.join(" ")}\``, "");
2266
+ if (posLines.length > 0) {
2267
+ usageLines.push(colors.underline(colors.bold("ARGUMENTS")), "");
2268
+ usageLines.push(formatLineColumns(posLines, " "));
2269
+ usageLines.push("");
2270
+ }
2271
+ if (argLines.length > 0) {
2272
+ usageLines.push(colors.underline(colors.bold("OPTIONS")), "");
2273
+ usageLines.push(formatLineColumns(argLines, " "));
2274
+ usageLines.push("");
2275
+ }
2276
+ if (commandsLines.length > 0) {
2277
+ usageLines.push(colors.underline(colors.bold("COMMANDS")), "");
2278
+ usageLines.push(formatLineColumns(commandsLines, " "));
2279
+ usageLines.push("", `Use \`${commandName} <command> --help\` for more information about a command.`);
2280
+ }
2281
+ return usageLines.filter((l2) => typeof l2 === "string").join(`
2282
+ `);
2283
+ }
2284
+ async function runMain(cmd, opts = {}) {
2285
+ const rawArgs = opts.rawArgs || process.argv.slice(2);
2286
+ const showUsage$1 = opts.showUsage || showUsage;
2287
+ try {
2288
+ if (rawArgs.includes("--help") || rawArgs.includes("-h")) {
2289
+ await showUsage$1(...await resolveSubCommand(cmd, rawArgs));
2290
+ process.exit(0);
2291
+ } else if (rawArgs.length === 1 && rawArgs[0] === "--version") {
2292
+ const meta = typeof cmd.meta === "function" ? await cmd.meta() : await cmd.meta;
2293
+ if (!meta?.version) {
2294
+ throw new CLIError("No version specified", "E_NO_VERSION");
2295
+ }
2296
+ consola.log(meta.version);
2297
+ } else {
2298
+ await runCommand(cmd, { rawArgs });
2299
+ }
2300
+ } catch (error) {
2301
+ const isCLIError = error instanceof CLIError;
2302
+ if (!isCLIError) {
2303
+ consola.error(error, `
2304
+ `);
2305
+ }
2306
+ if (isCLIError) {
2307
+ await showUsage$1(...await resolveSubCommand(cmd, rawArgs));
2308
+ }
2309
+ consola.error(error.message);
2310
+ process.exit(1);
2311
+ }
2312
+ }
2313
+
2314
+ // src/commands/dev.ts
2315
+ import { createRsbuild } from "@rsbuild/core";
2316
+
2317
+ // ../rsbuild-config/dist/index.js
2318
+ import { mergeRsbuildConfig } from "@rsbuild/core";
2319
+
2320
+ // ../rsbuild-config/dist/defaults.js
2321
+ var SUPPORTED_CONFIG_VERSION = 1;
2322
+ function getDefaults(mode) {
2323
+ return {
2324
+ output: {
2325
+ distPath: { root: "dist" },
2326
+ cleanDistPath: mode === "production"
2327
+ },
2328
+ performance: mode === "production" ? { chunkSplit: { strategy: "split-by-experience" } } : undefined
2329
+ };
2330
+ }
2331
+
2332
+ // ../rsbuild-config/dist/plugins/react.js
2333
+ import { pluginReact } from "@rsbuild/plugin-react";
2334
+ function getReactPlugin() {
2335
+ return pluginReact();
2336
+ }
2337
+
2338
+ // ../rsbuild-config/dist/plugins/mf2.js
2339
+ import { pluginModuleFederation } from "@module-federation/rsbuild-plugin";
2340
+ function getMF2Plugin(manifest, remoteMeta) {
2341
+ return pluginModuleFederation({
2342
+ name: manifest.name,
2343
+ filename: "remoteEntry.js",
2344
+ exposes: manifest.exposes,
2345
+ shared: buildShared(remoteMeta.shared)
2346
+ });
2347
+ }
2348
+ function buildShared(shared) {
2349
+ return Object.fromEntries(Object.entries(shared).map(([pkg, version]) => [
2350
+ pkg,
2351
+ {
2352
+ singleton: true,
2353
+ requiredVersion: version,
2354
+ eager: pkg === "react" || pkg === "react-dom"
2355
+ }
2356
+ ]));
2357
+ }
2358
+
2359
+ // ../rsbuild-config/dist/index.js
2360
+ function createConfig(manifest, remoteMeta, options) {
2361
+ const { mode, port } = options;
2362
+ return mergeRsbuildConfig(getDefaults(mode), {
2363
+ server: port ? { port } : undefined,
2364
+ plugins: [getReactPlugin(), getMF2Plugin(manifest, remoteMeta)]
2365
+ });
2366
+ }
2367
+
2368
+ // src/daas-config.ts
2369
+ import { readFileSync, existsSync } from "fs";
2370
+ import { resolve } from "path";
2371
+
2372
+ class ConfigError extends Error {
2373
+ constructor(message) {
2374
+ super(message);
2375
+ this.name = "ConfigError";
2376
+ }
2377
+ }
2378
+ function readDaasConfig(cwd = process.cwd()) {
2379
+ const pkgPath = resolve(cwd, "package.json");
2380
+ if (!existsSync(pkgPath)) {
2381
+ throw new ConfigError("No package.json found. Are you in an MFE directory?");
2382
+ }
2383
+ const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
2384
+ const daas = pkg.daas;
2385
+ if (!daas?.configUrl) {
2386
+ throw new ConfigError("No daas config found in package.json. Run daas init first.");
2387
+ }
2388
+ return {
2389
+ configUrl: daas.configUrl,
2390
+ port: daas.port ?? 3000,
2391
+ coverage: daas.coverage
2392
+ };
2393
+ }
2394
+
2395
+ // src/manifest.ts
2396
+ import { readFileSync as readFileSync2, existsSync as existsSync2 } from "fs";
2397
+ import { resolve as resolve2 } from "path";
2398
+
2399
+ class ManifestError extends Error {
2400
+ constructor(message) {
2401
+ super(message);
2402
+ this.name = "ManifestError";
2403
+ }
2404
+ }
2405
+ function readManifest(cwd = process.cwd()) {
2406
+ const manifestPath = resolve2(cwd, "mf.manifest.json");
2407
+ if (existsSync2(manifestPath)) {
2408
+ try {
2409
+ const raw = JSON.parse(readFileSync2(manifestPath, "utf8"));
2410
+ return normalizeManifest(raw, cwd);
2411
+ } catch (e2) {
2412
+ if (e2 instanceof ManifestError)
2413
+ throw e2;
2414
+ throw new ManifestError(`mf.manifest.json is invalid: ${e2.message}`);
2415
+ }
2416
+ }
2417
+ return deriveFromPackageJson(cwd);
2418
+ }
2419
+ function deriveFromPackageJson(cwd) {
2420
+ const pkgPath = resolve2(cwd, "package.json");
2421
+ if (!existsSync2(pkgPath)) {
2422
+ throw new ManifestError("No package.json found. Are you in an MFE directory?");
2423
+ }
2424
+ const pkg = JSON.parse(readFileSync2(pkgPath, "utf8"));
2425
+ const name = stripScope(pkg.name ?? "mfe-app");
2426
+ return { name, exposes: { "./App": "./src/App" } };
2427
+ }
2428
+ function normalizeManifest(raw, cwd) {
2429
+ const base = deriveFromPackageJson(cwd);
2430
+ return {
2431
+ name: typeof raw.name === "string" ? raw.name : base.name,
2432
+ exposes: raw.exposes != null ? raw.exposes : base.exposes
2433
+ };
2434
+ }
2435
+ function stripScope(name) {
2436
+ return name.replace(/^@[^/]+\//, "");
2437
+ }
2438
+ // src/fallback-config.json
2439
+ var fallback_config_default = {
2440
+ version: "1.0.0",
2441
+ minCliVersion: "1.0.0",
2442
+ releaseNotesUrl: "https://github.com/your-org/daas-cli/releases",
2443
+ shared: {
2444
+ react: "18.3.1",
2445
+ "react-dom": "18.3.1"
2446
+ },
2447
+ rsbuildConfigVersion: 1
2448
+ };
2449
+
2450
+ // src/remote-config.ts
2451
+ var CACHE_TTL_MS = 5 * 60 * 1000;
2452
+ var cache = null;
2453
+
2454
+ class FetchError extends Error {
2455
+ constructor(msg) {
2456
+ super(msg);
2457
+ this.name = "FetchError";
2458
+ }
2459
+ }
2460
+
2461
+ class CliVersionError extends Error {
2462
+ constructor(msg) {
2463
+ super(msg);
2464
+ this.name = "CliVersionError";
2465
+ }
2466
+ }
2467
+
2468
+ class ConfigVersionError extends Error {
2469
+ constructor(msg) {
2470
+ super(msg);
2471
+ this.name = "ConfigVersionError";
2472
+ }
2473
+ }
2474
+ function loadFallback() {
2475
+ return fallback_config_default;
2476
+ }
2477
+ async function fetchRemoteConfig(configUrl, fresh = false) {
2478
+ if (!fresh && cache && Date.now() < cache.expiresAt) {
2479
+ return cache.data;
2480
+ }
2481
+ try {
2482
+ const res = await fetch(configUrl);
2483
+ if (!res.ok)
2484
+ throw new Error(`HTTP ${res.status}`);
2485
+ const data = await res.json();
2486
+ cache = { data, expiresAt: Date.now() + CACHE_TTL_MS };
2487
+ return data;
2488
+ } catch (e2) {
2489
+ if (fresh) {
2490
+ throw new FetchError(`Could not fetch remote config: ${e2.message}`);
2491
+ }
2492
+ return loadFallback();
2493
+ }
2494
+ }
2495
+ function checkCliVersion(remoteMeta) {
2496
+ const current = process.env.DAAS_CLI_VERSION ?? "0.0.0";
2497
+ if (!meetsMinVersion(current, remoteMeta.minCliVersion)) {
2498
+ throw new CliVersionError(`daas-cli ${current} is below required ${remoteMeta.minCliVersion}. See: ${remoteMeta.releaseNotesUrl}`);
2499
+ }
2500
+ }
2501
+ function checkConfigVersion(remoteMeta, fatal) {
2502
+ if (remoteMeta.rsbuildConfigVersion !== SUPPORTED_CONFIG_VERSION) {
2503
+ const msg = "Config version mismatch \u2014 update daas-cli for full compatibility";
2504
+ if (fatal)
2505
+ throw new ConfigVersionError(msg);
2506
+ return false;
2507
+ }
2508
+ return true;
2509
+ }
2510
+ function meetsMinVersion(current, min) {
2511
+ const parse = (v2) => v2.split(".").map(Number);
2512
+ const [cMaj, cMin, cPatch] = parse(current);
2513
+ const [mMaj, mMin, mPatch] = parse(min);
2514
+ if (cMaj !== mMaj)
2515
+ return cMaj > mMaj;
2516
+ if (cMin !== mMin)
2517
+ return cMin > mMin;
2518
+ return cPatch >= mPatch;
2519
+ }
2520
+
2521
+ // src/output.ts
2522
+ function formatSuccess(command, data) {
2523
+ return { ok: true, command, cliVersion: getCliVersion(), ...data };
2524
+ }
2525
+ function formatError(command, exitCode, error, suggestion) {
2526
+ return { ok: false, command, exitCode, error, suggestion, cliVersion: getCliVersion() };
2527
+ }
2528
+ function writeJsonSuccess(command, data) {
2529
+ process.stdout.write(JSON.stringify(formatSuccess(command, data)) + `
2530
+ `);
2531
+ }
2532
+ function writeJsonError(command, exitCode, error, suggestion) {
2533
+ process.stdout.write(JSON.stringify(formatError(command, exitCode, error, suggestion)) + `
2534
+ `);
2535
+ process.exit(exitCode);
2536
+ }
2537
+ function getCliVersion() {
2538
+ return process.env.DAAS_CLI_VERSION ?? "0.0.0";
2539
+ }
2540
+
2541
+ // src/types.ts
2542
+ var EXIT_CODES = {
2543
+ SUCCESS: 0,
2544
+ GENERAL_ERROR: 1,
2545
+ CONFIG_ERROR: 2,
2546
+ CLI_TOO_OLD: 3,
2547
+ REMOTE_FETCH_FAILED: 4,
2548
+ CONFIG_VERSION_MISMATCH: 5
2549
+ };
2550
+
2551
+ // src/commands/dev.ts
2552
+ var devCommand = defineCommand({
2553
+ meta: { name: "dev", description: "Start MFE dev server" },
2554
+ args: {
2555
+ port: { type: "string", description: "Override dev server port" },
2556
+ json: { type: "boolean", default: false, description: "Machine-readable JSON output" }
2557
+ },
2558
+ async run({ args }) {
2559
+ try {
2560
+ const daasConfig = readDaasConfig();
2561
+ const manifest = readManifest();
2562
+ const remoteMeta = await fetchRemoteConfig(daasConfig.configUrl, false);
2563
+ checkCliVersion(remoteMeta);
2564
+ const versionOk = checkConfigVersion(remoteMeta, false);
2565
+ if (!versionOk) {
2566
+ consola.warn("Config version mismatch \u2014 update daas-cli for full compatibility");
2567
+ }
2568
+ const port = args.port ? Number(args.port) : daasConfig.port;
2569
+ const config = createConfig(manifest, remoteMeta, { mode: "development", port });
2570
+ consola.start(`Starting ${manifest.name} dev server...`);
2571
+ const rsbuild = await createRsbuild({ rsbuildConfig: config });
2572
+ const server = await rsbuild.createDevServer();
2573
+ await server.listen();
2574
+ consola.success(`Ready on http://localhost:${port}`);
2575
+ } catch (e2) {
2576
+ handleError("dev", e2, args.json);
2577
+ }
2578
+ }
2579
+ });
2580
+ function handleError(command, e2, json) {
2581
+ if (e2 instanceof CliVersionError) {
2582
+ if (json)
2583
+ writeJsonError(command, EXIT_CODES.CLI_TOO_OLD, e2.message, "Update daas-cli to the required version.");
2584
+ consola.fatal(e2.message);
2585
+ process.exit(EXIT_CODES.CLI_TOO_OLD);
2586
+ }
2587
+ if (e2 instanceof FetchError) {
2588
+ if (json)
2589
+ writeJsonError(command, EXIT_CODES.REMOTE_FETCH_FAILED, e2.message, "Check network or VPN.");
2590
+ consola.warn(`Remote config unavailable \u2014 using fallback. ${e2.message}`);
2591
+ process.exit(EXIT_CODES.REMOTE_FETCH_FAILED);
2592
+ }
2593
+ if (e2 instanceof ConfigError || e2 instanceof ManifestError) {
2594
+ if (json)
2595
+ writeJsonError(command, EXIT_CODES.CONFIG_ERROR, e2.message, "Run daas init first.");
2596
+ consola.fatal(e2.message);
2597
+ process.exit(EXIT_CODES.CONFIG_ERROR);
2598
+ }
2599
+ consola.fatal(e2);
2600
+ process.exit(EXIT_CODES.GENERAL_ERROR);
2601
+ }
2602
+
2603
+ // src/commands/build.ts
2604
+ import { createRsbuild as createRsbuild2 } from "@rsbuild/core";
2605
+ var buildCommand = defineCommand({
2606
+ meta: { name: "build", description: "Build MFE for production" },
2607
+ args: {
2608
+ json: { type: "boolean", default: false, description: "Machine-readable JSON output" }
2609
+ },
2610
+ async run({ args }) {
2611
+ const json = args.json;
2612
+ try {
2613
+ const daasConfig = readDaasConfig();
2614
+ const manifest = readManifest();
2615
+ if (!json)
2616
+ consola.start(`Building ${manifest.name}...`);
2617
+ const remoteMeta = await fetchRemoteConfig(daasConfig.configUrl, true);
2618
+ checkCliVersion(remoteMeta);
2619
+ checkConfigVersion(remoteMeta, true);
2620
+ const config = createConfig(manifest, remoteMeta, { mode: "production" });
2621
+ const rsbuild = await createRsbuild2({ rsbuildConfig: config });
2622
+ await rsbuild.build();
2623
+ if (json)
2624
+ writeJsonSuccess("build", { appName: manifest.name, output: "./dist" });
2625
+ consola.success("Built to ./dist");
2626
+ } catch (e2) {
2627
+ if (e2 instanceof CliVersionError) {
2628
+ if (json)
2629
+ writeJsonError("build", EXIT_CODES.CLI_TOO_OLD, e2.message, "Update daas-cli.");
2630
+ consola.fatal(e2.message);
2631
+ process.exit(EXIT_CODES.CLI_TOO_OLD);
2632
+ }
2633
+ if (e2 instanceof FetchError) {
2634
+ if (json)
2635
+ writeJsonError("build", EXIT_CODES.REMOTE_FETCH_FAILED, e2.message, "Check network connectivity or VPN.");
2636
+ consola.fatal(e2.message);
2637
+ process.exit(EXIT_CODES.REMOTE_FETCH_FAILED);
2638
+ }
2639
+ if (e2 instanceof ConfigVersionError) {
2640
+ if (json)
2641
+ writeJsonError("build", EXIT_CODES.CONFIG_VERSION_MISMATCH, e2.message, "Update daas-cli.");
2642
+ consola.fatal(e2.message);
2643
+ process.exit(EXIT_CODES.CONFIG_VERSION_MISMATCH);
2644
+ }
2645
+ if (e2 instanceof ConfigError || e2 instanceof ManifestError) {
2646
+ if (json)
2647
+ writeJsonError("build", EXIT_CODES.CONFIG_ERROR, e2.message, "Run daas init first.");
2648
+ consola.fatal(e2.message);
2649
+ process.exit(EXIT_CODES.CONFIG_ERROR);
2650
+ }
2651
+ consola.fatal(e2);
2652
+ process.exit(EXIT_CODES.GENERAL_ERROR);
2653
+ }
2654
+ }
2655
+ });
2656
+
2657
+ // src/commands/test.ts
2658
+ import { startVitest } from "vitest/node";
2659
+
2660
+ // ../rsbuild-config/dist/vitest.js
2661
+ import { resolve as resolve3, dirname } from "path";
2662
+ import { fileURLToPath } from "url";
2663
+ var __dirname2 = dirname(fileURLToPath(import.meta.url));
2664
+ function createVitestConfig(manifest, options = {}) {
2665
+ return {
2666
+ test: {
2667
+ name: manifest.name,
2668
+ environment: "happy-dom",
2669
+ setupFiles: [resolve3(__dirname2, "test-setup.js")],
2670
+ coverage: {
2671
+ provider: "v8",
2672
+ reporter: ["text", "lcov"],
2673
+ thresholds: options.coverage ?? undefined
2674
+ }
2675
+ }
2676
+ };
2677
+ }
2678
+
2679
+ // src/commands/test.ts
2680
+ var testCommand = defineCommand({
2681
+ meta: { name: "test", description: "Run MFE tests" },
2682
+ args: {
2683
+ json: { type: "boolean", default: false, description: "Machine-readable JSON output" }
2684
+ },
2685
+ async run({ args }) {
2686
+ const json = args.json;
2687
+ try {
2688
+ const manifest = readManifest();
2689
+ const daasConfig = readDaasConfig();
2690
+ const config = createVitestConfig(manifest, { coverage: daasConfig.coverage });
2691
+ const vitest = await startVitest("test", [], config);
2692
+ const failed = vitest?.state.getFiles().some((f3) => f3.result?.state === "fail") ?? false;
2693
+ if (json) {
2694
+ if (failed)
2695
+ writeJsonError("test", EXIT_CODES.GENERAL_ERROR, "Tests failed", "Check test output above");
2696
+ writeJsonSuccess("test", { appName: manifest.name, passed: !failed });
2697
+ }
2698
+ if (failed)
2699
+ process.exit(EXIT_CODES.GENERAL_ERROR);
2700
+ } catch (e2) {
2701
+ if (json)
2702
+ writeJsonError("test", EXIT_CODES.GENERAL_ERROR, e2.message, "Check test configuration");
2703
+ consola.fatal(e2);
2704
+ process.exit(EXIT_CODES.GENERAL_ERROR);
2705
+ }
2706
+ }
2707
+ });
2708
+
2709
+ // src/init/monorepo.ts
2710
+ import { existsSync as existsSync3, readFileSync as readFileSync3 } from "fs";
2711
+ import { resolve as resolve4, dirname as dirname2 } from "path";
2712
+ function detectMonorepo(startDir) {
2713
+ let dir = startDir;
2714
+ for (let i2 = 0;i2 < 10; i2++) {
2715
+ const parent = dirname2(dir);
2716
+ if (parent === dir)
2717
+ break;
2718
+ dir = parent;
2719
+ if (existsSync3(resolve4(dir, "bun.lockb")))
2720
+ return true;
2721
+ const pkgPath = resolve4(dir, "package.json");
2722
+ if (existsSync3(pkgPath)) {
2723
+ try {
2724
+ const pkg = JSON.parse(readFileSync3(pkgPath, "utf8"));
2725
+ if (pkg.workspaces)
2726
+ return true;
2727
+ } catch {}
2728
+ }
2729
+ }
2730
+ return false;
2731
+ }
2732
+
2733
+ // src/commands/info.ts
2734
+ var infoCommand = defineCommand({
2735
+ meta: { name: "info", description: "Show resolved MFE project state" },
2736
+ args: {
2737
+ json: { type: "boolean", default: false, description: "Machine-readable JSON output" }
2738
+ },
2739
+ async run({ args }) {
2740
+ const json = args.json;
2741
+ let daasConfig;
2742
+ let manifest;
2743
+ try {
2744
+ daasConfig = readDaasConfig();
2745
+ manifest = readManifest();
2746
+ } catch (e2) {
2747
+ if (json)
2748
+ writeJsonError("info", EXIT_CODES.CONFIG_ERROR, e2.message, "Run daas init first.");
2749
+ consola.fatal(e2.message);
2750
+ process.exit(EXIT_CODES.CONFIG_ERROR);
2751
+ }
2752
+ const isMonorepo = detectMonorepo(process.cwd());
2753
+ let remoteJson;
2754
+ try {
2755
+ remoteJson = await fetchRemoteConfig(daasConfig.configUrl, true);
2756
+ } catch {
2757
+ remoteJson = { ...loadFallback(), offline: true };
2758
+ }
2759
+ const payload = {
2760
+ appName: manifest.name,
2761
+ port: daasConfig.port,
2762
+ configUrl: daasConfig.configUrl,
2763
+ manifest,
2764
+ remoteJson,
2765
+ isMonorepo
2766
+ };
2767
+ if (json) {
2768
+ writeJsonSuccess("info", payload);
2769
+ return;
2770
+ }
2771
+ consola.box(JSON.stringify(payload, null, 2));
2772
+ }
2773
+ });
2774
+
2775
+ // ../../node_modules/.bun/@clack+core@0.3.5/node_modules/@clack/core/dist/index.mjs
2776
+ var import_sisteransi = __toESM(require_src(), 1);
2777
+ var import_picocolors = __toESM(require_picocolors(), 1);
2778
+ import { stdin as $, stdout as k2 } from "process";
2779
+ import * as f3 from "readline";
2780
+ import _3 from "readline";
2781
+ import { WriteStream as U } from "tty";
2782
+ function q2({ onlyFirst: e2 = false } = {}) {
2783
+ const F3 = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
2784
+ return new RegExp(F3, e2 ? undefined : "g");
2785
+ }
2786
+ var J2 = q2();
2787
+ function S3(e2) {
2788
+ if (typeof e2 != "string")
2789
+ throw new TypeError(`Expected a \`string\`, got \`${typeof e2}\``);
2790
+ return e2.replace(J2, "");
2791
+ }
2792
+ function T3(e2) {
2793
+ return e2 && e2.__esModule && Object.prototype.hasOwnProperty.call(e2, "default") ? e2.default : e2;
2794
+ }
2795
+ var j = { exports: {} };
2796
+ (function(e2) {
2797
+ var u3 = {};
2798
+ e2.exports = u3, u3.eastAsianWidth = function(t2) {
2799
+ var s2 = t2.charCodeAt(0), C3 = t2.length == 2 ? t2.charCodeAt(1) : 0, D2 = s2;
2800
+ return 55296 <= s2 && s2 <= 56319 && 56320 <= C3 && C3 <= 57343 && (s2 &= 1023, C3 &= 1023, D2 = s2 << 10 | C3, D2 += 65536), D2 == 12288 || 65281 <= D2 && D2 <= 65376 || 65504 <= D2 && D2 <= 65510 ? "F" : D2 == 8361 || 65377 <= D2 && D2 <= 65470 || 65474 <= D2 && D2 <= 65479 || 65482 <= D2 && D2 <= 65487 || 65490 <= D2 && D2 <= 65495 || 65498 <= D2 && D2 <= 65500 || 65512 <= D2 && D2 <= 65518 ? "H" : 4352 <= D2 && D2 <= 4447 || 4515 <= D2 && D2 <= 4519 || 4602 <= D2 && D2 <= 4607 || 9001 <= D2 && D2 <= 9002 || 11904 <= D2 && D2 <= 11929 || 11931 <= D2 && D2 <= 12019 || 12032 <= D2 && D2 <= 12245 || 12272 <= D2 && D2 <= 12283 || 12289 <= D2 && D2 <= 12350 || 12353 <= D2 && D2 <= 12438 || 12441 <= D2 && D2 <= 12543 || 12549 <= D2 && D2 <= 12589 || 12593 <= D2 && D2 <= 12686 || 12688 <= D2 && D2 <= 12730 || 12736 <= D2 && D2 <= 12771 || 12784 <= D2 && D2 <= 12830 || 12832 <= D2 && D2 <= 12871 || 12880 <= D2 && D2 <= 13054 || 13056 <= D2 && D2 <= 19903 || 19968 <= D2 && D2 <= 42124 || 42128 <= D2 && D2 <= 42182 || 43360 <= D2 && D2 <= 43388 || 44032 <= D2 && D2 <= 55203 || 55216 <= D2 && D2 <= 55238 || 55243 <= D2 && D2 <= 55291 || 63744 <= D2 && D2 <= 64255 || 65040 <= D2 && D2 <= 65049 || 65072 <= D2 && D2 <= 65106 || 65108 <= D2 && D2 <= 65126 || 65128 <= D2 && D2 <= 65131 || 110592 <= D2 && D2 <= 110593 || 127488 <= D2 && D2 <= 127490 || 127504 <= D2 && D2 <= 127546 || 127552 <= D2 && D2 <= 127560 || 127568 <= D2 && D2 <= 127569 || 131072 <= D2 && D2 <= 194367 || 177984 <= D2 && D2 <= 196605 || 196608 <= D2 && D2 <= 262141 ? "W" : 32 <= D2 && D2 <= 126 || 162 <= D2 && D2 <= 163 || 165 <= D2 && D2 <= 166 || D2 == 172 || D2 == 175 || 10214 <= D2 && D2 <= 10221 || 10629 <= D2 && D2 <= 10630 ? "Na" : D2 == 161 || D2 == 164 || 167 <= D2 && D2 <= 168 || D2 == 170 || 173 <= D2 && D2 <= 174 || 176 <= D2 && D2 <= 180 || 182 <= D2 && D2 <= 186 || 188 <= D2 && D2 <= 191 || D2 == 198 || D2 == 208 || 215 <= D2 && D2 <= 216 || 222 <= D2 && D2 <= 225 || D2 == 230 || 232 <= D2 && D2 <= 234 || 236 <= D2 && D2 <= 237 || D2 == 240 || 242 <= D2 && D2 <= 243 || 247 <= D2 && D2 <= 250 || D2 == 252 || D2 == 254 || D2 == 257 || D2 == 273 || D2 == 275 || D2 == 283 || 294 <= D2 && D2 <= 295 || D2 == 299 || 305 <= D2 && D2 <= 307 || D2 == 312 || 319 <= D2 && D2 <= 322 || D2 == 324 || 328 <= D2 && D2 <= 331 || D2 == 333 || 338 <= D2 && D2 <= 339 || 358 <= D2 && D2 <= 359 || D2 == 363 || D2 == 462 || D2 == 464 || D2 == 466 || D2 == 468 || D2 == 470 || D2 == 472 || D2 == 474 || D2 == 476 || D2 == 593 || D2 == 609 || D2 == 708 || D2 == 711 || 713 <= D2 && D2 <= 715 || D2 == 717 || D2 == 720 || 728 <= D2 && D2 <= 731 || D2 == 733 || D2 == 735 || 768 <= D2 && D2 <= 879 || 913 <= D2 && D2 <= 929 || 931 <= D2 && D2 <= 937 || 945 <= D2 && D2 <= 961 || 963 <= D2 && D2 <= 969 || D2 == 1025 || 1040 <= D2 && D2 <= 1103 || D2 == 1105 || D2 == 8208 || 8211 <= D2 && D2 <= 8214 || 8216 <= D2 && D2 <= 8217 || 8220 <= D2 && D2 <= 8221 || 8224 <= D2 && D2 <= 8226 || 8228 <= D2 && D2 <= 8231 || D2 == 8240 || 8242 <= D2 && D2 <= 8243 || D2 == 8245 || D2 == 8251 || D2 == 8254 || D2 == 8308 || D2 == 8319 || 8321 <= D2 && D2 <= 8324 || D2 == 8364 || D2 == 8451 || D2 == 8453 || D2 == 8457 || D2 == 8467 || D2 == 8470 || 8481 <= D2 && D2 <= 8482 || D2 == 8486 || D2 == 8491 || 8531 <= D2 && D2 <= 8532 || 8539 <= D2 && D2 <= 8542 || 8544 <= D2 && D2 <= 8555 || 8560 <= D2 && D2 <= 8569 || D2 == 8585 || 8592 <= D2 && D2 <= 8601 || 8632 <= D2 && D2 <= 8633 || D2 == 8658 || D2 == 8660 || D2 == 8679 || D2 == 8704 || 8706 <= D2 && D2 <= 8707 || 8711 <= D2 && D2 <= 8712 || D2 == 8715 || D2 == 8719 || D2 == 8721 || D2 == 8725 || D2 == 8730 || 8733 <= D2 && D2 <= 8736 || D2 == 8739 || D2 == 8741 || 8743 <= D2 && D2 <= 8748 || D2 == 8750 || 8756 <= D2 && D2 <= 8759 || 8764 <= D2 && D2 <= 8765 || D2 == 8776 || D2 == 8780 || D2 == 8786 || 8800 <= D2 && D2 <= 8801 || 8804 <= D2 && D2 <= 8807 || 8810 <= D2 && D2 <= 8811 || 8814 <= D2 && D2 <= 8815 || 8834 <= D2 && D2 <= 8835 || 8838 <= D2 && D2 <= 8839 || D2 == 8853 || D2 == 8857 || D2 == 8869 || D2 == 8895 || D2 == 8978 || 9312 <= D2 && D2 <= 9449 || 9451 <= D2 && D2 <= 9547 || 9552 <= D2 && D2 <= 9587 || 9600 <= D2 && D2 <= 9615 || 9618 <= D2 && D2 <= 9621 || 9632 <= D2 && D2 <= 9633 || 9635 <= D2 && D2 <= 9641 || 9650 <= D2 && D2 <= 9651 || 9654 <= D2 && D2 <= 9655 || 9660 <= D2 && D2 <= 9661 || 9664 <= D2 && D2 <= 9665 || 9670 <= D2 && D2 <= 9672 || D2 == 9675 || 9678 <= D2 && D2 <= 9681 || 9698 <= D2 && D2 <= 9701 || D2 == 9711 || 9733 <= D2 && D2 <= 9734 || D2 == 9737 || 9742 <= D2 && D2 <= 9743 || 9748 <= D2 && D2 <= 9749 || D2 == 9756 || D2 == 9758 || D2 == 9792 || D2 == 9794 || 9824 <= D2 && D2 <= 9825 || 9827 <= D2 && D2 <= 9829 || 9831 <= D2 && D2 <= 9834 || 9836 <= D2 && D2 <= 9837 || D2 == 9839 || 9886 <= D2 && D2 <= 9887 || 9918 <= D2 && D2 <= 9919 || 9924 <= D2 && D2 <= 9933 || 9935 <= D2 && D2 <= 9953 || D2 == 9955 || 9960 <= D2 && D2 <= 9983 || D2 == 10045 || D2 == 10071 || 10102 <= D2 && D2 <= 10111 || 11093 <= D2 && D2 <= 11097 || 12872 <= D2 && D2 <= 12879 || 57344 <= D2 && D2 <= 63743 || 65024 <= D2 && D2 <= 65039 || D2 == 65533 || 127232 <= D2 && D2 <= 127242 || 127248 <= D2 && D2 <= 127277 || 127280 <= D2 && D2 <= 127337 || 127344 <= D2 && D2 <= 127386 || 917760 <= D2 && D2 <= 917999 || 983040 <= D2 && D2 <= 1048573 || 1048576 <= D2 && D2 <= 1114109 ? "A" : "N";
2801
+ }, u3.characterLength = function(t2) {
2802
+ var s2 = this.eastAsianWidth(t2);
2803
+ return s2 == "F" || s2 == "W" || s2 == "A" ? 2 : 1;
2804
+ };
2805
+ function F3(t2) {
2806
+ return t2.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
2807
+ }
2808
+ u3.length = function(t2) {
2809
+ for (var s2 = F3(t2), C3 = 0, D2 = 0;D2 < s2.length; D2++)
2810
+ C3 = C3 + this.characterLength(s2[D2]);
2811
+ return C3;
2812
+ }, u3.slice = function(t2, s2, C3) {
2813
+ textLen = u3.length(t2), s2 = s2 || 0, C3 = C3 || 1, s2 < 0 && (s2 = textLen + s2), C3 < 0 && (C3 = textLen + C3);
2814
+ for (var D2 = "", i2 = 0, n2 = F3(t2), E = 0;E < n2.length; E++) {
2815
+ var h2 = n2[E], o3 = u3.length(h2);
2816
+ if (i2 >= s2 - (o3 == 2 ? 1 : 0))
2817
+ if (i2 + o3 <= C3)
2818
+ D2 += h2;
2819
+ else
2820
+ break;
2821
+ i2 += o3;
2822
+ }
2823
+ return D2;
2824
+ };
2825
+ })(j);
2826
+ var Q2 = j.exports;
2827
+ var X2 = T3(Q2);
2828
+ var DD2 = function() {
2829
+ return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\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])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\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\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\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-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*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\u26A7\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-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\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[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
2830
+ };
2831
+ var uD2 = T3(DD2);
2832
+ function A3(e2, u3 = {}) {
2833
+ if (typeof e2 != "string" || e2.length === 0 || (u3 = { ambiguousIsNarrow: true, ...u3 }, e2 = S3(e2), e2.length === 0))
2834
+ return 0;
2835
+ e2 = e2.replace(uD2(), " ");
2836
+ const F3 = u3.ambiguousIsNarrow ? 1 : 2;
2837
+ let t2 = 0;
2838
+ for (const s2 of e2) {
2839
+ const C3 = s2.codePointAt(0);
2840
+ if (C3 <= 31 || C3 >= 127 && C3 <= 159 || C3 >= 768 && C3 <= 879)
2841
+ continue;
2842
+ switch (X2.eastAsianWidth(s2)) {
2843
+ case "F":
2844
+ case "W":
2845
+ t2 += 2;
2846
+ break;
2847
+ case "A":
2848
+ t2 += F3;
2849
+ break;
2850
+ default:
2851
+ t2 += 1;
2852
+ }
2853
+ }
2854
+ return t2;
2855
+ }
2856
+ var d2 = 10;
2857
+ var M = (e2 = 0) => (u3) => `\x1B[${u3 + e2}m`;
2858
+ var P3 = (e2 = 0) => (u3) => `\x1B[${38 + e2};5;${u3}m`;
2859
+ var W2 = (e2 = 0) => (u3, F3, t2) => `\x1B[${38 + e2};2;${u3};${F3};${t2}m`;
2860
+ var r3 = { 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] } };
2861
+ Object.keys(r3.modifier);
2862
+ var FD2 = Object.keys(r3.color);
2863
+ var eD2 = Object.keys(r3.bgColor);
2864
+ [...FD2, ...eD2];
2865
+ function tD2() {
2866
+ const e2 = new Map;
2867
+ for (const [u3, F3] of Object.entries(r3)) {
2868
+ for (const [t2, s2] of Object.entries(F3))
2869
+ r3[t2] = { open: `\x1B[${s2[0]}m`, close: `\x1B[${s2[1]}m` }, F3[t2] = r3[t2], e2.set(s2[0], s2[1]);
2870
+ Object.defineProperty(r3, u3, { value: F3, enumerable: false });
2871
+ }
2872
+ return Object.defineProperty(r3, "codes", { value: e2, enumerable: false }), r3.color.close = "\x1B[39m", r3.bgColor.close = "\x1B[49m", r3.color.ansi = M(), r3.color.ansi256 = P3(), r3.color.ansi16m = W2(), r3.bgColor.ansi = M(d2), r3.bgColor.ansi256 = P3(d2), r3.bgColor.ansi16m = W2(d2), Object.defineProperties(r3, { rgbToAnsi256: { value: (u3, F3, t2) => u3 === F3 && F3 === t2 ? u3 < 8 ? 16 : u3 > 248 ? 231 : Math.round((u3 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u3 / 255 * 5) + 6 * Math.round(F3 / 255 * 5) + Math.round(t2 / 255 * 5), enumerable: false }, hexToRgb: { value: (u3) => {
2873
+ const F3 = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u3.toString(16));
2874
+ if (!F3)
2875
+ return [0, 0, 0];
2876
+ let [t2] = F3;
2877
+ t2.length === 3 && (t2 = [...t2].map((C3) => C3 + C3).join(""));
2878
+ const s2 = Number.parseInt(t2, 16);
2879
+ return [s2 >> 16 & 255, s2 >> 8 & 255, s2 & 255];
2880
+ }, enumerable: false }, hexToAnsi256: { value: (u3) => r3.rgbToAnsi256(...r3.hexToRgb(u3)), enumerable: false }, ansi256ToAnsi: { value: (u3) => {
2881
+ if (u3 < 8)
2882
+ return 30 + u3;
2883
+ if (u3 < 16)
2884
+ return 90 + (u3 - 8);
2885
+ let F3, t2, s2;
2886
+ if (u3 >= 232)
2887
+ F3 = ((u3 - 232) * 10 + 8) / 255, t2 = F3, s2 = F3;
2888
+ else {
2889
+ u3 -= 16;
2890
+ const i2 = u3 % 36;
2891
+ F3 = Math.floor(u3 / 36) / 5, t2 = Math.floor(i2 / 6) / 5, s2 = i2 % 6 / 5;
2892
+ }
2893
+ const C3 = Math.max(F3, t2, s2) * 2;
2894
+ if (C3 === 0)
2895
+ return 30;
2896
+ let D2 = 30 + (Math.round(s2) << 2 | Math.round(t2) << 1 | Math.round(F3));
2897
+ return C3 === 2 && (D2 += 60), D2;
2898
+ }, enumerable: false }, rgbToAnsi: { value: (u3, F3, t2) => r3.ansi256ToAnsi(r3.rgbToAnsi256(u3, F3, t2)), enumerable: false }, hexToAnsi: { value: (u3) => r3.ansi256ToAnsi(r3.hexToAnsi256(u3)), enumerable: false } }), r3;
2899
+ }
2900
+ var sD2 = tD2();
2901
+ var g3 = new Set(["\x1B", "\x9B"]);
2902
+ var CD2 = 39;
2903
+ var b2 = "\x07";
2904
+ var O3 = "[";
2905
+ var iD2 = "]";
2906
+ var I3 = "m";
2907
+ var w2 = `${iD2}8;;`;
2908
+ var N3 = (e2) => `${g3.values().next().value}${O3}${e2}${I3}`;
2909
+ var L3 = (e2) => `${g3.values().next().value}${w2}${e2}${b2}`;
2910
+ var rD2 = (e2) => e2.split(" ").map((u3) => A3(u3));
2911
+ var y3 = (e2, u3, F3) => {
2912
+ const t2 = [...u3];
2913
+ let s2 = false, C3 = false, D2 = A3(S3(e2[e2.length - 1]));
2914
+ for (const [i2, n2] of t2.entries()) {
2915
+ const E = A3(n2);
2916
+ if (D2 + E <= F3 ? e2[e2.length - 1] += n2 : (e2.push(n2), D2 = 0), g3.has(n2) && (s2 = true, C3 = t2.slice(i2 + 1).join("").startsWith(w2)), s2) {
2917
+ C3 ? n2 === b2 && (s2 = false, C3 = false) : n2 === I3 && (s2 = false);
2918
+ continue;
2919
+ }
2920
+ D2 += E, D2 === F3 && i2 < t2.length - 1 && (e2.push(""), D2 = 0);
2921
+ }
2922
+ !D2 && e2[e2.length - 1].length > 0 && e2.length > 1 && (e2[e2.length - 2] += e2.pop());
2923
+ };
2924
+ var ED2 = (e2) => {
2925
+ const u3 = e2.split(" ");
2926
+ let F3 = u3.length;
2927
+ for (;F3 > 0 && !(A3(u3[F3 - 1]) > 0); )
2928
+ F3--;
2929
+ return F3 === u3.length ? e2 : u3.slice(0, F3).join(" ") + u3.slice(F3).join("");
2930
+ };
2931
+ var oD2 = (e2, u3, F3 = {}) => {
2932
+ if (F3.trim !== false && e2.trim() === "")
2933
+ return "";
2934
+ let t2 = "", s2, C3;
2935
+ const D2 = rD2(e2);
2936
+ let i2 = [""];
2937
+ for (const [E, h2] of e2.split(" ").entries()) {
2938
+ F3.trim !== false && (i2[i2.length - 1] = i2[i2.length - 1].trimStart());
2939
+ let o3 = A3(i2[i2.length - 1]);
2940
+ if (E !== 0 && (o3 >= u3 && (F3.wordWrap === false || F3.trim === false) && (i2.push(""), o3 = 0), (o3 > 0 || F3.trim === false) && (i2[i2.length - 1] += " ", o3++)), F3.hard && D2[E] > u3) {
2941
+ const B2 = u3 - o3, p = 1 + Math.floor((D2[E] - B2 - 1) / u3);
2942
+ Math.floor((D2[E] - 1) / u3) < p && i2.push(""), y3(i2, h2, u3);
2943
+ continue;
2944
+ }
2945
+ if (o3 + D2[E] > u3 && o3 > 0 && D2[E] > 0) {
2946
+ if (F3.wordWrap === false && o3 < u3) {
2947
+ y3(i2, h2, u3);
2948
+ continue;
2949
+ }
2950
+ i2.push("");
2951
+ }
2952
+ if (o3 + D2[E] > u3 && F3.wordWrap === false) {
2953
+ y3(i2, h2, u3);
2954
+ continue;
2955
+ }
2956
+ i2[i2.length - 1] += h2;
2957
+ }
2958
+ F3.trim !== false && (i2 = i2.map((E) => ED2(E)));
2959
+ const n2 = [...i2.join(`
2960
+ `)];
2961
+ for (const [E, h2] of n2.entries()) {
2962
+ if (t2 += h2, g3.has(h2)) {
2963
+ const { groups: B2 } = new RegExp(`(?:\\${O3}(?<code>\\d+)m|\\${w2}(?<uri>.*)${b2})`).exec(n2.slice(E).join("")) || { groups: {} };
2964
+ if (B2.code !== undefined) {
2965
+ const p = Number.parseFloat(B2.code);
2966
+ s2 = p === CD2 ? undefined : p;
2967
+ } else
2968
+ B2.uri !== undefined && (C3 = B2.uri.length === 0 ? undefined : B2.uri);
2969
+ }
2970
+ const o3 = sD2.codes.get(Number(s2));
2971
+ n2[E + 1] === `
2972
+ ` ? (C3 && (t2 += L3("")), s2 && o3 && (t2 += N3(o3))) : h2 === `
2973
+ ` && (s2 && o3 && (t2 += N3(s2)), C3 && (t2 += L3(C3)));
2974
+ }
2975
+ return t2;
2976
+ };
2977
+ function R3(e2, u3, F3) {
2978
+ return String(e2).normalize().replace(/\r\n/g, `
2979
+ `).split(`
2980
+ `).map((t2) => oD2(t2, u3, F3)).join(`
2981
+ `);
2982
+ }
2983
+ var nD2 = Object.defineProperty;
2984
+ var aD2 = (e2, u3, F3) => (u3 in e2) ? nD2(e2, u3, { enumerable: true, configurable: true, writable: true, value: F3 }) : e2[u3] = F3;
2985
+ var a2 = (e2, u3, F3) => (aD2(e2, typeof u3 != "symbol" ? u3 + "" : u3, F3), F3);
2986
+ function hD(e2, u3) {
2987
+ if (e2 === u3)
2988
+ return;
2989
+ const F3 = e2.split(`
2990
+ `), t2 = u3.split(`
2991
+ `), s2 = [];
2992
+ for (let C3 = 0;C3 < Math.max(F3.length, t2.length); C3++)
2993
+ F3[C3] !== t2[C3] && s2.push(C3);
2994
+ return s2;
2995
+ }
2996
+ var V2 = Symbol("clack:cancel");
2997
+ function v2(e2, u3) {
2998
+ e2.isTTY && e2.setRawMode(u3);
2999
+ }
3000
+ var z2 = new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"]]);
3001
+ var xD = new Set(["up", "down", "left", "right", "space", "enter"]);
3002
+
3003
+ class x2 {
3004
+ constructor({ render: u3, input: F3 = $, output: t2 = k2, ...s2 }, C3 = true) {
3005
+ a2(this, "input"), a2(this, "output"), a2(this, "rl"), a2(this, "opts"), a2(this, "_track", false), a2(this, "_render"), a2(this, "_cursor", 0), a2(this, "state", "initial"), a2(this, "value"), a2(this, "error", ""), a2(this, "subscribers", new Map), a2(this, "_prevFrame", ""), this.opts = s2, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = u3.bind(this), this._track = C3, this.input = F3, this.output = t2;
3006
+ }
3007
+ prompt() {
3008
+ const u3 = new U(0);
3009
+ return u3._write = (F3, t2, s2) => {
3010
+ this._track && (this.value = this.rl.line.replace(/\t/g, ""), this._cursor = this.rl.cursor, this.emit("value", this.value)), s2();
3011
+ }, this.input.pipe(u3), this.rl = _3.createInterface({ input: this.input, output: u3, tabSize: 2, prompt: "", escapeCodeTimeout: 50 }), _3.emitKeypressEvents(this.input, this.rl), this.rl.prompt(), this.opts.initialValue !== undefined && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), v2(this.input, true), this.output.on("resize", this.render), this.render(), new Promise((F3, t2) => {
3012
+ this.once("submit", () => {
3013
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), v2(this.input, false), F3(this.value);
3014
+ }), this.once("cancel", () => {
3015
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), v2(this.input, false), F3(V2);
3016
+ });
3017
+ });
3018
+ }
3019
+ on(u3, F3) {
3020
+ const t2 = this.subscribers.get(u3) ?? [];
3021
+ t2.push({ cb: F3 }), this.subscribers.set(u3, t2);
3022
+ }
3023
+ once(u3, F3) {
3024
+ const t2 = this.subscribers.get(u3) ?? [];
3025
+ t2.push({ cb: F3, once: true }), this.subscribers.set(u3, t2);
3026
+ }
3027
+ emit(u3, ...F3) {
3028
+ const t2 = this.subscribers.get(u3) ?? [], s2 = [];
3029
+ for (const C3 of t2)
3030
+ C3.cb(...F3), C3.once && s2.push(() => t2.splice(t2.indexOf(C3), 1));
3031
+ for (const C3 of s2)
3032
+ C3();
3033
+ }
3034
+ unsubscribe() {
3035
+ this.subscribers.clear();
3036
+ }
3037
+ onKeypress(u3, F3) {
3038
+ if (this.state === "error" && (this.state = "active"), F3?.name && !this._track && z2.has(F3.name) && this.emit("cursor", z2.get(F3.name)), F3?.name && xD.has(F3.name) && this.emit("cursor", F3.name), u3 && (u3.toLowerCase() === "y" || u3.toLowerCase() === "n") && this.emit("confirm", u3.toLowerCase() === "y"), u3 === "\t" && this.opts.placeholder && (this.value || (this.rl.write(this.opts.placeholder), this.emit("value", this.opts.placeholder))), u3 && this.emit("key", u3.toLowerCase()), F3?.name === "return") {
3039
+ if (this.opts.validate) {
3040
+ const t2 = this.opts.validate(this.value);
3041
+ t2 && (this.error = t2, this.state = "error", this.rl.write(this.value));
3042
+ }
3043
+ this.state !== "error" && (this.state = "submit");
3044
+ }
3045
+ u3 === "\x03" && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
3046
+ }
3047
+ close() {
3048
+ this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
3049
+ `), v2(this.input, false), this.rl.close(), this.emit(`${this.state}`, this.value), this.unsubscribe();
3050
+ }
3051
+ restoreCursor() {
3052
+ const u3 = R3(this._prevFrame, process.stdout.columns, { hard: true }).split(`
3053
+ `).length - 1;
3054
+ this.output.write(import_sisteransi.cursor.move(-999, u3 * -1));
3055
+ }
3056
+ render() {
3057
+ const u3 = R3(this._render(this) ?? "", process.stdout.columns, { hard: true });
3058
+ if (u3 !== this._prevFrame) {
3059
+ if (this.state === "initial")
3060
+ this.output.write(import_sisteransi.cursor.hide);
3061
+ else {
3062
+ const F3 = hD(this._prevFrame, u3);
3063
+ if (this.restoreCursor(), F3 && F3?.length === 1) {
3064
+ const t2 = F3[0];
3065
+ this.output.write(import_sisteransi.cursor.move(0, t2)), this.output.write(import_sisteransi.erase.lines(1));
3066
+ const s2 = u3.split(`
3067
+ `);
3068
+ this.output.write(s2[t2]), this._prevFrame = u3, this.output.write(import_sisteransi.cursor.move(0, s2.length - t2 - 1));
3069
+ return;
3070
+ } else if (F3 && F3?.length > 1) {
3071
+ const t2 = F3[0];
3072
+ this.output.write(import_sisteransi.cursor.move(0, t2)), this.output.write(import_sisteransi.erase.down());
3073
+ const s2 = u3.split(`
3074
+ `).slice(t2);
3075
+ this.output.write(s2.join(`
3076
+ `)), this._prevFrame = u3;
3077
+ return;
3078
+ }
3079
+ this.output.write(import_sisteransi.erase.down());
3080
+ }
3081
+ this.output.write(u3), this.state === "initial" && (this.state = "active"), this._prevFrame = u3;
3082
+ }
3083
+ }
3084
+ }
3085
+
3086
+ class BD extends x2 {
3087
+ get cursor() {
3088
+ return this.value ? 0 : 1;
3089
+ }
3090
+ get _value() {
3091
+ return this.cursor === 0;
3092
+ }
3093
+ constructor(u3) {
3094
+ super(u3, false), this.value = !!u3.initialValue, this.on("value", () => {
3095
+ this.value = this._value;
3096
+ }), this.on("confirm", (F3) => {
3097
+ this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = F3, this.state = "submit", this.close();
3098
+ }), this.on("cursor", () => {
3099
+ this.value = !this.value;
3100
+ });
3101
+ }
3102
+ }
3103
+ var TD = Object.defineProperty;
3104
+ var jD2 = (e2, u3, F3) => (u3 in e2) ? TD(e2, u3, { enumerable: true, configurable: true, writable: true, value: F3 }) : e2[u3] = F3;
3105
+ var MD = (e2, u3, F3) => (jD2(e2, typeof u3 != "symbol" ? u3 + "" : u3, F3), F3);
3106
+
3107
+ class PD2 extends x2 {
3108
+ constructor(u3) {
3109
+ super(u3), MD(this, "valueWithCursor", ""), this.on("finalize", () => {
3110
+ this.value || (this.value = u3.defaultValue), this.valueWithCursor = this.value;
3111
+ }), this.on("value", () => {
3112
+ if (this.cursor >= this.value.length)
3113
+ this.valueWithCursor = `${this.value}${import_picocolors.default.inverse(import_picocolors.default.hidden("_"))}`;
3114
+ else {
3115
+ const F3 = this.value.slice(0, this.cursor), t2 = this.value.slice(this.cursor);
3116
+ this.valueWithCursor = `${F3}${import_picocolors.default.inverse(t2[0])}${t2.slice(1)}`;
3117
+ }
3118
+ });
3119
+ }
3120
+ get cursor() {
3121
+ return this._cursor;
3122
+ }
3123
+ }
3124
+ var WD = globalThis.process.platform.startsWith("win");
3125
+ function OD({ input: e2 = $, output: u3 = k2, overwrite: F3 = true, hideCursor: t2 = true } = {}) {
3126
+ const s2 = f3.createInterface({ input: e2, output: u3, prompt: "", tabSize: 1 });
3127
+ f3.emitKeypressEvents(e2, s2), e2.isTTY && e2.setRawMode(true);
3128
+ const C3 = (D2, { name: i2 }) => {
3129
+ if (String(D2) === "\x03") {
3130
+ t2 && u3.write(import_sisteransi.cursor.show), process.exit(0);
3131
+ return;
3132
+ }
3133
+ if (!F3)
3134
+ return;
3135
+ let n2 = i2 === "return" ? 0 : -1, E = i2 === "return" ? -1 : 0;
3136
+ f3.moveCursor(u3, n2, E, () => {
3137
+ f3.clearLine(u3, 1, () => {
3138
+ e2.once("keypress", C3);
3139
+ });
3140
+ });
3141
+ };
3142
+ return t2 && u3.write(import_sisteransi.cursor.hide), e2.once("keypress", C3), () => {
3143
+ e2.off("keypress", C3), t2 && u3.write(import_sisteransi.cursor.show), e2.isTTY && !WD && e2.setRawMode(false), s2.terminal = false, s2.close();
3144
+ };
3145
+ }
3146
+
3147
+ // ../../node_modules/.bun/@clack+prompts@0.7.0/node_modules/@clack/prompts/dist/index.mjs
3148
+ var import_picocolors2 = __toESM(require_picocolors(), 1);
3149
+ var import_sisteransi2 = __toESM(require_src(), 1);
3150
+ import h2 from "process";
3151
+ function q3() {
3152
+ return h2.platform !== "win32" ? h2.env.TERM !== "linux" : Boolean(h2.env.CI) || Boolean(h2.env.WT_SESSION) || Boolean(h2.env.TERMINUS_SUBLIME) || h2.env.ConEmuTask === "{cmd::Cmder}" || h2.env.TERM_PROGRAM === "Terminus-Sublime" || h2.env.TERM_PROGRAM === "vscode" || h2.env.TERM === "xterm-256color" || h2.env.TERM === "alacritty" || h2.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
3153
+ }
3154
+ var _4 = q3();
3155
+ var o3 = (r4, n2) => _4 ? r4 : n2;
3156
+ var H = o3("\u25C6", "*");
3157
+ var I4 = o3("\u25A0", "x");
3158
+ var x3 = o3("\u25B2", "x");
3159
+ var S4 = o3("\u25C7", "o");
3160
+ var K = o3("\u250C", "T");
3161
+ var a3 = o3("\u2502", "|");
3162
+ var d3 = o3("\u2514", "\u2014");
3163
+ var b3 = o3("\u25CF", ">");
3164
+ var E = o3("\u25CB", " ");
3165
+ var C3 = o3("\u25FB", "[\u2022]");
3166
+ var w3 = o3("\u25FC", "[+]");
3167
+ var M2 = o3("\u25FB", "[ ]");
3168
+ var U2 = o3("\u25AA", "\u2022");
3169
+ var B2 = o3("\u2500", "-");
3170
+ var Z = o3("\u256E", "+");
3171
+ var z3 = o3("\u251C", "+");
3172
+ var X3 = o3("\u256F", "+");
3173
+ var J3 = o3("\u25CF", "\u2022");
3174
+ var Y2 = o3("\u25C6", "*");
3175
+ var Q3 = o3("\u25B2", "!");
3176
+ var ee = o3("\u25A0", "x");
3177
+ var y4 = (r4) => {
3178
+ switch (r4) {
3179
+ case "initial":
3180
+ case "active":
3181
+ return import_picocolors2.default.cyan(H);
3182
+ case "cancel":
3183
+ return import_picocolors2.default.red(I4);
3184
+ case "error":
3185
+ return import_picocolors2.default.yellow(x3);
3186
+ case "submit":
3187
+ return import_picocolors2.default.green(S4);
3188
+ }
3189
+ };
3190
+ var te = (r4) => new PD2({ validate: r4.validate, placeholder: r4.placeholder, defaultValue: r4.defaultValue, initialValue: r4.initialValue, render() {
3191
+ const n2 = `${import_picocolors2.default.gray(a3)}
3192
+ ${y4(this.state)} ${r4.message}
3193
+ `, i2 = r4.placeholder ? import_picocolors2.default.inverse(r4.placeholder[0]) + import_picocolors2.default.dim(r4.placeholder.slice(1)) : import_picocolors2.default.inverse(import_picocolors2.default.hidden("_")), t2 = this.value ? this.valueWithCursor : i2;
3194
+ switch (this.state) {
3195
+ case "error":
3196
+ return `${n2.trim()}
3197
+ ${import_picocolors2.default.yellow(a3)} ${t2}
3198
+ ${import_picocolors2.default.yellow(d3)} ${import_picocolors2.default.yellow(this.error)}
3199
+ `;
3200
+ case "submit":
3201
+ return `${n2}${import_picocolors2.default.gray(a3)} ${import_picocolors2.default.dim(this.value || r4.placeholder)}`;
3202
+ case "cancel":
3203
+ return `${n2}${import_picocolors2.default.gray(a3)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(this.value ?? ""))}${this.value?.trim() ? `
3204
+ ` + import_picocolors2.default.gray(a3) : ""}`;
3205
+ default:
3206
+ return `${n2}${import_picocolors2.default.cyan(a3)} ${t2}
3207
+ ${import_picocolors2.default.cyan(d3)}
3208
+ `;
3209
+ }
3210
+ } }).prompt();
3211
+ var se = (r4) => {
3212
+ const n2 = r4.active ?? "Yes", i2 = r4.inactive ?? "No";
3213
+ return new BD({ active: n2, inactive: i2, initialValue: r4.initialValue ?? true, render() {
3214
+ const t2 = `${import_picocolors2.default.gray(a3)}
3215
+ ${y4(this.state)} ${r4.message}
3216
+ `, s2 = this.value ? n2 : i2;
3217
+ switch (this.state) {
3218
+ case "submit":
3219
+ return `${t2}${import_picocolors2.default.gray(a3)} ${import_picocolors2.default.dim(s2)}`;
3220
+ case "cancel":
3221
+ return `${t2}${import_picocolors2.default.gray(a3)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(s2))}
3222
+ ${import_picocolors2.default.gray(a3)}`;
3223
+ default:
3224
+ return `${t2}${import_picocolors2.default.cyan(a3)} ${this.value ? `${import_picocolors2.default.green(b3)} ${n2}` : `${import_picocolors2.default.dim(E)} ${import_picocolors2.default.dim(n2)}`} ${import_picocolors2.default.dim("/")} ${this.value ? `${import_picocolors2.default.dim(E)} ${import_picocolors2.default.dim(i2)}` : `${import_picocolors2.default.green(b3)} ${i2}`}
3225
+ ${import_picocolors2.default.cyan(d3)}
3226
+ `;
3227
+ }
3228
+ } }).prompt();
3229
+ };
3230
+ var oe = (r4 = "") => {
3231
+ process.stdout.write(`${import_picocolors2.default.gray(K)} ${r4}
3232
+ `);
3233
+ };
3234
+ var $e = (r4 = "") => {
3235
+ process.stdout.write(`${import_picocolors2.default.gray(a3)}
3236
+ ${import_picocolors2.default.gray(d3)} ${r4}
3237
+
3238
+ `);
3239
+ };
3240
+ var de = () => {
3241
+ const r4 = _4 ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], n2 = _4 ? 80 : 120;
3242
+ let i2, t2, s2 = false, c4 = "";
3243
+ const l3 = (v3 = "") => {
3244
+ s2 = true, i2 = OD(), c4 = v3.replace(/\.+$/, ""), process.stdout.write(`${import_picocolors2.default.gray(a3)}
3245
+ `);
3246
+ let g4 = 0, p = 0;
3247
+ t2 = setInterval(() => {
3248
+ const O4 = import_picocolors2.default.magenta(r4[g4]), P4 = ".".repeat(Math.floor(p)).slice(0, 3);
3249
+ process.stdout.write(import_sisteransi2.cursor.move(-999, 0)), process.stdout.write(import_sisteransi2.erase.down(1)), process.stdout.write(`${O4} ${c4}${P4}`), g4 = g4 + 1 < r4.length ? g4 + 1 : 0, p = p < r4.length ? p + 0.125 : 0;
3250
+ }, n2);
3251
+ }, u3 = (v3 = "", g4 = 0) => {
3252
+ c4 = v3 ?? c4, s2 = false, clearInterval(t2);
3253
+ const p = g4 === 0 ? import_picocolors2.default.green(S4) : g4 === 1 ? import_picocolors2.default.red(I4) : import_picocolors2.default.red(x3);
3254
+ process.stdout.write(import_sisteransi2.cursor.move(-999, 0)), process.stdout.write(import_sisteransi2.erase.down(1)), process.stdout.write(`${p} ${c4}
3255
+ `), i2();
3256
+ }, m3 = (v3 = "") => {
3257
+ c4 = v3 ?? c4;
3258
+ }, $2 = (v3) => {
3259
+ const g4 = v3 > 1 ? "Something went wrong" : "Canceled";
3260
+ s2 && u3(g4, v3);
3261
+ };
3262
+ return process.on("uncaughtExceptionMonitor", () => $2(2)), process.on("unhandledRejection", () => $2(2)), process.on("SIGINT", () => $2(1)), process.on("SIGTERM", () => $2(1)), process.on("exit", $2), { start: l3, stop: u3, message: m3 };
3263
+ };
3264
+
3265
+ // src/commands/init.ts
3266
+ import { writeFileSync as writeFileSync2, existsSync as existsSync6, readFileSync as readFileSync5 } from "fs";
3267
+ import { resolve as resolve6 } from "path";
3268
+
3269
+ // src/init/copy-template.ts
3270
+ import { existsSync as existsSync4, copyFileSync, mkdirSync, readdirSync } from "fs";
3271
+ import { dirname as dirname3, join } from "path";
3272
+ import { fileURLToPath as fileURLToPath2 } from "url";
3273
+ var __dirname3 = dirname3(fileURLToPath2(import.meta.url));
3274
+ var TEMPLATES_DIR = join(__dirname3, "../../templates/mfe");
3275
+ async function copyTemplate(destDir) {
3276
+ const files = readdirSync(TEMPLATES_DIR);
3277
+ const result = { copied: [], skipped: [] };
3278
+ for (const file of files) {
3279
+ const src2 = join(TEMPLATES_DIR, file);
3280
+ const destFile = file.endsWith(".tmpl") ? file.slice(0, -5) : file;
3281
+ let dest = join(destDir, destFile);
3282
+ if (destFile === "App.tsx" || destFile === "App.test.tsx") {
3283
+ dest = join(destDir, "src", destFile);
3284
+ mkdirSync(join(destDir, "src"), { recursive: true });
3285
+ }
3286
+ if (existsSync4(dest)) {
3287
+ const overwrite = await se({ message: `${destFile} already exists. Overwrite?` });
3288
+ if (!overwrite) {
3289
+ result.skipped.push(destFile);
3290
+ continue;
3291
+ }
3292
+ }
3293
+ copyFileSync(src2, dest);
3294
+ result.copied.push(destFile);
3295
+ }
3296
+ return result;
3297
+ }
3298
+
3299
+ // src/init/package-json.ts
3300
+ import { readFileSync as readFileSync4, writeFileSync, existsSync as existsSync5 } from "fs";
3301
+ import { resolve as resolve5 } from "path";
3302
+ function updatePackageJson(cwd, opts) {
3303
+ const pkgPath = resolve5(cwd, "package.json");
3304
+ const pkg = existsSync5(pkgPath) ? JSON.parse(readFileSync4(pkgPath, "utf8")) : {};
3305
+ pkg.scripts = {
3306
+ ...pkg.scripts ?? {},
3307
+ dev: "daas dev",
3308
+ build: "daas build",
3309
+ test: "daas test"
3310
+ };
3311
+ if (!opts.isMonorepo) {
3312
+ pkg.devDependencies = {
3313
+ ...pkg.devDependencies ?? {},
3314
+ "@chrisluyi/daas-cli": `^${opts.cliVersion ?? "1.0.0"}`
3315
+ };
3316
+ }
3317
+ pkg.daas = { configUrl: opts.configUrl, port: opts.port };
3318
+ writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + `
3319
+ `);
3320
+ }
3321
+
3322
+ // src/commands/init.ts
3323
+ var initCommand = defineCommand({
3324
+ meta: { name: "init", description: "Scaffold a new MFE app" },
3325
+ args: {
3326
+ template: { type: "string", description: "Template name (reserved for v2)" }
3327
+ },
3328
+ async run({ args }) {
3329
+ if (!process.stdin.isTTY) {
3330
+ consola.fatal("daas init requires an interactive terminal. Cannot run in non-TTY mode.");
3331
+ process.exit(EXIT_CODES.CONFIG_ERROR);
3332
+ }
3333
+ if (args.template) {
3334
+ consola.warn("Template support is not yet available. Scaffolding with default template.");
3335
+ }
3336
+ oe("daas-cli \u2014 scaffold new MFE");
3337
+ const configUrl = await te({
3338
+ message: "Remote config URL?",
3339
+ placeholder: "https://your-org.example.com/daas-config.json",
3340
+ validate: (v3) => !v3 ? "Config URL is required" : undefined
3341
+ });
3342
+ const portInput = await te({
3343
+ message: "Dev server port?",
3344
+ placeholder: "3000",
3345
+ defaultValue: "3000"
3346
+ });
3347
+ const port = Number(portInput);
3348
+ const derivedName = getPackageName(process.cwd());
3349
+ const appName = await te({
3350
+ message: "App name?",
3351
+ placeholder: `Leave blank to use: ${derivedName}`,
3352
+ defaultValue: derivedName
3353
+ });
3354
+ const hasExtraExposes = await se({
3355
+ message: "Does this app expose additional components beyond ./App?"
3356
+ });
3357
+ const s2 = de();
3358
+ s2.start(`Scaffolding ${appName}...`);
3359
+ const cwd = process.cwd();
3360
+ const isMonorepo = detectMonorepo(cwd);
3361
+ const { copied, skipped } = await copyTemplate(cwd);
3362
+ for (const f4 of copied)
3363
+ s2.message(`\u2713 Created ${f4}`);
3364
+ for (const f4 of skipped)
3365
+ s2.message(`\u2014 Skipped ${f4} (kept existing)`);
3366
+ updatePackageJson(cwd, { configUrl, port, isMonorepo });
3367
+ s2.message("\u2713 Updated package.json");
3368
+ if (hasExtraExposes) {
3369
+ const manifest = { name: appName, exposes: { "./App": "./src/App" } };
3370
+ writeFileSync2(resolve6(cwd, "mf.manifest.json"), JSON.stringify(manifest, null, 2) + `
3371
+ `);
3372
+ s2.message("\u2713 Created mf.manifest.json (add extra exposes as needed)");
3373
+ }
3374
+ s2.stop("Done!");
3375
+ $e(isMonorepo ? "Run: daas dev" : "Run: bun install && daas dev");
3376
+ }
3377
+ });
3378
+ function getPackageName(cwd) {
3379
+ const pkgPath = resolve6(cwd, "package.json");
3380
+ if (!existsSync6(pkgPath))
3381
+ return "mfe-app";
3382
+ try {
3383
+ const pkg = JSON.parse(readFileSync5(pkgPath, "utf8"));
3384
+ return (pkg.name ?? "mfe-app").replace(/^@[^/]+\//, "");
3385
+ } catch {
3386
+ return "mfe-app";
3387
+ }
3388
+ }
3389
+
3390
+ // src/index.ts
3391
+ var main = defineCommand({
3392
+ meta: {
3393
+ name: "daas",
3394
+ version: process.env.DAAS_CLI_VERSION ?? "0.0.0",
3395
+ description: "Zero-config MFE build tool powered by rsbuild + Module Federation 2"
3396
+ },
3397
+ subCommands: {
3398
+ init: initCommand,
3399
+ dev: devCommand,
3400
+ build: buildCommand,
3401
+ test: testCommand,
3402
+ info: infoCommand
3403
+ }
3404
+ });
3405
+ runMain(main);