create-vue 3.14.1 → 3.15.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.
Files changed (48) hide show
  1. package/LICENSE +51 -52
  2. package/README.md +11 -4
  3. package/locales/en-US.json +32 -28
  4. package/locales/fr-FR.json +31 -27
  5. package/locales/tr-TR.json +31 -27
  6. package/locales/zh-Hans.json +31 -27
  7. package/locales/zh-Hant.json +32 -32
  8. package/outfile.cjs +970 -2605
  9. package/package.json +11 -10
  10. package/template/base/package.json +2 -2
  11. package/template/config/cypress/package.json +1 -1
  12. package/template/config/cypress-ct/package.json +1 -1
  13. package/template/config/jsx/package.json +1 -1
  14. package/template/config/nightwatch/package.json +3 -3
  15. package/template/config/pinia/package.json +1 -1
  16. package/template/config/playwright/package.json +1 -1
  17. package/template/config/prettier/_gitattributes +1 -0
  18. package/template/config/prettier/_prettierrc.json +6 -0
  19. package/template/config/prettier/package.json +6 -0
  20. package/template/config/typescript/package.json +3 -3
  21. package/template/config/vitest/package.json +1 -1
  22. package/template/eslint/package.json +2 -2
  23. package/template/base/node_modules/.bin/vite +0 -17
  24. package/template/config/cypress/node_modules/.bin/cypress +0 -17
  25. package/template/config/cypress/node_modules/.bin/server-test +0 -17
  26. package/template/config/cypress/node_modules/.bin/start-server-and-test +0 -17
  27. package/template/config/cypress/node_modules/.bin/start-test +0 -17
  28. package/template/config/cypress-ct/node_modules/.bin/cypress +0 -17
  29. package/template/config/jsx/node_modules/.bin/vite +0 -17
  30. package/template/config/nightwatch/node_modules/.bin/chromedriver +0 -17
  31. package/template/config/nightwatch/node_modules/.bin/geckodriver +0 -17
  32. package/template/config/nightwatch/node_modules/.bin/nightwatch +0 -17
  33. package/template/config/nightwatch/node_modules/.bin/ts-node +0 -17
  34. package/template/config/nightwatch/node_modules/.bin/ts-node-cwd +0 -17
  35. package/template/config/nightwatch/node_modules/.bin/ts-node-esm +0 -17
  36. package/template/config/nightwatch/node_modules/.bin/ts-node-script +0 -17
  37. package/template/config/nightwatch/node_modules/.bin/ts-node-transpile-only +0 -17
  38. package/template/config/nightwatch/node_modules/.bin/ts-script +0 -17
  39. package/template/config/nightwatch/node_modules/.bin/vite +0 -17
  40. package/template/config/playwright/node_modules/.bin/playwright +0 -17
  41. package/template/config/typescript/node_modules/.bin/npm-run-all +0 -17
  42. package/template/config/typescript/node_modules/.bin/npm-run-all2 +0 -17
  43. package/template/config/typescript/node_modules/.bin/run-p +0 -17
  44. package/template/config/typescript/node_modules/.bin/run-s +0 -17
  45. package/template/config/typescript/node_modules/.bin/tsc +0 -17
  46. package/template/config/typescript/node_modules/.bin/tsserver +0 -17
  47. package/template/config/typescript/node_modules/.bin/vue-tsc +0 -17
  48. package/template/config/vitest/node_modules/.bin/vitest +0 -17
package/outfile.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- /*! create-vue v3.14.1 | MIT */
2
+ /*! create-vue v3.15.0 | MIT */
3
3
  var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -26,2302 +26,131 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
 
29
- // node_modules/.pnpm/kleur@3.0.3/node_modules/kleur/index.js
30
- var require_kleur = __commonJS({
31
- "node_modules/.pnpm/kleur@3.0.3/node_modules/kleur/index.js"(exports2, module2) {
32
- "use strict";
33
- var { FORCE_COLOR: FORCE_COLOR2, NODE_DISABLE_COLORS: NODE_DISABLE_COLORS2, TERM: TERM2 } = process.env;
34
- var $2 = {
35
- enabled: !NODE_DISABLE_COLORS2 && TERM2 !== "dumb" && FORCE_COLOR2 !== "0",
36
- // modifiers
37
- reset: init3(0, 0),
38
- bold: init3(1, 22),
39
- dim: init3(2, 22),
40
- italic: init3(3, 23),
41
- underline: init3(4, 24),
42
- inverse: init3(7, 27),
43
- hidden: init3(8, 28),
44
- strikethrough: init3(9, 29),
45
- // colors
46
- black: init3(30, 39),
47
- red: init3(31, 39),
48
- green: init3(32, 39),
49
- yellow: init3(33, 39),
50
- blue: init3(34, 39),
51
- magenta: init3(35, 39),
52
- cyan: init3(36, 39),
53
- white: init3(37, 39),
54
- gray: init3(90, 39),
55
- grey: init3(90, 39),
56
- // background colors
57
- bgBlack: init3(40, 49),
58
- bgRed: init3(41, 49),
59
- bgGreen: init3(42, 49),
60
- bgYellow: init3(43, 49),
61
- bgBlue: init3(44, 49),
62
- bgMagenta: init3(45, 49),
63
- bgCyan: init3(46, 49),
64
- bgWhite: init3(47, 49)
65
- };
66
- function run(arr, str) {
67
- let i = 0, tmp, beg = "", end = "";
68
- for (; i < arr.length; i++) {
69
- tmp = arr[i];
70
- beg += tmp.open;
71
- end += tmp.close;
72
- if (str.includes(tmp.close)) {
73
- str = str.replace(tmp.rgx, tmp.close + tmp.open);
74
- }
75
- }
76
- return beg + str + end;
77
- }
78
- function chain(has, keys) {
79
- let ctx = { has, keys };
80
- ctx.reset = $2.reset.bind(ctx);
81
- ctx.bold = $2.bold.bind(ctx);
82
- ctx.dim = $2.dim.bind(ctx);
83
- ctx.italic = $2.italic.bind(ctx);
84
- ctx.underline = $2.underline.bind(ctx);
85
- ctx.inverse = $2.inverse.bind(ctx);
86
- ctx.hidden = $2.hidden.bind(ctx);
87
- ctx.strikethrough = $2.strikethrough.bind(ctx);
88
- ctx.black = $2.black.bind(ctx);
89
- ctx.red = $2.red.bind(ctx);
90
- ctx.green = $2.green.bind(ctx);
91
- ctx.yellow = $2.yellow.bind(ctx);
92
- ctx.blue = $2.blue.bind(ctx);
93
- ctx.magenta = $2.magenta.bind(ctx);
94
- ctx.cyan = $2.cyan.bind(ctx);
95
- ctx.white = $2.white.bind(ctx);
96
- ctx.gray = $2.gray.bind(ctx);
97
- ctx.grey = $2.grey.bind(ctx);
98
- ctx.bgBlack = $2.bgBlack.bind(ctx);
99
- ctx.bgRed = $2.bgRed.bind(ctx);
100
- ctx.bgGreen = $2.bgGreen.bind(ctx);
101
- ctx.bgYellow = $2.bgYellow.bind(ctx);
102
- ctx.bgBlue = $2.bgBlue.bind(ctx);
103
- ctx.bgMagenta = $2.bgMagenta.bind(ctx);
104
- ctx.bgCyan = $2.bgCyan.bind(ctx);
105
- ctx.bgWhite = $2.bgWhite.bind(ctx);
106
- return ctx;
107
- }
108
- function init3(open, close) {
109
- let blk = {
110
- open: `\x1B[${open}m`,
111
- close: `\x1B[${close}m`,
112
- rgx: new RegExp(`\\x1b\\[${close}m`, "g")
113
- };
114
- return function(txt) {
115
- if (this !== void 0 && this.has !== void 0) {
116
- this.has.includes(open) || (this.has.push(open), this.keys.push(blk));
117
- return txt === void 0 ? this : $2.enabled ? run(this.keys, txt + "") : txt + "";
118
- }
119
- return txt === void 0 ? chain([open], [blk]) : $2.enabled ? run([blk], txt + "") : txt + "";
120
- };
121
- }
122
- module2.exports = $2;
123
- }
124
- });
125
-
126
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/action.js
127
- var require_action = __commonJS({
128
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/action.js"(exports2, module2) {
129
- "use strict";
130
- module2.exports = (key, isSelect) => {
131
- if (key.meta && key.name !== "escape") return;
132
- if (key.ctrl) {
133
- if (key.name === "a") return "first";
134
- if (key.name === "c") return "abort";
135
- if (key.name === "d") return "abort";
136
- if (key.name === "e") return "last";
137
- if (key.name === "g") return "reset";
138
- }
139
- if (isSelect) {
140
- if (key.name === "j") return "down";
141
- if (key.name === "k") return "up";
142
- }
143
- if (key.name === "return") return "submit";
144
- if (key.name === "enter") return "submit";
145
- if (key.name === "backspace") return "delete";
146
- if (key.name === "delete") return "deleteForward";
147
- if (key.name === "abort") return "abort";
148
- if (key.name === "escape") return "exit";
149
- if (key.name === "tab") return "next";
150
- if (key.name === "pagedown") return "nextPage";
151
- if (key.name === "pageup") return "prevPage";
152
- if (key.name === "home") return "home";
153
- if (key.name === "end") return "end";
154
- if (key.name === "up") return "up";
155
- if (key.name === "down") return "down";
156
- if (key.name === "right") return "right";
157
- if (key.name === "left") return "left";
158
- return false;
159
- };
160
- }
161
- });
162
-
163
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/strip.js
164
- var require_strip = __commonJS({
165
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/strip.js"(exports2, module2) {
166
- "use strict";
167
- module2.exports = (str) => {
168
- const pattern = [
169
- "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
170
- "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"
171
- ].join("|");
172
- const RGX = new RegExp(pattern, "g");
173
- return typeof str === "string" ? str.replace(RGX, "") : str;
174
- };
175
- }
176
- });
177
-
178
- // node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
179
- var require_src = __commonJS({
180
- "node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports2, module2) {
181
- "use strict";
182
- var ESC = "\x1B";
183
- var CSI = `${ESC}[`;
184
- var beep = "\x07";
185
- var cursor = {
186
- to(x, y) {
187
- if (!y) return `${CSI}${x + 1}G`;
188
- return `${CSI}${y + 1};${x + 1}H`;
189
- },
190
- move(x, y) {
191
- let ret = "";
192
- if (x < 0) ret += `${CSI}${-x}D`;
193
- else if (x > 0) ret += `${CSI}${x}C`;
194
- if (y < 0) ret += `${CSI}${-y}A`;
195
- else if (y > 0) ret += `${CSI}${y}B`;
196
- return ret;
197
- },
198
- up: (count = 1) => `${CSI}${count}A`,
199
- down: (count = 1) => `${CSI}${count}B`,
200
- forward: (count = 1) => `${CSI}${count}C`,
201
- backward: (count = 1) => `${CSI}${count}D`,
202
- nextLine: (count = 1) => `${CSI}E`.repeat(count),
203
- prevLine: (count = 1) => `${CSI}F`.repeat(count),
204
- left: `${CSI}G`,
205
- hide: `${CSI}?25l`,
206
- show: `${CSI}?25h`,
207
- save: `${ESC}7`,
208
- restore: `${ESC}8`
209
- };
210
- var scroll = {
211
- up: (count = 1) => `${CSI}S`.repeat(count),
212
- down: (count = 1) => `${CSI}T`.repeat(count)
213
- };
214
- var erase = {
215
- screen: `${CSI}2J`,
216
- up: (count = 1) => `${CSI}1J`.repeat(count),
217
- down: (count = 1) => `${CSI}J`.repeat(count),
218
- line: `${CSI}2K`,
219
- lineEnd: `${CSI}K`,
220
- lineStart: `${CSI}1K`,
221
- lines(count) {
222
- let clear = "";
223
- for (let i = 0; i < count; i++)
224
- clear += this.line + (i < count - 1 ? cursor.up() : "");
225
- if (count)
226
- clear += cursor.left;
227
- return clear;
228
- }
229
- };
230
- module2.exports = { cursor, scroll, erase, beep };
231
- }
232
- });
233
-
234
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/clear.js
235
- var require_clear = __commonJS({
236
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/clear.js"(exports2, module2) {
237
- "use strict";
238
- var strip = require_strip();
239
- var { erase, cursor } = require_src();
240
- var width = (str) => [...strip(str)].length;
241
- module2.exports = function(prompt, perLine) {
242
- if (!perLine) return erase.line + cursor.to(0);
243
- let rows = 0;
244
- const lines = prompt.split(/\r?\n/);
245
- for (let line of lines) {
246
- rows += 1 + Math.floor(Math.max(width(line) - 1, 0) / perLine);
247
- }
248
- return erase.lines(rows);
249
- };
250
- }
251
- });
252
-
253
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/figures.js
254
- var require_figures = __commonJS({
255
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/figures.js"(exports2, module2) {
256
- "use strict";
257
- var main = {
258
- arrowUp: "\u2191",
259
- arrowDown: "\u2193",
260
- arrowLeft: "\u2190",
261
- arrowRight: "\u2192",
262
- radioOn: "\u25C9",
263
- radioOff: "\u25EF",
264
- tick: "\u2714",
265
- cross: "\u2716",
266
- ellipsis: "\u2026",
267
- pointerSmall: "\u203A",
268
- line: "\u2500",
269
- pointer: "\u276F"
270
- };
271
- var win = {
272
- arrowUp: main.arrowUp,
273
- arrowDown: main.arrowDown,
274
- arrowLeft: main.arrowLeft,
275
- arrowRight: main.arrowRight,
276
- radioOn: "(*)",
277
- radioOff: "( )",
278
- tick: "\u221A",
279
- cross: "\xD7",
280
- ellipsis: "...",
281
- pointerSmall: "\xBB",
282
- line: "\u2500",
283
- pointer: ">"
284
- };
285
- var figures = process.platform === "win32" ? win : main;
286
- module2.exports = figures;
287
- }
288
- });
289
-
290
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/style.js
291
- var require_style = __commonJS({
292
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/style.js"(exports2, module2) {
293
- "use strict";
294
- var c = require_kleur();
295
- var figures = require_figures();
296
- var styles = Object.freeze({
297
- password: { scale: 1, render: (input) => "*".repeat(input.length) },
298
- emoji: { scale: 2, render: (input) => "\u{1F603}".repeat(input.length) },
299
- invisible: { scale: 0, render: (input) => "" },
300
- default: { scale: 1, render: (input) => `${input}` }
301
- });
302
- var render = (type) => styles[type] || styles.default;
303
- var symbols = Object.freeze({
304
- aborted: c.red(figures.cross),
305
- done: c.green(figures.tick),
306
- exited: c.yellow(figures.cross),
307
- default: c.cyan("?")
308
- });
309
- var symbol = (done, aborted, exited) => aborted ? symbols.aborted : exited ? symbols.exited : done ? symbols.done : symbols.default;
310
- var delimiter = (completing) => c.gray(completing ? figures.ellipsis : figures.pointerSmall);
311
- var item = (expandable, expanded) => c.gray(expandable ? expanded ? figures.pointerSmall : "+" : figures.line);
312
- module2.exports = {
313
- styles,
314
- render,
315
- symbols,
316
- symbol,
317
- delimiter,
318
- item
319
- };
320
- }
321
- });
322
-
323
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/lines.js
324
- var require_lines = __commonJS({
325
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/lines.js"(exports2, module2) {
326
- "use strict";
327
- var strip = require_strip();
328
- module2.exports = function(msg, perLine) {
329
- let lines = String(strip(msg) || "").split(/\r?\n/);
330
- if (!perLine) return lines.length;
331
- return lines.map((l) => Math.ceil(l.length / perLine)).reduce((a, b) => a + b);
332
- };
333
- }
334
- });
335
-
336
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/wrap.js
337
- var require_wrap = __commonJS({
338
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/wrap.js"(exports2, module2) {
339
- "use strict";
340
- module2.exports = (msg, opts = {}) => {
341
- const tab = Number.isSafeInteger(parseInt(opts.margin)) ? new Array(parseInt(opts.margin)).fill(" ").join("") : opts.margin || "";
342
- const width = opts.width;
343
- return (msg || "").split(/\r?\n/g).map((line) => line.split(/\s+/g).reduce((arr, w) => {
344
- if (w.length + tab.length >= width || arr[arr.length - 1].length + w.length + 1 < width)
345
- arr[arr.length - 1] += ` ${w}`;
346
- else arr.push(`${tab}${w}`);
347
- return arr;
348
- }, [tab]).join("\n")).join("\n");
349
- };
350
- }
351
- });
352
-
353
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/entriesToDisplay.js
354
- var require_entriesToDisplay = __commonJS({
355
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/entriesToDisplay.js"(exports2, module2) {
356
- "use strict";
357
- module2.exports = (cursor, total, maxVisible) => {
358
- maxVisible = maxVisible || total;
359
- let startIndex = Math.min(total - maxVisible, cursor - Math.floor(maxVisible / 2));
360
- if (startIndex < 0) startIndex = 0;
361
- let endIndex = Math.min(startIndex + maxVisible, total);
362
- return { startIndex, endIndex };
363
- };
364
- }
365
- });
366
-
367
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/index.js
368
- var require_util = __commonJS({
369
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/index.js"(exports2, module2) {
370
- "use strict";
371
- module2.exports = {
372
- action: require_action(),
373
- clear: require_clear(),
374
- style: require_style(),
375
- strip: require_strip(),
376
- figures: require_figures(),
377
- lines: require_lines(),
378
- wrap: require_wrap(),
379
- entriesToDisplay: require_entriesToDisplay()
380
- };
381
- }
382
- });
383
-
384
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/prompt.js
385
- var require_prompt = __commonJS({
386
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/prompt.js"(exports2, module2) {
387
- "use strict";
388
- var readline = require("readline");
389
- var { action } = require_util();
390
- var EventEmitter = require("events");
391
- var { beep, cursor } = require_src();
392
- var color = require_kleur();
393
- var Prompt = class extends EventEmitter {
394
- constructor(opts = {}) {
395
- super();
396
- this.firstRender = true;
397
- this.in = opts.stdin || process.stdin;
398
- this.out = opts.stdout || process.stdout;
399
- this.onRender = (opts.onRender || (() => void 0)).bind(this);
400
- const rl = readline.createInterface({ input: this.in, escapeCodeTimeout: 50 });
401
- readline.emitKeypressEvents(this.in, rl);
402
- if (this.in.isTTY) this.in.setRawMode(true);
403
- const isSelect = ["SelectPrompt", "MultiselectPrompt"].indexOf(this.constructor.name) > -1;
404
- const keypress = (str, key) => {
405
- let a = action(key, isSelect);
406
- if (a === false) {
407
- this._ && this._(str, key);
408
- } else if (typeof this[a] === "function") {
409
- this[a](key);
410
- } else {
411
- this.bell();
412
- }
413
- };
414
- this.close = () => {
415
- this.out.write(cursor.show);
416
- this.in.removeListener("keypress", keypress);
417
- if (this.in.isTTY) this.in.setRawMode(false);
418
- rl.close();
419
- this.emit(this.aborted ? "abort" : this.exited ? "exit" : "submit", this.value);
420
- this.closed = true;
421
- };
422
- this.in.on("keypress", keypress);
423
- }
424
- fire() {
425
- this.emit("state", {
426
- value: this.value,
427
- aborted: !!this.aborted,
428
- exited: !!this.exited
429
- });
430
- }
431
- bell() {
432
- this.out.write(beep);
433
- }
434
- render() {
435
- this.onRender(color);
436
- if (this.firstRender) this.firstRender = false;
437
- }
438
- };
439
- module2.exports = Prompt;
440
- }
441
- });
442
-
443
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/text.js
444
- var require_text = __commonJS({
445
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/text.js"(exports2, module2) {
446
- var color = require_kleur();
447
- var Prompt = require_prompt();
448
- var { erase, cursor } = require_src();
449
- var { style, clear, lines, figures } = require_util();
450
- var TextPrompt = class extends Prompt {
451
- constructor(opts = {}) {
452
- super(opts);
453
- this.transform = style.render(opts.style);
454
- this.scale = this.transform.scale;
455
- this.msg = opts.message;
456
- this.initial = opts.initial || ``;
457
- this.validator = opts.validate || (() => true);
458
- this.value = ``;
459
- this.errorMsg = opts.error || `Please Enter A Valid Value`;
460
- this.cursor = Number(!!this.initial);
461
- this.cursorOffset = 0;
462
- this.clear = clear(``, this.out.columns);
463
- this.render();
464
- }
465
- set value(v) {
466
- if (!v && this.initial) {
467
- this.placeholder = true;
468
- this.rendered = color.gray(this.transform.render(this.initial));
469
- } else {
470
- this.placeholder = false;
471
- this.rendered = this.transform.render(v);
472
- }
473
- this._value = v;
474
- this.fire();
475
- }
476
- get value() {
477
- return this._value;
478
- }
479
- reset() {
480
- this.value = ``;
481
- this.cursor = Number(!!this.initial);
482
- this.cursorOffset = 0;
483
- this.fire();
484
- this.render();
485
- }
486
- exit() {
487
- this.abort();
488
- }
489
- abort() {
490
- this.value = this.value || this.initial;
491
- this.done = this.aborted = true;
492
- this.error = false;
493
- this.red = false;
494
- this.fire();
495
- this.render();
496
- this.out.write("\n");
497
- this.close();
498
- }
499
- async validate() {
500
- let valid = await this.validator(this.value);
501
- if (typeof valid === `string`) {
502
- this.errorMsg = valid;
503
- valid = false;
504
- }
505
- this.error = !valid;
506
- }
507
- async submit() {
508
- this.value = this.value || this.initial;
509
- this.cursorOffset = 0;
510
- this.cursor = this.rendered.length;
511
- await this.validate();
512
- if (this.error) {
513
- this.red = true;
514
- this.fire();
515
- this.render();
516
- return;
517
- }
518
- this.done = true;
519
- this.aborted = false;
520
- this.fire();
521
- this.render();
522
- this.out.write("\n");
523
- this.close();
524
- }
525
- next() {
526
- if (!this.placeholder) return this.bell();
527
- this.value = this.initial;
528
- this.cursor = this.rendered.length;
529
- this.fire();
530
- this.render();
531
- }
532
- moveCursor(n) {
533
- if (this.placeholder) return;
534
- this.cursor = this.cursor + n;
535
- this.cursorOffset += n;
536
- }
537
- _(c, key) {
538
- let s1 = this.value.slice(0, this.cursor);
539
- let s2 = this.value.slice(this.cursor);
540
- this.value = `${s1}${c}${s2}`;
541
- this.red = false;
542
- this.cursor = this.placeholder ? 0 : s1.length + 1;
543
- this.render();
544
- }
545
- delete() {
546
- if (this.isCursorAtStart()) return this.bell();
547
- let s1 = this.value.slice(0, this.cursor - 1);
548
- let s2 = this.value.slice(this.cursor);
549
- this.value = `${s1}${s2}`;
550
- this.red = false;
551
- if (this.isCursorAtStart()) {
552
- this.cursorOffset = 0;
553
- } else {
554
- this.cursorOffset++;
555
- this.moveCursor(-1);
556
- }
557
- this.render();
558
- }
559
- deleteForward() {
560
- if (this.cursor * this.scale >= this.rendered.length || this.placeholder) return this.bell();
561
- let s1 = this.value.slice(0, this.cursor);
562
- let s2 = this.value.slice(this.cursor + 1);
563
- this.value = `${s1}${s2}`;
564
- this.red = false;
565
- if (this.isCursorAtEnd()) {
566
- this.cursorOffset = 0;
567
- } else {
568
- this.cursorOffset++;
569
- }
570
- this.render();
571
- }
572
- first() {
573
- this.cursor = 0;
574
- this.render();
575
- }
576
- last() {
577
- this.cursor = this.value.length;
578
- this.render();
579
- }
580
- left() {
581
- if (this.cursor <= 0 || this.placeholder) return this.bell();
582
- this.moveCursor(-1);
583
- this.render();
584
- }
585
- right() {
586
- if (this.cursor * this.scale >= this.rendered.length || this.placeholder) return this.bell();
587
- this.moveCursor(1);
588
- this.render();
589
- }
590
- isCursorAtStart() {
591
- return this.cursor === 0 || this.placeholder && this.cursor === 1;
592
- }
593
- isCursorAtEnd() {
594
- return this.cursor === this.rendered.length || this.placeholder && this.cursor === this.rendered.length + 1;
595
- }
596
- render() {
597
- if (this.closed) return;
598
- if (!this.firstRender) {
599
- if (this.outputError)
600
- this.out.write(cursor.down(lines(this.outputError, this.out.columns) - 1) + clear(this.outputError, this.out.columns));
601
- this.out.write(clear(this.outputText, this.out.columns));
602
- }
603
- super.render();
604
- this.outputError = "";
605
- this.outputText = [
606
- style.symbol(this.done, this.aborted),
607
- color.bold(this.msg),
608
- style.delimiter(this.done),
609
- this.red ? color.red(this.rendered) : this.rendered
610
- ].join(` `);
611
- if (this.error) {
612
- this.outputError += this.errorMsg.split(`
613
- `).reduce((a, l, i) => a + `
614
- ${i ? " " : figures.pointerSmall} ${color.red().italic(l)}`, ``);
615
- }
616
- this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore + cursor.move(this.cursorOffset, 0));
617
- }
618
- };
619
- module2.exports = TextPrompt;
620
- }
621
- });
622
-
623
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/select.js
624
- var require_select = __commonJS({
625
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/select.js"(exports2, module2) {
626
- "use strict";
627
- var color = require_kleur();
628
- var Prompt = require_prompt();
629
- var { style, clear, figures, wrap, entriesToDisplay } = require_util();
630
- var { cursor } = require_src();
631
- var SelectPrompt = class extends Prompt {
632
- constructor(opts = {}) {
633
- super(opts);
634
- this.msg = opts.message;
635
- this.hint = opts.hint || "- Use arrow-keys. Return to submit.";
636
- this.warn = opts.warn || "- This option is disabled";
637
- this.cursor = opts.initial || 0;
638
- this.choices = opts.choices.map((ch, idx) => {
639
- if (typeof ch === "string")
640
- ch = { title: ch, value: idx };
641
- return {
642
- title: ch && (ch.title || ch.value || ch),
643
- value: ch && (ch.value === void 0 ? idx : ch.value),
644
- description: ch && ch.description,
645
- selected: ch && ch.selected,
646
- disabled: ch && ch.disabled
647
- };
648
- });
649
- this.optionsPerPage = opts.optionsPerPage || 10;
650
- this.value = (this.choices[this.cursor] || {}).value;
651
- this.clear = clear("", this.out.columns);
652
- this.render();
653
- }
654
- moveCursor(n) {
655
- this.cursor = n;
656
- this.value = this.choices[n].value;
657
- this.fire();
658
- }
659
- reset() {
660
- this.moveCursor(0);
661
- this.fire();
662
- this.render();
663
- }
664
- exit() {
665
- this.abort();
666
- }
667
- abort() {
668
- this.done = this.aborted = true;
669
- this.fire();
670
- this.render();
671
- this.out.write("\n");
672
- this.close();
673
- }
674
- submit() {
675
- if (!this.selection.disabled) {
676
- this.done = true;
677
- this.aborted = false;
678
- this.fire();
679
- this.render();
680
- this.out.write("\n");
681
- this.close();
682
- } else
683
- this.bell();
684
- }
685
- first() {
686
- this.moveCursor(0);
687
- this.render();
688
- }
689
- last() {
690
- this.moveCursor(this.choices.length - 1);
691
- this.render();
692
- }
693
- up() {
694
- if (this.cursor === 0) {
695
- this.moveCursor(this.choices.length - 1);
696
- } else {
697
- this.moveCursor(this.cursor - 1);
698
- }
699
- this.render();
700
- }
701
- down() {
702
- if (this.cursor === this.choices.length - 1) {
703
- this.moveCursor(0);
704
- } else {
705
- this.moveCursor(this.cursor + 1);
706
- }
707
- this.render();
708
- }
709
- next() {
710
- this.moveCursor((this.cursor + 1) % this.choices.length);
711
- this.render();
712
- }
713
- _(c, key) {
714
- if (c === " ") return this.submit();
715
- }
716
- get selection() {
717
- return this.choices[this.cursor];
718
- }
719
- render() {
720
- if (this.closed) return;
721
- if (this.firstRender) this.out.write(cursor.hide);
722
- else this.out.write(clear(this.outputText, this.out.columns));
723
- super.render();
724
- let { startIndex, endIndex } = entriesToDisplay(this.cursor, this.choices.length, this.optionsPerPage);
725
- this.outputText = [
726
- style.symbol(this.done, this.aborted),
727
- color.bold(this.msg),
728
- style.delimiter(false),
729
- this.done ? this.selection.title : this.selection.disabled ? color.yellow(this.warn) : color.gray(this.hint)
730
- ].join(" ");
731
- if (!this.done) {
732
- this.outputText += "\n";
733
- for (let i = startIndex; i < endIndex; i++) {
734
- let title, prefix, desc = "", v = this.choices[i];
735
- if (i === startIndex && startIndex > 0) {
736
- prefix = figures.arrowUp;
737
- } else if (i === endIndex - 1 && endIndex < this.choices.length) {
738
- prefix = figures.arrowDown;
739
- } else {
740
- prefix = " ";
741
- }
742
- if (v.disabled) {
743
- title = this.cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);
744
- prefix = (this.cursor === i ? color.bold().gray(figures.pointer) + " " : " ") + prefix;
745
- } else {
746
- title = this.cursor === i ? color.cyan().underline(v.title) : v.title;
747
- prefix = (this.cursor === i ? color.cyan(figures.pointer) + " " : " ") + prefix;
748
- if (v.description && this.cursor === i) {
749
- desc = ` - ${v.description}`;
750
- if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\r?\n/).length > 1) {
751
- desc = "\n" + wrap(v.description, { margin: 3, width: this.out.columns });
752
- }
753
- }
754
- }
755
- this.outputText += `${prefix} ${title}${color.gray(desc)}
756
- `;
757
- }
758
- }
759
- this.out.write(this.outputText);
760
- }
761
- };
762
- module2.exports = SelectPrompt;
763
- }
764
- });
765
-
766
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/toggle.js
767
- var require_toggle = __commonJS({
768
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/toggle.js"(exports2, module2) {
769
- var color = require_kleur();
770
- var Prompt = require_prompt();
771
- var { style, clear } = require_util();
772
- var { cursor, erase } = require_src();
773
- var TogglePrompt = class extends Prompt {
774
- constructor(opts = {}) {
775
- super(opts);
776
- this.msg = opts.message;
777
- this.value = !!opts.initial;
778
- this.active = opts.active || "on";
779
- this.inactive = opts.inactive || "off";
780
- this.initialValue = this.value;
781
- this.render();
782
- }
783
- reset() {
784
- this.value = this.initialValue;
785
- this.fire();
786
- this.render();
787
- }
788
- exit() {
789
- this.abort();
790
- }
791
- abort() {
792
- this.done = this.aborted = true;
793
- this.fire();
794
- this.render();
795
- this.out.write("\n");
796
- this.close();
797
- }
798
- submit() {
799
- this.done = true;
800
- this.aborted = false;
801
- this.fire();
802
- this.render();
803
- this.out.write("\n");
804
- this.close();
805
- }
806
- deactivate() {
807
- if (this.value === false) return this.bell();
808
- this.value = false;
809
- this.render();
810
- }
811
- activate() {
812
- if (this.value === true) return this.bell();
813
- this.value = true;
814
- this.render();
815
- }
816
- delete() {
817
- this.deactivate();
818
- }
819
- left() {
820
- this.deactivate();
821
- }
822
- right() {
823
- this.activate();
824
- }
825
- down() {
826
- this.deactivate();
827
- }
828
- up() {
829
- this.activate();
830
- }
831
- next() {
832
- this.value = !this.value;
833
- this.fire();
834
- this.render();
835
- }
836
- _(c, key) {
837
- if (c === " ") {
838
- this.value = !this.value;
839
- } else if (c === "1") {
840
- this.value = true;
841
- } else if (c === "0") {
842
- this.value = false;
843
- } else return this.bell();
844
- this.render();
845
- }
846
- render() {
847
- if (this.closed) return;
848
- if (this.firstRender) this.out.write(cursor.hide);
849
- else this.out.write(clear(this.outputText, this.out.columns));
850
- super.render();
851
- this.outputText = [
852
- style.symbol(this.done, this.aborted),
853
- color.bold(this.msg),
854
- style.delimiter(this.done),
855
- this.value ? this.inactive : color.cyan().underline(this.inactive),
856
- color.gray("/"),
857
- this.value ? color.cyan().underline(this.active) : this.active
858
- ].join(" ");
859
- this.out.write(erase.line + cursor.to(0) + this.outputText);
860
- }
861
- };
862
- module2.exports = TogglePrompt;
863
- }
864
- });
865
-
866
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/datepart.js
867
- var require_datepart = __commonJS({
868
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/datepart.js"(exports2, module2) {
869
- "use strict";
870
- var DatePart = class _DatePart {
871
- constructor({ token, date, parts, locales }) {
872
- this.token = token;
873
- this.date = date || /* @__PURE__ */ new Date();
874
- this.parts = parts || [this];
875
- this.locales = locales || {};
876
- }
877
- up() {
878
- }
879
- down() {
880
- }
881
- next() {
882
- const currentIdx = this.parts.indexOf(this);
883
- return this.parts.find((part, idx) => idx > currentIdx && part instanceof _DatePart);
884
- }
885
- setTo(val) {
886
- }
887
- prev() {
888
- let parts = [].concat(this.parts).reverse();
889
- const currentIdx = parts.indexOf(this);
890
- return parts.find((part, idx) => idx > currentIdx && part instanceof _DatePart);
891
- }
892
- toString() {
893
- return String(this.date);
894
- }
895
- };
896
- module2.exports = DatePart;
897
- }
898
- });
899
-
900
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/meridiem.js
901
- var require_meridiem = __commonJS({
902
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/meridiem.js"(exports2, module2) {
903
- "use strict";
904
- var DatePart = require_datepart();
905
- var Meridiem = class extends DatePart {
906
- constructor(opts = {}) {
907
- super(opts);
908
- }
909
- up() {
910
- this.date.setHours((this.date.getHours() + 12) % 24);
911
- }
912
- down() {
913
- this.up();
914
- }
915
- toString() {
916
- let meridiem = this.date.getHours() > 12 ? "pm" : "am";
917
- return /\A/.test(this.token) ? meridiem.toUpperCase() : meridiem;
918
- }
919
- };
920
- module2.exports = Meridiem;
921
- }
922
- });
923
-
924
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/day.js
925
- var require_day = __commonJS({
926
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/day.js"(exports2, module2) {
927
- "use strict";
928
- var DatePart = require_datepart();
929
- var pos = (n) => {
930
- n = n % 10;
931
- return n === 1 ? "st" : n === 2 ? "nd" : n === 3 ? "rd" : "th";
932
- };
933
- var Day = class extends DatePart {
934
- constructor(opts = {}) {
935
- super(opts);
936
- }
937
- up() {
938
- this.date.setDate(this.date.getDate() + 1);
939
- }
940
- down() {
941
- this.date.setDate(this.date.getDate() - 1);
942
- }
943
- setTo(val) {
944
- this.date.setDate(parseInt(val.substr(-2)));
945
- }
946
- toString() {
947
- let date = this.date.getDate();
948
- let day = this.date.getDay();
949
- return this.token === "DD" ? String(date).padStart(2, "0") : this.token === "Do" ? date + pos(date) : this.token === "d" ? day + 1 : this.token === "ddd" ? this.locales.weekdaysShort[day] : this.token === "dddd" ? this.locales.weekdays[day] : date;
950
- }
951
- };
952
- module2.exports = Day;
953
- }
954
- });
955
-
956
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/hours.js
957
- var require_hours = __commonJS({
958
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/hours.js"(exports2, module2) {
959
- "use strict";
960
- var DatePart = require_datepart();
961
- var Hours = class extends DatePart {
962
- constructor(opts = {}) {
963
- super(opts);
964
- }
965
- up() {
966
- this.date.setHours(this.date.getHours() + 1);
967
- }
968
- down() {
969
- this.date.setHours(this.date.getHours() - 1);
970
- }
971
- setTo(val) {
972
- this.date.setHours(parseInt(val.substr(-2)));
973
- }
974
- toString() {
975
- let hours = this.date.getHours();
976
- if (/h/.test(this.token))
977
- hours = hours % 12 || 12;
978
- return this.token.length > 1 ? String(hours).padStart(2, "0") : hours;
979
- }
980
- };
981
- module2.exports = Hours;
982
- }
983
- });
984
-
985
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/milliseconds.js
986
- var require_milliseconds = __commonJS({
987
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/milliseconds.js"(exports2, module2) {
988
- "use strict";
989
- var DatePart = require_datepart();
990
- var Milliseconds = class extends DatePart {
991
- constructor(opts = {}) {
992
- super(opts);
993
- }
994
- up() {
995
- this.date.setMilliseconds(this.date.getMilliseconds() + 1);
996
- }
997
- down() {
998
- this.date.setMilliseconds(this.date.getMilliseconds() - 1);
999
- }
1000
- setTo(val) {
1001
- this.date.setMilliseconds(parseInt(val.substr(-this.token.length)));
1002
- }
1003
- toString() {
1004
- return String(this.date.getMilliseconds()).padStart(4, "0").substr(0, this.token.length);
1005
- }
1006
- };
1007
- module2.exports = Milliseconds;
1008
- }
1009
- });
1010
-
1011
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/minutes.js
1012
- var require_minutes = __commonJS({
1013
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/minutes.js"(exports2, module2) {
1014
- "use strict";
1015
- var DatePart = require_datepart();
1016
- var Minutes = class extends DatePart {
1017
- constructor(opts = {}) {
1018
- super(opts);
1019
- }
1020
- up() {
1021
- this.date.setMinutes(this.date.getMinutes() + 1);
1022
- }
1023
- down() {
1024
- this.date.setMinutes(this.date.getMinutes() - 1);
1025
- }
1026
- setTo(val) {
1027
- this.date.setMinutes(parseInt(val.substr(-2)));
1028
- }
1029
- toString() {
1030
- let m = this.date.getMinutes();
1031
- return this.token.length > 1 ? String(m).padStart(2, "0") : m;
1032
- }
1033
- };
1034
- module2.exports = Minutes;
1035
- }
1036
- });
1037
-
1038
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/month.js
1039
- var require_month = __commonJS({
1040
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/month.js"(exports2, module2) {
1041
- "use strict";
1042
- var DatePart = require_datepart();
1043
- var Month = class extends DatePart {
1044
- constructor(opts = {}) {
1045
- super(opts);
1046
- }
1047
- up() {
1048
- this.date.setMonth(this.date.getMonth() + 1);
1049
- }
1050
- down() {
1051
- this.date.setMonth(this.date.getMonth() - 1);
1052
- }
1053
- setTo(val) {
1054
- val = parseInt(val.substr(-2)) - 1;
1055
- this.date.setMonth(val < 0 ? 0 : val);
1056
- }
1057
- toString() {
1058
- let month = this.date.getMonth();
1059
- let tl = this.token.length;
1060
- return tl === 2 ? String(month + 1).padStart(2, "0") : tl === 3 ? this.locales.monthsShort[month] : tl === 4 ? this.locales.months[month] : String(month + 1);
1061
- }
1062
- };
1063
- module2.exports = Month;
1064
- }
1065
- });
1066
-
1067
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/seconds.js
1068
- var require_seconds = __commonJS({
1069
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/seconds.js"(exports2, module2) {
1070
- "use strict";
1071
- var DatePart = require_datepart();
1072
- var Seconds = class extends DatePart {
1073
- constructor(opts = {}) {
1074
- super(opts);
1075
- }
1076
- up() {
1077
- this.date.setSeconds(this.date.getSeconds() + 1);
1078
- }
1079
- down() {
1080
- this.date.setSeconds(this.date.getSeconds() - 1);
1081
- }
1082
- setTo(val) {
1083
- this.date.setSeconds(parseInt(val.substr(-2)));
1084
- }
1085
- toString() {
1086
- let s = this.date.getSeconds();
1087
- return this.token.length > 1 ? String(s).padStart(2, "0") : s;
1088
- }
1089
- };
1090
- module2.exports = Seconds;
1091
- }
1092
- });
1093
-
1094
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/year.js
1095
- var require_year = __commonJS({
1096
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/year.js"(exports2, module2) {
1097
- "use strict";
1098
- var DatePart = require_datepart();
1099
- var Year = class extends DatePart {
1100
- constructor(opts = {}) {
1101
- super(opts);
1102
- }
1103
- up() {
1104
- this.date.setFullYear(this.date.getFullYear() + 1);
1105
- }
1106
- down() {
1107
- this.date.setFullYear(this.date.getFullYear() - 1);
1108
- }
1109
- setTo(val) {
1110
- this.date.setFullYear(val.substr(-4));
1111
- }
1112
- toString() {
1113
- let year = String(this.date.getFullYear()).padStart(4, "0");
1114
- return this.token.length === 2 ? year.substr(-2) : year;
1115
- }
1116
- };
1117
- module2.exports = Year;
1118
- }
1119
- });
1120
-
1121
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/index.js
1122
- var require_dateparts = __commonJS({
1123
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/index.js"(exports2, module2) {
1124
- "use strict";
1125
- module2.exports = {
1126
- DatePart: require_datepart(),
1127
- Meridiem: require_meridiem(),
1128
- Day: require_day(),
1129
- Hours: require_hours(),
1130
- Milliseconds: require_milliseconds(),
1131
- Minutes: require_minutes(),
1132
- Month: require_month(),
1133
- Seconds: require_seconds(),
1134
- Year: require_year()
1135
- };
1136
- }
1137
- });
1138
-
1139
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/date.js
1140
- var require_date = __commonJS({
1141
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/date.js"(exports2, module2) {
1142
- "use strict";
1143
- var color = require_kleur();
1144
- var Prompt = require_prompt();
1145
- var { style, clear, figures } = require_util();
1146
- var { erase, cursor } = require_src();
1147
- var { DatePart, Meridiem, Day, Hours, Milliseconds, Minutes, Month, Seconds, Year } = require_dateparts();
1148
- var regex = /\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;
1149
- var regexGroups = {
1150
- 1: ({ token }) => token.replace(/\\(.)/g, "$1"),
1151
- 2: (opts) => new Day(opts),
1152
- // Day // TODO
1153
- 3: (opts) => new Month(opts),
1154
- // Month
1155
- 4: (opts) => new Year(opts),
1156
- // Year
1157
- 5: (opts) => new Meridiem(opts),
1158
- // AM/PM // TODO (special)
1159
- 6: (opts) => new Hours(opts),
1160
- // Hours
1161
- 7: (opts) => new Minutes(opts),
1162
- // Minutes
1163
- 8: (opts) => new Seconds(opts),
1164
- // Seconds
1165
- 9: (opts) => new Milliseconds(opts)
1166
- // Fractional seconds
1167
- };
1168
- var dfltLocales = {
1169
- months: "January,February,March,April,May,June,July,August,September,October,November,December".split(","),
1170
- monthsShort: "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),
1171
- weekdays: "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),
1172
- weekdaysShort: "Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")
1173
- };
1174
- var DatePrompt = class extends Prompt {
1175
- constructor(opts = {}) {
1176
- super(opts);
1177
- this.msg = opts.message;
1178
- this.cursor = 0;
1179
- this.typed = "";
1180
- this.locales = Object.assign(dfltLocales, opts.locales);
1181
- this._date = opts.initial || /* @__PURE__ */ new Date();
1182
- this.errorMsg = opts.error || "Please Enter A Valid Value";
1183
- this.validator = opts.validate || (() => true);
1184
- this.mask = opts.mask || "YYYY-MM-DD HH:mm:ss";
1185
- this.clear = clear("", this.out.columns);
1186
- this.render();
1187
- }
1188
- get value() {
1189
- return this.date;
1190
- }
1191
- get date() {
1192
- return this._date;
1193
- }
1194
- set date(date) {
1195
- if (date) this._date.setTime(date.getTime());
1196
- }
1197
- set mask(mask) {
1198
- let result;
1199
- this.parts = [];
1200
- while (result = regex.exec(mask)) {
1201
- let match = result.shift();
1202
- let idx = result.findIndex((gr) => gr != null);
1203
- this.parts.push(idx in regexGroups ? regexGroups[idx]({ token: result[idx] || match, date: this.date, parts: this.parts, locales: this.locales }) : result[idx] || match);
1204
- }
1205
- let parts = this.parts.reduce((arr, i) => {
1206
- if (typeof i === "string" && typeof arr[arr.length - 1] === "string")
1207
- arr[arr.length - 1] += i;
1208
- else arr.push(i);
1209
- return arr;
1210
- }, []);
1211
- this.parts.splice(0);
1212
- this.parts.push(...parts);
1213
- this.reset();
1214
- }
1215
- moveCursor(n) {
1216
- this.typed = "";
1217
- this.cursor = n;
1218
- this.fire();
1219
- }
1220
- reset() {
1221
- this.moveCursor(this.parts.findIndex((p) => p instanceof DatePart));
1222
- this.fire();
1223
- this.render();
1224
- }
1225
- exit() {
1226
- this.abort();
1227
- }
1228
- abort() {
1229
- this.done = this.aborted = true;
1230
- this.error = false;
1231
- this.fire();
1232
- this.render();
1233
- this.out.write("\n");
1234
- this.close();
1235
- }
1236
- async validate() {
1237
- let valid = await this.validator(this.value);
1238
- if (typeof valid === "string") {
1239
- this.errorMsg = valid;
1240
- valid = false;
1241
- }
1242
- this.error = !valid;
1243
- }
1244
- async submit() {
1245
- await this.validate();
1246
- if (this.error) {
1247
- this.color = "red";
1248
- this.fire();
1249
- this.render();
1250
- return;
1251
- }
1252
- this.done = true;
1253
- this.aborted = false;
1254
- this.fire();
1255
- this.render();
1256
- this.out.write("\n");
1257
- this.close();
1258
- }
1259
- up() {
1260
- this.typed = "";
1261
- this.parts[this.cursor].up();
1262
- this.render();
1263
- }
1264
- down() {
1265
- this.typed = "";
1266
- this.parts[this.cursor].down();
1267
- this.render();
1268
- }
1269
- left() {
1270
- let prev = this.parts[this.cursor].prev();
1271
- if (prev == null) return this.bell();
1272
- this.moveCursor(this.parts.indexOf(prev));
1273
- this.render();
1274
- }
1275
- right() {
1276
- let next = this.parts[this.cursor].next();
1277
- if (next == null) return this.bell();
1278
- this.moveCursor(this.parts.indexOf(next));
1279
- this.render();
1280
- }
1281
- next() {
1282
- let next = this.parts[this.cursor].next();
1283
- this.moveCursor(next ? this.parts.indexOf(next) : this.parts.findIndex((part) => part instanceof DatePart));
1284
- this.render();
1285
- }
1286
- _(c) {
1287
- if (/\d/.test(c)) {
1288
- this.typed += c;
1289
- this.parts[this.cursor].setTo(this.typed);
1290
- this.render();
1291
- }
1292
- }
1293
- render() {
1294
- if (this.closed) return;
1295
- if (this.firstRender) this.out.write(cursor.hide);
1296
- else this.out.write(clear(this.outputText, this.out.columns));
1297
- super.render();
1298
- this.outputText = [
1299
- style.symbol(this.done, this.aborted),
1300
- color.bold(this.msg),
1301
- style.delimiter(false),
1302
- this.parts.reduce((arr, p, idx) => arr.concat(idx === this.cursor && !this.done ? color.cyan().underline(p.toString()) : p), []).join("")
1303
- ].join(" ");
1304
- if (this.error) {
1305
- this.outputText += this.errorMsg.split("\n").reduce(
1306
- (a, l, i) => a + `
1307
- ${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`,
1308
- ``
1309
- );
1310
- }
1311
- this.out.write(erase.line + cursor.to(0) + this.outputText);
1312
- }
1313
- };
1314
- module2.exports = DatePrompt;
1315
- }
1316
- });
1317
-
1318
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/number.js
1319
- var require_number = __commonJS({
1320
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/number.js"(exports2, module2) {
1321
- var color = require_kleur();
1322
- var Prompt = require_prompt();
1323
- var { cursor, erase } = require_src();
1324
- var { style, figures, clear, lines } = require_util();
1325
- var isNumber = /[0-9]/;
1326
- var isDef = (any) => any !== void 0;
1327
- var round = (number, precision) => {
1328
- let factor = Math.pow(10, precision);
1329
- return Math.round(number * factor) / factor;
1330
- };
1331
- var NumberPrompt = class extends Prompt {
1332
- constructor(opts = {}) {
1333
- super(opts);
1334
- this.transform = style.render(opts.style);
1335
- this.msg = opts.message;
1336
- this.initial = isDef(opts.initial) ? opts.initial : "";
1337
- this.float = !!opts.float;
1338
- this.round = opts.round || 2;
1339
- this.inc = opts.increment || 1;
1340
- this.min = isDef(opts.min) ? opts.min : -Infinity;
1341
- this.max = isDef(opts.max) ? opts.max : Infinity;
1342
- this.errorMsg = opts.error || `Please Enter A Valid Value`;
1343
- this.validator = opts.validate || (() => true);
1344
- this.color = `cyan`;
1345
- this.value = ``;
1346
- this.typed = ``;
1347
- this.lastHit = 0;
1348
- this.render();
1349
- }
1350
- set value(v) {
1351
- if (!v && v !== 0) {
1352
- this.placeholder = true;
1353
- this.rendered = color.gray(this.transform.render(`${this.initial}`));
1354
- this._value = ``;
1355
- } else {
1356
- this.placeholder = false;
1357
- this.rendered = this.transform.render(`${round(v, this.round)}`);
1358
- this._value = round(v, this.round);
1359
- }
1360
- this.fire();
1361
- }
1362
- get value() {
1363
- return this._value;
1364
- }
1365
- parse(x) {
1366
- return this.float ? parseFloat(x) : parseInt(x);
1367
- }
1368
- valid(c) {
1369
- return c === `-` || c === `.` && this.float || isNumber.test(c);
1370
- }
1371
- reset() {
1372
- this.typed = ``;
1373
- this.value = ``;
1374
- this.fire();
1375
- this.render();
1376
- }
1377
- exit() {
1378
- this.abort();
1379
- }
1380
- abort() {
1381
- let x = this.value;
1382
- this.value = x !== `` ? x : this.initial;
1383
- this.done = this.aborted = true;
1384
- this.error = false;
1385
- this.fire();
1386
- this.render();
1387
- this.out.write(`
1388
- `);
1389
- this.close();
1390
- }
1391
- async validate() {
1392
- let valid = await this.validator(this.value);
1393
- if (typeof valid === `string`) {
1394
- this.errorMsg = valid;
1395
- valid = false;
1396
- }
1397
- this.error = !valid;
1398
- }
1399
- async submit() {
1400
- await this.validate();
1401
- if (this.error) {
1402
- this.color = `red`;
1403
- this.fire();
1404
- this.render();
1405
- return;
1406
- }
1407
- let x = this.value;
1408
- this.value = x !== `` ? x : this.initial;
1409
- this.done = true;
1410
- this.aborted = false;
1411
- this.error = false;
1412
- this.fire();
1413
- this.render();
1414
- this.out.write(`
1415
- `);
1416
- this.close();
1417
- }
1418
- up() {
1419
- this.typed = ``;
1420
- if (this.value === "") {
1421
- this.value = this.min - this.inc;
1422
- }
1423
- if (this.value >= this.max) return this.bell();
1424
- this.value += this.inc;
1425
- this.color = `cyan`;
1426
- this.fire();
1427
- this.render();
1428
- }
1429
- down() {
1430
- this.typed = ``;
1431
- if (this.value === "") {
1432
- this.value = this.min + this.inc;
1433
- }
1434
- if (this.value <= this.min) return this.bell();
1435
- this.value -= this.inc;
1436
- this.color = `cyan`;
1437
- this.fire();
1438
- this.render();
1439
- }
1440
- delete() {
1441
- let val = this.value.toString();
1442
- if (val.length === 0) return this.bell();
1443
- this.value = this.parse(val = val.slice(0, -1)) || ``;
1444
- if (this.value !== "" && this.value < this.min) {
1445
- this.value = this.min;
1446
- }
1447
- this.color = `cyan`;
1448
- this.fire();
1449
- this.render();
1450
- }
1451
- next() {
1452
- this.value = this.initial;
1453
- this.fire();
1454
- this.render();
1455
- }
1456
- _(c, key) {
1457
- if (!this.valid(c)) return this.bell();
1458
- const now = Date.now();
1459
- if (now - this.lastHit > 1e3) this.typed = ``;
1460
- this.typed += c;
1461
- this.lastHit = now;
1462
- this.color = `cyan`;
1463
- if (c === `.`) return this.fire();
1464
- this.value = Math.min(this.parse(this.typed), this.max);
1465
- if (this.value > this.max) this.value = this.max;
1466
- if (this.value < this.min) this.value = this.min;
1467
- this.fire();
1468
- this.render();
1469
- }
1470
- render() {
1471
- if (this.closed) return;
1472
- if (!this.firstRender) {
1473
- if (this.outputError)
1474
- this.out.write(cursor.down(lines(this.outputError, this.out.columns) - 1) + clear(this.outputError, this.out.columns));
1475
- this.out.write(clear(this.outputText, this.out.columns));
1476
- }
1477
- super.render();
1478
- this.outputError = "";
1479
- this.outputText = [
1480
- style.symbol(this.done, this.aborted),
1481
- color.bold(this.msg),
1482
- style.delimiter(this.done),
1483
- !this.done || !this.done && !this.placeholder ? color[this.color]().underline(this.rendered) : this.rendered
1484
- ].join(` `);
1485
- if (this.error) {
1486
- this.outputError += this.errorMsg.split(`
1487
- `).reduce((a, l, i) => a + `
1488
- ${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
1489
- }
1490
- this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore);
1491
- }
1492
- };
1493
- module2.exports = NumberPrompt;
1494
- }
1495
- });
1496
-
1497
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/multiselect.js
1498
- var require_multiselect = __commonJS({
1499
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/multiselect.js"(exports2, module2) {
1500
- "use strict";
1501
- var color = require_kleur();
1502
- var { cursor } = require_src();
1503
- var Prompt = require_prompt();
1504
- var { clear, figures, style, wrap, entriesToDisplay } = require_util();
1505
- var MultiselectPrompt = class extends Prompt {
1506
- constructor(opts = {}) {
1507
- super(opts);
1508
- this.msg = opts.message;
1509
- this.cursor = opts.cursor || 0;
1510
- this.scrollIndex = opts.cursor || 0;
1511
- this.hint = opts.hint || "";
1512
- this.warn = opts.warn || "- This option is disabled -";
1513
- this.minSelected = opts.min;
1514
- this.showMinError = false;
1515
- this.maxChoices = opts.max;
1516
- this.instructions = opts.instructions;
1517
- this.optionsPerPage = opts.optionsPerPage || 10;
1518
- this.value = opts.choices.map((ch, idx) => {
1519
- if (typeof ch === "string")
1520
- ch = { title: ch, value: idx };
1521
- return {
1522
- title: ch && (ch.title || ch.value || ch),
1523
- description: ch && ch.description,
1524
- value: ch && (ch.value === void 0 ? idx : ch.value),
1525
- selected: ch && ch.selected,
1526
- disabled: ch && ch.disabled
1527
- };
1528
- });
1529
- this.clear = clear("", this.out.columns);
1530
- if (!opts.overrideRender) {
1531
- this.render();
1532
- }
1533
- }
1534
- reset() {
1535
- this.value.map((v) => !v.selected);
1536
- this.cursor = 0;
1537
- this.fire();
1538
- this.render();
1539
- }
1540
- selected() {
1541
- return this.value.filter((v) => v.selected);
1542
- }
1543
- exit() {
1544
- this.abort();
1545
- }
1546
- abort() {
1547
- this.done = this.aborted = true;
1548
- this.fire();
1549
- this.render();
1550
- this.out.write("\n");
1551
- this.close();
1552
- }
1553
- submit() {
1554
- const selected = this.value.filter((e) => e.selected);
1555
- if (this.minSelected && selected.length < this.minSelected) {
1556
- this.showMinError = true;
1557
- this.render();
1558
- } else {
1559
- this.done = true;
1560
- this.aborted = false;
1561
- this.fire();
1562
- this.render();
1563
- this.out.write("\n");
1564
- this.close();
1565
- }
1566
- }
1567
- first() {
1568
- this.cursor = 0;
1569
- this.render();
1570
- }
1571
- last() {
1572
- this.cursor = this.value.length - 1;
1573
- this.render();
1574
- }
1575
- next() {
1576
- this.cursor = (this.cursor + 1) % this.value.length;
1577
- this.render();
1578
- }
1579
- up() {
1580
- if (this.cursor === 0) {
1581
- this.cursor = this.value.length - 1;
1582
- } else {
1583
- this.cursor--;
1584
- }
1585
- this.render();
1586
- }
1587
- down() {
1588
- if (this.cursor === this.value.length - 1) {
1589
- this.cursor = 0;
1590
- } else {
1591
- this.cursor++;
1592
- }
1593
- this.render();
1594
- }
1595
- left() {
1596
- this.value[this.cursor].selected = false;
1597
- this.render();
1598
- }
1599
- right() {
1600
- if (this.value.filter((e) => e.selected).length >= this.maxChoices) return this.bell();
1601
- this.value[this.cursor].selected = true;
1602
- this.render();
1603
- }
1604
- handleSpaceToggle() {
1605
- const v = this.value[this.cursor];
1606
- if (v.selected) {
1607
- v.selected = false;
1608
- this.render();
1609
- } else if (v.disabled || this.value.filter((e) => e.selected).length >= this.maxChoices) {
1610
- return this.bell();
1611
- } else {
1612
- v.selected = true;
1613
- this.render();
1614
- }
1615
- }
1616
- toggleAll() {
1617
- if (this.maxChoices !== void 0 || this.value[this.cursor].disabled) {
1618
- return this.bell();
1619
- }
1620
- const newSelected = !this.value[this.cursor].selected;
1621
- this.value.filter((v) => !v.disabled).forEach((v) => v.selected = newSelected);
1622
- this.render();
1623
- }
1624
- _(c, key) {
1625
- if (c === " ") {
1626
- this.handleSpaceToggle();
1627
- } else if (c === "a") {
1628
- this.toggleAll();
1629
- } else {
1630
- return this.bell();
1631
- }
1632
- }
1633
- renderInstructions() {
1634
- if (this.instructions === void 0 || this.instructions) {
1635
- if (typeof this.instructions === "string") {
1636
- return this.instructions;
1637
- }
1638
- return `
1639
- Instructions:
1640
- ${figures.arrowUp}/${figures.arrowDown}: Highlight option
1641
- ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection
1642
- ` + (this.maxChoices === void 0 ? ` a: Toggle all
1643
- ` : "") + ` enter/return: Complete answer`;
1644
- }
1645
- return "";
1646
- }
1647
- renderOption(cursor2, v, i, arrowIndicator) {
1648
- const prefix = (v.selected ? color.green(figures.radioOn) : figures.radioOff) + " " + arrowIndicator + " ";
1649
- let title, desc;
1650
- if (v.disabled) {
1651
- title = cursor2 === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);
1652
- } else {
1653
- title = cursor2 === i ? color.cyan().underline(v.title) : v.title;
1654
- if (cursor2 === i && v.description) {
1655
- desc = ` - ${v.description}`;
1656
- if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\r?\n/).length > 1) {
1657
- desc = "\n" + wrap(v.description, { margin: prefix.length, width: this.out.columns });
1658
- }
1659
- }
1660
- }
1661
- return prefix + title + color.gray(desc || "");
1662
- }
1663
- // shared with autocompleteMultiselect
1664
- paginateOptions(options) {
1665
- if (options.length === 0) {
1666
- return color.red("No matches for this query.");
1667
- }
1668
- let { startIndex, endIndex } = entriesToDisplay(this.cursor, options.length, this.optionsPerPage);
1669
- let prefix, styledOptions = [];
1670
- for (let i = startIndex; i < endIndex; i++) {
1671
- if (i === startIndex && startIndex > 0) {
1672
- prefix = figures.arrowUp;
1673
- } else if (i === endIndex - 1 && endIndex < options.length) {
1674
- prefix = figures.arrowDown;
1675
- } else {
1676
- prefix = " ";
1677
- }
1678
- styledOptions.push(this.renderOption(this.cursor, options[i], i, prefix));
1679
- }
1680
- return "\n" + styledOptions.join("\n");
1681
- }
1682
- // shared with autocomleteMultiselect
1683
- renderOptions(options) {
1684
- if (!this.done) {
1685
- return this.paginateOptions(options);
1686
- }
1687
- return "";
1688
- }
1689
- renderDoneOrInstructions() {
1690
- if (this.done) {
1691
- return this.value.filter((e) => e.selected).map((v) => v.title).join(", ");
1692
- }
1693
- const output = [color.gray(this.hint), this.renderInstructions()];
1694
- if (this.value[this.cursor].disabled) {
1695
- output.push(color.yellow(this.warn));
1696
- }
1697
- return output.join(" ");
1698
- }
1699
- render() {
1700
- if (this.closed) return;
1701
- if (this.firstRender) this.out.write(cursor.hide);
1702
- super.render();
1703
- let prompt = [
1704
- style.symbol(this.done, this.aborted),
1705
- color.bold(this.msg),
1706
- style.delimiter(false),
1707
- this.renderDoneOrInstructions()
1708
- ].join(" ");
1709
- if (this.showMinError) {
1710
- prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`);
1711
- this.showMinError = false;
1712
- }
1713
- prompt += this.renderOptions(this.value);
1714
- this.out.write(this.clear + prompt);
1715
- this.clear = clear(prompt, this.out.columns);
1716
- }
1717
- };
1718
- module2.exports = MultiselectPrompt;
1719
- }
1720
- });
1721
-
1722
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/autocomplete.js
1723
- var require_autocomplete = __commonJS({
1724
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/autocomplete.js"(exports2, module2) {
1725
- "use strict";
1726
- var color = require_kleur();
1727
- var Prompt = require_prompt();
1728
- var { erase, cursor } = require_src();
1729
- var { style, clear, figures, wrap, entriesToDisplay } = require_util();
1730
- var getVal = (arr, i) => arr[i] && (arr[i].value || arr[i].title || arr[i]);
1731
- var getTitle = (arr, i) => arr[i] && (arr[i].title || arr[i].value || arr[i]);
1732
- var getIndex = (arr, valOrTitle) => {
1733
- const index = arr.findIndex((el) => el.value === valOrTitle || el.title === valOrTitle);
1734
- return index > -1 ? index : void 0;
1735
- };
1736
- var AutocompletePrompt = class extends Prompt {
1737
- constructor(opts = {}) {
1738
- super(opts);
1739
- this.msg = opts.message;
1740
- this.suggest = opts.suggest;
1741
- this.choices = opts.choices;
1742
- this.initial = typeof opts.initial === "number" ? opts.initial : getIndex(opts.choices, opts.initial);
1743
- this.select = this.initial || opts.cursor || 0;
1744
- this.i18n = { noMatches: opts.noMatches || "no matches found" };
1745
- this.fallback = opts.fallback || this.initial;
1746
- this.clearFirst = opts.clearFirst || false;
1747
- this.suggestions = [];
1748
- this.input = "";
1749
- this.limit = opts.limit || 10;
1750
- this.cursor = 0;
1751
- this.transform = style.render(opts.style);
1752
- this.scale = this.transform.scale;
1753
- this.render = this.render.bind(this);
1754
- this.complete = this.complete.bind(this);
1755
- this.clear = clear("", this.out.columns);
1756
- this.complete(this.render);
1757
- this.render();
1758
- }
1759
- set fallback(fb) {
1760
- this._fb = Number.isSafeInteger(parseInt(fb)) ? parseInt(fb) : fb;
1761
- }
1762
- get fallback() {
1763
- let choice;
1764
- if (typeof this._fb === "number")
1765
- choice = this.choices[this._fb];
1766
- else if (typeof this._fb === "string")
1767
- choice = { title: this._fb };
1768
- return choice || this._fb || { title: this.i18n.noMatches };
1769
- }
1770
- moveSelect(i) {
1771
- this.select = i;
1772
- if (this.suggestions.length > 0)
1773
- this.value = getVal(this.suggestions, i);
1774
- else this.value = this.fallback.value;
1775
- this.fire();
1776
- }
1777
- async complete(cb) {
1778
- const p = this.completing = this.suggest(this.input, this.choices);
1779
- const suggestions = await p;
1780
- if (this.completing !== p) return;
1781
- this.suggestions = suggestions.map((s, i, arr) => ({ title: getTitle(arr, i), value: getVal(arr, i), description: s.description }));
1782
- this.completing = false;
1783
- const l = Math.max(suggestions.length - 1, 0);
1784
- this.moveSelect(Math.min(l, this.select));
1785
- cb && cb();
1786
- }
1787
- reset() {
1788
- this.input = "";
1789
- this.complete(() => {
1790
- this.moveSelect(this.initial !== void 0 ? this.initial : 0);
1791
- this.render();
1792
- });
1793
- this.render();
1794
- }
1795
- exit() {
1796
- if (this.clearFirst && this.input.length > 0) {
1797
- this.reset();
1798
- } else {
1799
- this.done = this.exited = true;
1800
- this.aborted = false;
1801
- this.fire();
1802
- this.render();
1803
- this.out.write("\n");
1804
- this.close();
1805
- }
1806
- }
1807
- abort() {
1808
- this.done = this.aborted = true;
1809
- this.exited = false;
1810
- this.fire();
1811
- this.render();
1812
- this.out.write("\n");
1813
- this.close();
1814
- }
1815
- submit() {
1816
- this.done = true;
1817
- this.aborted = this.exited = false;
1818
- this.fire();
1819
- this.render();
1820
- this.out.write("\n");
1821
- this.close();
1822
- }
1823
- _(c, key) {
1824
- let s1 = this.input.slice(0, this.cursor);
1825
- let s2 = this.input.slice(this.cursor);
1826
- this.input = `${s1}${c}${s2}`;
1827
- this.cursor = s1.length + 1;
1828
- this.complete(this.render);
1829
- this.render();
1830
- }
1831
- delete() {
1832
- if (this.cursor === 0) return this.bell();
1833
- let s1 = this.input.slice(0, this.cursor - 1);
1834
- let s2 = this.input.slice(this.cursor);
1835
- this.input = `${s1}${s2}`;
1836
- this.complete(this.render);
1837
- this.cursor = this.cursor - 1;
1838
- this.render();
1839
- }
1840
- deleteForward() {
1841
- if (this.cursor * this.scale >= this.rendered.length) return this.bell();
1842
- let s1 = this.input.slice(0, this.cursor);
1843
- let s2 = this.input.slice(this.cursor + 1);
1844
- this.input = `${s1}${s2}`;
1845
- this.complete(this.render);
1846
- this.render();
1847
- }
1848
- first() {
1849
- this.moveSelect(0);
1850
- this.render();
1851
- }
1852
- last() {
1853
- this.moveSelect(this.suggestions.length - 1);
1854
- this.render();
1855
- }
1856
- up() {
1857
- if (this.select === 0) {
1858
- this.moveSelect(this.suggestions.length - 1);
1859
- } else {
1860
- this.moveSelect(this.select - 1);
1861
- }
1862
- this.render();
1863
- }
1864
- down() {
1865
- if (this.select === this.suggestions.length - 1) {
1866
- this.moveSelect(0);
1867
- } else {
1868
- this.moveSelect(this.select + 1);
1869
- }
1870
- this.render();
1871
- }
1872
- next() {
1873
- if (this.select === this.suggestions.length - 1) {
1874
- this.moveSelect(0);
1875
- } else this.moveSelect(this.select + 1);
1876
- this.render();
1877
- }
1878
- nextPage() {
1879
- this.moveSelect(Math.min(this.select + this.limit, this.suggestions.length - 1));
1880
- this.render();
1881
- }
1882
- prevPage() {
1883
- this.moveSelect(Math.max(this.select - this.limit, 0));
1884
- this.render();
1885
- }
1886
- left() {
1887
- if (this.cursor <= 0) return this.bell();
1888
- this.cursor = this.cursor - 1;
1889
- this.render();
1890
- }
1891
- right() {
1892
- if (this.cursor * this.scale >= this.rendered.length) return this.bell();
1893
- this.cursor = this.cursor + 1;
1894
- this.render();
1895
- }
1896
- renderOption(v, hovered, isStart, isEnd) {
1897
- let desc;
1898
- let prefix = isStart ? figures.arrowUp : isEnd ? figures.arrowDown : " ";
1899
- let title = hovered ? color.cyan().underline(v.title) : v.title;
1900
- prefix = (hovered ? color.cyan(figures.pointer) + " " : " ") + prefix;
1901
- if (v.description) {
1902
- desc = ` - ${v.description}`;
1903
- if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\r?\n/).length > 1) {
1904
- desc = "\n" + wrap(v.description, { margin: 3, width: this.out.columns });
1905
- }
1906
- }
1907
- return prefix + " " + title + color.gray(desc || "");
1908
- }
1909
- render() {
1910
- if (this.closed) return;
1911
- if (this.firstRender) this.out.write(cursor.hide);
1912
- else this.out.write(clear(this.outputText, this.out.columns));
1913
- super.render();
1914
- let { startIndex, endIndex } = entriesToDisplay(this.select, this.choices.length, this.limit);
1915
- this.outputText = [
1916
- style.symbol(this.done, this.aborted, this.exited),
1917
- color.bold(this.msg),
1918
- style.delimiter(this.completing),
1919
- this.done && this.suggestions[this.select] ? this.suggestions[this.select].title : this.rendered = this.transform.render(this.input)
1920
- ].join(" ");
1921
- if (!this.done) {
1922
- const suggestions = this.suggestions.slice(startIndex, endIndex).map((item, i) => this.renderOption(
1923
- item,
1924
- this.select === i + startIndex,
1925
- i === 0 && startIndex > 0,
1926
- i + startIndex === endIndex - 1 && endIndex < this.choices.length
1927
- )).join("\n");
1928
- this.outputText += `
1929
- ` + (suggestions || color.gray(this.fallback.title));
1930
- }
1931
- this.out.write(erase.line + cursor.to(0) + this.outputText);
1932
- }
1933
- };
1934
- module2.exports = AutocompletePrompt;
1935
- }
1936
- });
1937
-
1938
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/autocompleteMultiselect.js
1939
- var require_autocompleteMultiselect = __commonJS({
1940
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/autocompleteMultiselect.js"(exports2, module2) {
1941
- "use strict";
1942
- var color = require_kleur();
1943
- var { cursor } = require_src();
1944
- var MultiselectPrompt = require_multiselect();
1945
- var { clear, style, figures } = require_util();
1946
- var AutocompleteMultiselectPrompt = class extends MultiselectPrompt {
1947
- constructor(opts = {}) {
1948
- opts.overrideRender = true;
1949
- super(opts);
1950
- this.inputValue = "";
1951
- this.clear = clear("", this.out.columns);
1952
- this.filteredOptions = this.value;
1953
- this.render();
1954
- }
1955
- last() {
1956
- this.cursor = this.filteredOptions.length - 1;
1957
- this.render();
1958
- }
1959
- next() {
1960
- this.cursor = (this.cursor + 1) % this.filteredOptions.length;
1961
- this.render();
1962
- }
1963
- up() {
1964
- if (this.cursor === 0) {
1965
- this.cursor = this.filteredOptions.length - 1;
1966
- } else {
1967
- this.cursor--;
1968
- }
1969
- this.render();
1970
- }
1971
- down() {
1972
- if (this.cursor === this.filteredOptions.length - 1) {
1973
- this.cursor = 0;
1974
- } else {
1975
- this.cursor++;
1976
- }
1977
- this.render();
1978
- }
1979
- left() {
1980
- this.filteredOptions[this.cursor].selected = false;
1981
- this.render();
1982
- }
1983
- right() {
1984
- if (this.value.filter((e) => e.selected).length >= this.maxChoices) return this.bell();
1985
- this.filteredOptions[this.cursor].selected = true;
1986
- this.render();
1987
- }
1988
- delete() {
1989
- if (this.inputValue.length) {
1990
- this.inputValue = this.inputValue.substr(0, this.inputValue.length - 1);
1991
- this.updateFilteredOptions();
1992
- }
1993
- }
1994
- updateFilteredOptions() {
1995
- const currentHighlight = this.filteredOptions[this.cursor];
1996
- this.filteredOptions = this.value.filter((v) => {
1997
- if (this.inputValue) {
1998
- if (typeof v.title === "string") {
1999
- if (v.title.toLowerCase().includes(this.inputValue.toLowerCase())) {
2000
- return true;
2001
- }
2002
- }
2003
- if (typeof v.value === "string") {
2004
- if (v.value.toLowerCase().includes(this.inputValue.toLowerCase())) {
2005
- return true;
2006
- }
2007
- }
2008
- return false;
2009
- }
2010
- return true;
2011
- });
2012
- const newHighlightIndex = this.filteredOptions.findIndex((v) => v === currentHighlight);
2013
- this.cursor = newHighlightIndex < 0 ? 0 : newHighlightIndex;
2014
- this.render();
2015
- }
2016
- handleSpaceToggle() {
2017
- const v = this.filteredOptions[this.cursor];
2018
- if (v.selected) {
2019
- v.selected = false;
2020
- this.render();
2021
- } else if (v.disabled || this.value.filter((e) => e.selected).length >= this.maxChoices) {
2022
- return this.bell();
2023
- } else {
2024
- v.selected = true;
2025
- this.render();
2026
- }
2027
- }
2028
- handleInputChange(c) {
2029
- this.inputValue = this.inputValue + c;
2030
- this.updateFilteredOptions();
2031
- }
2032
- _(c, key) {
2033
- if (c === " ") {
2034
- this.handleSpaceToggle();
2035
- } else {
2036
- this.handleInputChange(c);
2037
- }
2038
- }
2039
- renderInstructions() {
2040
- if (this.instructions === void 0 || this.instructions) {
2041
- if (typeof this.instructions === "string") {
2042
- return this.instructions;
2043
- }
2044
- return `
2045
- Instructions:
2046
- ${figures.arrowUp}/${figures.arrowDown}: Highlight option
2047
- ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection
2048
- [a,b,c]/delete: Filter choices
2049
- enter/return: Complete answer
2050
- `;
2051
- }
2052
- return "";
2053
- }
2054
- renderCurrentInput() {
2055
- return `
2056
- Filtered results for: ${this.inputValue ? this.inputValue : color.gray("Enter something to filter")}
2057
- `;
2058
- }
2059
- renderOption(cursor2, v, i) {
2060
- let title;
2061
- if (v.disabled) title = cursor2 === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);
2062
- else title = cursor2 === i ? color.cyan().underline(v.title) : v.title;
2063
- return (v.selected ? color.green(figures.radioOn) : figures.radioOff) + " " + title;
2064
- }
2065
- renderDoneOrInstructions() {
2066
- if (this.done) {
2067
- return this.value.filter((e) => e.selected).map((v) => v.title).join(", ");
2068
- }
2069
- const output = [color.gray(this.hint), this.renderInstructions(), this.renderCurrentInput()];
2070
- if (this.filteredOptions.length && this.filteredOptions[this.cursor].disabled) {
2071
- output.push(color.yellow(this.warn));
2072
- }
2073
- return output.join(" ");
2074
- }
2075
- render() {
2076
- if (this.closed) return;
2077
- if (this.firstRender) this.out.write(cursor.hide);
2078
- super.render();
2079
- let prompt = [
2080
- style.symbol(this.done, this.aborted),
2081
- color.bold(this.msg),
2082
- style.delimiter(false),
2083
- this.renderDoneOrInstructions()
2084
- ].join(" ");
2085
- if (this.showMinError) {
2086
- prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`);
2087
- this.showMinError = false;
2088
- }
2089
- prompt += this.renderOptions(this.filteredOptions);
2090
- this.out.write(this.clear + prompt);
2091
- this.clear = clear(prompt, this.out.columns);
2092
- }
2093
- };
2094
- module2.exports = AutocompleteMultiselectPrompt;
2095
- }
2096
- });
2097
-
2098
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/confirm.js
2099
- var require_confirm = __commonJS({
2100
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/confirm.js"(exports2, module2) {
2101
- var color = require_kleur();
2102
- var Prompt = require_prompt();
2103
- var { style, clear } = require_util();
2104
- var { erase, cursor } = require_src();
2105
- var ConfirmPrompt = class extends Prompt {
2106
- constructor(opts = {}) {
2107
- super(opts);
2108
- this.msg = opts.message;
2109
- this.value = opts.initial;
2110
- this.initialValue = !!opts.initial;
2111
- this.yesMsg = opts.yes || "yes";
2112
- this.yesOption = opts.yesOption || "(Y/n)";
2113
- this.noMsg = opts.no || "no";
2114
- this.noOption = opts.noOption || "(y/N)";
2115
- this.render();
2116
- }
2117
- reset() {
2118
- this.value = this.initialValue;
2119
- this.fire();
2120
- this.render();
2121
- }
2122
- exit() {
2123
- this.abort();
2124
- }
2125
- abort() {
2126
- this.done = this.aborted = true;
2127
- this.fire();
2128
- this.render();
2129
- this.out.write("\n");
2130
- this.close();
2131
- }
2132
- submit() {
2133
- this.value = this.value || false;
2134
- this.done = true;
2135
- this.aborted = false;
2136
- this.fire();
2137
- this.render();
2138
- this.out.write("\n");
2139
- this.close();
2140
- }
2141
- _(c, key) {
2142
- if (c.toLowerCase() === "y") {
2143
- this.value = true;
2144
- return this.submit();
2145
- }
2146
- if (c.toLowerCase() === "n") {
2147
- this.value = false;
2148
- return this.submit();
2149
- }
2150
- return this.bell();
2151
- }
2152
- render() {
2153
- if (this.closed) return;
2154
- if (this.firstRender) this.out.write(cursor.hide);
2155
- else this.out.write(clear(this.outputText, this.out.columns));
2156
- super.render();
2157
- this.outputText = [
2158
- style.symbol(this.done, this.aborted),
2159
- color.bold(this.msg),
2160
- style.delimiter(this.done),
2161
- this.done ? this.value ? this.yesMsg : this.noMsg : color.gray(this.initialValue ? this.yesOption : this.noOption)
2162
- ].join(" ");
2163
- this.out.write(erase.line + cursor.to(0) + this.outputText);
2164
- }
2165
- };
2166
- module2.exports = ConfirmPrompt;
2167
- }
2168
- });
2169
-
2170
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/index.js
2171
- var require_elements = __commonJS({
2172
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/index.js"(exports2, module2) {
2173
- "use strict";
2174
- module2.exports = {
2175
- TextPrompt: require_text(),
2176
- SelectPrompt: require_select(),
2177
- TogglePrompt: require_toggle(),
2178
- DatePrompt: require_date(),
2179
- NumberPrompt: require_number(),
2180
- MultiselectPrompt: require_multiselect(),
2181
- AutocompletePrompt: require_autocomplete(),
2182
- AutocompleteMultiselectPrompt: require_autocompleteMultiselect(),
2183
- ConfirmPrompt: require_confirm()
2184
- };
2185
- }
2186
- });
2187
-
2188
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/prompts.js
2189
- var require_prompts = __commonJS({
2190
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/prompts.js"(exports2) {
29
+ // node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
30
+ var require_src = __commonJS({
31
+ "node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports2, module2) {
2191
32
  "use strict";
2192
- var $2 = exports2;
2193
- var el = require_elements();
2194
- var noop = (v) => v;
2195
- function toPrompt(type, args, opts = {}) {
2196
- return new Promise((res, rej) => {
2197
- const p = new el[type](args);
2198
- const onAbort = opts.onAbort || noop;
2199
- const onSubmit = opts.onSubmit || noop;
2200
- const onExit = opts.onExit || noop;
2201
- p.on("state", args.onState || noop);
2202
- p.on("submit", (x) => res(onSubmit(x)));
2203
- p.on("exit", (x) => res(onExit(x)));
2204
- p.on("abort", (x) => rej(onAbort(x)));
2205
- });
2206
- }
2207
- $2.text = (args) => toPrompt("TextPrompt", args);
2208
- $2.password = (args) => {
2209
- args.style = "password";
2210
- return $2.text(args);
2211
- };
2212
- $2.invisible = (args) => {
2213
- args.style = "invisible";
2214
- return $2.text(args);
2215
- };
2216
- $2.number = (args) => toPrompt("NumberPrompt", args);
2217
- $2.date = (args) => toPrompt("DatePrompt", args);
2218
- $2.confirm = (args) => toPrompt("ConfirmPrompt", args);
2219
- $2.list = (args) => {
2220
- const sep = args.separator || ",";
2221
- return toPrompt("TextPrompt", args, {
2222
- onSubmit: (str) => str.split(sep).map((s) => s.trim())
2223
- });
2224
- };
2225
- $2.toggle = (args) => toPrompt("TogglePrompt", args);
2226
- $2.select = (args) => toPrompt("SelectPrompt", args);
2227
- $2.multiselect = (args) => {
2228
- args.choices = [].concat(args.choices || []);
2229
- const toSelected = (items) => items.filter((item) => item.selected).map((item) => item.value);
2230
- return toPrompt("MultiselectPrompt", args, {
2231
- onAbort: toSelected,
2232
- onSubmit: toSelected
2233
- });
33
+ var ESC = "\x1B";
34
+ var CSI = `${ESC}[`;
35
+ var beep = "\x07";
36
+ var cursor = {
37
+ to(x2, y2) {
38
+ if (!y2) return `${CSI}${x2 + 1}G`;
39
+ return `${CSI}${y2 + 1};${x2 + 1}H`;
40
+ },
41
+ move(x2, y2) {
42
+ let ret = "";
43
+ if (x2 < 0) ret += `${CSI}${-x2}D`;
44
+ else if (x2 > 0) ret += `${CSI}${x2}C`;
45
+ if (y2 < 0) ret += `${CSI}${-y2}A`;
46
+ else if (y2 > 0) ret += `${CSI}${y2}B`;
47
+ return ret;
48
+ },
49
+ up: (count = 1) => `${CSI}${count}A`,
50
+ down: (count = 1) => `${CSI}${count}B`,
51
+ forward: (count = 1) => `${CSI}${count}C`,
52
+ backward: (count = 1) => `${CSI}${count}D`,
53
+ nextLine: (count = 1) => `${CSI}E`.repeat(count),
54
+ prevLine: (count = 1) => `${CSI}F`.repeat(count),
55
+ left: `${CSI}G`,
56
+ hide: `${CSI}?25l`,
57
+ show: `${CSI}?25h`,
58
+ save: `${ESC}7`,
59
+ restore: `${ESC}8`
2234
60
  };
2235
- $2.autocompleteMultiselect = (args) => {
2236
- args.choices = [].concat(args.choices || []);
2237
- const toSelected = (items) => items.filter((item) => item.selected).map((item) => item.value);
2238
- return toPrompt("AutocompleteMultiselectPrompt", args, {
2239
- onAbort: toSelected,
2240
- onSubmit: toSelected
2241
- });
61
+ var scroll = {
62
+ up: (count = 1) => `${CSI}S`.repeat(count),
63
+ down: (count = 1) => `${CSI}T`.repeat(count)
2242
64
  };
2243
- var byTitle = (input, choices) => Promise.resolve(
2244
- choices.filter((item) => item.title.slice(0, input.length).toLowerCase() === input.toLowerCase())
2245
- );
2246
- $2.autocomplete = (args) => {
2247
- args.suggest = args.suggest || byTitle;
2248
- args.choices = [].concat(args.choices || []);
2249
- return toPrompt("AutocompletePrompt", args);
65
+ var erase = {
66
+ screen: `${CSI}2J`,
67
+ up: (count = 1) => `${CSI}1J`.repeat(count),
68
+ down: (count = 1) => `${CSI}J`.repeat(count),
69
+ line: `${CSI}2K`,
70
+ lineEnd: `${CSI}K`,
71
+ lineStart: `${CSI}1K`,
72
+ lines(count) {
73
+ let clear = "";
74
+ for (let i = 0; i < count; i++)
75
+ clear += this.line + (i < count - 1 ? cursor.up() : "");
76
+ if (count)
77
+ clear += cursor.left;
78
+ return clear;
79
+ }
2250
80
  };
81
+ module2.exports = { cursor, scroll, erase, beep };
2251
82
  }
2252
83
  });
2253
84
 
2254
- // node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/index.js
2255
- var require_lib = __commonJS({
2256
- "node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/index.js"(exports2, module2) {
2257
- "use strict";
2258
- var prompts2 = require_prompts();
2259
- var passOn = ["suggest", "format", "onState", "validate", "onRender", "type"];
2260
- var noop = () => {
2261
- };
2262
- async function prompt(questions = [], { onSubmit = noop, onCancel = noop } = {}) {
2263
- const answers = {};
2264
- const override2 = prompt._override || {};
2265
- questions = [].concat(questions);
2266
- let answer, question, quit, name, type, lastPrompt;
2267
- const getFormattedAnswer = async (question2, answer2, skipValidation = false) => {
2268
- if (!skipValidation && question2.validate && question2.validate(answer2) !== true) {
2269
- return;
2270
- }
2271
- return question2.format ? await question2.format(answer2, answers) : answer2;
85
+ // node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
86
+ var require_picocolors = __commonJS({
87
+ "node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports2, module2) {
88
+ var p = process || {};
89
+ var argv = p.argv || [];
90
+ var env = p.env || {};
91
+ var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
92
+ var formatter = (open, close, replace = open) => (input) => {
93
+ let string = "" + input, index = string.indexOf(close, open.length);
94
+ return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
95
+ };
96
+ var replaceClose = (string, close, replace, index) => {
97
+ let result = "", cursor = 0;
98
+ do {
99
+ result += string.substring(cursor, index) + replace;
100
+ cursor = index + close.length;
101
+ index = string.indexOf(close, cursor);
102
+ } while (~index);
103
+ return result + string.substring(cursor);
104
+ };
105
+ var createColors = (enabled = isColorSupported) => {
106
+ let f = enabled ? formatter : () => String;
107
+ return {
108
+ isColorSupported: enabled,
109
+ reset: f("\x1B[0m", "\x1B[0m"),
110
+ bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
111
+ dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
112
+ italic: f("\x1B[3m", "\x1B[23m"),
113
+ underline: f("\x1B[4m", "\x1B[24m"),
114
+ inverse: f("\x1B[7m", "\x1B[27m"),
115
+ hidden: f("\x1B[8m", "\x1B[28m"),
116
+ strikethrough: f("\x1B[9m", "\x1B[29m"),
117
+ black: f("\x1B[30m", "\x1B[39m"),
118
+ red: f("\x1B[31m", "\x1B[39m"),
119
+ green: f("\x1B[32m", "\x1B[39m"),
120
+ yellow: f("\x1B[33m", "\x1B[39m"),
121
+ blue: f("\x1B[34m", "\x1B[39m"),
122
+ magenta: f("\x1B[35m", "\x1B[39m"),
123
+ cyan: f("\x1B[36m", "\x1B[39m"),
124
+ white: f("\x1B[37m", "\x1B[39m"),
125
+ gray: f("\x1B[90m", "\x1B[39m"),
126
+ bgBlack: f("\x1B[40m", "\x1B[49m"),
127
+ bgRed: f("\x1B[41m", "\x1B[49m"),
128
+ bgGreen: f("\x1B[42m", "\x1B[49m"),
129
+ bgYellow: f("\x1B[43m", "\x1B[49m"),
130
+ bgBlue: f("\x1B[44m", "\x1B[49m"),
131
+ bgMagenta: f("\x1B[45m", "\x1B[49m"),
132
+ bgCyan: f("\x1B[46m", "\x1B[49m"),
133
+ bgWhite: f("\x1B[47m", "\x1B[49m"),
134
+ blackBright: f("\x1B[90m", "\x1B[39m"),
135
+ redBright: f("\x1B[91m", "\x1B[39m"),
136
+ greenBright: f("\x1B[92m", "\x1B[39m"),
137
+ yellowBright: f("\x1B[93m", "\x1B[39m"),
138
+ blueBright: f("\x1B[94m", "\x1B[39m"),
139
+ magentaBright: f("\x1B[95m", "\x1B[39m"),
140
+ cyanBright: f("\x1B[96m", "\x1B[39m"),
141
+ whiteBright: f("\x1B[97m", "\x1B[39m"),
142
+ bgBlackBright: f("\x1B[100m", "\x1B[49m"),
143
+ bgRedBright: f("\x1B[101m", "\x1B[49m"),
144
+ bgGreenBright: f("\x1B[102m", "\x1B[49m"),
145
+ bgYellowBright: f("\x1B[103m", "\x1B[49m"),
146
+ bgBlueBright: f("\x1B[104m", "\x1B[49m"),
147
+ bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
148
+ bgCyanBright: f("\x1B[106m", "\x1B[49m"),
149
+ bgWhiteBright: f("\x1B[107m", "\x1B[49m")
2272
150
  };
2273
- for (question of questions) {
2274
- ({ name, type } = question);
2275
- if (typeof type === "function") {
2276
- type = await type(answer, { ...answers }, question);
2277
- question["type"] = type;
2278
- }
2279
- if (!type) continue;
2280
- for (let key in question) {
2281
- if (passOn.includes(key)) continue;
2282
- let value = question[key];
2283
- question[key] = typeof value === "function" ? await value(answer, { ...answers }, lastPrompt) : value;
2284
- }
2285
- lastPrompt = question;
2286
- if (typeof question.message !== "string") {
2287
- throw new Error("prompt message is required");
2288
- }
2289
- ({ name, type } = question);
2290
- if (prompts2[type] === void 0) {
2291
- throw new Error(`prompt type (${type}) is not defined`);
2292
- }
2293
- if (override2[question.name] !== void 0) {
2294
- answer = await getFormattedAnswer(question, override2[question.name]);
2295
- if (answer !== void 0) {
2296
- answers[name] = answer;
2297
- continue;
2298
- }
2299
- }
2300
- try {
2301
- answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : await prompts2[type](question);
2302
- answers[name] = answer = await getFormattedAnswer(question, answer, true);
2303
- quit = await onSubmit(question, answer, answers);
2304
- } catch (err) {
2305
- quit = !await onCancel(question, answers);
2306
- }
2307
- if (quit) return answers;
2308
- }
2309
- return answers;
2310
- }
2311
- function getInjectedAnswer(injected, deafultValue) {
2312
- const answer = injected.shift();
2313
- if (answer instanceof Error) {
2314
- throw answer;
2315
- }
2316
- return answer === void 0 ? deafultValue : answer;
2317
- }
2318
- function inject(answers) {
2319
- prompt._injected = (prompt._injected || []).concat(answers);
2320
- }
2321
- function override(answers) {
2322
- prompt._override = Object.assign({}, answers);
2323
- }
2324
- module2.exports = Object.assign(prompt, { prompt, prompts: prompts2, inject, override });
151
+ };
152
+ module2.exports = createColors();
153
+ module2.exports.createColors = createColors;
2325
154
  }
2326
155
  });
2327
156
 
@@ -2348,8 +177,8 @@ var require_utils = __commonJS({
2348
177
  "'": "&#39;"
2349
178
  };
2350
179
  var _MATCH_HTML = /[&<>'"]/g;
2351
- function encode_char(c) {
2352
- return _ENCODE_HTML_RULES[c] || c;
180
+ function encode_char(c2) {
181
+ return _ENCODE_HTML_RULES[c2] || c2;
2353
182
  }
2354
183
  var escapeFuncStr = `var _ENCODE_HTML_RULES = {
2355
184
  "&": "&amp;"
@@ -2448,13 +277,13 @@ function encode_char(c) {
2448
277
  };
2449
278
  }();
2450
279
  exports2.hasOwnOnlyObject = function(obj) {
2451
- var o = exports2.createNullProtoObjWherePossible();
280
+ var o2 = exports2.createNullProtoObjWherePossible();
2452
281
  for (var p in obj) {
2453
282
  if (hasOwn(obj, p)) {
2454
- o[p] = obj[p];
283
+ o2[p] = obj[p];
2455
284
  }
2456
285
  }
2457
- return o;
286
+ return o2;
2458
287
  };
2459
288
  }
2460
289
  });
@@ -2555,8 +384,8 @@ var require_ejs = __commonJS({
2555
384
  };
2556
385
  function resolvePaths(name, paths) {
2557
386
  var filePath;
2558
- if (paths.some(function(v) {
2559
- filePath = exports2.resolveInclude(name, v, true);
387
+ if (paths.some(function(v2) {
388
+ filePath = exports2.resolveInclude(name, v2, true);
2560
389
  return fs7.existsSync(filePath);
2561
390
  })) {
2562
391
  return filePath;
@@ -2691,9 +520,9 @@ var require_ejs = __commonJS({
2691
520
  templ = new Template(template, opts);
2692
521
  return templ.compile();
2693
522
  };
2694
- exports2.render = function(template, d, o) {
2695
- var data = d || utils.createNullProtoObjWherePossible();
2696
- var opts = o || utils.createNullProtoObjWherePossible();
523
+ exports2.render = function(template, d3, o2) {
524
+ var data = d3 || utils.createNullProtoObjWherePossible();
525
+ var opts = o2 || utils.createNullProtoObjWherePossible();
2697
526
  if (arguments.length == 2) {
2698
527
  utils.shallowCopyFromList(opts, data, _OPTS_PASSABLE_WITH_DATA);
2699
528
  }
@@ -2856,39 +685,39 @@ var require_ejs = __commonJS({
2856
685
  if (opts.async) {
2857
686
  try {
2858
687
  ctor = new Function("return (async function(){}).constructor;")();
2859
- } catch (e) {
2860
- if (e instanceof SyntaxError) {
688
+ } catch (e2) {
689
+ if (e2 instanceof SyntaxError) {
2861
690
  throw new Error("This environment does not support async/await");
2862
691
  } else {
2863
- throw e;
692
+ throw e2;
2864
693
  }
2865
694
  }
2866
695
  } else {
2867
696
  ctor = Function;
2868
697
  }
2869
698
  fn = new ctor(opts.localsName + ", escapeFn, include, rethrow", src);
2870
- } catch (e) {
2871
- if (e instanceof SyntaxError) {
699
+ } catch (e2) {
700
+ if (e2 instanceof SyntaxError) {
2872
701
  if (opts.filename) {
2873
- e.message += " in " + opts.filename;
702
+ e2.message += " in " + opts.filename;
2874
703
  }
2875
- e.message += " while compiling ejs\n\n";
2876
- e.message += "If the above error is not helpful, you may want to try EJS-Lint:\n";
2877
- e.message += "https://github.com/RyanZim/EJS-Lint";
704
+ e2.message += " while compiling ejs\n\n";
705
+ e2.message += "If the above error is not helpful, you may want to try EJS-Lint:\n";
706
+ e2.message += "https://github.com/RyanZim/EJS-Lint";
2878
707
  if (!opts.async) {
2879
- e.message += "\n";
2880
- e.message += "Or, if you meant to create an async function, pass `async: true` as an option.";
708
+ e2.message += "\n";
709
+ e2.message += "Or, if you meant to create an async function, pass `async: true` as an option.";
2881
710
  }
2882
711
  }
2883
- throw e;
712
+ throw e2;
2884
713
  }
2885
714
  var returnedFn = opts.client ? fn : function anonymous(data) {
2886
715
  var include = function(path8, includeData) {
2887
- var d = utils.shallowCopy(utils.createNullProtoObjWherePossible(), data);
716
+ var d3 = utils.shallowCopy(utils.createNullProtoObjWherePossible(), data);
2888
717
  if (includeData) {
2889
- d = utils.shallowCopy(d, includeData);
718
+ d3 = utils.shallowCopy(d3, includeData);
2890
719
  }
2891
- return includeFile(path8, opts)(d);
720
+ return includeFile(path8, opts)(d3);
2892
721
  };
2893
722
  return fn.apply(
2894
723
  opts.context,
@@ -2905,7 +734,7 @@ var require_ejs = __commonJS({
2905
734
  enumerable: false,
2906
735
  configurable: true
2907
736
  });
2908
- } catch (e) {
737
+ } catch (e2) {
2909
738
  }
2910
739
  }
2911
740
  return returnedFn;
@@ -2918,15 +747,15 @@ var require_ejs = __commonJS({
2918
747
  this.templateText = this.templateText.replace(/[ \t]*<%_/gm, "<%_").replace(/_%>[ \t]*/gm, "_%>");
2919
748
  var self = this;
2920
749
  var matches = this.parseTemplateText();
2921
- var d = this.opts.delimiter;
2922
- var o = this.opts.openDelimiter;
2923
- var c = this.opts.closeDelimiter;
750
+ var d3 = this.opts.delimiter;
751
+ var o2 = this.opts.openDelimiter;
752
+ var c2 = this.opts.closeDelimiter;
2924
753
  if (matches && matches.length) {
2925
754
  matches.forEach(function(line, index) {
2926
755
  var closing;
2927
- if (line.indexOf(o + d) === 0 && line.indexOf(o + d + d) !== 0) {
756
+ if (line.indexOf(o2 + d3) === 0 && line.indexOf(o2 + d3 + d3) !== 0) {
2928
757
  closing = matches[index + 2];
2929
- if (!(closing == d + c || closing == "-" + d + c || closing == "_" + d + c)) {
758
+ if (!(closing == d3 + c2 || closing == "-" + d3 + c2 || closing == "_" + d3 + c2)) {
2930
759
  throw new Error('Could not find matching close tag for "' + line + '".');
2931
760
  }
2932
761
  }
@@ -2971,36 +800,36 @@ var require_ejs = __commonJS({
2971
800
  },
2972
801
  scanLine: function(line) {
2973
802
  var self = this;
2974
- var d = this.opts.delimiter;
2975
- var o = this.opts.openDelimiter;
2976
- var c = this.opts.closeDelimiter;
803
+ var d3 = this.opts.delimiter;
804
+ var o2 = this.opts.openDelimiter;
805
+ var c2 = this.opts.closeDelimiter;
2977
806
  var newLineCount = 0;
2978
807
  newLineCount = line.split("\n").length - 1;
2979
808
  switch (line) {
2980
- case o + d:
2981
- case o + d + "_":
809
+ case o2 + d3:
810
+ case o2 + d3 + "_":
2982
811
  this.mode = Template.modes.EVAL;
2983
812
  break;
2984
- case o + d + "=":
813
+ case o2 + d3 + "=":
2985
814
  this.mode = Template.modes.ESCAPED;
2986
815
  break;
2987
- case o + d + "-":
816
+ case o2 + d3 + "-":
2988
817
  this.mode = Template.modes.RAW;
2989
818
  break;
2990
- case o + d + "#":
819
+ case o2 + d3 + "#":
2991
820
  this.mode = Template.modes.COMMENT;
2992
821
  break;
2993
- case o + d + d:
822
+ case o2 + d3 + d3:
2994
823
  this.mode = Template.modes.LITERAL;
2995
- this.source += ' ; __append("' + line.replace(o + d + d, o + d) + '")\n';
824
+ this.source += ' ; __append("' + line.replace(o2 + d3 + d3, o2 + d3) + '")\n';
2996
825
  break;
2997
- case d + d + c:
826
+ case d3 + d3 + c2:
2998
827
  this.mode = Template.modes.LITERAL;
2999
- this.source += ' ; __append("' + line.replace(d + d + c, d + c) + '")\n';
828
+ this.source += ' ; __append("' + line.replace(d3 + d3 + c2, d3 + c2) + '")\n';
3000
829
  break;
3001
- case d + c:
3002
- case "-" + d + c:
3003
- case "_" + d + c:
830
+ case d3 + c2:
831
+ case "-" + d3 + c2:
832
+ case "_" + d3 + c2:
3004
833
  if (this.mode == Template.modes.LITERAL) {
3005
834
  this._addOutput(line);
3006
835
  }
@@ -3061,57 +890,598 @@ var require_ejs = __commonJS({
3061
890
  var fs6 = __toESM(require("fs"), 1);
3062
891
  var path6 = __toESM(require("path"), 1);
3063
892
  var import_node_util = require("util");
3064
- var import_prompts = __toESM(require_lib(), 1);
3065
893
 
3066
- // node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs
3067
- var FORCE_COLOR;
3068
- var NODE_DISABLE_COLORS;
3069
- var NO_COLOR;
3070
- var TERM;
3071
- var isTTY = true;
3072
- if (typeof process !== "undefined") {
3073
- ({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {});
3074
- isTTY = process.stdout && process.stdout.isTTY;
894
+ // node_modules/.pnpm/@clack+core@0.4.1/node_modules/@clack/core/dist/index.mjs
895
+ var import_sisteransi = __toESM(require_src(), 1);
896
+ var import_node_process = require("process");
897
+ var import_node_readline = __toESM(require("readline"), 1);
898
+ var import_node_tty = require("tty");
899
+ var import_picocolors = __toESM(require_picocolors(), 1);
900
+ function J({ onlyFirst: t = false } = {}) {
901
+ const F2 = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
902
+ return new RegExp(F2, t ? void 0 : "g");
3075
903
  }
3076
- var $ = {
3077
- enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== "dumb" && (FORCE_COLOR != null && FORCE_COLOR !== "0" || isTTY)
3078
- };
3079
- function init(x, y) {
3080
- let rgx = new RegExp(`\\x1b\\[${y}m`, "g");
3081
- let open = `\x1B[${x}m`, close = `\x1B[${y}m`;
3082
- return function(txt) {
3083
- if (!$.enabled || txt == null) return txt;
3084
- return open + (!!~("" + txt).indexOf(close) ? txt.replace(rgx, close + open) : txt) + close;
904
+ var Q = J();
905
+ function T(t) {
906
+ if (typeof t != "string") throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);
907
+ return t.replace(Q, "");
908
+ }
909
+ function O(t) {
910
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
911
+ }
912
+ var P = { exports: {} };
913
+ (function(t) {
914
+ var u2 = {};
915
+ t.exports = u2, u2.eastAsianWidth = function(e2) {
916
+ var s = e2.charCodeAt(0), i = e2.length == 2 ? e2.charCodeAt(1) : 0, D2 = s;
917
+ return 55296 <= s && s <= 56319 && 56320 <= i && i <= 57343 && (s &= 1023, i &= 1023, D2 = s << 10 | i, D2 += 65536), D2 == 12288 || 65281 <= D2 && D2 <= 65376 || 65504 <= D2 && D2 <= 65510 ? "F" : D2 == 8361 || 65377 <= D2 && D2 <= 65470 || 65474 <= D2 && D2 <= 65479 || 65482 <= D2 && D2 <= 65487 || 65490 <= D2 && D2 <= 65495 || 65498 <= D2 && D2 <= 65500 || 65512 <= D2 && D2 <= 65518 ? "H" : 4352 <= D2 && D2 <= 4447 || 4515 <= D2 && D2 <= 4519 || 4602 <= D2 && D2 <= 4607 || 9001 <= D2 && D2 <= 9002 || 11904 <= D2 && D2 <= 11929 || 11931 <= D2 && D2 <= 12019 || 12032 <= D2 && D2 <= 12245 || 12272 <= D2 && D2 <= 12283 || 12289 <= D2 && D2 <= 12350 || 12353 <= D2 && D2 <= 12438 || 12441 <= D2 && D2 <= 12543 || 12549 <= D2 && D2 <= 12589 || 12593 <= D2 && D2 <= 12686 || 12688 <= D2 && D2 <= 12730 || 12736 <= D2 && D2 <= 12771 || 12784 <= D2 && D2 <= 12830 || 12832 <= D2 && D2 <= 12871 || 12880 <= D2 && D2 <= 13054 || 13056 <= D2 && D2 <= 19903 || 19968 <= D2 && D2 <= 42124 || 42128 <= D2 && D2 <= 42182 || 43360 <= D2 && D2 <= 43388 || 44032 <= D2 && D2 <= 55203 || 55216 <= D2 && D2 <= 55238 || 55243 <= D2 && D2 <= 55291 || 63744 <= D2 && D2 <= 64255 || 65040 <= D2 && D2 <= 65049 || 65072 <= D2 && D2 <= 65106 || 65108 <= D2 && D2 <= 65126 || 65128 <= D2 && D2 <= 65131 || 110592 <= D2 && D2 <= 110593 || 127488 <= D2 && D2 <= 127490 || 127504 <= D2 && D2 <= 127546 || 127552 <= D2 && D2 <= 127560 || 127568 <= D2 && D2 <= 127569 || 131072 <= D2 && D2 <= 194367 || 177984 <= D2 && D2 <= 196605 || 196608 <= D2 && D2 <= 262141 ? "W" : 32 <= D2 && D2 <= 126 || 162 <= D2 && D2 <= 163 || 165 <= D2 && D2 <= 166 || D2 == 172 || D2 == 175 || 10214 <= D2 && D2 <= 10221 || 10629 <= D2 && D2 <= 10630 ? "Na" : D2 == 161 || D2 == 164 || 167 <= D2 && D2 <= 168 || D2 == 170 || 173 <= D2 && D2 <= 174 || 176 <= D2 && D2 <= 180 || 182 <= D2 && D2 <= 186 || 188 <= D2 && D2 <= 191 || D2 == 198 || D2 == 208 || 215 <= D2 && D2 <= 216 || 222 <= D2 && D2 <= 225 || D2 == 230 || 232 <= D2 && D2 <= 234 || 236 <= D2 && D2 <= 237 || D2 == 240 || 242 <= D2 && D2 <= 243 || 247 <= D2 && D2 <= 250 || D2 == 252 || D2 == 254 || D2 == 257 || D2 == 273 || D2 == 275 || D2 == 283 || 294 <= D2 && D2 <= 295 || D2 == 299 || 305 <= D2 && D2 <= 307 || D2 == 312 || 319 <= D2 && D2 <= 322 || D2 == 324 || 328 <= D2 && D2 <= 331 || D2 == 333 || 338 <= D2 && D2 <= 339 || 358 <= D2 && D2 <= 359 || D2 == 363 || D2 == 462 || D2 == 464 || D2 == 466 || D2 == 468 || D2 == 470 || D2 == 472 || D2 == 474 || D2 == 476 || D2 == 593 || D2 == 609 || D2 == 708 || D2 == 711 || 713 <= D2 && D2 <= 715 || D2 == 717 || D2 == 720 || 728 <= D2 && D2 <= 731 || D2 == 733 || D2 == 735 || 768 <= D2 && D2 <= 879 || 913 <= D2 && D2 <= 929 || 931 <= D2 && D2 <= 937 || 945 <= D2 && D2 <= 961 || 963 <= D2 && D2 <= 969 || D2 == 1025 || 1040 <= D2 && D2 <= 1103 || D2 == 1105 || D2 == 8208 || 8211 <= D2 && D2 <= 8214 || 8216 <= D2 && D2 <= 8217 || 8220 <= D2 && D2 <= 8221 || 8224 <= D2 && D2 <= 8226 || 8228 <= D2 && D2 <= 8231 || D2 == 8240 || 8242 <= D2 && D2 <= 8243 || D2 == 8245 || D2 == 8251 || D2 == 8254 || D2 == 8308 || D2 == 8319 || 8321 <= D2 && D2 <= 8324 || D2 == 8364 || D2 == 8451 || D2 == 8453 || D2 == 8457 || D2 == 8467 || D2 == 8470 || 8481 <= D2 && D2 <= 8482 || D2 == 8486 || D2 == 8491 || 8531 <= D2 && D2 <= 8532 || 8539 <= D2 && D2 <= 8542 || 8544 <= D2 && D2 <= 8555 || 8560 <= D2 && D2 <= 8569 || D2 == 8585 || 8592 <= D2 && D2 <= 8601 || 8632 <= D2 && D2 <= 8633 || D2 == 8658 || D2 == 8660 || D2 == 8679 || D2 == 8704 || 8706 <= D2 && D2 <= 8707 || 8711 <= D2 && D2 <= 8712 || D2 == 8715 || D2 == 8719 || D2 == 8721 || D2 == 8725 || D2 == 8730 || 8733 <= D2 && D2 <= 8736 || D2 == 8739 || D2 == 8741 || 8743 <= D2 && D2 <= 8748 || D2 == 8750 || 8756 <= D2 && D2 <= 8759 || 8764 <= D2 && D2 <= 8765 || D2 == 8776 || D2 == 8780 || D2 == 8786 || 8800 <= D2 && D2 <= 8801 || 8804 <= D2 && D2 <= 8807 || 8810 <= D2 && D2 <= 8811 || 8814 <= D2 && D2 <= 8815 || 8834 <= D2 && D2 <= 8835 || 8838 <= D2 && D2 <= 8839 || D2 == 8853 || D2 == 8857 || D2 == 8869 || D2 == 8895 || D2 == 8978 || 9312 <= D2 && D2 <= 9449 || 9451 <= D2 && D2 <= 9547 || 9552 <= D2 && D2 <= 9587 || 9600 <= D2 && D2 <= 9615 || 9618 <= D2 && D2 <= 9621 || 9632 <= D2 && D2 <= 9633 || 9635 <= D2 && D2 <= 9641 || 9650 <= D2 && D2 <= 9651 || 9654 <= D2 && D2 <= 9655 || 9660 <= D2 && D2 <= 9661 || 9664 <= D2 && D2 <= 9665 || 9670 <= D2 && D2 <= 9672 || D2 == 9675 || 9678 <= D2 && D2 <= 9681 || 9698 <= D2 && D2 <= 9701 || D2 == 9711 || 9733 <= D2 && D2 <= 9734 || D2 == 9737 || 9742 <= D2 && D2 <= 9743 || 9748 <= D2 && D2 <= 9749 || D2 == 9756 || D2 == 9758 || D2 == 9792 || D2 == 9794 || 9824 <= D2 && D2 <= 9825 || 9827 <= D2 && D2 <= 9829 || 9831 <= D2 && D2 <= 9834 || 9836 <= D2 && D2 <= 9837 || D2 == 9839 || 9886 <= D2 && D2 <= 9887 || 9918 <= D2 && D2 <= 9919 || 9924 <= D2 && D2 <= 9933 || 9935 <= D2 && D2 <= 9953 || D2 == 9955 || 9960 <= D2 && D2 <= 9983 || D2 == 10045 || D2 == 10071 || 10102 <= D2 && D2 <= 10111 || 11093 <= D2 && D2 <= 11097 || 12872 <= D2 && D2 <= 12879 || 57344 <= D2 && D2 <= 63743 || 65024 <= D2 && D2 <= 65039 || D2 == 65533 || 127232 <= D2 && D2 <= 127242 || 127248 <= D2 && D2 <= 127277 || 127280 <= D2 && D2 <= 127337 || 127344 <= D2 && D2 <= 127386 || 917760 <= D2 && D2 <= 917999 || 983040 <= D2 && D2 <= 1048573 || 1048576 <= D2 && D2 <= 1114109 ? "A" : "N";
918
+ }, u2.characterLength = function(e2) {
919
+ var s = this.eastAsianWidth(e2);
920
+ return s == "F" || s == "W" || s == "A" ? 2 : 1;
921
+ };
922
+ function F2(e2) {
923
+ return e2.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
924
+ }
925
+ u2.length = function(e2) {
926
+ for (var s = F2(e2), i = 0, D2 = 0; D2 < s.length; D2++) i = i + this.characterLength(s[D2]);
927
+ return i;
928
+ }, u2.slice = function(e2, s, i) {
929
+ textLen = u2.length(e2), s = s || 0, i = i || 1, s < 0 && (s = textLen + s), i < 0 && (i = textLen + i);
930
+ for (var D2 = "", C2 = 0, o2 = F2(e2), E = 0; E < o2.length; E++) {
931
+ var a = o2[E], n = u2.length(a);
932
+ if (C2 >= s - (n == 2 ? 1 : 0)) if (C2 + n <= i) D2 += a;
933
+ else break;
934
+ C2 += n;
935
+ }
936
+ return D2;
3085
937
  };
938
+ })(P);
939
+ var X = P.exports;
940
+ var DD = O(X);
941
+ var uD = function() {
942
+ 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;
943
+ };
944
+ var FD = O(uD);
945
+ function A(t, u2 = {}) {
946
+ if (typeof t != "string" || t.length === 0 || (u2 = { ambiguousIsNarrow: true, ...u2 }, t = T(t), t.length === 0)) return 0;
947
+ t = t.replace(FD(), " ");
948
+ const F2 = u2.ambiguousIsNarrow ? 1 : 2;
949
+ let e2 = 0;
950
+ for (const s of t) {
951
+ const i = s.codePointAt(0);
952
+ if (i <= 31 || i >= 127 && i <= 159 || i >= 768 && i <= 879) continue;
953
+ switch (DD.eastAsianWidth(s)) {
954
+ case "F":
955
+ case "W":
956
+ e2 += 2;
957
+ break;
958
+ case "A":
959
+ e2 += F2;
960
+ break;
961
+ default:
962
+ e2 += 1;
963
+ }
964
+ }
965
+ return e2;
966
+ }
967
+ var m = 10;
968
+ var L = (t = 0) => (u2) => `\x1B[${u2 + t}m`;
969
+ var N = (t = 0) => (u2) => `\x1B[${38 + t};5;${u2}m`;
970
+ var I = (t = 0) => (u2, F2, e2) => `\x1B[${38 + t};2;${u2};${F2};${e2}m`;
971
+ var 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] } };
972
+ Object.keys(r.modifier);
973
+ var tD = Object.keys(r.color);
974
+ var eD = Object.keys(r.bgColor);
975
+ [...tD, ...eD];
976
+ function sD() {
977
+ const t = /* @__PURE__ */ new Map();
978
+ for (const [u2, F2] of Object.entries(r)) {
979
+ for (const [e2, s] of Object.entries(F2)) r[e2] = { open: `\x1B[${s[0]}m`, close: `\x1B[${s[1]}m` }, F2[e2] = r[e2], t.set(s[0], s[1]);
980
+ Object.defineProperty(r, u2, { value: F2, enumerable: false });
981
+ }
982
+ 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 = N(), r.color.ansi16m = I(), r.bgColor.ansi = L(m), r.bgColor.ansi256 = N(m), r.bgColor.ansi16m = I(m), Object.defineProperties(r, { rgbToAnsi256: { value: (u2, F2, e2) => u2 === F2 && F2 === e2 ? u2 < 8 ? 16 : u2 > 248 ? 231 : Math.round((u2 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u2 / 255 * 5) + 6 * Math.round(F2 / 255 * 5) + Math.round(e2 / 255 * 5), enumerable: false }, hexToRgb: { value: (u2) => {
983
+ const F2 = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u2.toString(16));
984
+ if (!F2) return [0, 0, 0];
985
+ let [e2] = F2;
986
+ e2.length === 3 && (e2 = [...e2].map((i) => i + i).join(""));
987
+ const s = Number.parseInt(e2, 16);
988
+ return [s >> 16 & 255, s >> 8 & 255, s & 255];
989
+ }, enumerable: false }, hexToAnsi256: { value: (u2) => r.rgbToAnsi256(...r.hexToRgb(u2)), enumerable: false }, ansi256ToAnsi: { value: (u2) => {
990
+ if (u2 < 8) return 30 + u2;
991
+ if (u2 < 16) return 90 + (u2 - 8);
992
+ let F2, e2, s;
993
+ if (u2 >= 232) F2 = ((u2 - 232) * 10 + 8) / 255, e2 = F2, s = F2;
994
+ else {
995
+ u2 -= 16;
996
+ const C2 = u2 % 36;
997
+ F2 = Math.floor(u2 / 36) / 5, e2 = Math.floor(C2 / 6) / 5, s = C2 % 6 / 5;
998
+ }
999
+ const i = Math.max(F2, e2, s) * 2;
1000
+ if (i === 0) return 30;
1001
+ let D2 = 30 + (Math.round(s) << 2 | Math.round(e2) << 1 | Math.round(F2));
1002
+ return i === 2 && (D2 += 60), D2;
1003
+ }, enumerable: false }, rgbToAnsi: { value: (u2, F2, e2) => r.ansi256ToAnsi(r.rgbToAnsi256(u2, F2, e2)), enumerable: false }, hexToAnsi: { value: (u2) => r.ansi256ToAnsi(r.hexToAnsi256(u2)), enumerable: false } }), r;
1004
+ }
1005
+ var iD = sD();
1006
+ var v = /* @__PURE__ */ new Set(["\x1B", "\x9B"]);
1007
+ var CD = 39;
1008
+ var w = "\x07";
1009
+ var W = "[";
1010
+ var rD = "]";
1011
+ var R = "m";
1012
+ var y = `${rD}8;;`;
1013
+ var V = (t) => `${v.values().next().value}${W}${t}${R}`;
1014
+ var z = (t) => `${v.values().next().value}${y}${t}${w}`;
1015
+ var ED = (t) => t.split(" ").map((u2) => A(u2));
1016
+ var _ = (t, u2, F2) => {
1017
+ const e2 = [...u2];
1018
+ let s = false, i = false, D2 = A(T(t[t.length - 1]));
1019
+ for (const [C2, o2] of e2.entries()) {
1020
+ const E = A(o2);
1021
+ if (D2 + E <= F2 ? t[t.length - 1] += o2 : (t.push(o2), D2 = 0), v.has(o2) && (s = true, i = e2.slice(C2 + 1).join("").startsWith(y)), s) {
1022
+ i ? o2 === w && (s = false, i = false) : o2 === R && (s = false);
1023
+ continue;
1024
+ }
1025
+ D2 += E, D2 === F2 && C2 < e2.length - 1 && (t.push(""), D2 = 0);
1026
+ }
1027
+ !D2 && t[t.length - 1].length > 0 && t.length > 1 && (t[t.length - 2] += t.pop());
1028
+ };
1029
+ var nD = (t) => {
1030
+ const u2 = t.split(" ");
1031
+ let F2 = u2.length;
1032
+ for (; F2 > 0 && !(A(u2[F2 - 1]) > 0); ) F2--;
1033
+ return F2 === u2.length ? t : u2.slice(0, F2).join(" ") + u2.slice(F2).join("");
1034
+ };
1035
+ var oD = (t, u2, F2 = {}) => {
1036
+ if (F2.trim !== false && t.trim() === "") return "";
1037
+ let e2 = "", s, i;
1038
+ const D2 = ED(t);
1039
+ let C2 = [""];
1040
+ for (const [E, a] of t.split(" ").entries()) {
1041
+ F2.trim !== false && (C2[C2.length - 1] = C2[C2.length - 1].trimStart());
1042
+ let n = A(C2[C2.length - 1]);
1043
+ if (E !== 0 && (n >= u2 && (F2.wordWrap === false || F2.trim === false) && (C2.push(""), n = 0), (n > 0 || F2.trim === false) && (C2[C2.length - 1] += " ", n++)), F2.hard && D2[E] > u2) {
1044
+ const B2 = u2 - n, p = 1 + Math.floor((D2[E] - B2 - 1) / u2);
1045
+ Math.floor((D2[E] - 1) / u2) < p && C2.push(""), _(C2, a, u2);
1046
+ continue;
1047
+ }
1048
+ if (n + D2[E] > u2 && n > 0 && D2[E] > 0) {
1049
+ if (F2.wordWrap === false && n < u2) {
1050
+ _(C2, a, u2);
1051
+ continue;
1052
+ }
1053
+ C2.push("");
1054
+ }
1055
+ if (n + D2[E] > u2 && F2.wordWrap === false) {
1056
+ _(C2, a, u2);
1057
+ continue;
1058
+ }
1059
+ C2[C2.length - 1] += a;
1060
+ }
1061
+ F2.trim !== false && (C2 = C2.map((E) => nD(E)));
1062
+ const o2 = [...C2.join(`
1063
+ `)];
1064
+ for (const [E, a] of o2.entries()) {
1065
+ if (e2 += a, v.has(a)) {
1066
+ const { groups: B2 } = new RegExp(`(?:\\${W}(?<code>\\d+)m|\\${y}(?<uri>.*)${w})`).exec(o2.slice(E).join("")) || { groups: {} };
1067
+ if (B2.code !== void 0) {
1068
+ const p = Number.parseFloat(B2.code);
1069
+ s = p === CD ? void 0 : p;
1070
+ } else B2.uri !== void 0 && (i = B2.uri.length === 0 ? void 0 : B2.uri);
1071
+ }
1072
+ const n = iD.codes.get(Number(s));
1073
+ o2[E + 1] === `
1074
+ ` ? (i && (e2 += z("")), s && n && (e2 += V(n))) : a === `
1075
+ ` && (s && n && (e2 += V(s)), i && (e2 += z(i)));
1076
+ }
1077
+ return e2;
1078
+ };
1079
+ function G(t, u2, F2) {
1080
+ return String(t).normalize().replace(/\r\n/g, `
1081
+ `).split(`
1082
+ `).map((e2) => oD(e2, u2, F2)).join(`
1083
+ `);
1084
+ }
1085
+ var aD = ["up", "down", "left", "right", "space", "enter", "cancel"];
1086
+ var c = { actions: new Set(aD), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]) };
1087
+ function k(t, u2) {
1088
+ if (typeof t == "string") return c.aliases.get(t) === u2;
1089
+ for (const F2 of t) if (F2 !== void 0 && k(F2, u2)) return true;
1090
+ return false;
1091
+ }
1092
+ function lD(t, u2) {
1093
+ if (t === u2) return;
1094
+ const F2 = t.split(`
1095
+ `), e2 = u2.split(`
1096
+ `), s = [];
1097
+ for (let i = 0; i < Math.max(F2.length, e2.length); i++) F2[i] !== e2[i] && s.push(i);
1098
+ return s;
1099
+ }
1100
+ var xD = globalThis.process.platform.startsWith("win");
1101
+ var S = Symbol("clack:cancel");
1102
+ function BD(t) {
1103
+ return t === S;
1104
+ }
1105
+ function d(t, u2) {
1106
+ const F2 = t;
1107
+ F2.isTTY && F2.setRawMode(u2);
1108
+ }
1109
+ var AD = Object.defineProperty;
1110
+ var pD = (t, u2, F2) => u2 in t ? AD(t, u2, { enumerable: true, configurable: true, writable: true, value: F2 }) : t[u2] = F2;
1111
+ var h = (t, u2, F2) => (pD(t, typeof u2 != "symbol" ? u2 + "" : u2, F2), F2);
1112
+ var x = class {
1113
+ constructor(u2, F2 = true) {
1114
+ h(this, "input"), h(this, "output"), h(this, "_abortSignal"), h(this, "rl"), h(this, "opts"), h(this, "_render"), h(this, "_track", false), h(this, "_prevFrame", ""), h(this, "_subscribers", /* @__PURE__ */ new Map()), h(this, "_cursor", 0), h(this, "state", "initial"), h(this, "error", ""), h(this, "value");
1115
+ const { input: e2 = import_node_process.stdin, output: s = import_node_process.stdout, render: i, signal: D2, ...C2 } = u2;
1116
+ this.opts = C2, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = i.bind(this), this._track = F2, this._abortSignal = D2, this.input = e2, this.output = s;
1117
+ }
1118
+ unsubscribe() {
1119
+ this._subscribers.clear();
1120
+ }
1121
+ setSubscriber(u2, F2) {
1122
+ const e2 = this._subscribers.get(u2) ?? [];
1123
+ e2.push(F2), this._subscribers.set(u2, e2);
1124
+ }
1125
+ on(u2, F2) {
1126
+ this.setSubscriber(u2, { cb: F2 });
1127
+ }
1128
+ once(u2, F2) {
1129
+ this.setSubscriber(u2, { cb: F2, once: true });
1130
+ }
1131
+ emit(u2, ...F2) {
1132
+ const e2 = this._subscribers.get(u2) ?? [], s = [];
1133
+ for (const i of e2) i.cb(...F2), i.once && s.push(() => e2.splice(e2.indexOf(i), 1));
1134
+ for (const i of s) i();
1135
+ }
1136
+ prompt() {
1137
+ return new Promise((u2, F2) => {
1138
+ if (this._abortSignal) {
1139
+ if (this._abortSignal.aborted) return this.state = "cancel", this.close(), u2(S);
1140
+ this._abortSignal.addEventListener("abort", () => {
1141
+ this.state = "cancel", this.close();
1142
+ }, { once: true });
1143
+ }
1144
+ const e2 = new import_node_tty.WriteStream(0);
1145
+ e2._write = (s, i, D2) => {
1146
+ var _a, _b;
1147
+ this._track && (this.value = (_a = this.rl) == null ? void 0 : _a.line.replace(/\t/g, ""), this._cursor = ((_b = this.rl) == null ? void 0 : _b.cursor) ?? 0, this.emit("value", this.value)), D2();
1148
+ }, this.input.pipe(e2), this.rl = import_node_readline.default.createInterface({ input: this.input, output: e2, tabSize: 2, prompt: "", escapeCodeTimeout: 50 }), import_node_readline.default.emitKeypressEvents(this.input, this.rl), this.rl.prompt(), this.opts.initialValue !== void 0 && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), d(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
1149
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), d(this.input, false), u2(this.value);
1150
+ }), this.once("cancel", () => {
1151
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), d(this.input, false), u2(S);
1152
+ });
1153
+ });
1154
+ }
1155
+ onKeypress(u2, F2) {
1156
+ var _a, _b;
1157
+ if (this.state === "error" && (this.state = "active"), (F2 == null ? void 0 : F2.name) && (!this._track && c.aliases.has(F2.name) && this.emit("cursor", c.aliases.get(F2.name)), c.actions.has(F2.name) && this.emit("cursor", F2.name)), u2 && (u2.toLowerCase() === "y" || u2.toLowerCase() === "n") && this.emit("confirm", u2.toLowerCase() === "y"), u2 === " " && this.opts.placeholder && (this.value || ((_a = this.rl) == null ? void 0 : _a.write(this.opts.placeholder), this.emit("value", this.opts.placeholder))), u2 && this.emit("key", u2.toLowerCase()), (F2 == null ? void 0 : F2.name) === "return") {
1158
+ if (this.opts.validate) {
1159
+ const e2 = this.opts.validate(this.value);
1160
+ e2 && (this.error = e2 instanceof Error ? e2.message : e2, this.state = "error", (_b = this.rl) == null ? void 0 : _b.write(this.value));
1161
+ }
1162
+ this.state !== "error" && (this.state = "submit");
1163
+ }
1164
+ k([u2, F2 == null ? void 0 : F2.name, F2 == null ? void 0 : F2.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
1165
+ }
1166
+ close() {
1167
+ var _a;
1168
+ this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
1169
+ `), d(this.input, false), (_a = this.rl) == null ? void 0 : _a.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
1170
+ }
1171
+ restoreCursor() {
1172
+ const u2 = G(this._prevFrame, process.stdout.columns, { hard: true }).split(`
1173
+ `).length - 1;
1174
+ this.output.write(import_sisteransi.cursor.move(-999, u2 * -1));
1175
+ }
1176
+ render() {
1177
+ const u2 = G(this._render(this) ?? "", process.stdout.columns, { hard: true });
1178
+ if (u2 !== this._prevFrame) {
1179
+ if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
1180
+ else {
1181
+ const F2 = lD(this._prevFrame, u2);
1182
+ if (this.restoreCursor(), F2 && (F2 == null ? void 0 : F2.length) === 1) {
1183
+ const e2 = F2[0];
1184
+ this.output.write(import_sisteransi.cursor.move(0, e2)), this.output.write(import_sisteransi.erase.lines(1));
1185
+ const s = u2.split(`
1186
+ `);
1187
+ this.output.write(s[e2]), this._prevFrame = u2, this.output.write(import_sisteransi.cursor.move(0, s.length - e2 - 1));
1188
+ return;
1189
+ }
1190
+ if (F2 && (F2 == null ? void 0 : F2.length) > 1) {
1191
+ const e2 = F2[0];
1192
+ this.output.write(import_sisteransi.cursor.move(0, e2)), this.output.write(import_sisteransi.erase.down());
1193
+ const s = u2.split(`
1194
+ `).slice(e2);
1195
+ this.output.write(s.join(`
1196
+ `)), this._prevFrame = u2;
1197
+ return;
1198
+ }
1199
+ this.output.write(import_sisteransi.erase.down());
1200
+ }
1201
+ this.output.write(u2), this.state === "initial" && (this.state = "active"), this._prevFrame = u2;
1202
+ }
1203
+ }
1204
+ };
1205
+ var fD = class extends x {
1206
+ get cursor() {
1207
+ return this.value ? 0 : 1;
1208
+ }
1209
+ get _value() {
1210
+ return this.cursor === 0;
1211
+ }
1212
+ constructor(u2) {
1213
+ super(u2, false), this.value = !!u2.initialValue, this.on("value", () => {
1214
+ this.value = this._value;
1215
+ }), this.on("confirm", (F2) => {
1216
+ this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = F2, this.state = "submit", this.close();
1217
+ }), this.on("cursor", () => {
1218
+ this.value = !this.value;
1219
+ });
1220
+ }
1221
+ };
1222
+ var bD = Object.defineProperty;
1223
+ var mD = (t, u2, F2) => u2 in t ? bD(t, u2, { enumerable: true, configurable: true, writable: true, value: F2 }) : t[u2] = F2;
1224
+ var Y = (t, u2, F2) => (mD(t, typeof u2 != "symbol" ? u2 + "" : u2, F2), F2);
1225
+ var wD = class extends x {
1226
+ constructor(u2) {
1227
+ super(u2, false), Y(this, "options"), Y(this, "cursor", 0), this.options = u2.options, this.value = [...u2.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: F2 }) => F2 === u2.cursorAt), 0), this.on("key", (F2) => {
1228
+ F2 === "a" && this.toggleAll();
1229
+ }), this.on("cursor", (F2) => {
1230
+ switch (F2) {
1231
+ case "left":
1232
+ case "up":
1233
+ this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
1234
+ break;
1235
+ case "down":
1236
+ case "right":
1237
+ this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
1238
+ break;
1239
+ case "space":
1240
+ this.toggleValue();
1241
+ break;
1242
+ }
1243
+ });
1244
+ }
1245
+ get _value() {
1246
+ return this.options[this.cursor].value;
1247
+ }
1248
+ toggleAll() {
1249
+ const u2 = this.value.length === this.options.length;
1250
+ this.value = u2 ? [] : this.options.map((F2) => F2.value);
1251
+ }
1252
+ toggleValue() {
1253
+ const u2 = this.value.includes(this._value);
1254
+ this.value = u2 ? this.value.filter((F2) => F2 !== this._value) : [...this.value, this._value];
1255
+ }
1256
+ };
1257
+ var SD = Object.defineProperty;
1258
+ var $D = (t, u2, F2) => u2 in t ? SD(t, u2, { enumerable: true, configurable: true, writable: true, value: F2 }) : t[u2] = F2;
1259
+ var q = (t, u2, F2) => ($D(t, typeof u2 != "symbol" ? u2 + "" : u2, F2), F2);
1260
+ var jD = class extends x {
1261
+ constructor(u2) {
1262
+ super(u2, false), q(this, "options"), q(this, "cursor", 0), this.options = u2.options, this.cursor = this.options.findIndex(({ value: F2 }) => F2 === u2.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (F2) => {
1263
+ switch (F2) {
1264
+ case "left":
1265
+ case "up":
1266
+ this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
1267
+ break;
1268
+ case "down":
1269
+ case "right":
1270
+ this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
1271
+ break;
1272
+ }
1273
+ this.changeValue();
1274
+ });
1275
+ }
1276
+ get _value() {
1277
+ return this.options[this.cursor];
1278
+ }
1279
+ changeValue() {
1280
+ this.value = this._value.value;
1281
+ }
1282
+ };
1283
+ var PD = class extends x {
1284
+ get valueWithCursor() {
1285
+ if (this.state === "submit") return this.value;
1286
+ if (this.cursor >= this.value.length) return `${this.value}\u2588`;
1287
+ const u2 = this.value.slice(0, this.cursor), [F2, ...e2] = this.value.slice(this.cursor);
1288
+ return `${u2}${import_picocolors.default.inverse(F2)}${e2.join("")}`;
1289
+ }
1290
+ get cursor() {
1291
+ return this._cursor;
1292
+ }
1293
+ constructor(u2) {
1294
+ super(u2), this.on("finalize", () => {
1295
+ this.value || (this.value = u2.defaultValue);
1296
+ });
1297
+ }
1298
+ };
1299
+
1300
+ // node_modules/.pnpm/@clack+prompts@0.10.0/node_modules/@clack/prompts/dist/index.mjs
1301
+ var import_node_process2 = __toESM(require("process"), 1);
1302
+ var import_picocolors2 = __toESM(require_picocolors(), 1);
1303
+ var import_sisteransi2 = __toESM(require_src(), 1);
1304
+ function ce() {
1305
+ return import_node_process2.default.platform !== "win32" ? import_node_process2.default.env.TERM !== "linux" : !!import_node_process2.default.env.CI || !!import_node_process2.default.env.WT_SESSION || !!import_node_process2.default.env.TERMINUS_SUBLIME || import_node_process2.default.env.ConEmuTask === "{cmd::Cmder}" || import_node_process2.default.env.TERM_PROGRAM === "Terminus-Sublime" || import_node_process2.default.env.TERM_PROGRAM === "vscode" || import_node_process2.default.env.TERM === "xterm-256color" || import_node_process2.default.env.TERM === "alacritty" || import_node_process2.default.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
3086
1306
  }
3087
- var reset = init(0, 0);
3088
- var bold = init(1, 22);
3089
- var dim = init(2, 22);
3090
- var italic = init(3, 23);
3091
- var underline = init(4, 24);
3092
- var inverse = init(7, 27);
3093
- var hidden = init(8, 28);
3094
- var strikethrough = init(9, 29);
3095
- var black = init(30, 39);
3096
- var red = init(31, 39);
3097
- var green = init(32, 39);
3098
- var yellow = init(33, 39);
3099
- var blue = init(34, 39);
3100
- var magenta = init(35, 39);
3101
- var cyan = init(36, 39);
3102
- var white = init(37, 39);
3103
- var gray = init(90, 39);
3104
- var grey = init(90, 39);
3105
- var bgBlack = init(40, 49);
3106
- var bgRed = init(41, 49);
3107
- var bgGreen = init(42, 49);
3108
- var bgYellow = init(43, 49);
3109
- var bgBlue = init(44, 49);
3110
- var bgMagenta = init(45, 49);
3111
- var bgCyan = init(46, 49);
3112
- var bgWhite = init(47, 49);
1307
+ var V2 = ce();
1308
+ var u = (t, n) => V2 ? t : n;
1309
+ var le = u("\u25C6", "*");
1310
+ var L2 = u("\u25A0", "x");
1311
+ var W2 = u("\u25B2", "x");
1312
+ var C = u("\u25C7", "o");
1313
+ var ue = u("\u250C", "T");
1314
+ var o = u("\u2502", "|");
1315
+ var d2 = u("\u2514", "\u2014");
1316
+ var k2 = u("\u25CF", ">");
1317
+ var P2 = u("\u25CB", " ");
1318
+ var A2 = u("\u25FB", "[\u2022]");
1319
+ var T2 = u("\u25FC", "[+]");
1320
+ var F = u("\u25FB", "[ ]");
1321
+ var $e = u("\u25AA", "\u2022");
1322
+ var _2 = u("\u2500", "-");
1323
+ var me = u("\u256E", "+");
1324
+ var de = u("\u251C", "+");
1325
+ var pe = u("\u256F", "+");
1326
+ var q2 = u("\u25CF", "\u2022");
1327
+ var D = u("\u25C6", "*");
1328
+ var U2 = u("\u25B2", "!");
1329
+ var K = u("\u25A0", "x");
1330
+ var w2 = (t) => {
1331
+ switch (t) {
1332
+ case "initial":
1333
+ case "active":
1334
+ return import_picocolors2.default.cyan(le);
1335
+ case "cancel":
1336
+ return import_picocolors2.default.red(L2);
1337
+ case "error":
1338
+ return import_picocolors2.default.yellow(W2);
1339
+ case "submit":
1340
+ return import_picocolors2.default.green(C);
1341
+ }
1342
+ };
1343
+ var B = (t) => {
1344
+ const { cursor: n, options: s, style: r2 } = t, i = t.maxItems ?? Number.POSITIVE_INFINITY, a = Math.max(process.stdout.rows - 4, 0), c2 = Math.min(a, Math.max(i, 5));
1345
+ let l2 = 0;
1346
+ n >= l2 + c2 - 3 ? l2 = Math.max(Math.min(n - c2 + 3, s.length - c2), 0) : n < l2 + 2 && (l2 = Math.max(n - 2, 0));
1347
+ const $2 = c2 < s.length && l2 > 0, p = c2 < s.length && l2 + c2 < s.length;
1348
+ return s.slice(l2, l2 + c2).map((M2, v2, x2) => {
1349
+ const j2 = v2 === 0 && $2, E = v2 === x2.length - 1 && p;
1350
+ return j2 || E ? import_picocolors2.default.dim("...") : r2(M2, v2 + l2 === n);
1351
+ });
1352
+ };
1353
+ var he = (t) => new PD({ validate: t.validate, placeholder: t.placeholder, defaultValue: t.defaultValue, initialValue: t.initialValue, render() {
1354
+ var _a;
1355
+ const n = `${import_picocolors2.default.gray(o)}
1356
+ ${w2(this.state)} ${t.message}
1357
+ `, s = t.placeholder ? import_picocolors2.default.inverse(t.placeholder[0]) + import_picocolors2.default.dim(t.placeholder.slice(1)) : import_picocolors2.default.inverse(import_picocolors2.default.hidden("_")), r2 = this.value ? this.valueWithCursor : s;
1358
+ switch (this.state) {
1359
+ case "error":
1360
+ return `${n.trim()}
1361
+ ${import_picocolors2.default.yellow(o)} ${r2}
1362
+ ${import_picocolors2.default.yellow(d2)} ${import_picocolors2.default.yellow(this.error)}
1363
+ `;
1364
+ case "submit":
1365
+ return `${n}${import_picocolors2.default.gray(o)} ${import_picocolors2.default.dim(this.value || t.placeholder)}`;
1366
+ case "cancel":
1367
+ return `${n}${import_picocolors2.default.gray(o)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(this.value ?? ""))}${((_a = this.value) == null ? void 0 : _a.trim()) ? `
1368
+ ${import_picocolors2.default.gray(o)}` : ""}`;
1369
+ default:
1370
+ return `${n}${import_picocolors2.default.cyan(o)} ${r2}
1371
+ ${import_picocolors2.default.cyan(d2)}
1372
+ `;
1373
+ }
1374
+ } }).prompt();
1375
+ var ye = (t) => {
1376
+ const n = t.active ?? "Yes", s = t.inactive ?? "No";
1377
+ return new fD({ active: n, inactive: s, initialValue: t.initialValue ?? true, render() {
1378
+ const r2 = `${import_picocolors2.default.gray(o)}
1379
+ ${w2(this.state)} ${t.message}
1380
+ `, i = this.value ? n : s;
1381
+ switch (this.state) {
1382
+ case "submit":
1383
+ return `${r2}${import_picocolors2.default.gray(o)} ${import_picocolors2.default.dim(i)}`;
1384
+ case "cancel":
1385
+ return `${r2}${import_picocolors2.default.gray(o)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(i))}
1386
+ ${import_picocolors2.default.gray(o)}`;
1387
+ default:
1388
+ return `${r2}${import_picocolors2.default.cyan(o)} ${this.value ? `${import_picocolors2.default.green(k2)} ${n}` : `${import_picocolors2.default.dim(P2)} ${import_picocolors2.default.dim(n)}`} ${import_picocolors2.default.dim("/")} ${this.value ? `${import_picocolors2.default.dim(P2)} ${import_picocolors2.default.dim(s)}` : `${import_picocolors2.default.green(k2)} ${s}`}
1389
+ ${import_picocolors2.default.cyan(d2)}
1390
+ `;
1391
+ }
1392
+ } }).prompt();
1393
+ };
1394
+ var ve = (t) => {
1395
+ const n = (s, r2) => {
1396
+ const i = s.label ?? String(s.value);
1397
+ switch (r2) {
1398
+ case "selected":
1399
+ return `${import_picocolors2.default.dim(i)}`;
1400
+ case "active":
1401
+ return `${import_picocolors2.default.green(k2)} ${i} ${s.hint ? import_picocolors2.default.dim(`(${s.hint})`) : ""}`;
1402
+ case "cancelled":
1403
+ return `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(i))}`;
1404
+ default:
1405
+ return `${import_picocolors2.default.dim(P2)} ${import_picocolors2.default.dim(i)}`;
1406
+ }
1407
+ };
1408
+ return new jD({ options: t.options, initialValue: t.initialValue, render() {
1409
+ const s = `${import_picocolors2.default.gray(o)}
1410
+ ${w2(this.state)} ${t.message}
1411
+ `;
1412
+ switch (this.state) {
1413
+ case "submit":
1414
+ return `${s}${import_picocolors2.default.gray(o)} ${n(this.options[this.cursor], "selected")}`;
1415
+ case "cancel":
1416
+ return `${s}${import_picocolors2.default.gray(o)} ${n(this.options[this.cursor], "cancelled")}
1417
+ ${import_picocolors2.default.gray(o)}`;
1418
+ default:
1419
+ return `${s}${import_picocolors2.default.cyan(o)} ${B({ cursor: this.cursor, options: this.options, maxItems: t.maxItems, style: (r2, i) => n(r2, i ? "active" : "inactive") }).join(`
1420
+ ${import_picocolors2.default.cyan(o)} `)}
1421
+ ${import_picocolors2.default.cyan(d2)}
1422
+ `;
1423
+ }
1424
+ } }).prompt();
1425
+ };
1426
+ var fe = (t) => {
1427
+ const n = (s, r2) => {
1428
+ const i = s.label ?? String(s.value);
1429
+ return r2 === "active" ? `${import_picocolors2.default.cyan(A2)} ${i} ${s.hint ? import_picocolors2.default.dim(`(${s.hint})`) : ""}` : r2 === "selected" ? `${import_picocolors2.default.green(T2)} ${import_picocolors2.default.dim(i)}` : r2 === "cancelled" ? `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(i))}` : r2 === "active-selected" ? `${import_picocolors2.default.green(T2)} ${i} ${s.hint ? import_picocolors2.default.dim(`(${s.hint})`) : ""}` : r2 === "submitted" ? `${import_picocolors2.default.dim(i)}` : `${import_picocolors2.default.dim(F)} ${import_picocolors2.default.dim(i)}`;
1430
+ };
1431
+ return new wD({ options: t.options, initialValues: t.initialValues, required: t.required ?? true, cursorAt: t.cursorAt, validate(s) {
1432
+ if (this.required && s.length === 0) return `Please select at least one option.
1433
+ ${import_picocolors2.default.reset(import_picocolors2.default.dim(`Press ${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(" space ")))} to select, ${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(" enter ")))} to submit`))}`;
1434
+ }, render() {
1435
+ const s = `${import_picocolors2.default.gray(o)}
1436
+ ${w2(this.state)} ${t.message}
1437
+ `, r2 = (i, a) => {
1438
+ const c2 = this.value.includes(i.value);
1439
+ return a && c2 ? n(i, "active-selected") : c2 ? n(i, "selected") : n(i, a ? "active" : "inactive");
1440
+ };
1441
+ switch (this.state) {
1442
+ case "submit":
1443
+ return `${s}${import_picocolors2.default.gray(o)} ${this.options.filter(({ value: i }) => this.value.includes(i)).map((i) => n(i, "submitted")).join(import_picocolors2.default.dim(", ")) || import_picocolors2.default.dim("none")}`;
1444
+ case "cancel": {
1445
+ const i = this.options.filter(({ value: a }) => this.value.includes(a)).map((a) => n(a, "cancelled")).join(import_picocolors2.default.dim(", "));
1446
+ return `${s}${import_picocolors2.default.gray(o)} ${i.trim() ? `${i}
1447
+ ${import_picocolors2.default.gray(o)}` : ""}`;
1448
+ }
1449
+ case "error": {
1450
+ const i = this.error.split(`
1451
+ `).map((a, c2) => c2 === 0 ? `${import_picocolors2.default.yellow(d2)} ${import_picocolors2.default.yellow(a)}` : ` ${a}`).join(`
1452
+ `);
1453
+ return `${s + import_picocolors2.default.yellow(o)} ${B({ options: this.options, cursor: this.cursor, maxItems: t.maxItems, style: r2 }).join(`
1454
+ ${import_picocolors2.default.yellow(o)} `)}
1455
+ ${i}
1456
+ `;
1457
+ }
1458
+ default:
1459
+ return `${s}${import_picocolors2.default.cyan(o)} ${B({ options: this.options, cursor: this.cursor, maxItems: t.maxItems, style: r2 }).join(`
1460
+ ${import_picocolors2.default.cyan(o)} `)}
1461
+ ${import_picocolors2.default.cyan(d2)}
1462
+ `;
1463
+ }
1464
+ } }).prompt();
1465
+ };
1466
+ var xe = (t = "") => {
1467
+ process.stdout.write(`${import_picocolors2.default.gray(d2)} ${import_picocolors2.default.red(t)}
1468
+
1469
+ `);
1470
+ };
1471
+ var Ie = (t = "") => {
1472
+ process.stdout.write(`${import_picocolors2.default.gray(ue)} ${t}
1473
+ `);
1474
+ };
1475
+ var Se = (t = "") => {
1476
+ process.stdout.write(`${import_picocolors2.default.gray(o)}
1477
+ ${import_picocolors2.default.gray(d2)} ${t}
1478
+
1479
+ `);
1480
+ };
1481
+ var J2 = `${import_picocolors2.default.gray(o)} `;
3113
1482
 
3114
1483
  // index.ts
1484
+ var import_picocolors3 = __toESM(require_picocolors(), 1);
3115
1485
  var import_ejs2 = __toESM(require_ejs(), 1);
3116
1486
 
3117
1487
  // utils/banners.ts
@@ -3125,7 +1495,7 @@ var import_node_url = require("url");
3125
1495
 
3126
1496
  // utils/deepMerge.ts
3127
1497
  var isObject = (val) => val && typeof val === "object";
3128
- var mergeArrayWithDedupe = (a, b) => Array.from(/* @__PURE__ */ new Set([...a, ...b]));
1498
+ var mergeArrayWithDedupe = (a, b2) => Array.from(/* @__PURE__ */ new Set([...a, ...b2]));
3129
1499
  function deepMerge(target, obj) {
3130
1500
  for (const key of Object.keys(obj)) {
3131
1501
  const oldVal = target[key];
@@ -3473,9 +1843,9 @@ function getLanguage() {
3473
1843
  var fs4 = __toESM(require("fs"), 1);
3474
1844
  var path4 = __toESM(require("path"), 1);
3475
1845
 
3476
- // node_modules/.pnpm/@vue+create-eslint-config@0.7.2/node_modules/@vue/create-eslint-config/renderEjsFile.js
1846
+ // node_modules/.pnpm/@vue+create-eslint-config@0.9.1/node_modules/@vue/create-eslint-config/renderEjsFile.js
3477
1847
  var import_ejs = __toESM(require_ejs(), 1);
3478
- var templates = { "./templates/_editorconfig.ejs": "[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue}]\ncharset = utf-8\nindent_size = 2\nindent_style = space\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n<%_ if (styleGuide !== 'standard' || needsPrettier) { _%>\n<%#\n// standard doesn't have an opinion on line endings\n// https://github.com/standard/standard/issues/140\n// or maximum line length\n// https://github.com/standard/standard/issues/1559\n// Prettier enforces these things, though.\n%>\nend_of_line = lf\nmax_line_length = 100\n<%_ } _%>\n", "./templates/_gitattributes": "* text=auto eol=lf\n", "./templates/_prettierrc.json.ejs": `<%_ if (styleGuide === 'airbnb') { _%>
1848
+ var templates = { "./templates/_editorconfig.ejs": "[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue,css,scss,sass,less,styl}]\ncharset = utf-8\nindent_size = 2\nindent_style = space\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n<%_ if (styleGuide !== 'standard' || needsPrettier) { _%>\n<%#\n// standard doesn't have an opinion on line endings\n// https://github.com/standard/standard/issues/140\n// or maximum line length\n// https://github.com/standard/standard/issues/1559\n// Prettier enforces these things, though.\n%>\nend_of_line = lf\nmax_line_length = 100\n<%_ } _%>\n", "./templates/_gitattributes": "* text=auto eol=lf\n", "./templates/_prettierrc.json.ejs": `<%_ if (styleGuide === 'airbnb') { _%>
3479
1849
  {
3480
1850
  "$schema": "https://json.schemastore.org/prettierrc",
3481
1851
  "printWidth": 100,
@@ -3501,15 +1871,15 @@ var templates = { "./templates/_editorconfig.ejs": "[*.{js,jsx,mjs,cjs,ts,tsx,mt
3501
1871
  "printWidth": 100
3502
1872
  }
3503
1873
  <%_ } _%>
3504
- `, "./templates/eslint.config.js.ejs": "<%_ for (const { importer } of configsBeforeVuePlugin) { _%>\n<%- importer %>\n<%_ } _%>\nimport js from '@eslint/js'\nimport pluginVue from 'eslint-plugin-vue'\n<%_ for (const { importer } of configsAfterVuePlugin) { _%>\n<%- importer %>\n<%_ } _%>\n\nexport default [\n {\n name: 'app/files-to-lint',\n files: ['**/*.{<%= fileExtensions.join(',') %>}'],\n },\n\n {\n name: 'app/files-to-ignore',\n ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'],\n },\n\n<%_ for (const { content } of configsBeforeVuePlugin) { _%>\n <%- content %><%# TODO: auto-indent if content's multi-line %>\n<%_ } _%>\n js.configs.recommended,\n ...pluginVue.configs['flat/essential'],\n<%_ for (const { content } of configsAfterVuePlugin) { _%>\n <%- content %><%# TODO: auto-indent if content's multi-line %>\n<%_ } _%>\n]\n", "./templates/eslint.config.ts.ejs": "<%_ for (const { importer } of configsBeforeVuePlugin) { _%>\n<%- importer %>\n<%_ } _%>\nimport pluginVue from 'eslint-plugin-vue'\nimport { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'\n<%_ for (const { importer } of configsAfterVuePlugin) { _%>\n<%- importer %>\n<%_ } _%>\n\n// To allow more languages other than `ts` in `.vue` files, uncomment the following lines:\n// import { configureVueProject } from '@vue/eslint-config-typescript'\n// configureVueProject({ scriptLangs: ['ts', 'tsx'] })\n// More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup\n\nexport default defineConfigWithVueTs(\n {\n name: 'app/files-to-lint',\n files: ['**/*.{<%= fileExtensions.join(',') %>}'],\n },\n\n {\n name: 'app/files-to-ignore',\n ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'],\n },\n\n<%_ for (const { content } of configsBeforeVuePlugin) { _%>\n <%- content %><%# TODO: auto-indent if content's multi-line %>\n<%_ } _%>\n pluginVue.configs['flat/essential'],\n vueTsConfigs.recommended,\n<%_ for (const { content } of configsAfterVuePlugin) { _%>\n <%- content %><%# TODO: auto-indent if content's multi-line %>\n<%_ } _%>\n)\n" };
1874
+ `, "./templates/eslint.config.js.ejs": "<%_ for (const { importer } of configsBeforeVuePlugin) { _%>\n<%- importer %>\n<%_ } _%>\nimport js from '@eslint/js'\nimport pluginVue from 'eslint-plugin-vue'\nimport globals from 'globals'\n<%_ for (const { importer } of configsAfterVuePlugin) { _%>\n<%- importer %>\n<%_ } _%>\n\nexport default [\n {\n name: 'app/files-to-lint',\n files: ['**/*.{<%= fileExtensions.join(',') %>}'],\n },\n\n {\n name: 'app/files-to-ignore',\n ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'],\n },\n\n {\n languageOptions: {\n globals: {\n ...globals.browser,\n },\n },\n },\n\n<%_ for (const { content } of configsBeforeVuePlugin) { _%>\n <%- content %><%# TODO: auto-indent if content's multi-line %>\n<%_ } _%>\n js.configs.recommended,\n ...pluginVue.configs['flat/essential'],\n<%_ for (const { content } of configsAfterVuePlugin) { _%>\n <%- content %><%# TODO: auto-indent if content's multi-line %>\n<%_ } _%>\n]\n", "./templates/eslint.config.ts.ejs": "<%_ for (const { importer } of configsBeforeVuePlugin) { _%>\n<%- importer %>\n<%_ } _%>\nimport pluginVue from 'eslint-plugin-vue'\nimport { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'\n<%_ for (const { importer } of configsAfterVuePlugin) { _%>\n<%- importer %>\n<%_ } _%>\n\n// To allow more languages other than `ts` in `.vue` files, uncomment the following lines:\n// import { configureVueProject } from '@vue/eslint-config-typescript'\n// configureVueProject({ scriptLangs: ['ts', 'tsx'] })\n// More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup\n\nexport default defineConfigWithVueTs(\n {\n name: 'app/files-to-lint',\n files: ['**/*.{<%= fileExtensions.join(',') %>}'],\n },\n\n {\n name: 'app/files-to-ignore',\n ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'],\n },\n\n<%_ for (const { content } of configsBeforeVuePlugin) { _%>\n <%- content %><%# TODO: auto-indent if content's multi-line %>\n<%_ } _%>\n pluginVue.configs['flat/essential'],\n vueTsConfigs.recommended,\n<%_ for (const { content } of configsAfterVuePlugin) { _%>\n <%- content %><%# TODO: auto-indent if content's multi-line %>\n<%_ } _%>\n)\n" };
3505
1875
  function renderEjsFile(filePath, data) {
3506
1876
  return import_ejs.default.render(templates[filePath], data, {});
3507
1877
  }
3508
1878
 
3509
- // node_modules/.pnpm/@vue+create-eslint-config@0.7.2/node_modules/@vue/create-eslint-config/package.json
1879
+ // node_modules/.pnpm/@vue+create-eslint-config@0.9.1/node_modules/@vue/create-eslint-config/package.json
3510
1880
  var package_default = {
3511
1881
  name: "@vue/create-eslint-config",
3512
- version: "0.7.2",
1882
+ version: "0.9.1",
3513
1883
  description: "Utility to setup ESLint in Vue.js projects.",
3514
1884
  type: "module",
3515
1885
  main: "index.js",
@@ -3548,22 +1918,23 @@ var package_default = {
3548
1918
  kolorist: "^1.8.0"
3549
1919
  },
3550
1920
  devDependencies: {
3551
- "@eslint/js": "^9.18.0",
3552
- "@types/node": "^22.10.6",
3553
- "@vue/eslint-config-prettier": "^10.1.0",
3554
- "@vue/eslint-config-typescript": "^14.3.0",
3555
- eslint: "^9.18.0",
3556
- "eslint-plugin-oxlint": "^0.15.6",
3557
- "eslint-plugin-vue": "^9.32.0",
1921
+ "@eslint/js": "^9.21.0",
1922
+ "@types/node": "^22.13.9",
1923
+ "@vue/eslint-config-prettier": "^10.2.0",
1924
+ "@vue/eslint-config-typescript": "^14.5.0",
1925
+ eslint: "^9.21.0",
1926
+ "eslint-plugin-oxlint": "^0.15.13",
1927
+ "eslint-plugin-vue": "~10.0.0",
1928
+ globals: "^16.0.0",
3558
1929
  jiti: "^2.4.2",
3559
1930
  "npm-run-all2": "^7.0.2",
3560
- oxlint: "^0.15.6",
3561
- prettier: "^3.4.2",
3562
- typescript: "~5.7.0"
1931
+ oxlint: "^0.15.13",
1932
+ prettier: "3.5.3",
1933
+ typescript: "~5.8.2"
3563
1934
  }
3564
1935
  };
3565
1936
 
3566
- // node_modules/.pnpm/@vue+create-eslint-config@0.7.2/node_modules/@vue/create-eslint-config/index.js
1937
+ // node_modules/.pnpm/@vue+create-eslint-config@0.9.1/node_modules/@vue/create-eslint-config/index.js
3567
1938
  var versionMap = package_default.devDependencies;
3568
1939
  function createConfig({
3569
1940
  styleGuide = "default",
@@ -3587,7 +1958,7 @@ function createConfig({
3587
1958
  } else {
3588
1959
  fileExtensions.unshift("js", "mjs", "jsx");
3589
1960
  additionalConfigs.unshift({
3590
- devDependencies: pickDependencies(["@eslint/js"])
1961
+ devDependencies: pickDependencies(["@eslint/js", "globals"])
3591
1962
  });
3592
1963
  }
3593
1964
  if (needsOxlint) {
@@ -3600,7 +1971,7 @@ function createConfig({
3600
1971
  afterVuePlugin: [
3601
1972
  {
3602
1973
  importer: "import oxlint from 'eslint-plugin-oxlint'",
3603
- content: "oxlint.configs['flat/recommended'],"
1974
+ content: "...oxlint.configs['flat/recommended'],"
3604
1975
  }
3605
1976
  ]
3606
1977
  });
@@ -3678,7 +2049,7 @@ function pickKeysFromObject(obj, keys) {
3678
2049
  }, {});
3679
2050
  }
3680
2051
  var isObject2 = (val) => val && typeof val === "object";
3681
- var mergeArrayWithDedupe2 = (a, b) => Array.from(/* @__PURE__ */ new Set([...a, ...b]));
2052
+ var mergeArrayWithDedupe2 = (a, b2) => Array.from(/* @__PURE__ */ new Set([...a, ...b2]));
3682
2053
  function deepMerge2(target, obj) {
3683
2054
  for (const key of Object.keys(obj)) {
3684
2055
  const oldVal = target[key];
@@ -3697,8 +2068,8 @@ function deepMerge2(target, obj) {
3697
2068
  // template/eslint/package.json
3698
2069
  var package_default2 = {
3699
2070
  devDependencies: {
3700
- "@vitest/eslint-plugin": "1.1.25",
3701
- "eslint-plugin-cypress": "^4.1.0",
2071
+ "@vitest/eslint-plugin": "^1.1.36",
2072
+ "eslint-plugin-cypress": "^4.2.0",
3702
2073
  "eslint-plugin-playwright": "^2.2.0"
3703
2074
  }
3704
2075
  };
@@ -3857,17 +2228,18 @@ function emptyRouterConfig(rootDir, needsTypeScript) {
3857
2228
  // package.json
3858
2229
  var package_default3 = {
3859
2230
  name: "create-vue",
3860
- version: "3.14.1",
2231
+ version: "3.15.0",
3861
2232
  description: "\u{1F6E0}\uFE0F The recommended way to start a Vite-powered Vue project",
3862
2233
  type: "module",
3863
- packageManager: "pnpm@10.2.0",
2234
+ packageManager: "pnpm@10.6.1",
3864
2235
  bin: {
3865
2236
  "create-vue": "outfile.cjs"
3866
2237
  },
3867
2238
  files: [
3868
2239
  "locales",
3869
2240
  "outfile.cjs",
3870
- "template"
2241
+ "template",
2242
+ "!template/**/node_modules/.bin/*"
3871
2243
  ],
3872
2244
  engines: {
3873
2245
  node: ">=v18.3.0"
@@ -3895,22 +2267,22 @@ var package_default3 = {
3895
2267
  },
3896
2268
  homepage: "https://github.com/vuejs/create-vue#readme",
3897
2269
  devDependencies: {
2270
+ "@clack/prompts": "^0.10.0",
3898
2271
  "@tsconfig/node22": "^22.0.0",
3899
2272
  "@types/eslint": "^9.6.1",
3900
- "@types/node": "^22.13.1",
2273
+ "@types/node": "^22.13.9",
3901
2274
  "@types/prompts": "^2.4.9",
3902
- "@vue/create-eslint-config": "^0.7.2",
2275
+ "@vue/create-eslint-config": "^0.9.1",
3903
2276
  "@vue/tsconfig": "^0.7.0",
3904
2277
  ejs: "^3.1.10",
3905
- esbuild: "^0.24.2",
2278
+ esbuild: "^0.25.0",
3906
2279
  "esbuild-plugin-license": "^1.2.3",
3907
2280
  husky: "^9.1.7",
3908
- kleur: "^4.1.5",
3909
2281
  "lint-staged": "^15.4.3",
3910
- prettier: "^3.4.2",
3911
- prompts: "^2.4.2",
3912
- vitest: "^3.0.5",
3913
- zx: "^8.3.2"
2282
+ picocolors: "^1.1.1",
2283
+ prettier: "3.5.3",
2284
+ vitest: "^3.0.8",
2285
+ zx: "^8.4.0"
3914
2286
  },
3915
2287
  "lint-staged": {
3916
2288
  "*.{js,ts,vue,json}": [
@@ -3924,6 +2296,60 @@ var package_default3 = {
3924
2296
  };
3925
2297
 
3926
2298
  // index.ts
2299
+ var language = getLanguage();
2300
+ var FEATURE_FLAGS = [
2301
+ "default",
2302
+ "ts",
2303
+ "typescript",
2304
+ "jsx",
2305
+ "router",
2306
+ "vue-router",
2307
+ "pinia",
2308
+ "tests",
2309
+ "with-tests",
2310
+ "vitest",
2311
+ "cypress",
2312
+ "nightwatch",
2313
+ "playwright",
2314
+ "eslint",
2315
+ "prettier",
2316
+ "eslint-with-oxlint",
2317
+ "eslint-with-prettier"
2318
+ ];
2319
+ var FEATURE_OPTIONS = [
2320
+ {
2321
+ value: "typescript",
2322
+ label: language.needsTypeScript.message
2323
+ },
2324
+ {
2325
+ value: "jsx",
2326
+ label: language.needsJsx.message
2327
+ },
2328
+ {
2329
+ value: "router",
2330
+ label: language.needsRouter.message
2331
+ },
2332
+ {
2333
+ value: "pinia",
2334
+ label: language.needsPinia.message
2335
+ },
2336
+ {
2337
+ value: "vitest",
2338
+ label: language.needsVitest.message
2339
+ },
2340
+ {
2341
+ value: "e2e",
2342
+ label: language.needsE2eTesting.message
2343
+ },
2344
+ {
2345
+ value: "eslint",
2346
+ label: language.needsEslint.message
2347
+ },
2348
+ {
2349
+ value: "prettier",
2350
+ label: language.needsPrettier.message
2351
+ }
2352
+ ];
3927
2353
  function isValidPackageName(projectName) {
3928
2354
  return /^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/.test(projectName);
3929
2355
  }
@@ -3953,6 +2379,14 @@ function emptyDir(dir) {
3953
2379
  (file) => fs6.unlinkSync(file)
3954
2380
  );
3955
2381
  }
2382
+ async function unwrapPrompt(maybeCancelPromise) {
2383
+ const result = await maybeCancelPromise;
2384
+ if (BD(result)) {
2385
+ xe((0, import_picocolors3.red)("\u2716") + ` ${language.errors.operationCancelled}`);
2386
+ process.exit(0);
2387
+ }
2388
+ return result;
2389
+ }
3956
2390
  var helpMessage = `Usage: create-vue [FEATURE_FLAGS...] [OPTIONS...] [DIRECTORY]
3957
2391
 
3958
2392
  Create a new Vue.js project.
@@ -3983,37 +2417,36 @@ Available feature flags:
3983
2417
  Add Vitest for unit testing.
3984
2418
  --cypress
3985
2419
  Add Cypress for end-to-end testing.
3986
- If used without ${cyan("--vitest")}, it will also add Cypress Component Testing.
2420
+ If used without ${(0, import_picocolors3.cyan)("--vitest")}, it will also add Cypress Component Testing.
3987
2421
  --playwright
3988
2422
  Add Playwright for end-to-end testing.
3989
2423
  --nightwatch
3990
2424
  Add Nightwatch for end-to-end testing.
3991
- If used without ${cyan("--vitest")}, it will also add Nightwatch Component Testing.
2425
+ If used without ${(0, import_picocolors3.cyan)("--vitest")}, it will also add Nightwatch Component Testing.
3992
2426
  --eslint
3993
2427
  Add ESLint for code quality.
3994
- --eslint-with-prettier
2428
+ --eslint-with-oxlint
2429
+ Add ESLint for code quality, and use Oxlint to speed up the linting process.
2430
+ --eslint-with-prettier (Deprecated in favor of ${(0, import_picocolors3.cyan)("--eslint --prettier")})
3995
2431
  Add Prettier for code formatting in addition to ESLint.
2432
+ --prettier
2433
+ Add Prettier for code formatting.
3996
2434
 
3997
2435
  Unstable feature flags:
3998
2436
  --tests, --with-tests
3999
2437
  Add both unit testing and end-to-end testing support.
4000
- Currently equivalent to ${cyan("--vitest --cypress")}, but may change in the future.
2438
+ Currently equivalent to ${(0, import_picocolors3.cyan)("--vitest --cypress")}, but may change in the future.
4001
2439
  `;
4002
- async function init2() {
2440
+ async function init() {
4003
2441
  const cwd = process.cwd();
4004
2442
  const args = process.argv.slice(2);
4005
- const options = {
4006
- typescript: { type: "boolean" },
4007
- ts: { type: "boolean" },
4008
- "with-tests": { type: "boolean" },
4009
- tests: { type: "boolean" },
4010
- "vue-router": { type: "boolean" },
4011
- router: { type: "boolean" }
4012
- };
2443
+ const flags = [...FEATURE_FLAGS, "force", "bare", "help", "version"];
2444
+ const options = Object.fromEntries(flags.map((key) => [key, { type: "boolean" }]));
4013
2445
  const { values: argv, positionals } = (0, import_node_util.parseArgs)({
4014
2446
  args,
4015
2447
  options,
4016
- strict: false
2448
+ strict: true,
2449
+ allowPositionals: true
4017
2450
  });
4018
2451
  if (argv.help) {
4019
2452
  console.log(helpMessage);
@@ -4023,193 +2456,118 @@ async function init2() {
4023
2456
  console.log(`${package_default3.name} v${package_default3.version}`);
4024
2457
  process.exit(0);
4025
2458
  }
4026
- const isFeatureFlagsUsed = typeof (argv.default ?? (argv.ts || argv.typescript) ?? argv.jsx ?? (argv.router || argv["vue-router"]) ?? argv.pinia ?? (argv.tests || argv["with-tests"]) ?? argv.vitest ?? argv.cypress ?? argv.nightwatch ?? argv.playwright ?? argv.eslint ?? argv["eslint-with-prettier"]) === "boolean";
2459
+ const isFeatureFlagsUsed = FEATURE_FLAGS.some((flag) => typeof argv[flag] === "boolean");
4027
2460
  let targetDir = positionals[0];
4028
- const defaultProjectName = !targetDir ? "vue-project" : targetDir;
2461
+ const defaultProjectName = targetDir || "vue-project";
4029
2462
  const forceOverwrite = argv.force;
4030
- const language = getLanguage();
4031
- let result = {};
4032
- console.log();
4033
- console.log(
2463
+ const result = {
2464
+ projectName: defaultProjectName,
2465
+ shouldOverwrite: forceOverwrite,
2466
+ packageName: defaultProjectName,
2467
+ features: [],
2468
+ e2eFramework: void 0,
2469
+ experimentOxlint: false
2470
+ };
2471
+ Ie(
4034
2472
  process.stdout.isTTY && process.stdout.getColorDepth() > 8 ? gradientBanner : defaultBanner
4035
2473
  );
4036
- console.log();
4037
- try {
4038
- result = await (0, import_prompts.default)(
4039
- [
4040
- {
4041
- name: "projectName",
4042
- type: targetDir ? null : "text",
4043
- message: language.projectName.message,
4044
- initial: defaultProjectName,
4045
- onState: (state) => targetDir = String(state.value).trim() || defaultProjectName
4046
- },
4047
- {
4048
- name: "shouldOverwrite",
4049
- type: () => canSkipEmptying(targetDir) || forceOverwrite ? null : "toggle",
4050
- message: () => {
4051
- const dirForPrompt = targetDir === "." ? language.shouldOverwrite.dirForPrompts.current : `${language.shouldOverwrite.dirForPrompts.target} "${targetDir}"`;
4052
- return `${dirForPrompt} ${language.shouldOverwrite.message}`;
4053
- },
4054
- initial: true,
4055
- active: language.defaultToggleOptions.active,
4056
- inactive: language.defaultToggleOptions.inactive
4057
- },
4058
- {
4059
- name: "overwriteChecker",
4060
- type: (prev, values) => {
4061
- if (values.shouldOverwrite === false) {
4062
- throw new Error(red("\u2716") + ` ${language.errors.operationCancelled}`);
4063
- }
4064
- return null;
4065
- }
4066
- },
4067
- {
4068
- name: "packageName",
4069
- type: () => isValidPackageName(targetDir) ? null : "text",
4070
- message: language.packageName.message,
4071
- initial: () => toValidPackageName(targetDir),
4072
- validate: (dir) => isValidPackageName(dir) || language.packageName.invalidMessage
4073
- },
4074
- {
4075
- name: "needsTypeScript",
4076
- type: () => isFeatureFlagsUsed ? null : "toggle",
4077
- message: language.needsTypeScript.message,
4078
- initial: false,
4079
- active: language.defaultToggleOptions.active,
4080
- inactive: language.defaultToggleOptions.inactive
4081
- },
4082
- {
4083
- name: "needsJsx",
4084
- type: () => isFeatureFlagsUsed ? null : "toggle",
4085
- message: language.needsJsx.message,
4086
- initial: false,
4087
- active: language.defaultToggleOptions.active,
4088
- inactive: language.defaultToggleOptions.inactive
4089
- },
4090
- {
4091
- name: "needsRouter",
4092
- type: () => isFeatureFlagsUsed ? null : "toggle",
4093
- message: language.needsRouter.message,
4094
- initial: false,
4095
- active: language.defaultToggleOptions.active,
4096
- inactive: language.defaultToggleOptions.inactive
4097
- },
4098
- {
4099
- name: "needsPinia",
4100
- type: () => isFeatureFlagsUsed ? null : "toggle",
4101
- message: language.needsPinia.message,
4102
- initial: false,
4103
- active: language.defaultToggleOptions.active,
4104
- inactive: language.defaultToggleOptions.inactive
4105
- },
4106
- {
4107
- name: "needsVitest",
4108
- type: () => isFeatureFlagsUsed ? null : "toggle",
4109
- message: language.needsVitest.message,
4110
- initial: false,
4111
- active: language.defaultToggleOptions.active,
4112
- inactive: language.defaultToggleOptions.inactive
4113
- },
4114
- {
4115
- name: "needsE2eTesting",
4116
- type: () => isFeatureFlagsUsed ? null : "select",
4117
- hint: language.needsE2eTesting.hint,
4118
- message: language.needsE2eTesting.message,
4119
- initial: 0,
4120
- choices: (prev, answers) => [
4121
- {
4122
- title: language.needsE2eTesting.selectOptions.negative.title,
4123
- value: false
4124
- },
4125
- {
4126
- title: language.needsE2eTesting.selectOptions.cypress.title,
4127
- description: answers.needsVitest ? void 0 : language.needsE2eTesting.selectOptions.cypress.desc,
4128
- value: "cypress"
4129
- },
4130
- {
4131
- title: language.needsE2eTesting.selectOptions.nightwatch.title,
4132
- description: answers.needsVitest ? void 0 : language.needsE2eTesting.selectOptions.nightwatch.desc,
4133
- value: "nightwatch"
4134
- },
4135
- {
4136
- title: language.needsE2eTesting.selectOptions.playwright.title,
4137
- value: "playwright"
4138
- }
4139
- ]
4140
- },
4141
- {
4142
- name: "needsEslint",
4143
- type: () => isFeatureFlagsUsed ? null : "select",
4144
- message: language.needsEslint.message,
4145
- initial: 0,
4146
- choices: [
2474
+ if (!targetDir) {
2475
+ targetDir = result.projectName = result.packageName = await unwrapPrompt(
2476
+ he({
2477
+ message: language.projectName.message,
2478
+ placeholder: defaultProjectName,
2479
+ validate: (value) => value.trim().length > 0 ? void 0 : language.projectName.invalidMessage
2480
+ })
2481
+ );
2482
+ }
2483
+ if (!canSkipEmptying(targetDir) && !forceOverwrite) {
2484
+ result.shouldOverwrite = await unwrapPrompt(
2485
+ ye({
2486
+ message: `${targetDir === "." ? language.shouldOverwrite.dirForPrompts.current : `${language.shouldOverwrite.dirForPrompts.target} "${targetDir}"`} ${language.shouldOverwrite.message}`,
2487
+ initialValue: false
2488
+ })
2489
+ );
2490
+ if (!result.shouldOverwrite) {
2491
+ xe((0, import_picocolors3.red)("\u2716") + ` ${language.errors.operationCancelled}`);
2492
+ process.exit(0);
2493
+ }
2494
+ }
2495
+ if (!isValidPackageName(targetDir)) {
2496
+ result.packageName = await unwrapPrompt(
2497
+ he({
2498
+ message: language.packageName.message,
2499
+ initialValue: toValidPackageName(targetDir),
2500
+ validate: (value) => isValidPackageName(value) ? void 0 : language.packageName.invalidMessage
2501
+ })
2502
+ );
2503
+ }
2504
+ if (!isFeatureFlagsUsed) {
2505
+ result.features = await unwrapPrompt(
2506
+ fe({
2507
+ message: `${language.featureSelection.message} ${(0, import_picocolors3.dim)(language.featureSelection.hint)}`,
2508
+ // @ts-expect-error @clack/prompt's type doesn't support readonly array yet
2509
+ options: FEATURE_OPTIONS,
2510
+ required: false
2511
+ })
2512
+ );
2513
+ if (result.features.includes("e2e")) {
2514
+ const hasVitest = result.features.includes("vitest");
2515
+ result.e2eFramework = await unwrapPrompt(
2516
+ ve({
2517
+ message: `${language.e2eSelection.message} ${(0, import_picocolors3.dim)(language.e2eSelection.hint)}`,
2518
+ options: [
4147
2519
  {
4148
- title: language.needsEslint.selectOptions.negative.title,
4149
- value: false
2520
+ value: "playwright",
2521
+ label: language.e2eSelection.selectOptions.playwright.title,
2522
+ hint: language.e2eSelection.selectOptions.playwright.desc
4150
2523
  },
4151
2524
  {
4152
- title: language.needsEslint.selectOptions.eslintOnly.title,
4153
- value: "eslintOnly"
2525
+ value: "cypress",
2526
+ label: language.e2eSelection.selectOptions.cypress.title,
2527
+ hint: hasVitest ? language.e2eSelection.selectOptions.cypress.desc : language.e2eSelection.selectOptions.cypress.hintOnComponentTesting
4154
2528
  },
4155
2529
  {
4156
- title: language.needsEslint.selectOptions.speedUpWithOxlint.title,
4157
- value: "speedUpWithOxlint"
2530
+ value: "nightwatch",
2531
+ label: language.e2eSelection.selectOptions.nightwatch.title,
2532
+ hint: hasVitest ? language.e2eSelection.selectOptions.nightwatch.desc : language.e2eSelection.selectOptions.nightwatch.hintOnComponentTesting
4158
2533
  }
4159
2534
  ]
4160
- },
4161
- {
4162
- name: "needsPrettier",
4163
- type: (prev, values) => {
4164
- if (isFeatureFlagsUsed || !values.needsEslint) {
4165
- return null;
4166
- }
4167
- return "toggle";
4168
- },
4169
- message: language.needsPrettier.message,
4170
- initial: false,
4171
- active: language.defaultToggleOptions.active,
4172
- inactive: language.defaultToggleOptions.inactive
4173
- }
4174
- ],
4175
- {
4176
- onCancel: () => {
4177
- throw new Error(red("\u2716") + ` ${language.errors.operationCancelled}`);
4178
- }
4179
- }
4180
- );
4181
- } catch (cancelled) {
4182
- console.log(cancelled.message);
4183
- process.exit(1);
2535
+ })
2536
+ );
2537
+ }
2538
+ if (result.features.includes("eslint")) {
2539
+ result.experimentOxlint = await unwrapPrompt(
2540
+ ye({
2541
+ message: language.needsOxlint.message,
2542
+ initialValue: false
2543
+ })
2544
+ );
2545
+ }
4184
2546
  }
4185
- const {
4186
- projectName,
4187
- packageName = projectName ?? defaultProjectName,
4188
- shouldOverwrite = argv.force,
4189
- needsJsx = argv.jsx,
4190
- needsTypeScript = argv.ts || argv.typescript,
4191
- needsRouter = argv.router || argv["vue-router"],
4192
- needsPinia = argv.pinia,
4193
- needsVitest = argv.vitest || argv.tests,
4194
- needsPrettier = argv["eslint-with-prettier"]
4195
- } = result;
4196
- const needsEslint = Boolean(argv.eslint || argv["eslint-with-prettier"] || result.needsEslint);
4197
- const needsOxlint = result.needsEslint === "speedUpWithOxlint";
4198
- const { needsE2eTesting } = result;
4199
- const needsCypress = argv.cypress || argv.tests || needsE2eTesting === "cypress";
2547
+ const { features } = result;
2548
+ const needsTypeScript = argv.ts || argv.typescript || features.includes("typescript");
2549
+ const needsJsx = argv.jsx || features.includes("jsx");
2550
+ const needsRouter = argv.router || argv["vue-router"] || features.includes("router");
2551
+ const needsPinia = argv.pinia || features.includes("pinia");
2552
+ const needsVitest = argv.vitest || argv.tests || features.includes("vitest");
2553
+ const needsEslint = argv.eslint || argv["eslint-with-oxlint"] || argv["eslint-with-prettier"] || features.includes("eslint");
2554
+ const needsPrettier = argv.prettier || argv["eslint-with-prettier"] || features.includes("prettier");
2555
+ const needsOxlint = argv["eslint-with-oxlint"] || result.experimentOxlint;
2556
+ const { e2eFramework } = result;
2557
+ const needsCypress = argv.cypress || argv.tests || e2eFramework === "cypress";
4200
2558
  const needsCypressCT = needsCypress && !needsVitest;
4201
- const needsNightwatch = argv.nightwatch || needsE2eTesting === "nightwatch";
2559
+ const needsNightwatch = argv.nightwatch || e2eFramework === "nightwatch";
4202
2560
  const needsNightwatchCT = needsNightwatch && !needsVitest;
4203
- const needsPlaywright = argv.playwright || needsE2eTesting === "playwright";
2561
+ const needsPlaywright = argv.playwright || e2eFramework === "playwright";
4204
2562
  const root = path6.join(cwd, targetDir);
4205
- if (fs6.existsSync(root) && shouldOverwrite) {
2563
+ if (fs6.existsSync(root) && result.shouldOverwrite) {
4206
2564
  emptyDir(root);
4207
2565
  } else if (!fs6.existsSync(root)) {
4208
2566
  fs6.mkdirSync(root);
4209
2567
  }
4210
2568
  console.log(`
4211
2569
  ${language.infos.scaffolding} ${root}...`);
4212
- const pkg = { name: packageName, version: "0.0.0" };
2570
+ const pkg = { name: result.packageName, version: "0.0.0" };
4213
2571
  fs6.writeFileSync(path6.resolve(root, "package.json"), JSON.stringify(pkg, null, 2));
4214
2572
  const templateRoot = path6.resolve(__dirname, "template");
4215
2573
  const callbacks = [];
@@ -4413,24 +2771,31 @@ ${language.infos.scaffolding} ${root}...`);
4413
2771
  needsEslint
4414
2772
  })
4415
2773
  );
4416
- console.log(`
4417
- ${language.infos.done}
4418
- `);
2774
+ let outroMessage = `${language.infos.done}
2775
+
2776
+ `;
4419
2777
  if (root !== cwd) {
4420
2778
  const cdProjectName = path6.relative(cwd, root);
4421
- console.log(
4422
- ` ${bold(green(`cd ${cdProjectName.includes(" ") ? `"${cdProjectName}"` : cdProjectName}`))}`
4423
- );
2779
+ outroMessage += ` ${(0, import_picocolors3.bold)((0, import_picocolors3.green)(`cd ${cdProjectName.includes(" ") ? `"${cdProjectName}"` : cdProjectName}`))}
2780
+ `;
4424
2781
  }
4425
- console.log(` ${bold(green(getCommand(packageManager, "install")))}`);
2782
+ outroMessage += ` ${(0, import_picocolors3.bold)((0, import_picocolors3.green)(getCommand(packageManager, "install")))}
2783
+ `;
4426
2784
  if (needsPrettier) {
4427
- console.log(` ${bold(green(getCommand(packageManager, "format")))}`);
2785
+ outroMessage += ` ${(0, import_picocolors3.bold)((0, import_picocolors3.green)(getCommand(packageManager, "format")))}
2786
+ `;
4428
2787
  }
4429
- console.log(` ${bold(green(getCommand(packageManager, "dev")))}`);
4430
- console.log();
2788
+ outroMessage += ` ${(0, import_picocolors3.bold)((0, import_picocolors3.green)(getCommand(packageManager, "dev")))}
2789
+ `;
2790
+ outroMessage += `
2791
+ ${(0, import_picocolors3.dim)("|")} ${language.infos.optionalGitCommand}
2792
+
2793
+ ${(0, import_picocolors3.bold)((0, import_picocolors3.green)('git init && git add -A && git commit -m "initial commit"'))}`;
2794
+ Se(outroMessage);
4431
2795
  }
4432
- init2().catch((e) => {
4433
- console.error(e);
2796
+ init().catch((e2) => {
2797
+ console.error(e2);
2798
+ process.exit(1);
4434
2799
  });
4435
2800
  /*! Bundled license information:
4436
2801