@stacksjs/error-handling 0.59.10 → 0.61.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ import {createRequire} from "node:module";
1
2
  var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getProtoOf = Object.getPrototypeOf;
@@ -15,16 +16,4234 @@ var __toESM = (mod, isNodeMode, target) => {
15
16
  return to;
16
17
  };
17
18
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
19
+ var __export = (target, all) => {
20
+ for (var name in all)
21
+ __defProp(target, name, {
22
+ get: all[name],
23
+ enumerable: true,
24
+ configurable: true,
25
+ set: (newValue) => all[name] = () => newValue
26
+ });
27
+ };
28
+ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
29
+ var __require = createRequire(import.meta.url);
30
+
31
+ // ../../../../node_modules/consola/dist/core.mjs
32
+ class Consola {
33
+ constructor(options = {}) {
34
+ const types = options.types || LogTypes;
35
+ this.options = defu({
36
+ ...options,
37
+ defaults: { ...options.defaults },
38
+ level: _normalizeLogLevel(options.level, types),
39
+ reporters: [...options.reporters || []]
40
+ }, {
41
+ types: LogTypes,
42
+ throttle: 1000,
43
+ throttleMin: 5,
44
+ formatOptions: {
45
+ date: true,
46
+ colors: false,
47
+ compact: true
48
+ }
49
+ });
50
+ for (const type in types) {
51
+ const defaults = {
52
+ type,
53
+ ...this.options.defaults,
54
+ ...types[type]
55
+ };
56
+ this[type] = this._wrapLogFn(defaults);
57
+ this[type].raw = this._wrapLogFn(defaults, true);
58
+ }
59
+ if (this.options.mockFn) {
60
+ this.mockTypes();
61
+ }
62
+ this._lastLog = {};
63
+ }
64
+ get level() {
65
+ return this.options.level;
66
+ }
67
+ set level(level) {
68
+ this.options.level = _normalizeLogLevel(level, this.options.types, this.options.level);
69
+ }
70
+ prompt(message, opts) {
71
+ if (!this.options.prompt) {
72
+ throw new Error("prompt is not supported!");
73
+ }
74
+ return this.options.prompt(message, opts);
75
+ }
76
+ create(options) {
77
+ const instance = new Consola({
78
+ ...this.options,
79
+ ...options
80
+ });
81
+ if (this._mockFn) {
82
+ instance.mockTypes(this._mockFn);
83
+ }
84
+ return instance;
85
+ }
86
+ withDefaults(defaults) {
87
+ return this.create({
88
+ ...this.options,
89
+ defaults: {
90
+ ...this.options.defaults,
91
+ ...defaults
92
+ }
93
+ });
94
+ }
95
+ withTag(tag) {
96
+ return this.withDefaults({
97
+ tag: this.options.defaults.tag ? this.options.defaults.tag + ":" + tag : tag
98
+ });
99
+ }
100
+ addReporter(reporter) {
101
+ this.options.reporters.push(reporter);
102
+ return this;
103
+ }
104
+ removeReporter(reporter) {
105
+ if (reporter) {
106
+ const i = this.options.reporters.indexOf(reporter);
107
+ if (i >= 0) {
108
+ return this.options.reporters.splice(i, 1);
109
+ }
110
+ } else {
111
+ this.options.reporters.splice(0);
112
+ }
113
+ return this;
114
+ }
115
+ setReporters(reporters) {
116
+ this.options.reporters = Array.isArray(reporters) ? reporters : [reporters];
117
+ return this;
118
+ }
119
+ wrapAll() {
120
+ this.wrapConsole();
121
+ this.wrapStd();
122
+ }
123
+ restoreAll() {
124
+ this.restoreConsole();
125
+ this.restoreStd();
126
+ }
127
+ wrapConsole() {
128
+ for (const type in this.options.types) {
129
+ if (!console["__" + type]) {
130
+ console["__" + type] = console[type];
131
+ }
132
+ console[type] = this[type].raw;
133
+ }
134
+ }
135
+ restoreConsole() {
136
+ for (const type in this.options.types) {
137
+ if (console["__" + type]) {
138
+ console[type] = console["__" + type];
139
+ delete console["__" + type];
140
+ }
141
+ }
142
+ }
143
+ wrapStd() {
144
+ this._wrapStream(this.options.stdout, "log");
145
+ this._wrapStream(this.options.stderr, "log");
146
+ }
147
+ _wrapStream(stream, type) {
148
+ if (!stream) {
149
+ return;
150
+ }
151
+ if (!stream.__write) {
152
+ stream.__write = stream.write;
153
+ }
154
+ stream.write = (data) => {
155
+ this[type].raw(String(data).trim());
156
+ };
157
+ }
158
+ restoreStd() {
159
+ this._restoreStream(this.options.stdout);
160
+ this._restoreStream(this.options.stderr);
161
+ }
162
+ _restoreStream(stream) {
163
+ if (!stream) {
164
+ return;
165
+ }
166
+ if (stream.__write) {
167
+ stream.write = stream.__write;
168
+ delete stream.__write;
169
+ }
170
+ }
171
+ pauseLogs() {
172
+ paused = true;
173
+ }
174
+ resumeLogs() {
175
+ paused = false;
176
+ const _queue = queue.splice(0);
177
+ for (const item of _queue) {
178
+ item[0]._logFn(item[1], item[2]);
179
+ }
180
+ }
181
+ mockTypes(mockFn) {
182
+ const _mockFn = mockFn || this.options.mockFn;
183
+ this._mockFn = _mockFn;
184
+ if (typeof _mockFn !== "function") {
185
+ return;
186
+ }
187
+ for (const type in this.options.types) {
188
+ this[type] = _mockFn(type, this.options.types[type]) || this[type];
189
+ this[type].raw = this[type];
190
+ }
191
+ }
192
+ _wrapLogFn(defaults, isRaw) {
193
+ return (...args) => {
194
+ if (paused) {
195
+ queue.push([this, defaults, args, isRaw]);
196
+ return;
197
+ }
198
+ return this._logFn(defaults, args, isRaw);
199
+ };
200
+ }
201
+ _logFn(defaults, args, isRaw) {
202
+ if ((defaults.level || 0) > this.level) {
203
+ return false;
204
+ }
205
+ const logObj = {
206
+ date: new Date,
207
+ args: [],
208
+ ...defaults,
209
+ level: _normalizeLogLevel(defaults.level, this.options.types)
210
+ };
211
+ if (!isRaw && args.length === 1 && isLogObj(args[0])) {
212
+ Object.assign(logObj, args[0]);
213
+ } else {
214
+ logObj.args = [...args];
215
+ }
216
+ if (logObj.message) {
217
+ logObj.args.unshift(logObj.message);
218
+ delete logObj.message;
219
+ }
220
+ if (logObj.additional) {
221
+ if (!Array.isArray(logObj.additional)) {
222
+ logObj.additional = logObj.additional.split("\n");
223
+ }
224
+ logObj.args.push("\n" + logObj.additional.join("\n"));
225
+ delete logObj.additional;
226
+ }
227
+ logObj.type = typeof logObj.type === "string" ? logObj.type.toLowerCase() : "log";
228
+ logObj.tag = typeof logObj.tag === "string" ? logObj.tag : "";
229
+ const resolveLog = (newLog = false) => {
230
+ const repeated = (this._lastLog.count || 0) - this.options.throttleMin;
231
+ if (this._lastLog.object && repeated > 0) {
232
+ const args2 = [...this._lastLog.object.args];
233
+ if (repeated > 1) {
234
+ args2.push(`(repeated ${repeated} times)`);
235
+ }
236
+ this._log({ ...this._lastLog.object, args: args2 });
237
+ this._lastLog.count = 1;
238
+ }
239
+ if (newLog) {
240
+ this._lastLog.object = logObj;
241
+ this._log(logObj);
242
+ }
243
+ };
244
+ clearTimeout(this._lastLog.timeout);
245
+ const diffTime = this._lastLog.time && logObj.date ? logObj.date.getTime() - this._lastLog.time.getTime() : 0;
246
+ this._lastLog.time = logObj.date;
247
+ if (diffTime < this.options.throttle) {
248
+ try {
249
+ const serializedLog = JSON.stringify([
250
+ logObj.type,
251
+ logObj.tag,
252
+ logObj.args
253
+ ]);
254
+ const isSameLog = this._lastLog.serialized === serializedLog;
255
+ this._lastLog.serialized = serializedLog;
256
+ if (isSameLog) {
257
+ this._lastLog.count = (this._lastLog.count || 0) + 1;
258
+ if (this._lastLog.count > this.options.throttleMin) {
259
+ this._lastLog.timeout = setTimeout(resolveLog, this.options.throttle);
260
+ return;
261
+ }
262
+ }
263
+ } catch {
264
+ }
265
+ }
266
+ resolveLog(true);
267
+ }
268
+ _log(logObj) {
269
+ for (const reporter of this.options.reporters) {
270
+ reporter.log(logObj, {
271
+ options: this.options
272
+ });
273
+ }
274
+ }
275
+ }
276
+ var isObject, _defu, createDefu, isPlainObject, isLogObj, _normalizeLogLevel, createConsola, LogLevels, LogTypes, defu, paused, queue;
277
+ var init_core = __esm(() => {
278
+ isObject = function(value) {
279
+ return value !== null && typeof value === "object";
280
+ };
281
+ _defu = function(baseObject, defaults, namespace = ".", merger) {
282
+ if (!isObject(defaults)) {
283
+ return _defu(baseObject, {}, namespace, merger);
284
+ }
285
+ const object = Object.assign({}, defaults);
286
+ for (const key in baseObject) {
287
+ if (key === "__proto__" || key === "constructor") {
288
+ continue;
289
+ }
290
+ const value = baseObject[key];
291
+ if (value === null || value === undefined) {
292
+ continue;
293
+ }
294
+ if (merger && merger(object, key, value, namespace)) {
295
+ continue;
296
+ }
297
+ if (Array.isArray(value) && Array.isArray(object[key])) {
298
+ object[key] = [...value, ...object[key]];
299
+ } else if (isObject(value) && isObject(object[key])) {
300
+ object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
301
+ } else {
302
+ object[key] = value;
303
+ }
304
+ }
305
+ return object;
306
+ };
307
+ createDefu = function(merger) {
308
+ return (...arguments_) => arguments_.reduce((p, c) => _defu(p, c, "", merger), {});
309
+ };
310
+ isPlainObject = function(obj) {
311
+ return Object.prototype.toString.call(obj) === "[object Object]";
312
+ };
313
+ isLogObj = function(arg) {
314
+ if (!isPlainObject(arg)) {
315
+ return false;
316
+ }
317
+ if (!arg.message && !arg.args) {
318
+ return false;
319
+ }
320
+ if (arg.stack) {
321
+ return false;
322
+ }
323
+ return true;
324
+ };
325
+ _normalizeLogLevel = function(input, types = {}, defaultLevel = 3) {
326
+ if (input === undefined) {
327
+ return defaultLevel;
328
+ }
329
+ if (typeof input === "number") {
330
+ return input;
331
+ }
332
+ if (types[input] && types[input].level !== undefined) {
333
+ return types[input].level;
334
+ }
335
+ return defaultLevel;
336
+ };
337
+ createConsola = function(options = {}) {
338
+ return new Consola(options);
339
+ };
340
+ LogLevels = {
341
+ silent: Number.NEGATIVE_INFINITY,
342
+ fatal: 0,
343
+ error: 0,
344
+ warn: 1,
345
+ log: 2,
346
+ info: 3,
347
+ success: 3,
348
+ fail: 3,
349
+ ready: 3,
350
+ start: 3,
351
+ box: 3,
352
+ debug: 4,
353
+ trace: 5,
354
+ verbose: Number.POSITIVE_INFINITY
355
+ };
356
+ LogTypes = {
357
+ silent: {
358
+ level: -1
359
+ },
360
+ fatal: {
361
+ level: LogLevels.fatal
362
+ },
363
+ error: {
364
+ level: LogLevels.error
365
+ },
366
+ warn: {
367
+ level: LogLevels.warn
368
+ },
369
+ log: {
370
+ level: LogLevels.log
371
+ },
372
+ info: {
373
+ level: LogLevels.info
374
+ },
375
+ success: {
376
+ level: LogLevels.success
377
+ },
378
+ fail: {
379
+ level: LogLevels.fail
380
+ },
381
+ ready: {
382
+ level: LogLevels.info
383
+ },
384
+ start: {
385
+ level: LogLevels.info
386
+ },
387
+ box: {
388
+ level: LogLevels.info
389
+ },
390
+ debug: {
391
+ level: LogLevels.debug
392
+ },
393
+ trace: {
394
+ level: LogLevels.trace
395
+ },
396
+ verbose: {
397
+ level: LogLevels.verbose
398
+ }
399
+ };
400
+ defu = createDefu();
401
+ paused = false;
402
+ queue = [];
403
+ Consola.prototype.add = Consola.prototype.addReporter;
404
+ Consola.prototype.remove = Consola.prototype.removeReporter;
405
+ Consola.prototype.clear = Consola.prototype.removeReporter;
406
+ Consola.prototype.withScope = Consola.prototype.withTag;
407
+ Consola.prototype.mock = Consola.prototype.mockTypes;
408
+ Consola.prototype.pause = Consola.prototype.pauseLogs;
409
+ Consola.prototype.resume = Consola.prototype.resumeLogs;
410
+ });
411
+
412
+ // ../../../../node_modules/consola/dist/shared/consola.06ad8a64.mjs
413
+ import {formatWithOptions} from "node:util";
414
+ import {sep} from "node:path";
415
+
416
+ class BasicReporter {
417
+ formatStack(stack, opts) {
418
+ return " " + parseStack(stack).join("\n ");
419
+ }
420
+ formatArgs(args, opts) {
421
+ const _args = args.map((arg) => {
422
+ if (arg && typeof arg.stack === "string") {
423
+ return arg.message + "\n" + this.formatStack(arg.stack, opts);
424
+ }
425
+ return arg;
426
+ });
427
+ return formatWithOptions(opts, ..._args);
428
+ }
429
+ formatDate(date, opts) {
430
+ return opts.date ? date.toLocaleTimeString() : "";
431
+ }
432
+ filterAndJoin(arr) {
433
+ return arr.filter(Boolean).join(" ");
434
+ }
435
+ formatLogObj(logObj, opts) {
436
+ const message = this.formatArgs(logObj.args, opts);
437
+ if (logObj.type === "box") {
438
+ return "\n" + [
439
+ bracket(logObj.tag),
440
+ logObj.title && logObj.title,
441
+ ...message.split("\n")
442
+ ].filter(Boolean).map((l) => " > " + l).join("\n") + "\n";
443
+ }
444
+ return this.filterAndJoin([
445
+ bracket(logObj.type),
446
+ bracket(logObj.tag),
447
+ message
448
+ ]);
449
+ }
450
+ log(logObj, ctx) {
451
+ const line = this.formatLogObj(logObj, {
452
+ columns: ctx.options.stdout.columns || 0,
453
+ ...ctx.options.formatOptions
454
+ });
455
+ return writeStream(line + "\n", logObj.level < 2 ? ctx.options.stderr || process.stderr : ctx.options.stdout || process.stdout);
456
+ }
457
+ }
458
+ var parseStack, writeStream, bracket;
459
+ var init_consola_06ad8a64 = __esm(() => {
460
+ parseStack = function(stack) {
461
+ const cwd = process.cwd() + sep;
462
+ const lines = stack.split("\n").splice(1).map((l) => l.trim().replace("file://", "").replace(cwd, ""));
463
+ return lines;
464
+ };
465
+ writeStream = function(data, stream) {
466
+ const write = stream.__write || stream.write;
467
+ return write.call(stream, data);
468
+ };
469
+ bracket = (x) => x ? `[${x}]` : "";
470
+ });
471
+
472
+ // ../../../../node_modules/consola/dist/utils.mjs
473
+ import * as tty from "node:tty";
474
+ var replaceClose, clearBleed, filterEmpty, init, createColors, getColor, stripAnsi, box, env, argv, platform, isDisabled, isForced, isWindows, isDumbTerminal, isCompatibleTerminal, isCI, isColorSupported, colorDefs, colors, ansiRegex, boxStylePresets, defaultStyle;
475
+ var init_utils = __esm(() => {
476
+ replaceClose = function(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)) {
477
+ return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
478
+ };
479
+ clearBleed = function(index, string, open, close, replace) {
480
+ return index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
481
+ };
482
+ filterEmpty = function(open, close, replace = open, at = open.length + 1) {
483
+ return (string) => string || !(string === "" || string === undefined) ? clearBleed(("" + string).indexOf(close, at), string, open, close, replace) : "";
484
+ };
485
+ init = function(open, close, replace) {
486
+ return filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace);
487
+ };
488
+ createColors = function(useColor = isColorSupported) {
489
+ return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
490
+ };
491
+ getColor = function(color, fallback = "reset") {
492
+ return colors[color] || colors[fallback];
493
+ };
494
+ stripAnsi = function(text) {
495
+ return text.replace(new RegExp(ansiRegex, "g"), "");
496
+ };
497
+ box = function(text, _opts = {}) {
498
+ const opts = {
499
+ ..._opts,
500
+ style: {
501
+ ...defaultStyle,
502
+ ..._opts.style
503
+ }
504
+ };
505
+ const textLines = text.split("\n");
506
+ const boxLines = [];
507
+ const _color = getColor(opts.style.borderColor);
508
+ const borderStyle = {
509
+ ...typeof opts.style.borderStyle === "string" ? boxStylePresets[opts.style.borderStyle] || boxStylePresets.solid : opts.style.borderStyle
510
+ };
511
+ if (_color) {
512
+ for (const key in borderStyle) {
513
+ borderStyle[key] = _color(borderStyle[key]);
514
+ }
515
+ }
516
+ const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;
517
+ const height = textLines.length + paddingOffset;
518
+ const width = Math.max(...textLines.map((line) => line.length)) + paddingOffset;
519
+ const widthOffset = width + paddingOffset;
520
+ const leftSpace = opts.style.marginLeft > 0 ? " ".repeat(opts.style.marginLeft) : "";
521
+ if (opts.style.marginTop > 0) {
522
+ boxLines.push("".repeat(opts.style.marginTop));
523
+ }
524
+ if (opts.title) {
525
+ const left = borderStyle.h.repeat(Math.floor((width - stripAnsi(opts.title).length) / 2));
526
+ const right = borderStyle.h.repeat(width - stripAnsi(opts.title).length - stripAnsi(left).length + paddingOffset);
527
+ boxLines.push(`${leftSpace}${borderStyle.tl}${left}${opts.title}${right}${borderStyle.tr}`);
528
+ } else {
529
+ boxLines.push(`${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`);
530
+ }
531
+ const valignOffset = opts.style.valign === "center" ? Math.floor((height - textLines.length) / 2) : opts.style.valign === "top" ? height - textLines.length - paddingOffset : height - textLines.length;
532
+ for (let i = 0;i < height; i++) {
533
+ if (i < valignOffset || i >= valignOffset + textLines.length) {
534
+ boxLines.push(`${leftSpace}${borderStyle.v}${" ".repeat(widthOffset)}${borderStyle.v}`);
535
+ } else {
536
+ const line = textLines[i - valignOffset];
537
+ const left = " ".repeat(paddingOffset);
538
+ const right = " ".repeat(width - stripAnsi(line).length);
539
+ boxLines.push(`${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`);
540
+ }
541
+ }
542
+ boxLines.push(`${leftSpace}${borderStyle.bl}${borderStyle.h.repeat(widthOffset)}${borderStyle.br}`);
543
+ if (opts.style.marginBottom > 0) {
544
+ boxLines.push("".repeat(opts.style.marginBottom));
545
+ }
546
+ return boxLines.join("\n");
547
+ };
548
+ ({
549
+ env = {},
550
+ argv = [],
551
+ platform = ""
552
+ } = typeof process === "undefined" ? {} : process);
553
+ isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
554
+ isForced = "FORCE_COLOR" in env || argv.includes("--color");
555
+ isWindows = platform === "win32";
556
+ isDumbTerminal = env.TERM === "dumb";
557
+ isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;
558
+ isCI = "CI" in env && (("GITHUB_ACTIONS" in env) || ("GITLAB_CI" in env) || ("CIRCLECI" in env));
559
+ isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);
560
+ colorDefs = {
561
+ reset: init(0, 0),
562
+ bold: init(1, 22, "\x1B[22m\x1B[1m"),
563
+ dim: init(2, 22, "\x1B[22m\x1B[2m"),
564
+ italic: init(3, 23),
565
+ underline: init(4, 24),
566
+ inverse: init(7, 27),
567
+ hidden: init(8, 28),
568
+ strikethrough: init(9, 29),
569
+ black: init(30, 39),
570
+ red: init(31, 39),
571
+ green: init(32, 39),
572
+ yellow: init(33, 39),
573
+ blue: init(34, 39),
574
+ magenta: init(35, 39),
575
+ cyan: init(36, 39),
576
+ white: init(37, 39),
577
+ gray: init(90, 39),
578
+ bgBlack: init(40, 49),
579
+ bgRed: init(41, 49),
580
+ bgGreen: init(42, 49),
581
+ bgYellow: init(43, 49),
582
+ bgBlue: init(44, 49),
583
+ bgMagenta: init(45, 49),
584
+ bgCyan: init(46, 49),
585
+ bgWhite: init(47, 49),
586
+ blackBright: init(90, 39),
587
+ redBright: init(91, 39),
588
+ greenBright: init(92, 39),
589
+ yellowBright: init(93, 39),
590
+ blueBright: init(94, 39),
591
+ magentaBright: init(95, 39),
592
+ cyanBright: init(96, 39),
593
+ whiteBright: init(97, 39),
594
+ bgBlackBright: init(100, 49),
595
+ bgRedBright: init(101, 49),
596
+ bgGreenBright: init(102, 49),
597
+ bgYellowBright: init(103, 49),
598
+ bgBlueBright: init(104, 49),
599
+ bgMagentaBright: init(105, 49),
600
+ bgCyanBright: init(106, 49),
601
+ bgWhiteBright: init(107, 49)
602
+ };
603
+ colors = createColors();
604
+ ansiRegex = [
605
+ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
606
+ "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"
607
+ ].join("|");
608
+ boxStylePresets = {
609
+ solid: {
610
+ tl: "\u250C",
611
+ tr: "\u2510",
612
+ bl: "\u2514",
613
+ br: "\u2518",
614
+ h: "\u2500",
615
+ v: "\u2502"
616
+ },
617
+ double: {
618
+ tl: "\u2554",
619
+ tr: "\u2557",
620
+ bl: "\u255A",
621
+ br: "\u255D",
622
+ h: "\u2550",
623
+ v: "\u2551"
624
+ },
625
+ doubleSingle: {
626
+ tl: "\u2553",
627
+ tr: "\u2556",
628
+ bl: "\u2559",
629
+ br: "\u255C",
630
+ h: "\u2500",
631
+ v: "\u2551"
632
+ },
633
+ doubleSingleRounded: {
634
+ tl: "\u256D",
635
+ tr: "\u256E",
636
+ bl: "\u2570",
637
+ br: "\u256F",
638
+ h: "\u2500",
639
+ v: "\u2551"
640
+ },
641
+ singleThick: {
642
+ tl: "\u250F",
643
+ tr: "\u2513",
644
+ bl: "\u2517",
645
+ br: "\u251B",
646
+ h: "\u2501",
647
+ v: "\u2503"
648
+ },
649
+ singleDouble: {
650
+ tl: "\u2552",
651
+ tr: "\u2555",
652
+ bl: "\u2558",
653
+ br: "\u255B",
654
+ h: "\u2550",
655
+ v: "\u2502"
656
+ },
657
+ singleDoubleRounded: {
658
+ tl: "\u256D",
659
+ tr: "\u256E",
660
+ bl: "\u2570",
661
+ br: "\u256F",
662
+ h: "\u2550",
663
+ v: "\u2502"
664
+ },
665
+ rounded: {
666
+ tl: "\u256D",
667
+ tr: "\u256E",
668
+ bl: "\u2570",
669
+ br: "\u256F",
670
+ h: "\u2500",
671
+ v: "\u2502"
672
+ }
673
+ };
674
+ defaultStyle = {
675
+ borderColor: "white",
676
+ borderStyle: "rounded",
677
+ valign: "center",
678
+ padding: 2,
679
+ marginLeft: 1,
680
+ marginTop: 1,
681
+ marginBottom: 1
682
+ };
683
+ });
684
+
685
+ // ../../../../node_modules/consola/dist/chunks/prompt.mjs
686
+ var exports_prompt = {};
687
+ __export(exports_prompt, {
688
+ prompt: () => {
689
+ {
690
+ return prompt;
691
+ }
692
+ }
693
+ });
694
+ import {stdin, stdout} from "node:process";
695
+ import f from "node:readline";
696
+ import {WriteStream} from "node:tty";
697
+ import require$$0 from "tty";
698
+ async function prompt(message, opts = {}) {
699
+ if (!opts.type || opts.type === "text") {
700
+ return await text({
701
+ message,
702
+ defaultValue: opts.default,
703
+ placeholder: opts.placeholder,
704
+ initialValue: opts.initial
705
+ });
706
+ }
707
+ if (opts.type === "confirm") {
708
+ return await confirm({
709
+ message,
710
+ initialValue: opts.initial
711
+ });
712
+ }
713
+ if (opts.type === "select") {
714
+ return await select({
715
+ message,
716
+ options: opts.options.map((o) => typeof o === "string" ? { value: o, label: o } : o)
717
+ });
718
+ }
719
+ if (opts.type === "multiselect") {
720
+ return await multiselect({
721
+ message,
722
+ options: opts.options.map((o) => typeof o === "string" ? { value: o, label: o } : o),
723
+ required: opts.required
724
+ });
725
+ }
726
+ throw new Error(`Unknown prompt type: ${opts.type}`);
727
+ }
728
+
729
+ class h {
730
+ constructor({ render: u, input: F = stdin, output: e = stdout, ...s }, C = true) {
731
+ this._track = false, this._cursor = 0, this.state = "initial", this.error = "", this.subscribers = new Map, this._prevFrame = "", this.opts = s, 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;
732
+ }
733
+ prompt() {
734
+ const u = new WriteStream(0);
735
+ return u._write = (F, e, s) => {
736
+ this._track && (this.value = this.rl.line.replace(/\t/g, ""), this._cursor = this.rl.cursor, this.emit("value", this.value)), s();
737
+ }, this.input.pipe(u), this.rl = f.createInterface({ input: this.input, output: u, tabSize: 2, prompt: "", escapeCodeTimeout: 50 }), f.emitKeypressEvents(this.input, this.rl), this.rl.prompt(), this.opts.initialValue !== undefined && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), g(this.input, true), this.output.on("resize", this.render), this.render(), new Promise((F, e) => {
738
+ this.once("submit", () => {
739
+ this.output.write(src.cursor.show), this.output.off("resize", this.render), g(this.input, false), F(this.value);
740
+ }), this.once("cancel", () => {
741
+ this.output.write(src.cursor.show), this.output.off("resize", this.render), g(this.input, false), F(R);
742
+ });
743
+ });
744
+ }
745
+ on(u, F) {
746
+ const e = this.subscribers.get(u) ?? [];
747
+ e.push({ cb: F }), this.subscribers.set(u, e);
748
+ }
749
+ once(u, F) {
750
+ const e = this.subscribers.get(u) ?? [];
751
+ e.push({ cb: F, once: true }), this.subscribers.set(u, e);
752
+ }
753
+ emit(u, ...F) {
754
+ const e = this.subscribers.get(u) ?? [], s = [];
755
+ for (const C of e)
756
+ C.cb(...F), C.once && s.push(() => e.splice(e.indexOf(C), 1));
757
+ for (const C of s)
758
+ C();
759
+ }
760
+ unsubscribe() {
761
+ this.subscribers.clear();
762
+ }
763
+ onKeypress(u, F) {
764
+ if (this.state === "error" && (this.state = "active"), F?.name && !this._track && V.has(F.name) && this.emit("cursor", V.get(F.name)), 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?.name === "return") {
765
+ if (this.opts.validate) {
766
+ const e = this.opts.validate(this.value);
767
+ e && (this.error = e, this.state = "error", this.rl.write(this.value));
768
+ }
769
+ this.state !== "error" && (this.state = "submit");
770
+ }
771
+ u === "" && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
772
+ }
773
+ close() {
774
+ this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
775
+ `), g(this.input, false), this.rl.close(), this.emit(`${this.state}`, this.value), this.unsubscribe();
776
+ }
777
+ restoreCursor() {
778
+ const u = P(this._prevFrame, process.stdout.columns, { hard: true }).split(`
779
+ `).length - 1;
780
+ this.output.write(src.cursor.move(-999, u * -1));
781
+ }
782
+ render() {
783
+ const u = P(this._render(this) ?? "", process.stdout.columns, { hard: true });
784
+ if (u !== this._prevFrame) {
785
+ if (this.state === "initial")
786
+ this.output.write(src.cursor.hide);
787
+ else {
788
+ const F = FD(this._prevFrame, u);
789
+ if (this.restoreCursor(), F && F?.length === 1) {
790
+ const e = F[0];
791
+ this.output.write(src.cursor.move(0, e)), this.output.write(src.erase.lines(1));
792
+ const s = u.split(`
793
+ `);
794
+ this.output.write(s[e]), this._prevFrame = u, this.output.write(src.cursor.move(0, s.length - e - 1));
795
+ return;
796
+ } else if (F && F?.length > 1) {
797
+ const e = F[0];
798
+ this.output.write(src.cursor.move(0, e)), this.output.write(src.erase.down());
799
+ const C = u.split(`
800
+ `).slice(e);
801
+ this.output.write(C.join(`
802
+ `)), this._prevFrame = u;
803
+ return;
804
+ }
805
+ this.output.write(src.erase.down());
806
+ }
807
+ this.output.write(u), this.state === "initial" && (this.state = "active"), this._prevFrame = u;
808
+ }
809
+ }
810
+ }
811
+
812
+ class sD extends h {
813
+ get cursor() {
814
+ return this.value ? 0 : 1;
815
+ }
816
+ get _value() {
817
+ return this.cursor === 0;
818
+ }
819
+ constructor(u) {
820
+ super(u, false), this.value = !!u.initialValue, this.on("value", () => {
821
+ this.value = this._value;
822
+ }), this.on("confirm", (F) => {
823
+ this.output.write(src.cursor.move(0, -1)), this.value = F, this.state = "submit", this.close();
824
+ }), this.on("cursor", () => {
825
+ this.value = !this.value;
826
+ });
827
+ }
828
+ }
829
+
830
+ class iD extends h {
831
+ constructor(u) {
832
+ 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) => {
833
+ F === "a" && this.toggleAll();
834
+ }), this.on("cursor", (F) => {
835
+ switch (F) {
836
+ case "left":
837
+ case "up":
838
+ this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
839
+ break;
840
+ case "down":
841
+ case "right":
842
+ this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
843
+ break;
844
+ case "space":
845
+ this.toggleValue();
846
+ break;
847
+ }
848
+ });
849
+ }
850
+ get _value() {
851
+ return this.options[this.cursor].value;
852
+ }
853
+ toggleAll() {
854
+ const u = this.value.length === this.options.length;
855
+ this.value = u ? [] : this.options.map((F) => F.value);
856
+ }
857
+ toggleValue() {
858
+ const u = this.value.includes(this._value);
859
+ this.value = u ? this.value.filter((F) => F !== this._value) : [...this.value, this._value];
860
+ }
861
+ }
862
+
863
+ class ED extends h {
864
+ constructor(u) {
865
+ 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) => {
866
+ switch (F) {
867
+ case "left":
868
+ case "up":
869
+ this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
870
+ break;
871
+ case "down":
872
+ case "right":
873
+ this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
874
+ break;
875
+ }
876
+ this.changeValue();
877
+ });
878
+ }
879
+ get _value() {
880
+ return this.options[this.cursor];
881
+ }
882
+ changeValue() {
883
+ this.value = this._value.value;
884
+ }
885
+ }
886
+
887
+ class oD extends h {
888
+ constructor(u) {
889
+ super(u), this.valueWithCursor = "", this.on("finalize", () => {
890
+ this.value || (this.value = u.defaultValue), this.valueWithCursor = this.value;
891
+ }), this.on("value", () => {
892
+ if (this.cursor >= this.value.length)
893
+ this.valueWithCursor = `${this.value}${l.inverse(l.hidden("_"))}`;
894
+ else {
895
+ const F = this.value.slice(0, this.cursor), e = this.value.slice(this.cursor);
896
+ this.valueWithCursor = `${F}${l.inverse(e[0])}${e.slice(1)}`;
897
+ }
898
+ });
899
+ }
900
+ get cursor() {
901
+ return this._cursor;
902
+ }
903
+ }
904
+ var z, $, c, U, P, FD, g, 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, 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;
905
+ var init_prompt = __esm(() => {
906
+ init_consola_36c0034f();
907
+ init_utils();
908
+ init_core();
909
+ init_consola_06ad8a64();
910
+ z = function({ onlyFirst: t = false } = {}) {
911
+ 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("|");
912
+ return new RegExp(u, t ? undefined : "g");
913
+ };
914
+ $ = function(t) {
915
+ if (typeof t != "string")
916
+ throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);
917
+ return t.replace(z(), "");
918
+ };
919
+ c = function(t, u = {}) {
920
+ if (typeof t != "string" || t.length === 0 || (u = { ambiguousIsNarrow: true, ...u }, t = $(t), t.length === 0))
921
+ return 0;
922
+ t = t.replace(Y(), " ");
923
+ const F = u.ambiguousIsNarrow ? 1 : 2;
924
+ let e = 0;
925
+ for (const s of t) {
926
+ const C = s.codePointAt(0);
927
+ if (C <= 31 || C >= 127 && C <= 159 || C >= 768 && C <= 879)
928
+ continue;
929
+ switch (K.eastAsianWidth(s)) {
930
+ case "F":
931
+ case "W":
932
+ e += 2;
933
+ break;
934
+ case "A":
935
+ e += F;
936
+ break;
937
+ default:
938
+ e += 1;
939
+ }
940
+ }
941
+ return e;
942
+ };
943
+ U = function() {
944
+ const t = new Map;
945
+ for (const [u, F] of Object.entries(r)) {
946
+ for (const [e, s] of Object.entries(F))
947
+ r[e] = { open: `\x1B[${s[0]}m`, close: `\x1B[${s[1]}m` }, F[e] = r[e], t.set(s[0], s[1]);
948
+ Object.defineProperty(r, u, { value: F, enumerable: false });
949
+ }
950
+ 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) => {
951
+ const F = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));
952
+ if (!F)
953
+ return [0, 0, 0];
954
+ let [e] = F;
955
+ e.length === 3 && (e = [...e].map((C) => C + C).join(""));
956
+ const s = Number.parseInt(e, 16);
957
+ return [s >> 16 & 255, s >> 8 & 255, s & 255];
958
+ }, enumerable: false }, hexToAnsi256: { value: (u) => r.rgbToAnsi256(...r.hexToRgb(u)), enumerable: false }, ansi256ToAnsi: { value: (u) => {
959
+ if (u < 8)
960
+ return 30 + u;
961
+ if (u < 16)
962
+ return 90 + (u - 8);
963
+ let F, e, s;
964
+ if (u >= 232)
965
+ F = ((u - 232) * 10 + 8) / 255, e = F, s = F;
966
+ else {
967
+ u -= 16;
968
+ const i = u % 36;
969
+ F = Math.floor(u / 36) / 5, e = Math.floor(i / 6) / 5, s = i % 6 / 5;
970
+ }
971
+ const C = Math.max(F, e, s) * 2;
972
+ if (C === 0)
973
+ return 30;
974
+ let D = 30 + (Math.round(s) << 2 | Math.round(e) << 1 | Math.round(F));
975
+ return C === 2 && (D += 60), D;
976
+ }, 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;
977
+ };
978
+ P = function(t, u, F) {
979
+ return String(t).normalize().replace(/\r\n/g, `
980
+ `).split(`
981
+ `).map((e) => uD(e, u, F)).join(`
982
+ `);
983
+ };
984
+ FD = function(t, u) {
985
+ if (t === u)
986
+ return;
987
+ const F = t.split(`
988
+ `), e = u.split(`
989
+ `), s = [];
990
+ for (let C = 0;C < Math.max(F.length, e.length); C++)
991
+ F[C] !== e[C] && s.push(C);
992
+ return s;
993
+ };
994
+ g = function(t, u) {
995
+ t.isTTY && t.setRawMode(u);
996
+ };
997
+ ESC = "\x1B";
998
+ CSI = `${ESC}[`;
999
+ beep = "\x07";
1000
+ cursor = {
1001
+ to(x, y) {
1002
+ if (!y)
1003
+ return `${CSI}${x + 1}G`;
1004
+ return `${CSI}${y + 1};${x + 1}H`;
1005
+ },
1006
+ move(x, y) {
1007
+ let ret = "";
1008
+ if (x < 0)
1009
+ ret += `${CSI}${-x}D`;
1010
+ else if (x > 0)
1011
+ ret += `${CSI}${x}C`;
1012
+ if (y < 0)
1013
+ ret += `${CSI}${-y}A`;
1014
+ else if (y > 0)
1015
+ ret += `${CSI}${y}B`;
1016
+ return ret;
1017
+ },
1018
+ up: (count = 1) => `${CSI}${count}A`,
1019
+ down: (count = 1) => `${CSI}${count}B`,
1020
+ forward: (count = 1) => `${CSI}${count}C`,
1021
+ backward: (count = 1) => `${CSI}${count}D`,
1022
+ nextLine: (count = 1) => `${CSI}E`.repeat(count),
1023
+ prevLine: (count = 1) => `${CSI}F`.repeat(count),
1024
+ left: `${CSI}G`,
1025
+ hide: `${CSI}?25l`,
1026
+ show: `${CSI}?25h`,
1027
+ save: `${ESC}7`,
1028
+ restore: `${ESC}8`
1029
+ };
1030
+ scroll = {
1031
+ up: (count = 1) => `${CSI}S`.repeat(count),
1032
+ down: (count = 1) => `${CSI}T`.repeat(count)
1033
+ };
1034
+ erase = {
1035
+ screen: `${CSI}2J`,
1036
+ up: (count = 1) => `${CSI}1J`.repeat(count),
1037
+ down: (count = 1) => `${CSI}J`.repeat(count),
1038
+ line: `${CSI}2K`,
1039
+ lineEnd: `${CSI}K`,
1040
+ lineStart: `${CSI}1K`,
1041
+ lines(count) {
1042
+ let clear = "";
1043
+ for (let i = 0;i < count; i++)
1044
+ clear += this.line + (i < count - 1 ? cursor.up() : "");
1045
+ if (count)
1046
+ clear += cursor.left;
1047
+ return clear;
1048
+ }
1049
+ };
1050
+ src = { cursor, scroll, erase, beep };
1051
+ picocolors = { exports: {} };
1052
+ tty2 = require$$0;
1053
+ 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));
1054
+ formatter = (open, close, replace = open) => (input) => {
1055
+ let string = "" + input;
1056
+ let index = string.indexOf(close, open.length);
1057
+ return ~index ? open + replaceClose2(string, close, replace, index) + close : open + string + close;
1058
+ };
1059
+ replaceClose2 = (string, close, replace, index) => {
1060
+ let start = string.substring(0, index) + replace;
1061
+ let end = string.substring(index + close.length);
1062
+ let nextIndex = end.indexOf(close);
1063
+ return ~nextIndex ? start + replaceClose2(end, close, replace, nextIndex) : start + end;
1064
+ };
1065
+ createColors2 = (enabled = isColorSupported2) => ({
1066
+ isColorSupported: enabled,
1067
+ reset: enabled ? (s) => `\x1B[0m${s}\x1B[0m` : String,
1068
+ bold: enabled ? formatter("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m") : String,
1069
+ dim: enabled ? formatter("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m") : String,
1070
+ italic: enabled ? formatter("\x1B[3m", "\x1B[23m") : String,
1071
+ underline: enabled ? formatter("\x1B[4m", "\x1B[24m") : String,
1072
+ inverse: enabled ? formatter("\x1B[7m", "\x1B[27m") : String,
1073
+ hidden: enabled ? formatter("\x1B[8m", "\x1B[28m") : String,
1074
+ strikethrough: enabled ? formatter("\x1B[9m", "\x1B[29m") : String,
1075
+ black: enabled ? formatter("\x1B[30m", "\x1B[39m") : String,
1076
+ red: enabled ? formatter("\x1B[31m", "\x1B[39m") : String,
1077
+ green: enabled ? formatter("\x1B[32m", "\x1B[39m") : String,
1078
+ yellow: enabled ? formatter("\x1B[33m", "\x1B[39m") : String,
1079
+ blue: enabled ? formatter("\x1B[34m", "\x1B[39m") : String,
1080
+ magenta: enabled ? formatter("\x1B[35m", "\x1B[39m") : String,
1081
+ cyan: enabled ? formatter("\x1B[36m", "\x1B[39m") : String,
1082
+ white: enabled ? formatter("\x1B[37m", "\x1B[39m") : String,
1083
+ gray: enabled ? formatter("\x1B[90m", "\x1B[39m") : String,
1084
+ bgBlack: enabled ? formatter("\x1B[40m", "\x1B[49m") : String,
1085
+ bgRed: enabled ? formatter("\x1B[41m", "\x1B[49m") : String,
1086
+ bgGreen: enabled ? formatter("\x1B[42m", "\x1B[49m") : String,
1087
+ bgYellow: enabled ? formatter("\x1B[43m", "\x1B[49m") : String,
1088
+ bgBlue: enabled ? formatter("\x1B[44m", "\x1B[49m") : String,
1089
+ bgMagenta: enabled ? formatter("\x1B[45m", "\x1B[49m") : String,
1090
+ bgCyan: enabled ? formatter("\x1B[46m", "\x1B[49m") : String,
1091
+ bgWhite: enabled ? formatter("\x1B[47m", "\x1B[49m") : String
1092
+ });
1093
+ picocolors.exports = createColors2();
1094
+ picocolors.exports.createColors = createColors2;
1095
+ picocolorsExports = picocolors.exports;
1096
+ l = getDefaultExportFromCjs(picocolorsExports);
1097
+ m = {};
1098
+ G = { get exports() {
1099
+ return m;
1100
+ }, set exports(t) {
1101
+ m = t;
1102
+ } };
1103
+ (function(t) {
1104
+ var u = {};
1105
+ t.exports = u, u.eastAsianWidth = function(e) {
1106
+ var s = e.charCodeAt(0), C = e.length == 2 ? e.charCodeAt(1) : 0, D = s;
1107
+ return 55296 <= s && s <= 56319 && 56320 <= C && C <= 57343 && (s &= 1023, C &= 1023, D = s << 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";
1108
+ }, u.characterLength = function(e) {
1109
+ var s = this.eastAsianWidth(e);
1110
+ return s == "F" || s == "W" || s == "A" ? 2 : 1;
1111
+ };
1112
+ function F(e) {
1113
+ return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
1114
+ }
1115
+ u.length = function(e) {
1116
+ for (var s = F(e), C = 0, D = 0;D < s.length; D++)
1117
+ C = C + this.characterLength(s[D]);
1118
+ return C;
1119
+ }, u.slice = function(e, s, C) {
1120
+ textLen = u.length(e), s = s || 0, C = C || 1, s < 0 && (s = textLen + s), C < 0 && (C = textLen + C);
1121
+ for (var D = "", i = 0, o = F(e), E = 0;E < o.length; E++) {
1122
+ var a = o[E], n = u.length(a);
1123
+ if (i >= s - (n == 2 ? 1 : 0))
1124
+ if (i + n <= C)
1125
+ D += a;
1126
+ else
1127
+ break;
1128
+ i += n;
1129
+ }
1130
+ return D;
1131
+ };
1132
+ })(G);
1133
+ K = m;
1134
+ Y = function() {
1135
+ 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;
1136
+ };
1137
+ v = 10;
1138
+ L = (t = 0) => (u) => `\x1B[${u + t}m`;
1139
+ M = (t = 0) => (u) => `\x1B[${38 + t};5;${u}m`;
1140
+ T = (t = 0) => (u, F, e) => `\x1B[${38 + t};2;${u};${F};${e}m`;
1141
+ 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] } };
1142
+ Object.keys(r.modifier);
1143
+ Z = Object.keys(r.color);
1144
+ H = Object.keys(r.bgColor);
1145
+ [...Z];
1146
+ q = U();
1147
+ p = new Set(["\x1B", "\x9B"]);
1148
+ J = 39;
1149
+ b = "\x07";
1150
+ W = "[";
1151
+ Q = "]";
1152
+ I = "m";
1153
+ w = `${Q}8;;`;
1154
+ N = (t) => `${p.values().next().value}${W}${t}${I}`;
1155
+ j = (t) => `${p.values().next().value}${w}${t}${b}`;
1156
+ X = (t) => t.split(" ").map((u) => c(u));
1157
+ _ = (t, u, F) => {
1158
+ const e = [...u];
1159
+ let s = false, C = false, D = c($(t[t.length - 1]));
1160
+ for (const [i, o] of e.entries()) {
1161
+ const E = c(o);
1162
+ if (D + E <= F ? t[t.length - 1] += o : (t.push(o), D = 0), p.has(o) && (s = true, C = e.slice(i + 1).join("").startsWith(w)), s) {
1163
+ C ? o === b && (s = false, C = false) : o === I && (s = false);
1164
+ continue;
1165
+ }
1166
+ D += E, D === F && i < e.length - 1 && (t.push(""), D = 0);
1167
+ }
1168
+ !D && t[t.length - 1].length > 0 && t.length > 1 && (t[t.length - 2] += t.pop());
1169
+ };
1170
+ DD = (t) => {
1171
+ const u = t.split(" ");
1172
+ let F = u.length;
1173
+ for (;F > 0 && !(c(u[F - 1]) > 0); )
1174
+ F--;
1175
+ return F === u.length ? t : u.slice(0, F).join(" ") + u.slice(F).join("");
1176
+ };
1177
+ uD = (t, u, F = {}) => {
1178
+ if (F.trim !== false && t.trim() === "")
1179
+ return "";
1180
+ let e = "", s, C;
1181
+ const D = X(t);
1182
+ let i = [""];
1183
+ for (const [E, a] of t.split(" ").entries()) {
1184
+ F.trim !== false && (i[i.length - 1] = i[i.length - 1].trimStart());
1185
+ let n = c(i[i.length - 1]);
1186
+ 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) {
1187
+ const B = u - n, A = 1 + Math.floor((D[E] - B - 1) / u);
1188
+ Math.floor((D[E] - 1) / u) < A && i.push(""), _(i, a, u);
1189
+ continue;
1190
+ }
1191
+ if (n + D[E] > u && n > 0 && D[E] > 0) {
1192
+ if (F.wordWrap === false && n < u) {
1193
+ _(i, a, u);
1194
+ continue;
1195
+ }
1196
+ i.push("");
1197
+ }
1198
+ if (n + D[E] > u && F.wordWrap === false) {
1199
+ _(i, a, u);
1200
+ continue;
1201
+ }
1202
+ i[i.length - 1] += a;
1203
+ }
1204
+ F.trim !== false && (i = i.map((E) => DD(E)));
1205
+ const o = [...i.join(`
1206
+ `)];
1207
+ for (const [E, a] of o.entries()) {
1208
+ if (e += a, p.has(a)) {
1209
+ const { groups: B } = new RegExp(`(?:\\${W}(?<code>\\d+)m|\\${w}(?<uri>.*)${b})`).exec(o.slice(E).join("")) || { groups: {} };
1210
+ if (B.code !== undefined) {
1211
+ const A = Number.parseFloat(B.code);
1212
+ s = A === J ? undefined : A;
1213
+ } else
1214
+ B.uri !== undefined && (C = B.uri.length === 0 ? undefined : B.uri);
1215
+ }
1216
+ const n = q.codes.get(Number(s));
1217
+ o[E + 1] === `
1218
+ ` ? (C && (e += j("")), s && n && (e += N(n))) : a === `
1219
+ ` && (s && n && (e += N(s)), C && (e += j(C)));
1220
+ }
1221
+ return e;
1222
+ };
1223
+ R = Symbol("clack:cancel");
1224
+ V = new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"]]);
1225
+ tD = new Set(["up", "down", "left", "right", "space", "enter"]);
1226
+ unicode = isUnicodeSupported();
1227
+ s = (c2, fallback) => unicode ? c2 : fallback;
1228
+ S_STEP_ACTIVE = s("\u276F", ">");
1229
+ S_STEP_CANCEL = s("\u25A0", "x");
1230
+ S_STEP_ERROR = s("\u25B2", "x");
1231
+ S_STEP_SUBMIT = s("\u2714", "\u221A");
1232
+ S_BAR = "";
1233
+ S_BAR_END = "";
1234
+ S_RADIO_ACTIVE = s("\u25CF", ">");
1235
+ S_RADIO_INACTIVE = s("\u25CB", " ");
1236
+ S_CHECKBOX_ACTIVE = s("\u25FB", "[\u2022]");
1237
+ S_CHECKBOX_SELECTED = s("\u25FC", "[+]");
1238
+ S_CHECKBOX_INACTIVE = s("\u25FB", "[ ]");
1239
+ symbol = (state) => {
1240
+ switch (state) {
1241
+ case "initial":
1242
+ case "active": {
1243
+ return colors.cyan(S_STEP_ACTIVE);
1244
+ }
1245
+ case "cancel": {
1246
+ return colors.red(S_STEP_CANCEL);
1247
+ }
1248
+ case "error": {
1249
+ return colors.yellow(S_STEP_ERROR);
1250
+ }
1251
+ case "submit": {
1252
+ return colors.green(S_STEP_SUBMIT);
1253
+ }
1254
+ }
1255
+ };
1256
+ text = (opts) => {
1257
+ return new oD({
1258
+ validate: opts.validate,
1259
+ placeholder: opts.placeholder,
1260
+ defaultValue: opts.defaultValue,
1261
+ initialValue: opts.initialValue,
1262
+ render() {
1263
+ const title = `${colors.gray(S_BAR)}
1264
+ ${symbol(this.state)} ${opts.message}
1265
+ `;
1266
+ const placeholder = opts.placeholder ? colors.inverse(opts.placeholder[0]) + colors.dim(opts.placeholder.slice(1)) : colors.inverse(colors.hidden("_"));
1267
+ const value = this.value ? this.valueWithCursor : placeholder;
1268
+ switch (this.state) {
1269
+ case "error": {
1270
+ return `${title.trim()}
1271
+ ${colors.yellow(S_BAR)} ${value}
1272
+ ${colors.yellow(S_BAR_END)} ${colors.yellow(this.error)}
1273
+ `;
1274
+ }
1275
+ case "submit": {
1276
+ return `${title}${colors.gray(S_BAR)} ${colors.dim(this.value || opts.placeholder)}`;
1277
+ }
1278
+ case "cancel": {
1279
+ return `${title}${colors.gray(S_BAR)} ${colors.strikethrough(colors.dim(this.value ?? ""))}${this.value?.trim() ? "\n" + colors.gray(S_BAR) : ""}`;
1280
+ }
1281
+ default: {
1282
+ return `${title}${colors.cyan(S_BAR)} ${value}
1283
+ ${colors.cyan(S_BAR_END)}
1284
+ `;
1285
+ }
1286
+ }
1287
+ }
1288
+ }).prompt();
1289
+ };
1290
+ confirm = (opts) => {
1291
+ const active = opts.active ?? "Yes";
1292
+ const inactive = opts.inactive ?? "No";
1293
+ return new sD({
1294
+ active,
1295
+ inactive,
1296
+ initialValue: opts.initialValue ?? true,
1297
+ render() {
1298
+ const title = `${colors.gray(S_BAR)}
1299
+ ${symbol(this.state)} ${opts.message}
1300
+ `;
1301
+ const value = this.value ? active : inactive;
1302
+ switch (this.state) {
1303
+ case "submit": {
1304
+ return `${title}${colors.gray(S_BAR)} ${colors.dim(value)}`;
1305
+ }
1306
+ case "cancel": {
1307
+ return `${title}${colors.gray(S_BAR)} ${colors.strikethrough(colors.dim(value))}
1308
+ ${colors.gray(S_BAR)}`;
1309
+ }
1310
+ default: {
1311
+ 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}`}
1312
+ ${colors.cyan(S_BAR_END)}
1313
+ `;
1314
+ }
1315
+ }
1316
+ }
1317
+ }).prompt();
1318
+ };
1319
+ select = (opts) => {
1320
+ const opt = (option, state) => {
1321
+ const label = option.label ?? String(option.value);
1322
+ switch (state) {
1323
+ case "active": {
1324
+ return `${colors.green(S_RADIO_ACTIVE)} ${label} ${option.hint ? colors.dim(`(${option.hint})`) : ""}`;
1325
+ }
1326
+ case "selected": {
1327
+ return `${colors.dim(label)}`;
1328
+ }
1329
+ case "cancelled": {
1330
+ return `${colors.strikethrough(colors.dim(label))}`;
1331
+ }
1332
+ }
1333
+ return `${colors.dim(S_RADIO_INACTIVE)} ${colors.dim(label)}`;
1334
+ };
1335
+ return new ED({
1336
+ options: opts.options,
1337
+ initialValue: opts.initialValue,
1338
+ render() {
1339
+ const title = `${colors.gray(S_BAR)}
1340
+ ${symbol(this.state)} ${opts.message}
1341
+ `;
1342
+ switch (this.state) {
1343
+ case "submit": {
1344
+ return `${title}${colors.gray(S_BAR)} ${opt(this.options[this.cursor], "selected")}`;
1345
+ }
1346
+ case "cancel": {
1347
+ return `${title}${colors.gray(S_BAR)} ${opt(this.options[this.cursor], "cancelled")}
1348
+ ${colors.gray(S_BAR)}`;
1349
+ }
1350
+ default: {
1351
+ return `${title}${colors.cyan(S_BAR)} ${this.options.map((option, i) => opt(option, i === this.cursor ? "active" : "inactive")).join(`
1352
+ ${colors.cyan(S_BAR)} `)}
1353
+ ${colors.cyan(S_BAR_END)}
1354
+ `;
1355
+ }
1356
+ }
1357
+ }
1358
+ }).prompt();
1359
+ };
1360
+ multiselect = (opts) => {
1361
+ const opt = (option, state) => {
1362
+ const label = option.label ?? String(option.value);
1363
+ switch (state) {
1364
+ case "active": {
1365
+ return `${colors.cyan(S_CHECKBOX_ACTIVE)} ${label} ${option.hint ? colors.dim(`(${option.hint})`) : ""}`;
1366
+ }
1367
+ case "selected": {
1368
+ return `${colors.green(S_CHECKBOX_SELECTED)} ${colors.dim(label)}`;
1369
+ }
1370
+ case "cancelled": {
1371
+ return `${colors.strikethrough(colors.dim(label))}`;
1372
+ }
1373
+ case "active-selected": {
1374
+ return `${colors.green(S_CHECKBOX_SELECTED)} ${label} ${option.hint ? colors.dim(`(${option.hint})`) : ""}`;
1375
+ }
1376
+ case "submitted": {
1377
+ return `${colors.dim(label)}`;
1378
+ }
1379
+ }
1380
+ return `${colors.dim(S_CHECKBOX_INACTIVE)} ${colors.dim(label)}`;
1381
+ };
1382
+ return new iD({
1383
+ options: opts.options,
1384
+ initialValues: opts.initialValues,
1385
+ required: opts.required ?? true,
1386
+ cursorAt: opts.cursorAt,
1387
+ validate(selected) {
1388
+ if (this.required && selected.length === 0) {
1389
+ return `Please select at least one option.
1390
+ ${colors.reset(colors.dim(`Press ${colors.gray(colors.bgWhite(colors.inverse(" space ")))} to select, ${colors.gray(colors.bgWhite(colors.inverse(" enter ")))} to submit`))}`;
1391
+ }
1392
+ },
1393
+ render() {
1394
+ const title = `${colors.gray(S_BAR)}
1395
+ ${symbol(this.state)} ${opts.message}
1396
+ `;
1397
+ switch (this.state) {
1398
+ case "submit": {
1399
+ 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")}`;
1400
+ }
1401
+ case "cancel": {
1402
+ const label = this.options.filter(({ value }) => this.value.includes(value)).map((option) => opt(option, "cancelled")).join(colors.dim(", "));
1403
+ return `${title}${colors.gray(S_BAR)} ${label.trim() ? `${label}
1404
+ ${colors.gray(S_BAR)}` : ""}`;
1405
+ }
1406
+ case "error": {
1407
+ const footer = this.error.split("\n").map((ln, i) => i === 0 ? `${colors.yellow(S_BAR_END)} ${colors.yellow(ln)}` : ` ${ln}`).join("\n");
1408
+ return title + colors.yellow(S_BAR) + " " + this.options.map((option, i) => {
1409
+ const selected = this.value.includes(option.value);
1410
+ const active = i === this.cursor;
1411
+ if (active && selected) {
1412
+ return opt(option, "active-selected");
1413
+ }
1414
+ if (selected) {
1415
+ return opt(option, "selected");
1416
+ }
1417
+ return opt(option, active ? "active" : "inactive");
1418
+ }).join(`
1419
+ ${colors.yellow(S_BAR)} `) + "\n" + footer + "\n";
1420
+ }
1421
+ default: {
1422
+ return `${title}${colors.cyan(S_BAR)} ${this.options.map((option, i) => {
1423
+ const selected = this.value.includes(option.value);
1424
+ const active = i === this.cursor;
1425
+ if (active && selected) {
1426
+ return opt(option, "active-selected");
1427
+ }
1428
+ if (selected) {
1429
+ return opt(option, "selected");
1430
+ }
1431
+ return opt(option, active ? "active" : "inactive");
1432
+ }).join(`
1433
+ ${colors.cyan(S_BAR)} `)}
1434
+ ${colors.cyan(S_BAR_END)}
1435
+ `;
1436
+ }
1437
+ }
1438
+ }
1439
+ }).prompt();
1440
+ };
1441
+ });
1442
+
1443
+ // ../../../../node_modules/consola/dist/shared/consola.36c0034f.mjs
1444
+ import process$1 from "node:process";
1445
+
1446
+ class FancyReporter extends BasicReporter {
1447
+ formatStack(stack) {
1448
+ return "\n" + parseStack(stack).map((line) => " " + line.replace(/^at +/, (m2) => colors.gray(m2)).replace(/\((.+)\)/, (_2, m2) => `(${colors.cyan(m2)})`)).join("\n");
1449
+ }
1450
+ formatType(logObj, isBadge, opts) {
1451
+ const typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || "gray";
1452
+ if (isBadge) {
1453
+ return getBgColor(typeColor)(colors.black(` ${logObj.type.toUpperCase()} `));
1454
+ }
1455
+ const _type = typeof TYPE_ICONS[logObj.type] === "string" ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type;
1456
+ return _type ? getColor2(typeColor)(_type) : "";
1457
+ }
1458
+ formatLogObj(logObj, opts) {
1459
+ const [message, ...additional] = this.formatArgs(logObj.args, opts).split("\n");
1460
+ if (logObj.type === "box") {
1461
+ return box(characterFormat(message + (additional.length > 0 ? "\n" + additional.join("\n") : "")), {
1462
+ title: logObj.title ? characterFormat(logObj.title) : undefined,
1463
+ style: logObj.style
1464
+ });
1465
+ }
1466
+ const date = this.formatDate(logObj.date, opts);
1467
+ const coloredDate = date && colors.gray(date);
1468
+ const isBadge = logObj.badge ?? logObj.level < 2;
1469
+ const type = this.formatType(logObj, isBadge, opts);
1470
+ const tag = logObj.tag ? colors.gray(logObj.tag) : "";
1471
+ let line;
1472
+ const left = this.filterAndJoin([type, characterFormat(message)]);
1473
+ const right = this.filterAndJoin(opts.columns ? [tag, coloredDate] : [tag]);
1474
+ const space = (opts.columns || 0) - stringWidth(left) - stringWidth(right) - 2;
1475
+ line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors.gray(`[${right}]`)} ` : "") + left;
1476
+ line += characterFormat(additional.length > 0 ? "\n" + additional.join("\n") : "");
1477
+ if (logObj.type === "trace") {
1478
+ const _err = new Error("Trace: " + logObj.message);
1479
+ line += this.formatStack(_err.stack || "");
1480
+ }
1481
+ return isBadge ? "\n" + line + "\n" : line;
1482
+ }
1483
+ }
1484
+ var detectProvider, toBoolean, ansiRegex2, stripAnsi2, getDefaultExportFromCjs, stringWidth$1, isUnicodeSupported, stringWidth, characterFormat, getColor2, getBgColor, createConsola2, _getDefaultLogLevel, providers, processShim, envShim, providerInfo, nodeENV, isCI2, hasTTY, isDebug, isTest, regex, eastasianwidth, eastasianwidthExports, eastAsianWidth, emojiRegex, TYPE_COLOR_MAP, LEVEL_COLOR_MAP, unicode2, s2, TYPE_ICONS, consola;
1485
+ var init_consola_36c0034f = __esm(() => {
1486
+ init_core();
1487
+ init_consola_06ad8a64();
1488
+ init_utils();
1489
+ detectProvider = function(env2) {
1490
+ for (const provider of providers) {
1491
+ const envName = provider[1] || provider[0];
1492
+ if (env2[envName]) {
1493
+ return {
1494
+ name: provider[0].toLowerCase(),
1495
+ ...provider[2]
1496
+ };
1497
+ }
1498
+ }
1499
+ if (env2.SHELL && env2.SHELL === "/bin/jsh") {
1500
+ return {
1501
+ name: "stackblitz",
1502
+ ci: false
1503
+ };
1504
+ }
1505
+ return {
1506
+ name: "",
1507
+ ci: false
1508
+ };
1509
+ };
1510
+ toBoolean = function(val) {
1511
+ return val ? val !== "false" : false;
1512
+ };
1513
+ ansiRegex2 = function({ onlyFirst = false } = {}) {
1514
+ const pattern = [
1515
+ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
1516
+ "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
1517
+ ].join("|");
1518
+ return new RegExp(pattern, onlyFirst ? undefined : "g");
1519
+ };
1520
+ stripAnsi2 = function(string) {
1521
+ if (typeof string !== "string") {
1522
+ throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
1523
+ }
1524
+ return string.replace(regex, "");
1525
+ };
1526
+ getDefaultExportFromCjs = function(x) {
1527
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
1528
+ };
1529
+ stringWidth$1 = function(string, options) {
1530
+ if (typeof string !== "string" || string.length === 0) {
1531
+ return 0;
1532
+ }
1533
+ options = {
1534
+ ambiguousIsNarrow: true,
1535
+ countAnsiEscapeCodes: false,
1536
+ ...options
1537
+ };
1538
+ if (!options.countAnsiEscapeCodes) {
1539
+ string = stripAnsi2(string);
1540
+ }
1541
+ if (string.length === 0) {
1542
+ return 0;
1543
+ }
1544
+ const ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2;
1545
+ let width = 0;
1546
+ for (const { segment: character } of new Intl.Segmenter().segment(string)) {
1547
+ const codePoint = character.codePointAt(0);
1548
+ if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
1549
+ continue;
1550
+ }
1551
+ if (codePoint >= 768 && codePoint <= 879) {
1552
+ continue;
1553
+ }
1554
+ if (emojiRegex().test(character)) {
1555
+ width += 2;
1556
+ continue;
1557
+ }
1558
+ const code = eastAsianWidth.eastAsianWidth(character);
1559
+ switch (code) {
1560
+ case "F":
1561
+ case "W": {
1562
+ width += 2;
1563
+ break;
1564
+ }
1565
+ case "A": {
1566
+ width += ambiguousCharacterWidth;
1567
+ break;
1568
+ }
1569
+ default: {
1570
+ width += 1;
1571
+ }
1572
+ }
1573
+ }
1574
+ return width;
1575
+ };
1576
+ isUnicodeSupported = function() {
1577
+ if (process$1.platform !== "win32") {
1578
+ return process$1.env.TERM !== "linux";
1579
+ }
1580
+ return Boolean(process$1.env.CI) || Boolean(process$1.env.WT_SESSION) || Boolean(process$1.env.TERMINUS_SUBLIME) || process$1.env.ConEmuTask === "{cmd::Cmder}" || process$1.env.TERM_PROGRAM === "Terminus-Sublime" || process$1.env.TERM_PROGRAM === "vscode" || process$1.env.TERM === "xterm-256color" || process$1.env.TERM === "alacritty" || process$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
1581
+ };
1582
+ stringWidth = function(str) {
1583
+ if (!Intl.Segmenter) {
1584
+ return stripAnsi(str).length;
1585
+ }
1586
+ return stringWidth$1(str);
1587
+ };
1588
+ characterFormat = function(str) {
1589
+ return str.replace(/`([^`]+)`/gm, (_2, m2) => colors.cyan(m2)).replace(/\s+_([^_]+)_\s+/gm, (_2, m2) => ` ${colors.underline(m2)} `);
1590
+ };
1591
+ getColor2 = function(color = "white") {
1592
+ return colors[color] || colors.white;
1593
+ };
1594
+ getBgColor = function(color = "bgWhite") {
1595
+ return colors[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors.bgWhite;
1596
+ };
1597
+ createConsola2 = function(options = {}) {
1598
+ let level = _getDefaultLogLevel();
1599
+ if (process.env.CONSOLA_LEVEL) {
1600
+ level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level;
1601
+ }
1602
+ const consola2 = createConsola({
1603
+ level,
1604
+ defaults: { level },
1605
+ stdout: process.stdout,
1606
+ stderr: process.stderr,
1607
+ prompt: (...args) => Promise.resolve().then(() => (init_prompt(), exports_prompt)).then((m2) => m2.prompt(...args)),
1608
+ reporters: options.reporters || [
1609
+ options.fancy ?? !(isCI2 || isTest) ? new FancyReporter : new BasicReporter
1610
+ ],
1611
+ ...options
1612
+ });
1613
+ return consola2;
1614
+ };
1615
+ _getDefaultLogLevel = function() {
1616
+ if (isDebug) {
1617
+ return LogLevels.debug;
1618
+ }
1619
+ if (isTest) {
1620
+ return LogLevels.warn;
1621
+ }
1622
+ return LogLevels.info;
1623
+ };
1624
+ providers = [
1625
+ ["APPVEYOR"],
1626
+ ["AZURE_PIPELINES", "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],
1627
+ ["AZURE_STATIC", "INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],
1628
+ ["APPCIRCLE", "AC_APPCIRCLE"],
1629
+ ["BAMBOO", "bamboo_planKey"],
1630
+ ["BITBUCKET", "BITBUCKET_COMMIT"],
1631
+ ["BITRISE", "BITRISE_IO"],
1632
+ ["BUDDY", "BUDDY_WORKSPACE_ID"],
1633
+ ["BUILDKITE"],
1634
+ ["CIRCLE", "CIRCLECI"],
1635
+ ["CIRRUS", "CIRRUS_CI"],
1636
+ ["CLOUDFLARE_PAGES", "CF_PAGES", { ci: true }],
1637
+ ["CODEBUILD", "CODEBUILD_BUILD_ARN"],
1638
+ ["CODEFRESH", "CF_BUILD_ID"],
1639
+ ["DRONE"],
1640
+ ["DRONE", "DRONE_BUILD_EVENT"],
1641
+ ["DSARI"],
1642
+ ["GITHUB_ACTIONS"],
1643
+ ["GITLAB", "GITLAB_CI"],
1644
+ ["GITLAB", "CI_MERGE_REQUEST_ID"],
1645
+ ["GOCD", "GO_PIPELINE_LABEL"],
1646
+ ["LAYERCI"],
1647
+ ["HUDSON", "HUDSON_URL"],
1648
+ ["JENKINS", "JENKINS_URL"],
1649
+ ["MAGNUM"],
1650
+ ["NETLIFY"],
1651
+ ["NETLIFY", "NETLIFY_LOCAL", { ci: false }],
1652
+ ["NEVERCODE"],
1653
+ ["RENDER"],
1654
+ ["SAIL", "SAILCI"],
1655
+ ["SEMAPHORE"],
1656
+ ["SCREWDRIVER"],
1657
+ ["SHIPPABLE"],
1658
+ ["SOLANO", "TDDIUM"],
1659
+ ["STRIDER"],
1660
+ ["TEAMCITY", "TEAMCITY_VERSION"],
1661
+ ["TRAVIS"],
1662
+ ["VERCEL", "NOW_BUILDER"],
1663
+ ["APPCENTER", "APPCENTER_BUILD_ID"],
1664
+ ["CODESANDBOX", "CODESANDBOX_SSE", { ci: false }],
1665
+ ["STACKBLITZ"],
1666
+ ["STORMKIT"],
1667
+ ["CLEAVR"]
1668
+ ];
1669
+ processShim = typeof process !== "undefined" ? process : {};
1670
+ envShim = processShim.env || {};
1671
+ providerInfo = detectProvider(envShim);
1672
+ nodeENV = typeof process !== "undefined" && process.env && "development" || "";
1673
+ processShim.platform;
1674
+ providerInfo.name;
1675
+ isCI2 = toBoolean(envShim.CI) || providerInfo.ci !== false;
1676
+ hasTTY = toBoolean(processShim.stdout && processShim.stdout.isTTY);
1677
+ isDebug = toBoolean(envShim.DEBUG);
1678
+ isTest = nodeENV === "test" || toBoolean(envShim.TEST);
1679
+ toBoolean(envShim.MINIMAL);
1680
+ regex = ansiRegex2();
1681
+ eastasianwidth = { exports: {} };
1682
+ (function(module) {
1683
+ var eaw = {};
1684
+ {
1685
+ module.exports = eaw;
1686
+ }
1687
+ eaw.eastAsianWidth = function(character) {
1688
+ var x = character.charCodeAt(0);
1689
+ var y = character.length == 2 ? character.charCodeAt(1) : 0;
1690
+ var codePoint = x;
1691
+ if (55296 <= x && x <= 56319 && (56320 <= y && y <= 57343)) {
1692
+ x &= 1023;
1693
+ y &= 1023;
1694
+ codePoint = x << 10 | y;
1695
+ codePoint += 65536;
1696
+ }
1697
+ if (codePoint == 12288 || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510) {
1698
+ return "F";
1699
+ }
1700
+ if (codePoint == 8361 || 65377 <= codePoint && codePoint <= 65470 || 65474 <= codePoint && codePoint <= 65479 || 65482 <= codePoint && codePoint <= 65487 || 65490 <= codePoint && codePoint <= 65495 || 65498 <= codePoint && codePoint <= 65500 || 65512 <= codePoint && codePoint <= 65518) {
1701
+ return "H";
1702
+ }
1703
+ 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) {
1704
+ return "W";
1705
+ }
1706
+ if (32 <= codePoint && codePoint <= 126 || 162 <= codePoint && codePoint <= 163 || 165 <= codePoint && codePoint <= 166 || codePoint == 172 || codePoint == 175 || 10214 <= codePoint && codePoint <= 10221 || 10629 <= codePoint && codePoint <= 10630) {
1707
+ return "Na";
1708
+ }
1709
+ if (codePoint == 161 || codePoint == 164 || 167 <= codePoint && codePoint <= 168 || codePoint == 170 || 173 <= codePoint && codePoint <= 174 || 176 <= codePoint && codePoint <= 180 || 182 <= codePoint && codePoint <= 186 || 188 <= codePoint && codePoint <= 191 || codePoint == 198 || codePoint == 208 || 215 <= codePoint && codePoint <= 216 || 222 <= codePoint && codePoint <= 225 || codePoint == 230 || 232 <= codePoint && codePoint <= 234 || 236 <= codePoint && codePoint <= 237 || codePoint == 240 || 242 <= codePoint && codePoint <= 243 || 247 <= codePoint && codePoint <= 250 || codePoint == 252 || codePoint == 254 || codePoint == 257 || codePoint == 273 || codePoint == 275 || codePoint == 283 || 294 <= codePoint && codePoint <= 295 || codePoint == 299 || 305 <= codePoint && codePoint <= 307 || codePoint == 312 || 319 <= codePoint && codePoint <= 322 || codePoint == 324 || 328 <= codePoint && codePoint <= 331 || codePoint == 333 || 338 <= codePoint && codePoint <= 339 || 358 <= codePoint && codePoint <= 359 || codePoint == 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 || 713 <= codePoint && codePoint <= 715 || codePoint == 717 || codePoint == 720 || 728 <= codePoint && codePoint <= 731 || codePoint == 733 || codePoint == 735 || 768 <= codePoint && codePoint <= 879 || 913 <= codePoint && codePoint <= 929 || 931 <= codePoint && codePoint <= 937 || 945 <= codePoint && codePoint <= 961 || 963 <= codePoint && codePoint <= 969 || codePoint == 1025 || 1040 <= codePoint && codePoint <= 1103 || codePoint == 1105 || codePoint == 8208 || 8211 <= codePoint && codePoint <= 8214 || 8216 <= codePoint && codePoint <= 8217 || 8220 <= codePoint && codePoint <= 8221 || 8224 <= codePoint && codePoint <= 8226 || 8228 <= codePoint && codePoint <= 8231 || codePoint == 8240 || 8242 <= codePoint && codePoint <= 8243 || codePoint == 8245 || codePoint == 8251 || codePoint == 8254 || codePoint == 8308 || codePoint == 8319 || 8321 <= codePoint && codePoint <= 8324 || codePoint == 8364 || codePoint == 8451 || codePoint == 8453 || codePoint == 8457 || codePoint == 8467 || codePoint == 8470 || 8481 <= codePoint && codePoint <= 8482 || codePoint == 8486 || codePoint == 8491 || 8531 <= codePoint && codePoint <= 8532 || 8539 <= codePoint && codePoint <= 8542 || 8544 <= codePoint && codePoint <= 8555 || 8560 <= codePoint && codePoint <= 8569 || codePoint == 8585 || 8592 <= codePoint && codePoint <= 8601 || 8632 <= codePoint && codePoint <= 8633 || codePoint == 8658 || codePoint == 8660 || codePoint == 8679 || codePoint == 8704 || 8706 <= codePoint && codePoint <= 8707 || 8711 <= codePoint && codePoint <= 8712 || codePoint == 8715 || codePoint == 8719 || codePoint == 8721 || codePoint == 8725 || codePoint == 8730 || 8733 <= codePoint && codePoint <= 8736 || codePoint == 8739 || codePoint == 8741 || 8743 <= codePoint && codePoint <= 8748 || codePoint == 8750 || 8756 <= codePoint && codePoint <= 8759 || 8764 <= codePoint && codePoint <= 8765 || codePoint == 8776 || codePoint == 8780 || codePoint == 8786 || 8800 <= codePoint && codePoint <= 8801 || 8804 <= codePoint && codePoint <= 8807 || 8810 <= codePoint && codePoint <= 8811 || 8814 <= codePoint && codePoint <= 8815 || 8834 <= codePoint && codePoint <= 8835 || 8838 <= codePoint && codePoint <= 8839 || codePoint == 8853 || codePoint == 8857 || codePoint == 8869 || codePoint == 8895 || codePoint == 8978 || 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 || codePoint == 9675 || 9678 <= codePoint && codePoint <= 9681 || 9698 <= codePoint && codePoint <= 9701 || codePoint == 9711 || 9733 <= codePoint && codePoint <= 9734 || codePoint == 9737 || 9742 <= codePoint && codePoint <= 9743 || 9748 <= codePoint && codePoint <= 9749 || codePoint == 9756 || codePoint == 9758 || codePoint == 9792 || codePoint == 9794 || 9824 <= codePoint && codePoint <= 9825 || 9827 <= codePoint && codePoint <= 9829 || 9831 <= codePoint && codePoint <= 9834 || 9836 <= codePoint && codePoint <= 9837 || codePoint == 9839 || 9886 <= codePoint && codePoint <= 9887 || 9918 <= codePoint && codePoint <= 9919 || 9924 <= codePoint && codePoint <= 9933 || 9935 <= codePoint && codePoint <= 9953 || codePoint == 9955 || 9960 <= codePoint && codePoint <= 9983 || codePoint == 10045 || codePoint == 10071 || 10102 <= codePoint && codePoint <= 10111 || 11093 <= codePoint && codePoint <= 11097 || 12872 <= codePoint && codePoint <= 12879 || 57344 <= codePoint && codePoint <= 63743 || 65024 <= codePoint && codePoint <= 65039 || codePoint == 65533 || 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) {
1710
+ return "A";
1711
+ }
1712
+ return "N";
1713
+ };
1714
+ eaw.characterLength = function(character) {
1715
+ var code = this.eastAsianWidth(character);
1716
+ if (code == "F" || code == "W" || code == "A") {
1717
+ return 2;
1718
+ } else {
1719
+ return 1;
1720
+ }
1721
+ };
1722
+ function stringToArray(string) {
1723
+ return string.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
1724
+ }
1725
+ eaw.length = function(string) {
1726
+ var characters = stringToArray(string);
1727
+ var len = 0;
1728
+ for (var i = 0;i < characters.length; i++) {
1729
+ len = len + this.characterLength(characters[i]);
1730
+ }
1731
+ return len;
1732
+ };
1733
+ eaw.slice = function(text2, start, end) {
1734
+ textLen = eaw.length(text2);
1735
+ start = start ? start : 0;
1736
+ end = end ? end : 1;
1737
+ if (start < 0) {
1738
+ start = textLen + start;
1739
+ }
1740
+ if (end < 0) {
1741
+ end = textLen + end;
1742
+ }
1743
+ var result = "";
1744
+ var eawLen = 0;
1745
+ var chars = stringToArray(text2);
1746
+ for (var i = 0;i < chars.length; i++) {
1747
+ var char = chars[i];
1748
+ var charLen = eaw.length(char);
1749
+ if (eawLen >= start - (charLen == 2 ? 1 : 0)) {
1750
+ if (eawLen + charLen <= end) {
1751
+ result += char;
1752
+ } else {
1753
+ break;
1754
+ }
1755
+ }
1756
+ eawLen += charLen;
1757
+ }
1758
+ return result;
1759
+ };
1760
+ })(eastasianwidth);
1761
+ eastasianwidthExports = eastasianwidth.exports;
1762
+ eastAsianWidth = getDefaultExportFromCjs(eastasianwidthExports);
1763
+ emojiRegex = () => {
1764
+ 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;
1765
+ };
1766
+ TYPE_COLOR_MAP = {
1767
+ info: "cyan",
1768
+ fail: "red",
1769
+ success: "green",
1770
+ ready: "green",
1771
+ start: "magenta"
1772
+ };
1773
+ LEVEL_COLOR_MAP = {
1774
+ 0: "red",
1775
+ 1: "yellow"
1776
+ };
1777
+ unicode2 = isUnicodeSupported();
1778
+ s2 = (c2, fallback) => unicode2 ? c2 : fallback;
1779
+ TYPE_ICONS = {
1780
+ error: s2("\u2716", "\xD7"),
1781
+ fatal: s2("\u2716", "\xD7"),
1782
+ ready: s2("\u2714", "\u221A"),
1783
+ warn: s2("\u26A0", "\u203C"),
1784
+ info: s2("\u2139", "i"),
1785
+ success: s2("\u2714", "\u221A"),
1786
+ debug: s2("\u2699", "D"),
1787
+ trace: s2("\u2192", "\u2192"),
1788
+ fail: s2("\u2716", "\xD7"),
1789
+ start: s2("\u25D0", "o"),
1790
+ log: ""
1791
+ };
1792
+ consola = createConsola2();
1793
+ });
1794
+
1795
+ // ../../../../node_modules/slugify/slugify.js
1796
+ var require_slugify = __commonJS((exports, module) => {
1797
+ (function(name, root, factory) {
1798
+ if (typeof exports === "object") {
1799
+ module.exports = factory();
1800
+ module.exports["default"] = factory();
1801
+ } else if (typeof define === "function" && define.amd) {
1802
+ define(factory);
1803
+ } else {
1804
+ root[name] = factory();
1805
+ }
1806
+ })("slugify", exports, function() {
1807
+ var charMap = JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xA2":"cent","\xA3":"pound","\xA4":"currency","\xA5":"yen","\xA9":"(c)","\xAA":"a","\xAE":"(r)","\xBA":"o","\xC0":"A","\xC1":"A","\xC2":"A","\xC3":"A","\xC4":"A","\xC5":"A","\xC6":"AE","\xC7":"C","\xC8":"E","\xC9":"E","\xCA":"E","\xCB":"E","\xCC":"I","\xCD":"I","\xCE":"I","\xCF":"I","\xD0":"D","\xD1":"N","\xD2":"O","\xD3":"O","\xD4":"O","\xD5":"O","\xD6":"O","\xD8":"O","\xD9":"U","\xDA":"U","\xDB":"U","\xDC":"U","\xDD":"Y","\xDE":"TH","\xDF":"ss","\xE0":"a","\xE1":"a","\xE2":"a","\xE3":"a","\xE4":"a","\xE5":"a","\xE6":"ae","\xE7":"c","\xE8":"e","\xE9":"e","\xEA":"e","\xEB":"e","\xEC":"i","\xED":"i","\xEE":"i","\xEF":"i","\xF0":"d","\xF1":"n","\xF2":"o","\xF3":"o","\xF4":"o","\xF5":"o","\xF6":"o","\xF8":"o","\xF9":"u","\xFA":"u","\xFB":"u","\xFC":"u","\xFD":"y","\xFE":"th","\xFF":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010C":"C","\u010D":"c","\u010E":"D","\u010F":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011A":"E","\u011B":"e","\u011E":"G","\u011F":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012A":"i","\u012B":"i","\u012E":"I","\u012F":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013B":"L","\u013C":"l","\u013D":"L","\u013E":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014C":"O","\u014D":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015A":"S","\u015B":"s","\u015E":"S","\u015F":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016A":"u","\u016B":"u","\u016E":"U","\u016F":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017A":"z","\u017B":"Z","\u017C":"z","\u017D":"Z","\u017E":"z","\u018F":"E","\u0192":"f","\u01A0":"O","\u01A1":"o","\u01AF":"U","\u01B0":"u","\u01C8":"LJ","\u01C9":"lj","\u01CB":"NJ","\u01CC":"nj","\u0218":"S","\u0219":"s","\u021A":"T","\u021B":"t","\u0259":"e","\u02DA":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038A":"I","\u038C":"O","\u038E":"Y","\u038F":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039A":"K","\u039B":"L","\u039C":"M","\u039D":"N","\u039E":"3","\u039F":"O","\u03A0":"P","\u03A1":"R","\u03A3":"S","\u03A4":"T","\u03A5":"Y","\u03A6":"F","\u03A7":"X","\u03A8":"PS","\u03A9":"W","\u03AA":"I","\u03AB":"Y","\u03AC":"a","\u03AD":"e","\u03AE":"h","\u03AF":"i","\u03B0":"y","\u03B1":"a","\u03B2":"b","\u03B3":"g","\u03B4":"d","\u03B5":"e","\u03B6":"z","\u03B7":"h","\u03B8":"8","\u03B9":"i","\u03BA":"k","\u03BB":"l","\u03BC":"m","\u03BD":"n","\u03BE":"3","\u03BF":"o","\u03C0":"p","\u03C1":"r","\u03C2":"s","\u03C3":"s","\u03C4":"t","\u03C5":"y","\u03C6":"f","\u03C7":"x","\u03C8":"ps","\u03C9":"w","\u03CA":"i","\u03CB":"y","\u03CC":"o","\u03CD":"y","\u03CE":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040A":"NJ","\u040B":"C","\u040F":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041A":"K","\u041B":"L","\u041C":"M","\u041D":"N","\u041E":"O","\u041F":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042A":"U","\u042B":"Y","\u042C":"","\u042D":"E","\u042E":"Yu","\u042F":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043A":"k","\u043B":"l","\u043C":"m","\u043D":"n","\u043E":"o","\u043F":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044A":"u","\u044B":"y","\u044C":"","\u044D":"e","\u044E":"yu","\u044F":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045A":"nj","\u045B":"c","\u045D":"u","\u045F":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049A":"KH","\u049B":"kh","\u04A2":"NG","\u04A3":"ng","\u04AE":"UE","\u04AF":"ue","\u04B0":"U","\u04B1":"u","\u04BA":"H","\u04BB":"h","\u04D8":"AE","\u04D9":"ae","\u04E8":"OE","\u04E9":"oe","\u0531":"A","\u0532":"B","\u0533":"G","\u0534":"D","\u0535":"E","\u0536":"Z","\u0537":"E'","\u0538":"Y'","\u0539":"T'","\u053A":"JH","\u053B":"I","\u053C":"L","\u053D":"X","\u053E":"C'","\u053F":"K","\u0540":"H","\u0541":"D'","\u0542":"GH","\u0543":"TW","\u0544":"M","\u0545":"Y","\u0546":"N","\u0547":"SH","\u0549":"CH","\u054A":"P","\u054B":"J","\u054C":"R'","\u054D":"S","\u054E":"V","\u054F":"T","\u0550":"R","\u0551":"C","\u0553":"P'","\u0554":"Q'","\u0555":"O''","\u0556":"F","\u0587":"EV","\u0621":"a","\u0622":"aa","\u0623":"a","\u0624":"u","\u0625":"i","\u0626":"e","\u0627":"a","\u0628":"b","\u0629":"h","\u062A":"t","\u062B":"th","\u062C":"j","\u062D":"h","\u062E":"kh","\u062F":"d","\u0630":"th","\u0631":"r","\u0632":"z","\u0633":"s","\u0634":"sh","\u0635":"s","\u0636":"dh","\u0637":"t","\u0638":"z","\u0639":"a","\u063A":"gh","\u0641":"f","\u0642":"q","\u0643":"k","\u0644":"l","\u0645":"m","\u0646":"n","\u0647":"h","\u0648":"w","\u0649":"a","\u064A":"y","\u064B":"an","\u064C":"on","\u064D":"en","\u064E":"a","\u064F":"u","\u0650":"e","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u067E":"p","\u0686":"ch","\u0698":"zh","\u06A9":"k","\u06AF":"g","\u06CC":"y","\u06F0":"0","\u06F1":"1","\u06F2":"2","\u06F3":"3","\u06F4":"4","\u06F5":"5","\u06F6":"6","\u06F7":"7","\u06F8":"8","\u06F9":"9","\u0E3F":"baht","\u10D0":"a","\u10D1":"b","\u10D2":"g","\u10D3":"d","\u10D4":"e","\u10D5":"v","\u10D6":"z","\u10D7":"t","\u10D8":"i","\u10D9":"k","\u10DA":"l","\u10DB":"m","\u10DC":"n","\u10DD":"o","\u10DE":"p","\u10DF":"zh","\u10E0":"r","\u10E1":"s","\u10E2":"t","\u10E3":"u","\u10E4":"f","\u10E5":"k","\u10E6":"gh","\u10E7":"q","\u10E8":"sh","\u10E9":"ch","\u10EA":"ts","\u10EB":"dz","\u10EC":"ts","\u10ED":"ch","\u10EE":"kh","\u10EF":"j","\u10F0":"h","\u1E62":"S","\u1E63":"s","\u1E80":"W","\u1E81":"w","\u1E82":"W","\u1E83":"w","\u1E84":"W","\u1E85":"w","\u1E9E":"SS","\u1EA0":"A","\u1EA1":"a","\u1EA2":"A","\u1EA3":"a","\u1EA4":"A","\u1EA5":"a","\u1EA6":"A","\u1EA7":"a","\u1EA8":"A","\u1EA9":"a","\u1EAA":"A","\u1EAB":"a","\u1EAC":"A","\u1EAD":"a","\u1EAE":"A","\u1EAF":"a","\u1EB0":"A","\u1EB1":"a","\u1EB2":"A","\u1EB3":"a","\u1EB4":"A","\u1EB5":"a","\u1EB6":"A","\u1EB7":"a","\u1EB8":"E","\u1EB9":"e","\u1EBA":"E","\u1EBB":"e","\u1EBC":"E","\u1EBD":"e","\u1EBE":"E","\u1EBF":"e","\u1EC0":"E","\u1EC1":"e","\u1EC2":"E","\u1EC3":"e","\u1EC4":"E","\u1EC5":"e","\u1EC6":"E","\u1EC7":"e","\u1EC8":"I","\u1EC9":"i","\u1ECA":"I","\u1ECB":"i","\u1ECC":"O","\u1ECD":"o","\u1ECE":"O","\u1ECF":"o","\u1ED0":"O","\u1ED1":"o","\u1ED2":"O","\u1ED3":"o","\u1ED4":"O","\u1ED5":"o","\u1ED6":"O","\u1ED7":"o","\u1ED8":"O","\u1ED9":"o","\u1EDA":"O","\u1EDB":"o","\u1EDC":"O","\u1EDD":"o","\u1EDE":"O","\u1EDF":"o","\u1EE0":"O","\u1EE1":"o","\u1EE2":"O","\u1EE3":"o","\u1EE4":"U","\u1EE5":"u","\u1EE6":"U","\u1EE7":"u","\u1EE8":"U","\u1EE9":"u","\u1EEA":"U","\u1EEB":"u","\u1EEC":"U","\u1EED":"u","\u1EEE":"U","\u1EEF":"u","\u1EF0":"U","\u1EF1":"u","\u1EF2":"Y","\u1EF3":"y","\u1EF4":"Y","\u1EF5":"y","\u1EF6":"Y","\u1EF7":"y","\u1EF8":"Y","\u1EF9":"y","\u2013":"-","\u2018":"'","\u2019":"'","\u201C":"\\"","\u201D":"\\"","\u201E":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20A0":"ecu","\u20A2":"cruzeiro","\u20A3":"french franc","\u20A4":"lira","\u20A5":"mill","\u20A6":"naira","\u20A7":"peseta","\u20A8":"rupee","\u20A9":"won","\u20AA":"new shequel","\u20AB":"dong","\u20AC":"euro","\u20AD":"kip","\u20AE":"tugrik","\u20AF":"drachma","\u20B0":"penny","\u20B1":"peso","\u20B2":"guarani","\u20B3":"austral","\u20B4":"hryvnia","\u20B5":"cedi","\u20B8":"kazakhstani tenge","\u20B9":"indian rupee","\u20BA":"turkish lira","\u20BD":"russian ruble","\u20BF":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221E":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\uFDFC":"rial","\uFEF5":"laa","\uFEF7":"laa","\uFEF9":"lai","\uFEFB":"la"}`);
1808
+ var locales = JSON.parse('{"bg":{"\u0419":"Y","\u0426":"Ts","\u0429":"Sht","\u042A":"A","\u042C":"Y","\u0439":"y","\u0446":"ts","\u0449":"sht","\u044A":"a","\u044C":"y"},"de":{"\xC4":"AE","\xE4":"ae","\xD6":"OE","\xF6":"oe","\xDC":"UE","\xFC":"ue","\xDF":"ss","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221E":"unendlich","\u2665":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","\xA2":"centavos","\xA3":"libras","\xA4":"moneda","\u20A3":"francos","\u2211":"suma","\u221E":"infinito","\u2665":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xA2":"centime","\xA3":"livre","\xA4":"devise","\u20A3":"franc","\u2211":"somme","\u221E":"infini","\u2665":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","\xA2":"centavo","\u2211":"soma","\xA3":"libra","\u221E":"infinito","\u2665":"amor"},"uk":{"\u0418":"Y","\u0438":"y","\u0419":"Y","\u0439":"y","\u0426":"Ts","\u0446":"ts","\u0425":"Kh","\u0445":"kh","\u0429":"Shch","\u0449":"shch","\u0413":"H","\u0433":"h"},"vi":{"\u0110":"D","\u0111":"d"},"da":{"\xD8":"OE","\xF8":"oe","\xC5":"AA","\xE5":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"st\xF8rre end"},"nb":{"&":"og","\xC5":"AA","\xC6":"AE","\xD8":"OE","\xE5":"aa","\xE6":"ae","\xF8":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","\xC5":"AA","\xC4":"AE","\xD6":"OE","\xE5":"aa","\xE4":"ae","\xF6":"oe"}}');
1809
+ function replace(string, options) {
1810
+ if (typeof string !== "string") {
1811
+ throw new Error("slugify: string argument expected");
1812
+ }
1813
+ options = typeof options === "string" ? { replacement: options } : options || {};
1814
+ var locale = locales[options.locale] || {};
1815
+ var replacement = options.replacement === undefined ? "-" : options.replacement;
1816
+ var trim = options.trim === undefined ? true : options.trim;
1817
+ var slug = string.normalize().split("").reduce(function(result, ch) {
1818
+ var appendChar = locale[ch];
1819
+ if (appendChar === undefined)
1820
+ appendChar = charMap[ch];
1821
+ if (appendChar === undefined)
1822
+ appendChar = ch;
1823
+ if (appendChar === replacement)
1824
+ appendChar = " ";
1825
+ return result + appendChar.replace(options.remove || /[^\w\s$*_+~.()'"!\-:@]+/g, "");
1826
+ }, "");
1827
+ if (options.strict) {
1828
+ slug = slug.replace(/[^A-Za-z0-9\s]/g, "");
1829
+ }
1830
+ if (trim) {
1831
+ slug = slug.trim();
1832
+ }
1833
+ slug = slug.replace(/\s+/g, replacement);
1834
+ if (options.lower) {
1835
+ slug = slug.toLowerCase();
1836
+ }
1837
+ return slug;
1838
+ }
1839
+ replace.extend = function(customMap) {
1840
+ Object.assign(charMap, customMap);
1841
+ };
1842
+ return replace;
1843
+ });
1844
+ });
1845
+
1846
+ // ../../../../node_modules/pluralize/pluralize.js
1847
+ var require_pluralize = __commonJS((exports, module) => {
1848
+ (function(root, pluralize) {
1849
+ if (typeof __require === "function" && typeof exports === "object" && typeof module === "object") {
1850
+ module.exports = pluralize();
1851
+ } else if (typeof define === "function" && define.amd) {
1852
+ define(function() {
1853
+ return pluralize();
1854
+ });
1855
+ } else {
1856
+ root.pluralize = pluralize();
1857
+ }
1858
+ })(exports, function() {
1859
+ var pluralRules = [];
1860
+ var singularRules = [];
1861
+ var uncountables = {};
1862
+ var irregularPlurals = {};
1863
+ var irregularSingles = {};
1864
+ function sanitizeRule(rule) {
1865
+ if (typeof rule === "string") {
1866
+ return new RegExp("^" + rule + "$", "i");
1867
+ }
1868
+ return rule;
1869
+ }
1870
+ function restoreCase(word, token) {
1871
+ if (word === token)
1872
+ return token;
1873
+ if (word === word.toLowerCase())
1874
+ return token.toLowerCase();
1875
+ if (word === word.toUpperCase())
1876
+ return token.toUpperCase();
1877
+ if (word[0] === word[0].toUpperCase()) {
1878
+ return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase();
1879
+ }
1880
+ return token.toLowerCase();
1881
+ }
1882
+ function interpolate(str, args) {
1883
+ return str.replace(/\$(\d{1,2})/g, function(match, index) {
1884
+ return args[index] || "";
1885
+ });
1886
+ }
1887
+ function replace(word, rule) {
1888
+ return word.replace(rule[0], function(match, index) {
1889
+ var result = interpolate(rule[1], arguments);
1890
+ if (match === "") {
1891
+ return restoreCase(word[index - 1], result);
1892
+ }
1893
+ return restoreCase(match, result);
1894
+ });
1895
+ }
1896
+ function sanitizeWord(token, word, rules) {
1897
+ if (!token.length || uncountables.hasOwnProperty(token)) {
1898
+ return word;
1899
+ }
1900
+ var len = rules.length;
1901
+ while (len--) {
1902
+ var rule = rules[len];
1903
+ if (rule[0].test(word))
1904
+ return replace(word, rule);
1905
+ }
1906
+ return word;
1907
+ }
1908
+ function replaceWord(replaceMap, keepMap, rules) {
1909
+ return function(word) {
1910
+ var token = word.toLowerCase();
1911
+ if (keepMap.hasOwnProperty(token)) {
1912
+ return restoreCase(word, token);
1913
+ }
1914
+ if (replaceMap.hasOwnProperty(token)) {
1915
+ return restoreCase(word, replaceMap[token]);
1916
+ }
1917
+ return sanitizeWord(token, word, rules);
1918
+ };
1919
+ }
1920
+ function checkWord(replaceMap, keepMap, rules, bool) {
1921
+ return function(word) {
1922
+ var token = word.toLowerCase();
1923
+ if (keepMap.hasOwnProperty(token))
1924
+ return true;
1925
+ if (replaceMap.hasOwnProperty(token))
1926
+ return false;
1927
+ return sanitizeWord(token, token, rules) === token;
1928
+ };
1929
+ }
1930
+ function pluralize(word, count, inclusive) {
1931
+ var pluralized = count === 1 ? pluralize.singular(word) : pluralize.plural(word);
1932
+ return (inclusive ? count + " " : "") + pluralized;
1933
+ }
1934
+ pluralize.plural = replaceWord(irregularSingles, irregularPlurals, pluralRules);
1935
+ pluralize.isPlural = checkWord(irregularSingles, irregularPlurals, pluralRules);
1936
+ pluralize.singular = replaceWord(irregularPlurals, irregularSingles, singularRules);
1937
+ pluralize.isSingular = checkWord(irregularPlurals, irregularSingles, singularRules);
1938
+ pluralize.addPluralRule = function(rule, replacement) {
1939
+ pluralRules.push([sanitizeRule(rule), replacement]);
1940
+ };
1941
+ pluralize.addSingularRule = function(rule, replacement) {
1942
+ singularRules.push([sanitizeRule(rule), replacement]);
1943
+ };
1944
+ pluralize.addUncountableRule = function(word) {
1945
+ if (typeof word === "string") {
1946
+ uncountables[word.toLowerCase()] = true;
1947
+ return;
1948
+ }
1949
+ pluralize.addPluralRule(word, "$0");
1950
+ pluralize.addSingularRule(word, "$0");
1951
+ };
1952
+ pluralize.addIrregularRule = function(single, plural) {
1953
+ plural = plural.toLowerCase();
1954
+ single = single.toLowerCase();
1955
+ irregularSingles[single] = plural;
1956
+ irregularPlurals[plural] = single;
1957
+ };
1958
+ [
1959
+ ["I", "we"],
1960
+ ["me", "us"],
1961
+ ["he", "they"],
1962
+ ["she", "they"],
1963
+ ["them", "them"],
1964
+ ["myself", "ourselves"],
1965
+ ["yourself", "yourselves"],
1966
+ ["itself", "themselves"],
1967
+ ["herself", "themselves"],
1968
+ ["himself", "themselves"],
1969
+ ["themself", "themselves"],
1970
+ ["is", "are"],
1971
+ ["was", "were"],
1972
+ ["has", "have"],
1973
+ ["this", "these"],
1974
+ ["that", "those"],
1975
+ ["echo", "echoes"],
1976
+ ["dingo", "dingoes"],
1977
+ ["volcano", "volcanoes"],
1978
+ ["tornado", "tornadoes"],
1979
+ ["torpedo", "torpedoes"],
1980
+ ["genus", "genera"],
1981
+ ["viscus", "viscera"],
1982
+ ["stigma", "stigmata"],
1983
+ ["stoma", "stomata"],
1984
+ ["dogma", "dogmata"],
1985
+ ["lemma", "lemmata"],
1986
+ ["schema", "schemata"],
1987
+ ["anathema", "anathemata"],
1988
+ ["ox", "oxen"],
1989
+ ["axe", "axes"],
1990
+ ["die", "dice"],
1991
+ ["yes", "yeses"],
1992
+ ["foot", "feet"],
1993
+ ["eave", "eaves"],
1994
+ ["goose", "geese"],
1995
+ ["tooth", "teeth"],
1996
+ ["quiz", "quizzes"],
1997
+ ["human", "humans"],
1998
+ ["proof", "proofs"],
1999
+ ["carve", "carves"],
2000
+ ["valve", "valves"],
2001
+ ["looey", "looies"],
2002
+ ["thief", "thieves"],
2003
+ ["groove", "grooves"],
2004
+ ["pickaxe", "pickaxes"],
2005
+ ["passerby", "passersby"]
2006
+ ].forEach(function(rule) {
2007
+ return pluralize.addIrregularRule(rule[0], rule[1]);
2008
+ });
2009
+ [
2010
+ [/s?$/i, "s"],
2011
+ [/[^\u0000-\u007F]$/i, "$0"],
2012
+ [/([^aeiou]ese)$/i, "$1"],
2013
+ [/(ax|test)is$/i, "$1es"],
2014
+ [/(alias|[^aou]us|t[lm]as|gas|ris)$/i, "$1es"],
2015
+ [/(e[mn]u)s?$/i, "$1s"],
2016
+ [/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i, "$1"],
2017
+ [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1i"],
2018
+ [/(alumn|alg|vertebr)(?:a|ae)$/i, "$1ae"],
2019
+ [/(seraph|cherub)(?:im)?$/i, "$1im"],
2020
+ [/(her|at|gr)o$/i, "$1oes"],
2021
+ [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, "$1a"],
2022
+ [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, "$1a"],
2023
+ [/sis$/i, "ses"],
2024
+ [/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, "$1$2ves"],
2025
+ [/([^aeiouy]|qu)y$/i, "$1ies"],
2026
+ [/([^ch][ieo][ln])ey$/i, "$1ies"],
2027
+ [/(x|ch|ss|sh|zz)$/i, "$1es"],
2028
+ [/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, "$1ices"],
2029
+ [/\b((?:tit)?m|l)(?:ice|ouse)$/i, "$1ice"],
2030
+ [/(pe)(?:rson|ople)$/i, "$1ople"],
2031
+ [/(child)(?:ren)?$/i, "$1ren"],
2032
+ [/eaux$/i, "$0"],
2033
+ [/m[ae]n$/i, "men"],
2034
+ ["thou", "you"]
2035
+ ].forEach(function(rule) {
2036
+ return pluralize.addPluralRule(rule[0], rule[1]);
2037
+ });
2038
+ [
2039
+ [/s$/i, ""],
2040
+ [/(ss)$/i, "$1"],
2041
+ [/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i, "$1fe"],
2042
+ [/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, "$1f"],
2043
+ [/ies$/i, "y"],
2044
+ [/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, "$1ie"],
2045
+ [/\b(mon|smil)ies$/i, "$1ey"],
2046
+ [/\b((?:tit)?m|l)ice$/i, "$1ouse"],
2047
+ [/(seraph|cherub)im$/i, "$1"],
2048
+ [/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i, "$1"],
2049
+ [/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i, "$1sis"],
2050
+ [/(movie|twelve|abuse|e[mn]u)s$/i, "$1"],
2051
+ [/(test)(?:is|es)$/i, "$1is"],
2052
+ [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1us"],
2053
+ [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, "$1um"],
2054
+ [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, "$1on"],
2055
+ [/(alumn|alg|vertebr)ae$/i, "$1a"],
2056
+ [/(cod|mur|sil|vert|ind)ices$/i, "$1ex"],
2057
+ [/(matr|append)ices$/i, "$1ix"],
2058
+ [/(pe)(rson|ople)$/i, "$1rson"],
2059
+ [/(child)ren$/i, "$1"],
2060
+ [/(eau)x?$/i, "$1"],
2061
+ [/men$/i, "man"]
2062
+ ].forEach(function(rule) {
2063
+ return pluralize.addSingularRule(rule[0], rule[1]);
2064
+ });
2065
+ [
2066
+ "adulthood",
2067
+ "advice",
2068
+ "agenda",
2069
+ "aid",
2070
+ "aircraft",
2071
+ "alcohol",
2072
+ "ammo",
2073
+ "analytics",
2074
+ "anime",
2075
+ "athletics",
2076
+ "audio",
2077
+ "bison",
2078
+ "blood",
2079
+ "bream",
2080
+ "buffalo",
2081
+ "butter",
2082
+ "carp",
2083
+ "cash",
2084
+ "chassis",
2085
+ "chess",
2086
+ "clothing",
2087
+ "cod",
2088
+ "commerce",
2089
+ "cooperation",
2090
+ "corps",
2091
+ "debris",
2092
+ "diabetes",
2093
+ "digestion",
2094
+ "elk",
2095
+ "energy",
2096
+ "equipment",
2097
+ "excretion",
2098
+ "expertise",
2099
+ "firmware",
2100
+ "flounder",
2101
+ "fun",
2102
+ "gallows",
2103
+ "garbage",
2104
+ "graffiti",
2105
+ "hardware",
2106
+ "headquarters",
2107
+ "health",
2108
+ "herpes",
2109
+ "highjinks",
2110
+ "homework",
2111
+ "housework",
2112
+ "information",
2113
+ "jeans",
2114
+ "justice",
2115
+ "kudos",
2116
+ "labour",
2117
+ "literature",
2118
+ "machinery",
2119
+ "mackerel",
2120
+ "mail",
2121
+ "media",
2122
+ "mews",
2123
+ "moose",
2124
+ "music",
2125
+ "mud",
2126
+ "manga",
2127
+ "news",
2128
+ "only",
2129
+ "personnel",
2130
+ "pike",
2131
+ "plankton",
2132
+ "pliers",
2133
+ "police",
2134
+ "pollution",
2135
+ "premises",
2136
+ "rain",
2137
+ "research",
2138
+ "rice",
2139
+ "salmon",
2140
+ "scissors",
2141
+ "series",
2142
+ "sewage",
2143
+ "shambles",
2144
+ "shrimp",
2145
+ "software",
2146
+ "species",
2147
+ "staff",
2148
+ "swine",
2149
+ "tennis",
2150
+ "traffic",
2151
+ "transportation",
2152
+ "trout",
2153
+ "tuna",
2154
+ "wealth",
2155
+ "welfare",
2156
+ "whiting",
2157
+ "wildebeest",
2158
+ "wildlife",
2159
+ "you",
2160
+ /pok[eé]mon$/i,
2161
+ /[^aeiou]ese$/i,
2162
+ /deer$/i,
2163
+ /fish$/i,
2164
+ /measles$/i,
2165
+ /o[iu]s$/i,
2166
+ /pox$/i,
2167
+ /sheep$/i
2168
+ ].forEach(pluralize.addUncountableRule);
2169
+ return pluralize;
2170
+ });
2171
+ });
2172
+
2173
+ // ../../../../node_modules/universalify/index.js
2174
+ var require_universalify = __commonJS((exports) => {
2175
+ exports.fromCallback = function(fn) {
2176
+ return Object.defineProperty(function(...args) {
2177
+ if (typeof args[args.length - 1] === "function")
2178
+ fn.apply(this, args);
2179
+ else {
2180
+ return new Promise((resolve, reject) => {
2181
+ args.push((err, res) => err != null ? reject(err) : resolve(res));
2182
+ fn.apply(this, args);
2183
+ });
2184
+ }
2185
+ }, "name", { value: fn.name });
2186
+ };
2187
+ exports.fromPromise = function(fn) {
2188
+ return Object.defineProperty(function(...args) {
2189
+ const cb = args[args.length - 1];
2190
+ if (typeof cb !== "function")
2191
+ return fn.apply(this, args);
2192
+ else {
2193
+ args.pop();
2194
+ fn.apply(this, args).then((r2) => cb(null, r2), cb);
2195
+ }
2196
+ }, "name", { value: fn.name });
2197
+ };
2198
+ });
2199
+
2200
+ // ../../../../node_modules/graceful-fs/polyfills.js
2201
+ var require_polyfills = __commonJS((exports, module) => {
2202
+ var patch = function(fs) {
2203
+ if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
2204
+ patchLchmod(fs);
2205
+ }
2206
+ if (!fs.lutimes) {
2207
+ patchLutimes(fs);
2208
+ }
2209
+ fs.chown = chownFix(fs.chown);
2210
+ fs.fchown = chownFix(fs.fchown);
2211
+ fs.lchown = chownFix(fs.lchown);
2212
+ fs.chmod = chmodFix(fs.chmod);
2213
+ fs.fchmod = chmodFix(fs.fchmod);
2214
+ fs.lchmod = chmodFix(fs.lchmod);
2215
+ fs.chownSync = chownFixSync(fs.chownSync);
2216
+ fs.fchownSync = chownFixSync(fs.fchownSync);
2217
+ fs.lchownSync = chownFixSync(fs.lchownSync);
2218
+ fs.chmodSync = chmodFixSync(fs.chmodSync);
2219
+ fs.fchmodSync = chmodFixSync(fs.fchmodSync);
2220
+ fs.lchmodSync = chmodFixSync(fs.lchmodSync);
2221
+ fs.stat = statFix(fs.stat);
2222
+ fs.fstat = statFix(fs.fstat);
2223
+ fs.lstat = statFix(fs.lstat);
2224
+ fs.statSync = statFixSync(fs.statSync);
2225
+ fs.fstatSync = statFixSync(fs.fstatSync);
2226
+ fs.lstatSync = statFixSync(fs.lstatSync);
2227
+ if (fs.chmod && !fs.lchmod) {
2228
+ fs.lchmod = function(path, mode, cb) {
2229
+ if (cb)
2230
+ process.nextTick(cb);
2231
+ };
2232
+ fs.lchmodSync = function() {
2233
+ };
2234
+ }
2235
+ if (fs.chown && !fs.lchown) {
2236
+ fs.lchown = function(path, uid, gid, cb) {
2237
+ if (cb)
2238
+ process.nextTick(cb);
2239
+ };
2240
+ fs.lchownSync = function() {
2241
+ };
2242
+ }
2243
+ if (platform2 === "win32") {
2244
+ fs.rename = typeof fs.rename !== "function" ? fs.rename : function(fs$rename) {
2245
+ function rename(from, to, cb) {
2246
+ var start = Date.now();
2247
+ var backoff = 0;
2248
+ fs$rename(from, to, function CB(er) {
2249
+ if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 60000) {
2250
+ setTimeout(function() {
2251
+ fs.stat(to, function(stater, st) {
2252
+ if (stater && stater.code === "ENOENT")
2253
+ fs$rename(from, to, CB);
2254
+ else
2255
+ cb(er);
2256
+ });
2257
+ }, backoff);
2258
+ if (backoff < 100)
2259
+ backoff += 10;
2260
+ return;
2261
+ }
2262
+ if (cb)
2263
+ cb(er);
2264
+ });
2265
+ }
2266
+ if (Object.setPrototypeOf)
2267
+ Object.setPrototypeOf(rename, fs$rename);
2268
+ return rename;
2269
+ }(fs.rename);
2270
+ }
2271
+ fs.read = typeof fs.read !== "function" ? fs.read : function(fs$read) {
2272
+ function read(fd, buffer, offset, length, position, callback_) {
2273
+ var callback;
2274
+ if (callback_ && typeof callback_ === "function") {
2275
+ var eagCounter = 0;
2276
+ callback = function(er, _2, __) {
2277
+ if (er && er.code === "EAGAIN" && eagCounter < 10) {
2278
+ eagCounter++;
2279
+ return fs$read.call(fs, fd, buffer, offset, length, position, callback);
2280
+ }
2281
+ callback_.apply(this, arguments);
2282
+ };
2283
+ }
2284
+ return fs$read.call(fs, fd, buffer, offset, length, position, callback);
2285
+ }
2286
+ if (Object.setPrototypeOf)
2287
+ Object.setPrototypeOf(read, fs$read);
2288
+ return read;
2289
+ }(fs.read);
2290
+ fs.readSync = typeof fs.readSync !== "function" ? fs.readSync : function(fs$readSync) {
2291
+ return function(fd, buffer, offset, length, position) {
2292
+ var eagCounter = 0;
2293
+ while (true) {
2294
+ try {
2295
+ return fs$readSync.call(fs, fd, buffer, offset, length, position);
2296
+ } catch (er) {
2297
+ if (er.code === "EAGAIN" && eagCounter < 10) {
2298
+ eagCounter++;
2299
+ continue;
2300
+ }
2301
+ throw er;
2302
+ }
2303
+ }
2304
+ };
2305
+ }(fs.readSync);
2306
+ function patchLchmod(fs2) {
2307
+ fs2.lchmod = function(path, mode, callback) {
2308
+ fs2.open(path, constants.O_WRONLY | constants.O_SYMLINK, mode, function(err, fd) {
2309
+ if (err) {
2310
+ if (callback)
2311
+ callback(err);
2312
+ return;
2313
+ }
2314
+ fs2.fchmod(fd, mode, function(err2) {
2315
+ fs2.close(fd, function(err22) {
2316
+ if (callback)
2317
+ callback(err2 || err22);
2318
+ });
2319
+ });
2320
+ });
2321
+ };
2322
+ fs2.lchmodSync = function(path, mode) {
2323
+ var fd = fs2.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode);
2324
+ var threw = true;
2325
+ var ret;
2326
+ try {
2327
+ ret = fs2.fchmodSync(fd, mode);
2328
+ threw = false;
2329
+ } finally {
2330
+ if (threw) {
2331
+ try {
2332
+ fs2.closeSync(fd);
2333
+ } catch (er) {
2334
+ }
2335
+ } else {
2336
+ fs2.closeSync(fd);
2337
+ }
2338
+ }
2339
+ return ret;
2340
+ };
2341
+ }
2342
+ function patchLutimes(fs2) {
2343
+ if (constants.hasOwnProperty("O_SYMLINK") && fs2.futimes) {
2344
+ fs2.lutimes = function(path, at, mt, cb) {
2345
+ fs2.open(path, constants.O_SYMLINK, function(er, fd) {
2346
+ if (er) {
2347
+ if (cb)
2348
+ cb(er);
2349
+ return;
2350
+ }
2351
+ fs2.futimes(fd, at, mt, function(er2) {
2352
+ fs2.close(fd, function(er22) {
2353
+ if (cb)
2354
+ cb(er2 || er22);
2355
+ });
2356
+ });
2357
+ });
2358
+ };
2359
+ fs2.lutimesSync = function(path, at, mt) {
2360
+ var fd = fs2.openSync(path, constants.O_SYMLINK);
2361
+ var ret;
2362
+ var threw = true;
2363
+ try {
2364
+ ret = fs2.futimesSync(fd, at, mt);
2365
+ threw = false;
2366
+ } finally {
2367
+ if (threw) {
2368
+ try {
2369
+ fs2.closeSync(fd);
2370
+ } catch (er) {
2371
+ }
2372
+ } else {
2373
+ fs2.closeSync(fd);
2374
+ }
2375
+ }
2376
+ return ret;
2377
+ };
2378
+ } else if (fs2.futimes) {
2379
+ fs2.lutimes = function(_a, _b, _c, cb) {
2380
+ if (cb)
2381
+ process.nextTick(cb);
2382
+ };
2383
+ fs2.lutimesSync = function() {
2384
+ };
2385
+ }
2386
+ }
2387
+ function chmodFix(orig) {
2388
+ if (!orig)
2389
+ return orig;
2390
+ return function(target, mode, cb) {
2391
+ return orig.call(fs, target, mode, function(er) {
2392
+ if (chownErOk(er))
2393
+ er = null;
2394
+ if (cb)
2395
+ cb.apply(this, arguments);
2396
+ });
2397
+ };
2398
+ }
2399
+ function chmodFixSync(orig) {
2400
+ if (!orig)
2401
+ return orig;
2402
+ return function(target, mode) {
2403
+ try {
2404
+ return orig.call(fs, target, mode);
2405
+ } catch (er) {
2406
+ if (!chownErOk(er))
2407
+ throw er;
2408
+ }
2409
+ };
2410
+ }
2411
+ function chownFix(orig) {
2412
+ if (!orig)
2413
+ return orig;
2414
+ return function(target, uid, gid, cb) {
2415
+ return orig.call(fs, target, uid, gid, function(er) {
2416
+ if (chownErOk(er))
2417
+ er = null;
2418
+ if (cb)
2419
+ cb.apply(this, arguments);
2420
+ });
2421
+ };
2422
+ }
2423
+ function chownFixSync(orig) {
2424
+ if (!orig)
2425
+ return orig;
2426
+ return function(target, uid, gid) {
2427
+ try {
2428
+ return orig.call(fs, target, uid, gid);
2429
+ } catch (er) {
2430
+ if (!chownErOk(er))
2431
+ throw er;
2432
+ }
2433
+ };
2434
+ }
2435
+ function statFix(orig) {
2436
+ if (!orig)
2437
+ return orig;
2438
+ return function(target, options, cb) {
2439
+ if (typeof options === "function") {
2440
+ cb = options;
2441
+ options = null;
2442
+ }
2443
+ function callback(er, stats) {
2444
+ if (stats) {
2445
+ if (stats.uid < 0)
2446
+ stats.uid += 4294967296;
2447
+ if (stats.gid < 0)
2448
+ stats.gid += 4294967296;
2449
+ }
2450
+ if (cb)
2451
+ cb.apply(this, arguments);
2452
+ }
2453
+ return options ? orig.call(fs, target, options, callback) : orig.call(fs, target, callback);
2454
+ };
2455
+ }
2456
+ function statFixSync(orig) {
2457
+ if (!orig)
2458
+ return orig;
2459
+ return function(target, options) {
2460
+ var stats = options ? orig.call(fs, target, options) : orig.call(fs, target);
2461
+ if (stats) {
2462
+ if (stats.uid < 0)
2463
+ stats.uid += 4294967296;
2464
+ if (stats.gid < 0)
2465
+ stats.gid += 4294967296;
2466
+ }
2467
+ return stats;
2468
+ };
2469
+ }
2470
+ function chownErOk(er) {
2471
+ if (!er)
2472
+ return true;
2473
+ if (er.code === "ENOSYS")
2474
+ return true;
2475
+ var nonroot = !process.getuid || process.getuid() !== 0;
2476
+ if (nonroot) {
2477
+ if (er.code === "EINVAL" || er.code === "EPERM")
2478
+ return true;
2479
+ }
2480
+ return false;
2481
+ }
2482
+ };
2483
+ var constants = __require("constants");
2484
+ var origCwd = process.cwd;
2485
+ var cwd = null;
2486
+ var platform2 = process.env.GRACEFUL_FS_PLATFORM || process.platform;
2487
+ process.cwd = function() {
2488
+ if (!cwd)
2489
+ cwd = origCwd.call(process);
2490
+ return cwd;
2491
+ };
2492
+ try {
2493
+ process.cwd();
2494
+ } catch (er) {
2495
+ }
2496
+ if (typeof process.chdir === "function") {
2497
+ chdir = process.chdir;
2498
+ process.chdir = function(d) {
2499
+ cwd = null;
2500
+ chdir.call(process, d);
2501
+ };
2502
+ if (Object.setPrototypeOf)
2503
+ Object.setPrototypeOf(process.chdir, chdir);
2504
+ }
2505
+ var chdir;
2506
+ module.exports = patch;
2507
+ });
2508
+
2509
+ // ../../../../node_modules/graceful-fs/legacy-streams.js
2510
+ var require_legacy_streams = __commonJS((exports, module) => {
2511
+ var legacy = function(fs) {
2512
+ return {
2513
+ ReadStream,
2514
+ WriteStream: WriteStream2
2515
+ };
2516
+ function ReadStream(path, options) {
2517
+ if (!(this instanceof ReadStream))
2518
+ return new ReadStream(path, options);
2519
+ Stream.call(this);
2520
+ var self = this;
2521
+ this.path = path;
2522
+ this.fd = null;
2523
+ this.readable = true;
2524
+ this.paused = false;
2525
+ this.flags = "r";
2526
+ this.mode = 438;
2527
+ this.bufferSize = 64 * 1024;
2528
+ options = options || {};
2529
+ var keys = Object.keys(options);
2530
+ for (var index = 0, length = keys.length;index < length; index++) {
2531
+ var key = keys[index];
2532
+ this[key] = options[key];
2533
+ }
2534
+ if (this.encoding)
2535
+ this.setEncoding(this.encoding);
2536
+ if (this.start !== undefined) {
2537
+ if (typeof this.start !== "number") {
2538
+ throw TypeError("start must be a Number");
2539
+ }
2540
+ if (this.end === undefined) {
2541
+ this.end = Infinity;
2542
+ } else if (typeof this.end !== "number") {
2543
+ throw TypeError("end must be a Number");
2544
+ }
2545
+ if (this.start > this.end) {
2546
+ throw new Error("start must be <= end");
2547
+ }
2548
+ this.pos = this.start;
2549
+ }
2550
+ if (this.fd !== null) {
2551
+ process.nextTick(function() {
2552
+ self._read();
2553
+ });
2554
+ return;
2555
+ }
2556
+ fs.open(this.path, this.flags, this.mode, function(err, fd) {
2557
+ if (err) {
2558
+ self.emit("error", err);
2559
+ self.readable = false;
2560
+ return;
2561
+ }
2562
+ self.fd = fd;
2563
+ self.emit("open", fd);
2564
+ self._read();
2565
+ });
2566
+ }
2567
+ function WriteStream2(path, options) {
2568
+ if (!(this instanceof WriteStream2))
2569
+ return new WriteStream2(path, options);
2570
+ Stream.call(this);
2571
+ this.path = path;
2572
+ this.fd = null;
2573
+ this.writable = true;
2574
+ this.flags = "w";
2575
+ this.encoding = "binary";
2576
+ this.mode = 438;
2577
+ this.bytesWritten = 0;
2578
+ options = options || {};
2579
+ var keys = Object.keys(options);
2580
+ for (var index = 0, length = keys.length;index < length; index++) {
2581
+ var key = keys[index];
2582
+ this[key] = options[key];
2583
+ }
2584
+ if (this.start !== undefined) {
2585
+ if (typeof this.start !== "number") {
2586
+ throw TypeError("start must be a Number");
2587
+ }
2588
+ if (this.start < 0) {
2589
+ throw new Error("start must be >= zero");
2590
+ }
2591
+ this.pos = this.start;
2592
+ }
2593
+ this.busy = false;
2594
+ this._queue = [];
2595
+ if (this.fd === null) {
2596
+ this._open = fs.open;
2597
+ this._queue.push([this._open, this.path, this.flags, this.mode, undefined]);
2598
+ this.flush();
2599
+ }
2600
+ }
2601
+ };
2602
+ var Stream = __require("stream").Stream;
2603
+ module.exports = legacy;
2604
+ });
2605
+
2606
+ // ../../../../node_modules/graceful-fs/clone.js
2607
+ var require_clone = __commonJS((exports, module) => {
2608
+ var clone = function(obj) {
2609
+ if (obj === null || typeof obj !== "object")
2610
+ return obj;
2611
+ if (obj instanceof Object)
2612
+ var copy = { __proto__: getPrototypeOf(obj) };
2613
+ else
2614
+ var copy = Object.create(null);
2615
+ Object.getOwnPropertyNames(obj).forEach(function(key) {
2616
+ Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
2617
+ });
2618
+ return copy;
2619
+ };
2620
+ module.exports = clone;
2621
+ var getPrototypeOf = Object.getPrototypeOf || function(obj) {
2622
+ return obj.__proto__;
2623
+ };
2624
+ });
2625
+
2626
+ // ../../../../node_modules/graceful-fs/graceful-fs.js
2627
+ var require_graceful_fs = __commonJS((exports, module) => {
2628
+ var noop = function() {
2629
+ };
2630
+ var publishQueue = function(context, queue4) {
2631
+ Object.defineProperty(context, gracefulQueue, {
2632
+ get: function() {
2633
+ return queue4;
2634
+ }
2635
+ });
2636
+ };
2637
+ var patch = function(fs2) {
2638
+ polyfills(fs2);
2639
+ fs2.gracefulify = patch;
2640
+ fs2.createReadStream = createReadStream;
2641
+ fs2.createWriteStream = createWriteStream;
2642
+ var fs$readFile = fs2.readFile;
2643
+ fs2.readFile = readFile;
2644
+ function readFile(path, options, cb) {
2645
+ if (typeof options === "function")
2646
+ cb = options, options = null;
2647
+ return go$readFile(path, options, cb);
2648
+ function go$readFile(path2, options2, cb2, startTime) {
2649
+ return fs$readFile(path2, options2, function(err) {
2650
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2651
+ enqueue([go$readFile, [path2, options2, cb2], err, startTime || Date.now(), Date.now()]);
2652
+ else {
2653
+ if (typeof cb2 === "function")
2654
+ cb2.apply(this, arguments);
2655
+ }
2656
+ });
2657
+ }
2658
+ }
2659
+ var fs$writeFile = fs2.writeFile;
2660
+ fs2.writeFile = writeFile;
2661
+ function writeFile(path, data, options, cb) {
2662
+ if (typeof options === "function")
2663
+ cb = options, options = null;
2664
+ return go$writeFile(path, data, options, cb);
2665
+ function go$writeFile(path2, data2, options2, cb2, startTime) {
2666
+ return fs$writeFile(path2, data2, options2, function(err) {
2667
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2668
+ enqueue([go$writeFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
2669
+ else {
2670
+ if (typeof cb2 === "function")
2671
+ cb2.apply(this, arguments);
2672
+ }
2673
+ });
2674
+ }
2675
+ }
2676
+ var fs$appendFile = fs2.appendFile;
2677
+ if (fs$appendFile)
2678
+ fs2.appendFile = appendFile;
2679
+ function appendFile(path, data, options, cb) {
2680
+ if (typeof options === "function")
2681
+ cb = options, options = null;
2682
+ return go$appendFile(path, data, options, cb);
2683
+ function go$appendFile(path2, data2, options2, cb2, startTime) {
2684
+ return fs$appendFile(path2, data2, options2, function(err) {
2685
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2686
+ enqueue([go$appendFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
2687
+ else {
2688
+ if (typeof cb2 === "function")
2689
+ cb2.apply(this, arguments);
2690
+ }
2691
+ });
2692
+ }
2693
+ }
2694
+ var fs$copyFile = fs2.copyFile;
2695
+ if (fs$copyFile)
2696
+ fs2.copyFile = copyFile;
2697
+ function copyFile(src2, dest, flags, cb) {
2698
+ if (typeof flags === "function") {
2699
+ cb = flags;
2700
+ flags = 0;
2701
+ }
2702
+ return go$copyFile(src2, dest, flags, cb);
2703
+ function go$copyFile(src3, dest2, flags2, cb2, startTime) {
2704
+ return fs$copyFile(src3, dest2, flags2, function(err) {
2705
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2706
+ enqueue([go$copyFile, [src3, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]);
2707
+ else {
2708
+ if (typeof cb2 === "function")
2709
+ cb2.apply(this, arguments);
2710
+ }
2711
+ });
2712
+ }
2713
+ }
2714
+ var fs$readdir = fs2.readdir;
2715
+ fs2.readdir = readdir;
2716
+ var noReaddirOptionVersions = /^v[0-5]\./;
2717
+ function readdir(path, options, cb) {
2718
+ if (typeof options === "function")
2719
+ cb = options, options = null;
2720
+ var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir(path2, options2, cb2, startTime) {
2721
+ return fs$readdir(path2, fs$readdirCallback(path2, options2, cb2, startTime));
2722
+ } : function go$readdir(path2, options2, cb2, startTime) {
2723
+ return fs$readdir(path2, options2, fs$readdirCallback(path2, options2, cb2, startTime));
2724
+ };
2725
+ return go$readdir(path, options, cb);
2726
+ function fs$readdirCallback(path2, options2, cb2, startTime) {
2727
+ return function(err, files) {
2728
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2729
+ enqueue([
2730
+ go$readdir,
2731
+ [path2, options2, cb2],
2732
+ err,
2733
+ startTime || Date.now(),
2734
+ Date.now()
2735
+ ]);
2736
+ else {
2737
+ if (files && files.sort)
2738
+ files.sort();
2739
+ if (typeof cb2 === "function")
2740
+ cb2.call(this, err, files);
2741
+ }
2742
+ };
2743
+ }
2744
+ }
2745
+ if (process.version.substr(0, 4) === "v0.8") {
2746
+ var legStreams = legacy(fs2);
2747
+ ReadStream = legStreams.ReadStream;
2748
+ WriteStream2 = legStreams.WriteStream;
2749
+ }
2750
+ var fs$ReadStream = fs2.ReadStream;
2751
+ if (fs$ReadStream) {
2752
+ ReadStream.prototype = Object.create(fs$ReadStream.prototype);
2753
+ ReadStream.prototype.open = ReadStream$open;
2754
+ }
2755
+ var fs$WriteStream = fs2.WriteStream;
2756
+ if (fs$WriteStream) {
2757
+ WriteStream2.prototype = Object.create(fs$WriteStream.prototype);
2758
+ WriteStream2.prototype.open = WriteStream$open;
2759
+ }
2760
+ Object.defineProperty(fs2, "ReadStream", {
2761
+ get: function() {
2762
+ return ReadStream;
2763
+ },
2764
+ set: function(val) {
2765
+ ReadStream = val;
2766
+ },
2767
+ enumerable: true,
2768
+ configurable: true
2769
+ });
2770
+ Object.defineProperty(fs2, "WriteStream", {
2771
+ get: function() {
2772
+ return WriteStream2;
2773
+ },
2774
+ set: function(val) {
2775
+ WriteStream2 = val;
2776
+ },
2777
+ enumerable: true,
2778
+ configurable: true
2779
+ });
2780
+ var FileReadStream = ReadStream;
2781
+ Object.defineProperty(fs2, "FileReadStream", {
2782
+ get: function() {
2783
+ return FileReadStream;
2784
+ },
2785
+ set: function(val) {
2786
+ FileReadStream = val;
2787
+ },
2788
+ enumerable: true,
2789
+ configurable: true
2790
+ });
2791
+ var FileWriteStream = WriteStream2;
2792
+ Object.defineProperty(fs2, "FileWriteStream", {
2793
+ get: function() {
2794
+ return FileWriteStream;
2795
+ },
2796
+ set: function(val) {
2797
+ FileWriteStream = val;
2798
+ },
2799
+ enumerable: true,
2800
+ configurable: true
2801
+ });
2802
+ function ReadStream(path, options) {
2803
+ if (this instanceof ReadStream)
2804
+ return fs$ReadStream.apply(this, arguments), this;
2805
+ else
2806
+ return ReadStream.apply(Object.create(ReadStream.prototype), arguments);
2807
+ }
2808
+ function ReadStream$open() {
2809
+ var that = this;
2810
+ open(that.path, that.flags, that.mode, function(err, fd) {
2811
+ if (err) {
2812
+ if (that.autoClose)
2813
+ that.destroy();
2814
+ that.emit("error", err);
2815
+ } else {
2816
+ that.fd = fd;
2817
+ that.emit("open", fd);
2818
+ that.read();
2819
+ }
2820
+ });
2821
+ }
2822
+ function WriteStream2(path, options) {
2823
+ if (this instanceof WriteStream2)
2824
+ return fs$WriteStream.apply(this, arguments), this;
2825
+ else
2826
+ return WriteStream2.apply(Object.create(WriteStream2.prototype), arguments);
2827
+ }
2828
+ function WriteStream$open() {
2829
+ var that = this;
2830
+ open(that.path, that.flags, that.mode, function(err, fd) {
2831
+ if (err) {
2832
+ that.destroy();
2833
+ that.emit("error", err);
2834
+ } else {
2835
+ that.fd = fd;
2836
+ that.emit("open", fd);
2837
+ }
2838
+ });
2839
+ }
2840
+ function createReadStream(path, options) {
2841
+ return new fs2.ReadStream(path, options);
2842
+ }
2843
+ function createWriteStream(path, options) {
2844
+ return new fs2.WriteStream(path, options);
2845
+ }
2846
+ var fs$open = fs2.open;
2847
+ fs2.open = open;
2848
+ function open(path, flags, mode, cb) {
2849
+ if (typeof mode === "function")
2850
+ cb = mode, mode = null;
2851
+ return go$open(path, flags, mode, cb);
2852
+ function go$open(path2, flags2, mode2, cb2, startTime) {
2853
+ return fs$open(path2, flags2, mode2, function(err, fd) {
2854
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2855
+ enqueue([go$open, [path2, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
2856
+ else {
2857
+ if (typeof cb2 === "function")
2858
+ cb2.apply(this, arguments);
2859
+ }
2860
+ });
2861
+ }
2862
+ }
2863
+ return fs2;
2864
+ };
2865
+ var enqueue = function(elem) {
2866
+ debug("ENQUEUE", elem[0].name, elem[1]);
2867
+ fs[gracefulQueue].push(elem);
2868
+ retry();
2869
+ };
2870
+ var resetQueue = function() {
2871
+ var now = Date.now();
2872
+ for (var i = 0;i < fs[gracefulQueue].length; ++i) {
2873
+ if (fs[gracefulQueue][i].length > 2) {
2874
+ fs[gracefulQueue][i][3] = now;
2875
+ fs[gracefulQueue][i][4] = now;
2876
+ }
2877
+ }
2878
+ retry();
2879
+ };
2880
+ var retry = function() {
2881
+ clearTimeout(retryTimer);
2882
+ retryTimer = undefined;
2883
+ if (fs[gracefulQueue].length === 0)
2884
+ return;
2885
+ var elem = fs[gracefulQueue].shift();
2886
+ var fn = elem[0];
2887
+ var args = elem[1];
2888
+ var err = elem[2];
2889
+ var startTime = elem[3];
2890
+ var lastTime = elem[4];
2891
+ if (startTime === undefined) {
2892
+ debug("RETRY", fn.name, args);
2893
+ fn.apply(null, args);
2894
+ } else if (Date.now() - startTime >= 60000) {
2895
+ debug("TIMEOUT", fn.name, args);
2896
+ var cb = args.pop();
2897
+ if (typeof cb === "function")
2898
+ cb.call(null, err);
2899
+ } else {
2900
+ var sinceAttempt = Date.now() - lastTime;
2901
+ var sinceStart = Math.max(lastTime - startTime, 1);
2902
+ var desiredDelay = Math.min(sinceStart * 1.2, 100);
2903
+ if (sinceAttempt >= desiredDelay) {
2904
+ debug("RETRY", fn.name, args);
2905
+ fn.apply(null, args.concat([startTime]));
2906
+ } else {
2907
+ fs[gracefulQueue].push(elem);
2908
+ }
2909
+ }
2910
+ if (retryTimer === undefined) {
2911
+ retryTimer = setTimeout(retry, 0);
2912
+ }
2913
+ };
2914
+ var fs = __require("fs");
2915
+ var polyfills = require_polyfills();
2916
+ var legacy = require_legacy_streams();
2917
+ var clone = require_clone();
2918
+ var util = __require("util");
2919
+ var gracefulQueue;
2920
+ var previousSymbol;
2921
+ if (typeof Symbol === "function" && typeof Symbol.for === "function") {
2922
+ gracefulQueue = Symbol.for("graceful-fs.queue");
2923
+ previousSymbol = Symbol.for("graceful-fs.previous");
2924
+ } else {
2925
+ gracefulQueue = "___graceful-fs.queue";
2926
+ previousSymbol = "___graceful-fs.previous";
2927
+ }
2928
+ var debug = noop;
2929
+ if (util.debuglog)
2930
+ debug = util.debuglog("gfs4");
2931
+ else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
2932
+ debug = function() {
2933
+ var m2 = util.format.apply(util, arguments);
2934
+ m2 = "GFS4: " + m2.split(/\n/).join("\nGFS4: ");
2935
+ console.error(m2);
2936
+ };
2937
+ if (!fs[gracefulQueue]) {
2938
+ queue3 = global[gracefulQueue] || [];
2939
+ publishQueue(fs, queue3);
2940
+ fs.close = function(fs$close) {
2941
+ function close(fd, cb) {
2942
+ return fs$close.call(fs, fd, function(err) {
2943
+ if (!err) {
2944
+ resetQueue();
2945
+ }
2946
+ if (typeof cb === "function")
2947
+ cb.apply(this, arguments);
2948
+ });
2949
+ }
2950
+ Object.defineProperty(close, previousSymbol, {
2951
+ value: fs$close
2952
+ });
2953
+ return close;
2954
+ }(fs.close);
2955
+ fs.closeSync = function(fs$closeSync) {
2956
+ function closeSync(fd) {
2957
+ fs$closeSync.apply(fs, arguments);
2958
+ resetQueue();
2959
+ }
2960
+ Object.defineProperty(closeSync, previousSymbol, {
2961
+ value: fs$closeSync
2962
+ });
2963
+ return closeSync;
2964
+ }(fs.closeSync);
2965
+ if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
2966
+ process.on("exit", function() {
2967
+ debug(fs[gracefulQueue]);
2968
+ __require("assert").equal(fs[gracefulQueue].length, 0);
2969
+ });
2970
+ }
2971
+ }
2972
+ var queue3;
2973
+ if (!global[gracefulQueue]) {
2974
+ publishQueue(global, fs[gracefulQueue]);
2975
+ }
2976
+ module.exports = patch(clone(fs));
2977
+ if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) {
2978
+ module.exports = patch(fs);
2979
+ fs.__patched = true;
2980
+ }
2981
+ var retryTimer;
2982
+ });
2983
+
2984
+ // ../../../../node_modules/fs-extra/lib/fs/index.js
2985
+ var require_fs = __commonJS((exports) => {
2986
+ var u = require_universalify().fromCallback;
2987
+ var fs = require_graceful_fs();
2988
+ var api2 = [
2989
+ "access",
2990
+ "appendFile",
2991
+ "chmod",
2992
+ "chown",
2993
+ "close",
2994
+ "copyFile",
2995
+ "fchmod",
2996
+ "fchown",
2997
+ "fdatasync",
2998
+ "fstat",
2999
+ "fsync",
3000
+ "ftruncate",
3001
+ "futimes",
3002
+ "lchmod",
3003
+ "lchown",
3004
+ "link",
3005
+ "lstat",
3006
+ "mkdir",
3007
+ "mkdtemp",
3008
+ "open",
3009
+ "opendir",
3010
+ "readdir",
3011
+ "readFile",
3012
+ "readlink",
3013
+ "realpath",
3014
+ "rename",
3015
+ "rm",
3016
+ "rmdir",
3017
+ "stat",
3018
+ "symlink",
3019
+ "truncate",
3020
+ "unlink",
3021
+ "utimes",
3022
+ "writeFile"
3023
+ ].filter((key) => {
3024
+ return typeof fs[key] === "function";
3025
+ });
3026
+ Object.assign(exports, fs);
3027
+ api2.forEach((method) => {
3028
+ exports[method] = u(fs[method]);
3029
+ });
3030
+ exports.exists = function(filename, callback) {
3031
+ if (typeof callback === "function") {
3032
+ return fs.exists(filename, callback);
3033
+ }
3034
+ return new Promise((resolve) => {
3035
+ return fs.exists(filename, resolve);
3036
+ });
3037
+ };
3038
+ exports.read = function(fd, buffer, offset, length, position, callback) {
3039
+ if (typeof callback === "function") {
3040
+ return fs.read(fd, buffer, offset, length, position, callback);
3041
+ }
3042
+ return new Promise((resolve, reject) => {
3043
+ fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
3044
+ if (err)
3045
+ return reject(err);
3046
+ resolve({ bytesRead, buffer: buffer2 });
3047
+ });
3048
+ });
3049
+ };
3050
+ exports.write = function(fd, buffer, ...args) {
3051
+ if (typeof args[args.length - 1] === "function") {
3052
+ return fs.write(fd, buffer, ...args);
3053
+ }
3054
+ return new Promise((resolve, reject) => {
3055
+ fs.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
3056
+ if (err)
3057
+ return reject(err);
3058
+ resolve({ bytesWritten, buffer: buffer2 });
3059
+ });
3060
+ });
3061
+ };
3062
+ exports.readv = function(fd, buffers, ...args) {
3063
+ if (typeof args[args.length - 1] === "function") {
3064
+ return fs.readv(fd, buffers, ...args);
3065
+ }
3066
+ return new Promise((resolve, reject) => {
3067
+ fs.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
3068
+ if (err)
3069
+ return reject(err);
3070
+ resolve({ bytesRead, buffers: buffers2 });
3071
+ });
3072
+ });
3073
+ };
3074
+ exports.writev = function(fd, buffers, ...args) {
3075
+ if (typeof args[args.length - 1] === "function") {
3076
+ return fs.writev(fd, buffers, ...args);
3077
+ }
3078
+ return new Promise((resolve, reject) => {
3079
+ fs.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
3080
+ if (err)
3081
+ return reject(err);
3082
+ resolve({ bytesWritten, buffers: buffers2 });
3083
+ });
3084
+ });
3085
+ };
3086
+ if (typeof fs.realpath.native === "function") {
3087
+ exports.realpath.native = u(fs.realpath.native);
3088
+ } else {
3089
+ process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?", "Warning", "fs-extra-WARN0003");
3090
+ }
3091
+ });
3092
+
3093
+ // ../../../../node_modules/fs-extra/lib/mkdirs/utils.js
3094
+ var require_utils = __commonJS((exports, module) => {
3095
+ var path = __require("path");
3096
+ exports.checkPath = function checkPath(pth) {
3097
+ if (process.platform === "win32") {
3098
+ const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ""));
3099
+ if (pathHasInvalidWinCharacters) {
3100
+ const error = new Error(`Path contains invalid characters: ${pth}`);
3101
+ error.code = "EINVAL";
3102
+ throw error;
3103
+ }
3104
+ }
3105
+ };
3106
+ });
3107
+
3108
+ // ../../../../node_modules/fs-extra/lib/mkdirs/make-dir.js
3109
+ var require_make_dir = __commonJS((exports, module) => {
3110
+ var fs = require_fs();
3111
+ var { checkPath } = require_utils();
3112
+ var getMode = (options) => {
3113
+ const defaults = { mode: 511 };
3114
+ if (typeof options === "number")
3115
+ return options;
3116
+ return { ...defaults, ...options }.mode;
3117
+ };
3118
+ exports.makeDir = async (dir, options) => {
3119
+ checkPath(dir);
3120
+ return fs.mkdir(dir, {
3121
+ mode: getMode(options),
3122
+ recursive: true
3123
+ });
3124
+ };
3125
+ exports.makeDirSync = (dir, options) => {
3126
+ checkPath(dir);
3127
+ return fs.mkdirSync(dir, {
3128
+ mode: getMode(options),
3129
+ recursive: true
3130
+ });
3131
+ };
3132
+ });
3133
+
3134
+ // ../../../../node_modules/fs-extra/lib/mkdirs/index.js
3135
+ var require_mkdirs = __commonJS((exports, module) => {
3136
+ var u = require_universalify().fromPromise;
3137
+ var { makeDir: _makeDir, makeDirSync } = require_make_dir();
3138
+ var makeDir = u(_makeDir);
3139
+ module.exports = {
3140
+ mkdirs: makeDir,
3141
+ mkdirsSync: makeDirSync,
3142
+ mkdirp: makeDir,
3143
+ mkdirpSync: makeDirSync,
3144
+ ensureDir: makeDir,
3145
+ ensureDirSync: makeDirSync
3146
+ };
3147
+ });
3148
+
3149
+ // ../../../../node_modules/fs-extra/lib/path-exists/index.js
3150
+ var require_path_exists = __commonJS((exports, module) => {
3151
+ var pathExists = function(path) {
3152
+ return fs.access(path).then(() => true).catch(() => false);
3153
+ };
3154
+ var u = require_universalify().fromPromise;
3155
+ var fs = require_fs();
3156
+ module.exports = {
3157
+ pathExists: u(pathExists),
3158
+ pathExistsSync: fs.existsSync
3159
+ };
3160
+ });
3161
+
3162
+ // ../../../../node_modules/fs-extra/lib/util/utimes.js
3163
+ var require_utimes = __commonJS((exports, module) => {
3164
+ async function utimesMillis(path, atime, mtime) {
3165
+ const fd = await fs.open(path, "r+");
3166
+ let closeErr = null;
3167
+ try {
3168
+ await fs.futimes(fd, atime, mtime);
3169
+ } finally {
3170
+ try {
3171
+ await fs.close(fd);
3172
+ } catch (e) {
3173
+ closeErr = e;
3174
+ }
3175
+ }
3176
+ if (closeErr) {
3177
+ throw closeErr;
3178
+ }
3179
+ }
3180
+ var utimesMillisSync = function(path, atime, mtime) {
3181
+ const fd = fs.openSync(path, "r+");
3182
+ fs.futimesSync(fd, atime, mtime);
3183
+ return fs.closeSync(fd);
3184
+ };
3185
+ var fs = require_fs();
3186
+ var u = require_universalify().fromPromise;
3187
+ module.exports = {
3188
+ utimesMillis: u(utimesMillis),
3189
+ utimesMillisSync
3190
+ };
3191
+ });
3192
+
3193
+ // ../../../../node_modules/fs-extra/lib/util/stat.js
3194
+ var require_stat = __commonJS((exports, module) => {
3195
+ var getStats = function(src2, dest, opts) {
3196
+ const statFunc = opts.dereference ? (file) => fs.stat(file, { bigint: true }) : (file) => fs.lstat(file, { bigint: true });
3197
+ return Promise.all([
3198
+ statFunc(src2),
3199
+ statFunc(dest).catch((err) => {
3200
+ if (err.code === "ENOENT")
3201
+ return null;
3202
+ throw err;
3203
+ })
3204
+ ]).then(([srcStat, destStat]) => ({ srcStat, destStat }));
3205
+ };
3206
+ var getStatsSync = function(src2, dest, opts) {
3207
+ let destStat;
3208
+ const statFunc = opts.dereference ? (file) => fs.statSync(file, { bigint: true }) : (file) => fs.lstatSync(file, { bigint: true });
3209
+ const srcStat = statFunc(src2);
3210
+ try {
3211
+ destStat = statFunc(dest);
3212
+ } catch (err) {
3213
+ if (err.code === "ENOENT")
3214
+ return { srcStat, destStat: null };
3215
+ throw err;
3216
+ }
3217
+ return { srcStat, destStat };
3218
+ };
3219
+ async function checkPaths(src2, dest, funcName, opts) {
3220
+ const { srcStat, destStat } = await getStats(src2, dest, opts);
3221
+ if (destStat) {
3222
+ if (areIdentical(srcStat, destStat)) {
3223
+ const srcBaseName = path.basename(src2);
3224
+ const destBaseName = path.basename(dest);
3225
+ if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
3226
+ return { srcStat, destStat, isChangingCase: true };
3227
+ }
3228
+ throw new Error("Source and destination must not be the same.");
3229
+ }
3230
+ if (srcStat.isDirectory() && !destStat.isDirectory()) {
3231
+ throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src2}'.`);
3232
+ }
3233
+ if (!srcStat.isDirectory() && destStat.isDirectory()) {
3234
+ throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src2}'.`);
3235
+ }
3236
+ }
3237
+ if (srcStat.isDirectory() && isSrcSubdir(src2, dest)) {
3238
+ throw new Error(errMsg(src2, dest, funcName));
3239
+ }
3240
+ return { srcStat, destStat };
3241
+ }
3242
+ var checkPathsSync = function(src2, dest, funcName, opts) {
3243
+ const { srcStat, destStat } = getStatsSync(src2, dest, opts);
3244
+ if (destStat) {
3245
+ if (areIdentical(srcStat, destStat)) {
3246
+ const srcBaseName = path.basename(src2);
3247
+ const destBaseName = path.basename(dest);
3248
+ if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
3249
+ return { srcStat, destStat, isChangingCase: true };
3250
+ }
3251
+ throw new Error("Source and destination must not be the same.");
3252
+ }
3253
+ if (srcStat.isDirectory() && !destStat.isDirectory()) {
3254
+ throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src2}'.`);
3255
+ }
3256
+ if (!srcStat.isDirectory() && destStat.isDirectory()) {
3257
+ throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src2}'.`);
3258
+ }
3259
+ }
3260
+ if (srcStat.isDirectory() && isSrcSubdir(src2, dest)) {
3261
+ throw new Error(errMsg(src2, dest, funcName));
3262
+ }
3263
+ return { srcStat, destStat };
3264
+ };
3265
+ async function checkParentPaths(src2, srcStat, dest, funcName) {
3266
+ const srcParent = path.resolve(path.dirname(src2));
3267
+ const destParent = path.resolve(path.dirname(dest));
3268
+ if (destParent === srcParent || destParent === path.parse(destParent).root)
3269
+ return;
3270
+ let destStat;
3271
+ try {
3272
+ destStat = await fs.stat(destParent, { bigint: true });
3273
+ } catch (err) {
3274
+ if (err.code === "ENOENT")
3275
+ return;
3276
+ throw err;
3277
+ }
3278
+ if (areIdentical(srcStat, destStat)) {
3279
+ throw new Error(errMsg(src2, dest, funcName));
3280
+ }
3281
+ return checkParentPaths(src2, srcStat, destParent, funcName);
3282
+ }
3283
+ var checkParentPathsSync = function(src2, srcStat, dest, funcName) {
3284
+ const srcParent = path.resolve(path.dirname(src2));
3285
+ const destParent = path.resolve(path.dirname(dest));
3286
+ if (destParent === srcParent || destParent === path.parse(destParent).root)
3287
+ return;
3288
+ let destStat;
3289
+ try {
3290
+ destStat = fs.statSync(destParent, { bigint: true });
3291
+ } catch (err) {
3292
+ if (err.code === "ENOENT")
3293
+ return;
3294
+ throw err;
3295
+ }
3296
+ if (areIdentical(srcStat, destStat)) {
3297
+ throw new Error(errMsg(src2, dest, funcName));
3298
+ }
3299
+ return checkParentPathsSync(src2, srcStat, destParent, funcName);
3300
+ };
3301
+ var areIdentical = function(srcStat, destStat) {
3302
+ return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
3303
+ };
3304
+ var isSrcSubdir = function(src2, dest) {
3305
+ const srcArr = path.resolve(src2).split(path.sep).filter((i) => i);
3306
+ const destArr = path.resolve(dest).split(path.sep).filter((i) => i);
3307
+ return srcArr.every((cur, i) => destArr[i] === cur);
3308
+ };
3309
+ var errMsg = function(src2, dest, funcName) {
3310
+ return `Cannot ${funcName} '${src2}' to a subdirectory of itself, '${dest}'.`;
3311
+ };
3312
+ var fs = require_fs();
3313
+ var path = __require("path");
3314
+ var u = require_universalify().fromPromise;
3315
+ module.exports = {
3316
+ checkPaths: u(checkPaths),
3317
+ checkPathsSync,
3318
+ checkParentPaths: u(checkParentPaths),
3319
+ checkParentPathsSync,
3320
+ isSrcSubdir,
3321
+ areIdentical
3322
+ };
3323
+ });
3324
+
3325
+ // ../../../../node_modules/fs-extra/lib/copy/copy.js
3326
+ var require_copy = __commonJS((exports, module) => {
3327
+ async function copy(src2, dest, opts = {}) {
3328
+ if (typeof opts === "function") {
3329
+ opts = { filter: opts };
3330
+ }
3331
+ opts.clobber = "clobber" in opts ? !!opts.clobber : true;
3332
+ opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber;
3333
+ if (opts.preserveTimestamps && process.arch === "ia32") {
3334
+ process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269", "Warning", "fs-extra-WARN0001");
3335
+ }
3336
+ const { srcStat, destStat } = await stat.checkPaths(src2, dest, "copy", opts);
3337
+ await stat.checkParentPaths(src2, srcStat, dest, "copy");
3338
+ const include = await runFilter(src2, dest, opts);
3339
+ if (!include)
3340
+ return;
3341
+ const destParent = path.dirname(dest);
3342
+ const dirExists = await pathExists(destParent);
3343
+ if (!dirExists) {
3344
+ await mkdirs(destParent);
3345
+ }
3346
+ await getStatsAndPerformCopy(destStat, src2, dest, opts);
3347
+ }
3348
+ async function runFilter(src2, dest, opts) {
3349
+ if (!opts.filter)
3350
+ return true;
3351
+ return opts.filter(src2, dest);
3352
+ }
3353
+ async function getStatsAndPerformCopy(destStat, src2, dest, opts) {
3354
+ const statFn = opts.dereference ? fs.stat : fs.lstat;
3355
+ const srcStat = await statFn(src2);
3356
+ if (srcStat.isDirectory())
3357
+ return onDir(srcStat, destStat, src2, dest, opts);
3358
+ if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice())
3359
+ return onFile(srcStat, destStat, src2, dest, opts);
3360
+ if (srcStat.isSymbolicLink())
3361
+ return onLink(destStat, src2, dest, opts);
3362
+ if (srcStat.isSocket())
3363
+ throw new Error(`Cannot copy a socket file: ${src2}`);
3364
+ if (srcStat.isFIFO())
3365
+ throw new Error(`Cannot copy a FIFO pipe: ${src2}`);
3366
+ throw new Error(`Unknown file: ${src2}`);
3367
+ }
3368
+ async function onFile(srcStat, destStat, src2, dest, opts) {
3369
+ if (!destStat)
3370
+ return copyFile(srcStat, src2, dest, opts);
3371
+ if (opts.overwrite) {
3372
+ await fs.unlink(dest);
3373
+ return copyFile(srcStat, src2, dest, opts);
3374
+ }
3375
+ if (opts.errorOnExist) {
3376
+ throw new Error(`'${dest}' already exists`);
3377
+ }
3378
+ }
3379
+ async function copyFile(srcStat, src2, dest, opts) {
3380
+ await fs.copyFile(src2, dest);
3381
+ if (opts.preserveTimestamps) {
3382
+ if (fileIsNotWritable(srcStat.mode)) {
3383
+ await makeFileWritable(dest, srcStat.mode);
3384
+ }
3385
+ const updatedSrcStat = await fs.stat(src2);
3386
+ await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
3387
+ }
3388
+ return fs.chmod(dest, srcStat.mode);
3389
+ }
3390
+ var fileIsNotWritable = function(srcMode) {
3391
+ return (srcMode & 128) === 0;
3392
+ };
3393
+ var makeFileWritable = function(dest, srcMode) {
3394
+ return fs.chmod(dest, srcMode | 128);
3395
+ };
3396
+ async function onDir(srcStat, destStat, src2, dest, opts) {
3397
+ if (!destStat) {
3398
+ await fs.mkdir(dest);
3399
+ }
3400
+ const items = await fs.readdir(src2);
3401
+ await Promise.all(items.map(async (item) => {
3402
+ const srcItem = path.join(src2, item);
3403
+ const destItem = path.join(dest, item);
3404
+ const include = await runFilter(srcItem, destItem, opts);
3405
+ if (!include)
3406
+ return;
3407
+ const { destStat: destStat2 } = await stat.checkPaths(srcItem, destItem, "copy", opts);
3408
+ return getStatsAndPerformCopy(destStat2, srcItem, destItem, opts);
3409
+ }));
3410
+ if (!destStat) {
3411
+ await fs.chmod(dest, srcStat.mode);
3412
+ }
3413
+ }
3414
+ async function onLink(destStat, src2, dest, opts) {
3415
+ let resolvedSrc = await fs.readlink(src2);
3416
+ if (opts.dereference) {
3417
+ resolvedSrc = path.resolve(process.cwd(), resolvedSrc);
3418
+ }
3419
+ if (!destStat) {
3420
+ return fs.symlink(resolvedSrc, dest);
3421
+ }
3422
+ let resolvedDest = null;
3423
+ try {
3424
+ resolvedDest = await fs.readlink(dest);
3425
+ } catch (e) {
3426
+ if (e.code === "EINVAL" || e.code === "UNKNOWN")
3427
+ return fs.symlink(resolvedSrc, dest);
3428
+ throw e;
3429
+ }
3430
+ if (opts.dereference) {
3431
+ resolvedDest = path.resolve(process.cwd(), resolvedDest);
3432
+ }
3433
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
3434
+ throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
3435
+ }
3436
+ if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
3437
+ throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
3438
+ }
3439
+ await fs.unlink(dest);
3440
+ return fs.symlink(resolvedSrc, dest);
3441
+ }
3442
+ var fs = require_fs();
3443
+ var path = __require("path");
3444
+ var { mkdirs } = require_mkdirs();
3445
+ var { pathExists } = require_path_exists();
3446
+ var { utimesMillis } = require_utimes();
3447
+ var stat = require_stat();
3448
+ module.exports = copy;
3449
+ });
3450
+
3451
+ // ../../../../node_modules/fs-extra/lib/copy/copy-sync.js
3452
+ var require_copy_sync = __commonJS((exports, module) => {
3453
+ var copySync = function(src2, dest, opts) {
3454
+ if (typeof opts === "function") {
3455
+ opts = { filter: opts };
3456
+ }
3457
+ opts = opts || {};
3458
+ opts.clobber = "clobber" in opts ? !!opts.clobber : true;
3459
+ opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber;
3460
+ if (opts.preserveTimestamps && process.arch === "ia32") {
3461
+ process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269", "Warning", "fs-extra-WARN0002");
3462
+ }
3463
+ const { srcStat, destStat } = stat.checkPathsSync(src2, dest, "copy", opts);
3464
+ stat.checkParentPathsSync(src2, srcStat, dest, "copy");
3465
+ if (opts.filter && !opts.filter(src2, dest))
3466
+ return;
3467
+ const destParent = path.dirname(dest);
3468
+ if (!fs.existsSync(destParent))
3469
+ mkdirsSync(destParent);
3470
+ return getStats(destStat, src2, dest, opts);
3471
+ };
3472
+ var getStats = function(destStat, src2, dest, opts) {
3473
+ const statSync = opts.dereference ? fs.statSync : fs.lstatSync;
3474
+ const srcStat = statSync(src2);
3475
+ if (srcStat.isDirectory())
3476
+ return onDir(srcStat, destStat, src2, dest, opts);
3477
+ else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice())
3478
+ return onFile(srcStat, destStat, src2, dest, opts);
3479
+ else if (srcStat.isSymbolicLink())
3480
+ return onLink(destStat, src2, dest, opts);
3481
+ else if (srcStat.isSocket())
3482
+ throw new Error(`Cannot copy a socket file: ${src2}`);
3483
+ else if (srcStat.isFIFO())
3484
+ throw new Error(`Cannot copy a FIFO pipe: ${src2}`);
3485
+ throw new Error(`Unknown file: ${src2}`);
3486
+ };
3487
+ var onFile = function(srcStat, destStat, src2, dest, opts) {
3488
+ if (!destStat)
3489
+ return copyFile(srcStat, src2, dest, opts);
3490
+ return mayCopyFile(srcStat, src2, dest, opts);
3491
+ };
3492
+ var mayCopyFile = function(srcStat, src2, dest, opts) {
3493
+ if (opts.overwrite) {
3494
+ fs.unlinkSync(dest);
3495
+ return copyFile(srcStat, src2, dest, opts);
3496
+ } else if (opts.errorOnExist) {
3497
+ throw new Error(`'${dest}' already exists`);
3498
+ }
3499
+ };
3500
+ var copyFile = function(srcStat, src2, dest, opts) {
3501
+ fs.copyFileSync(src2, dest);
3502
+ if (opts.preserveTimestamps)
3503
+ handleTimestamps(srcStat.mode, src2, dest);
3504
+ return setDestMode(dest, srcStat.mode);
3505
+ };
3506
+ var handleTimestamps = function(srcMode, src2, dest) {
3507
+ if (fileIsNotWritable(srcMode))
3508
+ makeFileWritable(dest, srcMode);
3509
+ return setDestTimestamps(src2, dest);
3510
+ };
3511
+ var fileIsNotWritable = function(srcMode) {
3512
+ return (srcMode & 128) === 0;
3513
+ };
3514
+ var makeFileWritable = function(dest, srcMode) {
3515
+ return setDestMode(dest, srcMode | 128);
3516
+ };
3517
+ var setDestMode = function(dest, srcMode) {
3518
+ return fs.chmodSync(dest, srcMode);
3519
+ };
3520
+ var setDestTimestamps = function(src2, dest) {
3521
+ const updatedSrcStat = fs.statSync(src2);
3522
+ return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
3523
+ };
3524
+ var onDir = function(srcStat, destStat, src2, dest, opts) {
3525
+ if (!destStat)
3526
+ return mkDirAndCopy(srcStat.mode, src2, dest, opts);
3527
+ return copyDir(src2, dest, opts);
3528
+ };
3529
+ var mkDirAndCopy = function(srcMode, src2, dest, opts) {
3530
+ fs.mkdirSync(dest);
3531
+ copyDir(src2, dest, opts);
3532
+ return setDestMode(dest, srcMode);
3533
+ };
3534
+ var copyDir = function(src2, dest, opts) {
3535
+ fs.readdirSync(src2).forEach((item) => copyDirItem(item, src2, dest, opts));
3536
+ };
3537
+ var copyDirItem = function(item, src2, dest, opts) {
3538
+ const srcItem = path.join(src2, item);
3539
+ const destItem = path.join(dest, item);
3540
+ if (opts.filter && !opts.filter(srcItem, destItem))
3541
+ return;
3542
+ const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts);
3543
+ return getStats(destStat, srcItem, destItem, opts);
3544
+ };
3545
+ var onLink = function(destStat, src2, dest, opts) {
3546
+ let resolvedSrc = fs.readlinkSync(src2);
3547
+ if (opts.dereference) {
3548
+ resolvedSrc = path.resolve(process.cwd(), resolvedSrc);
3549
+ }
3550
+ if (!destStat) {
3551
+ return fs.symlinkSync(resolvedSrc, dest);
3552
+ } else {
3553
+ let resolvedDest;
3554
+ try {
3555
+ resolvedDest = fs.readlinkSync(dest);
3556
+ } catch (err) {
3557
+ if (err.code === "EINVAL" || err.code === "UNKNOWN")
3558
+ return fs.symlinkSync(resolvedSrc, dest);
3559
+ throw err;
3560
+ }
3561
+ if (opts.dereference) {
3562
+ resolvedDest = path.resolve(process.cwd(), resolvedDest);
3563
+ }
3564
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
3565
+ throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
3566
+ }
3567
+ if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
3568
+ throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
3569
+ }
3570
+ return copyLink(resolvedSrc, dest);
3571
+ }
3572
+ };
3573
+ var copyLink = function(resolvedSrc, dest) {
3574
+ fs.unlinkSync(dest);
3575
+ return fs.symlinkSync(resolvedSrc, dest);
3576
+ };
3577
+ var fs = require_graceful_fs();
3578
+ var path = __require("path");
3579
+ var mkdirsSync = require_mkdirs().mkdirsSync;
3580
+ var utimesMillisSync = require_utimes().utimesMillisSync;
3581
+ var stat = require_stat();
3582
+ module.exports = copySync;
3583
+ });
3584
+
3585
+ // ../../../../node_modules/fs-extra/lib/copy/index.js
3586
+ var require_copy2 = __commonJS((exports, module) => {
3587
+ var u = require_universalify().fromPromise;
3588
+ module.exports = {
3589
+ copy: u(require_copy()),
3590
+ copySync: require_copy_sync()
3591
+ };
3592
+ });
3593
+
3594
+ // ../../../../node_modules/fs-extra/lib/remove/index.js
3595
+ var require_remove = __commonJS((exports, module) => {
3596
+ var remove = function(path, callback) {
3597
+ fs.rm(path, { recursive: true, force: true }, callback);
3598
+ };
3599
+ var removeSync = function(path) {
3600
+ fs.rmSync(path, { recursive: true, force: true });
3601
+ };
3602
+ var fs = require_graceful_fs();
3603
+ var u = require_universalify().fromCallback;
3604
+ module.exports = {
3605
+ remove: u(remove),
3606
+ removeSync
3607
+ };
3608
+ });
3609
+
3610
+ // ../../../../node_modules/fs-extra/lib/empty/index.js
3611
+ var require_empty = __commonJS((exports, module) => {
3612
+ var emptyDirSync = function(dir) {
3613
+ let items;
3614
+ try {
3615
+ items = fs.readdirSync(dir);
3616
+ } catch {
3617
+ return mkdir.mkdirsSync(dir);
3618
+ }
3619
+ items.forEach((item) => {
3620
+ item = path.join(dir, item);
3621
+ remove.removeSync(item);
3622
+ });
3623
+ };
3624
+ var u = require_universalify().fromPromise;
3625
+ var fs = require_fs();
3626
+ var path = __require("path");
3627
+ var mkdir = require_mkdirs();
3628
+ var remove = require_remove();
3629
+ var emptyDir = u(async function emptyDir(dir) {
3630
+ let items;
3631
+ try {
3632
+ items = await fs.readdir(dir);
3633
+ } catch {
3634
+ return mkdir.mkdirs(dir);
3635
+ }
3636
+ return Promise.all(items.map((item) => remove.remove(path.join(dir, item))));
3637
+ });
3638
+ module.exports = {
3639
+ emptyDirSync,
3640
+ emptydirSync: emptyDirSync,
3641
+ emptyDir,
3642
+ emptydir: emptyDir
3643
+ };
3644
+ });
3645
+
3646
+ // ../../../../node_modules/fs-extra/lib/ensure/file.js
3647
+ var require_file = __commonJS((exports, module) => {
3648
+ async function createFile(file) {
3649
+ let stats;
3650
+ try {
3651
+ stats = await fs.stat(file);
3652
+ } catch {
3653
+ }
3654
+ if (stats && stats.isFile())
3655
+ return;
3656
+ const dir = path.dirname(file);
3657
+ let dirStats = null;
3658
+ try {
3659
+ dirStats = await fs.stat(dir);
3660
+ } catch (err) {
3661
+ if (err.code === "ENOENT") {
3662
+ await mkdir.mkdirs(dir);
3663
+ await fs.writeFile(file, "");
3664
+ return;
3665
+ } else {
3666
+ throw err;
3667
+ }
3668
+ }
3669
+ if (dirStats.isDirectory()) {
3670
+ await fs.writeFile(file, "");
3671
+ } else {
3672
+ await fs.readdir(dir);
3673
+ }
3674
+ }
3675
+ var createFileSync = function(file) {
3676
+ let stats;
3677
+ try {
3678
+ stats = fs.statSync(file);
3679
+ } catch {
3680
+ }
3681
+ if (stats && stats.isFile())
3682
+ return;
3683
+ const dir = path.dirname(file);
3684
+ try {
3685
+ if (!fs.statSync(dir).isDirectory()) {
3686
+ fs.readdirSync(dir);
3687
+ }
3688
+ } catch (err) {
3689
+ if (err && err.code === "ENOENT")
3690
+ mkdir.mkdirsSync(dir);
3691
+ else
3692
+ throw err;
3693
+ }
3694
+ fs.writeFileSync(file, "");
3695
+ };
3696
+ var u = require_universalify().fromPromise;
3697
+ var path = __require("path");
3698
+ var fs = require_fs();
3699
+ var mkdir = require_mkdirs();
3700
+ module.exports = {
3701
+ createFile: u(createFile),
3702
+ createFileSync
3703
+ };
3704
+ });
3705
+
3706
+ // ../../../../node_modules/fs-extra/lib/ensure/link.js
3707
+ var require_link = __commonJS((exports, module) => {
3708
+ async function createLink(srcpath, dstpath) {
3709
+ let dstStat;
3710
+ try {
3711
+ dstStat = await fs.lstat(dstpath);
3712
+ } catch {
3713
+ }
3714
+ let srcStat;
3715
+ try {
3716
+ srcStat = await fs.lstat(srcpath);
3717
+ } catch (err) {
3718
+ err.message = err.message.replace("lstat", "ensureLink");
3719
+ throw err;
3720
+ }
3721
+ if (dstStat && areIdentical(srcStat, dstStat))
3722
+ return;
3723
+ const dir = path.dirname(dstpath);
3724
+ const dirExists = await pathExists(dir);
3725
+ if (!dirExists) {
3726
+ await mkdir.mkdirs(dir);
3727
+ }
3728
+ await fs.link(srcpath, dstpath);
3729
+ }
3730
+ var createLinkSync = function(srcpath, dstpath) {
3731
+ let dstStat;
3732
+ try {
3733
+ dstStat = fs.lstatSync(dstpath);
3734
+ } catch {
3735
+ }
3736
+ try {
3737
+ const srcStat = fs.lstatSync(srcpath);
3738
+ if (dstStat && areIdentical(srcStat, dstStat))
3739
+ return;
3740
+ } catch (err) {
3741
+ err.message = err.message.replace("lstat", "ensureLink");
3742
+ throw err;
3743
+ }
3744
+ const dir = path.dirname(dstpath);
3745
+ const dirExists = fs.existsSync(dir);
3746
+ if (dirExists)
3747
+ return fs.linkSync(srcpath, dstpath);
3748
+ mkdir.mkdirsSync(dir);
3749
+ return fs.linkSync(srcpath, dstpath);
3750
+ };
3751
+ var u = require_universalify().fromPromise;
3752
+ var path = __require("path");
3753
+ var fs = require_fs();
3754
+ var mkdir = require_mkdirs();
3755
+ var { pathExists } = require_path_exists();
3756
+ var { areIdentical } = require_stat();
3757
+ module.exports = {
3758
+ createLink: u(createLink),
3759
+ createLinkSync
3760
+ };
3761
+ });
3762
+
3763
+ // ../../../../node_modules/fs-extra/lib/ensure/symlink-paths.js
3764
+ var require_symlink_paths = __commonJS((exports, module) => {
3765
+ async function symlinkPaths(srcpath, dstpath) {
3766
+ if (path.isAbsolute(srcpath)) {
3767
+ try {
3768
+ await fs.lstat(srcpath);
3769
+ } catch (err) {
3770
+ err.message = err.message.replace("lstat", "ensureSymlink");
3771
+ throw err;
3772
+ }
3773
+ return {
3774
+ toCwd: srcpath,
3775
+ toDst: srcpath
3776
+ };
3777
+ }
3778
+ const dstdir = path.dirname(dstpath);
3779
+ const relativeToDst = path.join(dstdir, srcpath);
3780
+ const exists = await pathExists(relativeToDst);
3781
+ if (exists) {
3782
+ return {
3783
+ toCwd: relativeToDst,
3784
+ toDst: srcpath
3785
+ };
3786
+ }
3787
+ try {
3788
+ await fs.lstat(srcpath);
3789
+ } catch (err) {
3790
+ err.message = err.message.replace("lstat", "ensureSymlink");
3791
+ throw err;
3792
+ }
3793
+ return {
3794
+ toCwd: srcpath,
3795
+ toDst: path.relative(dstdir, srcpath)
3796
+ };
3797
+ }
3798
+ var symlinkPathsSync = function(srcpath, dstpath) {
3799
+ if (path.isAbsolute(srcpath)) {
3800
+ const exists2 = fs.existsSync(srcpath);
3801
+ if (!exists2)
3802
+ throw new Error("absolute srcpath does not exist");
3803
+ return {
3804
+ toCwd: srcpath,
3805
+ toDst: srcpath
3806
+ };
3807
+ }
3808
+ const dstdir = path.dirname(dstpath);
3809
+ const relativeToDst = path.join(dstdir, srcpath);
3810
+ const exists = fs.existsSync(relativeToDst);
3811
+ if (exists) {
3812
+ return {
3813
+ toCwd: relativeToDst,
3814
+ toDst: srcpath
3815
+ };
3816
+ }
3817
+ const srcExists = fs.existsSync(srcpath);
3818
+ if (!srcExists)
3819
+ throw new Error("relative srcpath does not exist");
3820
+ return {
3821
+ toCwd: srcpath,
3822
+ toDst: path.relative(dstdir, srcpath)
3823
+ };
3824
+ };
3825
+ var path = __require("path");
3826
+ var fs = require_fs();
3827
+ var { pathExists } = require_path_exists();
3828
+ var u = require_universalify().fromPromise;
3829
+ module.exports = {
3830
+ symlinkPaths: u(symlinkPaths),
3831
+ symlinkPathsSync
3832
+ };
3833
+ });
3834
+
3835
+ // ../../../../node_modules/fs-extra/lib/ensure/symlink-type.js
3836
+ var require_symlink_type = __commonJS((exports, module) => {
3837
+ async function symlinkType(srcpath, type) {
3838
+ if (type)
3839
+ return type;
3840
+ let stats;
3841
+ try {
3842
+ stats = await fs.lstat(srcpath);
3843
+ } catch {
3844
+ return "file";
3845
+ }
3846
+ return stats && stats.isDirectory() ? "dir" : "file";
3847
+ }
3848
+ var symlinkTypeSync = function(srcpath, type) {
3849
+ if (type)
3850
+ return type;
3851
+ let stats;
3852
+ try {
3853
+ stats = fs.lstatSync(srcpath);
3854
+ } catch {
3855
+ return "file";
3856
+ }
3857
+ return stats && stats.isDirectory() ? "dir" : "file";
3858
+ };
3859
+ var fs = require_fs();
3860
+ var u = require_universalify().fromPromise;
3861
+ module.exports = {
3862
+ symlinkType: u(symlinkType),
3863
+ symlinkTypeSync
3864
+ };
3865
+ });
3866
+
3867
+ // ../../../../node_modules/fs-extra/lib/ensure/symlink.js
3868
+ var require_symlink = __commonJS((exports, module) => {
3869
+ async function createSymlink(srcpath, dstpath, type) {
3870
+ let stats;
3871
+ try {
3872
+ stats = await fs.lstat(dstpath);
3873
+ } catch {
3874
+ }
3875
+ if (stats && stats.isSymbolicLink()) {
3876
+ const [srcStat, dstStat] = await Promise.all([
3877
+ fs.stat(srcpath),
3878
+ fs.stat(dstpath)
3879
+ ]);
3880
+ if (areIdentical(srcStat, dstStat))
3881
+ return;
3882
+ }
3883
+ const relative = await symlinkPaths(srcpath, dstpath);
3884
+ srcpath = relative.toDst;
3885
+ const toType = await symlinkType(relative.toCwd, type);
3886
+ const dir = path.dirname(dstpath);
3887
+ if (!await pathExists(dir)) {
3888
+ await mkdirs(dir);
3889
+ }
3890
+ return fs.symlink(srcpath, dstpath, toType);
3891
+ }
3892
+ var createSymlinkSync = function(srcpath, dstpath, type) {
3893
+ let stats;
3894
+ try {
3895
+ stats = fs.lstatSync(dstpath);
3896
+ } catch {
3897
+ }
3898
+ if (stats && stats.isSymbolicLink()) {
3899
+ const srcStat = fs.statSync(srcpath);
3900
+ const dstStat = fs.statSync(dstpath);
3901
+ if (areIdentical(srcStat, dstStat))
3902
+ return;
3903
+ }
3904
+ const relative = symlinkPathsSync(srcpath, dstpath);
3905
+ srcpath = relative.toDst;
3906
+ type = symlinkTypeSync(relative.toCwd, type);
3907
+ const dir = path.dirname(dstpath);
3908
+ const exists = fs.existsSync(dir);
3909
+ if (exists)
3910
+ return fs.symlinkSync(srcpath, dstpath, type);
3911
+ mkdirsSync(dir);
3912
+ return fs.symlinkSync(srcpath, dstpath, type);
3913
+ };
3914
+ var u = require_universalify().fromPromise;
3915
+ var path = __require("path");
3916
+ var fs = require_fs();
3917
+ var { mkdirs, mkdirsSync } = require_mkdirs();
3918
+ var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
3919
+ var { symlinkType, symlinkTypeSync } = require_symlink_type();
3920
+ var { pathExists } = require_path_exists();
3921
+ var { areIdentical } = require_stat();
3922
+ module.exports = {
3923
+ createSymlink: u(createSymlink),
3924
+ createSymlinkSync
3925
+ };
3926
+ });
3927
+
3928
+ // ../../../../node_modules/fs-extra/lib/ensure/index.js
3929
+ var require_ensure = __commonJS((exports, module) => {
3930
+ var { createFile, createFileSync } = require_file();
3931
+ var { createLink, createLinkSync } = require_link();
3932
+ var { createSymlink, createSymlinkSync } = require_symlink();
3933
+ module.exports = {
3934
+ createFile,
3935
+ createFileSync,
3936
+ ensureFile: createFile,
3937
+ ensureFileSync: createFileSync,
3938
+ createLink,
3939
+ createLinkSync,
3940
+ ensureLink: createLink,
3941
+ ensureLinkSync: createLinkSync,
3942
+ createSymlink,
3943
+ createSymlinkSync,
3944
+ ensureSymlink: createSymlink,
3945
+ ensureSymlinkSync: createSymlinkSync
3946
+ };
3947
+ });
3948
+
3949
+ // ../../../../node_modules/jsonfile/utils.js
3950
+ var require_utils2 = __commonJS((exports, module) => {
3951
+ var stringify = function(obj, { EOL = "\n", finalEOL = true, replacer = null, spaces } = {}) {
3952
+ const EOF = finalEOL ? EOL : "";
3953
+ const str = JSON.stringify(obj, replacer, spaces);
3954
+ return str.replace(/\n/g, EOL) + EOF;
3955
+ };
3956
+ var stripBom = function(content) {
3957
+ if (Buffer.isBuffer(content))
3958
+ content = content.toString("utf8");
3959
+ return content.replace(/^\uFEFF/, "");
3960
+ };
3961
+ module.exports = { stringify, stripBom };
3962
+ });
3963
+
3964
+ // ../../../../node_modules/jsonfile/index.js
3965
+ var require_jsonfile = __commonJS((exports, module) => {
3966
+ async function _readFile(file, options = {}) {
3967
+ if (typeof options === "string") {
3968
+ options = { encoding: options };
3969
+ }
3970
+ const fs = options.fs || _fs;
3971
+ const shouldThrow = "throws" in options ? options.throws : true;
3972
+ let data = await universalify.fromCallback(fs.readFile)(file, options);
3973
+ data = stripBom(data);
3974
+ let obj;
3975
+ try {
3976
+ obj = JSON.parse(data, options ? options.reviver : null);
3977
+ } catch (err) {
3978
+ if (shouldThrow) {
3979
+ err.message = `${file}: ${err.message}`;
3980
+ throw err;
3981
+ } else {
3982
+ return null;
3983
+ }
3984
+ }
3985
+ return obj;
3986
+ }
3987
+ var readFileSync = function(file, options = {}) {
3988
+ if (typeof options === "string") {
3989
+ options = { encoding: options };
3990
+ }
3991
+ const fs = options.fs || _fs;
3992
+ const shouldThrow = "throws" in options ? options.throws : true;
3993
+ try {
3994
+ let content = fs.readFileSync(file, options);
3995
+ content = stripBom(content);
3996
+ return JSON.parse(content, options.reviver);
3997
+ } catch (err) {
3998
+ if (shouldThrow) {
3999
+ err.message = `${file}: ${err.message}`;
4000
+ throw err;
4001
+ } else {
4002
+ return null;
4003
+ }
4004
+ }
4005
+ };
4006
+ async function _writeFile(file, obj, options = {}) {
4007
+ const fs = options.fs || _fs;
4008
+ const str = stringify(obj, options);
4009
+ await universalify.fromCallback(fs.writeFile)(file, str, options);
4010
+ }
4011
+ var writeFileSync = function(file, obj, options = {}) {
4012
+ const fs = options.fs || _fs;
4013
+ const str = stringify(obj, options);
4014
+ return fs.writeFileSync(file, str, options);
4015
+ };
4016
+ var _fs;
4017
+ try {
4018
+ _fs = require_graceful_fs();
4019
+ } catch (_2) {
4020
+ _fs = __require("fs");
4021
+ }
4022
+ var universalify = require_universalify();
4023
+ var { stringify, stripBom } = require_utils2();
4024
+ var readFile = universalify.fromPromise(_readFile);
4025
+ var writeFile = universalify.fromPromise(_writeFile);
4026
+ var jsonfile = {
4027
+ readFile,
4028
+ readFileSync,
4029
+ writeFile,
4030
+ writeFileSync
4031
+ };
4032
+ module.exports = jsonfile;
4033
+ });
4034
+
4035
+ // ../../../../node_modules/fs-extra/lib/json/jsonfile.js
4036
+ var require_jsonfile2 = __commonJS((exports, module) => {
4037
+ var jsonFile = require_jsonfile();
4038
+ module.exports = {
4039
+ readJson: jsonFile.readFile,
4040
+ readJsonSync: jsonFile.readFileSync,
4041
+ writeJson: jsonFile.writeFile,
4042
+ writeJsonSync: jsonFile.writeFileSync
4043
+ };
4044
+ });
4045
+
4046
+ // ../../../../node_modules/fs-extra/lib/output-file/index.js
4047
+ var require_output_file = __commonJS((exports, module) => {
4048
+ async function outputFile(file, data, encoding = "utf-8") {
4049
+ const dir = path.dirname(file);
4050
+ if (!await pathExists(dir)) {
4051
+ await mkdir.mkdirs(dir);
4052
+ }
4053
+ return fs.writeFile(file, data, encoding);
4054
+ }
4055
+ var outputFileSync = function(file, ...args) {
4056
+ const dir = path.dirname(file);
4057
+ if (!fs.existsSync(dir)) {
4058
+ mkdir.mkdirsSync(dir);
4059
+ }
4060
+ fs.writeFileSync(file, ...args);
4061
+ };
4062
+ var u = require_universalify().fromPromise;
4063
+ var fs = require_fs();
4064
+ var path = __require("path");
4065
+ var mkdir = require_mkdirs();
4066
+ var pathExists = require_path_exists().pathExists;
4067
+ module.exports = {
4068
+ outputFile: u(outputFile),
4069
+ outputFileSync
4070
+ };
4071
+ });
4072
+
4073
+ // ../../../../node_modules/fs-extra/lib/json/output-json.js
4074
+ var require_output_json = __commonJS((exports, module) => {
4075
+ async function outputJson(file, data, options = {}) {
4076
+ const str = stringify(data, options);
4077
+ await outputFile(file, str, options);
4078
+ }
4079
+ var { stringify } = require_utils2();
4080
+ var { outputFile } = require_output_file();
4081
+ module.exports = outputJson;
4082
+ });
4083
+
4084
+ // ../../../../node_modules/fs-extra/lib/json/output-json-sync.js
4085
+ var require_output_json_sync = __commonJS((exports, module) => {
4086
+ var outputJsonSync = function(file, data, options) {
4087
+ const str = stringify(data, options);
4088
+ outputFileSync(file, str, options);
4089
+ };
4090
+ var { stringify } = require_utils2();
4091
+ var { outputFileSync } = require_output_file();
4092
+ module.exports = outputJsonSync;
4093
+ });
4094
+
4095
+ // ../../../../node_modules/fs-extra/lib/json/index.js
4096
+ var require_json = __commonJS((exports, module) => {
4097
+ var u = require_universalify().fromPromise;
4098
+ var jsonFile = require_jsonfile2();
4099
+ jsonFile.outputJson = u(require_output_json());
4100
+ jsonFile.outputJsonSync = require_output_json_sync();
4101
+ jsonFile.outputJSON = jsonFile.outputJson;
4102
+ jsonFile.outputJSONSync = jsonFile.outputJsonSync;
4103
+ jsonFile.writeJSON = jsonFile.writeJson;
4104
+ jsonFile.writeJSONSync = jsonFile.writeJsonSync;
4105
+ jsonFile.readJSON = jsonFile.readJson;
4106
+ jsonFile.readJSONSync = jsonFile.readJsonSync;
4107
+ module.exports = jsonFile;
4108
+ });
4109
+
4110
+ // ../../../../node_modules/fs-extra/lib/move/move.js
4111
+ var require_move = __commonJS((exports, module) => {
4112
+ async function move(src2, dest, opts = {}) {
4113
+ const overwrite = opts.overwrite || opts.clobber || false;
4114
+ const { srcStat, isChangingCase = false } = await stat.checkPaths(src2, dest, "move", opts);
4115
+ await stat.checkParentPaths(src2, srcStat, dest, "move");
4116
+ const destParent = path.dirname(dest);
4117
+ const parsedParentPath = path.parse(destParent);
4118
+ if (parsedParentPath.root !== destParent) {
4119
+ await mkdirp(destParent);
4120
+ }
4121
+ return doRename(src2, dest, overwrite, isChangingCase);
4122
+ }
4123
+ async function doRename(src2, dest, overwrite, isChangingCase) {
4124
+ if (!isChangingCase) {
4125
+ if (overwrite) {
4126
+ await remove(dest);
4127
+ } else if (await pathExists(dest)) {
4128
+ throw new Error("dest already exists.");
4129
+ }
4130
+ }
4131
+ try {
4132
+ await fs.rename(src2, dest);
4133
+ } catch (err) {
4134
+ if (err.code !== "EXDEV") {
4135
+ throw err;
4136
+ }
4137
+ await moveAcrossDevice(src2, dest, overwrite);
4138
+ }
4139
+ }
4140
+ async function moveAcrossDevice(src2, dest, overwrite) {
4141
+ const opts = {
4142
+ overwrite,
4143
+ errorOnExist: true,
4144
+ preserveTimestamps: true
4145
+ };
4146
+ await copy(src2, dest, opts);
4147
+ return remove(src2);
4148
+ }
4149
+ var fs = require_fs();
4150
+ var path = __require("path");
4151
+ var { copy } = require_copy2();
4152
+ var { remove } = require_remove();
4153
+ var { mkdirp } = require_mkdirs();
4154
+ var { pathExists } = require_path_exists();
4155
+ var stat = require_stat();
4156
+ module.exports = move;
4157
+ });
4158
+
4159
+ // ../../../../node_modules/fs-extra/lib/move/move-sync.js
4160
+ var require_move_sync = __commonJS((exports, module) => {
4161
+ var moveSync = function(src2, dest, opts) {
4162
+ opts = opts || {};
4163
+ const overwrite = opts.overwrite || opts.clobber || false;
4164
+ const { srcStat, isChangingCase = false } = stat.checkPathsSync(src2, dest, "move", opts);
4165
+ stat.checkParentPathsSync(src2, srcStat, dest, "move");
4166
+ if (!isParentRoot(dest))
4167
+ mkdirpSync(path.dirname(dest));
4168
+ return doRename(src2, dest, overwrite, isChangingCase);
4169
+ };
4170
+ var isParentRoot = function(dest) {
4171
+ const parent = path.dirname(dest);
4172
+ const parsedPath = path.parse(parent);
4173
+ return parsedPath.root === parent;
4174
+ };
4175
+ var doRename = function(src2, dest, overwrite, isChangingCase) {
4176
+ if (isChangingCase)
4177
+ return rename(src2, dest, overwrite);
4178
+ if (overwrite) {
4179
+ removeSync(dest);
4180
+ return rename(src2, dest, overwrite);
4181
+ }
4182
+ if (fs.existsSync(dest))
4183
+ throw new Error("dest already exists.");
4184
+ return rename(src2, dest, overwrite);
4185
+ };
4186
+ var rename = function(src2, dest, overwrite) {
4187
+ try {
4188
+ fs.renameSync(src2, dest);
4189
+ } catch (err) {
4190
+ if (err.code !== "EXDEV")
4191
+ throw err;
4192
+ return moveAcrossDevice(src2, dest, overwrite);
4193
+ }
4194
+ };
4195
+ var moveAcrossDevice = function(src2, dest, overwrite) {
4196
+ const opts = {
4197
+ overwrite,
4198
+ errorOnExist: true,
4199
+ preserveTimestamps: true
4200
+ };
4201
+ copySync(src2, dest, opts);
4202
+ return removeSync(src2);
4203
+ };
4204
+ var fs = require_graceful_fs();
4205
+ var path = __require("path");
4206
+ var copySync = require_copy2().copySync;
4207
+ var removeSync = require_remove().removeSync;
4208
+ var mkdirpSync = require_mkdirs().mkdirpSync;
4209
+ var stat = require_stat();
4210
+ module.exports = moveSync;
4211
+ });
4212
+
4213
+ // ../../../../node_modules/fs-extra/lib/move/index.js
4214
+ var require_move2 = __commonJS((exports, module) => {
4215
+ var u = require_universalify().fromPromise;
4216
+ module.exports = {
4217
+ move: u(require_move()),
4218
+ moveSync: require_move_sync()
4219
+ };
4220
+ });
4221
+
4222
+ // ../../../../node_modules/fs-extra/lib/index.js
4223
+ var require_lib = __commonJS((exports, module) => {
4224
+ module.exports = {
4225
+ ...require_fs(),
4226
+ ...require_copy2(),
4227
+ ...require_empty(),
4228
+ ...require_ensure(),
4229
+ ...require_json(),
4230
+ ...require_mkdirs(),
4231
+ ...require_move2(),
4232
+ ...require_output_file(),
4233
+ ...require_path_exists(),
4234
+ ...require_remove()
4235
+ };
4236
+ });
18
4237
 
19
4238
  // ../../../../node_modules/neverthrow/dist/index.cjs.js
20
4239
  var require_index_cjs = __commonJS((exports) => {
21
- var __awaiter = function(thisArg, _arguments, P, generator) {
4240
+ var __awaiter = function(thisArg, _arguments, P2, generator) {
22
4241
  function adopt(value) {
23
- return value instanceof P ? value : new P(function(resolve) {
4242
+ return value instanceof P2 ? value : new P2(function(resolve) {
24
4243
  resolve(value);
25
4244
  });
26
4245
  }
27
- return new (P || (P = Promise))(function(resolve, reject) {
4246
+ return new (P2 || (P2 = Promise))(function(resolve, reject) {
28
4247
  function fulfilled(value) {
29
4248
  try {
30
4249
  step(generator.next(value));
@@ -46,9 +4265,9 @@ var require_index_cjs = __commonJS((exports) => {
46
4265
  });
47
4266
  };
48
4267
  var __values = function(o) {
49
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
50
- if (m)
51
- return m.call(o);
4268
+ var s3 = typeof Symbol === "function" && Symbol.iterator, m2 = s3 && o[s3], i = 0;
4269
+ if (m2)
4270
+ return m2.call(o);
52
4271
  if (o && typeof o.length === "number")
53
4272
  return {
54
4273
  next: function() {
@@ -57,35 +4276,35 @@ var require_index_cjs = __commonJS((exports) => {
57
4276
  return { value: o && o[i++], done: !o };
58
4277
  }
59
4278
  };
60
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
4279
+ throw new TypeError(s3 ? "Object is not iterable." : "Symbol.iterator is not defined.");
61
4280
  };
62
- var __await = function(v) {
63
- return this instanceof __await ? (this.v = v, this) : new __await(v);
4281
+ var __await = function(v2) {
4282
+ return this instanceof __await ? (this.v = v2, this) : new __await(v2);
64
4283
  };
65
4284
  var __asyncGenerator = function(thisArg, _arguments, generator) {
66
4285
  if (!Symbol.asyncIterator)
67
4286
  throw new TypeError("Symbol.asyncIterator is not defined.");
68
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
4287
+ var g2 = generator.apply(thisArg, _arguments || []), i, q2 = [];
69
4288
  return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
70
4289
  return this;
71
4290
  }, i;
72
4291
  function verb(n) {
73
- if (g[n])
74
- i[n] = function(v) {
75
- return new Promise(function(a, b) {
76
- q.push([n, v, a, b]) > 1 || resume(n, v);
4292
+ if (g2[n])
4293
+ i[n] = function(v2) {
4294
+ return new Promise(function(a, b2) {
4295
+ q2.push([n, v2, a, b2]) > 1 || resume(n, v2);
77
4296
  });
78
4297
  };
79
4298
  }
80
- function resume(n, v) {
4299
+ function resume(n, v2) {
81
4300
  try {
82
- step(g[n](v));
4301
+ step(g2[n](v2));
83
4302
  } catch (e) {
84
- settle(q[0][3], e);
4303
+ settle(q2[0][3], e);
85
4304
  }
86
4305
  }
87
- function step(r) {
88
- r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
4306
+ function step(r2) {
4307
+ r2.value instanceof __await ? Promise.resolve(r2.value.v).then(fulfill, reject) : settle(q2[0][2], r2);
89
4308
  }
90
4309
  function fulfill(value) {
91
4310
  resume("next", value);
@@ -93,48 +4312,48 @@ var require_index_cjs = __commonJS((exports) => {
93
4312
  function reject(value) {
94
4313
  resume("throw", value);
95
4314
  }
96
- function settle(f, v) {
97
- if (f(v), q.shift(), q.length)
98
- resume(q[0][0], q[0][1]);
4315
+ function settle(f2, v2) {
4316
+ if (f2(v2), q2.shift(), q2.length)
4317
+ resume(q2[0][0], q2[0][1]);
99
4318
  }
100
4319
  };
101
4320
  var __asyncDelegator = function(o) {
102
- var i, p;
4321
+ var i, p2;
103
4322
  return i = {}, verb("next"), verb("throw", function(e) {
104
4323
  throw e;
105
4324
  }), verb("return"), i[Symbol.iterator] = function() {
106
4325
  return this;
107
4326
  }, i;
108
- function verb(n, f) {
109
- i[n] = o[n] ? function(v) {
110
- return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v;
111
- } : f;
4327
+ function verb(n, f2) {
4328
+ i[n] = o[n] ? function(v2) {
4329
+ return (p2 = !p2) ? { value: __await(o[n](v2)), done: n === "return" } : f2 ? f2(v2) : v2;
4330
+ } : f2;
112
4331
  }
113
4332
  };
114
4333
  var __asyncValues = function(o) {
115
4334
  if (!Symbol.asyncIterator)
116
4335
  throw new TypeError("Symbol.asyncIterator is not defined.");
117
- var m = o[Symbol.asyncIterator], i;
118
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
4336
+ var m2 = o[Symbol.asyncIterator], i;
4337
+ return m2 ? m2.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
119
4338
  return this;
120
4339
  }, i);
121
4340
  function verb(n) {
122
- i[n] = o[n] && function(v) {
4341
+ i[n] = o[n] && function(v2) {
123
4342
  return new Promise(function(resolve, reject) {
124
- v = o[n](v), settle(resolve, reject, v.done, v.value);
4343
+ v2 = o[n](v2), settle(resolve, reject, v2.done, v2.value);
125
4344
  });
126
4345
  };
127
4346
  }
128
- function settle(resolve, reject, d, v) {
129
- Promise.resolve(v).then(function(v2) {
130
- resolve({ value: v2, done: d });
4347
+ function settle(resolve, reject, d, v2) {
4348
+ Promise.resolve(v2).then(function(v3) {
4349
+ resolve({ value: v3, done: d });
131
4350
  }, reject);
132
4351
  }
133
4352
  };
134
4353
  var safeTry = function(body) {
135
4354
  const n = body().next();
136
4355
  if (n instanceof Promise) {
137
- return n.then((r) => r.value);
4356
+ return n.then((r2) => r2.value);
138
4357
  }
139
4358
  return n.value;
140
4359
  };
@@ -156,49 +4375,60 @@ var require_index_cjs = __commonJS((exports) => {
156
4375
  constructor(res) {
157
4376
  this._promise = res;
158
4377
  }
159
- static fromSafePromise(promise) {
160
- const newPromise = promise.then((value) => new Ok(value));
4378
+ static fromSafePromise(promise2) {
4379
+ const newPromise = promise2.then((value) => new Ok(value));
161
4380
  return new ResultAsync(newPromise);
162
4381
  }
163
- static fromPromise(promise, errorFn) {
164
- const newPromise = promise.then((value) => new Ok(value)).catch((e) => new Err(errorFn(e)));
4382
+ static fromPromise(promise2, errorFn) {
4383
+ const newPromise = promise2.then((value) => new Ok(value)).catch((e) => new Err(errorFn(e)));
165
4384
  return new ResultAsync(newPromise);
166
4385
  }
4386
+ static fromThrowable(fn, errorFn) {
4387
+ return (...args) => {
4388
+ return new ResultAsync((() => __awaiter(this, undefined, undefined, function* () {
4389
+ try {
4390
+ return new Ok(yield fn(...args));
4391
+ } catch (error) {
4392
+ return new Err(errorFn ? errorFn(error) : error);
4393
+ }
4394
+ }))());
4395
+ };
4396
+ }
167
4397
  static combine(asyncResultList) {
168
4398
  return combineResultAsyncList(asyncResultList);
169
4399
  }
170
4400
  static combineWithAllErrors(asyncResultList) {
171
4401
  return combineResultAsyncListWithAllErrors(asyncResultList);
172
4402
  }
173
- map(f) {
4403
+ map(f2) {
174
4404
  return new ResultAsync(this._promise.then((res) => __awaiter(this, undefined, undefined, function* () {
175
4405
  if (res.isErr()) {
176
4406
  return new Err(res.error);
177
4407
  }
178
- return new Ok(yield f(res.value));
4408
+ return new Ok(yield f2(res.value));
179
4409
  })));
180
4410
  }
181
- mapErr(f) {
4411
+ mapErr(f2) {
182
4412
  return new ResultAsync(this._promise.then((res) => __awaiter(this, undefined, undefined, function* () {
183
4413
  if (res.isOk()) {
184
4414
  return new Ok(res.value);
185
4415
  }
186
- return new Err(yield f(res.error));
4416
+ return new Err(yield f2(res.error));
187
4417
  })));
188
4418
  }
189
- andThen(f) {
4419
+ andThen(f2) {
190
4420
  return new ResultAsync(this._promise.then((res) => {
191
4421
  if (res.isErr()) {
192
4422
  return new Err(res.error);
193
4423
  }
194
- const newValue = f(res.value);
4424
+ const newValue = f2(res.value);
195
4425
  return newValue instanceof ResultAsync ? newValue._promise : newValue;
196
4426
  }));
197
4427
  }
198
- orElse(f) {
4428
+ orElse(f2) {
199
4429
  return new ResultAsync(this._promise.then((res) => __awaiter(this, undefined, undefined, function* () {
200
4430
  if (res.isErr()) {
201
- return f(res.error);
4431
+ return f2(res.error);
202
4432
  }
203
4433
  return new Ok(res.value);
204
4434
  })));
@@ -222,6 +4452,7 @@ var require_index_cjs = __commonJS((exports) => {
222
4452
  var errAsync = (err2) => new ResultAsync(Promise.resolve(new Err(err2)));
223
4453
  var fromPromise = ResultAsync.fromPromise;
224
4454
  var fromSafePromise = ResultAsync.fromSafePromise;
4455
+ var fromAsyncThrowable = ResultAsync.fromThrowable;
225
4456
  var appendValueToEndOfList = (value) => (list) => [...list, value];
226
4457
  var combineResultList = (resultList) => resultList.reduce((acc, result) => acc.isOk() ? result.isErr() ? err(result.error) : acc.map(appendValueToEndOfList(result.value)) : acc, ok([]));
227
4458
  var combineResultAsyncList = (asyncResultList) => ResultAsync.fromSafePromise(Promise.all(asyncResultList)).andThen(combineResultList);
@@ -262,23 +4493,23 @@ var require_index_cjs = __commonJS((exports) => {
262
4493
  isErr() {
263
4494
  return !this.isOk();
264
4495
  }
265
- map(f) {
266
- return ok(f(this.value));
4496
+ map(f2) {
4497
+ return ok(f2(this.value));
267
4498
  }
268
4499
  mapErr(_f) {
269
4500
  return ok(this.value);
270
4501
  }
271
- andThen(f) {
272
- return f(this.value);
4502
+ andThen(f2) {
4503
+ return f2(this.value);
273
4504
  }
274
4505
  orElse(_f) {
275
4506
  return ok(this.value);
276
4507
  }
277
- asyncAndThen(f) {
278
- return f(this.value);
4508
+ asyncAndThen(f2) {
4509
+ return f2(this.value);
279
4510
  }
280
- asyncMap(f) {
281
- return ResultAsync.fromSafePromise(f(this.value));
4511
+ asyncMap(f2) {
4512
+ return ResultAsync.fromSafePromise(f2(this.value));
282
4513
  }
283
4514
  unwrapOr(_v) {
284
4515
  return this.value;
@@ -292,7 +4523,7 @@ var require_index_cjs = __commonJS((exports) => {
292
4523
  return value;
293
4524
  }();
294
4525
  }
295
- _unsafeUnwrap(_) {
4526
+ _unsafeUnwrap(_2) {
296
4527
  return this.value;
297
4528
  }
298
4529
  _unsafeUnwrapErr(config) {
@@ -313,14 +4544,14 @@ var require_index_cjs = __commonJS((exports) => {
313
4544
  map(_f) {
314
4545
  return err(this.error);
315
4546
  }
316
- mapErr(f) {
317
- return err(f(this.error));
4547
+ mapErr(f2) {
4548
+ return err(f2(this.error));
318
4549
  }
319
4550
  andThen(_f) {
320
4551
  return err(this.error);
321
4552
  }
322
- orElse(f) {
323
- return f(this.error);
4553
+ orElse(f2) {
4554
+ return f2(this.error);
324
4555
  }
325
4556
  asyncAndThen(_f) {
326
4557
  return errAsync(this.error);
@@ -328,8 +4559,8 @@ var require_index_cjs = __commonJS((exports) => {
328
4559
  asyncMap(_f) {
329
4560
  return errAsync(this.error);
330
4561
  }
331
- unwrapOr(v) {
332
- return v;
4562
+ unwrapOr(v2) {
4563
+ return v2;
333
4564
  }
334
4565
  match(_ok, err2) {
335
4566
  return err2(this.error);
@@ -344,7 +4575,7 @@ var require_index_cjs = __commonJS((exports) => {
344
4575
  _unsafeUnwrap(config) {
345
4576
  throw createNeverThrowError("Called `_unsafeUnwrap` on an Err", this, config);
346
4577
  }
347
- _unsafeUnwrapErr(_) {
4578
+ _unsafeUnwrapErr(_2) {
348
4579
  return this.error;
349
4580
  }
350
4581
  }
@@ -354,6 +4585,7 @@ var require_index_cjs = __commonJS((exports) => {
354
4585
  exports.ResultAsync = ResultAsync;
355
4586
  exports.err = err;
356
4587
  exports.errAsync = errAsync;
4588
+ exports.fromAsyncThrowable = fromAsyncThrowable;
357
4589
  exports.fromPromise = fromPromise;
358
4590
  exports.fromSafePromise = fromSafePromise;
359
4591
  exports.fromThrowable = fromThrowable;
@@ -363,18 +4595,113 @@ var require_index_cjs = __commonJS((exports) => {
363
4595
  });
364
4596
 
365
4597
  // src/handler.ts
366
- import {dirname, logsPath} from "@stacksjs/path";
367
- import {fs} from "@stacksjs/storage";
4598
+ import * as path from "@stacksjs/path";
4599
+ // ../types/src/cron-jobs.ts
4600
+ var Every;
4601
+ (function(Every2) {
4602
+ Every2["Minute"] = "* * * * *";
4603
+ Every2["TwoMinutes"] = "*/2 * * * *";
4604
+ Every2["FiveMinutes"] = "*/5 * * * *";
4605
+ Every2["TenMinutes"] = "*/10 * * * *";
4606
+ Every2["FifteenMinutes"] = "*/15 * * * *";
4607
+ Every2["ThirtyMinutes"] = "*/30 * * * *";
4608
+ Every2["Hour"] = "0 * * * *";
4609
+ Every2["HalfHour"] = "0,30 * * * *";
4610
+ Every2["Day"] = "0 0 * * *";
4611
+ Every2["Week"] = "0 0 * * 0";
4612
+ Every2["Weekday"] = "0 0 * * 1-5";
4613
+ Every2["Weekend"] = "0 0 * * 0,6";
4614
+ Every2["Month"] = "0 0 1 * *";
4615
+ Every2["Year"] = "0 0 1 1 *";
4616
+ })(Every || (Every = {}));
4617
+ // ../types/src/docs.ts
4618
+ var SocialLinkIcon;
4619
+ (function(SocialLinkIcon2) {
4620
+ SocialLinkIcon2["Discord"] = "discord";
4621
+ SocialLinkIcon2["Facebook"] = "facebook";
4622
+ SocialLinkIcon2["GitHub"] = "github";
4623
+ SocialLinkIcon2["Instagram"] = "instagram";
4624
+ SocialLinkIcon2["LinkedIn"] = "linkedin";
4625
+ SocialLinkIcon2["Mastodon"] = "mastodon";
4626
+ SocialLinkIcon2["Slack"] = "slack";
4627
+ SocialLinkIcon2["Twitter"] = "twitter";
4628
+ SocialLinkIcon2["YouTube"] = "youtube";
4629
+ })(SocialLinkIcon || (SocialLinkIcon = {}));
4630
+ // ../types/src/exit-code.ts
4631
+ var ExitCode;
4632
+ (function(ExitCode2) {
4633
+ ExitCode2[ExitCode2["Success"] = 0] = "Success";
4634
+ ExitCode2[ExitCode2["FatalError"] = 1] = "FatalError";
4635
+ ExitCode2[ExitCode2["InvalidArgument"] = 9] = "InvalidArgument";
4636
+ })(ExitCode || (ExitCode = {}));
4637
+ // ../../../../node_modules/consola/dist/index.mjs
4638
+ init_consola_36c0034f();
4639
+ init_core();
4640
+ init_consola_06ad8a64();
4641
+ init_utils();
4642
+ // ../strings/src/utils.ts
4643
+ var import_slugify = __toESM(require_slugify(), 1);
4644
+ // ../../../../node_modules/title-case/dist/index.js
4645
+ var WORD_SEPARATORS = new Set(["\u2014", "\u2013", "-", "\u2015", "/"]);
4646
+ var SENTENCE_TERMINATORS = new Set([".", "!", "?"]);
4647
+ var TITLE_TERMINATORS = new Set([
4648
+ ...SENTENCE_TERMINATORS,
4649
+ ":",
4650
+ '"',
4651
+ "'",
4652
+ "\u201D"
4653
+ ]);
4654
+ var SMALL_WORDS = new Set([
4655
+ "a",
4656
+ "an",
4657
+ "and",
4658
+ "as",
4659
+ "at",
4660
+ "because",
4661
+ "but",
4662
+ "by",
4663
+ "en",
4664
+ "for",
4665
+ "if",
4666
+ "in",
4667
+ "neither",
4668
+ "nor",
4669
+ "of",
4670
+ "on",
4671
+ "only",
4672
+ "or",
4673
+ "over",
4674
+ "per",
4675
+ "so",
4676
+ "some",
4677
+ "than",
4678
+ "that",
4679
+ "the",
4680
+ "to",
4681
+ "up",
4682
+ "upon",
4683
+ "v",
4684
+ "versus",
4685
+ "via",
4686
+ "vs",
4687
+ "when",
4688
+ "with",
4689
+ "without",
4690
+ "yet"
4691
+ ]);
4692
+ // ../strings/src/pluralize.ts
4693
+ var pluralize = __toESM(require_pluralize(), 1);
4694
+ // src/handler.ts
4695
+ var import_fs_extra = __toESM(require_lib(), 1);
368
4696
  function handleError(err, options) {
369
4697
  return ErrorHandler.handle(err, options);
370
4698
  }
371
4699
  var StacksError = Error;
372
4700
 
373
4701
  class ErrorHandler {
374
- static logFile = logsPath("errors.log");
375
4702
  static handle(err, options) {
376
- if (!(options instanceof Error) && options?.silent !== false)
377
- this.writeErrorToConsole(err, options);
4703
+ if (options?.silent !== false)
4704
+ this.writeErrorToConsole(err);
378
4705
  if (typeof err === "string")
379
4706
  err = new StacksError(err);
380
4707
  this.writeErrorToFile(err).catch((e) => console.error(e));
@@ -385,20 +4712,24 @@ class ErrorHandler {
385
4712
  return err;
386
4713
  }
387
4714
  static async writeErrorToFile(err) {
4715
+ if (!(err instanceof Error)) {
4716
+ console.error("Error is not an instance of Error:", err);
4717
+ return;
4718
+ }
388
4719
  const formattedError = `[${new Date().toISOString()}] ${err.name}: ${err.message}\n`;
389
- const errorsLogFilePath = logsPath("errors.log");
4720
+ const errorsLogFilePath = path.logsPath("errors.log");
390
4721
  try {
391
- await fs.mkdir(dirname(errorsLogFilePath), { recursive: true });
392
- await fs.appendFile(errorsLogFilePath, formattedError);
4722
+ await import_fs_extra.default.mkdir(path.dirname(errorsLogFilePath), { recursive: true });
4723
+ await import_fs_extra.default.appendFile(errorsLogFilePath, formattedError);
393
4724
  } catch (error) {
394
4725
  console.error("Failed to write to error file:", error);
395
4726
  }
396
4727
  }
397
- static writeErrorToConsole(err, options) {
398
- if (options)
399
- console.error(err, options);
400
- else
4728
+ static writeErrorToConsole(err) {
4729
+ if (err === "Failed to execute command: bunx biome check --apply ." || err === "Failed to execute command: bun --bun storage/framework/core/actions/src/lint/fix.ts")
401
4730
  console.error(err);
4731
+ process.exit(ExitCode.FatalError);
4732
+ console.error(err);
402
4733
  }
403
4734
  }
404
4735