@soybeanjs/changelog 0.3.24 → 0.3.25-beta.1

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.cjs CHANGED
@@ -30,1207 +30,553 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
30
30
  ));
31
31
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
32
 
33
- // node_modules/.pnpm/tsup@8.0.2_typescript@5.4.5/node_modules/tsup/assets/cjs_shims.js
33
+ // node_modules/.pnpm/tsup@8.5.0_jiti@2.5.1_postcss@8.5.6_tsx@4.20.5_typescript@5.9.2_yaml@2.8.1/node_modules/tsup/assets/cjs_shims.js
34
34
  var init_cjs_shims = __esm({
35
- "node_modules/.pnpm/tsup@8.0.2_typescript@5.4.5/node_modules/tsup/assets/cjs_shims.js"() {
35
+ "node_modules/.pnpm/tsup@8.5.0_jiti@2.5.1_postcss@8.5.6_tsx@4.20.5_typescript@5.9.2_yaml@2.8.1/node_modules/tsup/assets/cjs_shims.js"() {
36
36
  "use strict";
37
37
  }
38
38
  });
39
39
 
40
- // node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/core.mjs
41
- function isObject(value) {
42
- return value !== null && typeof value === "object";
43
- }
44
- function _defu(baseObject, defaults, namespace = ".", merger) {
45
- if (!isObject(defaults)) {
46
- return _defu(baseObject, {}, namespace, merger);
47
- }
48
- const object = Object.assign({}, defaults);
49
- for (const key in baseObject) {
50
- if (key === "__proto__" || key === "constructor") {
51
- continue;
52
- }
53
- const value = baseObject[key];
54
- if (value === null || value === void 0) {
55
- continue;
56
- }
57
- if (merger && merger(object, key, value, namespace)) {
58
- continue;
59
- }
60
- if (Array.isArray(value) && Array.isArray(object[key])) {
61
- object[key] = [...value, ...object[key]];
62
- } else if (isObject(value) && isObject(object[key])) {
63
- object[key] = _defu(
64
- value,
65
- object[key],
66
- (namespace ? `${namespace}.` : "") + key.toString(),
67
- merger
68
- );
69
- } else {
70
- object[key] = value;
71
- }
72
- }
73
- return object;
74
- }
75
- function createDefu(merger) {
76
- return (...arguments_) => (
77
- // eslint-disable-next-line unicorn/no-array-reduce
78
- arguments_.reduce((p2, c2) => _defu(p2, c2, "", merger), {})
79
- );
80
- }
81
- function isPlainObject(obj) {
82
- return Object.prototype.toString.call(obj) === "[object Object]";
83
- }
84
- function isLogObj(arg) {
85
- if (!isPlainObject(arg)) {
86
- return false;
87
- }
88
- if (!arg.message && !arg.args) {
89
- return false;
90
- }
91
- if (arg.stack) {
92
- return false;
93
- }
94
- return true;
95
- }
96
- function _normalizeLogLevel(input, types = {}, defaultLevel = 3) {
97
- if (input === void 0) {
98
- return defaultLevel;
99
- }
100
- if (typeof input === "number") {
101
- return input;
102
- }
103
- if (types[input] && types[input].level !== void 0) {
104
- return types[input].level;
105
- }
106
- return defaultLevel;
107
- }
108
- function createConsola(options = {}) {
109
- return new Consola(options);
110
- }
111
- var LogLevels, LogTypes, defu, paused, queue, Consola;
112
- var init_core = __esm({
113
- "node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/core.mjs"() {
114
- "use strict";
115
- init_cjs_shims();
116
- LogLevels = {
117
- silent: Number.NEGATIVE_INFINITY,
118
- fatal: 0,
119
- error: 0,
120
- warn: 1,
121
- log: 2,
122
- info: 3,
123
- success: 3,
124
- fail: 3,
125
- ready: 3,
126
- start: 3,
127
- box: 3,
128
- debug: 4,
129
- trace: 5,
130
- verbose: Number.POSITIVE_INFINITY
131
- };
132
- LogTypes = {
133
- // Silent
134
- silent: {
135
- level: -1
136
- },
137
- // Level 0
138
- fatal: {
139
- level: LogLevels.fatal
140
- },
141
- error: {
142
- level: LogLevels.error
143
- },
144
- // Level 1
145
- warn: {
146
- level: LogLevels.warn
147
- },
148
- // Level 2
149
- log: {
150
- level: LogLevels.log
151
- },
152
- // Level 3
153
- info: {
154
- level: LogLevels.info
155
- },
156
- success: {
157
- level: LogLevels.success
158
- },
159
- fail: {
160
- level: LogLevels.fail
161
- },
162
- ready: {
163
- level: LogLevels.info
164
- },
165
- start: {
166
- level: LogLevels.info
167
- },
168
- box: {
169
- level: LogLevels.info
170
- },
171
- // Level 4
172
- debug: {
173
- level: LogLevels.debug
174
- },
175
- // Level 5
176
- trace: {
177
- level: LogLevels.trace
178
- },
179
- // Verbose
180
- verbose: {
181
- level: LogLevels.verbose
182
- }
183
- };
184
- defu = createDefu();
185
- paused = false;
186
- queue = [];
187
- Consola = class _Consola {
188
- constructor(options = {}) {
189
- const types = options.types || LogTypes;
190
- this.options = defu(
191
- {
192
- ...options,
193
- defaults: { ...options.defaults },
194
- level: _normalizeLogLevel(options.level, types),
195
- reporters: [...options.reporters || []]
196
- },
197
- {
198
- types: LogTypes,
199
- throttle: 1e3,
200
- throttleMin: 5,
201
- formatOptions: {
202
- date: true,
203
- colors: false,
204
- compact: true
205
- }
206
- }
207
- );
208
- for (const type in types) {
209
- const defaults = {
210
- type,
211
- ...this.options.defaults,
212
- ...types[type]
213
- };
214
- this[type] = this._wrapLogFn(defaults);
215
- this[type].raw = this._wrapLogFn(
216
- defaults,
217
- true
218
- );
219
- }
220
- if (this.options.mockFn) {
221
- this.mockTypes();
222
- }
223
- this._lastLog = {};
224
- }
225
- get level() {
226
- return this.options.level;
227
- }
228
- set level(level) {
229
- this.options.level = _normalizeLogLevel(
230
- level,
231
- this.options.types,
232
- this.options.level
233
- );
234
- }
235
- prompt(message, opts) {
236
- if (!this.options.prompt) {
237
- throw new Error("prompt is not supported!");
238
- }
239
- return this.options.prompt(message, opts);
240
- }
241
- create(options) {
242
- const instance = new _Consola({
243
- ...this.options,
244
- ...options
245
- });
246
- if (this._mockFn) {
247
- instance.mockTypes(this._mockFn);
248
- }
249
- return instance;
250
- }
251
- withDefaults(defaults) {
252
- return this.create({
253
- ...this.options,
254
- defaults: {
255
- ...this.options.defaults,
256
- ...defaults
257
- }
258
- });
259
- }
260
- withTag(tag) {
261
- return this.withDefaults({
262
- tag: this.options.defaults.tag ? this.options.defaults.tag + ":" + tag : tag
263
- });
264
- }
265
- addReporter(reporter) {
266
- this.options.reporters.push(reporter);
267
- return this;
268
- }
269
- removeReporter(reporter) {
270
- if (reporter) {
271
- const i = this.options.reporters.indexOf(reporter);
272
- if (i >= 0) {
273
- return this.options.reporters.splice(i, 1);
274
- }
275
- } else {
276
- this.options.reporters.splice(0);
277
- }
278
- return this;
279
- }
280
- setReporters(reporters) {
281
- this.options.reporters = Array.isArray(reporters) ? reporters : [reporters];
282
- return this;
283
- }
284
- wrapAll() {
285
- this.wrapConsole();
286
- this.wrapStd();
287
- }
288
- restoreAll() {
289
- this.restoreConsole();
290
- this.restoreStd();
291
- }
292
- wrapConsole() {
293
- for (const type in this.options.types) {
294
- if (!console["__" + type]) {
295
- console["__" + type] = console[type];
296
- }
297
- console[type] = this[type].raw;
298
- }
299
- }
300
- restoreConsole() {
301
- for (const type in this.options.types) {
302
- if (console["__" + type]) {
303
- console[type] = console["__" + type];
304
- delete console["__" + type];
305
- }
306
- }
307
- }
308
- wrapStd() {
309
- this._wrapStream(this.options.stdout, "log");
310
- this._wrapStream(this.options.stderr, "log");
311
- }
312
- _wrapStream(stream, type) {
313
- if (!stream) {
314
- return;
315
- }
316
- if (!stream.__write) {
317
- stream.__write = stream.write;
318
- }
319
- stream.write = (data) => {
320
- this[type].raw(String(data).trim());
321
- };
322
- }
323
- restoreStd() {
324
- this._restoreStream(this.options.stdout);
325
- this._restoreStream(this.options.stderr);
326
- }
327
- _restoreStream(stream) {
328
- if (!stream) {
329
- return;
330
- }
331
- if (stream.__write) {
332
- stream.write = stream.__write;
333
- delete stream.__write;
334
- }
335
- }
336
- pauseLogs() {
337
- paused = true;
338
- }
339
- resumeLogs() {
340
- paused = false;
341
- const _queue = queue.splice(0);
342
- for (const item of _queue) {
343
- item[0]._logFn(item[1], item[2]);
344
- }
345
- }
346
- mockTypes(mockFn) {
347
- const _mockFn = mockFn || this.options.mockFn;
348
- this._mockFn = _mockFn;
349
- if (typeof _mockFn !== "function") {
350
- return;
351
- }
352
- for (const type in this.options.types) {
353
- this[type] = _mockFn(type, this.options.types[type]) || this[type];
354
- this[type].raw = this[type];
355
- }
356
- }
357
- _wrapLogFn(defaults, isRaw) {
358
- return (...args) => {
359
- if (paused) {
360
- queue.push([this, defaults, args, isRaw]);
361
- return;
362
- }
363
- return this._logFn(defaults, args, isRaw);
364
- };
365
- }
366
- _logFn(defaults, args, isRaw) {
367
- if ((defaults.level || 0) > this.level) {
368
- return false;
369
- }
370
- const logObj = {
371
- date: /* @__PURE__ */ new Date(),
372
- args: [],
373
- ...defaults,
374
- level: _normalizeLogLevel(defaults.level, this.options.types)
375
- };
376
- if (!isRaw && args.length === 1 && isLogObj(args[0])) {
377
- Object.assign(logObj, args[0]);
378
- } else {
379
- logObj.args = [...args];
380
- }
381
- if (logObj.message) {
382
- logObj.args.unshift(logObj.message);
383
- delete logObj.message;
384
- }
385
- if (logObj.additional) {
386
- if (!Array.isArray(logObj.additional)) {
387
- logObj.additional = logObj.additional.split("\n");
388
- }
389
- logObj.args.push("\n" + logObj.additional.join("\n"));
390
- delete logObj.additional;
391
- }
392
- logObj.type = typeof logObj.type === "string" ? logObj.type.toLowerCase() : "log";
393
- logObj.tag = typeof logObj.tag === "string" ? logObj.tag : "";
394
- const resolveLog = (newLog = false) => {
395
- const repeated = (this._lastLog.count || 0) - this.options.throttleMin;
396
- if (this._lastLog.object && repeated > 0) {
397
- const args2 = [...this._lastLog.object.args];
398
- if (repeated > 1) {
399
- args2.push(`(repeated ${repeated} times)`);
400
- }
401
- this._log({ ...this._lastLog.object, args: args2 });
402
- this._lastLog.count = 1;
403
- }
404
- if (newLog) {
405
- this._lastLog.object = logObj;
406
- this._log(logObj);
407
- }
408
- };
409
- clearTimeout(this._lastLog.timeout);
410
- const diffTime = this._lastLog.time && logObj.date ? logObj.date.getTime() - this._lastLog.time.getTime() : 0;
411
- this._lastLog.time = logObj.date;
412
- if (diffTime < this.options.throttle) {
413
- try {
414
- const serializedLog = JSON.stringify([
415
- logObj.type,
416
- logObj.tag,
417
- logObj.args
418
- ]);
419
- const isSameLog = this._lastLog.serialized === serializedLog;
420
- this._lastLog.serialized = serializedLog;
421
- if (isSameLog) {
422
- this._lastLog.count = (this._lastLog.count || 0) + 1;
423
- if (this._lastLog.count > this.options.throttleMin) {
424
- this._lastLog.timeout = setTimeout(
425
- resolveLog,
426
- this.options.throttle
427
- );
428
- return;
429
- }
430
- }
431
- } catch {
432
- }
433
- }
434
- resolveLog(true);
435
- }
436
- _log(logObj) {
437
- for (const reporter of this.options.reporters) {
438
- reporter.log(logObj, {
439
- options: this.options
440
- });
441
- }
442
- }
443
- };
444
- Consola.prototype.add = Consola.prototype.addReporter;
445
- Consola.prototype.remove = Consola.prototype.removeReporter;
446
- Consola.prototype.clear = Consola.prototype.removeReporter;
447
- Consola.prototype.withScope = Consola.prototype.withTag;
448
- Consola.prototype.mock = Consola.prototype.mockTypes;
449
- Consola.prototype.pause = Consola.prototype.pauseLogs;
450
- Consola.prototype.resume = Consola.prototype.resumeLogs;
451
- }
452
- });
453
-
454
- // node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/shared/consola.06ad8a64.mjs
455
- function parseStack(stack) {
456
- const cwd = process.cwd() + import_node_path.sep;
457
- const lines = stack.split("\n").splice(1).map((l2) => l2.trim().replace("file://", "").replace(cwd, ""));
458
- return lines;
459
- }
460
- function writeStream(data, stream) {
461
- const write = stream.__write || stream.write;
462
- return write.call(stream, data);
463
- }
464
- var import_node_util, import_node_path, bracket, BasicReporter;
465
- var init_consola_06ad8a64 = __esm({
466
- "node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/shared/consola.06ad8a64.mjs"() {
467
- "use strict";
468
- init_cjs_shims();
469
- import_node_util = require("util");
470
- import_node_path = require("path");
471
- bracket = (x) => x ? `[${x}]` : "";
472
- BasicReporter = class {
473
- formatStack(stack, opts) {
474
- return " " + parseStack(stack).join("\n ");
475
- }
476
- formatArgs(args, opts) {
477
- const _args = args.map((arg) => {
478
- if (arg && typeof arg.stack === "string") {
479
- return arg.message + "\n" + this.formatStack(arg.stack, opts);
480
- }
481
- return arg;
482
- });
483
- return (0, import_node_util.formatWithOptions)(opts, ..._args);
484
- }
485
- formatDate(date, opts) {
486
- return opts.date ? date.toLocaleTimeString() : "";
487
- }
488
- filterAndJoin(arr) {
489
- return arr.filter(Boolean).join(" ");
490
- }
491
- formatLogObj(logObj, opts) {
492
- const message = this.formatArgs(logObj.args, opts);
493
- if (logObj.type === "box") {
494
- return "\n" + [
495
- bracket(logObj.tag),
496
- logObj.title && logObj.title,
497
- ...message.split("\n")
498
- ].filter(Boolean).map((l2) => " > " + l2).join("\n") + "\n";
499
- }
500
- return this.filterAndJoin([
501
- bracket(logObj.type),
502
- bracket(logObj.tag),
503
- message
504
- ]);
505
- }
506
- log(logObj, ctx) {
507
- const line = this.formatLogObj(logObj, {
508
- columns: ctx.options.stdout.columns || 0,
509
- ...ctx.options.formatOptions
510
- });
511
- return writeStream(
512
- line + "\n",
513
- logObj.level < 2 ? ctx.options.stderr || process.stderr : ctx.options.stdout || process.stdout
514
- );
515
- }
516
- };
517
- }
40
+ // node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/chunks/prompt.mjs
41
+ var prompt_exports = {};
42
+ __export(prompt_exports, {
43
+ kCancel: () => kCancel,
44
+ prompt: () => prompt
518
45
  });
519
-
520
- // node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/utils.mjs
521
- 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)) {
522
- return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
523
- }
524
- function clearBleed(index, string, open, close, replace) {
525
- return index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
526
- }
527
- function filterEmpty(open, close, replace = open, at = open.length + 1) {
528
- return (string) => string || !(string === "" || string === void 0) ? clearBleed(
529
- ("" + string).indexOf(close, at),
530
- string,
531
- open,
532
- close,
533
- replace
534
- ) : "";
535
- }
536
- function init(open, close, replace) {
537
- return filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace);
538
- }
539
- function createColors(useColor = isColorSupported) {
540
- return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
541
- }
542
- function getColor(color, fallback = "reset") {
543
- return colors[color] || colors[fallback];
544
- }
545
- function stripAnsi(text2) {
546
- return text2.replace(new RegExp(ansiRegex, "g"), "");
547
- }
548
- function box(text2, _opts = {}) {
549
- const opts = {
550
- ..._opts,
551
- style: {
552
- ...defaultStyle,
553
- ..._opts.style
554
- }
46
+ function getDefaultExportFromCjs(x2) {
47
+ return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
48
+ }
49
+ function requireSrc() {
50
+ if (hasRequiredSrc) return src;
51
+ hasRequiredSrc = 1;
52
+ const ESC = "\x1B";
53
+ const CSI = `${ESC}[`;
54
+ const beep = "\x07";
55
+ const cursor = {
56
+ to(x2, y3) {
57
+ if (!y3) return `${CSI}${x2 + 1}G`;
58
+ return `${CSI}${y3 + 1};${x2 + 1}H`;
59
+ },
60
+ move(x2, y3) {
61
+ let ret = "";
62
+ if (x2 < 0) ret += `${CSI}${-x2}D`;
63
+ else if (x2 > 0) ret += `${CSI}${x2}C`;
64
+ if (y3 < 0) ret += `${CSI}${-y3}A`;
65
+ else if (y3 > 0) ret += `${CSI}${y3}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`
555
79
  };
556
- const textLines = text2.split("\n");
557
- const boxLines = [];
558
- const _color = getColor(opts.style.borderColor);
559
- const borderStyle = {
560
- ...typeof opts.style.borderStyle === "string" ? boxStylePresets[opts.style.borderStyle] || boxStylePresets.solid : opts.style.borderStyle
80
+ const scroll = {
81
+ up: (count = 1) => `${CSI}S`.repeat(count),
82
+ down: (count = 1) => `${CSI}T`.repeat(count)
561
83
  };
562
- if (_color) {
563
- for (const key in borderStyle) {
564
- borderStyle[key] = _color(
565
- borderStyle[key]
566
- );
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 i2 = 0; i2 < count; i2++)
94
+ clear += this.line + (i2 < count - 1 ? cursor.up() : "");
95
+ if (count)
96
+ clear += cursor.left;
97
+ return clear;
567
98
  }
568
- }
569
- const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;
570
- const height = textLines.length + paddingOffset;
571
- const width = Math.max(...textLines.map((line) => line.length)) + paddingOffset;
572
- const widthOffset = width + paddingOffset;
573
- const leftSpace = opts.style.marginLeft > 0 ? " ".repeat(opts.style.marginLeft) : "";
574
- if (opts.style.marginTop > 0) {
575
- boxLines.push("".repeat(opts.style.marginTop));
576
- }
577
- if (opts.title) {
578
- const left = borderStyle.h.repeat(
579
- Math.floor((width - stripAnsi(opts.title).length) / 2)
580
- );
581
- const right = borderStyle.h.repeat(
582
- width - stripAnsi(opts.title).length - stripAnsi(left).length + paddingOffset
583
- );
584
- boxLines.push(
585
- `${leftSpace}${borderStyle.tl}${left}${opts.title}${right}${borderStyle.tr}`
586
- );
587
- } else {
588
- boxLines.push(
589
- `${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`
590
- );
591
- }
592
- const valignOffset = opts.style.valign === "center" ? Math.floor((height - textLines.length) / 2) : opts.style.valign === "top" ? height - textLines.length - paddingOffset : height - textLines.length;
593
- for (let i = 0; i < height; i++) {
594
- if (i < valignOffset || i >= valignOffset + textLines.length) {
595
- boxLines.push(
596
- `${leftSpace}${borderStyle.v}${" ".repeat(widthOffset)}${borderStyle.v}`
597
- );
598
- } else {
599
- const line = textLines[i - valignOffset];
600
- const left = " ".repeat(paddingOffset);
601
- const right = " ".repeat(width - stripAnsi(line).length);
602
- boxLines.push(
603
- `${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`
604
- );
605
- }
606
- }
607
- boxLines.push(
608
- `${leftSpace}${borderStyle.bl}${borderStyle.h.repeat(widthOffset)}${borderStyle.br}`
609
- );
610
- if (opts.style.marginBottom > 0) {
611
- boxLines.push("".repeat(opts.style.marginBottom));
612
- }
613
- return boxLines.join("\n");
614
- }
615
- var tty, env, argv, platform, isDisabled, isForced, isWindows, isDumbTerminal, isCompatibleTerminal, isCI, isColorSupported, colorDefs, colors, ansiRegex, boxStylePresets, defaultStyle;
616
- var init_utils = __esm({
617
- "node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/utils.mjs"() {
618
- "use strict";
619
- init_cjs_shims();
620
- tty = __toESM(require("tty"), 1);
621
- ({
622
- env = {},
623
- argv = [],
624
- platform = ""
625
- } = typeof process === "undefined" ? {} : process);
626
- isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
627
- isForced = "FORCE_COLOR" in env || argv.includes("--color");
628
- isWindows = platform === "win32";
629
- isDumbTerminal = env.TERM === "dumb";
630
- isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;
631
- isCI = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
632
- isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);
633
- colorDefs = {
634
- reset: init(0, 0),
635
- bold: init(1, 22, "\x1B[22m\x1B[1m"),
636
- dim: init(2, 22, "\x1B[22m\x1B[2m"),
637
- italic: init(3, 23),
638
- underline: init(4, 24),
639
- inverse: init(7, 27),
640
- hidden: init(8, 28),
641
- strikethrough: init(9, 29),
642
- black: init(30, 39),
643
- red: init(31, 39),
644
- green: init(32, 39),
645
- yellow: init(33, 39),
646
- blue: init(34, 39),
647
- magenta: init(35, 39),
648
- cyan: init(36, 39),
649
- white: init(37, 39),
650
- gray: init(90, 39),
651
- bgBlack: init(40, 49),
652
- bgRed: init(41, 49),
653
- bgGreen: init(42, 49),
654
- bgYellow: init(43, 49),
655
- bgBlue: init(44, 49),
656
- bgMagenta: init(45, 49),
657
- bgCyan: init(46, 49),
658
- bgWhite: init(47, 49),
659
- blackBright: init(90, 39),
660
- redBright: init(91, 39),
661
- greenBright: init(92, 39),
662
- yellowBright: init(93, 39),
663
- blueBright: init(94, 39),
664
- magentaBright: init(95, 39),
665
- cyanBright: init(96, 39),
666
- whiteBright: init(97, 39),
667
- bgBlackBright: init(100, 49),
668
- bgRedBright: init(101, 49),
669
- bgGreenBright: init(102, 49),
670
- bgYellowBright: init(103, 49),
671
- bgBlueBright: init(104, 49),
672
- bgMagentaBright: init(105, 49),
673
- bgCyanBright: init(106, 49),
674
- bgWhiteBright: init(107, 49)
675
- };
676
- colors = createColors();
677
- ansiRegex = [
678
- "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
679
- "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"
680
- ].join("|");
681
- boxStylePresets = {
682
- solid: {
683
- tl: "\u250C",
684
- tr: "\u2510",
685
- bl: "\u2514",
686
- br: "\u2518",
687
- h: "\u2500",
688
- v: "\u2502"
689
- },
690
- double: {
691
- tl: "\u2554",
692
- tr: "\u2557",
693
- bl: "\u255A",
694
- br: "\u255D",
695
- h: "\u2550",
696
- v: "\u2551"
697
- },
698
- doubleSingle: {
699
- tl: "\u2553",
700
- tr: "\u2556",
701
- bl: "\u2559",
702
- br: "\u255C",
703
- h: "\u2500",
704
- v: "\u2551"
705
- },
706
- doubleSingleRounded: {
707
- tl: "\u256D",
708
- tr: "\u256E",
709
- bl: "\u2570",
710
- br: "\u256F",
711
- h: "\u2500",
712
- v: "\u2551"
713
- },
714
- singleThick: {
715
- tl: "\u250F",
716
- tr: "\u2513",
717
- bl: "\u2517",
718
- br: "\u251B",
719
- h: "\u2501",
720
- v: "\u2503"
721
- },
722
- singleDouble: {
723
- tl: "\u2552",
724
- tr: "\u2555",
725
- bl: "\u2558",
726
- br: "\u255B",
727
- h: "\u2550",
728
- v: "\u2502"
729
- },
730
- singleDoubleRounded: {
731
- tl: "\u256D",
732
- tr: "\u256E",
733
- bl: "\u2570",
734
- br: "\u256F",
735
- h: "\u2550",
736
- v: "\u2502"
737
- },
738
- rounded: {
739
- tl: "\u256D",
740
- tr: "\u256E",
741
- bl: "\u2570",
742
- br: "\u256F",
743
- h: "\u2500",
744
- v: "\u2502"
745
- }
746
- };
747
- defaultStyle = {
748
- borderColor: "white",
749
- borderStyle: "rounded",
750
- valign: "center",
751
- padding: 2,
752
- marginLeft: 1,
753
- marginTop: 1,
754
- marginBottom: 1
99
+ };
100
+ src = { cursor, scroll, erase, beep };
101
+ return src;
102
+ }
103
+ function requirePicocolors() {
104
+ if (hasRequiredPicocolors) return picocolors.exports;
105
+ hasRequiredPicocolors = 1;
106
+ let p = process || {}, argv2 = p.argv || [], env2 = p.env || {};
107
+ 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);
108
+ let formatter = (open, close, replace = open) => (input) => {
109
+ let string = "" + input, index = string.indexOf(close, open.length);
110
+ return ~index ? open + replaceClose2(string, close, replace, index) + close : open + string + close;
111
+ };
112
+ let replaceClose2 = (string, close, replace, index) => {
113
+ let result = "", cursor = 0;
114
+ do {
115
+ result += string.substring(cursor, index) + replace;
116
+ cursor = index + close.length;
117
+ index = string.indexOf(close, cursor);
118
+ } while (~index);
119
+ return result + string.substring(cursor);
120
+ };
121
+ let createColors2 = (enabled = isColorSupported2) => {
122
+ let f3 = enabled ? formatter : () => String;
123
+ return {
124
+ isColorSupported: enabled,
125
+ reset: f3("\x1B[0m", "\x1B[0m"),
126
+ bold: f3("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
127
+ dim: f3("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
128
+ italic: f3("\x1B[3m", "\x1B[23m"),
129
+ underline: f3("\x1B[4m", "\x1B[24m"),
130
+ inverse: f3("\x1B[7m", "\x1B[27m"),
131
+ hidden: f3("\x1B[8m", "\x1B[28m"),
132
+ strikethrough: f3("\x1B[9m", "\x1B[29m"),
133
+ black: f3("\x1B[30m", "\x1B[39m"),
134
+ red: f3("\x1B[31m", "\x1B[39m"),
135
+ green: f3("\x1B[32m", "\x1B[39m"),
136
+ yellow: f3("\x1B[33m", "\x1B[39m"),
137
+ blue: f3("\x1B[34m", "\x1B[39m"),
138
+ magenta: f3("\x1B[35m", "\x1B[39m"),
139
+ cyan: f3("\x1B[36m", "\x1B[39m"),
140
+ white: f3("\x1B[37m", "\x1B[39m"),
141
+ gray: f3("\x1B[90m", "\x1B[39m"),
142
+ bgBlack: f3("\x1B[40m", "\x1B[49m"),
143
+ bgRed: f3("\x1B[41m", "\x1B[49m"),
144
+ bgGreen: f3("\x1B[42m", "\x1B[49m"),
145
+ bgYellow: f3("\x1B[43m", "\x1B[49m"),
146
+ bgBlue: f3("\x1B[44m", "\x1B[49m"),
147
+ bgMagenta: f3("\x1B[45m", "\x1B[49m"),
148
+ bgCyan: f3("\x1B[46m", "\x1B[49m"),
149
+ bgWhite: f3("\x1B[47m", "\x1B[49m"),
150
+ blackBright: f3("\x1B[90m", "\x1B[39m"),
151
+ redBright: f3("\x1B[91m", "\x1B[39m"),
152
+ greenBright: f3("\x1B[92m", "\x1B[39m"),
153
+ yellowBright: f3("\x1B[93m", "\x1B[39m"),
154
+ blueBright: f3("\x1B[94m", "\x1B[39m"),
155
+ magentaBright: f3("\x1B[95m", "\x1B[39m"),
156
+ cyanBright: f3("\x1B[96m", "\x1B[39m"),
157
+ whiteBright: f3("\x1B[97m", "\x1B[39m"),
158
+ bgBlackBright: f3("\x1B[100m", "\x1B[49m"),
159
+ bgRedBright: f3("\x1B[101m", "\x1B[49m"),
160
+ bgGreenBright: f3("\x1B[102m", "\x1B[49m"),
161
+ bgYellowBright: f3("\x1B[103m", "\x1B[49m"),
162
+ bgBlueBright: f3("\x1B[104m", "\x1B[49m"),
163
+ bgMagentaBright: f3("\x1B[105m", "\x1B[49m"),
164
+ bgCyanBright: f3("\x1B[106m", "\x1B[49m"),
165
+ bgWhiteBright: f3("\x1B[107m", "\x1B[49m")
755
166
  };
756
- }
757
- });
758
-
759
- // node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/chunks/prompt.mjs
760
- var prompt_exports = {};
761
- __export(prompt_exports, {
762
- prompt: () => prompt
763
- });
764
- function z({ onlyFirst: t = false } = {}) {
765
- const u = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");
766
- return new RegExp(u, t ? void 0 : "g");
767
- }
768
- function $(t) {
769
- if (typeof t != "string")
770
- throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);
771
- return t.replace(z(), "");
772
- }
773
- function c(t, u = {}) {
774
- if (typeof t != "string" || t.length === 0 || (u = { ambiguousIsNarrow: true, ...u }, t = $(t), t.length === 0))
775
- return 0;
776
- t = t.replace(Y(), " ");
777
- const F = u.ambiguousIsNarrow ? 1 : 2;
778
- let e = 0;
779
- for (const s3 of t) {
780
- const C = s3.codePointAt(0);
781
- if (C <= 31 || C >= 127 && C <= 159 || C >= 768 && C <= 879)
782
- continue;
783
- switch (K.eastAsianWidth(s3)) {
167
+ };
168
+ picocolors.exports = createColors2();
169
+ picocolors.exports.createColors = createColors2;
170
+ return picocolors.exports;
171
+ }
172
+ function J({ onlyFirst: t2 = false } = {}) {
173
+ 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("|");
174
+ return new RegExp(F3, t2 ? void 0 : "g");
175
+ }
176
+ function T$1(t2) {
177
+ if (typeof t2 != "string") throw new TypeError(`Expected a \`string\`, got \`${typeof t2}\``);
178
+ return t2.replace(Q, "");
179
+ }
180
+ function O(t2) {
181
+ return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
182
+ }
183
+ function A$1(t2, u3 = {}) {
184
+ if (typeof t2 != "string" || t2.length === 0 || (u3 = { ambiguousIsNarrow: true, ...u3 }, t2 = T$1(t2), t2.length === 0)) return 0;
185
+ t2 = t2.replace(FD(), " ");
186
+ const F3 = u3.ambiguousIsNarrow ? 1 : 2;
187
+ let e2 = 0;
188
+ for (const s2 of t2) {
189
+ const i2 = s2.codePointAt(0);
190
+ if (i2 <= 31 || i2 >= 127 && i2 <= 159 || i2 >= 768 && i2 <= 879) continue;
191
+ switch (DD.eastAsianWidth(s2)) {
784
192
  case "F":
785
193
  case "W":
786
- e += 2;
194
+ e2 += 2;
787
195
  break;
788
196
  case "A":
789
- e += F;
197
+ e2 += F3;
790
198
  break;
791
199
  default:
792
- e += 1;
200
+ e2 += 1;
793
201
  }
794
202
  }
795
- return e;
796
- }
797
- function U() {
798
- const t = /* @__PURE__ */ new Map();
799
- for (const [u, F] of Object.entries(r)) {
800
- for (const [e, s3] of Object.entries(F))
801
- r[e] = { open: `\x1B[${s3[0]}m`, close: `\x1B[${s3[1]}m` }, F[e] = r[e], t.set(s3[0], s3[1]);
802
- Object.defineProperty(r, u, { value: F, enumerable: false });
803
- }
804
- return Object.defineProperty(r, "codes", { value: t, enumerable: false }), r.color.close = "\x1B[39m", r.bgColor.close = "\x1B[49m", r.color.ansi = L(), r.color.ansi256 = M(), r.color.ansi16m = T(), r.bgColor.ansi = L(v), r.bgColor.ansi256 = M(v), r.bgColor.ansi16m = T(v), Object.defineProperties(r, { rgbToAnsi256: { value: (u, F, e) => u === F && F === e ? 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(e / 255 * 5), enumerable: false }, hexToRgb: { value: (u) => {
805
- const F = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));
806
- if (!F)
807
- return [0, 0, 0];
808
- let [e] = F;
809
- e.length === 3 && (e = [...e].map((C) => C + C).join(""));
810
- const s3 = Number.parseInt(e, 16);
811
- return [s3 >> 16 & 255, s3 >> 8 & 255, s3 & 255];
812
- }, enumerable: false }, hexToAnsi256: { value: (u) => r.rgbToAnsi256(...r.hexToRgb(u)), enumerable: false }, ansi256ToAnsi: { value: (u) => {
813
- if (u < 8)
814
- return 30 + u;
815
- if (u < 16)
816
- return 90 + (u - 8);
817
- let F, e, s3;
818
- if (u >= 232)
819
- F = ((u - 232) * 10 + 8) / 255, e = F, s3 = F;
203
+ return e2;
204
+ }
205
+ function sD() {
206
+ const t2 = /* @__PURE__ */ new Map();
207
+ for (const [u3, F3] of Object.entries(r)) {
208
+ for (const [e2, s2] of Object.entries(F3)) r[e2] = { open: `\x1B[${s2[0]}m`, close: `\x1B[${s2[1]}m` }, F3[e2] = r[e2], t2.set(s2[0], s2[1]);
209
+ Object.defineProperty(r, u3, { value: F3, enumerable: false });
210
+ }
211
+ return Object.defineProperty(r, "codes", { value: t2, 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: (u3, F3, e2) => u3 === F3 && F3 === e2 ? 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(e2 / 255 * 5), enumerable: false }, hexToRgb: { value: (u3) => {
212
+ const F3 = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u3.toString(16));
213
+ if (!F3) return [0, 0, 0];
214
+ let [e2] = F3;
215
+ e2.length === 3 && (e2 = [...e2].map((i2) => i2 + i2).join(""));
216
+ const s2 = Number.parseInt(e2, 16);
217
+ return [s2 >> 16 & 255, s2 >> 8 & 255, s2 & 255];
218
+ }, enumerable: false }, hexToAnsi256: { value: (u3) => r.rgbToAnsi256(...r.hexToRgb(u3)), enumerable: false }, ansi256ToAnsi: { value: (u3) => {
219
+ if (u3 < 8) return 30 + u3;
220
+ if (u3 < 16) return 90 + (u3 - 8);
221
+ let F3, e2, s2;
222
+ if (u3 >= 232) F3 = ((u3 - 232) * 10 + 8) / 255, e2 = F3, s2 = F3;
820
223
  else {
821
- u -= 16;
822
- const i = u % 36;
823
- F = Math.floor(u / 36) / 5, e = Math.floor(i / 6) / 5, s3 = i % 6 / 5;
224
+ u3 -= 16;
225
+ const C3 = u3 % 36;
226
+ F3 = Math.floor(u3 / 36) / 5, e2 = Math.floor(C3 / 6) / 5, s2 = C3 % 6 / 5;
824
227
  }
825
- const C = Math.max(F, e, s3) * 2;
826
- if (C === 0)
827
- return 30;
828
- let D = 30 + (Math.round(s3) << 2 | Math.round(e) << 1 | Math.round(F));
829
- return C === 2 && (D += 60), D;
830
- }, enumerable: false }, rgbToAnsi: { value: (u, F, e) => r.ansi256ToAnsi(r.rgbToAnsi256(u, F, e)), enumerable: false }, hexToAnsi: { value: (u) => r.ansi256ToAnsi(r.hexToAnsi256(u)), enumerable: false } }), r;
831
- }
832
- function P(t, u, F) {
833
- return String(t).normalize().replace(/\r\n/g, `
228
+ const i2 = Math.max(F3, e2, s2) * 2;
229
+ if (i2 === 0) return 30;
230
+ let D2 = 30 + (Math.round(s2) << 2 | Math.round(e2) << 1 | Math.round(F3));
231
+ return i2 === 2 && (D2 += 60), D2;
232
+ }, enumerable: false }, rgbToAnsi: { value: (u3, F3, e2) => r.ansi256ToAnsi(r.rgbToAnsi256(u3, F3, e2)), enumerable: false }, hexToAnsi: { value: (u3) => r.ansi256ToAnsi(r.hexToAnsi256(u3)), enumerable: false } }), r;
233
+ }
234
+ function G(t2, u3, F3) {
235
+ return String(t2).normalize().replace(/\r\n/g, `
834
236
  `).split(`
835
- `).map((e) => uD(e, u, F)).join(`
237
+ `).map((e2) => oD(e2, u3, F3)).join(`
836
238
  `);
837
239
  }
838
- function FD(t, u) {
839
- if (t === u)
840
- return;
841
- const F = t.split(`
842
- `), e = u.split(`
843
- `), s3 = [];
844
- for (let C = 0; C < Math.max(F.length, e.length); C++)
845
- F[C] !== e[C] && s3.push(C);
846
- return s3;
240
+ function k$1(t2, u3) {
241
+ if (typeof t2 == "string") return c.aliases.get(t2) === u3;
242
+ for (const F3 of t2) if (F3 !== void 0 && k$1(F3, u3)) return true;
243
+ return false;
244
+ }
245
+ function lD(t2, u3) {
246
+ if (t2 === u3) return;
247
+ const F3 = t2.split(`
248
+ `), e2 = u3.split(`
249
+ `), s2 = [];
250
+ for (let i2 = 0; i2 < Math.max(F3.length, e2.length); i2++) F3[i2] !== e2[i2] && s2.push(i2);
251
+ return s2;
847
252
  }
848
- function g(t, u) {
849
- t.isTTY && t.setRawMode(u);
253
+ function d$1(t2, u3) {
254
+ const F3 = t2;
255
+ F3.isTTY && F3.setRawMode(u3);
256
+ }
257
+ function ce() {
258
+ return import_node_process.default.platform !== "win32" ? import_node_process.default.env.TERM !== "linux" : !!import_node_process.default.env.CI || !!import_node_process.default.env.WT_SESSION || !!import_node_process.default.env.TERMINUS_SUBLIME || import_node_process.default.env.ConEmuTask === "{cmd::Cmder}" || import_node_process.default.env.TERM_PROGRAM === "Terminus-Sublime" || import_node_process.default.env.TERM_PROGRAM === "vscode" || import_node_process.default.env.TERM === "xterm-256color" || import_node_process.default.env.TERM === "alacritty" || import_node_process.default.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
850
259
  }
851
260
  async function prompt(message, opts = {}) {
261
+ const handleCancel = (value) => {
262
+ if (typeof value !== "symbol" || value.toString() !== "Symbol(clack:cancel)") {
263
+ return value;
264
+ }
265
+ switch (opts.cancel) {
266
+ case "reject": {
267
+ const error = new Error("Prompt cancelled.");
268
+ error.name = "ConsolaPromptCancelledError";
269
+ if (Error.captureStackTrace) {
270
+ Error.captureStackTrace(error, prompt);
271
+ }
272
+ throw error;
273
+ }
274
+ case "undefined": {
275
+ return void 0;
276
+ }
277
+ case "null": {
278
+ return null;
279
+ }
280
+ case "symbol": {
281
+ return kCancel;
282
+ }
283
+ default:
284
+ case "default": {
285
+ return opts.default ?? opts.initial;
286
+ }
287
+ }
288
+ };
852
289
  if (!opts.type || opts.type === "text") {
853
- return await text({
290
+ return await he({
854
291
  message,
855
292
  defaultValue: opts.default,
856
293
  placeholder: opts.placeholder,
857
294
  initialValue: opts.initial
858
- });
295
+ }).then(handleCancel);
859
296
  }
860
297
  if (opts.type === "confirm") {
861
- return await confirm({
298
+ return await ye({
862
299
  message,
863
300
  initialValue: opts.initial
864
- });
301
+ }).then(handleCancel);
865
302
  }
866
303
  if (opts.type === "select") {
867
- return await select({
304
+ return await ve({
868
305
  message,
869
306
  options: opts.options.map(
870
- (o) => typeof o === "string" ? { value: o, label: o } : o
871
- )
872
- });
307
+ (o3) => typeof o3 === "string" ? { value: o3, label: o3 } : o3
308
+ ),
309
+ initialValue: opts.initial
310
+ }).then(handleCancel);
873
311
  }
874
312
  if (opts.type === "multiselect") {
875
- return await multiselect({
313
+ return await fe({
876
314
  message,
877
315
  options: opts.options.map(
878
- (o) => typeof o === "string" ? { value: o, label: o } : o
316
+ (o3) => typeof o3 === "string" ? { value: o3, label: o3 } : o3
879
317
  ),
880
- required: opts.required
881
- });
318
+ required: opts.required,
319
+ initialValues: opts.initial
320
+ }).then(handleCancel);
882
321
  }
883
322
  throw new Error(`Unknown prompt type: ${opts.type}`);
884
323
  }
885
- var import_node_process, import_node_readline, import_node_tty, import_tty, import_node_util2, import_node_path2, ESC, CSI, beep, cursor, scroll, erase, src, picocolors, tty2, isColorSupported2, formatter, replaceClose2, createColors2, picocolorsExports, l, m, G, K, Y, v, L, M, T, r, Z, H, q, p, J, b, W, Q, I, w, N, j, X, _, DD, uD, R, V, tD, h, sD, iD, ED, oD, unicode, s, S_STEP_ACTIVE, S_STEP_CANCEL, S_STEP_ERROR, S_STEP_SUBMIT, S_BAR, S_BAR_END, S_RADIO_ACTIVE, S_RADIO_INACTIVE, S_CHECKBOX_ACTIVE, S_CHECKBOX_SELECTED, S_CHECKBOX_INACTIVE, symbol, text, confirm, select, multiselect;
324
+ var import_node_util2, import_node_process, import_node_readline, import_node_tty, src, hasRequiredSrc, srcExports, picocolors, hasRequiredPicocolors, picocolorsExports, e, Q, P$1, X, DD, uD, FD, m, L$1, N, I, r, tD, eD, iD, v, CD, w$1, W$1, rD, R, y, V$1, z, ED, _, nD, oD, aD, c, S, AD, pD, h, x, fD, bD, mD, Y, wD, SD, $D, q, jD, PD, V, u, le, L, W, C, o, d, k, P, A, T, F, w, B, he, ye, ve, fe, kCancel;
886
325
  var init_prompt = __esm({
887
- "node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/chunks/prompt.mjs"() {
326
+ "node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/chunks/prompt.mjs"() {
888
327
  "use strict";
889
328
  init_cjs_shims();
890
- import_node_process = require("process");
329
+ import_node_util2 = require("util");
330
+ import_node_process = __toESM(require("process"), 1);
891
331
  import_node_readline = __toESM(require("readline"), 1);
892
332
  import_node_tty = require("tty");
893
- init_consola_36c0034f();
894
- import_tty = __toESM(require("tty"), 1);
895
- init_utils();
896
- init_core();
897
- init_consola_06ad8a64();
898
- import_node_util2 = require("util");
899
- import_node_path2 = require("path");
900
- ESC = "\x1B";
901
- CSI = `${ESC}[`;
902
- beep = "\x07";
903
- cursor = {
904
- to(x, y) {
905
- if (!y)
906
- return `${CSI}${x + 1}G`;
907
- return `${CSI}${y + 1};${x + 1}H`;
908
- },
909
- move(x, y) {
910
- let ret = "";
911
- if (x < 0)
912
- ret += `${CSI}${-x}D`;
913
- else if (x > 0)
914
- ret += `${CSI}${x}C`;
915
- if (y < 0)
916
- ret += `${CSI}${-y}A`;
917
- else if (y > 0)
918
- ret += `${CSI}${y}B`;
919
- return ret;
920
- },
921
- up: (count = 1) => `${CSI}${count}A`,
922
- down: (count = 1) => `${CSI}${count}B`,
923
- forward: (count = 1) => `${CSI}${count}C`,
924
- backward: (count = 1) => `${CSI}${count}D`,
925
- nextLine: (count = 1) => `${CSI}E`.repeat(count),
926
- prevLine: (count = 1) => `${CSI}F`.repeat(count),
927
- left: `${CSI}G`,
928
- hide: `${CSI}?25l`,
929
- show: `${CSI}?25h`,
930
- save: `${ESC}7`,
931
- restore: `${ESC}8`
932
- };
933
- scroll = {
934
- up: (count = 1) => `${CSI}S`.repeat(count),
935
- down: (count = 1) => `${CSI}T`.repeat(count)
936
- };
937
- erase = {
938
- screen: `${CSI}2J`,
939
- up: (count = 1) => `${CSI}1J`.repeat(count),
940
- down: (count = 1) => `${CSI}J`.repeat(count),
941
- line: `${CSI}2K`,
942
- lineEnd: `${CSI}K`,
943
- lineStart: `${CSI}1K`,
944
- lines(count) {
945
- let clear = "";
946
- for (let i = 0; i < count; i++)
947
- clear += this.line + (i < count - 1 ? cursor.up() : "");
948
- if (count)
949
- clear += cursor.left;
950
- return clear;
951
- }
952
- };
953
- src = { cursor, scroll, erase, beep };
333
+ srcExports = requireSrc();
954
334
  picocolors = { exports: {} };
955
- tty2 = import_tty.default;
956
- isColorSupported2 = !("NO_COLOR" in process.env || process.argv.includes("--no-color")) && ("FORCE_COLOR" in process.env || process.argv.includes("--color") || process.platform === "win32" || tty2.isatty(1) && process.env.TERM !== "dumb" || "CI" in process.env);
957
- formatter = (open, close, replace = open) => (input) => {
958
- let string = "" + input;
959
- let index = string.indexOf(close, open.length);
960
- return ~index ? open + replaceClose2(string, close, replace, index) + close : open + string + close;
961
- };
962
- replaceClose2 = (string, close, replace, index) => {
963
- let start = string.substring(0, index) + replace;
964
- let end = string.substring(index + close.length);
965
- let nextIndex = end.indexOf(close);
966
- return ~nextIndex ? start + replaceClose2(end, close, replace, nextIndex) : start + end;
967
- };
968
- createColors2 = (enabled = isColorSupported2) => ({
969
- isColorSupported: enabled,
970
- reset: enabled ? (s3) => `\x1B[0m${s3}\x1B[0m` : String,
971
- bold: enabled ? formatter("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m") : String,
972
- dim: enabled ? formatter("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m") : String,
973
- italic: enabled ? formatter("\x1B[3m", "\x1B[23m") : String,
974
- underline: enabled ? formatter("\x1B[4m", "\x1B[24m") : String,
975
- inverse: enabled ? formatter("\x1B[7m", "\x1B[27m") : String,
976
- hidden: enabled ? formatter("\x1B[8m", "\x1B[28m") : String,
977
- strikethrough: enabled ? formatter("\x1B[9m", "\x1B[29m") : String,
978
- black: enabled ? formatter("\x1B[30m", "\x1B[39m") : String,
979
- red: enabled ? formatter("\x1B[31m", "\x1B[39m") : String,
980
- green: enabled ? formatter("\x1B[32m", "\x1B[39m") : String,
981
- yellow: enabled ? formatter("\x1B[33m", "\x1B[39m") : String,
982
- blue: enabled ? formatter("\x1B[34m", "\x1B[39m") : String,
983
- magenta: enabled ? formatter("\x1B[35m", "\x1B[39m") : String,
984
- cyan: enabled ? formatter("\x1B[36m", "\x1B[39m") : String,
985
- white: enabled ? formatter("\x1B[37m", "\x1B[39m") : String,
986
- gray: enabled ? formatter("\x1B[90m", "\x1B[39m") : String,
987
- bgBlack: enabled ? formatter("\x1B[40m", "\x1B[49m") : String,
988
- bgRed: enabled ? formatter("\x1B[41m", "\x1B[49m") : String,
989
- bgGreen: enabled ? formatter("\x1B[42m", "\x1B[49m") : String,
990
- bgYellow: enabled ? formatter("\x1B[43m", "\x1B[49m") : String,
991
- bgBlue: enabled ? formatter("\x1B[44m", "\x1B[49m") : String,
992
- bgMagenta: enabled ? formatter("\x1B[45m", "\x1B[49m") : String,
993
- bgCyan: enabled ? formatter("\x1B[46m", "\x1B[49m") : String,
994
- bgWhite: enabled ? formatter("\x1B[47m", "\x1B[49m") : String
995
- });
996
- picocolors.exports = createColors2();
997
- picocolors.exports.createColors = createColors2;
998
- picocolorsExports = picocolors.exports;
999
- l = /* @__PURE__ */ getDefaultExportFromCjs(picocolorsExports);
1000
- m = {};
1001
- G = { get exports() {
1002
- return m;
1003
- }, set exports(t) {
1004
- m = t;
1005
- } };
1006
- (function(t) {
1007
- var u = {};
1008
- t.exports = u, u.eastAsianWidth = function(e) {
1009
- var s3 = e.charCodeAt(0), C = e.length == 2 ? e.charCodeAt(1) : 0, D = s3;
1010
- return 55296 <= s3 && s3 <= 56319 && 56320 <= C && C <= 57343 && (s3 &= 1023, C &= 1023, D = s3 << 10 | C, 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";
1011
- }, u.characterLength = function(e) {
1012
- var s3 = this.eastAsianWidth(e);
1013
- return s3 == "F" || s3 == "W" || s3 == "A" ? 2 : 1;
335
+ picocolorsExports = /* @__PURE__ */ requirePicocolors();
336
+ e = /* @__PURE__ */ getDefaultExportFromCjs(picocolorsExports);
337
+ Q = J();
338
+ P$1 = { exports: {} };
339
+ (function(t2) {
340
+ var u3 = {};
341
+ t2.exports = u3, u3.eastAsianWidth = function(e2) {
342
+ var s2 = e2.charCodeAt(0), i2 = e2.length == 2 ? e2.charCodeAt(1) : 0, D2 = s2;
343
+ return 55296 <= s2 && s2 <= 56319 && 56320 <= i2 && i2 <= 57343 && (s2 &= 1023, i2 &= 1023, D2 = s2 << 10 | i2, 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";
344
+ }, u3.characterLength = function(e2) {
345
+ var s2 = this.eastAsianWidth(e2);
346
+ return s2 == "F" || s2 == "W" || s2 == "A" ? 2 : 1;
1014
347
  };
1015
- function F(e) {
1016
- return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
1017
- }
1018
- u.length = function(e) {
1019
- for (var s3 = F(e), C = 0, D = 0; D < s3.length; D++)
1020
- C = C + this.characterLength(s3[D]);
1021
- return C;
1022
- }, u.slice = function(e, s3, C) {
1023
- textLen = u.length(e), s3 = s3 || 0, C = C || 1, s3 < 0 && (s3 = textLen + s3), C < 0 && (C = textLen + C);
1024
- for (var D = "", i = 0, o = F(e), E = 0; E < o.length; E++) {
1025
- var a = o[E], n = u.length(a);
1026
- if (i >= s3 - (n == 2 ? 1 : 0))
1027
- if (i + n <= C)
1028
- D += a;
1029
- else
1030
- break;
1031
- i += n;
348
+ function F3(e2) {
349
+ return e2.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
350
+ }
351
+ u3.length = function(e2) {
352
+ for (var s2 = F3(e2), i2 = 0, D2 = 0; D2 < s2.length; D2++) i2 = i2 + this.characterLength(s2[D2]);
353
+ return i2;
354
+ }, u3.slice = function(e2, s2, i2) {
355
+ textLen = u3.length(e2), s2 = s2 || 0, i2 = i2 || 1, s2 < 0 && (s2 = textLen + s2), i2 < 0 && (i2 = textLen + i2);
356
+ for (var D2 = "", C3 = 0, o3 = F3(e2), E = 0; E < o3.length; E++) {
357
+ var a2 = o3[E], n2 = u3.length(a2);
358
+ if (C3 >= s2 - (n2 == 2 ? 1 : 0)) if (C3 + n2 <= i2) D2 += a2;
359
+ else break;
360
+ C3 += n2;
1032
361
  }
1033
- return D;
362
+ return D2;
1034
363
  };
1035
- })(G);
1036
- K = m;
1037
- Y = function() {
364
+ })(P$1);
365
+ X = P$1.exports;
366
+ DD = O(X);
367
+ uD = function() {
1038
368
  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;
1039
369
  };
1040
- v = 10;
1041
- L = (t = 0) => (u) => `\x1B[${u + t}m`;
1042
- M = (t = 0) => (u) => `\x1B[${38 + t};5;${u}m`;
1043
- T = (t = 0) => (u, F, e) => `\x1B[${38 + t};2;${u};${F};${e}m`;
370
+ FD = O(uD);
371
+ m = 10;
372
+ L$1 = (t2 = 0) => (u3) => `\x1B[${u3 + t2}m`;
373
+ N = (t2 = 0) => (u3) => `\x1B[${38 + t2};5;${u3}m`;
374
+ I = (t2 = 0) => (u3, F3, e2) => `\x1B[${38 + t2};2;${u3};${F3};${e2}m`;
1044
375
  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] } };
1045
376
  Object.keys(r.modifier);
1046
- Z = Object.keys(r.color);
1047
- H = Object.keys(r.bgColor);
1048
- [...Z, ...H];
1049
- q = U();
1050
- p = /* @__PURE__ */ new Set(["\x1B", "\x9B"]);
1051
- J = 39;
1052
- b = "\x07";
1053
- W = "[";
1054
- Q = "]";
1055
- I = "m";
1056
- w = `${Q}8;;`;
1057
- N = (t) => `${p.values().next().value}${W}${t}${I}`;
1058
- j = (t) => `${p.values().next().value}${w}${t}${b}`;
1059
- X = (t) => t.split(" ").map((u) => c(u));
1060
- _ = (t, u, F) => {
1061
- const e = [...u];
1062
- let s3 = false, C = false, D = c($(t[t.length - 1]));
1063
- for (const [i, o] of e.entries()) {
1064
- const E = c(o);
1065
- if (D + E <= F ? t[t.length - 1] += o : (t.push(o), D = 0), p.has(o) && (s3 = true, C = e.slice(i + 1).join("").startsWith(w)), s3) {
1066
- C ? o === b && (s3 = false, C = false) : o === I && (s3 = false);
377
+ tD = Object.keys(r.color);
378
+ eD = Object.keys(r.bgColor);
379
+ [...tD, ...eD];
380
+ iD = sD();
381
+ v = /* @__PURE__ */ new Set(["\x1B", "\x9B"]);
382
+ CD = 39;
383
+ w$1 = "\x07";
384
+ W$1 = "[";
385
+ rD = "]";
386
+ R = "m";
387
+ y = `${rD}8;;`;
388
+ V$1 = (t2) => `${v.values().next().value}${W$1}${t2}${R}`;
389
+ z = (t2) => `${v.values().next().value}${y}${t2}${w$1}`;
390
+ ED = (t2) => t2.split(" ").map((u3) => A$1(u3));
391
+ _ = (t2, u3, F3) => {
392
+ const e2 = [...u3];
393
+ let s2 = false, i2 = false, D2 = A$1(T$1(t2[t2.length - 1]));
394
+ for (const [C3, o3] of e2.entries()) {
395
+ const E = A$1(o3);
396
+ if (D2 + E <= F3 ? t2[t2.length - 1] += o3 : (t2.push(o3), D2 = 0), v.has(o3) && (s2 = true, i2 = e2.slice(C3 + 1).join("").startsWith(y)), s2) {
397
+ i2 ? o3 === w$1 && (s2 = false, i2 = false) : o3 === R && (s2 = false);
1067
398
  continue;
1068
399
  }
1069
- D += E, D === F && i < e.length - 1 && (t.push(""), D = 0);
400
+ D2 += E, D2 === F3 && C3 < e2.length - 1 && (t2.push(""), D2 = 0);
1070
401
  }
1071
- !D && t[t.length - 1].length > 0 && t.length > 1 && (t[t.length - 2] += t.pop());
402
+ !D2 && t2[t2.length - 1].length > 0 && t2.length > 1 && (t2[t2.length - 2] += t2.pop());
1072
403
  };
1073
- DD = (t) => {
1074
- const u = t.split(" ");
1075
- let F = u.length;
1076
- for (; F > 0 && !(c(u[F - 1]) > 0); )
1077
- F--;
1078
- return F === u.length ? t : u.slice(0, F).join(" ") + u.slice(F).join("");
404
+ nD = (t2) => {
405
+ const u3 = t2.split(" ");
406
+ let F3 = u3.length;
407
+ for (; F3 > 0 && !(A$1(u3[F3 - 1]) > 0); ) F3--;
408
+ return F3 === u3.length ? t2 : u3.slice(0, F3).join(" ") + u3.slice(F3).join("");
1079
409
  };
1080
- uD = (t, u, F = {}) => {
1081
- if (F.trim !== false && t.trim() === "")
1082
- return "";
1083
- let e = "", s3, C;
1084
- const D = X(t);
1085
- let i = [""];
1086
- for (const [E, a] of t.split(" ").entries()) {
1087
- F.trim !== false && (i[i.length - 1] = i[i.length - 1].trimStart());
1088
- let n = c(i[i.length - 1]);
1089
- if (E !== 0 && (n >= u && (F.wordWrap === false || F.trim === false) && (i.push(""), n = 0), (n > 0 || F.trim === false) && (i[i.length - 1] += " ", n++)), F.hard && D[E] > u) {
1090
- const B = u - n, A = 1 + Math.floor((D[E] - B - 1) / u);
1091
- Math.floor((D[E] - 1) / u) < A && i.push(""), _(i, a, u);
410
+ oD = (t2, u3, F3 = {}) => {
411
+ if (F3.trim !== false && t2.trim() === "") return "";
412
+ let e2 = "", s2, i2;
413
+ const D2 = ED(t2);
414
+ let C3 = [""];
415
+ for (const [E, a2] of t2.split(" ").entries()) {
416
+ F3.trim !== false && (C3[C3.length - 1] = C3[C3.length - 1].trimStart());
417
+ let n2 = A$1(C3[C3.length - 1]);
418
+ if (E !== 0 && (n2 >= u3 && (F3.wordWrap === false || F3.trim === false) && (C3.push(""), n2 = 0), (n2 > 0 || F3.trim === false) && (C3[C3.length - 1] += " ", n2++)), F3.hard && D2[E] > u3) {
419
+ const B2 = u3 - n2, p = 1 + Math.floor((D2[E] - B2 - 1) / u3);
420
+ Math.floor((D2[E] - 1) / u3) < p && C3.push(""), _(C3, a2, u3);
1092
421
  continue;
1093
422
  }
1094
- if (n + D[E] > u && n > 0 && D[E] > 0) {
1095
- if (F.wordWrap === false && n < u) {
1096
- _(i, a, u);
423
+ if (n2 + D2[E] > u3 && n2 > 0 && D2[E] > 0) {
424
+ if (F3.wordWrap === false && n2 < u3) {
425
+ _(C3, a2, u3);
1097
426
  continue;
1098
427
  }
1099
- i.push("");
428
+ C3.push("");
1100
429
  }
1101
- if (n + D[E] > u && F.wordWrap === false) {
1102
- _(i, a, u);
430
+ if (n2 + D2[E] > u3 && F3.wordWrap === false) {
431
+ _(C3, a2, u3);
1103
432
  continue;
1104
433
  }
1105
- i[i.length - 1] += a;
434
+ C3[C3.length - 1] += a2;
1106
435
  }
1107
- F.trim !== false && (i = i.map((E) => DD(E)));
1108
- const o = [...i.join(`
436
+ F3.trim !== false && (C3 = C3.map((E) => nD(E)));
437
+ const o3 = [...C3.join(`
1109
438
  `)];
1110
- for (const [E, a] of o.entries()) {
1111
- if (e += a, p.has(a)) {
1112
- const { groups: B } = new RegExp(`(?:\\${W}(?<code>\\d+)m|\\${w}(?<uri>.*)${b})`).exec(o.slice(E).join("")) || { groups: {} };
1113
- if (B.code !== void 0) {
1114
- const A = Number.parseFloat(B.code);
1115
- s3 = A === J ? void 0 : A;
1116
- } else
1117
- B.uri !== void 0 && (C = B.uri.length === 0 ? void 0 : B.uri);
439
+ for (const [E, a2] of o3.entries()) {
440
+ if (e2 += a2, v.has(a2)) {
441
+ const { groups: B2 } = new RegExp(`(?:\\${W$1}(?<code>\\d+)m|\\${y}(?<uri>.*)${w$1})`).exec(o3.slice(E).join("")) || { groups: {} };
442
+ if (B2.code !== void 0) {
443
+ const p = Number.parseFloat(B2.code);
444
+ s2 = p === CD ? void 0 : p;
445
+ } else B2.uri !== void 0 && (i2 = B2.uri.length === 0 ? void 0 : B2.uri);
1118
446
  }
1119
- const n = q.codes.get(Number(s3));
1120
- o[E + 1] === `
1121
- ` ? (C && (e += j("")), s3 && n && (e += N(n))) : a === `
1122
- ` && (s3 && n && (e += N(s3)), C && (e += j(C)));
447
+ const n2 = iD.codes.get(Number(s2));
448
+ o3[E + 1] === `
449
+ ` ? (i2 && (e2 += z("")), s2 && n2 && (e2 += V$1(n2))) : a2 === `
450
+ ` && (s2 && n2 && (e2 += V$1(s2)), i2 && (e2 += z(i2)));
1123
451
  }
1124
- return e;
452
+ return e2;
1125
453
  };
1126
- R = Symbol("clack:cancel");
1127
- V = /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"]]);
1128
- tD = /* @__PURE__ */ new Set(["up", "down", "left", "right", "space", "enter"]);
1129
- h = class {
1130
- constructor({ render: u, input: F = import_node_process.stdin, output: e = import_node_process.stdout, ...s3 }, C = true) {
1131
- this._track = false, this._cursor = 0, this.state = "initial", this.error = "", this.subscribers = /* @__PURE__ */ new Map(), this._prevFrame = "", this.opts = s3, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = u.bind(this), this._track = C, this.input = F, this.output = e;
454
+ aD = ["up", "down", "left", "right", "space", "enter", "cancel"];
455
+ c = { actions: new Set(aD), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]) };
456
+ globalThis.process.platform.startsWith("win");
457
+ S = Symbol("clack:cancel");
458
+ AD = Object.defineProperty;
459
+ pD = (t2, u3, F3) => u3 in t2 ? AD(t2, u3, { enumerable: true, configurable: true, writable: true, value: F3 }) : t2[u3] = F3;
460
+ h = (t2, u3, F3) => (pD(t2, typeof u3 != "symbol" ? u3 + "" : u3, F3), F3);
461
+ x = class {
462
+ constructor(u3, F3 = true) {
463
+ 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", /* @__PURE__ */ new Map()), h(this, "_cursor", 0), h(this, "state", "initial"), h(this, "error", ""), h(this, "value");
464
+ const { input: e2 = import_node_process.stdin, output: s2 = import_node_process.stdout, render: i2, signal: D2, ...C3 } = u3;
465
+ this.opts = C3, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = i2.bind(this), this._track = F3, this._abortSignal = D2, this.input = e2, this.output = s2;
1132
466
  }
1133
- prompt() {
1134
- const u = new import_node_tty.WriteStream(0);
1135
- return u._write = (F, e, s3) => {
1136
- this._track && (this.value = this.rl.line.replace(/\t/g, ""), this._cursor = this.rl.cursor, this.emit("value", this.value)), s3();
1137
- }, this.input.pipe(u), this.rl = import_node_readline.default.createInterface({ input: this.input, output: u, tabSize: 2, prompt: "", escapeCodeTimeout: 50 }), import_node_readline.default.emitKeypressEvents(this.input, this.rl), this.rl.prompt(), this.opts.initialValue !== void 0 && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), g(this.input, true), this.output.on("resize", this.render), this.render(), new Promise((F, e) => {
1138
- this.once("submit", () => {
1139
- this.output.write(src.cursor.show), this.output.off("resize", this.render), g(this.input, false), F(this.value);
1140
- }), this.once("cancel", () => {
1141
- this.output.write(src.cursor.show), this.output.off("resize", this.render), g(this.input, false), F(R);
1142
- });
1143
- });
467
+ unsubscribe() {
468
+ this._subscribers.clear();
1144
469
  }
1145
- on(u, F) {
1146
- const e = this.subscribers.get(u) ?? [];
1147
- e.push({ cb: F }), this.subscribers.set(u, e);
470
+ setSubscriber(u3, F3) {
471
+ const e2 = this._subscribers.get(u3) ?? [];
472
+ e2.push(F3), this._subscribers.set(u3, e2);
1148
473
  }
1149
- once(u, F) {
1150
- const e = this.subscribers.get(u) ?? [];
1151
- e.push({ cb: F, once: true }), this.subscribers.set(u, e);
474
+ on(u3, F3) {
475
+ this.setSubscriber(u3, { cb: F3 });
1152
476
  }
1153
- emit(u, ...F) {
1154
- const e = this.subscribers.get(u) ?? [], s3 = [];
1155
- for (const C of e)
1156
- C.cb(...F), C.once && s3.push(() => e.splice(e.indexOf(C), 1));
1157
- for (const C of s3)
1158
- C();
477
+ once(u3, F3) {
478
+ this.setSubscriber(u3, { cb: F3, once: true });
1159
479
  }
1160
- unsubscribe() {
1161
- this.subscribers.clear();
480
+ emit(u3, ...F3) {
481
+ const e2 = this._subscribers.get(u3) ?? [], s2 = [];
482
+ for (const i2 of e2) i2.cb(...F3), i2.once && s2.push(() => e2.splice(e2.indexOf(i2), 1));
483
+ for (const i2 of s2) i2();
484
+ }
485
+ prompt() {
486
+ return new Promise((u3, F3) => {
487
+ if (this._abortSignal) {
488
+ if (this._abortSignal.aborted) return this.state = "cancel", this.close(), u3(S);
489
+ this._abortSignal.addEventListener("abort", () => {
490
+ this.state = "cancel", this.close();
491
+ }, { once: true });
492
+ }
493
+ const e2 = new import_node_tty.WriteStream(0);
494
+ e2._write = (s2, i2, D2) => {
495
+ var _a8, _b5;
496
+ this._track && (this.value = (_a8 = this.rl) == null ? void 0 : _a8.line.replace(/\t/g, ""), this._cursor = ((_b5 = this.rl) == null ? void 0 : _b5.cursor) ?? 0, this.emit("value", this.value)), D2();
497
+ }, this.input.pipe(e2), this.rl = import_node_readline.default.createInterface({ input: this.input, output: e2, tabSize: 2, prompt: "", escapeCodeTimeout: 50 }), import_node_readline.default.emitKeypressEvents(this.input, this.rl), this.rl.prompt(), this.opts.initialValue !== void 0 && 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", () => {
498
+ this.output.write(srcExports.cursor.show), this.output.off("resize", this.render), d$1(this.input, false), u3(this.value);
499
+ }), this.once("cancel", () => {
500
+ this.output.write(srcExports.cursor.show), this.output.off("resize", this.render), d$1(this.input, false), u3(S);
501
+ });
502
+ });
1162
503
  }
1163
- onKeypress(u, F) {
1164
- if (this.state === "error" && (this.state = "active"), (F == null ? void 0 : F.name) && !this._track && V.has(F.name) && this.emit("cursor", V.get(F.name)), (F == null ? void 0 : F.name) && tD.has(F.name) && this.emit("cursor", F.name), u && (u.toLowerCase() === "y" || u.toLowerCase() === "n") && this.emit("confirm", u.toLowerCase() === "y"), u && this.emit("key", u.toLowerCase()), (F == null ? void 0 : F.name) === "return") {
504
+ onKeypress(u3, F3) {
505
+ var _a8, _b5;
506
+ if (this.state === "error" && (this.state = "active"), (F3 == null ? void 0 : F3.name) && (!this._track && c.aliases.has(F3.name) && this.emit("cursor", c.aliases.get(F3.name)), c.actions.has(F3.name) && this.emit("cursor", F3.name)), u3 && (u3.toLowerCase() === "y" || u3.toLowerCase() === "n") && this.emit("confirm", u3.toLowerCase() === "y"), u3 === " " && this.opts.placeholder && (this.value || ((_a8 = this.rl) == null ? void 0 : _a8.write(this.opts.placeholder), this.emit("value", this.opts.placeholder))), u3 && this.emit("key", u3.toLowerCase()), (F3 == null ? void 0 : F3.name) === "return") {
1165
507
  if (this.opts.validate) {
1166
- const e = this.opts.validate(this.value);
1167
- e && (this.error = e, this.state = "error", this.rl.write(this.value));
508
+ const e2 = this.opts.validate(this.value);
509
+ e2 && (this.error = e2 instanceof Error ? e2.message : e2, this.state = "error", (_b5 = this.rl) == null ? void 0 : _b5.write(this.value));
1168
510
  }
1169
511
  this.state !== "error" && (this.state = "submit");
1170
512
  }
1171
- u === "" && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
513
+ k$1([u3, F3 == null ? void 0 : F3.name, F3 == null ? void 0 : F3.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
1172
514
  }
1173
515
  close() {
516
+ var _a8;
1174
517
  this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
1175
- `), g(this.input, false), this.rl.close(), this.emit(`${this.state}`, this.value), this.unsubscribe();
518
+ `), d$1(this.input, false), (_a8 = this.rl) == null ? void 0 : _a8.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
1176
519
  }
1177
520
  restoreCursor() {
1178
- const u = P(this._prevFrame, process.stdout.columns, { hard: true }).split(`
521
+ const u3 = G(this._prevFrame, process.stdout.columns, { hard: true }).split(`
1179
522
  `).length - 1;
1180
- this.output.write(src.cursor.move(-999, u * -1));
523
+ this.output.write(srcExports.cursor.move(-999, u3 * -1));
1181
524
  }
1182
525
  render() {
1183
- const u = P(this._render(this) ?? "", process.stdout.columns, { hard: true });
1184
- if (u !== this._prevFrame) {
1185
- if (this.state === "initial")
1186
- this.output.write(src.cursor.hide);
526
+ const u3 = G(this._render(this) ?? "", process.stdout.columns, { hard: true });
527
+ if (u3 !== this._prevFrame) {
528
+ if (this.state === "initial") this.output.write(srcExports.cursor.hide);
1187
529
  else {
1188
- const F = FD(this._prevFrame, u);
1189
- if (this.restoreCursor(), F && (F == null ? void 0 : F.length) === 1) {
1190
- const e = F[0];
1191
- this.output.write(src.cursor.move(0, e)), this.output.write(src.erase.lines(1));
1192
- const s3 = u.split(`
530
+ const F3 = lD(this._prevFrame, u3);
531
+ if (this.restoreCursor(), F3 && (F3 == null ? void 0 : F3.length) === 1) {
532
+ const e2 = F3[0];
533
+ this.output.write(srcExports.cursor.move(0, e2)), this.output.write(srcExports.erase.lines(1));
534
+ const s2 = u3.split(`
1193
535
  `);
1194
- this.output.write(s3[e]), this._prevFrame = u, this.output.write(src.cursor.move(0, s3.length - e - 1));
536
+ this.output.write(s2[e2]), this._prevFrame = u3, this.output.write(srcExports.cursor.move(0, s2.length - e2 - 1));
1195
537
  return;
1196
- } else if (F && (F == null ? void 0 : F.length) > 1) {
1197
- const e = F[0];
1198
- this.output.write(src.cursor.move(0, e)), this.output.write(src.erase.down());
1199
- const C = u.split(`
1200
- `).slice(e);
1201
- this.output.write(C.join(`
1202
- `)), this._prevFrame = u;
538
+ }
539
+ if (F3 && (F3 == null ? void 0 : F3.length) > 1) {
540
+ const e2 = F3[0];
541
+ this.output.write(srcExports.cursor.move(0, e2)), this.output.write(srcExports.erase.down());
542
+ const s2 = u3.split(`
543
+ `).slice(e2);
544
+ this.output.write(s2.join(`
545
+ `)), this._prevFrame = u3;
1203
546
  return;
1204
547
  }
1205
- this.output.write(src.erase.down());
548
+ this.output.write(srcExports.erase.down());
1206
549
  }
1207
- this.output.write(u), this.state === "initial" && (this.state = "active"), this._prevFrame = u;
550
+ this.output.write(u3), this.state === "initial" && (this.state = "active"), this._prevFrame = u3;
1208
551
  }
1209
552
  }
1210
553
  };
1211
- sD = class extends h {
554
+ fD = class extends x {
1212
555
  get cursor() {
1213
556
  return this.value ? 0 : 1;
1214
557
  }
1215
558
  get _value() {
1216
559
  return this.cursor === 0;
1217
560
  }
1218
- constructor(u) {
1219
- super(u, false), this.value = !!u.initialValue, this.on("value", () => {
561
+ constructor(u3) {
562
+ super(u3, false), this.value = !!u3.initialValue, this.on("value", () => {
1220
563
  this.value = this._value;
1221
- }), this.on("confirm", (F) => {
1222
- this.output.write(src.cursor.move(0, -1)), this.value = F, this.state = "submit", this.close();
564
+ }), this.on("confirm", (F3) => {
565
+ this.output.write(srcExports.cursor.move(0, -1)), this.value = F3, this.state = "submit", this.close();
1223
566
  }), this.on("cursor", () => {
1224
567
  this.value = !this.value;
1225
568
  });
1226
569
  }
1227
570
  };
1228
- iD = class extends h {
1229
- constructor(u) {
1230
- super(u, false), 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) => {
1231
- F === "a" && this.toggleAll();
1232
- }), this.on("cursor", (F) => {
1233
- switch (F) {
571
+ bD = Object.defineProperty;
572
+ mD = (t2, u3, F3) => u3 in t2 ? bD(t2, u3, { enumerable: true, configurable: true, writable: true, value: F3 }) : t2[u3] = F3;
573
+ Y = (t2, u3, F3) => (mD(t2, typeof u3 != "symbol" ? u3 + "" : u3, F3), F3);
574
+ wD = class extends x {
575
+ constructor(u3) {
576
+ super(u3, false), Y(this, "options"), Y(this, "cursor", 0), this.options = u3.options, this.value = [...u3.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: F3 }) => F3 === u3.cursorAt), 0), this.on("key", (F3) => {
577
+ F3 === "a" && this.toggleAll();
578
+ }), this.on("cursor", (F3) => {
579
+ switch (F3) {
1234
580
  case "left":
1235
581
  case "up":
1236
582
  this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
@@ -1249,18 +595,21 @@ var init_prompt = __esm({
1249
595
  return this.options[this.cursor].value;
1250
596
  }
1251
597
  toggleAll() {
1252
- const u = this.value.length === this.options.length;
1253
- this.value = u ? [] : this.options.map((F) => F.value);
598
+ const u3 = this.value.length === this.options.length;
599
+ this.value = u3 ? [] : this.options.map((F3) => F3.value);
1254
600
  }
1255
601
  toggleValue() {
1256
- const u = this.value.includes(this._value);
1257
- this.value = u ? this.value.filter((F) => F !== this._value) : [...this.value, this._value];
602
+ const u3 = this.value.includes(this._value);
603
+ this.value = u3 ? this.value.filter((F3) => F3 !== this._value) : [...this.value, this._value];
1258
604
  }
1259
605
  };
1260
- ED = class extends h {
1261
- constructor(u) {
1262
- super(u, false), 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) => {
1263
- switch (F) {
606
+ SD = Object.defineProperty;
607
+ $D = (t2, u3, F3) => u3 in t2 ? SD(t2, u3, { enumerable: true, configurable: true, writable: true, value: F3 }) : t2[u3] = F3;
608
+ q = (t2, u3, F3) => ($D(t2, typeof u3 != "symbol" ? u3 + "" : u3, F3), F3);
609
+ jD = class extends x {
610
+ constructor(u3) {
611
+ super(u3, false), q(this, "options"), q(this, "cursor", 0), this.options = u3.options, this.cursor = this.options.findIndex(({ value: F3 }) => F3 === u3.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (F3) => {
612
+ switch (F3) {
1264
613
  case "left":
1265
614
  case "up":
1266
615
  this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
@@ -1280,374 +629,1281 @@ var init_prompt = __esm({
1280
629
  this.value = this._value.value;
1281
630
  }
1282
631
  };
1283
- oD = class extends h {
1284
- constructor(u) {
1285
- super(u), this.valueWithCursor = "", this.on("finalize", () => {
1286
- this.value || (this.value = u.defaultValue), this.valueWithCursor = this.value;
1287
- }), this.on("value", () => {
1288
- if (this.cursor >= this.value.length)
1289
- this.valueWithCursor = `${this.value}${l.inverse(l.hidden("_"))}`;
1290
- else {
1291
- const F = this.value.slice(0, this.cursor), e = this.value.slice(this.cursor);
1292
- this.valueWithCursor = `${F}${l.inverse(e[0])}${e.slice(1)}`;
1293
- }
1294
- });
632
+ PD = class extends x {
633
+ get valueWithCursor() {
634
+ if (this.state === "submit") return this.value;
635
+ if (this.cursor >= this.value.length) return `${this.value}\u2588`;
636
+ const u3 = this.value.slice(0, this.cursor), [F3, ...e$1] = this.value.slice(this.cursor);
637
+ return `${u3}${e.inverse(F3)}${e$1.join("")}`;
1295
638
  }
1296
639
  get cursor() {
1297
640
  return this._cursor;
1298
641
  }
642
+ constructor(u3) {
643
+ super(u3), this.on("finalize", () => {
644
+ this.value || (this.value = u3.defaultValue);
645
+ });
646
+ }
1299
647
  };
1300
- unicode = isUnicodeSupported();
1301
- s = (c2, fallback) => unicode ? c2 : fallback;
1302
- S_STEP_ACTIVE = s("\u276F", ">");
1303
- S_STEP_CANCEL = s("\u25A0", "x");
1304
- S_STEP_ERROR = s("\u25B2", "x");
1305
- S_STEP_SUBMIT = s("\u2714", "\u221A");
1306
- S_BAR = "";
1307
- S_BAR_END = "";
1308
- S_RADIO_ACTIVE = s("\u25CF", ">");
1309
- S_RADIO_INACTIVE = s("\u25CB", " ");
1310
- S_CHECKBOX_ACTIVE = s("\u25FB", "[\u2022]");
1311
- S_CHECKBOX_SELECTED = s("\u25FC", "[+]");
1312
- S_CHECKBOX_INACTIVE = s("\u25FB", "[ ]");
1313
- symbol = (state) => {
1314
- switch (state) {
648
+ V = ce();
649
+ u = (t2, n2) => V ? t2 : n2;
650
+ le = u("\u276F", ">");
651
+ L = u("\u25A0", "x");
652
+ W = u("\u25B2", "x");
653
+ C = u("\u2714", "\u221A");
654
+ o = u("");
655
+ d = u("");
656
+ k = u("\u25CF", ">");
657
+ P = u("\u25CB", " ");
658
+ A = u("\u25FB", "[\u2022]");
659
+ T = u("\u25FC", "[+]");
660
+ F = u("\u25FB", "[ ]");
661
+ w = (t2) => {
662
+ switch (t2) {
1315
663
  case "initial":
1316
- case "active": {
1317
- return colors.cyan(S_STEP_ACTIVE);
1318
- }
1319
- case "cancel": {
1320
- return colors.red(S_STEP_CANCEL);
1321
- }
1322
- case "error": {
1323
- return colors.yellow(S_STEP_ERROR);
1324
- }
1325
- case "submit": {
1326
- return colors.green(S_STEP_SUBMIT);
1327
- }
664
+ case "active":
665
+ return e.cyan(le);
666
+ case "cancel":
667
+ return e.red(L);
668
+ case "error":
669
+ return e.yellow(W);
670
+ case "submit":
671
+ return e.green(C);
1328
672
  }
1329
673
  };
1330
- text = (opts) => {
1331
- return new oD({
1332
- validate: opts.validate,
1333
- placeholder: opts.placeholder,
1334
- defaultValue: opts.defaultValue,
1335
- initialValue: opts.initialValue,
1336
- render() {
1337
- var _a;
1338
- const title = `${colors.gray(S_BAR)}
1339
- ${symbol(this.state)} ${opts.message}
674
+ B = (t2) => {
675
+ const { cursor: n2, options: s2, style: r3 } = t2, i2 = t2.maxItems ?? Number.POSITIVE_INFINITY, a2 = Math.max(process.stdout.rows - 4, 0), c3 = Math.min(a2, Math.max(i2, 5));
676
+ let l2 = 0;
677
+ n2 >= l2 + c3 - 3 ? l2 = Math.max(Math.min(n2 - c3 + 3, s2.length - c3), 0) : n2 < l2 + 2 && (l2 = Math.max(n2 - 2, 0));
678
+ const $ = c3 < s2.length && l2 > 0, p = c3 < s2.length && l2 + c3 < s2.length;
679
+ return s2.slice(l2, l2 + c3).map((M, v2, x2) => {
680
+ const j = v2 === 0 && $, E = v2 === x2.length - 1 && p;
681
+ return j || E ? e.dim("...") : r3(M, v2 + l2 === n2);
682
+ });
683
+ };
684
+ he = (t2) => new PD({ validate: t2.validate, placeholder: t2.placeholder, defaultValue: t2.defaultValue, initialValue: t2.initialValue, render() {
685
+ var _a8;
686
+ const n2 = `${e.gray(o)}
687
+ ${w(this.state)} ${t2.message}
688
+ `, s2 = t2.placeholder ? e.inverse(t2.placeholder[0]) + e.dim(t2.placeholder.slice(1)) : e.inverse(e.hidden("_")), r3 = this.value ? this.valueWithCursor : s2;
689
+ switch (this.state) {
690
+ case "error":
691
+ return `${n2.trim()}
692
+ ${e.yellow(o)} ${r3}
693
+ ${e.yellow(d)} ${e.yellow(this.error)}
1340
694
  `;
1341
- const placeholder = opts.placeholder ? colors.inverse(opts.placeholder[0]) + colors.dim(opts.placeholder.slice(1)) : colors.inverse(colors.hidden("_"));
1342
- const value = this.value ? this.valueWithCursor : placeholder;
1343
- switch (this.state) {
1344
- case "error": {
1345
- return `${title.trim()}
1346
- ${colors.yellow(
1347
- S_BAR
1348
- )} ${value}
1349
- ${colors.yellow(S_BAR_END)} ${colors.yellow(
1350
- this.error
1351
- )}
695
+ case "submit":
696
+ return `${n2}${e.gray(o)} ${e.dim(this.value || t2.placeholder)}`;
697
+ case "cancel":
698
+ return `${n2}${e.gray(o)} ${e.strikethrough(e.dim(this.value ?? ""))}${((_a8 = this.value) == null ? void 0 : _a8.trim()) ? `
699
+ ${e.gray(o)}` : ""}`;
700
+ default:
701
+ return `${n2}${e.cyan(o)} ${r3}
702
+ ${e.cyan(d)}
1352
703
  `;
1353
- }
1354
- case "submit": {
1355
- return `${title}${colors.gray(S_BAR)} ${colors.dim(
1356
- this.value || opts.placeholder
1357
- )}`;
1358
- }
1359
- case "cancel": {
1360
- return `${title}${colors.gray(S_BAR)} ${colors.strikethrough(
1361
- colors.dim(this.value ?? "")
1362
- )}${((_a = this.value) == null ? void 0 : _a.trim()) ? "\n" + colors.gray(S_BAR) : ""}`;
1363
- }
1364
- default: {
1365
- return `${title}${colors.cyan(S_BAR)} ${value}
1366
- ${colors.cyan(
1367
- S_BAR_END
1368
- )}
704
+ }
705
+ } }).prompt();
706
+ ye = (t2) => {
707
+ const n2 = t2.active ?? "Yes", s2 = t2.inactive ?? "No";
708
+ return new fD({ active: n2, inactive: s2, initialValue: t2.initialValue ?? true, render() {
709
+ const r3 = `${e.gray(o)}
710
+ ${w(this.state)} ${t2.message}
711
+ `, i2 = this.value ? n2 : s2;
712
+ switch (this.state) {
713
+ case "submit":
714
+ return `${r3}${e.gray(o)} ${e.dim(i2)}`;
715
+ case "cancel":
716
+ return `${r3}${e.gray(o)} ${e.strikethrough(e.dim(i2))}
717
+ ${e.gray(o)}`;
718
+ default:
719
+ return `${r3}${e.cyan(o)} ${this.value ? `${e.green(k)} ${n2}` : `${e.dim(P)} ${e.dim(n2)}`} ${e.dim("/")} ${this.value ? `${e.dim(P)} ${e.dim(s2)}` : `${e.green(k)} ${s2}`}
720
+ ${e.cyan(d)}
1369
721
  `;
1370
- }
1371
- }
1372
722
  }
1373
- }).prompt();
723
+ } }).prompt();
1374
724
  };
1375
- confirm = (opts) => {
1376
- const active = opts.active ?? "Yes";
1377
- const inactive = opts.inactive ?? "No";
1378
- return new sD({
1379
- active,
1380
- inactive,
1381
- initialValue: opts.initialValue ?? true,
1382
- render() {
1383
- const title = `${colors.gray(S_BAR)}
1384
- ${symbol(this.state)} ${opts.message}
725
+ ve = (t2) => {
726
+ const n2 = (s2, r3) => {
727
+ const i2 = s2.label ?? String(s2.value);
728
+ switch (r3) {
729
+ case "selected":
730
+ return `${e.dim(i2)}`;
731
+ case "active":
732
+ return `${e.green(k)} ${i2} ${s2.hint ? e.dim(`(${s2.hint})`) : ""}`;
733
+ case "cancelled":
734
+ return `${e.strikethrough(e.dim(i2))}`;
735
+ default:
736
+ return `${e.dim(P)} ${e.dim(i2)}`;
737
+ }
738
+ };
739
+ return new jD({ options: t2.options, initialValue: t2.initialValue, render() {
740
+ const s2 = `${e.gray(o)}
741
+ ${w(this.state)} ${t2.message}
1385
742
  `;
1386
- const value = this.value ? active : inactive;
1387
- switch (this.state) {
1388
- case "submit": {
1389
- return `${title}${colors.gray(S_BAR)} ${colors.dim(value)}`;
1390
- }
1391
- case "cancel": {
1392
- return `${title}${colors.gray(S_BAR)} ${colors.strikethrough(
1393
- colors.dim(value)
1394
- )}
1395
- ${colors.gray(S_BAR)}`;
1396
- }
1397
- default: {
1398
- return `${title}${colors.cyan(S_BAR)} ${this.value ? `${colors.green(S_RADIO_ACTIVE)} ${active}` : `${colors.dim(S_RADIO_INACTIVE)} ${colors.dim(active)}`} ${colors.dim("/")} ${this.value ? `${colors.dim(S_RADIO_INACTIVE)} ${colors.dim(inactive)}` : `${colors.green(S_RADIO_ACTIVE)} ${inactive}`}
1399
- ${colors.cyan(S_BAR_END)}
743
+ switch (this.state) {
744
+ case "submit":
745
+ return `${s2}${e.gray(o)} ${n2(this.options[this.cursor], "selected")}`;
746
+ case "cancel":
747
+ return `${s2}${e.gray(o)} ${n2(this.options[this.cursor], "cancelled")}
748
+ ${e.gray(o)}`;
749
+ default:
750
+ return `${s2}${e.cyan(o)} ${B({ cursor: this.cursor, options: this.options, maxItems: t2.maxItems, style: (r3, i2) => n2(r3, i2 ? "active" : "inactive") }).join(`
751
+ ${e.cyan(o)} `)}
752
+ ${e.cyan(d)}
1400
753
  `;
1401
- }
1402
- }
1403
754
  }
1404
- }).prompt();
755
+ } }).prompt();
1405
756
  };
1406
- select = (opts) => {
1407
- const opt = (option, state) => {
1408
- const label = option.label ?? String(option.value);
1409
- switch (state) {
1410
- case "active": {
1411
- return `${colors.green(S_RADIO_ACTIVE)} ${label} ${option.hint ? colors.dim(`(${option.hint})`) : ""}`;
1412
- }
1413
- case "selected": {
1414
- return `${colors.dim(label)}`;
1415
- }
1416
- case "cancelled": {
1417
- return `${colors.strikethrough(colors.dim(label))}`;
1418
- }
1419
- }
1420
- return `${colors.dim(S_RADIO_INACTIVE)} ${colors.dim(label)}`;
757
+ fe = (t2) => {
758
+ const n2 = (s2, r3) => {
759
+ const i2 = s2.label ?? String(s2.value);
760
+ return r3 === "active" ? `${e.cyan(A)} ${i2} ${s2.hint ? e.dim(`(${s2.hint})`) : ""}` : r3 === "selected" ? `${e.green(T)} ${e.dim(i2)}` : r3 === "cancelled" ? `${e.strikethrough(e.dim(i2))}` : r3 === "active-selected" ? `${e.green(T)} ${i2} ${s2.hint ? e.dim(`(${s2.hint})`) : ""}` : r3 === "submitted" ? `${e.dim(i2)}` : `${e.dim(F)} ${e.dim(i2)}`;
1421
761
  };
1422
- return new ED({
1423
- options: opts.options,
1424
- initialValue: opts.initialValue,
1425
- render() {
1426
- const title = `${colors.gray(S_BAR)}
1427
- ${symbol(this.state)} ${opts.message}
1428
- `;
1429
- switch (this.state) {
1430
- case "submit": {
1431
- return `${title}${colors.gray(S_BAR)} ${opt(
1432
- this.options[this.cursor],
1433
- "selected"
1434
- )}`;
1435
- }
1436
- case "cancel": {
1437
- return `${title}${colors.gray(S_BAR)} ${opt(
1438
- this.options[this.cursor],
1439
- "cancelled"
1440
- )}
1441
- ${colors.gray(S_BAR)}`;
1442
- }
1443
- default: {
1444
- return `${title}${colors.cyan(S_BAR)} ${this.options.map(
1445
- (option, i) => opt(option, i === this.cursor ? "active" : "inactive")
1446
- ).join(`
1447
- ${colors.cyan(S_BAR)} `)}
1448
- ${colors.cyan(S_BAR_END)}
762
+ return new wD({ options: t2.options, initialValues: t2.initialValues, required: t2.required ?? true, cursorAt: t2.cursorAt, validate(s2) {
763
+ if (this.required && s2.length === 0) return `Please select at least one option.
764
+ ${e.reset(e.dim(`Press ${e.gray(e.bgWhite(e.inverse(" space ")))} to select, ${e.gray(e.bgWhite(e.inverse(" enter ")))} to submit`))}`;
765
+ }, render() {
766
+ const s2 = `${e.gray(o)}
767
+ ${w(this.state)} ${t2.message}
768
+ `, r3 = (i2, a2) => {
769
+ const c3 = this.value.includes(i2.value);
770
+ return a2 && c3 ? n2(i2, "active-selected") : c3 ? n2(i2, "selected") : n2(i2, a2 ? "active" : "inactive");
771
+ };
772
+ switch (this.state) {
773
+ case "submit":
774
+ return `${s2}${e.gray(o)} ${this.options.filter(({ value: i2 }) => this.value.includes(i2)).map((i2) => n2(i2, "submitted")).join(e.dim(", ")) || e.dim("none")}`;
775
+ case "cancel": {
776
+ const i2 = this.options.filter(({ value: a2 }) => this.value.includes(a2)).map((a2) => n2(a2, "cancelled")).join(e.dim(", "));
777
+ return `${s2}${e.gray(o)} ${i2.trim() ? `${i2}
778
+ ${e.gray(o)}` : ""}`;
779
+ }
780
+ case "error": {
781
+ const i2 = this.error.split(`
782
+ `).map((a2, c3) => c3 === 0 ? `${e.yellow(d)} ${e.yellow(a2)}` : ` ${a2}`).join(`
783
+ `);
784
+ return `${s2 + e.yellow(o)} ${B({ options: this.options, cursor: this.cursor, maxItems: t2.maxItems, style: r3 }).join(`
785
+ ${e.yellow(o)} `)}
786
+ ${i2}
1449
787
  `;
1450
- }
1451
788
  }
789
+ default:
790
+ return `${s2}${e.cyan(o)} ${B({ options: this.options, cursor: this.cursor, maxItems: t2.maxItems, style: r3 }).join(`
791
+ ${e.cyan(o)} `)}
792
+ ${e.cyan(d)}
793
+ `;
1452
794
  }
1453
- }).prompt();
795
+ } }).prompt();
796
+ };
797
+ `${e.gray(o)} `;
798
+ kCancel = Symbol.for("cancel");
799
+ }
800
+ });
801
+
802
+ // src/index.ts
803
+ var index_exports = {};
804
+ __export(index_exports, {
805
+ generateChangelog: () => generateChangelog,
806
+ generateTotalChangelog: () => generateTotalChangelog,
807
+ getChangelogMarkdown: () => getChangelogMarkdown,
808
+ getTotalChangelogMarkdown: () => getTotalChangelogMarkdown
809
+ });
810
+ module.exports = __toCommonJS(index_exports);
811
+ init_cjs_shims();
812
+ var import_cli_progress = require("cli-progress");
813
+
814
+ // src/options.ts
815
+ init_cjs_shims();
816
+ var import_node_process3 = __toESM(require("process"), 1);
817
+ var import_promises = require("fs/promises");
818
+
819
+ // src/git.ts
820
+ init_cjs_shims();
821
+ var import_ofetch = require("ofetch");
822
+ var import_dayjs = __toESM(require("dayjs"), 1);
823
+
824
+ // node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/index.mjs
825
+ init_cjs_shims();
826
+
827
+ // node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/core.mjs
828
+ init_cjs_shims();
829
+ var LogLevels = {
830
+ silent: Number.NEGATIVE_INFINITY,
831
+ fatal: 0,
832
+ error: 0,
833
+ warn: 1,
834
+ log: 2,
835
+ info: 3,
836
+ success: 3,
837
+ fail: 3,
838
+ ready: 3,
839
+ start: 3,
840
+ box: 3,
841
+ debug: 4,
842
+ trace: 5,
843
+ verbose: Number.POSITIVE_INFINITY
844
+ };
845
+ var LogTypes = {
846
+ // Silent
847
+ silent: {
848
+ level: -1
849
+ },
850
+ // Level 0
851
+ fatal: {
852
+ level: LogLevels.fatal
853
+ },
854
+ error: {
855
+ level: LogLevels.error
856
+ },
857
+ // Level 1
858
+ warn: {
859
+ level: LogLevels.warn
860
+ },
861
+ // Level 2
862
+ log: {
863
+ level: LogLevels.log
864
+ },
865
+ // Level 3
866
+ info: {
867
+ level: LogLevels.info
868
+ },
869
+ success: {
870
+ level: LogLevels.success
871
+ },
872
+ fail: {
873
+ level: LogLevels.fail
874
+ },
875
+ ready: {
876
+ level: LogLevels.info
877
+ },
878
+ start: {
879
+ level: LogLevels.info
880
+ },
881
+ box: {
882
+ level: LogLevels.info
883
+ },
884
+ // Level 4
885
+ debug: {
886
+ level: LogLevels.debug
887
+ },
888
+ // Level 5
889
+ trace: {
890
+ level: LogLevels.trace
891
+ },
892
+ // Verbose
893
+ verbose: {
894
+ level: LogLevels.verbose
895
+ }
896
+ };
897
+ function isPlainObject$1(value) {
898
+ if (value === null || typeof value !== "object") {
899
+ return false;
900
+ }
901
+ const prototype = Object.getPrototypeOf(value);
902
+ if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) {
903
+ return false;
904
+ }
905
+ if (Symbol.iterator in value) {
906
+ return false;
907
+ }
908
+ if (Symbol.toStringTag in value) {
909
+ return Object.prototype.toString.call(value) === "[object Module]";
910
+ }
911
+ return true;
912
+ }
913
+ function _defu(baseObject, defaults, namespace = ".", merger) {
914
+ if (!isPlainObject$1(defaults)) {
915
+ return _defu(baseObject, {}, namespace, merger);
916
+ }
917
+ const object = Object.assign({}, defaults);
918
+ for (const key in baseObject) {
919
+ if (key === "__proto__" || key === "constructor") {
920
+ continue;
921
+ }
922
+ const value = baseObject[key];
923
+ if (value === null || value === void 0) {
924
+ continue;
925
+ }
926
+ if (merger && merger(object, key, value, namespace)) {
927
+ continue;
928
+ }
929
+ if (Array.isArray(value) && Array.isArray(object[key])) {
930
+ object[key] = [...value, ...object[key]];
931
+ } else if (isPlainObject$1(value) && isPlainObject$1(object[key])) {
932
+ object[key] = _defu(
933
+ value,
934
+ object[key],
935
+ (namespace ? `${namespace}.` : "") + key.toString(),
936
+ merger
937
+ );
938
+ } else {
939
+ object[key] = value;
940
+ }
941
+ }
942
+ return object;
943
+ }
944
+ function createDefu(merger) {
945
+ return (...arguments_) => (
946
+ // eslint-disable-next-line unicorn/no-array-reduce
947
+ arguments_.reduce((p, c3) => _defu(p, c3, "", merger), {})
948
+ );
949
+ }
950
+ var defu = createDefu();
951
+ function isPlainObject(obj) {
952
+ return Object.prototype.toString.call(obj) === "[object Object]";
953
+ }
954
+ function isLogObj(arg) {
955
+ if (!isPlainObject(arg)) {
956
+ return false;
957
+ }
958
+ if (!arg.message && !arg.args) {
959
+ return false;
960
+ }
961
+ if (arg.stack) {
962
+ return false;
963
+ }
964
+ return true;
965
+ }
966
+ var paused = false;
967
+ var queue = [];
968
+ var Consola = class _Consola {
969
+ options;
970
+ _lastLog;
971
+ _mockFn;
972
+ /**
973
+ * Creates an instance of Consola with specified options or defaults.
974
+ *
975
+ * @param {Partial<ConsolaOptions>} [options={}] - Configuration options for the Consola instance.
976
+ */
977
+ constructor(options = {}) {
978
+ const types = options.types || LogTypes;
979
+ this.options = defu(
980
+ {
981
+ ...options,
982
+ defaults: { ...options.defaults },
983
+ level: _normalizeLogLevel(options.level, types),
984
+ reporters: [...options.reporters || []]
985
+ },
986
+ {
987
+ types: LogTypes,
988
+ throttle: 1e3,
989
+ throttleMin: 5,
990
+ formatOptions: {
991
+ date: true,
992
+ colors: false,
993
+ compact: true
994
+ }
995
+ }
996
+ );
997
+ for (const type in types) {
998
+ const defaults = {
999
+ type,
1000
+ ...this.options.defaults,
1001
+ ...types[type]
1002
+ };
1003
+ this[type] = this._wrapLogFn(defaults);
1004
+ this[type].raw = this._wrapLogFn(
1005
+ defaults,
1006
+ true
1007
+ );
1008
+ }
1009
+ if (this.options.mockFn) {
1010
+ this.mockTypes();
1011
+ }
1012
+ this._lastLog = {};
1013
+ }
1014
+ /**
1015
+ * Gets the current log level of the Consola instance.
1016
+ *
1017
+ * @returns {number} The current log level.
1018
+ */
1019
+ get level() {
1020
+ return this.options.level;
1021
+ }
1022
+ /**
1023
+ * Sets the minimum log level that will be output by the instance.
1024
+ *
1025
+ * @param {number} level - The new log level to set.
1026
+ */
1027
+ set level(level) {
1028
+ this.options.level = _normalizeLogLevel(
1029
+ level,
1030
+ this.options.types,
1031
+ this.options.level
1032
+ );
1033
+ }
1034
+ /**
1035
+ * Displays a prompt to the user and returns the response.
1036
+ * Throw an error if `prompt` is not supported by the current configuration.
1037
+ *
1038
+ * @template T
1039
+ * @param {string} message - The message to display in the prompt.
1040
+ * @param {T} [opts] - Optional options for the prompt. See {@link PromptOptions}.
1041
+ * @returns {promise<T>} A promise that infer with the prompt options. See {@link PromptOptions}.
1042
+ */
1043
+ prompt(message, opts) {
1044
+ if (!this.options.prompt) {
1045
+ throw new Error("prompt is not supported!");
1046
+ }
1047
+ return this.options.prompt(message, opts);
1048
+ }
1049
+ /**
1050
+ * Creates a new instance of Consola, inheriting options from the current instance, with possible overrides.
1051
+ *
1052
+ * @param {Partial<ConsolaOptions>} options - Optional overrides for the new instance. See {@link ConsolaOptions}.
1053
+ * @returns {ConsolaInstance} A new Consola instance. See {@link ConsolaInstance}.
1054
+ */
1055
+ create(options) {
1056
+ const instance = new _Consola({
1057
+ ...this.options,
1058
+ ...options
1059
+ });
1060
+ if (this._mockFn) {
1061
+ instance.mockTypes(this._mockFn);
1062
+ }
1063
+ return instance;
1064
+ }
1065
+ /**
1066
+ * Creates a new Consola instance with the specified default log object properties.
1067
+ *
1068
+ * @param {InputLogObject} defaults - Default properties to include in any log from the new instance. See {@link InputLogObject}.
1069
+ * @returns {ConsolaInstance} A new Consola instance. See {@link ConsolaInstance}.
1070
+ */
1071
+ withDefaults(defaults) {
1072
+ return this.create({
1073
+ ...this.options,
1074
+ defaults: {
1075
+ ...this.options.defaults,
1076
+ ...defaults
1077
+ }
1078
+ });
1079
+ }
1080
+ /**
1081
+ * Creates a new Consola instance with a specified tag, which will be included in every log.
1082
+ *
1083
+ * @param {string} tag - The tag to include in each log of the new instance.
1084
+ * @returns {ConsolaInstance} A new Consola instance. See {@link ConsolaInstance}.
1085
+ */
1086
+ withTag(tag) {
1087
+ return this.withDefaults({
1088
+ tag: this.options.defaults.tag ? this.options.defaults.tag + ":" + tag : tag
1089
+ });
1090
+ }
1091
+ /**
1092
+ * Adds a custom reporter to the Consola instance.
1093
+ * Reporters will be called for each log message, depending on their implementation and log level.
1094
+ *
1095
+ * @param {ConsolaReporter} reporter - The reporter to add. See {@link ConsolaReporter}.
1096
+ * @returns {Consola} The current Consola instance.
1097
+ */
1098
+ addReporter(reporter) {
1099
+ this.options.reporters.push(reporter);
1100
+ return this;
1101
+ }
1102
+ /**
1103
+ * Removes a custom reporter from the Consola instance.
1104
+ * If no reporter is specified, all reporters will be removed.
1105
+ *
1106
+ * @param {ConsolaReporter} reporter - The reporter to remove. See {@link ConsolaReporter}.
1107
+ * @returns {Consola} The current Consola instance.
1108
+ */
1109
+ removeReporter(reporter) {
1110
+ if (reporter) {
1111
+ const i2 = this.options.reporters.indexOf(reporter);
1112
+ if (i2 !== -1) {
1113
+ return this.options.reporters.splice(i2, 1);
1114
+ }
1115
+ } else {
1116
+ this.options.reporters.splice(0);
1117
+ }
1118
+ return this;
1119
+ }
1120
+ /**
1121
+ * Replaces all reporters of the Consola instance with the specified array of reporters.
1122
+ *
1123
+ * @param {ConsolaReporter[]} reporters - The new reporters to set. See {@link ConsolaReporter}.
1124
+ * @returns {Consola} The current Consola instance.
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
+ /**
1139
+ * Overrides console methods with Consola logging methods for consistent logging.
1140
+ */
1141
+ wrapConsole() {
1142
+ for (const type in this.options.types) {
1143
+ if (!console["__" + type]) {
1144
+ console["__" + type] = console[type];
1145
+ }
1146
+ console[type] = this[type].raw;
1147
+ }
1148
+ }
1149
+ /**
1150
+ * Restores the original console methods, removing Consola overrides.
1151
+ */
1152
+ restoreConsole() {
1153
+ for (const type in this.options.types) {
1154
+ if (console["__" + type]) {
1155
+ console[type] = console["__" + type];
1156
+ delete console["__" + type];
1157
+ }
1158
+ }
1159
+ }
1160
+ /**
1161
+ * Overrides standard output and error streams to redirect them through Consola.
1162
+ */
1163
+ wrapStd() {
1164
+ this._wrapStream(this.options.stdout, "log");
1165
+ this._wrapStream(this.options.stderr, "log");
1166
+ }
1167
+ _wrapStream(stream, type) {
1168
+ if (!stream) {
1169
+ return;
1170
+ }
1171
+ if (!stream.__write) {
1172
+ stream.__write = stream.write;
1173
+ }
1174
+ stream.write = (data) => {
1175
+ this[type].raw(String(data).trim());
1176
+ };
1177
+ }
1178
+ /**
1179
+ * Restores the original standard output and error streams, removing the Consola redirection.
1180
+ */
1181
+ restoreStd() {
1182
+ this._restoreStream(this.options.stdout);
1183
+ this._restoreStream(this.options.stderr);
1184
+ }
1185
+ _restoreStream(stream) {
1186
+ if (!stream) {
1187
+ return;
1188
+ }
1189
+ if (stream.__write) {
1190
+ stream.write = stream.__write;
1191
+ delete stream.__write;
1192
+ }
1193
+ }
1194
+ /**
1195
+ * Pauses logging, queues incoming logs until resumed.
1196
+ */
1197
+ pauseLogs() {
1198
+ paused = true;
1199
+ }
1200
+ /**
1201
+ * Resumes logging, processing any queued logs.
1202
+ */
1203
+ resumeLogs() {
1204
+ paused = false;
1205
+ const _queue = queue.splice(0);
1206
+ for (const item of _queue) {
1207
+ item[0]._logFn(item[1], item[2]);
1208
+ }
1209
+ }
1210
+ /**
1211
+ * Replaces logging methods with mocks if a mock function is provided.
1212
+ *
1213
+ * @param {ConsolaOptions["mockFn"]} mockFn - The function to use for mocking logging methods. See {@link ConsolaOptions["mockFn"]}.
1214
+ */
1215
+ mockTypes(mockFn) {
1216
+ const _mockFn = mockFn || this.options.mockFn;
1217
+ this._mockFn = _mockFn;
1218
+ if (typeof _mockFn !== "function") {
1219
+ return;
1220
+ }
1221
+ for (const type in this.options.types) {
1222
+ this[type] = _mockFn(type, this.options.types[type]) || this[type];
1223
+ this[type].raw = this[type];
1224
+ }
1225
+ }
1226
+ _wrapLogFn(defaults, isRaw) {
1227
+ return (...args) => {
1228
+ if (paused) {
1229
+ queue.push([this, defaults, args, isRaw]);
1230
+ return;
1231
+ }
1232
+ return this._logFn(defaults, args, isRaw);
1454
1233
  };
1455
- multiselect = (opts) => {
1456
- const opt = (option, state) => {
1457
- const label = option.label ?? String(option.value);
1458
- switch (state) {
1459
- case "active": {
1460
- return `${colors.cyan(S_CHECKBOX_ACTIVE)} ${label} ${option.hint ? colors.dim(`(${option.hint})`) : ""}`;
1461
- }
1462
- case "selected": {
1463
- return `${colors.green(S_CHECKBOX_SELECTED)} ${colors.dim(label)}`;
1464
- }
1465
- case "cancelled": {
1466
- return `${colors.strikethrough(colors.dim(label))}`;
1467
- }
1468
- case "active-selected": {
1469
- return `${colors.green(S_CHECKBOX_SELECTED)} ${label} ${option.hint ? colors.dim(`(${option.hint})`) : ""}`;
1470
- }
1471
- case "submitted": {
1472
- return `${colors.dim(label)}`;
1473
- }
1234
+ }
1235
+ _logFn(defaults, args, isRaw) {
1236
+ if ((defaults.level || 0) > this.level) {
1237
+ return false;
1238
+ }
1239
+ const logObj = {
1240
+ date: /* @__PURE__ */ new Date(),
1241
+ args: [],
1242
+ ...defaults,
1243
+ level: _normalizeLogLevel(defaults.level, this.options.types)
1244
+ };
1245
+ if (!isRaw && args.length === 1 && isLogObj(args[0])) {
1246
+ Object.assign(logObj, args[0]);
1247
+ } else {
1248
+ logObj.args = [...args];
1249
+ }
1250
+ if (logObj.message) {
1251
+ logObj.args.unshift(logObj.message);
1252
+ delete logObj.message;
1253
+ }
1254
+ if (logObj.additional) {
1255
+ if (!Array.isArray(logObj.additional)) {
1256
+ logObj.additional = logObj.additional.split("\n");
1257
+ }
1258
+ logObj.args.push("\n" + logObj.additional.join("\n"));
1259
+ delete logObj.additional;
1260
+ }
1261
+ logObj.type = typeof logObj.type === "string" ? logObj.type.toLowerCase() : "log";
1262
+ logObj.tag = typeof logObj.tag === "string" ? logObj.tag : "";
1263
+ const resolveLog = (newLog = false) => {
1264
+ const repeated = (this._lastLog.count || 0) - this.options.throttleMin;
1265
+ if (this._lastLog.object && repeated > 0) {
1266
+ const args2 = [...this._lastLog.object.args];
1267
+ if (repeated > 1) {
1268
+ args2.push(`(repeated ${repeated} times)`);
1474
1269
  }
1475
- return `${colors.dim(S_CHECKBOX_INACTIVE)} ${colors.dim(label)}`;
1476
- };
1477
- return new iD({
1478
- options: opts.options,
1479
- initialValues: opts.initialValues,
1480
- required: opts.required ?? true,
1481
- cursorAt: opts.cursorAt,
1482
- validate(selected) {
1483
- if (this.required && selected.length === 0) {
1484
- return `Please select at least one option.
1485
- ${colors.reset(
1486
- colors.dim(
1487
- `Press ${colors.gray(
1488
- colors.bgWhite(colors.inverse(" space "))
1489
- )} to select, ${colors.gray(
1490
- colors.bgWhite(colors.inverse(" enter "))
1491
- )} to submit`
1492
- )
1493
- )}`;
1494
- }
1495
- },
1496
- render() {
1497
- const title = `${colors.gray(S_BAR)}
1498
- ${symbol(this.state)} ${opts.message}
1499
- `;
1500
- switch (this.state) {
1501
- case "submit": {
1502
- return `${title}${colors.gray(S_BAR)} ${this.options.filter(({ value }) => this.value.includes(value)).map((option) => opt(option, "submitted")).join(colors.dim(", ")) || colors.dim("none")}`;
1503
- }
1504
- case "cancel": {
1505
- const label = this.options.filter(({ value }) => this.value.includes(value)).map((option) => opt(option, "cancelled")).join(colors.dim(", "));
1506
- return `${title}${colors.gray(S_BAR)} ${label.trim() ? `${label}
1507
- ${colors.gray(S_BAR)}` : ""}`;
1508
- }
1509
- case "error": {
1510
- const footer = this.error.split("\n").map(
1511
- (ln, i) => i === 0 ? `${colors.yellow(S_BAR_END)} ${colors.yellow(ln)}` : ` ${ln}`
1512
- ).join("\n");
1513
- return title + colors.yellow(S_BAR) + " " + this.options.map((option, i) => {
1514
- const selected = this.value.includes(option.value);
1515
- const active = i === this.cursor;
1516
- if (active && selected) {
1517
- return opt(option, "active-selected");
1518
- }
1519
- if (selected) {
1520
- return opt(option, "selected");
1521
- }
1522
- return opt(option, active ? "active" : "inactive");
1523
- }).join(`
1524
- ${colors.yellow(S_BAR)} `) + "\n" + footer + "\n";
1525
- }
1526
- default: {
1527
- return `${title}${colors.cyan(S_BAR)} ${this.options.map((option, i) => {
1528
- const selected = this.value.includes(option.value);
1529
- const active = i === this.cursor;
1530
- if (active && selected) {
1531
- return opt(option, "active-selected");
1532
- }
1533
- if (selected) {
1534
- return opt(option, "selected");
1535
- }
1536
- return opt(option, active ? "active" : "inactive");
1537
- }).join(`
1538
- ${colors.cyan(S_BAR)} `)}
1539
- ${colors.cyan(S_BAR_END)}
1540
- `;
1541
- }
1270
+ this._log({ ...this._lastLog.object, args: args2 });
1271
+ this._lastLog.count = 1;
1272
+ }
1273
+ if (newLog) {
1274
+ this._lastLog.object = logObj;
1275
+ this._log(logObj);
1276
+ }
1277
+ };
1278
+ clearTimeout(this._lastLog.timeout);
1279
+ const diffTime = this._lastLog.time && logObj.date ? logObj.date.getTime() - this._lastLog.time.getTime() : 0;
1280
+ this._lastLog.time = logObj.date;
1281
+ if (diffTime < this.options.throttle) {
1282
+ try {
1283
+ const serializedLog = JSON.stringify([
1284
+ logObj.type,
1285
+ logObj.tag,
1286
+ logObj.args
1287
+ ]);
1288
+ const isSameLog = this._lastLog.serialized === serializedLog;
1289
+ this._lastLog.serialized = serializedLog;
1290
+ if (isSameLog) {
1291
+ this._lastLog.count = (this._lastLog.count || 0) + 1;
1292
+ if (this._lastLog.count > this.options.throttleMin) {
1293
+ this._lastLog.timeout = setTimeout(
1294
+ resolveLog,
1295
+ this.options.throttle
1296
+ );
1297
+ return;
1542
1298
  }
1543
1299
  }
1544
- }).prompt();
1545
- };
1300
+ } catch {
1301
+ }
1302
+ }
1303
+ resolveLog(true);
1546
1304
  }
1547
- });
1305
+ _log(logObj) {
1306
+ for (const reporter of this.options.reporters) {
1307
+ reporter.log(logObj, {
1308
+ options: this.options
1309
+ });
1310
+ }
1311
+ }
1312
+ };
1313
+ function _normalizeLogLevel(input, types = {}, defaultLevel = 3) {
1314
+ if (input === void 0) {
1315
+ return defaultLevel;
1316
+ }
1317
+ if (typeof input === "number") {
1318
+ return input;
1319
+ }
1320
+ if (types[input] && types[input].level !== void 0) {
1321
+ return types[input].level;
1322
+ }
1323
+ return defaultLevel;
1324
+ }
1325
+ Consola.prototype.add = Consola.prototype.addReporter;
1326
+ Consola.prototype.remove = Consola.prototype.removeReporter;
1327
+ Consola.prototype.clear = Consola.prototype.removeReporter;
1328
+ Consola.prototype.withScope = Consola.prototype.withTag;
1329
+ Consola.prototype.mock = Consola.prototype.mockTypes;
1330
+ Consola.prototype.pause = Consola.prototype.pauseLogs;
1331
+ Consola.prototype.resume = Consola.prototype.resumeLogs;
1332
+ function createConsola(options = {}) {
1333
+ return new Consola(options);
1334
+ }
1548
1335
 
1549
- // node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/shared/consola.36c0034f.mjs
1550
- function detectProvider(env2) {
1551
- for (const provider of providers) {
1552
- const envName = provider[1] || provider[0];
1553
- if (env2[envName]) {
1554
- return {
1555
- name: provider[0].toLowerCase(),
1556
- ...provider[2]
1557
- };
1336
+ // node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs
1337
+ init_cjs_shims();
1338
+ var import_node_util = require("util");
1339
+ var import_node_path = require("path");
1340
+ function parseStack(stack, message) {
1341
+ const cwd = process.cwd() + import_node_path.sep;
1342
+ const lines = stack.split("\n").splice(message.split("\n").length).map((l2) => l2.trim().replace("file://", "").replace(cwd, ""));
1343
+ return lines;
1344
+ }
1345
+ function writeStream(data, stream) {
1346
+ const write = stream.__write || stream.write;
1347
+ return write.call(stream, data);
1348
+ }
1349
+ var bracket = (x2) => x2 ? `[${x2}]` : "";
1350
+ var BasicReporter = class {
1351
+ formatStack(stack, message, opts) {
1352
+ const indent = " ".repeat(((opts == null ? void 0 : opts.errorLevel) || 0) + 1);
1353
+ return indent + parseStack(stack, message).join(`
1354
+ ${indent}`);
1355
+ }
1356
+ formatError(err, opts) {
1357
+ const message = err.message ?? (0, import_node_util.formatWithOptions)(opts, err);
1358
+ const stack = err.stack ? this.formatStack(err.stack, message, opts) : "";
1359
+ const level = (opts == null ? void 0 : opts.errorLevel) || 0;
1360
+ const causedPrefix = level > 0 ? `${" ".repeat(level)}[cause]: ` : "";
1361
+ const causedError = err.cause ? "\n\n" + this.formatError(err.cause, { ...opts, errorLevel: level + 1 }) : "";
1362
+ return causedPrefix + message + "\n" + stack + causedError;
1363
+ }
1364
+ formatArgs(args, opts) {
1365
+ const _args = args.map((arg) => {
1366
+ if (arg && typeof arg.stack === "string") {
1367
+ return this.formatError(arg, opts);
1368
+ }
1369
+ return arg;
1370
+ });
1371
+ return (0, import_node_util.formatWithOptions)(opts, ..._args);
1372
+ }
1373
+ formatDate(date, opts) {
1374
+ return opts.date ? date.toLocaleTimeString() : "";
1375
+ }
1376
+ filterAndJoin(arr) {
1377
+ return arr.filter(Boolean).join(" ");
1378
+ }
1379
+ formatLogObj(logObj, opts) {
1380
+ const message = this.formatArgs(logObj.args, opts);
1381
+ if (logObj.type === "box") {
1382
+ return "\n" + [
1383
+ bracket(logObj.tag),
1384
+ logObj.title && logObj.title,
1385
+ ...message.split("\n")
1386
+ ].filter(Boolean).map((l2) => " > " + l2).join("\n") + "\n";
1558
1387
  }
1388
+ return this.filterAndJoin([
1389
+ bracket(logObj.type),
1390
+ bracket(logObj.tag),
1391
+ message
1392
+ ]);
1393
+ }
1394
+ log(logObj, ctx) {
1395
+ const line = this.formatLogObj(logObj, {
1396
+ columns: ctx.options.stdout.columns || 0,
1397
+ ...ctx.options.formatOptions
1398
+ });
1399
+ return writeStream(
1400
+ line + "\n",
1401
+ logObj.level < 2 ? ctx.options.stderr || process.stderr : ctx.options.stdout || process.stdout
1402
+ );
1559
1403
  }
1560
- if (env2.SHELL && env2.SHELL === "/bin/jsh") {
1561
- return {
1562
- name: "stackblitz",
1563
- ci: false
1564
- };
1404
+ };
1405
+
1406
+ // node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/index.mjs
1407
+ var import_node_process2 = __toESM(require("process"), 1);
1408
+
1409
+ // node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs
1410
+ init_cjs_shims();
1411
+ var tty = __toESM(require("tty"), 1);
1412
+ var {
1413
+ env = {},
1414
+ argv = [],
1415
+ platform = ""
1416
+ } = typeof process === "undefined" ? {} : process;
1417
+ var isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
1418
+ var isForced = "FORCE_COLOR" in env || argv.includes("--color");
1419
+ var isWindows = platform === "win32";
1420
+ var isDumbTerminal = env.TERM === "dumb";
1421
+ var isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;
1422
+ var isCI = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
1423
+ var isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);
1424
+ 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)) {
1425
+ return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
1426
+ }
1427
+ function clearBleed(index, string, open, close, replace) {
1428
+ return index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
1429
+ }
1430
+ function filterEmpty(open, close, replace = open, at = open.length + 1) {
1431
+ return (string) => string || !(string === "" || string === void 0) ? clearBleed(
1432
+ ("" + string).indexOf(close, at),
1433
+ string,
1434
+ open,
1435
+ close,
1436
+ replace
1437
+ ) : "";
1438
+ }
1439
+ function init(open, close, replace) {
1440
+ return filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace);
1441
+ }
1442
+ var colorDefs = {
1443
+ reset: init(0, 0),
1444
+ bold: init(1, 22, "\x1B[22m\x1B[1m"),
1445
+ dim: init(2, 22, "\x1B[22m\x1B[2m"),
1446
+ italic: init(3, 23),
1447
+ underline: init(4, 24),
1448
+ inverse: init(7, 27),
1449
+ hidden: init(8, 28),
1450
+ strikethrough: init(9, 29),
1451
+ black: init(30, 39),
1452
+ red: init(31, 39),
1453
+ green: init(32, 39),
1454
+ yellow: init(33, 39),
1455
+ blue: init(34, 39),
1456
+ magenta: init(35, 39),
1457
+ cyan: init(36, 39),
1458
+ white: init(37, 39),
1459
+ gray: init(90, 39),
1460
+ bgBlack: init(40, 49),
1461
+ bgRed: init(41, 49),
1462
+ bgGreen: init(42, 49),
1463
+ bgYellow: init(43, 49),
1464
+ bgBlue: init(44, 49),
1465
+ bgMagenta: init(45, 49),
1466
+ bgCyan: init(46, 49),
1467
+ bgWhite: init(47, 49),
1468
+ blackBright: init(90, 39),
1469
+ redBright: init(91, 39),
1470
+ greenBright: init(92, 39),
1471
+ yellowBright: init(93, 39),
1472
+ blueBright: init(94, 39),
1473
+ magentaBright: init(95, 39),
1474
+ cyanBright: init(96, 39),
1475
+ whiteBright: init(97, 39),
1476
+ bgBlackBright: init(100, 49),
1477
+ bgRedBright: init(101, 49),
1478
+ bgGreenBright: init(102, 49),
1479
+ bgYellowBright: init(103, 49),
1480
+ bgBlueBright: init(104, 49),
1481
+ bgMagentaBright: init(105, 49),
1482
+ bgCyanBright: init(106, 49),
1483
+ bgWhiteBright: init(107, 49)
1484
+ };
1485
+ function createColors(useColor = isColorSupported) {
1486
+ return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
1487
+ }
1488
+ var colors = createColors();
1489
+ function getColor(color, fallback = "reset") {
1490
+ return colors[color] || colors[fallback];
1491
+ }
1492
+ var ansiRegex = [
1493
+ String.raw`[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)`,
1494
+ String.raw`(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))`
1495
+ ].join("|");
1496
+ function stripAnsi(text) {
1497
+ return text.replace(new RegExp(ansiRegex, "g"), "");
1498
+ }
1499
+ var boxStylePresets = {
1500
+ solid: {
1501
+ tl: "\u250C",
1502
+ tr: "\u2510",
1503
+ bl: "\u2514",
1504
+ br: "\u2518",
1505
+ h: "\u2500",
1506
+ v: "\u2502"
1507
+ },
1508
+ double: {
1509
+ tl: "\u2554",
1510
+ tr: "\u2557",
1511
+ bl: "\u255A",
1512
+ br: "\u255D",
1513
+ h: "\u2550",
1514
+ v: "\u2551"
1515
+ },
1516
+ doubleSingle: {
1517
+ tl: "\u2553",
1518
+ tr: "\u2556",
1519
+ bl: "\u2559",
1520
+ br: "\u255C",
1521
+ h: "\u2500",
1522
+ v: "\u2551"
1523
+ },
1524
+ doubleSingleRounded: {
1525
+ tl: "\u256D",
1526
+ tr: "\u256E",
1527
+ bl: "\u2570",
1528
+ br: "\u256F",
1529
+ h: "\u2500",
1530
+ v: "\u2551"
1531
+ },
1532
+ singleThick: {
1533
+ tl: "\u250F",
1534
+ tr: "\u2513",
1535
+ bl: "\u2517",
1536
+ br: "\u251B",
1537
+ h: "\u2501",
1538
+ v: "\u2503"
1539
+ },
1540
+ singleDouble: {
1541
+ tl: "\u2552",
1542
+ tr: "\u2555",
1543
+ bl: "\u2558",
1544
+ br: "\u255B",
1545
+ h: "\u2550",
1546
+ v: "\u2502"
1547
+ },
1548
+ singleDoubleRounded: {
1549
+ tl: "\u256D",
1550
+ tr: "\u256E",
1551
+ bl: "\u2570",
1552
+ br: "\u256F",
1553
+ h: "\u2550",
1554
+ v: "\u2502"
1555
+ },
1556
+ rounded: {
1557
+ tl: "\u256D",
1558
+ tr: "\u256E",
1559
+ bl: "\u2570",
1560
+ br: "\u256F",
1561
+ h: "\u2500",
1562
+ v: "\u2502"
1565
1563
  }
1566
- return {
1567
- name: "",
1568
- ci: false
1564
+ };
1565
+ var defaultStyle = {
1566
+ borderColor: "white",
1567
+ borderStyle: "rounded",
1568
+ valign: "center",
1569
+ padding: 2,
1570
+ marginLeft: 1,
1571
+ marginTop: 1,
1572
+ marginBottom: 1
1573
+ };
1574
+ function box(text, _opts = {}) {
1575
+ const opts = {
1576
+ ..._opts,
1577
+ style: {
1578
+ ...defaultStyle,
1579
+ ..._opts.style
1580
+ }
1569
1581
  };
1582
+ const textLines = text.split("\n");
1583
+ const boxLines = [];
1584
+ const _color = getColor(opts.style.borderColor);
1585
+ const borderStyle = {
1586
+ ...typeof opts.style.borderStyle === "string" ? boxStylePresets[opts.style.borderStyle] || boxStylePresets.solid : opts.style.borderStyle
1587
+ };
1588
+ if (_color) {
1589
+ for (const key in borderStyle) {
1590
+ borderStyle[key] = _color(
1591
+ borderStyle[key]
1592
+ );
1593
+ }
1594
+ }
1595
+ const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;
1596
+ const height = textLines.length + paddingOffset;
1597
+ const width = Math.max(
1598
+ ...textLines.map((line) => stripAnsi(line).length),
1599
+ opts.title ? stripAnsi(opts.title).length : 0
1600
+ ) + paddingOffset;
1601
+ const widthOffset = width + paddingOffset;
1602
+ const leftSpace = opts.style.marginLeft > 0 ? " ".repeat(opts.style.marginLeft) : "";
1603
+ if (opts.style.marginTop > 0) {
1604
+ boxLines.push("".repeat(opts.style.marginTop));
1605
+ }
1606
+ if (opts.title) {
1607
+ const title = _color ? _color(opts.title) : opts.title;
1608
+ const left = borderStyle.h.repeat(
1609
+ Math.floor((width - stripAnsi(opts.title).length) / 2)
1610
+ );
1611
+ const right = borderStyle.h.repeat(
1612
+ width - stripAnsi(opts.title).length - stripAnsi(left).length + paddingOffset
1613
+ );
1614
+ boxLines.push(
1615
+ `${leftSpace}${borderStyle.tl}${left}${title}${right}${borderStyle.tr}`
1616
+ );
1617
+ } else {
1618
+ boxLines.push(
1619
+ `${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`
1620
+ );
1621
+ }
1622
+ const valignOffset = opts.style.valign === "center" ? Math.floor((height - textLines.length) / 2) : opts.style.valign === "top" ? height - textLines.length - paddingOffset : height - textLines.length;
1623
+ for (let i2 = 0; i2 < height; i2++) {
1624
+ if (i2 < valignOffset || i2 >= valignOffset + textLines.length) {
1625
+ boxLines.push(
1626
+ `${leftSpace}${borderStyle.v}${" ".repeat(widthOffset)}${borderStyle.v}`
1627
+ );
1628
+ } else {
1629
+ const line = textLines[i2 - valignOffset];
1630
+ const left = " ".repeat(paddingOffset);
1631
+ const right = " ".repeat(width - stripAnsi(line).length);
1632
+ boxLines.push(
1633
+ `${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`
1634
+ );
1635
+ }
1636
+ }
1637
+ boxLines.push(
1638
+ `${leftSpace}${borderStyle.bl}${borderStyle.h.repeat(widthOffset)}${borderStyle.br}`
1639
+ );
1640
+ if (opts.style.marginBottom > 0) {
1641
+ boxLines.push("".repeat(opts.style.marginBottom));
1642
+ }
1643
+ return boxLines.join("\n");
1570
1644
  }
1571
- function toBoolean(val) {
1572
- return val ? val !== "false" : false;
1573
- }
1645
+
1646
+ // node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/index.mjs
1647
+ var import_node_util3 = require("util");
1648
+ var import_node_path2 = require("path");
1649
+ var import_node_tty2 = require("tty");
1650
+ var import_meta = {};
1651
+ var r2 = /* @__PURE__ */ Object.create(null);
1652
+ var i = (e2) => {
1653
+ var _a8, _b5;
1654
+ return ((_a8 = globalThis.process) == null ? void 0 : _a8.env) || import_meta.env || ((_b5 = globalThis.Deno) == null ? void 0 : _b5.env.toObject()) || globalThis.__env__ || (e2 ? r2 : globalThis);
1655
+ };
1656
+ var o2 = new Proxy(r2, { get(e2, s2) {
1657
+ return i()[s2] ?? r2[s2];
1658
+ }, has(e2, s2) {
1659
+ const E = i();
1660
+ return s2 in E || s2 in r2;
1661
+ }, set(e2, s2, E) {
1662
+ const B2 = i(true);
1663
+ return B2[s2] = E, true;
1664
+ }, deleteProperty(e2, s2) {
1665
+ if (!s2) return false;
1666
+ const E = i(true);
1667
+ return delete E[s2], true;
1668
+ }, ownKeys() {
1669
+ const e2 = i(true);
1670
+ return Object.keys(e2);
1671
+ } });
1672
+ var t = typeof process < "u" && process.env && process.env.NODE_ENV || "";
1673
+ 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 }]];
1674
+ function b() {
1675
+ var _a8, _b5, _c, _d, _e, _f;
1676
+ if ((_a8 = globalThis.process) == null ? void 0 : _a8.env) for (const e2 of f2) {
1677
+ const s2 = e2[1] || e2[0];
1678
+ if ((_b5 = globalThis.process) == null ? void 0 : _b5.env[s2]) return { name: e2[0].toLowerCase(), ...e2[2] };
1679
+ }
1680
+ return ((_d = (_c = globalThis.process) == null ? void 0 : _c.env) == null ? void 0 : _d.SHELL) === "/bin/jsh" && ((_f = (_e = globalThis.process) == null ? void 0 : _e.versions) == null ? void 0 : _f.webcontainer) ? { name: "stackblitz", ci: false } : { name: "", ci: false };
1681
+ }
1682
+ var l = b();
1683
+ l.name;
1684
+ function n(e2) {
1685
+ return e2 ? e2 !== "false" : false;
1686
+ }
1687
+ var _a;
1688
+ var I2 = ((_a = globalThis.process) == null ? void 0 : _a.platform) || "";
1689
+ var T2 = n(o2.CI) || l.ci !== false;
1690
+ var _a2, _b;
1691
+ var a = n(((_a2 = globalThis.process) == null ? void 0 : _a2.stdout) && ((_b = globalThis.process) == null ? void 0 : _b.stdout.isTTY));
1692
+ var g2 = n(o2.DEBUG);
1693
+ var R2 = t === "test" || n(o2.TEST);
1694
+ n(o2.MINIMAL) || T2 || R2 || !a;
1695
+ var A2 = /^win/i.test(I2);
1696
+ !n(o2.NO_COLOR) && (n(o2.FORCE_COLOR) || (a || A2) && o2.TERM !== "dumb" || T2);
1697
+ var _a3, _b2;
1698
+ var C2 = (((_b2 = (_a3 = globalThis.process) == null ? void 0 : _a3.versions) == null ? void 0 : _b2.node) || "").replace(/^v/, "") || null;
1699
+ Number(C2 == null ? void 0 : C2.split(".")[0]) || null;
1700
+ var y2 = globalThis.process || /* @__PURE__ */ Object.create(null);
1701
+ var _2 = { versions: {} };
1702
+ new Proxy(y2, { get(e2, s2) {
1703
+ if (s2 === "env") return o2;
1704
+ if (s2 in e2) return e2[s2];
1705
+ if (s2 in _2) return _2[s2];
1706
+ } });
1707
+ var _a4, _b3;
1708
+ var c2 = ((_b3 = (_a4 = globalThis.process) == null ? void 0 : _a4.release) == null ? void 0 : _b3.name) === "node";
1709
+ var _a5, _b4;
1710
+ var O2 = !!globalThis.Bun || !!((_b4 = (_a5 = globalThis.process) == null ? void 0 : _a5.versions) == null ? void 0 : _b4.bun);
1711
+ var D = !!globalThis.Deno;
1712
+ var L2 = !!globalThis.fastly;
1713
+ var S2 = !!globalThis.Netlify;
1714
+ var u2 = !!globalThis.EdgeRuntime;
1715
+ var _a6;
1716
+ var N2 = ((_a6 = globalThis.navigator) == null ? void 0 : _a6.userAgent) === "Cloudflare-Workers";
1717
+ var F2 = [[S2, "netlify"], [u2, "edge-light"], [N2, "workerd"], [L2, "fastly"], [D, "deno"], [O2, "bun"], [c2, "node"]];
1718
+ function G2() {
1719
+ const e2 = F2.find((s2) => s2[0]);
1720
+ if (e2) return { name: e2[1] };
1721
+ }
1722
+ var P2 = G2();
1723
+ (P2 == null ? void 0 : P2.name) || "";
1574
1724
  function ansiRegex2({ onlyFirst = false } = {}) {
1725
+ const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
1575
1726
  const pattern = [
1576
- "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
1577
- "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
1727
+ `[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`,
1728
+ "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"
1578
1729
  ].join("|");
1579
1730
  return new RegExp(pattern, onlyFirst ? void 0 : "g");
1580
1731
  }
1732
+ var regex = ansiRegex2();
1581
1733
  function stripAnsi2(string) {
1582
1734
  if (typeof string !== "string") {
1583
1735
  throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
1584
1736
  }
1585
1737
  return string.replace(regex, "");
1586
1738
  }
1587
- function getDefaultExportFromCjs(x) {
1588
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
1739
+ function isAmbiguous(x2) {
1740
+ 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;
1741
+ }
1742
+ function isFullWidth(x2) {
1743
+ return x2 === 12288 || x2 >= 65281 && x2 <= 65376 || x2 >= 65504 && x2 <= 65510;
1744
+ }
1745
+ function isWide(x2) {
1746
+ 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;
1589
1747
  }
1590
- function stringWidth$1(string, options) {
1748
+ function validate(codePoint) {
1749
+ if (!Number.isSafeInteger(codePoint)) {
1750
+ throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
1751
+ }
1752
+ }
1753
+ function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
1754
+ validate(codePoint);
1755
+ if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
1756
+ return 2;
1757
+ }
1758
+ return 1;
1759
+ }
1760
+ var emojiRegex = () => {
1761
+ 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;
1762
+ };
1763
+ var _a7;
1764
+ var segmenter = ((_a7 = globalThis.Intl) == null ? void 0 : _a7.Segmenter) ? new Intl.Segmenter() : { segment: (str) => str.split("") };
1765
+ var defaultIgnorableCodePointRegex = new RegExp("^\\p{Default_Ignorable_Code_Point}$", "u");
1766
+ function stringWidth$1(string, options = {}) {
1591
1767
  if (typeof string !== "string" || string.length === 0) {
1592
1768
  return 0;
1593
1769
  }
1594
- options = {
1595
- ambiguousIsNarrow: true,
1596
- countAnsiEscapeCodes: false,
1597
- ...options
1598
- };
1599
- if (!options.countAnsiEscapeCodes) {
1770
+ const {
1771
+ ambiguousIsNarrow = true,
1772
+ countAnsiEscapeCodes = false
1773
+ } = options;
1774
+ if (!countAnsiEscapeCodes) {
1600
1775
  string = stripAnsi2(string);
1601
1776
  }
1602
1777
  if (string.length === 0) {
1603
1778
  return 0;
1604
1779
  }
1605
- const ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2;
1606
1780
  let width = 0;
1607
- for (const { segment: character } of new Intl.Segmenter().segment(string)) {
1781
+ const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
1782
+ for (const { segment: character } of segmenter.segment(string)) {
1608
1783
  const codePoint = character.codePointAt(0);
1609
1784
  if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
1610
1785
  continue;
1611
1786
  }
1612
- if (codePoint >= 768 && codePoint <= 879) {
1787
+ if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) {
1788
+ continue;
1789
+ }
1790
+ if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) {
1791
+ continue;
1792
+ }
1793
+ if (codePoint >= 55296 && codePoint <= 57343) {
1794
+ continue;
1795
+ }
1796
+ if (codePoint >= 65024 && codePoint <= 65039) {
1797
+ continue;
1798
+ }
1799
+ if (defaultIgnorableCodePointRegex.test(character)) {
1613
1800
  continue;
1614
1801
  }
1615
1802
  if (emojiRegex().test(character)) {
1616
1803
  width += 2;
1617
1804
  continue;
1618
1805
  }
1619
- const code = eastAsianWidth.eastAsianWidth(character);
1620
- switch (code) {
1621
- case "F":
1622
- case "W": {
1623
- width += 2;
1624
- break;
1625
- }
1626
- case "A": {
1627
- width += ambiguousCharacterWidth;
1628
- break;
1629
- }
1630
- default: {
1631
- width += 1;
1632
- }
1633
- }
1806
+ width += eastAsianWidth(codePoint, eastAsianWidthOptions);
1634
1807
  }
1635
1808
  return width;
1636
1809
  }
1637
1810
  function isUnicodeSupported() {
1811
+ const { env: env2 } = import_node_process2.default;
1812
+ const { TERM, TERM_PROGRAM } = env2;
1638
1813
  if (import_node_process2.default.platform !== "win32") {
1639
- return import_node_process2.default.env.TERM !== "linux";
1814
+ return TERM !== "linux";
1640
1815
  }
1641
- return Boolean(import_node_process2.default.env.CI) || Boolean(import_node_process2.default.env.WT_SESSION) || Boolean(import_node_process2.default.env.TERMINUS_SUBLIME) || import_node_process2.default.env.ConEmuTask === "{cmd::Cmder}" || import_node_process2.default.env.TERM_PROGRAM === "Terminus-Sublime" || import_node_process2.default.env.TERM_PROGRAM === "vscode" || import_node_process2.default.env.TERM === "xterm-256color" || import_node_process2.default.env.TERM === "alacritty" || import_node_process2.default.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
1816
+ 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";
1642
1817
  }
1818
+ var TYPE_COLOR_MAP = {
1819
+ info: "cyan",
1820
+ fail: "red",
1821
+ success: "green",
1822
+ ready: "green",
1823
+ start: "magenta"
1824
+ };
1825
+ var LEVEL_COLOR_MAP = {
1826
+ 0: "red",
1827
+ 1: "yellow"
1828
+ };
1829
+ var unicode = isUnicodeSupported();
1830
+ var s = (c3, fallback) => unicode ? c3 : fallback;
1831
+ var TYPE_ICONS = {
1832
+ error: s("\u2716", "\xD7"),
1833
+ fatal: s("\u2716", "\xD7"),
1834
+ ready: s("\u2714", "\u221A"),
1835
+ warn: s("\u26A0", "\u203C"),
1836
+ info: s("\u2139", "i"),
1837
+ success: s("\u2714", "\u221A"),
1838
+ debug: s("\u2699", "D"),
1839
+ trace: s("\u2192", "\u2192"),
1840
+ fail: s("\u2716", "\xD7"),
1841
+ start: s("\u25D0", "o"),
1842
+ log: ""
1843
+ };
1643
1844
  function stringWidth(str) {
1644
- if (!Intl.Segmenter) {
1845
+ const hasICU = typeof Intl === "object";
1846
+ if (!hasICU || !Intl.Segmenter) {
1645
1847
  return stripAnsi(str).length;
1646
1848
  }
1647
1849
  return stringWidth$1(str);
1648
1850
  }
1851
+ var FancyReporter = class extends BasicReporter {
1852
+ formatStack(stack, message, opts) {
1853
+ const indent = " ".repeat(((opts == null ? void 0 : opts.errorLevel) || 0) + 1);
1854
+ return `
1855
+ ${indent}` + parseStack(stack, message).map(
1856
+ (line) => " " + line.replace(/^at +/, (m2) => colors.gray(m2)).replace(/\((.+)\)/, (_3, m2) => `(${colors.cyan(m2)})`)
1857
+ ).join(`
1858
+ ${indent}`);
1859
+ }
1860
+ formatType(logObj, isBadge, opts) {
1861
+ const typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || "gray";
1862
+ if (isBadge) {
1863
+ return getBgColor(typeColor)(
1864
+ colors.black(` ${logObj.type.toUpperCase()} `)
1865
+ );
1866
+ }
1867
+ const _type = typeof TYPE_ICONS[logObj.type] === "string" ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type;
1868
+ return _type ? getColor2(typeColor)(_type) : "";
1869
+ }
1870
+ formatLogObj(logObj, opts) {
1871
+ const [message, ...additional] = this.formatArgs(logObj.args, opts).split(
1872
+ "\n"
1873
+ );
1874
+ if (logObj.type === "box") {
1875
+ return box(
1876
+ characterFormat(
1877
+ message + (additional.length > 0 ? "\n" + additional.join("\n") : "")
1878
+ ),
1879
+ {
1880
+ title: logObj.title ? characterFormat(logObj.title) : void 0,
1881
+ style: logObj.style
1882
+ }
1883
+ );
1884
+ }
1885
+ const date = this.formatDate(logObj.date, opts);
1886
+ const coloredDate = date && colors.gray(date);
1887
+ const isBadge = logObj.badge ?? logObj.level < 2;
1888
+ const type = this.formatType(logObj, isBadge, opts);
1889
+ const tag = logObj.tag ? colors.gray(logObj.tag) : "";
1890
+ let line;
1891
+ const left = this.filterAndJoin([type, characterFormat(message)]);
1892
+ const right = this.filterAndJoin(opts.columns ? [tag, coloredDate] : [tag]);
1893
+ const space = (opts.columns || 0) - stringWidth(left) - stringWidth(right) - 2;
1894
+ line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors.gray(`[${right}]`)} ` : "") + left;
1895
+ line += characterFormat(
1896
+ additional.length > 0 ? "\n" + additional.join("\n") : ""
1897
+ );
1898
+ if (logObj.type === "trace") {
1899
+ const _err = new Error("Trace: " + logObj.message);
1900
+ line += this.formatStack(_err.stack || "", _err.message);
1901
+ }
1902
+ return isBadge ? "\n" + line + "\n" : line;
1903
+ }
1904
+ };
1649
1905
  function characterFormat(str) {
1650
- return str.replace(/`([^`]+)`/gm, (_2, m2) => colors.cyan(m2)).replace(/\s+_([^_]+)_\s+/gm, (_2, m2) => ` ${colors.underline(m2)} `);
1906
+ return str.replace(/`([^`]+)`/gm, (_3, m2) => colors.cyan(m2)).replace(/\s+_([^_]+)_\s+/gm, (_3, m2) => ` ${colors.underline(m2)} `);
1651
1907
  }
1652
1908
  function getColor2(color = "white") {
1653
1909
  return colors[color] || colors.white;
@@ -1667,285 +1923,22 @@ function createConsola2(options = {}) {
1667
1923
  stderr: process.stderr,
1668
1924
  prompt: (...args) => Promise.resolve().then(() => (init_prompt(), prompt_exports)).then((m2) => m2.prompt(...args)),
1669
1925
  reporters: options.reporters || [
1670
- options.fancy ?? !(isCI2 || isTest) ? new FancyReporter() : new BasicReporter()
1926
+ options.fancy ?? !(T2 || R2) ? new FancyReporter() : new BasicReporter()
1671
1927
  ],
1672
1928
  ...options
1673
1929
  });
1674
1930
  return consola2;
1675
1931
  }
1676
1932
  function _getDefaultLogLevel() {
1677
- if (isDebug) {
1933
+ if (g2) {
1678
1934
  return LogLevels.debug;
1679
1935
  }
1680
- if (isTest) {
1936
+ if (R2) {
1681
1937
  return LogLevels.warn;
1682
1938
  }
1683
1939
  return LogLevels.info;
1684
1940
  }
1685
- var import_node_process2, providers, processShim, envShim, providerInfo, nodeENV, isCI2, hasTTY, isDebug, isTest, regex, eastasianwidth, eastasianwidthExports, eastAsianWidth, emojiRegex, TYPE_COLOR_MAP, LEVEL_COLOR_MAP, unicode2, s2, TYPE_ICONS, FancyReporter, consola;
1686
- var init_consola_36c0034f = __esm({
1687
- "node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/shared/consola.36c0034f.mjs"() {
1688
- "use strict";
1689
- init_cjs_shims();
1690
- init_core();
1691
- init_consola_06ad8a64();
1692
- import_node_process2 = __toESM(require("process"), 1);
1693
- init_utils();
1694
- providers = [
1695
- ["APPVEYOR"],
1696
- ["AZURE_PIPELINES", "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],
1697
- ["AZURE_STATIC", "INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],
1698
- ["APPCIRCLE", "AC_APPCIRCLE"],
1699
- ["BAMBOO", "bamboo_planKey"],
1700
- ["BITBUCKET", "BITBUCKET_COMMIT"],
1701
- ["BITRISE", "BITRISE_IO"],
1702
- ["BUDDY", "BUDDY_WORKSPACE_ID"],
1703
- ["BUILDKITE"],
1704
- ["CIRCLE", "CIRCLECI"],
1705
- ["CIRRUS", "CIRRUS_CI"],
1706
- ["CLOUDFLARE_PAGES", "CF_PAGES", { ci: true }],
1707
- ["CODEBUILD", "CODEBUILD_BUILD_ARN"],
1708
- ["CODEFRESH", "CF_BUILD_ID"],
1709
- ["DRONE"],
1710
- ["DRONE", "DRONE_BUILD_EVENT"],
1711
- ["DSARI"],
1712
- ["GITHUB_ACTIONS"],
1713
- ["GITLAB", "GITLAB_CI"],
1714
- ["GITLAB", "CI_MERGE_REQUEST_ID"],
1715
- ["GOCD", "GO_PIPELINE_LABEL"],
1716
- ["LAYERCI"],
1717
- ["HUDSON", "HUDSON_URL"],
1718
- ["JENKINS", "JENKINS_URL"],
1719
- ["MAGNUM"],
1720
- ["NETLIFY"],
1721
- ["NETLIFY", "NETLIFY_LOCAL", { ci: false }],
1722
- ["NEVERCODE"],
1723
- ["RENDER"],
1724
- ["SAIL", "SAILCI"],
1725
- ["SEMAPHORE"],
1726
- ["SCREWDRIVER"],
1727
- ["SHIPPABLE"],
1728
- ["SOLANO", "TDDIUM"],
1729
- ["STRIDER"],
1730
- ["TEAMCITY", "TEAMCITY_VERSION"],
1731
- ["TRAVIS"],
1732
- ["VERCEL", "NOW_BUILDER"],
1733
- ["APPCENTER", "APPCENTER_BUILD_ID"],
1734
- ["CODESANDBOX", "CODESANDBOX_SSE", { ci: false }],
1735
- ["STACKBLITZ"],
1736
- ["STORMKIT"],
1737
- ["CLEAVR"]
1738
- ];
1739
- processShim = typeof process !== "undefined" ? process : {};
1740
- envShim = processShim.env || {};
1741
- providerInfo = detectProvider(envShim);
1742
- nodeENV = typeof process !== "undefined" && process.env && process.env.NODE_ENV || "";
1743
- processShim.platform;
1744
- providerInfo.name;
1745
- isCI2 = toBoolean(envShim.CI) || providerInfo.ci !== false;
1746
- hasTTY = toBoolean(processShim.stdout && processShim.stdout.isTTY);
1747
- isDebug = toBoolean(envShim.DEBUG);
1748
- isTest = nodeENV === "test" || toBoolean(envShim.TEST);
1749
- toBoolean(envShim.MINIMAL) || isCI2 || isTest || !hasTTY;
1750
- regex = ansiRegex2();
1751
- eastasianwidth = { exports: {} };
1752
- (function(module2) {
1753
- var eaw = {};
1754
- {
1755
- module2.exports = eaw;
1756
- }
1757
- eaw.eastAsianWidth = function(character) {
1758
- var x = character.charCodeAt(0);
1759
- var y = character.length == 2 ? character.charCodeAt(1) : 0;
1760
- var codePoint = x;
1761
- if (55296 <= x && x <= 56319 && (56320 <= y && y <= 57343)) {
1762
- x &= 1023;
1763
- y &= 1023;
1764
- codePoint = x << 10 | y;
1765
- codePoint += 65536;
1766
- }
1767
- if (12288 == codePoint || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510) {
1768
- return "F";
1769
- }
1770
- if (8361 == codePoint || 65377 <= codePoint && codePoint <= 65470 || 65474 <= codePoint && codePoint <= 65479 || 65482 <= codePoint && codePoint <= 65487 || 65490 <= codePoint && codePoint <= 65495 || 65498 <= codePoint && codePoint <= 65500 || 65512 <= codePoint && codePoint <= 65518) {
1771
- return "H";
1772
- }
1773
- if (4352 <= codePoint && codePoint <= 4447 || 4515 <= codePoint && codePoint <= 4519 || 4602 <= codePoint && codePoint <= 4607 || 9001 <= codePoint && codePoint <= 9002 || 11904 <= codePoint && codePoint <= 11929 || 11931 <= codePoint && codePoint <= 12019 || 12032 <= codePoint && codePoint <= 12245 || 12272 <= codePoint && codePoint <= 12283 || 12289 <= codePoint && codePoint <= 12350 || 12353 <= codePoint && codePoint <= 12438 || 12441 <= codePoint && codePoint <= 12543 || 12549 <= codePoint && codePoint <= 12589 || 12593 <= codePoint && codePoint <= 12686 || 12688 <= codePoint && codePoint <= 12730 || 12736 <= codePoint && codePoint <= 12771 || 12784 <= codePoint && codePoint <= 12830 || 12832 <= codePoint && codePoint <= 12871 || 12880 <= codePoint && codePoint <= 13054 || 13056 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42124 || 42128 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 55216 <= codePoint && codePoint <= 55238 || 55243 <= codePoint && codePoint <= 55291 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65106 || 65108 <= codePoint && codePoint <= 65126 || 65128 <= codePoint && codePoint <= 65131 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127490 || 127504 <= codePoint && codePoint <= 127546 || 127552 <= codePoint && codePoint <= 127560 || 127568 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 194367 || 177984 <= codePoint && codePoint <= 196605 || 196608 <= codePoint && codePoint <= 262141) {
1774
- return "W";
1775
- }
1776
- if (32 <= codePoint && codePoint <= 126 || 162 <= codePoint && codePoint <= 163 || 165 <= codePoint && codePoint <= 166 || 172 == codePoint || 175 == codePoint || 10214 <= codePoint && codePoint <= 10221 || 10629 <= codePoint && codePoint <= 10630) {
1777
- return "Na";
1778
- }
1779
- if (161 == codePoint || 164 == codePoint || 167 <= codePoint && codePoint <= 168 || 170 == codePoint || 173 <= codePoint && codePoint <= 174 || 176 <= codePoint && codePoint <= 180 || 182 <= codePoint && codePoint <= 186 || 188 <= codePoint && codePoint <= 191 || 198 == codePoint || 208 == codePoint || 215 <= codePoint && codePoint <= 216 || 222 <= codePoint && codePoint <= 225 || 230 == codePoint || 232 <= codePoint && codePoint <= 234 || 236 <= codePoint && codePoint <= 237 || 240 == codePoint || 242 <= codePoint && codePoint <= 243 || 247 <= codePoint && codePoint <= 250 || 252 == codePoint || 254 == codePoint || 257 == codePoint || 273 == codePoint || 275 == codePoint || 283 == codePoint || 294 <= codePoint && codePoint <= 295 || 299 == codePoint || 305 <= codePoint && codePoint <= 307 || 312 == codePoint || 319 <= codePoint && codePoint <= 322 || 324 == codePoint || 328 <= codePoint && codePoint <= 331 || 333 == codePoint || 338 <= codePoint && codePoint <= 339 || 358 <= codePoint && codePoint <= 359 || 363 == codePoint || 462 == codePoint || 464 == codePoint || 466 == codePoint || 468 == codePoint || 470 == codePoint || 472 == codePoint || 474 == codePoint || 476 == codePoint || 593 == codePoint || 609 == codePoint || 708 == codePoint || 711 == codePoint || 713 <= codePoint && codePoint <= 715 || 717 == codePoint || 720 == codePoint || 728 <= codePoint && codePoint <= 731 || 733 == codePoint || 735 == codePoint || 768 <= codePoint && codePoint <= 879 || 913 <= codePoint && codePoint <= 929 || 931 <= codePoint && codePoint <= 937 || 945 <= codePoint && codePoint <= 961 || 963 <= codePoint && codePoint <= 969 || 1025 == codePoint || 1040 <= codePoint && codePoint <= 1103 || 1105 == codePoint || 8208 == codePoint || 8211 <= codePoint && codePoint <= 8214 || 8216 <= codePoint && codePoint <= 8217 || 8220 <= codePoint && codePoint <= 8221 || 8224 <= codePoint && codePoint <= 8226 || 8228 <= codePoint && codePoint <= 8231 || 8240 == codePoint || 8242 <= codePoint && codePoint <= 8243 || 8245 == codePoint || 8251 == codePoint || 8254 == codePoint || 8308 == codePoint || 8319 == codePoint || 8321 <= codePoint && codePoint <= 8324 || 8364 == codePoint || 8451 == codePoint || 8453 == codePoint || 8457 == codePoint || 8467 == codePoint || 8470 == codePoint || 8481 <= codePoint && codePoint <= 8482 || 8486 == codePoint || 8491 == codePoint || 8531 <= codePoint && codePoint <= 8532 || 8539 <= codePoint && codePoint <= 8542 || 8544 <= codePoint && codePoint <= 8555 || 8560 <= codePoint && codePoint <= 8569 || 8585 == codePoint || 8592 <= codePoint && codePoint <= 8601 || 8632 <= codePoint && codePoint <= 8633 || 8658 == codePoint || 8660 == codePoint || 8679 == codePoint || 8704 == codePoint || 8706 <= codePoint && codePoint <= 8707 || 8711 <= codePoint && codePoint <= 8712 || 8715 == codePoint || 8719 == codePoint || 8721 == codePoint || 8725 == codePoint || 8730 == codePoint || 8733 <= codePoint && codePoint <= 8736 || 8739 == codePoint || 8741 == codePoint || 8743 <= codePoint && codePoint <= 8748 || 8750 == codePoint || 8756 <= codePoint && codePoint <= 8759 || 8764 <= codePoint && codePoint <= 8765 || 8776 == codePoint || 8780 == codePoint || 8786 == codePoint || 8800 <= codePoint && codePoint <= 8801 || 8804 <= codePoint && codePoint <= 8807 || 8810 <= codePoint && codePoint <= 8811 || 8814 <= codePoint && codePoint <= 8815 || 8834 <= codePoint && codePoint <= 8835 || 8838 <= codePoint && codePoint <= 8839 || 8853 == codePoint || 8857 == codePoint || 8869 == codePoint || 8895 == codePoint || 8978 == codePoint || 9312 <= codePoint && codePoint <= 9449 || 9451 <= codePoint && codePoint <= 9547 || 9552 <= codePoint && codePoint <= 9587 || 9600 <= codePoint && codePoint <= 9615 || 9618 <= codePoint && codePoint <= 9621 || 9632 <= codePoint && codePoint <= 9633 || 9635 <= codePoint && codePoint <= 9641 || 9650 <= codePoint && codePoint <= 9651 || 9654 <= codePoint && codePoint <= 9655 || 9660 <= codePoint && codePoint <= 9661 || 9664 <= codePoint && codePoint <= 9665 || 9670 <= codePoint && codePoint <= 9672 || 9675 == codePoint || 9678 <= codePoint && codePoint <= 9681 || 9698 <= codePoint && codePoint <= 9701 || 9711 == codePoint || 9733 <= codePoint && codePoint <= 9734 || 9737 == codePoint || 9742 <= codePoint && codePoint <= 9743 || 9748 <= codePoint && codePoint <= 9749 || 9756 == codePoint || 9758 == codePoint || 9792 == codePoint || 9794 == codePoint || 9824 <= codePoint && codePoint <= 9825 || 9827 <= codePoint && codePoint <= 9829 || 9831 <= codePoint && codePoint <= 9834 || 9836 <= codePoint && codePoint <= 9837 || 9839 == codePoint || 9886 <= codePoint && codePoint <= 9887 || 9918 <= codePoint && codePoint <= 9919 || 9924 <= codePoint && codePoint <= 9933 || 9935 <= codePoint && codePoint <= 9953 || 9955 == codePoint || 9960 <= codePoint && codePoint <= 9983 || 10045 == codePoint || 10071 == codePoint || 10102 <= codePoint && codePoint <= 10111 || 11093 <= codePoint && codePoint <= 11097 || 12872 <= codePoint && codePoint <= 12879 || 57344 <= codePoint && codePoint <= 63743 || 65024 <= codePoint && codePoint <= 65039 || 65533 == codePoint || 127232 <= codePoint && codePoint <= 127242 || 127248 <= codePoint && codePoint <= 127277 || 127280 <= codePoint && codePoint <= 127337 || 127344 <= codePoint && codePoint <= 127386 || 917760 <= codePoint && codePoint <= 917999 || 983040 <= codePoint && codePoint <= 1048573 || 1048576 <= codePoint && codePoint <= 1114109) {
1780
- return "A";
1781
- }
1782
- return "N";
1783
- };
1784
- eaw.characterLength = function(character) {
1785
- var code = this.eastAsianWidth(character);
1786
- if (code == "F" || code == "W" || code == "A") {
1787
- return 2;
1788
- } else {
1789
- return 1;
1790
- }
1791
- };
1792
- function stringToArray(string) {
1793
- return string.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
1794
- }
1795
- eaw.length = function(string) {
1796
- var characters = stringToArray(string);
1797
- var len = 0;
1798
- for (var i = 0; i < characters.length; i++) {
1799
- len = len + this.characterLength(characters[i]);
1800
- }
1801
- return len;
1802
- };
1803
- eaw.slice = function(text2, start, end) {
1804
- textLen = eaw.length(text2);
1805
- start = start ? start : 0;
1806
- end = end ? end : 1;
1807
- if (start < 0) {
1808
- start = textLen + start;
1809
- }
1810
- if (end < 0) {
1811
- end = textLen + end;
1812
- }
1813
- var result = "";
1814
- var eawLen = 0;
1815
- var chars = stringToArray(text2);
1816
- for (var i = 0; i < chars.length; i++) {
1817
- var char = chars[i];
1818
- var charLen = eaw.length(char);
1819
- if (eawLen >= start - (charLen == 2 ? 1 : 0)) {
1820
- if (eawLen + charLen <= end) {
1821
- result += char;
1822
- } else {
1823
- break;
1824
- }
1825
- }
1826
- eawLen += charLen;
1827
- }
1828
- return result;
1829
- };
1830
- })(eastasianwidth);
1831
- eastasianwidthExports = eastasianwidth.exports;
1832
- eastAsianWidth = /* @__PURE__ */ getDefaultExportFromCjs(eastasianwidthExports);
1833
- emojiRegex = () => {
1834
- 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\u26D3\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](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\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]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\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])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\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]|\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-\uDDF5\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]|\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(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\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-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\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-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\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-\uDDB3\uDDBC\uDDBD])|\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-\uDDB3\uDDBC\uDDBD]|\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-\uDDB3\uDDBC\uDDBD]|\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-\uDDB3\uDDBC\uDDBD]|\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-\uDDB3\uDDBC\uDDBD]|\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-\uDDB3\uDDBC\uDDBD]|\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-\uDDB3\uDDBC\uDDBD])|\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-\uDDB3\uDDBC\uDDBD]|\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-\uDDB3\uDDBC\uDDBD]|\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-\uDDB3\uDDBC\uDDBD]|\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-\uDDB3\uDDBC\uDDBD]|\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-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\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-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\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-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\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-\uDDB3\uDDBC\uDDBD]|\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-\uDDB3\uDDBC\uDDBD]|\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-\uDDB3\uDDBC\uDDBD]|\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-\uDDB3\uDDBC\uDDBD]|\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-\uDDB3\uDDBC\uDDBD]|\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;
1835
- };
1836
- TYPE_COLOR_MAP = {
1837
- info: "cyan",
1838
- fail: "red",
1839
- success: "green",
1840
- ready: "green",
1841
- start: "magenta"
1842
- };
1843
- LEVEL_COLOR_MAP = {
1844
- 0: "red",
1845
- 1: "yellow"
1846
- };
1847
- unicode2 = isUnicodeSupported();
1848
- s2 = (c2, fallback) => unicode2 ? c2 : fallback;
1849
- TYPE_ICONS = {
1850
- error: s2("\u2716", "\xD7"),
1851
- fatal: s2("\u2716", "\xD7"),
1852
- ready: s2("\u2714", "\u221A"),
1853
- warn: s2("\u26A0", "\u203C"),
1854
- info: s2("\u2139", "i"),
1855
- success: s2("\u2714", "\u221A"),
1856
- debug: s2("\u2699", "D"),
1857
- trace: s2("\u2192", "\u2192"),
1858
- fail: s2("\u2716", "\xD7"),
1859
- start: s2("\u25D0", "o"),
1860
- log: ""
1861
- };
1862
- FancyReporter = class extends BasicReporter {
1863
- formatStack(stack) {
1864
- return "\n" + parseStack(stack).map(
1865
- (line) => " " + line.replace(/^at +/, (m2) => colors.gray(m2)).replace(/\((.+)\)/, (_2, m2) => `(${colors.cyan(m2)})`)
1866
- ).join("\n");
1867
- }
1868
- formatType(logObj, isBadge, opts) {
1869
- const typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || "gray";
1870
- if (isBadge) {
1871
- return getBgColor(typeColor)(
1872
- colors.black(` ${logObj.type.toUpperCase()} `)
1873
- );
1874
- }
1875
- const _type = typeof TYPE_ICONS[logObj.type] === "string" ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type;
1876
- return _type ? getColor2(typeColor)(_type) : "";
1877
- }
1878
- formatLogObj(logObj, opts) {
1879
- const [message, ...additional] = this.formatArgs(logObj.args, opts).split(
1880
- "\n"
1881
- );
1882
- if (logObj.type === "box") {
1883
- return box(
1884
- characterFormat(
1885
- message + (additional.length > 0 ? "\n" + additional.join("\n") : "")
1886
- ),
1887
- {
1888
- title: logObj.title ? characterFormat(logObj.title) : void 0,
1889
- style: logObj.style
1890
- }
1891
- );
1892
- }
1893
- const date = this.formatDate(logObj.date, opts);
1894
- const coloredDate = date && colors.gray(date);
1895
- const isBadge = logObj.badge ?? logObj.level < 2;
1896
- const type = this.formatType(logObj, isBadge, opts);
1897
- const tag = logObj.tag ? colors.gray(logObj.tag) : "";
1898
- let line;
1899
- const left = this.filterAndJoin([type, characterFormat(message)]);
1900
- const right = this.filterAndJoin(opts.columns ? [tag, coloredDate] : [tag]);
1901
- const space = (opts.columns || 0) - stringWidth(left) - stringWidth(right) - 2;
1902
- line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors.gray(`[${right}]`)} ` : "") + left;
1903
- line += characterFormat(
1904
- additional.length > 0 ? "\n" + additional.join("\n") : ""
1905
- );
1906
- if (logObj.type === "trace") {
1907
- const _err = new Error("Trace: " + logObj.message);
1908
- line += this.formatStack(_err.stack || "");
1909
- }
1910
- return isBadge ? "\n" + line + "\n" : line;
1911
- }
1912
- };
1913
- consola = createConsola2();
1914
- }
1915
- });
1916
-
1917
- // src/index.ts
1918
- var src_exports = {};
1919
- __export(src_exports, {
1920
- generateChangelog: () => generateChangelog,
1921
- generateTotalChangelog: () => generateTotalChangelog,
1922
- getChangelogMarkdown: () => getChangelogMarkdown,
1923
- getTotalChangelogMarkdown: () => getTotalChangelogMarkdown
1924
- });
1925
- module.exports = __toCommonJS(src_exports);
1926
- init_cjs_shims();
1927
- var import_cli_progress = require("cli-progress");
1928
-
1929
- // src/options.ts
1930
- init_cjs_shims();
1931
- var import_node_process4 = __toESM(require("process"), 1);
1932
- var import_promises = require("fs/promises");
1933
-
1934
- // src/git.ts
1935
- init_cjs_shims();
1936
- var import_ofetch = require("ofetch");
1937
- var import_dayjs = __toESM(require("dayjs"), 1);
1938
-
1939
- // node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/index.mjs
1940
- init_cjs_shims();
1941
- init_consola_36c0034f();
1942
- init_core();
1943
- init_consola_06ad8a64();
1944
- var import_node_process3 = require("process");
1945
- init_utils();
1946
- var import_node_tty2 = require("tty");
1947
- var import_node_util3 = require("util");
1948
- var import_node_path3 = require("path");
1941
+ var consola = createConsola2();
1949
1942
 
1950
1943
  // src/git.ts
1951
1944
  var import_semver = __toESM(require("semver"), 1);
@@ -1953,26 +1946,26 @@ var import_semver = __toESM(require("semver"), 1);
1953
1946
  // src/shared.ts
1954
1947
  init_cjs_shims();
1955
1948
  async function execCommand(cmd, args, options) {
1956
- var _a;
1949
+ var _a8;
1957
1950
  const { execa } = await import("execa");
1958
1951
  const res = await execa(cmd, args, options);
1959
- return ((_a = res == null ? void 0 : res.stdout) == null ? void 0 : _a.trim()) || "";
1952
+ return ((_a8 = res == null ? void 0 : res.stdout) == null ? void 0 : _a8.trim()) || "";
1960
1953
  }
1961
1954
  function notNullish(v2) {
1962
1955
  return v2 !== null && v2 !== void 0;
1963
1956
  }
1964
1957
  function partition(array, ...filters) {
1965
1958
  const result = Array.from({ length: filters.length + 1 }).fill(null).map(() => []);
1966
- array.forEach((e, idx, arr) => {
1967
- let i = 0;
1959
+ array.forEach((e2, idx, arr) => {
1960
+ let i2 = 0;
1968
1961
  for (const filter of filters) {
1969
- if (filter(e, idx, arr)) {
1970
- result[i].push(e);
1962
+ if (filter(e2, idx, arr)) {
1963
+ result[i2].push(e2);
1971
1964
  return;
1972
1965
  }
1973
- i += 1;
1966
+ i2 += 1;
1974
1967
  }
1975
- result[i].push(e);
1968
+ result[i2].push(e2);
1976
1969
  });
1977
1970
  return result;
1978
1971
  }
@@ -1988,12 +1981,9 @@ function capitalize(str) {
1988
1981
  return str.charAt(0).toUpperCase() + str.slice(1);
1989
1982
  }
1990
1983
  function join(array, glue = ", ", finalGlue = " and ") {
1991
- if (!array || array.length === 0)
1992
- return "";
1993
- if (array.length === 1)
1994
- return array[0];
1995
- if (array.length === 2)
1996
- return array.join(finalGlue);
1984
+ if (!array || array.length === 0) return "";
1985
+ if (array.length === 1) return array[0];
1986
+ if (array.length === 2) return array.join(finalGlue);
1997
1987
  return `${array.slice(0, -1).join(glue)}${finalGlue}${array.slice(-1)}`;
1998
1988
  }
1999
1989
 
@@ -2022,10 +2012,10 @@ async function getTagDateMap() {
2022
2012
  const map = /* @__PURE__ */ new Map();
2023
2013
  const dates = tagDateStr.split("\n").filter((item) => item.includes(TAG_MARK));
2024
2014
  dates.forEach((item) => {
2025
- var _a;
2015
+ var _a8;
2026
2016
  const [dateStr, tagStr] = item.split(TAG_MARK);
2027
2017
  const date = (0, import_dayjs.default)(dateStr).format("YYYY-MM-DD");
2028
- const tag = (_a = tagStr.match(VERSION_REG)) == null ? void 0 : _a[0];
2018
+ const tag = (_a8 = tagStr.match(VERSION_REG)) == null ? void 0 : _a8[0];
2029
2019
  if (tag && date) {
2030
2020
  map.set(tag.trim(), date);
2031
2021
  }
@@ -2116,7 +2106,7 @@ function parseGitCommit(commit) {
2116
2106
  references.push({ type: "pull-request", value: m2[1] });
2117
2107
  }
2118
2108
  for (const m2 of description.matchAll(IssueRE)) {
2119
- if (!references.some((i) => i.value === m2[1])) {
2109
+ if (!references.some((i2) => i2.value === m2[1])) {
2120
2110
  references.push({ type: "issue", value: m2[1] });
2121
2111
  }
2122
2112
  }
@@ -2155,13 +2145,13 @@ function getHeaders(githubToken) {
2155
2145
  };
2156
2146
  }
2157
2147
  async function getResolvedAuthorLogin(github, commitHashes, email) {
2158
- var _a, _b;
2148
+ var _a8, _b5;
2159
2149
  let login = "";
2160
2150
  try {
2161
2151
  const data = await (0, import_ofetch.ofetch)(`https://ungh.cc/users/find/${email}`);
2162
- login = ((_a = data == null ? void 0 : data.user) == null ? void 0 : _a.username) || "";
2163
- } catch (e) {
2164
- consola.log("e: ", e);
2152
+ login = ((_a8 = data == null ? void 0 : data.user) == null ? void 0 : _a8.username) || "";
2153
+ } catch (e2) {
2154
+ consola.log("e: ", e2);
2165
2155
  }
2166
2156
  if (login) {
2167
2157
  return login;
@@ -2175,9 +2165,9 @@ async function getResolvedAuthorLogin(github, commitHashes, email) {
2175
2165
  const data = await (0, import_ofetch.ofetch)(`https://api.github.com/repos/${repo}/commits/${commitHashes[0]}`, {
2176
2166
  headers: getHeaders(token)
2177
2167
  });
2178
- login = ((_b = data == null ? void 0 : data.author) == null ? void 0 : _b.login) || "";
2179
- } catch (e) {
2180
- consola.log("e: ", e);
2168
+ login = ((_b5 = data == null ? void 0 : data.author) == null ? void 0 : _b5.login) || "";
2169
+ } catch (e2) {
2170
+ consola.log("e: ", e2);
2181
2171
  }
2182
2172
  }
2183
2173
  if (login) {
@@ -2188,8 +2178,8 @@ async function getResolvedAuthorLogin(github, commitHashes, email) {
2188
2178
  headers: getHeaders(token)
2189
2179
  });
2190
2180
  login = data.items[0].login;
2191
- } catch (e) {
2192
- consola.log("e: ", e);
2181
+ } catch (e2) {
2182
+ consola.log("e: ", e2);
2193
2183
  }
2194
2184
  return login;
2195
2185
  }
@@ -2236,7 +2226,7 @@ async function getGitCommitsAndResolvedAuthors(commits, github, resolvedLogins)
2236
2226
 
2237
2227
  // src/options.ts
2238
2228
  function createDefaultOptions() {
2239
- const cwd = import_node_process4.default.cwd();
2229
+ const cwd = import_node_process3.default.cwd();
2240
2230
  const options = {
2241
2231
  cwd,
2242
2232
  types: {
@@ -2256,7 +2246,7 @@ function createDefaultOptions() {
2256
2246
  },
2257
2247
  github: {
2258
2248
  repo: "",
2259
- token: import_node_process4.default.env.GITHUB_TOKEN || ""
2249
+ token: import_node_process3.default.env.GITHUB_TOKEN || ""
2260
2250
  },
2261
2251
  from: "",
2262
2252
  to: "",
@@ -2285,11 +2275,11 @@ async function getVersionFromPkgJson(cwd) {
2285
2275
  };
2286
2276
  }
2287
2277
  async function createOptions(options) {
2288
- var _a;
2278
+ var _a8;
2289
2279
  const opts = createDefaultOptions();
2290
2280
  Object.assign(opts, options);
2291
2281
  const { newVersion } = await getVersionFromPkgJson(opts.cwd);
2292
- (_a = opts.github).repo || (_a.repo = await getGitHubRepo());
2282
+ (_a8 = opts.github).repo || (_a8.repo = await getGitHubRepo());
2293
2283
  const tags = await getTotalGitTags();
2294
2284
  opts.tags = tags;
2295
2285
  opts.from || (opts.from = tags[tags.length - 1]);
@@ -2316,35 +2306,32 @@ var import_promises2 = require("fs/promises");
2316
2306
  var import_dayjs2 = __toESM(require("dayjs"), 1);
2317
2307
  var import_convert_gitmoji = require("convert-gitmoji");
2318
2308
  function formatReferences(references, githubRepo, type) {
2319
- const refs = references.filter((i) => {
2320
- if (type === "issues")
2321
- return i.type === "issue" || i.type === "pull-request";
2322
- return i.type === "hash";
2309
+ const refs = references.filter((i2) => {
2310
+ if (type === "issues") return i2.type === "issue" || i2.type === "pull-request";
2311
+ return i2.type === "hash";
2323
2312
  }).map((ref) => {
2324
- if (!githubRepo)
2325
- return ref.value;
2313
+ if (!githubRepo) return ref.value;
2326
2314
  if (ref.type === "pull-request" || ref.type === "issue")
2327
2315
  return `https://github.com/${githubRepo}/issues/${ref.value.slice(1)}`;
2328
2316
  return `[<samp>(${ref.value.slice(0, 5)})</samp>](https://github.com/${githubRepo}/commit/${ref.value})`;
2329
2317
  });
2330
2318
  const referencesString = join(refs).trim();
2331
- if (type === "issues")
2332
- return referencesString && `in ${referencesString}`;
2319
+ if (type === "issues") return referencesString && `in ${referencesString}`;
2333
2320
  return referencesString;
2334
2321
  }
2335
2322
  function formatLine(commit, options) {
2336
2323
  const prRefs = formatReferences(commit.references, options.github.repo, "issues");
2337
2324
  const hashRefs = formatReferences(commit.references, options.github.repo, "hash");
2338
- let authors = join([...new Set(commit.resolvedAuthors.map((i) => i.login ? `@${i.login}` : `**${i.name}**`))]).trim();
2325
+ let authors = join([...new Set(commit.resolvedAuthors.map((i2) => i2.login ? `@${i2.login}` : `**${i2.name}**`))]).trim();
2339
2326
  if (authors) {
2340
2327
  authors = `by ${authors}`;
2341
2328
  }
2342
- let refs = [authors, prRefs, hashRefs].filter((i) => i == null ? void 0 : i.trim()).join(" ");
2329
+ let refs = [authors, prRefs, hashRefs].filter((i2) => i2 == null ? void 0 : i2.trim()).join(" ");
2343
2330
  if (refs) {
2344
2331
  refs = `&nbsp;-&nbsp; ${refs}`;
2345
2332
  }
2346
2333
  const description = options.capitalize ? capitalize(commit.description) : commit.description;
2347
- return [description, refs].filter((i) => i == null ? void 0 : i.trim()).join(" ");
2334
+ return [description, refs].filter((i2) => i2 == null ? void 0 : i2.trim()).join(" ");
2348
2335
  }
2349
2336
  function formatTitle(name, options) {
2350
2337
  const emojisRE = /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;
@@ -2355,12 +2342,11 @@ function formatTitle(name, options) {
2355
2342
  return `### &nbsp;&nbsp;&nbsp;${formatName}`;
2356
2343
  }
2357
2344
  function formatSection(commits, sectionName, options) {
2358
- if (!commits.length)
2359
- return [];
2345
+ if (!commits.length) return [];
2360
2346
  const lines = ["", formatTitle(sectionName, options), ""];
2361
2347
  const scopes = groupBy(commits, "scope");
2362
2348
  let useScopeGroup = true;
2363
- if (!Object.entries(scopes).some(([k, v2]) => k && v2.length > 1)) {
2349
+ if (!Object.entries(scopes).some(([k2, v2]) => k2 && v2.length > 1)) {
2364
2350
  useScopeGroup = false;
2365
2351
  }
2366
2352
  Object.keys(scopes).sort().forEach((scope) => {
@@ -2424,7 +2410,7 @@ function generateMarkdown(params) {
2424
2410
  }
2425
2411
  lines.push(title);
2426
2412
  }
2427
- const [breaking, changes] = partition(commits, (c2) => c2.isBreaking);
2413
+ const [breaking, changes] = partition(commits, (c3) => c3.isBreaking);
2428
2414
  const group = groupBy(changes, "type");
2429
2415
  lines.push(...formatSection(breaking, options.titles.breakingChanges, options));
2430
2416
  for (const type of Object.keys(options.types)) {
@@ -2539,8 +2525,7 @@ ${markdown}`;
2539
2525
  async function generateChangelog(options) {
2540
2526
  const opts = await createOptions(options);
2541
2527
  const existContent = await isVersionInMarkdown(opts.to, opts.output);
2542
- if (!opts.regenerate && existContent)
2543
- return;
2528
+ if (!opts.regenerate && existContent) return;
2544
2529
  const { markdown } = await getChangelogMarkdown(opts);
2545
2530
  await writeMarkdown(markdown, opts.output, opts.regenerate);
2546
2531
  }