sv 0.8.8 → 0.8.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1465 -586
- package/dist/index.js +2 -2
- package/dist/{install-BTJ6iCTS.js → install-Da9nxDO6.js} +6 -75
- package/dist/{package-manager-D3PRQ-L_.js → package-manager-DmLyIAsB.js} +2111 -1949
- package/dist/testing.js +3 -3
- package/package.json +2 -2
package/dist/bin.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { AGENT_NAMES, Command, Element,
|
|
3
|
-
import { addFromString, applyAddons, array_exports, common_exports, createWorkspace, dedent_default, exports_exports, formatFiles, function_exports, getHighlighter, imports_exports, kit_exports, object_exports,
|
|
4
|
-
import fs, { existsSync } from "node:fs";
|
|
2
|
+
import { AGENT_NAMES, Command, De, Element, Fe, Ge, J, Ke, Option, T, Tag, Ue, Vu, We, __commonJS, __export, __toESM, __toESM$1, addPnpmBuildDependencies, create, detect, esm_exports, et, from, getUserAgent, installDependencies, installOption, ke, packageManagerPrompt, parseCss$1, parseHtml, parseHtml$1, parseJson$1, parseScript$1, parseSvelte, program, require_picocolors as require_picocolors$1, require_picocolors$1 as require_picocolors, resolveCommand, templates, up, walk_exports, ze } from "./package-manager-DmLyIAsB.js";
|
|
3
|
+
import { addFromString, applyAddons, array_exports, common_exports, createWorkspace, dedent_default, exports_exports, formatFiles, function_exports, getHighlighter, imports_exports, kit_exports, object_exports, setupAddons, variables_exports } from "./install-Da9nxDO6.js";
|
|
4
|
+
import fs, { existsSync, lstatSync, readdirSync } from "node:fs";
|
|
5
5
|
import path, { dirname, join } from "node:path";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
|
-
import process$1 from "node:process";
|
|
7
|
+
import process$1, { stdin, stdout } from "node:process";
|
|
8
|
+
import * as _ from "node:readline";
|
|
9
|
+
import Eu from "node:readline";
|
|
10
|
+
import { ReadStream, WriteStream } from "node:tty";
|
|
11
|
+
import { promisify, stripVTControlCharacters } from "node:util";
|
|
8
12
|
import { exec, execSync } from "node:child_process";
|
|
9
13
|
import { createGunzip } from "node:zlib";
|
|
10
14
|
import { pipeline } from "node:stream/promises";
|
|
11
|
-
import { promisify } from "node:util";
|
|
12
15
|
|
|
13
16
|
//#region packages/cli/package.json
|
|
14
17
|
var name = "sv";
|
|
15
|
-
var version = "0.8.
|
|
18
|
+
var version = "0.8.10";
|
|
16
19
|
var type = "module";
|
|
17
20
|
var description = "A CLI for creating and updating SvelteKit projects";
|
|
18
21
|
var license = "MIT";
|
|
@@ -40,8 +43,8 @@ var exports = {
|
|
|
40
43
|
}
|
|
41
44
|
};
|
|
42
45
|
var devDependencies = {
|
|
46
|
+
"@clack/prompts": "^1.0.0-alpha.1",
|
|
43
47
|
"@sveltejs/addons": "workspace:*",
|
|
44
|
-
"@sveltejs/clack-prompts": "workspace:*",
|
|
45
48
|
"@sveltejs/cli-core": "workspace:*",
|
|
46
49
|
"@sveltejs/create": "workspace:*",
|
|
47
50
|
"@types/degit": "^2.8.6",
|
|
@@ -508,178 +511,132 @@ function defineAddon(config) {
|
|
|
508
511
|
function defineAddonOptions(options$6) {
|
|
509
512
|
return options$6;
|
|
510
513
|
}
|
|
511
|
-
var
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
};
|
|
520
|
-
var __copyProps$1 = (to, from$1, except, desc) => {
|
|
521
|
-
if (from$1 && typeof from$1 === "object" || typeof from$1 === "function") for (var keys$1 = __getOwnPropNames$1(from$1), i = 0, n$1 = keys$1.length, key; i < n$1; i++) {
|
|
522
|
-
key = keys$1[i];
|
|
523
|
-
if (!__hasOwnProp$1.call(to, key) && key !== except) __defProp$1(to, key, {
|
|
524
|
-
get: ((k) => from$1[k]).bind(null, key),
|
|
525
|
-
enumerable: !(desc = __getOwnPropDesc$1(from$1, key)) || desc.enumerable
|
|
526
|
-
});
|
|
527
|
-
}
|
|
528
|
-
return to;
|
|
529
|
-
};
|
|
530
|
-
var __toESM$1$1 = (mod, isNodeMode, target) => (target = mod != null ? __create$1(__getProtoOf$1(mod)) : {}, __copyProps$1(isNodeMode || !mod || !mod.__esModule ? __defProp$1(target, "default", {
|
|
531
|
-
value: mod,
|
|
532
|
-
enumerable: true
|
|
533
|
-
}) : target, mod));
|
|
534
|
-
var __create = Object.create;
|
|
535
|
-
var __defProp = Object.defineProperty;
|
|
536
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
537
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
538
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
539
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
540
|
-
var __commonJS = (cb, mod) => function() {
|
|
541
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
542
|
-
};
|
|
543
|
-
var __copyProps = (to, from$1, except, desc) => {
|
|
544
|
-
if (from$1 && typeof from$1 === "object" || typeof from$1 === "function") for (var keys$1 = __getOwnPropNames(from$1), i = 0, n$1 = keys$1.length, key; i < n$1; i++) {
|
|
545
|
-
key = keys$1[i];
|
|
546
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
547
|
-
get: ((k) => from$1[k]).bind(null, key),
|
|
548
|
-
enumerable: !(desc = __getOwnPropDesc(from$1, key)) || desc.enumerable
|
|
549
|
-
});
|
|
550
|
-
}
|
|
551
|
-
return to;
|
|
552
|
-
};
|
|
553
|
-
var __toESM$2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
554
|
-
value: mod,
|
|
555
|
-
enumerable: true
|
|
556
|
-
}) : target, mod));
|
|
557
|
-
var require_src$1 = __commonJS({ "node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports$1, module$1) {
|
|
558
|
-
const ESC$1 = "\x1B";
|
|
559
|
-
const CSI$1 = `${ESC$1}[`;
|
|
560
|
-
const beep$1 = "\x07";
|
|
561
|
-
const cursor$3 = {
|
|
562
|
-
to(x, y) {
|
|
563
|
-
if (!y) return `${CSI$1}${x + 1}G`;
|
|
564
|
-
return `${CSI$1}${y + 1};${x + 1}H`;
|
|
514
|
+
var require_src = __commonJS({ "node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports$1, module) {
|
|
515
|
+
const ESC = "\x1B";
|
|
516
|
+
const CSI = `${ESC}[`;
|
|
517
|
+
const beep = "\x07";
|
|
518
|
+
const cursor = {
|
|
519
|
+
to(x$2, y) {
|
|
520
|
+
if (!y) return `${CSI}${x$2 + 1}G`;
|
|
521
|
+
return `${CSI}${y + 1};${x$2 + 1}H`;
|
|
565
522
|
},
|
|
566
|
-
move(x, y) {
|
|
523
|
+
move(x$2, y) {
|
|
567
524
|
let ret = "";
|
|
568
|
-
if (x < 0) ret += `${CSI
|
|
569
|
-
else if (x > 0) ret += `${CSI
|
|
570
|
-
if (y < 0) ret += `${CSI
|
|
571
|
-
else if (y > 0) ret += `${CSI
|
|
525
|
+
if (x$2 < 0) ret += `${CSI}${-x$2}D`;
|
|
526
|
+
else if (x$2 > 0) ret += `${CSI}${x$2}C`;
|
|
527
|
+
if (y < 0) ret += `${CSI}${-y}A`;
|
|
528
|
+
else if (y > 0) ret += `${CSI}${y}B`;
|
|
572
529
|
return ret;
|
|
573
530
|
},
|
|
574
|
-
up: (count = 1) => `${CSI
|
|
575
|
-
down: (count = 1) => `${CSI
|
|
576
|
-
forward: (count = 1) => `${CSI
|
|
577
|
-
backward: (count = 1) => `${CSI
|
|
578
|
-
nextLine: (count = 1) => `${CSI
|
|
579
|
-
prevLine: (count = 1) => `${CSI
|
|
580
|
-
left: `${CSI
|
|
581
|
-
hide: `${CSI
|
|
582
|
-
show: `${CSI
|
|
583
|
-
save: `${ESC
|
|
584
|
-
restore: `${ESC
|
|
531
|
+
up: (count = 1) => `${CSI}${count}A`,
|
|
532
|
+
down: (count = 1) => `${CSI}${count}B`,
|
|
533
|
+
forward: (count = 1) => `${CSI}${count}C`,
|
|
534
|
+
backward: (count = 1) => `${CSI}${count}D`,
|
|
535
|
+
nextLine: (count = 1) => `${CSI}E`.repeat(count),
|
|
536
|
+
prevLine: (count = 1) => `${CSI}F`.repeat(count),
|
|
537
|
+
left: `${CSI}G`,
|
|
538
|
+
hide: `${CSI}?25l`,
|
|
539
|
+
show: `${CSI}?25h`,
|
|
540
|
+
save: `${ESC}7`,
|
|
541
|
+
restore: `${ESC}8`
|
|
585
542
|
};
|
|
586
|
-
const scroll
|
|
587
|
-
up: (count = 1) => `${CSI
|
|
588
|
-
down: (count = 1) => `${CSI
|
|
543
|
+
const scroll = {
|
|
544
|
+
up: (count = 1) => `${CSI}S`.repeat(count),
|
|
545
|
+
down: (count = 1) => `${CSI}T`.repeat(count)
|
|
589
546
|
};
|
|
590
|
-
const erase
|
|
591
|
-
screen: `${CSI
|
|
592
|
-
up: (count = 1) => `${CSI
|
|
593
|
-
down: (count = 1) => `${CSI
|
|
594
|
-
line: `${CSI
|
|
595
|
-
lineEnd: `${CSI
|
|
596
|
-
lineStart: `${CSI
|
|
547
|
+
const erase = {
|
|
548
|
+
screen: `${CSI}2J`,
|
|
549
|
+
up: (count = 1) => `${CSI}1J`.repeat(count),
|
|
550
|
+
down: (count = 1) => `${CSI}J`.repeat(count),
|
|
551
|
+
line: `${CSI}2K`,
|
|
552
|
+
lineEnd: `${CSI}K`,
|
|
553
|
+
lineStart: `${CSI}1K`,
|
|
597
554
|
lines(count) {
|
|
598
555
|
let clear = "";
|
|
599
|
-
for (let i = 0; i < count; i++) clear += this.line + (i < count - 1 ? cursor
|
|
600
|
-
if (count) clear += cursor
|
|
556
|
+
for (let i = 0; i < count; i++) clear += this.line + (i < count - 1 ? cursor.up() : "");
|
|
557
|
+
if (count) clear += cursor.left;
|
|
601
558
|
return clear;
|
|
602
559
|
}
|
|
603
560
|
};
|
|
604
|
-
module
|
|
605
|
-
cursor
|
|
606
|
-
scroll
|
|
607
|
-
erase
|
|
608
|
-
beep
|
|
561
|
+
module.exports = {
|
|
562
|
+
cursor,
|
|
563
|
+
scroll,
|
|
564
|
+
erase,
|
|
565
|
+
beep
|
|
609
566
|
};
|
|
610
567
|
} });
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
568
|
+
var import_src$1 = __toESM(require_src(), 1);
|
|
569
|
+
var import_picocolors$3$1 = __toESM(require_picocolors$1(), 1);
|
|
570
|
+
function hu({ onlyFirst: e$1 = !1 } = {}) {
|
|
571
|
+
const t = ["[\\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("|");
|
|
572
|
+
return new RegExp(t, e$1 ? void 0 : "g");
|
|
615
573
|
}
|
|
616
|
-
const
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
if (4352 <= codePoint && codePoint <= 4447 || 4515 <= codePoint && codePoint <= 4519 || 4602 <= codePoint && codePoint <= 4607 || 9001 <= codePoint && codePoint <= 9002 || 11904 <= codePoint && codePoint <= 11929 || 11931 <= codePoint && codePoint <= 12019 || 12032 <= codePoint && codePoint <= 12245 || 12272 <= codePoint && codePoint <= 12283 || 12289 <= codePoint && codePoint <= 12350 || 12353 <= codePoint && codePoint <= 12438 || 12441 <= codePoint && codePoint <= 12543 || 12549 <= codePoint && codePoint <= 12589 || 12593 <= codePoint && codePoint <= 12686 || 12688 <= codePoint && codePoint <= 12730 || 12736 <= codePoint && codePoint <= 12771 || 12784 <= codePoint && codePoint <= 12830 || 12832 <= codePoint && codePoint <= 12871 || 12880 <= codePoint && codePoint <= 13054 || 13056 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42124 || 42128 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 55216 <= codePoint && codePoint <= 55238 || 55243 <= codePoint && codePoint <= 55291 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65106 || 65108 <= codePoint && codePoint <= 65126 || 65128 <= codePoint && codePoint <= 65131 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127490 || 127504 <= codePoint && codePoint <= 127546 || 127552 <= codePoint && codePoint <= 127560 || 127568 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 194367 || 177984 <= codePoint && codePoint <= 196605 || 196608 <= codePoint && codePoint <= 262141) return "W";
|
|
634
|
-
if (32 <= codePoint && codePoint <= 126 || 162 <= codePoint && codePoint <= 163 || 165 <= codePoint && codePoint <= 166 || 172 == codePoint || 175 == codePoint || 10214 <= codePoint && codePoint <= 10221 || 10629 <= codePoint && codePoint <= 10630) return "Na";
|
|
635
|
-
if (161 == codePoint || 164 == codePoint || 167 <= codePoint && codePoint <= 168 || 170 == codePoint || 173 <= codePoint && codePoint <= 174 || 176 <= codePoint && codePoint <= 180 || 182 <= codePoint && codePoint <= 186 || 188 <= codePoint && codePoint <= 191 || 198 == codePoint || 208 == codePoint || 215 <= codePoint && codePoint <= 216 || 222 <= codePoint && codePoint <= 225 || 230 == codePoint || 232 <= codePoint && codePoint <= 234 || 236 <= codePoint && codePoint <= 237 || 240 == codePoint || 242 <= codePoint && codePoint <= 243 || 247 <= codePoint && codePoint <= 250 || 252 == codePoint || 254 == codePoint || 257 == codePoint || 273 == codePoint || 275 == codePoint || 283 == codePoint || 294 <= codePoint && codePoint <= 295 || 299 == codePoint || 305 <= codePoint && codePoint <= 307 || 312 == codePoint || 319 <= codePoint && codePoint <= 322 || 324 == codePoint || 328 <= codePoint && codePoint <= 331 || 333 == codePoint || 338 <= codePoint && codePoint <= 339 || 358 <= codePoint && codePoint <= 359 || 363 == codePoint || 462 == codePoint || 464 == codePoint || 466 == codePoint || 468 == codePoint || 470 == codePoint || 472 == codePoint || 474 == codePoint || 476 == codePoint || 593 == codePoint || 609 == codePoint || 708 == codePoint || 711 == codePoint || 713 <= codePoint && codePoint <= 715 || 717 == codePoint || 720 == codePoint || 728 <= codePoint && codePoint <= 731 || 733 == codePoint || 735 == codePoint || 768 <= codePoint && codePoint <= 879 || 913 <= codePoint && codePoint <= 929 || 931 <= codePoint && codePoint <= 937 || 945 <= codePoint && codePoint <= 961 || 963 <= codePoint && codePoint <= 969 || 1025 == codePoint || 1040 <= codePoint && codePoint <= 1103 || 1105 == codePoint || 8208 == codePoint || 8211 <= codePoint && codePoint <= 8214 || 8216 <= codePoint && codePoint <= 8217 || 8220 <= codePoint && codePoint <= 8221 || 8224 <= codePoint && codePoint <= 8226 || 8228 <= codePoint && codePoint <= 8231 || 8240 == codePoint || 8242 <= codePoint && codePoint <= 8243 || 8245 == codePoint || 8251 == codePoint || 8254 == codePoint || 8308 == codePoint || 8319 == codePoint || 8321 <= codePoint && codePoint <= 8324 || 8364 == codePoint || 8451 == codePoint || 8453 == codePoint || 8457 == codePoint || 8467 == codePoint || 8470 == codePoint || 8481 <= codePoint && codePoint <= 8482 || 8486 == codePoint || 8491 == codePoint || 8531 <= codePoint && codePoint <= 8532 || 8539 <= codePoint && codePoint <= 8542 || 8544 <= codePoint && codePoint <= 8555 || 8560 <= codePoint && codePoint <= 8569 || 8585 == codePoint || 8592 <= codePoint && codePoint <= 8601 || 8632 <= codePoint && codePoint <= 8633 || 8658 == codePoint || 8660 == codePoint || 8679 == codePoint || 8704 == codePoint || 8706 <= codePoint && codePoint <= 8707 || 8711 <= codePoint && codePoint <= 8712 || 8715 == codePoint || 8719 == codePoint || 8721 == codePoint || 8725 == codePoint || 8730 == codePoint || 8733 <= codePoint && codePoint <= 8736 || 8739 == codePoint || 8741 == codePoint || 8743 <= codePoint && codePoint <= 8748 || 8750 == codePoint || 8756 <= codePoint && codePoint <= 8759 || 8764 <= codePoint && codePoint <= 8765 || 8776 == codePoint || 8780 == codePoint || 8786 == codePoint || 8800 <= codePoint && codePoint <= 8801 || 8804 <= codePoint && codePoint <= 8807 || 8810 <= codePoint && codePoint <= 8811 || 8814 <= codePoint && codePoint <= 8815 || 8834 <= codePoint && codePoint <= 8835 || 8838 <= codePoint && codePoint <= 8839 || 8853 == codePoint || 8857 == codePoint || 8869 == codePoint || 8895 == codePoint || 8978 == codePoint || 9312 <= codePoint && codePoint <= 9449 || 9451 <= codePoint && codePoint <= 9547 || 9552 <= codePoint && codePoint <= 9587 || 9600 <= codePoint && codePoint <= 9615 || 9618 <= codePoint && codePoint <= 9621 || 9632 <= codePoint && codePoint <= 9633 || 9635 <= codePoint && codePoint <= 9641 || 9650 <= codePoint && codePoint <= 9651 || 9654 <= codePoint && codePoint <= 9655 || 9660 <= codePoint && codePoint <= 9661 || 9664 <= codePoint && codePoint <= 9665 || 9670 <= codePoint && codePoint <= 9672 || 9675 == codePoint || 9678 <= codePoint && codePoint <= 9681 || 9698 <= codePoint && codePoint <= 9701 || 9711 == codePoint || 9733 <= codePoint && codePoint <= 9734 || 9737 == codePoint || 9742 <= codePoint && codePoint <= 9743 || 9748 <= codePoint && codePoint <= 9749 || 9756 == codePoint || 9758 == codePoint || 9792 == codePoint || 9794 == codePoint || 9824 <= codePoint && codePoint <= 9825 || 9827 <= codePoint && codePoint <= 9829 || 9831 <= codePoint && codePoint <= 9834 || 9836 <= codePoint && codePoint <= 9837 || 9839 == codePoint || 9886 <= codePoint && codePoint <= 9887 || 9918 <= codePoint && codePoint <= 9919 || 9924 <= codePoint && codePoint <= 9933 || 9935 <= codePoint && codePoint <= 9953 || 9955 == codePoint || 9960 <= codePoint && codePoint <= 9983 || 10045 == codePoint || 10071 == codePoint || 10102 <= codePoint && codePoint <= 10111 || 11093 <= codePoint && codePoint <= 11097 || 12872 <= codePoint && codePoint <= 12879 || 57344 <= codePoint && codePoint <= 63743 || 65024 <= codePoint && codePoint <= 65039 || 65533 == codePoint || 127232 <= codePoint && codePoint <= 127242 || 127248 <= codePoint && codePoint <= 127277 || 127280 <= codePoint && codePoint <= 127337 || 127344 <= codePoint && codePoint <= 127386 || 917760 <= codePoint && codePoint <= 917999 || 983040 <= codePoint && codePoint <= 1048573 || 1048576 <= codePoint && codePoint <= 1114109) return "A";
|
|
636
|
-
return "N";
|
|
637
|
-
};
|
|
638
|
-
eaw.characterLength = function(character) {
|
|
639
|
-
var code = this.eastAsianWidth(character);
|
|
640
|
-
if (code == "F" || code == "W" || code == "A") return 2;
|
|
641
|
-
else return 1;
|
|
642
|
-
};
|
|
643
|
-
function stringToArray(string$1) {
|
|
644
|
-
return string$1.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
|
|
645
|
-
}
|
|
646
|
-
eaw.length = function(string$1) {
|
|
647
|
-
var characters = stringToArray(string$1);
|
|
648
|
-
var len = 0;
|
|
649
|
-
for (var i = 0; i < characters.length; i++) len = len + this.characterLength(characters[i]);
|
|
650
|
-
return len;
|
|
574
|
+
const cu = hu();
|
|
575
|
+
function Y(e$1) {
|
|
576
|
+
if (typeof e$1 != "string") throw new TypeError(`Expected a \`string\`, got \`${typeof e$1}\``);
|
|
577
|
+
return e$1.replace(cu, "");
|
|
578
|
+
}
|
|
579
|
+
function Z(e$1) {
|
|
580
|
+
return e$1 && e$1.__esModule && Object.prototype.hasOwnProperty.call(e$1, "default") ? e$1.default : e$1;
|
|
581
|
+
}
|
|
582
|
+
var q$1 = { exports: {} };
|
|
583
|
+
(function(e$1) {
|
|
584
|
+
var D$1 = {};
|
|
585
|
+
e$1.exports = D$1, D$1.eastAsianWidth = function(s) {
|
|
586
|
+
var i = s.charCodeAt(0), F$1 = s.length == 2 ? s.charCodeAt(1) : 0, u = i;
|
|
587
|
+
return 55296 <= i && i <= 56319 && 56320 <= F$1 && F$1 <= 57343 && (i &= 1023, F$1 &= 1023, u = i << 10 | F$1, u += 65536), u == 12288 || 65281 <= u && u <= 65376 || 65504 <= u && u <= 65510 ? "F" : u == 8361 || 65377 <= u && u <= 65470 || 65474 <= u && u <= 65479 || 65482 <= u && u <= 65487 || 65490 <= u && u <= 65495 || 65498 <= u && u <= 65500 || 65512 <= u && u <= 65518 ? "H" : 4352 <= u && u <= 4447 || 4515 <= u && u <= 4519 || 4602 <= u && u <= 4607 || 9001 <= u && u <= 9002 || 11904 <= u && u <= 11929 || 11931 <= u && u <= 12019 || 12032 <= u && u <= 12245 || 12272 <= u && u <= 12283 || 12289 <= u && u <= 12350 || 12353 <= u && u <= 12438 || 12441 <= u && u <= 12543 || 12549 <= u && u <= 12589 || 12593 <= u && u <= 12686 || 12688 <= u && u <= 12730 || 12736 <= u && u <= 12771 || 12784 <= u && u <= 12830 || 12832 <= u && u <= 12871 || 12880 <= u && u <= 13054 || 13056 <= u && u <= 19903 || 19968 <= u && u <= 42124 || 42128 <= u && u <= 42182 || 43360 <= u && u <= 43388 || 44032 <= u && u <= 55203 || 55216 <= u && u <= 55238 || 55243 <= u && u <= 55291 || 63744 <= u && u <= 64255 || 65040 <= u && u <= 65049 || 65072 <= u && u <= 65106 || 65108 <= u && u <= 65126 || 65128 <= u && u <= 65131 || 110592 <= u && u <= 110593 || 127488 <= u && u <= 127490 || 127504 <= u && u <= 127546 || 127552 <= u && u <= 127560 || 127568 <= u && u <= 127569 || 131072 <= u && u <= 194367 || 177984 <= u && u <= 196605 || 196608 <= u && u <= 262141 ? "W" : 32 <= u && u <= 126 || 162 <= u && u <= 163 || 165 <= u && u <= 166 || u == 172 || u == 175 || 10214 <= u && u <= 10221 || 10629 <= u && u <= 10630 ? "Na" : u == 161 || u == 164 || 167 <= u && u <= 168 || u == 170 || 173 <= u && u <= 174 || 176 <= u && u <= 180 || 182 <= u && u <= 186 || 188 <= u && u <= 191 || u == 198 || u == 208 || 215 <= u && u <= 216 || 222 <= u && u <= 225 || u == 230 || 232 <= u && u <= 234 || 236 <= u && u <= 237 || u == 240 || 242 <= u && u <= 243 || 247 <= u && u <= 250 || u == 252 || u == 254 || u == 257 || u == 273 || u == 275 || u == 283 || 294 <= u && u <= 295 || u == 299 || 305 <= u && u <= 307 || u == 312 || 319 <= u && u <= 322 || u == 324 || 328 <= u && u <= 331 || u == 333 || 338 <= u && u <= 339 || 358 <= u && u <= 359 || u == 363 || u == 462 || u == 464 || u == 466 || u == 468 || u == 470 || u == 472 || u == 474 || u == 476 || u == 593 || u == 609 || u == 708 || u == 711 || 713 <= u && u <= 715 || u == 717 || u == 720 || 728 <= u && u <= 731 || u == 733 || u == 735 || 768 <= u && u <= 879 || 913 <= u && u <= 929 || 931 <= u && u <= 937 || 945 <= u && u <= 961 || 963 <= u && u <= 969 || u == 1025 || 1040 <= u && u <= 1103 || u == 1105 || u == 8208 || 8211 <= u && u <= 8214 || 8216 <= u && u <= 8217 || 8220 <= u && u <= 8221 || 8224 <= u && u <= 8226 || 8228 <= u && u <= 8231 || u == 8240 || 8242 <= u && u <= 8243 || u == 8245 || u == 8251 || u == 8254 || u == 8308 || u == 8319 || 8321 <= u && u <= 8324 || u == 8364 || u == 8451 || u == 8453 || u == 8457 || u == 8467 || u == 8470 || 8481 <= u && u <= 8482 || u == 8486 || u == 8491 || 8531 <= u && u <= 8532 || 8539 <= u && u <= 8542 || 8544 <= u && u <= 8555 || 8560 <= u && u <= 8569 || u == 8585 || 8592 <= u && u <= 8601 || 8632 <= u && u <= 8633 || u == 8658 || u == 8660 || u == 8679 || u == 8704 || 8706 <= u && u <= 8707 || 8711 <= u && u <= 8712 || u == 8715 || u == 8719 || u == 8721 || u == 8725 || u == 8730 || 8733 <= u && u <= 8736 || u == 8739 || u == 8741 || 8743 <= u && u <= 8748 || u == 8750 || 8756 <= u && u <= 8759 || 8764 <= u && u <= 8765 || u == 8776 || u == 8780 || u == 8786 || 8800 <= u && u <= 8801 || 8804 <= u && u <= 8807 || 8810 <= u && u <= 8811 || 8814 <= u && u <= 8815 || 8834 <= u && u <= 8835 || 8838 <= u && u <= 8839 || u == 8853 || u == 8857 || u == 8869 || u == 8895 || u == 8978 || 9312 <= u && u <= 9449 || 9451 <= u && u <= 9547 || 9552 <= u && u <= 9587 || 9600 <= u && u <= 9615 || 9618 <= u && u <= 9621 || 9632 <= u && u <= 9633 || 9635 <= u && u <= 9641 || 9650 <= u && u <= 9651 || 9654 <= u && u <= 9655 || 9660 <= u && u <= 9661 || 9664 <= u && u <= 9665 || 9670 <= u && u <= 9672 || u == 9675 || 9678 <= u && u <= 9681 || 9698 <= u && u <= 9701 || u == 9711 || 9733 <= u && u <= 9734 || u == 9737 || 9742 <= u && u <= 9743 || 9748 <= u && u <= 9749 || u == 9756 || u == 9758 || u == 9792 || u == 9794 || 9824 <= u && u <= 9825 || 9827 <= u && u <= 9829 || 9831 <= u && u <= 9834 || 9836 <= u && u <= 9837 || u == 9839 || 9886 <= u && u <= 9887 || 9918 <= u && u <= 9919 || 9924 <= u && u <= 9933 || 9935 <= u && u <= 9953 || u == 9955 || 9960 <= u && u <= 9983 || u == 10045 || u == 10071 || 10102 <= u && u <= 10111 || 11093 <= u && u <= 11097 || 12872 <= u && u <= 12879 || 57344 <= u && u <= 63743 || 65024 <= u && u <= 65039 || u == 65533 || 127232 <= u && u <= 127242 || 127248 <= u && u <= 127277 || 127280 <= u && u <= 127337 || 127344 <= u && u <= 127386 || 917760 <= u && u <= 917999 || 983040 <= u && u <= 1048573 || 1048576 <= u && u <= 1114109 ? "A" : "N";
|
|
588
|
+
}, D$1.characterLength = function(s) {
|
|
589
|
+
var i = this.eastAsianWidth(s);
|
|
590
|
+
return i == "F" || i == "W" || i == "A" ? 2 : 1;
|
|
651
591
|
};
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
var
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
var charLen = eaw.length(char);
|
|
664
|
-
if (eawLen >= start - (charLen == 2 ? 1 : 0)) if (eawLen + charLen <= end) result += char;
|
|
592
|
+
function t(s) {
|
|
593
|
+
return s.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
|
|
594
|
+
}
|
|
595
|
+
D$1.length = function(s) {
|
|
596
|
+
for (var i = t(s), F$1 = 0, u = 0; u < i.length; u++) F$1 = F$1 + this.characterLength(i[u]);
|
|
597
|
+
return F$1;
|
|
598
|
+
}, D$1.slice = function(s, i, F$1) {
|
|
599
|
+
textLen = D$1.length(s), i = i || 0, F$1 = F$1 || 1, i < 0 && (i = textLen + i), F$1 < 0 && (F$1 = textLen + F$1);
|
|
600
|
+
for (var u = "", r = 0, a = t(s), n$1 = 0; n$1 < a.length; n$1++) {
|
|
601
|
+
var l = a[n$1], o$1 = D$1.length(l);
|
|
602
|
+
if (r >= i - (o$1 == 2 ? 1 : 0)) if (r + o$1 <= F$1) u += l;
|
|
665
603
|
else break;
|
|
666
|
-
|
|
604
|
+
r += o$1;
|
|
667
605
|
}
|
|
668
|
-
return
|
|
669
|
-
};
|
|
670
|
-
} });
|
|
671
|
-
var require_emoji_regex = __commonJS({ "node_modules/.pnpm/emoji-regex@9.2.2/node_modules/emoji-regex/index.js"(exports$1, module$1) {
|
|
672
|
-
module$1.exports = function() {
|
|
673
|
-
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;
|
|
606
|
+
return u;
|
|
674
607
|
};
|
|
675
|
-
}
|
|
676
|
-
var
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
const wrapAnsi16 = (offset = 0) => (code) => `\u001B[${code + offset}m`;
|
|
680
|
-
|
|
681
|
-
const
|
|
682
|
-
|
|
608
|
+
})(q$1);
|
|
609
|
+
var xu = q$1.exports;
|
|
610
|
+
const Bu = Z(xu);
|
|
611
|
+
var pu = function() {
|
|
612
|
+
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;
|
|
613
|
+
};
|
|
614
|
+
const Au = Z(pu);
|
|
615
|
+
function b(e$1, D$1 = {}) {
|
|
616
|
+
if (typeof e$1 != "string" || e$1.length === 0 || (D$1 = {
|
|
617
|
+
ambiguousIsNarrow: !0,
|
|
618
|
+
...D$1
|
|
619
|
+
}, e$1 = Y(e$1), e$1.length === 0)) return 0;
|
|
620
|
+
e$1 = e$1.replace(Au(), " ");
|
|
621
|
+
const t = D$1.ambiguousIsNarrow ? 1 : 2;
|
|
622
|
+
let s = 0;
|
|
623
|
+
for (const i of e$1) {
|
|
624
|
+
const F$1 = i.codePointAt(0);
|
|
625
|
+
if (F$1 <= 31 || F$1 >= 127 && F$1 <= 159 || F$1 >= 768 && F$1 <= 879) continue;
|
|
626
|
+
switch (Bu.eastAsianWidth(i)) {
|
|
627
|
+
case "F":
|
|
628
|
+
case "W":
|
|
629
|
+
s += 2;
|
|
630
|
+
break;
|
|
631
|
+
case "A":
|
|
632
|
+
s += t;
|
|
633
|
+
break;
|
|
634
|
+
default: s += 1;
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
return s;
|
|
638
|
+
}
|
|
639
|
+
const M = 10, H$1 = (e$1 = 0) => (D$1) => `\x1B[${D$1 + e$1}m`, J$1 = (e$1 = 0) => (D$1) => `\x1B[${38 + e$1};5;${D$1}m`, Q = (e$1 = 0) => (D$1, t, s) => `\x1B[${38 + e$1};2;${D$1};${t};${s}m`, C$1 = {
|
|
683
640
|
modifier: {
|
|
684
641
|
reset: [0, 0],
|
|
685
642
|
bold: [1, 22],
|
|
@@ -732,363 +689,1284 @@ const styles = {
|
|
|
732
689
|
bgWhiteBright: [107, 49]
|
|
733
690
|
}
|
|
734
691
|
};
|
|
735
|
-
|
|
736
|
-
const
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
const
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
codes.set(style[0], style[1]);
|
|
749
|
-
}
|
|
750
|
-
Object.defineProperty(styles, groupName, {
|
|
751
|
-
value: group$1,
|
|
752
|
-
enumerable: false
|
|
692
|
+
Object.keys(C$1.modifier);
|
|
693
|
+
const fu = Object.keys(C$1.color), du = Object.keys(C$1.bgColor);
|
|
694
|
+
[...fu, ...du];
|
|
695
|
+
function gu() {
|
|
696
|
+
const e$1 = new Map();
|
|
697
|
+
for (const [D$1, t] of Object.entries(C$1)) {
|
|
698
|
+
for (const [s, i] of Object.entries(t)) C$1[s] = {
|
|
699
|
+
open: `\x1B[${i[0]}m`,
|
|
700
|
+
close: `\x1B[${i[1]}m`
|
|
701
|
+
}, t[s] = C$1[s], e$1.set(i[0], i[1]);
|
|
702
|
+
Object.defineProperty(C$1, D$1, {
|
|
703
|
+
value: t,
|
|
704
|
+
enumerable: !1
|
|
753
705
|
});
|
|
754
706
|
}
|
|
755
|
-
Object.defineProperty(
|
|
756
|
-
value:
|
|
757
|
-
enumerable:
|
|
758
|
-
})
|
|
759
|
-
styles.color.close = "\x1B[39m";
|
|
760
|
-
styles.bgColor.close = "\x1B[49m";
|
|
761
|
-
styles.color.ansi = wrapAnsi16();
|
|
762
|
-
styles.color.ansi256 = wrapAnsi256();
|
|
763
|
-
styles.color.ansi16m = wrapAnsi16m();
|
|
764
|
-
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
765
|
-
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
766
|
-
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
767
|
-
Object.defineProperties(styles, {
|
|
707
|
+
return Object.defineProperty(C$1, "codes", {
|
|
708
|
+
value: e$1,
|
|
709
|
+
enumerable: !1
|
|
710
|
+
}), C$1.color.close = "\x1B[39m", C$1.bgColor.close = "\x1B[49m", C$1.color.ansi = H$1(), C$1.color.ansi256 = J$1(), C$1.color.ansi16m = Q(), C$1.bgColor.ansi = H$1(M), C$1.bgColor.ansi256 = J$1(M), C$1.bgColor.ansi16m = Q(M), Object.defineProperties(C$1, {
|
|
768
711
|
rgbToAnsi256: {
|
|
769
|
-
value: (
|
|
770
|
-
|
|
771
|
-
if (red < 8) return 16;
|
|
772
|
-
if (red > 248) return 231;
|
|
773
|
-
return Math.round((red - 8) / 247 * 24) + 232;
|
|
774
|
-
}
|
|
775
|
-
return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
|
|
776
|
-
},
|
|
777
|
-
enumerable: false
|
|
712
|
+
value: (D$1, t, s) => D$1 === t && t === s ? D$1 < 8 ? 16 : D$1 > 248 ? 231 : Math.round((D$1 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(D$1 / 255 * 5) + 6 * Math.round(t / 255 * 5) + Math.round(s / 255 * 5),
|
|
713
|
+
enumerable: !1
|
|
778
714
|
},
|
|
779
715
|
hexToRgb: {
|
|
780
|
-
value: (
|
|
781
|
-
const
|
|
782
|
-
if (!
|
|
716
|
+
value: (D$1) => {
|
|
717
|
+
const t = /[a-f\d]{6}|[a-f\d]{3}/i.exec(D$1.toString(16));
|
|
718
|
+
if (!t) return [
|
|
783
719
|
0,
|
|
784
720
|
0,
|
|
785
721
|
0
|
|
786
722
|
];
|
|
787
|
-
let [
|
|
788
|
-
|
|
789
|
-
const
|
|
723
|
+
let [s] = t;
|
|
724
|
+
s.length === 3 && (s = [...s].map((F$1) => F$1 + F$1).join(""));
|
|
725
|
+
const i = Number.parseInt(s, 16);
|
|
790
726
|
return [
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
727
|
+
i >> 16 & 255,
|
|
728
|
+
i >> 8 & 255,
|
|
729
|
+
i & 255
|
|
794
730
|
];
|
|
795
731
|
},
|
|
796
|
-
enumerable:
|
|
732
|
+
enumerable: !1
|
|
797
733
|
},
|
|
798
734
|
hexToAnsi256: {
|
|
799
|
-
value: (
|
|
800
|
-
enumerable:
|
|
735
|
+
value: (D$1) => C$1.rgbToAnsi256(...C$1.hexToRgb(D$1)),
|
|
736
|
+
enumerable: !1
|
|
801
737
|
},
|
|
802
738
|
ansi256ToAnsi: {
|
|
803
|
-
value: (
|
|
804
|
-
if (
|
|
805
|
-
if (
|
|
806
|
-
let
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
blue = red;
|
|
813
|
-
} else {
|
|
814
|
-
code -= 16;
|
|
815
|
-
const remainder = code % 36;
|
|
816
|
-
red = Math.floor(code / 36) / 5;
|
|
817
|
-
green = Math.floor(remainder / 6) / 5;
|
|
818
|
-
blue = remainder % 6 / 5;
|
|
739
|
+
value: (D$1) => {
|
|
740
|
+
if (D$1 < 8) return 30 + D$1;
|
|
741
|
+
if (D$1 < 16) return 90 + (D$1 - 8);
|
|
742
|
+
let t, s, i;
|
|
743
|
+
if (D$1 >= 232) t = ((D$1 - 232) * 10 + 8) / 255, s = t, i = t;
|
|
744
|
+
else {
|
|
745
|
+
D$1 -= 16;
|
|
746
|
+
const r = D$1 % 36;
|
|
747
|
+
t = Math.floor(D$1 / 36) / 5, s = Math.floor(r / 6) / 5, i = r % 6 / 5;
|
|
819
748
|
}
|
|
820
|
-
const
|
|
821
|
-
if (
|
|
822
|
-
let
|
|
823
|
-
|
|
824
|
-
return result;
|
|
749
|
+
const F$1 = Math.max(t, s, i) * 2;
|
|
750
|
+
if (F$1 === 0) return 30;
|
|
751
|
+
let u = 30 + (Math.round(i) << 2 | Math.round(s) << 1 | Math.round(t));
|
|
752
|
+
return F$1 === 2 && (u += 60), u;
|
|
825
753
|
},
|
|
826
|
-
enumerable:
|
|
754
|
+
enumerable: !1
|
|
827
755
|
},
|
|
828
756
|
rgbToAnsi: {
|
|
829
|
-
value: (
|
|
830
|
-
enumerable:
|
|
757
|
+
value: (D$1, t, s) => C$1.ansi256ToAnsi(C$1.rgbToAnsi256(D$1, t, s)),
|
|
758
|
+
enumerable: !1
|
|
831
759
|
},
|
|
832
760
|
hexToAnsi: {
|
|
833
|
-
value: (
|
|
834
|
-
enumerable:
|
|
761
|
+
value: (D$1) => C$1.ansi256ToAnsi(C$1.hexToAnsi256(D$1)),
|
|
762
|
+
enumerable: !1
|
|
835
763
|
}
|
|
836
|
-
});
|
|
837
|
-
return styles;
|
|
764
|
+
}), C$1;
|
|
838
765
|
}
|
|
839
|
-
const
|
|
840
|
-
const
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
const
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
906
|
-
};
|
|
907
|
-
};
|
|
908
|
-
module$1.exports = createColors$1();
|
|
909
|
-
module$1.exports.createColors = createColors$1;
|
|
910
|
-
} });
|
|
911
|
-
var import_picocolors$1$1 = __toESM$2(require_picocolors$1$1(), 1);
|
|
912
|
-
var import_picocolors$2$1 = __toESM$2(require_picocolors$1$1(), 1);
|
|
913
|
-
var import_src$3 = __toESM$2(require_src$1(), 1);
|
|
914
|
-
const isWindows = process$1.platform.startsWith("win");
|
|
915
|
-
function isUnicodeSupported() {
|
|
916
|
-
if (process$1.platform !== "win32") return process$1.env.TERM !== "linux";
|
|
917
|
-
return Boolean(process$1.env.CI) || Boolean(process$1.env.WT_SESSION) || Boolean(process$1.env.TERMINUS_SUBLIME) || process$1.env.ConEmuTask === "{cmd::Cmder}" || process$1.env.TERM_PROGRAM === "Terminus-Sublime" || process$1.env.TERM_PROGRAM === "vscode" || process$1.env.TERM === "xterm-256color" || process$1.env.TERM === "alacritty" || process$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
766
|
+
const mu = gu(), $ = new Set(["\x1B", ""]), vu = 39, O$1 = "\x07", X$1 = "[", bu = "]", uu = "m", T$1 = `${bu}8;;`, Du = (e$1) => `${$.values().next().value}${X$1}${e$1}${uu}`, tu = (e$1) => `${$.values().next().value}${T$1}${e$1}${O$1}`, wu = (e$1) => e$1.split(" ").map((D$1) => b(D$1)), j$1 = (e$1, D$1, t) => {
|
|
767
|
+
const s = [...D$1];
|
|
768
|
+
let i = !1, F$1 = !1, u = b(Y(e$1[e$1.length - 1]));
|
|
769
|
+
for (const [r, a] of s.entries()) {
|
|
770
|
+
const n$1 = b(a);
|
|
771
|
+
if (u + n$1 <= t ? e$1[e$1.length - 1] += a : (e$1.push(a), u = 0), $.has(a) && (i = !0, F$1 = s.slice(r + 1).join("").startsWith(T$1)), i) {
|
|
772
|
+
F$1 ? a === O$1 && (i = !1, F$1 = !1) : a === uu && (i = !1);
|
|
773
|
+
continue;
|
|
774
|
+
}
|
|
775
|
+
u += n$1, u === t && r < s.length - 1 && (e$1.push(""), u = 0);
|
|
776
|
+
}
|
|
777
|
+
!u && e$1[e$1.length - 1].length > 0 && e$1.length > 1 && (e$1[e$1.length - 2] += e$1.pop());
|
|
778
|
+
}, yu = (e$1) => {
|
|
779
|
+
const D$1 = e$1.split(" ");
|
|
780
|
+
let t = D$1.length;
|
|
781
|
+
for (; t > 0 && !(b(D$1[t - 1]) > 0);) t--;
|
|
782
|
+
return t === D$1.length ? e$1 : D$1.slice(0, t).join(" ") + D$1.slice(t).join("");
|
|
783
|
+
}, _u = (e$1, D$1, t = {}) => {
|
|
784
|
+
if (t.trim !== !1 && e$1.trim() === "") return "";
|
|
785
|
+
let s = "", i, F$1;
|
|
786
|
+
const u = wu(e$1);
|
|
787
|
+
let r = [""];
|
|
788
|
+
for (const [n$1, l] of e$1.split(" ").entries()) {
|
|
789
|
+
t.trim !== !1 && (r[r.length - 1] = r[r.length - 1].trimStart());
|
|
790
|
+
let o$1 = b(r[r.length - 1]);
|
|
791
|
+
if (n$1 !== 0 && (o$1 >= D$1 && (t.wordWrap === !1 || t.trim === !1) && (r.push(""), o$1 = 0), (o$1 > 0 || t.trim === !1) && (r[r.length - 1] += " ", o$1++)), t.hard && u[n$1] > D$1) {
|
|
792
|
+
const A = D$1 - o$1, y = 1 + Math.floor((u[n$1] - A - 1) / D$1);
|
|
793
|
+
Math.floor((u[n$1] - 1) / D$1) < y && r.push(""), j$1(r, l, D$1);
|
|
794
|
+
continue;
|
|
795
|
+
}
|
|
796
|
+
if (o$1 + u[n$1] > D$1 && o$1 > 0 && u[n$1] > 0) {
|
|
797
|
+
if (t.wordWrap === !1 && o$1 < D$1) {
|
|
798
|
+
j$1(r, l, D$1);
|
|
799
|
+
continue;
|
|
800
|
+
}
|
|
801
|
+
r.push("");
|
|
802
|
+
}
|
|
803
|
+
if (o$1 + u[n$1] > D$1 && t.wordWrap === !1) {
|
|
804
|
+
j$1(r, l, D$1);
|
|
805
|
+
continue;
|
|
806
|
+
}
|
|
807
|
+
r[r.length - 1] += l;
|
|
808
|
+
}
|
|
809
|
+
t.trim !== !1 && (r = r.map((n$1) => yu(n$1)));
|
|
810
|
+
const a = [...r.join(`
|
|
811
|
+
`)];
|
|
812
|
+
for (const [n$1, l] of a.entries()) {
|
|
813
|
+
if (s += l, $.has(l)) {
|
|
814
|
+
const { groups: A } = new RegExp(`(?:\\${X$1}(?<code>\\d+)m|\\${T$1}(?<uri>.*)${O$1})`).exec(a.slice(n$1).join("")) || { groups: {} };
|
|
815
|
+
if (A.code !== void 0) {
|
|
816
|
+
const y = Number.parseFloat(A.code);
|
|
817
|
+
i = y === vu ? void 0 : y;
|
|
818
|
+
} else A.uri !== void 0 && (F$1 = A.uri.length === 0 ? void 0 : A.uri);
|
|
819
|
+
}
|
|
820
|
+
const o$1 = mu.codes.get(Number(i));
|
|
821
|
+
a[n$1 + 1] === `
|
|
822
|
+
` ? (F$1 && (s += tu("")), i && o$1 && (s += Du(o$1))) : l === `
|
|
823
|
+
` && (i && o$1 && (s += Du(i)), F$1 && (s += tu(F$1)));
|
|
824
|
+
}
|
|
825
|
+
return s;
|
|
826
|
+
};
|
|
827
|
+
function eu(e$1, D$1, t) {
|
|
828
|
+
return String(e$1).normalize().replace(/\r\n/g, `
|
|
829
|
+
`).split(`
|
|
830
|
+
`).map((s) => _u(s, D$1, t)).join(`
|
|
831
|
+
`);
|
|
918
832
|
}
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
833
|
+
const $u = [
|
|
834
|
+
"up",
|
|
835
|
+
"down",
|
|
836
|
+
"left",
|
|
837
|
+
"right",
|
|
838
|
+
"space",
|
|
839
|
+
"enter",
|
|
840
|
+
"cancel"
|
|
841
|
+
], c = {
|
|
842
|
+
actions: new Set($u),
|
|
843
|
+
aliases: new Map([
|
|
844
|
+
["k", "up"],
|
|
845
|
+
["j", "down"],
|
|
846
|
+
["h", "left"],
|
|
847
|
+
["l", "right"],
|
|
848
|
+
["", "cancel"],
|
|
849
|
+
["escape", "cancel"]
|
|
850
|
+
]),
|
|
851
|
+
messages: {
|
|
852
|
+
cancel: "Canceled",
|
|
853
|
+
error: "Something went wrong"
|
|
854
|
+
}
|
|
855
|
+
};
|
|
856
|
+
function W(e$1, D$1) {
|
|
857
|
+
if (typeof e$1 == "string") return c.aliases.get(e$1) === D$1;
|
|
858
|
+
for (const t of e$1) if (t !== void 0 && W(t, D$1)) return !0;
|
|
859
|
+
return !1;
|
|
860
|
+
}
|
|
861
|
+
function ku(e$1, D$1) {
|
|
862
|
+
if (e$1 === D$1) return;
|
|
863
|
+
const t = e$1.split(`
|
|
864
|
+
`), s = D$1.split(`
|
|
865
|
+
`), i = [];
|
|
866
|
+
for (let F$1 = 0; F$1 < Math.max(t.length, s.length); F$1++) t[F$1] !== s[F$1] && i.push(F$1);
|
|
867
|
+
return i;
|
|
868
|
+
}
|
|
869
|
+
const Iu = globalThis.process.platform.startsWith("win"), L$1 = Symbol("clack:cancel");
|
|
870
|
+
function Vu$1(e$1) {
|
|
871
|
+
return e$1 === L$1;
|
|
872
|
+
}
|
|
873
|
+
function S(e$1, D$1) {
|
|
874
|
+
const t = e$1;
|
|
875
|
+
t.isTTY && t.setRawMode(D$1);
|
|
876
|
+
}
|
|
877
|
+
function Mu({ input: e$1 = stdin, output: D$1 = stdout, overwrite: t = !0, hideCursor: s = !0 } = {}) {
|
|
878
|
+
const i = _.createInterface({
|
|
879
|
+
input: e$1,
|
|
880
|
+
output: D$1,
|
|
881
|
+
prompt: "",
|
|
882
|
+
tabSize: 1
|
|
883
|
+
});
|
|
884
|
+
_.emitKeypressEvents(e$1, i), e$1 instanceof ReadStream && e$1.isTTY && e$1.setRawMode(!0);
|
|
885
|
+
const F$1 = (u, { name: r, sequence: a }) => {
|
|
886
|
+
const n$1 = String(u);
|
|
887
|
+
if (W([
|
|
888
|
+
n$1,
|
|
889
|
+
r,
|
|
890
|
+
a
|
|
891
|
+
], "cancel")) {
|
|
892
|
+
s && D$1.write(import_src$1.cursor.show), process.exit(0);
|
|
893
|
+
return;
|
|
894
|
+
}
|
|
895
|
+
if (!t) return;
|
|
896
|
+
const l = r === "return" ? 0 : -1, o$1 = r === "return" ? -1 : 0;
|
|
897
|
+
_.moveCursor(D$1, l, o$1, () => {
|
|
898
|
+
_.clearLine(D$1, 1, () => {
|
|
899
|
+
e$1.once("keypress", F$1);
|
|
900
|
+
});
|
|
901
|
+
});
|
|
934
902
|
};
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
return {
|
|
938
|
-
isColorSupported: enabled,
|
|
939
|
-
reset: f("\x1B[0m", "\x1B[0m"),
|
|
940
|
-
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
941
|
-
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
942
|
-
italic: f("\x1B[3m", "\x1B[23m"),
|
|
943
|
-
underline: f("\x1B[4m", "\x1B[24m"),
|
|
944
|
-
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
945
|
-
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
946
|
-
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
947
|
-
black: f("\x1B[30m", "\x1B[39m"),
|
|
948
|
-
red: f("\x1B[31m", "\x1B[39m"),
|
|
949
|
-
green: f("\x1B[32m", "\x1B[39m"),
|
|
950
|
-
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
951
|
-
blue: f("\x1B[34m", "\x1B[39m"),
|
|
952
|
-
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
953
|
-
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
954
|
-
white: f("\x1B[37m", "\x1B[39m"),
|
|
955
|
-
gray: f("\x1B[90m", "\x1B[39m"),
|
|
956
|
-
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
957
|
-
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
958
|
-
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
959
|
-
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
960
|
-
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
961
|
-
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
962
|
-
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
963
|
-
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
964
|
-
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
965
|
-
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
966
|
-
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
967
|
-
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
968
|
-
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
969
|
-
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
970
|
-
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
971
|
-
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
972
|
-
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
973
|
-
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
974
|
-
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
975
|
-
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
976
|
-
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
977
|
-
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
978
|
-
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
979
|
-
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
980
|
-
};
|
|
903
|
+
return s && D$1.write(import_src$1.cursor.hide), e$1.once("keypress", F$1), () => {
|
|
904
|
+
e$1.off("keypress", F$1), s && D$1.write(import_src$1.cursor.show), e$1 instanceof ReadStream && e$1.isTTY && !Iu && e$1.setRawMode(!1), i.terminal = !1, i.close();
|
|
981
905
|
};
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
906
|
+
}
|
|
907
|
+
const Ou = (e$1) => e$1 instanceof WriteStream && e$1.columns ? e$1.columns : 80;
|
|
908
|
+
var Tu = Object.defineProperty, ju = (e$1, D$1, t) => D$1 in e$1 ? Tu(e$1, D$1, {
|
|
909
|
+
enumerable: !0,
|
|
910
|
+
configurable: !0,
|
|
911
|
+
writable: !0,
|
|
912
|
+
value: t
|
|
913
|
+
}) : e$1[D$1] = t, E$1 = (e$1, D$1, t) => (ju(e$1, typeof D$1 != "symbol" ? D$1 + "" : D$1, t), t);
|
|
914
|
+
let p = class {
|
|
915
|
+
constructor(D$1, t = !0) {
|
|
916
|
+
E$1(this, "input"), E$1(this, "output"), E$1(this, "_abortSignal"), E$1(this, "rl"), E$1(this, "opts"), E$1(this, "_render"), E$1(this, "_track", !1), E$1(this, "_prevFrame", ""), E$1(this, "_subscribers", new Map()), E$1(this, "_cursor", 0), E$1(this, "state", "initial"), E$1(this, "error", ""), E$1(this, "value"), E$1(this, "userInput", "");
|
|
917
|
+
const { input: s = stdin, output: i = stdout, render: F$1, signal: u,...r } = D$1;
|
|
918
|
+
this.opts = r, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = F$1.bind(this), this._track = t, this._abortSignal = u, this.input = s, this.output = i;
|
|
919
|
+
}
|
|
920
|
+
unsubscribe() {
|
|
921
|
+
this._subscribers.clear();
|
|
922
|
+
}
|
|
923
|
+
setSubscriber(D$1, t) {
|
|
924
|
+
const s = this._subscribers.get(D$1) ?? [];
|
|
925
|
+
s.push(t), this._subscribers.set(D$1, s);
|
|
926
|
+
}
|
|
927
|
+
on(D$1, t) {
|
|
928
|
+
this.setSubscriber(D$1, { cb: t });
|
|
929
|
+
}
|
|
930
|
+
once(D$1, t) {
|
|
931
|
+
this.setSubscriber(D$1, {
|
|
932
|
+
cb: t,
|
|
933
|
+
once: !0
|
|
934
|
+
});
|
|
935
|
+
}
|
|
936
|
+
emit(D$1, ...t) {
|
|
937
|
+
const s = this._subscribers.get(D$1) ?? [], i = [];
|
|
938
|
+
for (const F$1 of s) F$1.cb(...t), F$1.once && i.push(() => s.splice(s.indexOf(F$1), 1));
|
|
939
|
+
for (const F$1 of i) F$1();
|
|
940
|
+
}
|
|
941
|
+
prompt() {
|
|
942
|
+
return new Promise((D$1) => {
|
|
943
|
+
if (this._abortSignal) {
|
|
944
|
+
if (this._abortSignal.aborted) return this.state = "cancel", this.close(), D$1(L$1);
|
|
945
|
+
this._abortSignal.addEventListener("abort", () => {
|
|
946
|
+
this.state = "cancel", this.close();
|
|
947
|
+
}, { once: !0 });
|
|
948
|
+
}
|
|
949
|
+
this.rl = Eu.createInterface({
|
|
950
|
+
input: this.input,
|
|
951
|
+
tabSize: 2,
|
|
952
|
+
prompt: "",
|
|
953
|
+
escapeCodeTimeout: 50,
|
|
954
|
+
terminal: !0
|
|
955
|
+
}), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, !0), this.input.on("keypress", this.onKeypress), S(this.input, !0), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
|
|
956
|
+
this.output.write(import_src$1.cursor.show), this.output.off("resize", this.render), S(this.input, !1), D$1(this.value);
|
|
957
|
+
}), this.once("cancel", () => {
|
|
958
|
+
this.output.write(import_src$1.cursor.show), this.output.off("resize", this.render), S(this.input, !1), D$1(L$1);
|
|
959
|
+
});
|
|
960
|
+
});
|
|
961
|
+
}
|
|
962
|
+
_isActionKey(D$1, t) {
|
|
963
|
+
return D$1 === " ";
|
|
964
|
+
}
|
|
965
|
+
_setValue(D$1) {
|
|
966
|
+
this.value = D$1, this.emit("value", this.value);
|
|
967
|
+
}
|
|
968
|
+
_setUserInput(D$1, t) {
|
|
969
|
+
this.userInput = D$1 ?? "", this.emit("userInput", this.userInput), t && this._track && this.rl && (this.rl.write(this.userInput), this._cursor = this.rl.cursor);
|
|
970
|
+
}
|
|
971
|
+
onKeypress(D$1, t) {
|
|
972
|
+
if (this._track && t.name !== "return" && (t.name && this._isActionKey(D$1, t) && this.rl?.write(null, {
|
|
973
|
+
ctrl: !0,
|
|
974
|
+
name: "h"
|
|
975
|
+
}), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), t?.name && (!this._track && c.aliases.has(t.name) && this.emit("cursor", c.aliases.get(t.name)), c.actions.has(t.name) && this.emit("cursor", t.name)), D$1 && (D$1.toLowerCase() === "y" || D$1.toLowerCase() === "n") && this.emit("confirm", D$1.toLowerCase() === "y"), this.emit("key", D$1?.toLowerCase(), t), t?.name === "return") {
|
|
976
|
+
if (this.opts.validate) {
|
|
977
|
+
const s = this.opts.validate(this.value);
|
|
978
|
+
s && (this.error = s instanceof Error ? s.message : s, this.state = "error", this.rl?.write(this.userInput));
|
|
979
|
+
}
|
|
980
|
+
this.state !== "error" && (this.state = "submit");
|
|
981
|
+
}
|
|
982
|
+
W([
|
|
983
|
+
D$1,
|
|
984
|
+
t?.name,
|
|
985
|
+
t?.sequence
|
|
986
|
+
], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
|
|
987
|
+
}
|
|
988
|
+
close() {
|
|
989
|
+
this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
|
|
990
|
+
`), S(this.input, !1), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
|
|
991
|
+
}
|
|
992
|
+
restoreCursor() {
|
|
993
|
+
const D$1 = eu(this._prevFrame, process.stdout.columns, { hard: !0 }).split(`
|
|
994
|
+
`).length - 1;
|
|
995
|
+
this.output.write(import_src$1.cursor.move(-999, D$1 * -1));
|
|
996
|
+
}
|
|
997
|
+
render() {
|
|
998
|
+
const D$1 = eu(this._render(this) ?? "", process.stdout.columns, { hard: !0 });
|
|
999
|
+
if (D$1 !== this._prevFrame) {
|
|
1000
|
+
if (this.state === "initial") this.output.write(import_src$1.cursor.hide);
|
|
1001
|
+
else {
|
|
1002
|
+
const t = ku(this._prevFrame, D$1);
|
|
1003
|
+
if (this.restoreCursor(), t && t?.length === 1) {
|
|
1004
|
+
const s = t[0];
|
|
1005
|
+
this.output.write(import_src$1.cursor.move(0, s)), this.output.write(import_src$1.erase.lines(1));
|
|
1006
|
+
const i = D$1.split(`
|
|
1007
|
+
`);
|
|
1008
|
+
this.output.write(i[s]), this._prevFrame = D$1, this.output.write(import_src$1.cursor.move(0, i.length - s - 1));
|
|
1009
|
+
return;
|
|
1010
|
+
}
|
|
1011
|
+
if (t && t?.length > 1) {
|
|
1012
|
+
const s = t[0];
|
|
1013
|
+
this.output.write(import_src$1.cursor.move(0, s)), this.output.write(import_src$1.erase.down());
|
|
1014
|
+
const i = D$1.split(`
|
|
1015
|
+
`).slice(s);
|
|
1016
|
+
this.output.write(i.join(`
|
|
1017
|
+
`)), this._prevFrame = D$1;
|
|
1018
|
+
return;
|
|
1019
|
+
}
|
|
1020
|
+
this.output.write(import_src$1.erase.down());
|
|
1021
|
+
}
|
|
1022
|
+
this.output.write(D$1), this.state === "initial" && (this.state = "active"), this._prevFrame = D$1;
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
}, Wu = class extends p {
|
|
1026
|
+
get cursor() {
|
|
1027
|
+
return this.value ? 0 : 1;
|
|
1028
|
+
}
|
|
1029
|
+
get _value() {
|
|
1030
|
+
return this.cursor === 0;
|
|
1031
|
+
}
|
|
1032
|
+
constructor(D$1) {
|
|
1033
|
+
super(D$1, !1), this.value = !!D$1.initialValue, this.on("userInput", () => {
|
|
1034
|
+
this.value = this._value;
|
|
1035
|
+
}), this.on("confirm", (t) => {
|
|
1036
|
+
this.output.write(import_src$1.cursor.move(0, -1)), this.value = t, this.state = "submit", this.close();
|
|
1037
|
+
}), this.on("cursor", () => {
|
|
1038
|
+
this.value = !this.value;
|
|
1039
|
+
});
|
|
1040
|
+
}
|
|
1041
|
+
};
|
|
1042
|
+
var Lu = Object.defineProperty, Nu = (e$1, D$1, t) => D$1 in e$1 ? Lu(e$1, D$1, {
|
|
1043
|
+
enumerable: !0,
|
|
1044
|
+
configurable: !0,
|
|
1045
|
+
writable: !0,
|
|
1046
|
+
value: t
|
|
1047
|
+
}) : e$1[D$1] = t, su = (e$1, D$1, t) => (Nu(e$1, typeof D$1 != "symbol" ? D$1 + "" : D$1, t), t), iu = (e$1, D$1, t) => {
|
|
1048
|
+
if (!D$1.has(e$1)) throw TypeError("Cannot " + t);
|
|
1049
|
+
}, N$1 = (e$1, D$1, t) => (iu(e$1, D$1, "read from private field"), t ? t.call(e$1) : D$1.get(e$1)), Pu = (e$1, D$1, t) => {
|
|
1050
|
+
if (D$1.has(e$1)) throw TypeError("Cannot add the same private member more than once");
|
|
1051
|
+
D$1 instanceof WeakSet ? D$1.add(e$1) : D$1.set(e$1, t);
|
|
1052
|
+
}, Ru = (e$1, D$1, t, s) => (iu(e$1, D$1, "write to private field"), s ? s.call(e$1, t) : D$1.set(e$1, t), t), d;
|
|
1053
|
+
let Ku = class extends p {
|
|
1054
|
+
constructor(D$1) {
|
|
1055
|
+
super(D$1, !1), su(this, "options"), su(this, "cursor", 0), Pu(this, d, void 0);
|
|
1056
|
+
const { options: t } = D$1;
|
|
1057
|
+
Ru(this, d, D$1.selectableGroups !== !1), this.options = Object.entries(t).flatMap(([s, i]) => [{
|
|
1058
|
+
value: s,
|
|
1059
|
+
group: !0,
|
|
1060
|
+
label: s
|
|
1061
|
+
}, ...i.map((F$1) => ({
|
|
1062
|
+
...F$1,
|
|
1063
|
+
group: s
|
|
1064
|
+
}))]), this.value = [...D$1.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: s }) => s === D$1.cursorAt), N$1(this, d) ? 0 : 1), this.on("cursor", (s) => {
|
|
1065
|
+
switch (s) {
|
|
1066
|
+
case "left":
|
|
1067
|
+
case "up": {
|
|
1068
|
+
this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
|
|
1069
|
+
const i = this.options[this.cursor]?.group === !0;
|
|
1070
|
+
!N$1(this, d) && i && (this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1);
|
|
1071
|
+
break;
|
|
1072
|
+
}
|
|
1073
|
+
case "down":
|
|
1074
|
+
case "right": {
|
|
1075
|
+
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
|
|
1076
|
+
const i = this.options[this.cursor]?.group === !0;
|
|
1077
|
+
!N$1(this, d) && i && (this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1);
|
|
1078
|
+
break;
|
|
1079
|
+
}
|
|
1080
|
+
case "space":
|
|
1081
|
+
this.toggleValue();
|
|
1082
|
+
break;
|
|
1083
|
+
}
|
|
1084
|
+
});
|
|
1085
|
+
}
|
|
1086
|
+
getGroupItems(D$1) {
|
|
1087
|
+
return this.options.filter((t) => t.group === D$1);
|
|
1088
|
+
}
|
|
1089
|
+
isGroupSelected(D$1) {
|
|
1090
|
+
const t = this.getGroupItems(D$1), s = this.value;
|
|
1091
|
+
return s === void 0 ? !1 : t.every((i) => s.includes(i.value));
|
|
1092
|
+
}
|
|
1093
|
+
toggleValue() {
|
|
1094
|
+
const D$1 = this.options[this.cursor];
|
|
1095
|
+
if (this.value === void 0 && (this.value = []), D$1.group === !0) {
|
|
1096
|
+
const t = D$1.value, s = this.getGroupItems(t);
|
|
1097
|
+
this.isGroupSelected(t) ? this.value = this.value.filter((i) => s.findIndex((F$1) => F$1.value === i) === -1) : this.value = [...this.value, ...s.map((i) => i.value)], this.value = Array.from(new Set(this.value));
|
|
1098
|
+
} else {
|
|
1099
|
+
const t = this.value.includes(D$1.value);
|
|
1100
|
+
this.value = t ? this.value.filter((s) => s !== D$1.value) : [...this.value, D$1.value];
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
};
|
|
1104
|
+
d = new WeakMap();
|
|
1105
|
+
var Gu = Object.defineProperty, zu = (e$1, D$1, t) => D$1 in e$1 ? Gu(e$1, D$1, {
|
|
1106
|
+
enumerable: !0,
|
|
1107
|
+
configurable: !0,
|
|
1108
|
+
writable: !0,
|
|
1109
|
+
value: t
|
|
1110
|
+
}) : e$1[D$1] = t, Fu = (e$1, D$1, t) => (zu(e$1, typeof D$1 != "symbol" ? D$1 + "" : D$1, t), t);
|
|
1111
|
+
let Uu = class extends p {
|
|
1112
|
+
constructor(D$1) {
|
|
1113
|
+
super(D$1, !1), Fu(this, "options"), Fu(this, "cursor", 0), this.options = D$1.options, this.value = [...D$1.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: t }) => t === D$1.cursorAt), 0), this.on("key", (t) => {
|
|
1114
|
+
t === "a" && this.toggleAll();
|
|
1115
|
+
}), this.on("cursor", (t) => {
|
|
1116
|
+
switch (t) {
|
|
1117
|
+
case "left":
|
|
1118
|
+
case "up":
|
|
1119
|
+
this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
|
|
1120
|
+
break;
|
|
1121
|
+
case "down":
|
|
1122
|
+
case "right":
|
|
1123
|
+
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
|
|
1124
|
+
break;
|
|
1125
|
+
case "space":
|
|
1126
|
+
this.toggleValue();
|
|
1127
|
+
break;
|
|
1128
|
+
}
|
|
1129
|
+
});
|
|
1130
|
+
}
|
|
1131
|
+
get _value() {
|
|
1132
|
+
return this.options[this.cursor].value;
|
|
1133
|
+
}
|
|
1134
|
+
toggleAll() {
|
|
1135
|
+
const D$1 = this.value !== void 0 && this.value.length === this.options.length;
|
|
1136
|
+
this.value = D$1 ? [] : this.options.map((t) => t.value);
|
|
1137
|
+
}
|
|
1138
|
+
toggleValue() {
|
|
1139
|
+
this.value === void 0 && (this.value = []);
|
|
1140
|
+
const D$1 = this.value.includes(this._value);
|
|
1141
|
+
this.value = D$1 ? this.value.filter((t) => t !== this._value) : [...this.value, this._value];
|
|
1142
|
+
}
|
|
1143
|
+
};
|
|
1144
|
+
var Yu = Object.defineProperty, Zu = (e$1, D$1, t) => D$1 in e$1 ? Yu(e$1, D$1, {
|
|
1145
|
+
enumerable: !0,
|
|
1146
|
+
configurable: !0,
|
|
1147
|
+
writable: !0,
|
|
1148
|
+
value: t
|
|
1149
|
+
}) : e$1[D$1] = t, qu = (e$1, D$1, t) => (Zu(e$1, typeof D$1 != "symbol" ? D$1 + "" : D$1, t), t);
|
|
1150
|
+
let Hu = class extends p {
|
|
1151
|
+
constructor({ mask: D$1,...t }) {
|
|
1152
|
+
super(t), qu(this, "_mask", "•"), this._mask = D$1 ?? "•", this.on("userInput", (s) => {
|
|
1153
|
+
this._setValue(s);
|
|
1154
|
+
});
|
|
1155
|
+
}
|
|
1156
|
+
get cursor() {
|
|
1157
|
+
return this._cursor;
|
|
1158
|
+
}
|
|
1159
|
+
get masked() {
|
|
1160
|
+
return this.userInput.replaceAll(/./g, this._mask);
|
|
1161
|
+
}
|
|
1162
|
+
get userInputWithCursor() {
|
|
1163
|
+
if (this.state === "submit" || this.state === "cancel") return this.masked;
|
|
1164
|
+
const D$1 = this.userInput;
|
|
1165
|
+
if (this.cursor >= D$1.length) return `${this.masked}${import_picocolors$3$1.default.inverse(import_picocolors$3$1.default.hidden("_"))}`;
|
|
1166
|
+
const t = this.masked, s = t.slice(0, this.cursor), i = t.slice(this.cursor);
|
|
1167
|
+
return `${s}${import_picocolors$3$1.default.inverse(i[0])}${i.slice(1)}`;
|
|
1168
|
+
}
|
|
1169
|
+
};
|
|
1170
|
+
var Ju = Object.defineProperty, Qu = (e$1, D$1, t) => D$1 in e$1 ? Ju(e$1, D$1, {
|
|
1171
|
+
enumerable: !0,
|
|
1172
|
+
configurable: !0,
|
|
1173
|
+
writable: !0,
|
|
1174
|
+
value: t
|
|
1175
|
+
}) : e$1[D$1] = t, ru = (e$1, D$1, t) => (Qu(e$1, typeof D$1 != "symbol" ? D$1 + "" : D$1, t), t);
|
|
1176
|
+
let Xu = class extends p {
|
|
1177
|
+
constructor(D$1) {
|
|
1178
|
+
super(D$1, !1), ru(this, "options"), ru(this, "cursor", 0), this.options = D$1.options, this.cursor = this.options.findIndex(({ value: t }) => t === D$1.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (t) => {
|
|
1179
|
+
switch (t) {
|
|
1180
|
+
case "left":
|
|
1181
|
+
case "up":
|
|
1182
|
+
this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
|
|
1183
|
+
break;
|
|
1184
|
+
case "down":
|
|
1185
|
+
case "right":
|
|
1186
|
+
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
|
|
1187
|
+
break;
|
|
1188
|
+
}
|
|
1189
|
+
this.changeValue();
|
|
1190
|
+
});
|
|
1191
|
+
}
|
|
1192
|
+
get _selectedValue() {
|
|
1193
|
+
return this.options[this.cursor];
|
|
1194
|
+
}
|
|
1195
|
+
changeValue() {
|
|
1196
|
+
this.value = this._selectedValue.value;
|
|
1197
|
+
}
|
|
1198
|
+
};
|
|
1199
|
+
var uD = Object.defineProperty, DD = (e$1, D$1, t) => D$1 in e$1 ? uD(e$1, D$1, {
|
|
1200
|
+
enumerable: !0,
|
|
1201
|
+
configurable: !0,
|
|
1202
|
+
writable: !0,
|
|
1203
|
+
value: t
|
|
1204
|
+
}) : e$1[D$1] = t, Cu = (e$1, D$1, t) => (DD(e$1, typeof D$1 != "symbol" ? D$1 + "" : D$1, t), t);
|
|
1205
|
+
let tD = class extends p {
|
|
1206
|
+
constructor(D$1) {
|
|
1207
|
+
super(D$1, !1), Cu(this, "options"), Cu(this, "cursor", 0), this.options = D$1.options;
|
|
1208
|
+
const t = this.options.map(({ value: [s] }) => s?.toLowerCase());
|
|
1209
|
+
this.cursor = Math.max(t.indexOf(D$1.initialValue), 0), this.on("key", (s) => {
|
|
1210
|
+
if (!s || !t.includes(s)) return;
|
|
1211
|
+
const i = this.options.find(({ value: [F$1] }) => F$1?.toLowerCase() === s);
|
|
1212
|
+
i && (this.value = i.value, this.state = "submit", this.emit("submit"));
|
|
1213
|
+
});
|
|
1214
|
+
}
|
|
1215
|
+
};
|
|
1216
|
+
var eD = class extends p {
|
|
1217
|
+
get userInputWithCursor() {
|
|
1218
|
+
if (this.state === "submit") return this.userInput;
|
|
1219
|
+
const D$1 = this.userInput;
|
|
1220
|
+
if (this.cursor >= D$1.length) return `${this.userInput}\u2588`;
|
|
1221
|
+
const t = D$1.slice(0, this.cursor), [s, ...i] = D$1.slice(this.cursor);
|
|
1222
|
+
return `${t}${import_picocolors$3$1.default.inverse(s)}${i.join("")}`;
|
|
1223
|
+
}
|
|
1224
|
+
get cursor() {
|
|
1225
|
+
return this._cursor;
|
|
1226
|
+
}
|
|
1227
|
+
constructor(D$1) {
|
|
1228
|
+
super({
|
|
1229
|
+
...D$1,
|
|
1230
|
+
initialUserInput: D$1.initialUserInput ?? D$1.initialValue
|
|
1231
|
+
}), this.on("userInput", (t) => {
|
|
1232
|
+
this._setValue(t);
|
|
1233
|
+
}), this.on("finalize", () => {
|
|
1234
|
+
this.value || (this.value = D$1.defaultValue), this.value === void 0 && (this.value = "");
|
|
1235
|
+
});
|
|
1236
|
+
}
|
|
1237
|
+
};
|
|
1238
|
+
var sD = Object.defineProperty, iD = (e$1, D$1, t) => D$1 in e$1 ? sD(e$1, D$1, {
|
|
1239
|
+
enumerable: !0,
|
|
1240
|
+
configurable: !0,
|
|
1241
|
+
writable: !0,
|
|
1242
|
+
value: t
|
|
1243
|
+
}) : e$1[D$1] = t, w = (e$1, D$1, t) => (iD(e$1, typeof D$1 != "symbol" ? D$1 + "" : D$1, t), t), P$1 = (e$1, D$1, t) => {
|
|
1244
|
+
if (!D$1.has(e$1)) throw TypeError("Cannot " + t);
|
|
1245
|
+
}, x$1 = (e$1, D$1, t) => (P$1(e$1, D$1, "read from private field"), t ? t.call(e$1) : D$1.get(e$1)), g = (e$1, D$1, t) => {
|
|
1246
|
+
if (D$1.has(e$1)) throw TypeError("Cannot add the same private member more than once");
|
|
1247
|
+
D$1 instanceof WeakSet ? D$1.add(e$1) : D$1.set(e$1, t);
|
|
1248
|
+
}, m = (e$1, D$1, t, s) => (P$1(e$1, D$1, "write to private field"), s ? s.call(e$1, t) : D$1.set(e$1, t), t), nu = (e$1, D$1, t) => (P$1(e$1, D$1, "access private method"), t), B$1, k$1, I, v$1, R$1, ou, K$1, au;
|
|
1249
|
+
function FD(e$1, D$1) {
|
|
1250
|
+
if (e$1 === void 0 || D$1.length === 0) return 0;
|
|
1251
|
+
const t = D$1.findIndex((s) => s.value === e$1);
|
|
1252
|
+
return t !== -1 ? t : 0;
|
|
1253
|
+
}
|
|
1254
|
+
function rD(e$1, D$1) {
|
|
1255
|
+
return (D$1.label ?? String(D$1.value)).toLowerCase().includes(e$1.toLowerCase());
|
|
1256
|
+
}
|
|
1257
|
+
function CD(e$1, D$1) {
|
|
1258
|
+
if (D$1) return e$1 ? D$1 : D$1[0];
|
|
1259
|
+
}
|
|
1260
|
+
var nD = class extends p {
|
|
1261
|
+
constructor(D$1) {
|
|
1262
|
+
super(D$1), g(this, R$1), g(this, K$1), w(this, "filteredOptions"), w(this, "multiple"), w(this, "isNavigating", !1), w(this, "selectedValues", []), w(this, "focusedValue"), g(this, B$1, 0), g(this, k$1, ""), g(this, I, void 0), g(this, v$1, void 0), m(this, v$1, D$1.options);
|
|
1263
|
+
const t = this.options;
|
|
1264
|
+
this.filteredOptions = [...t], this.multiple = D$1.multiple === !0, m(this, I, D$1.filter ?? rD);
|
|
1265
|
+
let s;
|
|
1266
|
+
if (D$1.initialValue && Array.isArray(D$1.initialValue) ? this.multiple ? s = D$1.initialValue : s = D$1.initialValue.slice(0, 1) : !this.multiple && this.options.length > 0 && (s = [this.options[0].value]), s) for (const i of s) {
|
|
1267
|
+
const F$1 = t.findIndex((u) => u.value === i);
|
|
1268
|
+
F$1 !== -1 && (this.toggleSelected(i), m(this, B$1, F$1));
|
|
1269
|
+
}
|
|
1270
|
+
this.focusedValue = this.options[x$1(this, B$1)]?.value, this.on("key", (i, F$1) => nu(this, R$1, ou).call(this, i, F$1)), this.on("userInput", (i) => nu(this, K$1, au).call(this, i));
|
|
1271
|
+
}
|
|
1272
|
+
get cursor() {
|
|
1273
|
+
return x$1(this, B$1);
|
|
1274
|
+
}
|
|
1275
|
+
get userInputWithCursor() {
|
|
1276
|
+
if (!this.userInput) return import_picocolors$3$1.default.inverse(import_picocolors$3$1.default.hidden("_"));
|
|
1277
|
+
if (this._cursor >= this.userInput.length) return `${this.userInput}\u2588`;
|
|
1278
|
+
const D$1 = this.userInput.slice(0, this._cursor), [t, ...s] = this.userInput.slice(this._cursor);
|
|
1279
|
+
return `${D$1}${import_picocolors$3$1.default.inverse(t)}${s.join("")}`;
|
|
1280
|
+
}
|
|
1281
|
+
get options() {
|
|
1282
|
+
return typeof x$1(this, v$1) == "function" ? x$1(this, v$1).call(this) : x$1(this, v$1);
|
|
1283
|
+
}
|
|
1284
|
+
_isActionKey(D$1, t) {
|
|
1285
|
+
return D$1 === " " || this.multiple && this.isNavigating && t.name === "space" && D$1 !== void 0 && D$1 !== "";
|
|
1286
|
+
}
|
|
1287
|
+
deselectAll() {
|
|
1288
|
+
this.selectedValues = [];
|
|
1289
|
+
}
|
|
1290
|
+
toggleSelected(D$1) {
|
|
1291
|
+
this.filteredOptions.length !== 0 && (this.multiple ? this.selectedValues.includes(D$1) ? this.selectedValues = this.selectedValues.filter((t) => t !== D$1) : this.selectedValues = [...this.selectedValues, D$1] : this.selectedValues = [D$1]);
|
|
1292
|
+
}
|
|
1293
|
+
};
|
|
1294
|
+
B$1 = new WeakMap(), k$1 = new WeakMap(), I = new WeakMap(), v$1 = new WeakMap(), R$1 = new WeakSet(), ou = function(e$1, D$1) {
|
|
1295
|
+
const t = D$1.name === "up", s = D$1.name === "down", i = D$1.name === "return";
|
|
1296
|
+
t || s ? (m(this, B$1, Math.max(0, Math.min(x$1(this, B$1) + (t ? -1 : 1), this.filteredOptions.length - 1))), this.focusedValue = this.filteredOptions[x$1(this, B$1)]?.value, this.multiple || (this.selectedValues = [this.focusedValue]), this.isNavigating = !0) : i ? this.value = CD(this.multiple, this.selectedValues) : this.multiple ? this.focusedValue !== void 0 && (D$1.name === "tab" || this.isNavigating && D$1.name === "space") ? this.toggleSelected(this.focusedValue) : this.isNavigating = !1 : this.focusedValue && (this.selectedValues = [this.focusedValue]);
|
|
1297
|
+
}, K$1 = new WeakSet(), au = function(e$1) {
|
|
1298
|
+
if (e$1 !== x$1(this, k$1)) {
|
|
1299
|
+
m(this, k$1, e$1);
|
|
1300
|
+
const D$1 = this.options;
|
|
1301
|
+
e$1 ? this.filteredOptions = D$1.filter((t) => x$1(this, I).call(this, e$1, t)) : this.filteredOptions = [...D$1], m(this, B$1, FD(this.focusedValue, this.filteredOptions)), this.focusedValue = this.filteredOptions[x$1(this, B$1)]?.value, this.multiple || (this.focusedValue !== void 0 ? this.toggleSelected(this.focusedValue) : this.deselectAll());
|
|
1302
|
+
}
|
|
1303
|
+
};
|
|
1304
|
+
var import_picocolors$1$1 = __toESM(require_picocolors$1(), 1);
|
|
1305
|
+
var import_picocolors$2$1 = __toESM(require_picocolors$1(), 1);
|
|
1306
|
+
var import_src = __toESM(require_src(), 1);
|
|
1307
|
+
function Pe() {
|
|
1308
|
+
return process$1.platform !== "win32" ? process$1.env.TERM !== "linux" : !!process$1.env.CI || !!process$1.env.WT_SESSION || !!process$1.env.TERMINUS_SUBLIME || process$1.env.ConEmuTask === "{cmd::Cmder}" || process$1.env.TERM_PROGRAM === "Terminus-Sublime" || process$1.env.TERM_PROGRAM === "vscode" || process$1.env.TERM === "xterm-256color" || process$1.env.TERM === "alacritty" || process$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
1309
|
+
}
|
|
1310
|
+
const N = Pe(), D = () => process.env.CI === "true", v = (t, i) => N ? t : i, ne = v("◆", "*"), G = v("■", "x"), F = v("▲", "x"), O = v("◇", "o"), oe = v("┌", "T"), o = v("│", "|"), f = v("└", "—"), P = v("●", ">"), L = v("○", " "), k = v("◻", "[•]"), x = v("◼", "[+]"), B = v("◻", "[ ]"), ae = v("▪", "•"), U = v("─", "-"), ue = v("╮", "+"), ce = v("├", "+"), le = v("╯", "+"), H = v("●", "•"), K = v("◆", "*"), q = v("▲", "!"), X = v("■", "x"), E = (t) => {
|
|
1311
|
+
switch (t) {
|
|
1312
|
+
case "initial":
|
|
1313
|
+
case "active": return import_picocolors$2$1.default.cyan(ne);
|
|
1314
|
+
case "cancel": return import_picocolors$2$1.default.red(G);
|
|
1315
|
+
case "error": return import_picocolors$2$1.default.yellow(F);
|
|
1316
|
+
case "submit": return import_picocolors$2$1.default.green(O);
|
|
1317
|
+
}
|
|
1318
|
+
}, j = (t) => {
|
|
1319
|
+
const { cursor: i, options: r, style: s } = t, n$1 = t.output ?? process.stdout, a = n$1 instanceof WriteStream && n$1.rows !== void 0 ? n$1.rows : 10, l = import_picocolors$2$1.default.dim("..."), c$1 = t.maxItems ?? Number.POSITIVE_INFINITY, u = Math.max(a - 4, 0), $$1 = Math.min(u, Math.max(c$1, 5));
|
|
1320
|
+
let m$1 = 0;
|
|
1321
|
+
i >= m$1 + $$1 - 3 ? m$1 = Math.max(Math.min(i - $$1 + 3, r.length - $$1), 0) : i < m$1 + 2 && (m$1 = Math.max(i - 2, 0));
|
|
1322
|
+
const h$1 = $$1 < r.length && m$1 > 0, g$1 = $$1 < r.length && m$1 + $$1 < r.length;
|
|
1323
|
+
return r.slice(m$1, m$1 + $$1).map((p$1, d$1, y) => {
|
|
1324
|
+
const w$1 = d$1 === 0 && h$1, b$1 = d$1 === y.length - 1 && g$1;
|
|
1325
|
+
return w$1 || b$1 ? l : s(p$1, d$1 + m$1 === i);
|
|
1326
|
+
});
|
|
1327
|
+
};
|
|
1328
|
+
function $e(t) {
|
|
1329
|
+
return t.label ?? String(t.value ?? "");
|
|
1330
|
+
}
|
|
1331
|
+
function pe(t, i) {
|
|
1332
|
+
if (!t) return !0;
|
|
1333
|
+
const r = (i.label ?? String(i.value ?? "")).toLowerCase(), s = (i.hint ?? "").toLowerCase(), n$1 = String(i.value).toLowerCase(), a = t.toLowerCase();
|
|
1334
|
+
return r.includes(a) || s.includes(a) || n$1.includes(a);
|
|
1335
|
+
}
|
|
1336
|
+
function Le(t, i) {
|
|
1337
|
+
const r = [];
|
|
1338
|
+
for (const s of i) t.includes(s.value) && r.push(s);
|
|
1339
|
+
return r;
|
|
1340
|
+
}
|
|
1341
|
+
const me = (t) => new nD({
|
|
1342
|
+
options: t.options,
|
|
1343
|
+
initialValue: t.initialValue ? [t.initialValue] : void 0,
|
|
1344
|
+
initialUserInput: t.initialUserInput,
|
|
1345
|
+
filter: (i, r) => pe(i, r),
|
|
1346
|
+
signal: t.signal,
|
|
1347
|
+
input: t.input,
|
|
1348
|
+
output: t.output,
|
|
1349
|
+
validate: t.validate,
|
|
1350
|
+
render() {
|
|
1351
|
+
const i = `${import_picocolors$2$1.default.gray(o)}
|
|
1352
|
+
${E(this.state)} ${t.message}
|
|
1353
|
+
`, r = this.userInput, s = String(this.value ?? ""), n$1 = this.options, a = t.placeholder, l = s === "" && a !== void 0;
|
|
1354
|
+
switch (this.state) {
|
|
1355
|
+
case "submit": {
|
|
1356
|
+
const c$1 = Le(this.selectedValues, n$1), u = c$1.length > 0 ? c$1.map($e).join(", ") : "";
|
|
1357
|
+
return `${i}${import_picocolors$2$1.default.gray(o)} ${import_picocolors$2$1.default.dim(u)}`;
|
|
1358
|
+
}
|
|
1359
|
+
case "cancel": return `${i}${import_picocolors$2$1.default.gray(o)} ${import_picocolors$2$1.default.strikethrough(import_picocolors$2$1.default.dim(r))}`;
|
|
1360
|
+
default: {
|
|
1361
|
+
const c$1 = this.isNavigating || l ? import_picocolors$2$1.default.dim(l ? a : r) : this.userInputWithCursor, u = this.filteredOptions.length !== n$1.length ? import_picocolors$2$1.default.dim(` (${this.filteredOptions.length} match${this.filteredOptions.length === 1 ? "" : "es"})`) : "", $$1 = this.filteredOptions.length === 0 ? [] : j({
|
|
1362
|
+
cursor: this.cursor,
|
|
1363
|
+
options: this.filteredOptions,
|
|
1364
|
+
style: (p$1, d$1) => {
|
|
1365
|
+
const y = $e(p$1), w$1 = p$1.hint && p$1.value === this.focusedValue ? import_picocolors$2$1.default.dim(` (${p$1.hint})`) : "";
|
|
1366
|
+
return d$1 ? `${import_picocolors$2$1.default.green(P)} ${y}${w$1}` : `${import_picocolors$2$1.default.dim(L)} ${import_picocolors$2$1.default.dim(y)}${w$1}`;
|
|
1367
|
+
},
|
|
1368
|
+
maxItems: t.maxItems,
|
|
1369
|
+
output: t.output
|
|
1370
|
+
}), m$1 = [
|
|
1371
|
+
`${import_picocolors$2$1.default.dim("↑/↓")} to select`,
|
|
1372
|
+
`${import_picocolors$2$1.default.dim("Enter:")} confirm`,
|
|
1373
|
+
`${import_picocolors$2$1.default.dim("Type:")} to search`
|
|
1374
|
+
], h$1 = this.filteredOptions.length === 0 && r ? [`${import_picocolors$2$1.default.cyan(o)} ${import_picocolors$2$1.default.yellow("No matches found")}`] : [], g$1 = this.state === "error" ? [`${import_picocolors$2$1.default.yellow(o)} ${import_picocolors$2$1.default.yellow(this.error)}`] : [];
|
|
1375
|
+
return [
|
|
1376
|
+
i,
|
|
1377
|
+
`${import_picocolors$2$1.default.cyan(o)} ${import_picocolors$2$1.default.dim("Search:")} ${c$1}${u}`,
|
|
1378
|
+
...h$1,
|
|
1379
|
+
...g$1,
|
|
1380
|
+
...$$1.map((p$1) => `${import_picocolors$2$1.default.cyan(o)} ${p$1}`),
|
|
1381
|
+
`${import_picocolors$2$1.default.cyan(o)} ${import_picocolors$2$1.default.dim(m$1.join(" • "))}`,
|
|
1382
|
+
`${import_picocolors$2$1.default.cyan(f)}`
|
|
1383
|
+
].join(`
|
|
1384
|
+
`);
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
}).prompt(), Ne = (t) => {
|
|
1389
|
+
const i = (s, n$1, a, l) => {
|
|
1390
|
+
const c$1 = a.includes(s.value), u = s.label ?? String(s.value ?? ""), $$1 = s.hint && l !== void 0 && s.value === l ? import_picocolors$2$1.default.dim(` (${s.hint})`) : "", m$1 = c$1 ? import_picocolors$2$1.default.green(x) : import_picocolors$2$1.default.dim(B);
|
|
1391
|
+
return n$1 ? `${m$1} ${u}${$$1}` : `${m$1} ${import_picocolors$2$1.default.dim(u)}`;
|
|
1392
|
+
}, r = new nD({
|
|
1393
|
+
options: t.options,
|
|
1394
|
+
multiple: !0,
|
|
1395
|
+
filter: (s, n$1) => pe(s, n$1),
|
|
1396
|
+
validate: () => {
|
|
1397
|
+
if (t.required && r.selectedValues.length === 0) return "Please select at least one item";
|
|
993
1398
|
},
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1399
|
+
initialValue: t.initialValues,
|
|
1400
|
+
signal: t.signal,
|
|
1401
|
+
input: t.input,
|
|
1402
|
+
output: t.output,
|
|
1403
|
+
render() {
|
|
1404
|
+
const s = `${import_picocolors$2$1.default.gray(o)}
|
|
1405
|
+
${E(this.state)} ${t.message}
|
|
1406
|
+
`, n$1 = this.userInput, a = t.placeholder, l = n$1 === "" && a !== void 0, c$1 = this.isNavigating || l ? import_picocolors$2$1.default.dim(l ? a : n$1) : this.userInputWithCursor, u = this.options, $$1 = this.filteredOptions.length !== u.length ? import_picocolors$2$1.default.dim(` (${this.filteredOptions.length} match${this.filteredOptions.length === 1 ? "" : "es"})`) : "";
|
|
1407
|
+
switch (this.state) {
|
|
1408
|
+
case "submit": return `${s}${import_picocolors$2$1.default.gray(o)} ${import_picocolors$2$1.default.dim(`${this.selectedValues.length} items selected`)}`;
|
|
1409
|
+
case "cancel": return `${s}${import_picocolors$2$1.default.gray(o)} ${import_picocolors$2$1.default.strikethrough(import_picocolors$2$1.default.dim(n$1))}`;
|
|
1410
|
+
default: {
|
|
1411
|
+
const m$1 = [
|
|
1412
|
+
`${import_picocolors$2$1.default.dim("↑/↓")} to navigate`,
|
|
1413
|
+
`${import_picocolors$2$1.default.dim("Space:")} select`,
|
|
1414
|
+
`${import_picocolors$2$1.default.dim("Enter:")} confirm`,
|
|
1415
|
+
`${import_picocolors$2$1.default.dim("Type:")} to search`
|
|
1416
|
+
], h$1 = this.filteredOptions.length === 0 && n$1 ? [`${import_picocolors$2$1.default.cyan(o)} ${import_picocolors$2$1.default.yellow("No matches found")}`] : [], g$1 = this.state === "error" ? [`${import_picocolors$2$1.default.cyan(o)} ${import_picocolors$2$1.default.yellow(this.error)}`] : [], p$1 = j({
|
|
1417
|
+
cursor: this.cursor,
|
|
1418
|
+
options: this.filteredOptions,
|
|
1419
|
+
style: (d$1, y) => i(d$1, y, this.selectedValues, this.focusedValue),
|
|
1420
|
+
maxItems: t.maxItems,
|
|
1421
|
+
output: t.output
|
|
1422
|
+
});
|
|
1423
|
+
return [
|
|
1424
|
+
s,
|
|
1425
|
+
`${import_picocolors$2$1.default.cyan(o)} ${import_picocolors$2$1.default.dim("Search:")} ${c$1}${$$1}`,
|
|
1426
|
+
...h$1,
|
|
1427
|
+
...g$1,
|
|
1428
|
+
...p$1.map((d$1) => `${import_picocolors$2$1.default.cyan(o)} ${d$1}`),
|
|
1429
|
+
`${import_picocolors$2$1.default.cyan(o)} ${import_picocolors$2$1.default.dim(m$1.join(" • "))}`,
|
|
1430
|
+
`${import_picocolors$2$1.default.cyan(f)}`
|
|
1431
|
+
].join(`
|
|
1432
|
+
`);
|
|
1433
|
+
}
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
});
|
|
1437
|
+
return r.prompt();
|
|
1438
|
+
}, ke$1 = (t) => {
|
|
1439
|
+
const i = t.active ?? "Yes", r = t.inactive ?? "No";
|
|
1440
|
+
return new Wu({
|
|
1441
|
+
active: i,
|
|
1442
|
+
inactive: r,
|
|
1443
|
+
signal: t.signal,
|
|
1444
|
+
input: t.input,
|
|
1445
|
+
output: t.output,
|
|
1446
|
+
initialValue: t.initialValue ?? !0,
|
|
1447
|
+
render() {
|
|
1448
|
+
const s = `${import_picocolors$2$1.default.gray(o)}
|
|
1449
|
+
${E(this.state)} ${t.message}
|
|
1450
|
+
`, n$1 = this.value ? i : r;
|
|
1451
|
+
switch (this.state) {
|
|
1452
|
+
case "submit": return `${s}${import_picocolors$2$1.default.gray(o)} ${import_picocolors$2$1.default.dim(n$1)}`;
|
|
1453
|
+
case "cancel": return `${s}${import_picocolors$2$1.default.gray(o)} ${import_picocolors$2$1.default.strikethrough(import_picocolors$2$1.default.dim(n$1))}
|
|
1454
|
+
${import_picocolors$2$1.default.gray(o)}`;
|
|
1455
|
+
default: return `${s}${import_picocolors$2$1.default.cyan(o)} ${this.value ? `${import_picocolors$2$1.default.green(P)} ${i}` : `${import_picocolors$2$1.default.dim(L)} ${import_picocolors$2$1.default.dim(i)}`} ${import_picocolors$2$1.default.dim("/")} ${this.value ? `${import_picocolors$2$1.default.dim(L)} ${import_picocolors$2$1.default.dim(r)}` : `${import_picocolors$2$1.default.green(P)} ${r}`}
|
|
1456
|
+
${import_picocolors$2$1.default.cyan(f)}
|
|
1457
|
+
`;
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1460
|
+
}).prompt();
|
|
1461
|
+
}, Be = (t) => {
|
|
1462
|
+
const { selectableGroups: i = !0, groupSpacing: r = 0 } = t, s = (a, l, c$1 = []) => {
|
|
1463
|
+
const u = a.label ?? String(a.value), $$1 = typeof a.group == "string", m$1 = $$1 && (c$1[c$1.indexOf(a) + 1] ?? { group: !0 }), h$1 = $$1 && m$1.group === !0, g$1 = $$1 ? i ? `${h$1 ? f : o} ` : " " : "", p$1 = r > 0 && !$$1 ? `
|
|
1464
|
+
${import_picocolors$2$1.default.cyan(o)} `.repeat(r) : "";
|
|
1465
|
+
if (l === "active") return `${p$1}${import_picocolors$2$1.default.dim(g$1)}${import_picocolors$2$1.default.cyan(k)} ${u} ${a.hint ? import_picocolors$2$1.default.dim(`(${a.hint})`) : ""}`;
|
|
1466
|
+
if (l === "group-active") return `${p$1}${g$1}${import_picocolors$2$1.default.cyan(k)} ${import_picocolors$2$1.default.dim(u)}`;
|
|
1467
|
+
if (l === "group-active-selected") return `${p$1}${g$1}${import_picocolors$2$1.default.green(x)} ${import_picocolors$2$1.default.dim(u)}`;
|
|
1468
|
+
if (l === "selected") {
|
|
1469
|
+
const y = $$1 || i ? import_picocolors$2$1.default.green(x) : "";
|
|
1470
|
+
return `${p$1}${import_picocolors$2$1.default.dim(g$1)}${y} ${import_picocolors$2$1.default.dim(u)} ${a.hint ? import_picocolors$2$1.default.dim(`(${a.hint})`) : ""}`;
|
|
1471
|
+
}
|
|
1472
|
+
if (l === "cancelled") return `${import_picocolors$2$1.default.strikethrough(import_picocolors$2$1.default.dim(u))}`;
|
|
1473
|
+
if (l === "active-selected") return `${p$1}${import_picocolors$2$1.default.dim(g$1)}${import_picocolors$2$1.default.green(x)} ${u} ${a.hint ? import_picocolors$2$1.default.dim(`(${a.hint})`) : ""}`;
|
|
1474
|
+
if (l === "submitted") return `${import_picocolors$2$1.default.dim(u)}`;
|
|
1475
|
+
const d$1 = $$1 || i ? import_picocolors$2$1.default.dim(B) : "";
|
|
1476
|
+
return `${p$1}${import_picocolors$2$1.default.dim(g$1)}${d$1} ${import_picocolors$2$1.default.dim(u)}`;
|
|
1477
|
+
}, n$1 = t.required ?? !0;
|
|
1478
|
+
return new Ku({
|
|
1479
|
+
options: t.options,
|
|
1480
|
+
signal: t.signal,
|
|
1481
|
+
input: t.input,
|
|
1482
|
+
output: t.output,
|
|
1483
|
+
initialValues: t.initialValues,
|
|
1484
|
+
required: n$1,
|
|
1485
|
+
cursorAt: t.cursorAt,
|
|
1486
|
+
selectableGroups: i,
|
|
1487
|
+
validate(a) {
|
|
1488
|
+
if (n$1 && (a === void 0 || a.length === 0)) return `Please select at least one option.
|
|
1489
|
+
${import_picocolors$2$1.default.reset(import_picocolors$2$1.default.dim(`Press ${import_picocolors$2$1.default.gray(import_picocolors$2$1.default.bgWhite(import_picocolors$2$1.default.inverse(" space ")))} to select, ${import_picocolors$2$1.default.gray(import_picocolors$2$1.default.bgWhite(import_picocolors$2$1.default.inverse(" enter ")))} to submit`))}`;
|
|
1001
1490
|
},
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1491
|
+
render() {
|
|
1492
|
+
const a = `${import_picocolors$2$1.default.gray(o)}
|
|
1493
|
+
${E(this.state)} ${t.message}
|
|
1494
|
+
`, l = this.value ?? [];
|
|
1495
|
+
switch (this.state) {
|
|
1496
|
+
case "submit": return `${a}${import_picocolors$2$1.default.gray(o)} ${this.options.filter(({ value: c$1 }) => l.includes(c$1)).map((c$1) => s(c$1, "submitted")).join(import_picocolors$2$1.default.dim(", "))}`;
|
|
1497
|
+
case "cancel": {
|
|
1498
|
+
const c$1 = this.options.filter(({ value: u }) => l.includes(u)).map((u) => s(u, "cancelled")).join(import_picocolors$2$1.default.dim(", "));
|
|
1499
|
+
return `${a}${import_picocolors$2$1.default.gray(o)} ${c$1.trim() ? `${c$1}
|
|
1500
|
+
${import_picocolors$2$1.default.gray(o)}` : ""}`;
|
|
1501
|
+
}
|
|
1502
|
+
case "error": {
|
|
1503
|
+
const c$1 = this.error.split(`
|
|
1504
|
+
`).map((u, $$1) => $$1 === 0 ? `${import_picocolors$2$1.default.yellow(f)} ${import_picocolors$2$1.default.yellow(u)}` : ` ${u}`).join(`
|
|
1505
|
+
`);
|
|
1506
|
+
return `${a}${import_picocolors$2$1.default.yellow(o)} ${this.options.map((u, $$1, m$1) => {
|
|
1507
|
+
const h$1 = l.includes(u.value) || u.group === !0 && this.isGroupSelected(`${u.value}`), g$1 = $$1 === this.cursor;
|
|
1508
|
+
return !g$1 && typeof u.group == "string" && this.options[this.cursor].value === u.group ? s(u, h$1 ? "group-active-selected" : "group-active", m$1) : g$1 && h$1 ? s(u, "active-selected", m$1) : h$1 ? s(u, "selected", m$1) : s(u, g$1 ? "active" : "inactive", m$1);
|
|
1509
|
+
}).join(`
|
|
1510
|
+
${import_picocolors$2$1.default.yellow(o)} `)}
|
|
1511
|
+
${c$1}
|
|
1512
|
+
`;
|
|
1513
|
+
}
|
|
1514
|
+
default: return `${a}${import_picocolors$2$1.default.cyan(o)} ${this.options.map((c$1, u, $$1) => {
|
|
1515
|
+
const m$1 = l.includes(c$1.value) || c$1.group === !0 && this.isGroupSelected(`${c$1.value}`), h$1 = u === this.cursor;
|
|
1516
|
+
return !h$1 && typeof c$1.group == "string" && this.options[this.cursor].value === c$1.group ? s(c$1, m$1 ? "group-active-selected" : "group-active", $$1) : h$1 && m$1 ? s(c$1, "active-selected", $$1) : m$1 ? s(c$1, "selected", $$1) : s(c$1, h$1 ? "active" : "inactive", $$1);
|
|
1517
|
+
}).join(`
|
|
1518
|
+
${import_picocolors$2$1.default.cyan(o)} `)}
|
|
1519
|
+
${import_picocolors$2$1.default.cyan(f)}
|
|
1520
|
+
`;
|
|
1521
|
+
}
|
|
1030
1522
|
}
|
|
1031
|
-
};
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
const unicode = isUnicodeSupported();
|
|
1042
|
-
const s = (c, fallback) => unicode ? c : fallback;
|
|
1043
|
-
const S_STEP_ACTIVE = s("◆", "*");
|
|
1044
|
-
const S_STEP_CANCEL = s("■", "x");
|
|
1045
|
-
const S_STEP_ERROR = s("▲", "x");
|
|
1046
|
-
const S_STEP_SUBMIT = s("◇", "o");
|
|
1047
|
-
const S_BAR_START = s("┌", "T");
|
|
1048
|
-
const S_BAR = s("│", "|");
|
|
1049
|
-
const S_BAR_END = s("└", "—");
|
|
1050
|
-
const S_RADIO_ACTIVE = s("●", ">");
|
|
1051
|
-
const S_RADIO_INACTIVE = s("○", " ");
|
|
1052
|
-
const S_CHECKBOX_ACTIVE = s("◻", "[•]");
|
|
1053
|
-
const S_CHECKBOX_SELECTED = s("◼", "[+]");
|
|
1054
|
-
const S_CHECKBOX_INACTIVE = s("◻", "[ ]");
|
|
1055
|
-
const S_PASSWORD_MASK = s("▪", "•");
|
|
1056
|
-
const S_BAR_H = s("─", "-");
|
|
1057
|
-
const S_CORNER_TOP_RIGHT = s("╮", "+");
|
|
1058
|
-
const S_CONNECT_LEFT = s("├", "+");
|
|
1059
|
-
const S_CORNER_BOTTOM_RIGHT = s("╯", "+");
|
|
1060
|
-
const S_INFO = s("●", "•");
|
|
1061
|
-
const S_SUCCESS = s("◆", "*");
|
|
1062
|
-
const S_WARN = s("▲", "!");
|
|
1063
|
-
const S_ERROR = s("■", "x");
|
|
1064
|
-
const log$1 = {
|
|
1065
|
-
message: (message = "", { symbol: symbol$1 = import_picocolors$3$1.default.gray(S_BAR) } = {}) => {
|
|
1066
|
-
const parts = [import_picocolors$3$1.default.gray(S_BAR)];
|
|
1067
|
-
if (message) {
|
|
1068
|
-
const [firstLine, ...lines] = message.split("\n");
|
|
1069
|
-
parts.push(`${symbol$1} ${firstLine}`, ...lines.map((ln) => `${import_picocolors$3$1.default.gray(S_BAR)} ${ln}`));
|
|
1523
|
+
}).prompt();
|
|
1524
|
+
}, We$1 = async (t, i) => {
|
|
1525
|
+
const r = {}, s = Object.keys(t);
|
|
1526
|
+
for (const n$1 of s) {
|
|
1527
|
+
const a = t[n$1], l = await a({ results: r })?.catch((c$1) => {
|
|
1528
|
+
throw c$1;
|
|
1529
|
+
});
|
|
1530
|
+
if (typeof i?.onCancel == "function" && Vu$1(l)) {
|
|
1531
|
+
r[n$1] = "canceled", i.onCancel({ results: r });
|
|
1532
|
+
continue;
|
|
1070
1533
|
}
|
|
1071
|
-
|
|
1534
|
+
r[n$1] = l;
|
|
1535
|
+
}
|
|
1536
|
+
return r;
|
|
1537
|
+
}, T$2 = {
|
|
1538
|
+
message: (t = [], { symbol: i = import_picocolors$2$1.default.gray(o), secondarySymbol: r = import_picocolors$2$1.default.gray(o), output: s = process.stdout, spacing: n$1 = 1 } = {}) => {
|
|
1539
|
+
const a = [];
|
|
1540
|
+
for (let c$1 = 0; c$1 < n$1; c$1++) a.push(`${r}`);
|
|
1541
|
+
const l = Array.isArray(t) ? t : t.split(`
|
|
1542
|
+
`);
|
|
1543
|
+
if (l.length > 0) {
|
|
1544
|
+
const [c$1, ...u] = l;
|
|
1545
|
+
c$1.length > 0 ? a.push(`${i} ${c$1}`) : a.push(i);
|
|
1546
|
+
for (const $$1 of u) $$1.length > 0 ? a.push(`${r} ${$$1}`) : a.push(r);
|
|
1547
|
+
}
|
|
1548
|
+
s.write(`${a.join(`
|
|
1549
|
+
`)}
|
|
1550
|
+
`);
|
|
1072
1551
|
},
|
|
1073
|
-
info: (
|
|
1074
|
-
|
|
1552
|
+
info: (t, i) => {
|
|
1553
|
+
T$2.message(t, {
|
|
1554
|
+
...i,
|
|
1555
|
+
symbol: import_picocolors$2$1.default.blue(H)
|
|
1556
|
+
});
|
|
1075
1557
|
},
|
|
1076
|
-
success: (
|
|
1077
|
-
|
|
1558
|
+
success: (t, i) => {
|
|
1559
|
+
T$2.message(t, {
|
|
1560
|
+
...i,
|
|
1561
|
+
symbol: import_picocolors$2$1.default.green(K)
|
|
1562
|
+
});
|
|
1078
1563
|
},
|
|
1079
|
-
step: (
|
|
1080
|
-
|
|
1564
|
+
step: (t, i) => {
|
|
1565
|
+
T$2.message(t, {
|
|
1566
|
+
...i,
|
|
1567
|
+
symbol: import_picocolors$2$1.default.green(O)
|
|
1568
|
+
});
|
|
1081
1569
|
},
|
|
1082
|
-
warn: (
|
|
1083
|
-
|
|
1570
|
+
warn: (t, i) => {
|
|
1571
|
+
T$2.message(t, {
|
|
1572
|
+
...i,
|
|
1573
|
+
symbol: import_picocolors$2$1.default.yellow(q)
|
|
1574
|
+
});
|
|
1084
1575
|
},
|
|
1085
|
-
warning: (
|
|
1086
|
-
|
|
1576
|
+
warning: (t, i) => {
|
|
1577
|
+
T$2.warn(t, i);
|
|
1087
1578
|
},
|
|
1088
|
-
error: (
|
|
1089
|
-
|
|
1579
|
+
error: (t, i) => {
|
|
1580
|
+
T$2.message(t, {
|
|
1581
|
+
...i,
|
|
1582
|
+
symbol: import_picocolors$2$1.default.red(X)
|
|
1583
|
+
});
|
|
1090
1584
|
}
|
|
1585
|
+
}, De$1 = (t = "", i) => {
|
|
1586
|
+
(i?.output ?? process.stdout).write(`${import_picocolors$2$1.default.gray(f)} ${import_picocolors$2$1.default.red(t)}
|
|
1587
|
+
|
|
1588
|
+
`);
|
|
1589
|
+
}, Ge$1 = (t = "", i) => {
|
|
1590
|
+
(i?.output ?? process.stdout).write(`${import_picocolors$2$1.default.gray(oe)} ${t}
|
|
1591
|
+
`);
|
|
1592
|
+
}, Fe$1 = (t = "", i) => {
|
|
1593
|
+
(i?.output ?? process.stdout).write(`${import_picocolors$2$1.default.gray(o)}
|
|
1594
|
+
${import_picocolors$2$1.default.gray(f)} ${t}
|
|
1595
|
+
|
|
1596
|
+
`);
|
|
1597
|
+
}, Ue$1 = (t) => {
|
|
1598
|
+
const i = (s, n$1) => {
|
|
1599
|
+
const a = s.label ?? String(s.value);
|
|
1600
|
+
return n$1 === "active" ? `${import_picocolors$2$1.default.cyan(k)} ${a} ${s.hint ? import_picocolors$2$1.default.dim(`(${s.hint})`) : ""}` : n$1 === "selected" ? `${import_picocolors$2$1.default.green(x)} ${import_picocolors$2$1.default.dim(a)} ${s.hint ? import_picocolors$2$1.default.dim(`(${s.hint})`) : ""}` : n$1 === "cancelled" ? `${import_picocolors$2$1.default.strikethrough(import_picocolors$2$1.default.dim(a))}` : n$1 === "active-selected" ? `${import_picocolors$2$1.default.green(x)} ${a} ${s.hint ? import_picocolors$2$1.default.dim(`(${s.hint})`) : ""}` : n$1 === "submitted" ? `${import_picocolors$2$1.default.dim(a)}` : `${import_picocolors$2$1.default.dim(B)} ${import_picocolors$2$1.default.dim(a)}`;
|
|
1601
|
+
}, r = t.required ?? !0;
|
|
1602
|
+
return new Uu({
|
|
1603
|
+
options: t.options,
|
|
1604
|
+
signal: t.signal,
|
|
1605
|
+
input: t.input,
|
|
1606
|
+
output: t.output,
|
|
1607
|
+
initialValues: t.initialValues,
|
|
1608
|
+
required: r,
|
|
1609
|
+
cursorAt: t.cursorAt,
|
|
1610
|
+
validate(s) {
|
|
1611
|
+
if (r && (s === void 0 || s.length === 0)) return `Please select at least one option.
|
|
1612
|
+
${import_picocolors$2$1.default.reset(import_picocolors$2$1.default.dim(`Press ${import_picocolors$2$1.default.gray(import_picocolors$2$1.default.bgWhite(import_picocolors$2$1.default.inverse(" space ")))} to select, ${import_picocolors$2$1.default.gray(import_picocolors$2$1.default.bgWhite(import_picocolors$2$1.default.inverse(" enter ")))} to submit`))}`;
|
|
1613
|
+
},
|
|
1614
|
+
render() {
|
|
1615
|
+
const s = `${import_picocolors$2$1.default.gray(o)}
|
|
1616
|
+
${E(this.state)} ${t.message}
|
|
1617
|
+
`, n$1 = this.value ?? [], a = (l, c$1) => {
|
|
1618
|
+
const u = n$1.includes(l.value);
|
|
1619
|
+
return c$1 && u ? i(l, "active-selected") : u ? i(l, "selected") : i(l, c$1 ? "active" : "inactive");
|
|
1620
|
+
};
|
|
1621
|
+
switch (this.state) {
|
|
1622
|
+
case "submit": return `${s}${import_picocolors$2$1.default.gray(o)} ${this.options.filter(({ value: l }) => n$1.includes(l)).map((l) => i(l, "submitted")).join(import_picocolors$2$1.default.dim(", ")) || import_picocolors$2$1.default.dim("none")}`;
|
|
1623
|
+
case "cancel": {
|
|
1624
|
+
const l = this.options.filter(({ value: c$1 }) => n$1.includes(c$1)).map((c$1) => i(c$1, "cancelled")).join(import_picocolors$2$1.default.dim(", "));
|
|
1625
|
+
return `${s}${import_picocolors$2$1.default.gray(o)} ${l.trim() ? `${l}
|
|
1626
|
+
${import_picocolors$2$1.default.gray(o)}` : ""}`;
|
|
1627
|
+
}
|
|
1628
|
+
case "error": {
|
|
1629
|
+
const l = this.error.split(`
|
|
1630
|
+
`).map((c$1, u) => u === 0 ? `${import_picocolors$2$1.default.yellow(f)} ${import_picocolors$2$1.default.yellow(c$1)}` : ` ${c$1}`).join(`
|
|
1631
|
+
`);
|
|
1632
|
+
return `${s + import_picocolors$2$1.default.yellow(o)} ${j({
|
|
1633
|
+
output: t.output,
|
|
1634
|
+
options: this.options,
|
|
1635
|
+
cursor: this.cursor,
|
|
1636
|
+
maxItems: t.maxItems,
|
|
1637
|
+
style: a
|
|
1638
|
+
}).join(`
|
|
1639
|
+
${import_picocolors$2$1.default.yellow(o)} `)}
|
|
1640
|
+
${l}
|
|
1641
|
+
`;
|
|
1642
|
+
}
|
|
1643
|
+
default: return `${s}${import_picocolors$2$1.default.cyan(o)} ${j({
|
|
1644
|
+
output: t.output,
|
|
1645
|
+
options: this.options,
|
|
1646
|
+
cursor: this.cursor,
|
|
1647
|
+
maxItems: t.maxItems,
|
|
1648
|
+
style: a
|
|
1649
|
+
}).join(`
|
|
1650
|
+
${import_picocolors$2$1.default.cyan(o)} `)}
|
|
1651
|
+
${import_picocolors$2$1.default.cyan(f)}
|
|
1652
|
+
`;
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
}).prompt();
|
|
1656
|
+
}, He = (t) => import_picocolors$2$1.default.dim(t), Ke$1 = (t = "", i = "", r) => {
|
|
1657
|
+
const s = r?.format ?? He, n$1 = [
|
|
1658
|
+
"",
|
|
1659
|
+
...t.split(`
|
|
1660
|
+
`).map(s),
|
|
1661
|
+
""
|
|
1662
|
+
], a = stripVTControlCharacters(i).length, l = r?.output ?? process.stdout, c$1 = Math.max(n$1.reduce(($$1, m$1) => {
|
|
1663
|
+
const h$1 = stripVTControlCharacters(m$1);
|
|
1664
|
+
return h$1.length > $$1 ? h$1.length : $$1;
|
|
1665
|
+
}, 0), a) + 2, u = n$1.map(($$1) => `${import_picocolors$2$1.default.gray(o)} ${$$1}${" ".repeat(c$1 - stripVTControlCharacters($$1).length)}${import_picocolors$2$1.default.gray(o)}`).join(`
|
|
1666
|
+
`);
|
|
1667
|
+
l.write(`${import_picocolors$2$1.default.gray(o)}
|
|
1668
|
+
${import_picocolors$2$1.default.green(O)} ${import_picocolors$2$1.default.reset(i)} ${import_picocolors$2$1.default.gray(U.repeat(Math.max(c$1 - a - 1, 1)) + ue)}
|
|
1669
|
+
${u}
|
|
1670
|
+
${import_picocolors$2$1.default.gray(ce + U.repeat(c$1 + 2) + le)}
|
|
1671
|
+
`);
|
|
1672
|
+
}, qe = (t) => new Hu({
|
|
1673
|
+
validate: t.validate,
|
|
1674
|
+
mask: t.mask ?? ae,
|
|
1675
|
+
signal: t.signal,
|
|
1676
|
+
input: t.input,
|
|
1677
|
+
output: t.output,
|
|
1678
|
+
render() {
|
|
1679
|
+
const i = `${import_picocolors$2$1.default.gray(o)}
|
|
1680
|
+
${E(this.state)} ${t.message}
|
|
1681
|
+
`, r = this.userInputWithCursor, s = this.masked;
|
|
1682
|
+
switch (this.state) {
|
|
1683
|
+
case "error": return `${i.trim()}
|
|
1684
|
+
${import_picocolors$2$1.default.yellow(o)} ${s}
|
|
1685
|
+
${import_picocolors$2$1.default.yellow(f)} ${import_picocolors$2$1.default.yellow(this.error)}
|
|
1686
|
+
`;
|
|
1687
|
+
case "submit": return `${i}${import_picocolors$2$1.default.gray(o)} ${import_picocolors$2$1.default.dim(s)}`;
|
|
1688
|
+
case "cancel": return `${i}${import_picocolors$2$1.default.gray(o)} ${import_picocolors$2$1.default.strikethrough(import_picocolors$2$1.default.dim(s))}${s ? `
|
|
1689
|
+
${import_picocolors$2$1.default.gray(o)}` : ""}`;
|
|
1690
|
+
default: return `${i}${import_picocolors$2$1.default.cyan(o)} ${r}
|
|
1691
|
+
${import_picocolors$2$1.default.cyan(f)}
|
|
1692
|
+
`;
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
}).prompt(), Xe = (t) => {
|
|
1696
|
+
const i = t.validate;
|
|
1697
|
+
return me({
|
|
1698
|
+
...t,
|
|
1699
|
+
initialUserInput: t.initialValue ?? t.root ?? process.cwd(),
|
|
1700
|
+
maxItems: 5,
|
|
1701
|
+
validate(r) {
|
|
1702
|
+
if (!Array.isArray(r)) {
|
|
1703
|
+
if (!r) return "Please select a path";
|
|
1704
|
+
if (i) return i(r);
|
|
1705
|
+
}
|
|
1706
|
+
},
|
|
1707
|
+
options() {
|
|
1708
|
+
const r = this.userInput;
|
|
1709
|
+
if (r === "") return [];
|
|
1710
|
+
try {
|
|
1711
|
+
let s;
|
|
1712
|
+
return existsSync(r) ? lstatSync(r).isDirectory() ? s = r : s = dirname(r) : s = dirname(r), readdirSync(s).map((n$1) => {
|
|
1713
|
+
const a = join(s, n$1), l = lstatSync(a);
|
|
1714
|
+
return {
|
|
1715
|
+
name: n$1,
|
|
1716
|
+
path: a,
|
|
1717
|
+
isDirectory: l.isDirectory()
|
|
1718
|
+
};
|
|
1719
|
+
}).filter(({ path: n$1, isDirectory: a }) => n$1.startsWith(r) && (t.directory || !a)).map((n$1) => ({ value: n$1.path }));
|
|
1720
|
+
} catch {
|
|
1721
|
+
return [];
|
|
1722
|
+
}
|
|
1723
|
+
}
|
|
1724
|
+
});
|
|
1725
|
+
}, J$2 = ({ indicator: t = "dots", onCancel: i, output: r = process.stdout, cancelMessage: s, errorMessage: n$1, frames: a = N ? [
|
|
1726
|
+
"◒",
|
|
1727
|
+
"◐",
|
|
1728
|
+
"◓",
|
|
1729
|
+
"◑"
|
|
1730
|
+
] : [
|
|
1731
|
+
"•",
|
|
1732
|
+
"o",
|
|
1733
|
+
"O",
|
|
1734
|
+
"0"
|
|
1735
|
+
], delay: l = N ? 80 : 120, signal: c$1 } = {}) => {
|
|
1736
|
+
const u = D();
|
|
1737
|
+
let $$1, m$1, h$1 = !1, g$1 = !1, p$1 = "", d$1, y = performance.now();
|
|
1738
|
+
const w$1 = (S$1) => {
|
|
1739
|
+
const I$1 = S$1 > 1 ? n$1 ?? c.messages.error : s ?? c.messages.cancel;
|
|
1740
|
+
g$1 = S$1 === 1, h$1 && (Z$1(I$1, S$1), g$1 && typeof i == "function" && i());
|
|
1741
|
+
}, b$1 = () => w$1(2), M$1 = () => w$1(1), ge = () => {
|
|
1742
|
+
process.on("uncaughtExceptionMonitor", b$1), process.on("unhandledRejection", b$1), process.on("SIGINT", M$1), process.on("SIGTERM", M$1), process.on("exit", w$1), c$1 && c$1.addEventListener("abort", M$1);
|
|
1743
|
+
}, ye = () => {
|
|
1744
|
+
process.removeListener("uncaughtExceptionMonitor", b$1), process.removeListener("unhandledRejection", b$1), process.removeListener("SIGINT", M$1), process.removeListener("SIGTERM", M$1), process.removeListener("exit", w$1), c$1 && c$1.removeEventListener("abort", M$1);
|
|
1745
|
+
}, Y$1 = () => {
|
|
1746
|
+
if (d$1 === void 0) return;
|
|
1747
|
+
u && r.write(`
|
|
1748
|
+
`);
|
|
1749
|
+
const S$1 = d$1.split(`
|
|
1750
|
+
`);
|
|
1751
|
+
r.write(import_src.cursor.move(-999, S$1.length - 1)), r.write(import_src.erase.down(S$1.length));
|
|
1752
|
+
}, z = (S$1) => S$1.replace(/\.+$/, ""), Q$1 = (S$1) => {
|
|
1753
|
+
const I$1 = (performance.now() - S$1) / 1e3, _$1 = Math.floor(I$1 / 60), A = Math.floor(I$1 % 60);
|
|
1754
|
+
return _$1 > 0 ? `[${_$1}m ${A}s]` : `[${A}s]`;
|
|
1755
|
+
}, ve = (S$1 = "") => {
|
|
1756
|
+
h$1 = !0, $$1 = Mu({ output: r }), p$1 = z(S$1), y = performance.now(), r.write(`${import_picocolors$2$1.default.gray(o)}
|
|
1757
|
+
`);
|
|
1758
|
+
let I$1 = 0, _$1 = 0;
|
|
1759
|
+
ge(), m$1 = setInterval(() => {
|
|
1760
|
+
if (u && p$1 === d$1) return;
|
|
1761
|
+
Y$1(), d$1 = p$1;
|
|
1762
|
+
const A = import_picocolors$2$1.default.magenta(a[I$1]);
|
|
1763
|
+
if (u) r.write(`${A} ${p$1}...`);
|
|
1764
|
+
else if (t === "timer") r.write(`${A} ${p$1} ${Q$1(y)}`);
|
|
1765
|
+
else {
|
|
1766
|
+
const fe = ".".repeat(Math.floor(_$1)).slice(0, 3);
|
|
1767
|
+
r.write(`${A} ${p$1}${fe}`);
|
|
1768
|
+
}
|
|
1769
|
+
I$1 = I$1 + 1 < a.length ? I$1 + 1 : 0, _$1 = _$1 < 4 ? _$1 + .125 : 0;
|
|
1770
|
+
}, l);
|
|
1771
|
+
}, Z$1 = (S$1 = "", I$1 = 0) => {
|
|
1772
|
+
h$1 = !1, clearInterval(m$1), Y$1();
|
|
1773
|
+
const _$1 = I$1 === 0 ? import_picocolors$2$1.default.green(O) : I$1 === 1 ? import_picocolors$2$1.default.red(G) : import_picocolors$2$1.default.red(F);
|
|
1774
|
+
p$1 = S$1 ?? p$1, t === "timer" ? r.write(`${_$1} ${p$1} ${Q$1(y)}
|
|
1775
|
+
`) : r.write(`${_$1} ${p$1}
|
|
1776
|
+
`), ye(), $$1();
|
|
1777
|
+
};
|
|
1778
|
+
return {
|
|
1779
|
+
start: ve,
|
|
1780
|
+
stop: Z$1,
|
|
1781
|
+
message: (S$1 = "") => {
|
|
1782
|
+
p$1 = z(S$1 ?? p$1);
|
|
1783
|
+
},
|
|
1784
|
+
get isCancelled() {
|
|
1785
|
+
return g$1;
|
|
1786
|
+
}
|
|
1787
|
+
};
|
|
1788
|
+
}, de = {
|
|
1789
|
+
light: v("─", "-"),
|
|
1790
|
+
heavy: v("━", "="),
|
|
1791
|
+
block: v("█", "#")
|
|
1091
1792
|
};
|
|
1793
|
+
const Ye = (t) => {
|
|
1794
|
+
const i = (r, s = "inactive") => {
|
|
1795
|
+
const n$1 = r.label ?? String(r.value);
|
|
1796
|
+
return s === "selected" ? `${import_picocolors$2$1.default.dim(n$1)}` : s === "cancelled" ? `${import_picocolors$2$1.default.strikethrough(import_picocolors$2$1.default.dim(n$1))}` : s === "active" ? `${import_picocolors$2$1.default.bgCyan(import_picocolors$2$1.default.gray(` ${r.value} `))} ${n$1} ${r.hint ? import_picocolors$2$1.default.dim(`(${r.hint})`) : ""}` : `${import_picocolors$2$1.default.gray(import_picocolors$2$1.default.bgWhite(import_picocolors$2$1.default.inverse(` ${r.value} `)))} ${n$1} ${r.hint ? import_picocolors$2$1.default.dim(`(${r.hint})`) : ""}`;
|
|
1797
|
+
};
|
|
1798
|
+
return new tD({
|
|
1799
|
+
options: t.options,
|
|
1800
|
+
signal: t.signal,
|
|
1801
|
+
input: t.input,
|
|
1802
|
+
output: t.output,
|
|
1803
|
+
initialValue: t.initialValue,
|
|
1804
|
+
render() {
|
|
1805
|
+
const r = `${import_picocolors$2$1.default.gray(o)}
|
|
1806
|
+
${E(this.state)} ${t.message}
|
|
1807
|
+
`;
|
|
1808
|
+
switch (this.state) {
|
|
1809
|
+
case "submit": return `${r}${import_picocolors$2$1.default.gray(o)} ${i(this.options.find((s) => s.value === this.value) ?? t.options[0], "selected")}`;
|
|
1810
|
+
case "cancel": return `${r}${import_picocolors$2$1.default.gray(o)} ${i(this.options[0], "cancelled")}
|
|
1811
|
+
${import_picocolors$2$1.default.gray(o)}`;
|
|
1812
|
+
default: return `${r}${import_picocolors$2$1.default.cyan(o)} ${this.options.map((s, n$1) => i(s, n$1 === this.cursor ? "active" : "inactive")).join(`
|
|
1813
|
+
${import_picocolors$2$1.default.cyan(o)} `)}
|
|
1814
|
+
${import_picocolors$2$1.default.cyan(f)}
|
|
1815
|
+
`;
|
|
1816
|
+
}
|
|
1817
|
+
}
|
|
1818
|
+
}).prompt();
|
|
1819
|
+
}, ze$1 = (t) => {
|
|
1820
|
+
const i = (r, s) => {
|
|
1821
|
+
const n$1 = r.label ?? String(r.value);
|
|
1822
|
+
switch (s) {
|
|
1823
|
+
case "selected": return `${import_picocolors$2$1.default.dim(n$1)}`;
|
|
1824
|
+
case "active": return `${import_picocolors$2$1.default.green(P)} ${n$1} ${r.hint ? import_picocolors$2$1.default.dim(`(${r.hint})`) : ""}`;
|
|
1825
|
+
case "cancelled": return `${import_picocolors$2$1.default.strikethrough(import_picocolors$2$1.default.dim(n$1))}`;
|
|
1826
|
+
default: return `${import_picocolors$2$1.default.dim(L)} ${import_picocolors$2$1.default.dim(n$1)}`;
|
|
1827
|
+
}
|
|
1828
|
+
};
|
|
1829
|
+
return new Xu({
|
|
1830
|
+
options: t.options,
|
|
1831
|
+
signal: t.signal,
|
|
1832
|
+
input: t.input,
|
|
1833
|
+
output: t.output,
|
|
1834
|
+
initialValue: t.initialValue,
|
|
1835
|
+
render() {
|
|
1836
|
+
const r = `${import_picocolors$2$1.default.gray(o)}
|
|
1837
|
+
${E(this.state)} ${t.message}
|
|
1838
|
+
`;
|
|
1839
|
+
switch (this.state) {
|
|
1840
|
+
case "submit": return `${r}${import_picocolors$2$1.default.gray(o)} ${i(this.options[this.cursor], "selected")}`;
|
|
1841
|
+
case "cancel": return `${r}${import_picocolors$2$1.default.gray(o)} ${i(this.options[this.cursor], "cancelled")}
|
|
1842
|
+
${import_picocolors$2$1.default.gray(o)}`;
|
|
1843
|
+
default: return `${r}${import_picocolors$2$1.default.cyan(o)} ${j({
|
|
1844
|
+
output: t.output,
|
|
1845
|
+
cursor: this.cursor,
|
|
1846
|
+
options: this.options,
|
|
1847
|
+
maxItems: t.maxItems,
|
|
1848
|
+
style: (s, n$1) => i(s, n$1 ? "active" : "inactive")
|
|
1849
|
+
}).join(`
|
|
1850
|
+
${import_picocolors$2$1.default.cyan(o)} `)}
|
|
1851
|
+
${import_picocolors$2$1.default.cyan(f)}
|
|
1852
|
+
`;
|
|
1853
|
+
}
|
|
1854
|
+
}
|
|
1855
|
+
}).prompt();
|
|
1856
|
+
}, he = `${import_picocolors$2$1.default.gray(o)} `, R = {
|
|
1857
|
+
message: async (t, { symbol: i = import_picocolors$2$1.default.gray(o) } = {}) => {
|
|
1858
|
+
process.stdout.write(`${import_picocolors$2$1.default.gray(o)}
|
|
1859
|
+
${i} `);
|
|
1860
|
+
let r = 3;
|
|
1861
|
+
for await (let s of t) {
|
|
1862
|
+
s = s.replace(/\n/g, `
|
|
1863
|
+
${he}`), s.includes(`
|
|
1864
|
+
`) && (r = 3 + stripVTControlCharacters(s.slice(s.lastIndexOf(`
|
|
1865
|
+
`))).length);
|
|
1866
|
+
const n$1 = stripVTControlCharacters(s).length;
|
|
1867
|
+
r + n$1 < process.stdout.columns ? (r += n$1, process.stdout.write(s)) : (process.stdout.write(`
|
|
1868
|
+
${he}${s.trimStart()}`), r = 3 + stripVTControlCharacters(s.trimStart()).length);
|
|
1869
|
+
}
|
|
1870
|
+
process.stdout.write(`
|
|
1871
|
+
`);
|
|
1872
|
+
},
|
|
1873
|
+
info: (t) => R.message(t, { symbol: import_picocolors$2$1.default.blue(H) }),
|
|
1874
|
+
success: (t) => R.message(t, { symbol: import_picocolors$2$1.default.green(K) }),
|
|
1875
|
+
step: (t) => R.message(t, { symbol: import_picocolors$2$1.default.green(O) }),
|
|
1876
|
+
warn: (t) => R.message(t, { symbol: import_picocolors$2$1.default.yellow(q) }),
|
|
1877
|
+
warning: (t) => R.warn(t),
|
|
1878
|
+
error: (t) => R.message(t, { symbol: import_picocolors$2$1.default.red(X) })
|
|
1879
|
+
}, Qe = async (t, i) => {
|
|
1880
|
+
for (const r of t) {
|
|
1881
|
+
if (r.enabled === !1) continue;
|
|
1882
|
+
const s = J$2(i);
|
|
1883
|
+
s.start(r.title);
|
|
1884
|
+
const n$1 = await r.task(s.message);
|
|
1885
|
+
s.stop(n$1 || r.title);
|
|
1886
|
+
}
|
|
1887
|
+
}, Ze = (t) => {
|
|
1888
|
+
const i = t.output ?? process.stdout, r = Ou(i), s = import_picocolors$1$1.gray(o), n$1 = t.spacing ?? 1, a = 3, l = t.retainLog === !0, c$1 = D();
|
|
1889
|
+
i.write(`${s}
|
|
1890
|
+
`), i.write(`${import_picocolors$1$1.green(O)} ${t.title}
|
|
1891
|
+
`);
|
|
1892
|
+
for (let d$1 = 0; d$1 < n$1; d$1++) i.write(`${s}
|
|
1893
|
+
`);
|
|
1894
|
+
let u = "", $$1 = "", m$1 = !1;
|
|
1895
|
+
const h$1 = (d$1) => {
|
|
1896
|
+
if (u.length === 0) return;
|
|
1897
|
+
const y = u.split(`
|
|
1898
|
+
`).reduce((w$1, b$1) => b$1 === "" ? w$1 + 1 : w$1 + Math.ceil((b$1.length + a) / r), 0) + 1 + (d$1 ? n$1 + 2 : 0);
|
|
1899
|
+
i.write(import_src.erase.lines(y));
|
|
1900
|
+
}, g$1 = (d$1, y) => {
|
|
1901
|
+
T$2.message(d$1.split(`
|
|
1902
|
+
`).map(import_picocolors$1$1.dim), {
|
|
1903
|
+
output: i,
|
|
1904
|
+
secondarySymbol: s,
|
|
1905
|
+
symbol: s,
|
|
1906
|
+
spacing: y ?? n$1
|
|
1907
|
+
});
|
|
1908
|
+
}, p$1 = () => {
|
|
1909
|
+
l === !0 && $$1.length > 0 ? g$1(`${$$1}
|
|
1910
|
+
${u}`) : g$1(u);
|
|
1911
|
+
};
|
|
1912
|
+
return {
|
|
1913
|
+
message(d$1, y) {
|
|
1914
|
+
if (h$1(!1), (y?.raw !== !0 || !m$1) && u !== "" && (u += `
|
|
1915
|
+
`), u += d$1, m$1 = y?.raw === !0, t.limit !== void 0) {
|
|
1916
|
+
const w$1 = u.split(`
|
|
1917
|
+
`), b$1 = w$1.length - t.limit;
|
|
1918
|
+
if (b$1 > 0) {
|
|
1919
|
+
const M$1 = w$1.splice(0, b$1);
|
|
1920
|
+
l && ($$1 += ($$1 === "" ? "" : `
|
|
1921
|
+
`) + M$1.join(`
|
|
1922
|
+
`));
|
|
1923
|
+
}
|
|
1924
|
+
u = w$1.join(`
|
|
1925
|
+
`);
|
|
1926
|
+
}
|
|
1927
|
+
c$1 || g$1(u, 0);
|
|
1928
|
+
},
|
|
1929
|
+
error(d$1, y) {
|
|
1930
|
+
h$1(!0), T$2.error(d$1, {
|
|
1931
|
+
output: i,
|
|
1932
|
+
secondarySymbol: s,
|
|
1933
|
+
spacing: 1
|
|
1934
|
+
}), y?.showLog !== !1 && p$1(), u = $$1 = "";
|
|
1935
|
+
},
|
|
1936
|
+
success(d$1, y) {
|
|
1937
|
+
h$1(!0), T$2.success(d$1, {
|
|
1938
|
+
output: i,
|
|
1939
|
+
secondarySymbol: s,
|
|
1940
|
+
spacing: 1
|
|
1941
|
+
}), y?.showLog === !0 && p$1(), u = $$1 = "";
|
|
1942
|
+
}
|
|
1943
|
+
};
|
|
1944
|
+
}, et$1 = (t) => new eD({
|
|
1945
|
+
validate: t.validate,
|
|
1946
|
+
placeholder: t.placeholder,
|
|
1947
|
+
defaultValue: t.defaultValue,
|
|
1948
|
+
initialValue: t.initialValue,
|
|
1949
|
+
output: t.output,
|
|
1950
|
+
signal: t.signal,
|
|
1951
|
+
input: t.input,
|
|
1952
|
+
render() {
|
|
1953
|
+
const i = `${import_picocolors$2$1.default.gray(o)}
|
|
1954
|
+
${E(this.state)} ${t.message}
|
|
1955
|
+
`, r = t.placeholder ? import_picocolors$2$1.default.inverse(t.placeholder[0]) + import_picocolors$2$1.default.dim(t.placeholder.slice(1)) : import_picocolors$2$1.default.inverse(import_picocolors$2$1.default.hidden("_")), s = this.userInput ? this.userInputWithCursor : r, n$1 = this.value ?? "";
|
|
1956
|
+
switch (this.state) {
|
|
1957
|
+
case "error": return `${i.trim()}
|
|
1958
|
+
${import_picocolors$2$1.default.yellow(o)} ${s}
|
|
1959
|
+
${import_picocolors$2$1.default.yellow(f)} ${import_picocolors$2$1.default.yellow(this.error)}
|
|
1960
|
+
`;
|
|
1961
|
+
case "submit": return `${i}${import_picocolors$2$1.default.gray(o)} ${import_picocolors$2$1.default.dim(n$1)}`;
|
|
1962
|
+
case "cancel": return `${i}${import_picocolors$2$1.default.gray(o)} ${import_picocolors$2$1.default.strikethrough(import_picocolors$2$1.default.dim(n$1))}${n$1.trim() ? `
|
|
1963
|
+
${import_picocolors$2$1.default.gray(o)}` : ""}`;
|
|
1964
|
+
default: return `${i}${import_picocolors$2$1.default.cyan(o)} ${s}
|
|
1965
|
+
${import_picocolors$2$1.default.cyan(f)}
|
|
1966
|
+
`;
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
}).prompt();
|
|
1092
1970
|
var utils_exports = {};
|
|
1093
1971
|
__export(utils_exports, { createPrinter: () => createPrinter });
|
|
1094
1972
|
function createPrinter(...conditions) {
|
|
@@ -1097,7 +1975,7 @@ function createPrinter(...conditions) {
|
|
|
1097
1975
|
});
|
|
1098
1976
|
return printers;
|
|
1099
1977
|
}
|
|
1100
|
-
var import_picocolors$4 = __toESM$1(
|
|
1978
|
+
var import_picocolors$4 = __toESM(require_picocolors$1(), 1);
|
|
1101
1979
|
var colors = import_picocolors$4.default;
|
|
1102
1980
|
|
|
1103
1981
|
//#endregion
|
|
@@ -1565,12 +2443,12 @@ var eslint_default = defineAddon({
|
|
|
1565
2443
|
exportExpression = tsConfigCall;
|
|
1566
2444
|
} else {
|
|
1567
2445
|
const eslintArray = array_exports.createEmpty();
|
|
1568
|
-
eslintConfigs.map((x) => array_exports.push(eslintArray, x));
|
|
2446
|
+
eslintConfigs.map((x$2) => array_exports.push(eslintArray, x$2));
|
|
1569
2447
|
exportExpression = eslintArray;
|
|
1570
2448
|
}
|
|
1571
2449
|
const defaultExport = exports_exports.defaultExport(ast, exportExpression);
|
|
1572
2450
|
if (defaultExport.value !== exportExpression) {
|
|
1573
|
-
|
|
2451
|
+
T$2.warn("An eslint config is already defined. Skipping initialization.");
|
|
1574
2452
|
return content;
|
|
1575
2453
|
}
|
|
1576
2454
|
if (!typescript) common_exports.addJsDocTypeComment(defaultExport.astNode, "import('eslint').Linter.Config[]");
|
|
@@ -1623,10 +2501,10 @@ const adapters = [
|
|
|
1623
2501
|
const options$4 = defineAddonOptions({ adapter: {
|
|
1624
2502
|
type: "select",
|
|
1625
2503
|
question: "Which SvelteKit adapter would you like to use?",
|
|
1626
|
-
options: adapters.map((p) => ({
|
|
1627
|
-
value: p.id,
|
|
1628
|
-
label: p.id,
|
|
1629
|
-
hint: p.package
|
|
2504
|
+
options: adapters.map((p$1) => ({
|
|
2505
|
+
value: p$1.id,
|
|
2506
|
+
label: p$1.id,
|
|
2507
|
+
hint: p$1.package
|
|
1630
2508
|
})),
|
|
1631
2509
|
default: "auto"
|
|
1632
2510
|
} });
|
|
@@ -1656,12 +2534,12 @@ var sveltekit_adapter_default = defineAddon({
|
|
|
1656
2534
|
if (adapterImportDecl) {
|
|
1657
2535
|
adapterImportDecl.source.value = adapter.package;
|
|
1658
2536
|
adapterImportDecl.source.raw = undefined;
|
|
1659
|
-
adapterName = adapterImportDecl.specifiers?.find((s
|
|
2537
|
+
adapterName = adapterImportDecl.specifiers?.find((s) => s.type === "ImportDefaultSpecifier")?.local?.name;
|
|
1660
2538
|
} else imports_exports.addDefault(ast, adapter.package, adapterName);
|
|
1661
2539
|
const { value: config } = exports_exports.defaultExport(ast, object_exports.createEmpty());
|
|
1662
|
-
const kitConfig = config.properties.find((p) => p.type === "Property" && p.key.type === "Identifier" && p.key.name === "kit");
|
|
2540
|
+
const kitConfig = config.properties.find((p$1) => p$1.type === "Property" && p$1.key.type === "Identifier" && p$1.key.name === "kit");
|
|
1663
2541
|
if (kitConfig && kitConfig.value.type === "ObjectExpression") {
|
|
1664
|
-
const adapterProp = kitConfig.value.properties.find((p) => p.type === "Property" && p.key.type === "Identifier" && p.key.name === "adapter");
|
|
2542
|
+
const adapterProp = kitConfig.value.properties.find((p$1) => p$1.type === "Property" && p$1.key.type === "Identifier" && p$1.key.name === "adapter");
|
|
1665
2543
|
if (adapterProp) adapterProp.leadingComments = [];
|
|
1666
2544
|
object_exports.overrideProperties(kitConfig.value, { adapter: function_exports.callByIdentifier(adapterName, []) });
|
|
1667
2545
|
} else object_exports.properties(config, { kit: object_exports.create({ adapter: function_exports.callByIdentifier(adapterName, []) }) });
|
|
@@ -1678,9 +2556,9 @@ const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
|
|
|
1678
2556
|
const intToChar = new Uint8Array(64);
|
|
1679
2557
|
const charToInt = new Uint8Array(128);
|
|
1680
2558
|
for (let i = 0; i < chars.length; i++) {
|
|
1681
|
-
const c = chars.charCodeAt(i);
|
|
1682
|
-
intToChar[i] = c;
|
|
1683
|
-
charToInt[c] = i;
|
|
2559
|
+
const c$1 = chars.charCodeAt(i);
|
|
2560
|
+
intToChar[i] = c$1;
|
|
2561
|
+
charToInt[c$1] = i;
|
|
1684
2562
|
}
|
|
1685
2563
|
function encodeInteger(builder, num, relative) {
|
|
1686
2564
|
let delta = num - relative;
|
|
@@ -1708,9 +2586,9 @@ var StringWriter = class {
|
|
|
1708
2586
|
this.out = "";
|
|
1709
2587
|
this.buffer = new Uint8Array(bufLength);
|
|
1710
2588
|
}
|
|
1711
|
-
write(v) {
|
|
2589
|
+
write(v$2) {
|
|
1712
2590
|
const { buffer } = this;
|
|
1713
|
-
buffer[this.pos++] = v;
|
|
2591
|
+
buffer[this.pos++] = v$2;
|
|
1714
2592
|
if (this.pos === bufLength) {
|
|
1715
2593
|
this.out += td.decode(buffer);
|
|
1716
2594
|
this.pos = 0;
|
|
@@ -1732,9 +2610,9 @@ function encode(decoded) {
|
|
|
1732
2610
|
if (i > 0) writer.write(semicolon);
|
|
1733
2611
|
if (line.length === 0) continue;
|
|
1734
2612
|
let genColumn = 0;
|
|
1735
|
-
for (let j = 0; j < line.length; j++) {
|
|
1736
|
-
const segment = line[j];
|
|
1737
|
-
if (j > 0) writer.write(comma);
|
|
2613
|
+
for (let j$2 = 0; j$2 < line.length; j$2++) {
|
|
2614
|
+
const segment = line[j$2];
|
|
2615
|
+
if (j$2 > 0) writer.write(comma);
|
|
1738
2616
|
genColumn = encodeInteger(writer, segment[0], genColumn);
|
|
1739
2617
|
if (segment.length === 1) continue;
|
|
1740
2618
|
sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
|
|
@@ -1953,11 +2831,11 @@ function getLocator(source) {
|
|
|
1953
2831
|
}
|
|
1954
2832
|
return function locate(index) {
|
|
1955
2833
|
let i = 0;
|
|
1956
|
-
let j = lineOffsets.length;
|
|
1957
|
-
while (i < j) {
|
|
1958
|
-
const m = i + j >> 1;
|
|
1959
|
-
if (index < lineOffsets[m]) j = m;
|
|
1960
|
-
else i = m + 1;
|
|
2834
|
+
let j$2 = lineOffsets.length;
|
|
2835
|
+
while (i < j$2) {
|
|
2836
|
+
const m$1 = i + j$2 >> 1;
|
|
2837
|
+
if (index < lineOffsets[m$1]) j$2 = m$1;
|
|
2838
|
+
else i = m$1 + 1;
|
|
1961
2839
|
}
|
|
1962
2840
|
const line = i - 1;
|
|
1963
2841
|
const column = index - lineOffsets[line];
|
|
@@ -2625,7 +3503,7 @@ else this.outro = content + this.outro;
|
|
|
2625
3503
|
}
|
|
2626
3504
|
_replaceRegexp(searchValue, replacement) {
|
|
2627
3505
|
function getReplacement(match, str) {
|
|
2628
|
-
if (typeof replacement === "string") return replacement.replace(/\$(\$|&|\d+)/g, (_, i) => {
|
|
3506
|
+
if (typeof replacement === "string") return replacement.replace(/\$(\$|&|\d+)/g, (_$1, i) => {
|
|
2629
3507
|
if (i === "$") return "$";
|
|
2630
3508
|
if (i === "&") return match[0];
|
|
2631
3509
|
const num = +i;
|
|
@@ -2929,7 +3807,7 @@ var lucia_default = defineAddon({
|
|
|
2929
3807
|
});
|
|
2930
3808
|
sv.file(`src/hooks.server.${ext}`, (content) => {
|
|
2931
3809
|
const { ast, generateCode } = parseScript$1(content);
|
|
2932
|
-
imports_exports.addNamespace(ast, "$lib/server/auth
|
|
3810
|
+
imports_exports.addNamespace(ast, "$lib/server/auth", "auth");
|
|
2933
3811
|
kit_exports.addHooksHandle(ast, typescript, "handleAuth", getAuthHandleContent());
|
|
2934
3812
|
return generateCode();
|
|
2935
3813
|
});
|
|
@@ -2940,7 +3818,7 @@ var lucia_default = defineAddon({
|
|
|
2940
3818
|
sv.file(`${kit.routesDirectory}/demo/lucia/login/+page.server.${ext}`, (content) => {
|
|
2941
3819
|
if (content) {
|
|
2942
3820
|
const filePath = `${kit.routesDirectory}/demo/lucia/login/+page.server.${typescript ? "ts" : "js"}`;
|
|
2943
|
-
|
|
3821
|
+
T$2.warn(`Existing ${colors.yellow(filePath)} file. Could not update.`);
|
|
2944
3822
|
return content;
|
|
2945
3823
|
}
|
|
2946
3824
|
const [ts] = utils_exports.createPrinter(typescript);
|
|
@@ -3026,7 +3904,7 @@ var lucia_default = defineAddon({
|
|
|
3026
3904
|
const sessionToken = auth.generateSessionToken();
|
|
3027
3905
|
const session = await auth.createSession(sessionToken, userId);
|
|
3028
3906
|
auth.setSessionTokenCookie(event, sessionToken, session.expiresAt);
|
|
3029
|
-
} catch
|
|
3907
|
+
} catch {
|
|
3030
3908
|
return fail(500, { message: 'An error has occurred' });
|
|
3031
3909
|
}
|
|
3032
3910
|
return redirect(302, '/demo/lucia');
|
|
@@ -3061,7 +3939,7 @@ var lucia_default = defineAddon({
|
|
|
3061
3939
|
sv.file(`${kit.routesDirectory}/demo/lucia/login/+page.svelte`, (content) => {
|
|
3062
3940
|
if (content) {
|
|
3063
3941
|
const filePath = `${kit.routesDirectory}/demo/lucia/login/+page.svelte`;
|
|
3064
|
-
|
|
3942
|
+
T$2.warn(`Existing ${colors.yellow(filePath)} file. Could not update.`);
|
|
3065
3943
|
return content;
|
|
3066
3944
|
}
|
|
3067
3945
|
const tailwind = dependencyVersion("@tailwindcss/vite") !== undefined;
|
|
@@ -3106,7 +3984,7 @@ var lucia_default = defineAddon({
|
|
|
3106
3984
|
sv.file(`${kit.routesDirectory}/demo/lucia/+page.server.${ext}`, (content) => {
|
|
3107
3985
|
if (content) {
|
|
3108
3986
|
const filePath = `${kit.routesDirectory}/demo/lucia/+page.server.${typescript ? "ts" : "js"}`;
|
|
3109
|
-
|
|
3987
|
+
T$2.warn(`Existing ${colors.yellow(filePath)} file. Could not update.`);
|
|
3110
3988
|
return content;
|
|
3111
3989
|
}
|
|
3112
3990
|
const [ts] = utils_exports.createPrinter(typescript);
|
|
@@ -3146,7 +4024,7 @@ var lucia_default = defineAddon({
|
|
|
3146
4024
|
sv.file(`${kit.routesDirectory}/demo/lucia/+page.svelte`, (content) => {
|
|
3147
4025
|
if (content) {
|
|
3148
4026
|
const filePath = `${kit.routesDirectory}/demo/lucia/+page.svelte`;
|
|
3149
|
-
|
|
4027
|
+
T$2.warn(`Existing ${colors.yellow(filePath)} file. Could not update.`);
|
|
3150
4028
|
return content;
|
|
3151
4029
|
}
|
|
3152
4030
|
const svelte5 = !!dependencyVersion("svelte")?.startsWith("5");
|
|
@@ -3307,6 +4185,7 @@ const options$2 = defineAddonOptions({
|
|
|
3307
4185
|
type: "string",
|
|
3308
4186
|
default: "en, es",
|
|
3309
4187
|
validate(input) {
|
|
4188
|
+
if (!input) return;
|
|
3310
4189
|
const { invalidLanguageTags, validLanguageTags } = parseLanguageTagInput(input);
|
|
3311
4190
|
if (invalidLanguageTags.length > 0) if (invalidLanguageTags.length === 1) return `The input "${invalidLanguageTags[0]}" is not a valid IETF BCP 47 language tag`;
|
|
3312
4191
|
else {
|
|
@@ -3314,7 +4193,7 @@ else {
|
|
|
3314
4193
|
style: "long",
|
|
3315
4194
|
type: "conjunction"
|
|
3316
4195
|
});
|
|
3317
|
-
return `The inputs ${listFormat.format(invalidLanguageTags.map((x) => `"${x}"`))} are not valid BCP47 language tags`;
|
|
4196
|
+
return `The inputs ${listFormat.format(invalidLanguageTags.map((x$2) => `"${x$2}"`))} are not valid BCP47 language tags`;
|
|
3318
4197
|
}
|
|
3319
4198
|
if (validLanguageTags.length === 0) return "Please enter at least one valid BCP47 language tag. Eg: en";
|
|
3320
4199
|
return undefined;
|
|
@@ -3371,7 +4250,7 @@ var paraglide_default = defineAddon({
|
|
|
3371
4250
|
const expression = common_exports.expressionFromString("(request) => deLocalizeUrl(request.url).pathname");
|
|
3372
4251
|
const rerouteIdentifier = variables_exports.declaration(ast, "const", "reroute", expression);
|
|
3373
4252
|
const existingExport = exports_exports.namedExport(ast, "reroute", rerouteIdentifier);
|
|
3374
|
-
if (existingExport.declaration !== rerouteIdentifier)
|
|
4253
|
+
if (existingExport.declaration !== rerouteIdentifier) T$2.warn("Adding the reroute hook automatically failed. Add it manually");
|
|
3375
4254
|
return generateCode();
|
|
3376
4255
|
});
|
|
3377
4256
|
sv.file(`src/hooks.server.${ext}`, (content) => {
|
|
@@ -3390,7 +4269,7 @@ var paraglide_default = defineAddon({
|
|
|
3390
4269
|
const { ast, generateCode } = parseHtml$1(content);
|
|
3391
4270
|
const htmlNode = ast.children.find((child) => child.type === esm_exports.Tag && child.name === "html");
|
|
3392
4271
|
if (!htmlNode) {
|
|
3393
|
-
|
|
4272
|
+
T$2.warn("Could not find <html> node in app.html. You'll need to add the language placeholder manually");
|
|
3394
4273
|
return generateCode();
|
|
3395
4274
|
}
|
|
3396
4275
|
htmlNode.attribs = {
|
|
@@ -3418,7 +4297,7 @@ var paraglide_default = defineAddon({
|
|
|
3418
4297
|
const templateCode = new MagicString(template.source);
|
|
3419
4298
|
templateCode.append("\n\n<h1>{m.hello_world({ name: 'SvelteKit User' })}</h1>\n");
|
|
3420
4299
|
const { validLanguageTags: validLanguageTags$1 } = parseLanguageTagInput(options$6.languageTags);
|
|
3421
|
-
const links = validLanguageTags$1.map((x) => `${templateCode.getIndentString()}<button onclick={() => setLocale('${x}')}>${x}</button>`).join("\n");
|
|
4300
|
+
const links = validLanguageTags$1.map((x$2) => `${templateCode.getIndentString()}<button onclick={() => setLocale('${x$2}')}>${x$2}</button>`).join("\n");
|
|
3422
4301
|
templateCode.append(`<div>\n${links}\n</div>`);
|
|
3423
4302
|
templateCode.append("<p>\nIf you use VSCode, install the <a href=\"https://marketplace.visualstudio.com/items?itemName=inlang.vs-code-extension\" target=\"_blank\">Sherlock i18n extension</a> for a better i18n experience.\n</p>");
|
|
3424
4303
|
return generateCode({
|
|
@@ -3506,7 +4385,7 @@ var playwright_default = defineAddon({
|
|
|
3506
4385
|
imports_exports.addNamed(ast, "@playwright/test", { defineConfig: "defineConfig" });
|
|
3507
4386
|
object_exports.properties(defaultExport.value.arguments[0], config);
|
|
3508
4387
|
} else if (defaultExport.value.type === "ObjectExpression") object_exports.properties(defaultExport.value, config);
|
|
3509
|
-
else
|
|
4388
|
+
else T$2.warn("Unexpected playwright config for playwright add-on. Could not update.");
|
|
3510
4389
|
return generateCode();
|
|
3511
4390
|
});
|
|
3512
4391
|
}
|
|
@@ -3538,7 +4417,7 @@ var prettier_default = defineAddon({
|
|
|
3538
4417
|
try {
|
|
3539
4418
|
({data, generateCode} = parseJson$1(content));
|
|
3540
4419
|
} catch {
|
|
3541
|
-
|
|
4420
|
+
T$2.warn(`A ${colors.yellow(".prettierrc")} config already exists and cannot be parsed as JSON. Skipping initialization.`);
|
|
3542
4421
|
return content;
|
|
3543
4422
|
}
|
|
3544
4423
|
if (Object.keys(data).length === 0) {
|
|
@@ -3552,7 +4431,7 @@ var prettier_default = defineAddon({
|
|
|
3552
4431
|
const plugins$1 = data.plugins;
|
|
3553
4432
|
if (!plugins$1.includes("prettier-plugin-svelte")) data.plugins.unshift("prettier-plugin-svelte");
|
|
3554
4433
|
const overrides = data.overrides;
|
|
3555
|
-
const override = overrides.find((o) => o?.options?.parser === "svelte");
|
|
4434
|
+
const override = overrides.find((o$1) => o$1?.options?.parser === "svelte");
|
|
3556
4435
|
if (!override) overrides.push({
|
|
3557
4436
|
files: "*.svelte",
|
|
3558
4437
|
options: { parser: "svelte" }
|
|
@@ -3573,7 +4452,7 @@ var prettier_default = defineAddon({
|
|
|
3573
4452
|
} else scripts$1["lint"] ??= CHECK_CMD;
|
|
3574
4453
|
return generateCode();
|
|
3575
4454
|
});
|
|
3576
|
-
if (eslintVersion?.startsWith(SUPPORTED_ESLINT_VERSION) === false)
|
|
4455
|
+
if (eslintVersion?.startsWith(SUPPORTED_ESLINT_VERSION) === false) T$2.warn(`An older major version of ${colors.yellow("eslint")} was detected. Skipping ${colors.yellow("eslint-config-prettier")} installation.`);
|
|
3577
4456
|
if (eslintInstalled) {
|
|
3578
4457
|
sv.devDependency("eslint-config-prettier", "^10.0.1");
|
|
3579
4458
|
sv.file("eslint.config.js", addEslintConfigPrettier);
|
|
@@ -3625,10 +4504,10 @@ const plugins = [{
|
|
|
3625
4504
|
const options$1 = defineAddonOptions({ plugins: {
|
|
3626
4505
|
type: "multiselect",
|
|
3627
4506
|
question: "Which plugins would you like to add?",
|
|
3628
|
-
options: plugins.map((p) => ({
|
|
3629
|
-
value: p.id,
|
|
3630
|
-
label: p.id,
|
|
3631
|
-
hint: p.package
|
|
4507
|
+
options: plugins.map((p$1) => ({
|
|
4508
|
+
value: p$1.id,
|
|
4509
|
+
label: p$1.id,
|
|
4510
|
+
hint: p$1.package
|
|
3632
4511
|
})),
|
|
3633
4512
|
default: []
|
|
3634
4513
|
} });
|
|
@@ -3718,7 +4597,7 @@ var vitest_addon_default = defineAddon({
|
|
|
3718
4597
|
options: {},
|
|
3719
4598
|
run: ({ sv, typescript, kit }) => {
|
|
3720
4599
|
const ext = typescript ? "ts" : "js";
|
|
3721
|
-
sv.devDependency("vitest", "3.
|
|
4600
|
+
sv.devDependency("vitest", "^3.2.3");
|
|
3722
4601
|
sv.devDependency("@testing-library/svelte", "^5.2.4");
|
|
3723
4602
|
sv.devDependency("@testing-library/jest-dom", "^6.6.3");
|
|
3724
4603
|
sv.devDependency("jsdom", "^26.0.0");
|
|
@@ -3826,10 +4705,10 @@ else sv.file(`src/App.svelte.test.${ext}`, (content) => {
|
|
|
3826
4705
|
});
|
|
3827
4706
|
const defineConfigFallback = function_exports.call("defineConfig", []);
|
|
3828
4707
|
const { value: defineWorkspaceCall } = exports_exports.defaultExport(ast, defineConfigFallback);
|
|
3829
|
-
if (defineWorkspaceCall.type !== "CallExpression")
|
|
4708
|
+
if (defineWorkspaceCall.type !== "CallExpression") T$2.warn("Unexpected vite config. Could not update.");
|
|
3830
4709
|
const vitestConfig = function_exports.argumentByIndex(defineWorkspaceCall, 0, object_exports.createEmpty());
|
|
3831
4710
|
const testObject = object_exports.property(vitestConfig, "test", object_exports.createEmpty());
|
|
3832
|
-
const workspaceArray = object_exports.property(testObject, "
|
|
4711
|
+
const workspaceArray = object_exports.property(testObject, "projects", array_exports.createEmpty());
|
|
3833
4712
|
array_exports.push(workspaceArray, clientObjectExpression);
|
|
3834
4713
|
array_exports.push(workspaceArray, serverObjectExpression);
|
|
3835
4714
|
return generateCode();
|
|
@@ -3879,24 +4758,24 @@ var UnsupportedError = class extends Error {
|
|
|
3879
4758
|
|
|
3880
4759
|
//#endregion
|
|
3881
4760
|
//#region packages/cli/utils/common.ts
|
|
3882
|
-
var import_picocolors$3 = __toESM
|
|
4761
|
+
var import_picocolors$3 = __toESM$1(require_picocolors(), 1);
|
|
3883
4762
|
const NO_PREFIX = "--no-";
|
|
3884
4763
|
let options = [];
|
|
3885
4764
|
function getLongFlag(flags) {
|
|
3886
|
-
return flags.split(",").map((f) => f.trim()).find((f) => f.startsWith("--"));
|
|
4765
|
+
return flags.split(",").map((f$1) => f$1.trim()).find((f$1) => f$1.startsWith("--"));
|
|
3887
4766
|
}
|
|
3888
4767
|
const helpConfig = {
|
|
3889
4768
|
argumentDescription: formatDescription,
|
|
3890
4769
|
optionDescription: formatDescription,
|
|
3891
4770
|
visibleOptions(cmd) {
|
|
3892
4771
|
options = cmd.options;
|
|
3893
|
-
const visible = cmd.options.filter((o) => !o.hidden);
|
|
4772
|
+
const visible = cmd.options.filter((o$1) => !o$1.hidden);
|
|
3894
4773
|
const show = [];
|
|
3895
4774
|
for (const option of visible) {
|
|
3896
4775
|
const flag = getLongFlag(option.flags);
|
|
3897
4776
|
if (flag?.startsWith(NO_PREFIX)) {
|
|
3898
4777
|
const stripped = flag.slice(NO_PREFIX.length);
|
|
3899
|
-
const isNoVariant = visible.some((o) => getLongFlag(o.flags)?.startsWith(`--${stripped}`));
|
|
4778
|
+
const isNoVariant = visible.some((o$1) => getLongFlag(o$1.flags)?.startsWith(`--${stripped}`));
|
|
3900
4779
|
if (isNoVariant) continue;
|
|
3901
4780
|
}
|
|
3902
4781
|
show.push(option);
|
|
@@ -3908,7 +4787,7 @@ const helpConfig = {
|
|
|
3908
4787
|
const flag = longFlag?.split(" ").at(0);
|
|
3909
4788
|
if (!flag || !longFlag) return option.flags;
|
|
3910
4789
|
const noVariant = `--no-${flag.slice(2)}`;
|
|
3911
|
-
const hasVariant = options.some((o) => getLongFlag(o.flags) === noVariant);
|
|
4790
|
+
const hasVariant = options.some((o$1) => getLongFlag(o$1.flags) === noVariant);
|
|
3912
4791
|
if (hasVariant) return `--[no-]${longFlag.slice(2)}`;
|
|
3913
4792
|
return option.flags;
|
|
3914
4793
|
},
|
|
@@ -3927,24 +4806,24 @@ function formatDescription(arg) {
|
|
|
3927
4806
|
}
|
|
3928
4807
|
async function runCommand(action) {
|
|
3929
4808
|
try {
|
|
3930
|
-
|
|
4809
|
+
Ge(`Welcome to the Svelte CLI! ${import_picocolors$3.default.gray(`(v${package_default.version})`)}`);
|
|
3931
4810
|
await action();
|
|
3932
|
-
|
|
4811
|
+
Fe("You're all set!");
|
|
3933
4812
|
} catch (e) {
|
|
3934
4813
|
if (e instanceof UnsupportedError) {
|
|
3935
4814
|
const padding = getPadding(e.reasons.map((r) => r.id));
|
|
3936
4815
|
const message = e.reasons.map((r) => ` ${r.id.padEnd(padding)} ${import_picocolors$3.default.red(r.reason)}`).join("\n");
|
|
3937
|
-
|
|
3938
|
-
|
|
4816
|
+
T.error(`${e.name}\n\n${message}`);
|
|
4817
|
+
T.message();
|
|
3939
4818
|
} else if (e instanceof Error) {
|
|
3940
|
-
|
|
3941
|
-
|
|
4819
|
+
T.error(e.stack ?? String(e));
|
|
4820
|
+
T.message();
|
|
3942
4821
|
}
|
|
3943
|
-
|
|
4822
|
+
De("Operation failed.");
|
|
3944
4823
|
}
|
|
3945
4824
|
}
|
|
3946
4825
|
function getPadding(lines) {
|
|
3947
|
-
const lengths = lines.map((s
|
|
4826
|
+
const lengths = lines.map((s) => s.length);
|
|
3948
4827
|
return Math.max(...lengths);
|
|
3949
4828
|
}
|
|
3950
4829
|
function forwardExitCode(error) {
|
|
@@ -4083,8 +4962,8 @@ function getGlobalPreconditions(cwd, addons, addonSetupResult) {
|
|
|
4083
4962
|
|
|
4084
4963
|
//#endregion
|
|
4085
4964
|
//#region packages/cli/commands/add/index.ts
|
|
4086
|
-
var import_picocolors$2 = __toESM
|
|
4087
|
-
const aliases = officialAddons.map((c) => c.alias).filter((v) => v !== undefined);
|
|
4965
|
+
var import_picocolors$2 = __toESM$1(require_picocolors(), 1);
|
|
4966
|
+
const aliases = officialAddons.map((c$1) => c$1.alias).filter((v$2) => v$2 !== undefined);
|
|
4088
4967
|
const addonOptions = getAddonOptionFlags();
|
|
4089
4968
|
const communityDetails = [];
|
|
4090
4969
|
const AddonsSchema = array(string());
|
|
@@ -4200,7 +5079,7 @@ const add = new Command("add").description("applies specified add-ons into a pro
|
|
|
4200
5079
|
runCommand(async () => {
|
|
4201
5080
|
const selectedAddonIds = selectedAddons.map(({ id }) => id);
|
|
4202
5081
|
const { nextSteps } = await runAddCommand(options$6, selectedAddonIds);
|
|
4203
|
-
if (nextSteps)
|
|
5082
|
+
if (nextSteps) Ke(nextSteps, "Next steps", { format: (line) => line });
|
|
4204
5083
|
});
|
|
4205
5084
|
});
|
|
4206
5085
|
async function runAddCommand(options$6, selectedAddonIds) {
|
|
@@ -4215,7 +5094,7 @@ async function runAddCommand(options$6, selectedAddonIds) {
|
|
|
4215
5094
|
const specifiedOptions = options$6.addons[addonId];
|
|
4216
5095
|
if (!specifiedOptions) continue;
|
|
4217
5096
|
const details$1 = getAddonDetails(addonId);
|
|
4218
|
-
if (!selectedAddons.find((d) => d.addon === details$1)) selectedAddons.push({
|
|
5097
|
+
if (!selectedAddons.find((d$1) => d$1.addon === details$1)) selectedAddons.push({
|
|
4219
5098
|
type: "official",
|
|
4220
5099
|
addon: details$1
|
|
4221
5100
|
});
|
|
@@ -4249,16 +5128,16 @@ else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '${a
|
|
|
4249
5128
|
label: addon.id,
|
|
4250
5129
|
hint: "https://www.npmjs.com/package/" + addon.id
|
|
4251
5130
|
}));
|
|
4252
|
-
const selected = await
|
|
5131
|
+
const selected = await Ue({
|
|
4253
5132
|
message: "Which community tools would you like to add to your project?",
|
|
4254
5133
|
options: promptOptions,
|
|
4255
5134
|
required: false
|
|
4256
5135
|
});
|
|
4257
|
-
if (
|
|
4258
|
-
|
|
5136
|
+
if (Vu(selected)) {
|
|
5137
|
+
De("Operation cancelled.");
|
|
4259
5138
|
process$1.exit(1);
|
|
4260
5139
|
} else if (selected.length === 0) {
|
|
4261
|
-
|
|
5140
|
+
De("No add-ons selected. Exiting.");
|
|
4262
5141
|
process$1.exit(1);
|
|
4263
5142
|
}
|
|
4264
5143
|
options$6.community = selected;
|
|
@@ -4271,7 +5150,7 @@ else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '${a
|
|
|
4271
5150
|
if (!validAddon) throw new Error(`Invalid community add-on specified: '${id}'\nAvailable options: ${communityAddonIds.join(", ")}`);
|
|
4272
5151
|
return id;
|
|
4273
5152
|
});
|
|
4274
|
-
const { start, stop } =
|
|
5153
|
+
const { start, stop } = J();
|
|
4275
5154
|
try {
|
|
4276
5155
|
start("Resolving community add-on packages");
|
|
4277
5156
|
const pkgs = await Promise.all(addons.map(async (id) => {
|
|
@@ -4281,7 +5160,7 @@ else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '${a
|
|
|
4281
5160
|
});
|
|
4282
5161
|
}));
|
|
4283
5162
|
stop("Resolved community add-on packages");
|
|
4284
|
-
|
|
5163
|
+
T.warn("The Svelte maintainers have not reviewed community add-ons for malicious code. Use at your discretion.");
|
|
4285
5164
|
const paddingName = getPadding(pkgs.map(({ pkg }) => pkg.name));
|
|
4286
5165
|
const paddingVersion = getPadding(pkgs.map(({ pkg }) => `(v${pkg.version})`));
|
|
4287
5166
|
const packageInfos = pkgs.map(({ pkg, repo: _repo }) => {
|
|
@@ -4290,10 +5169,10 @@ else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '${a
|
|
|
4290
5169
|
const repo = import_picocolors$2.default.dim(`(${_repo})`);
|
|
4291
5170
|
return `${name$1} ${version$1} ${repo}`;
|
|
4292
5171
|
});
|
|
4293
|
-
|
|
4294
|
-
const confirm
|
|
4295
|
-
if (confirm
|
|
4296
|
-
|
|
5172
|
+
T.message(packageInfos.join("\n"));
|
|
5173
|
+
const confirm = await ke({ message: "Would you like to continue?" });
|
|
5174
|
+
if (confirm !== true) {
|
|
5175
|
+
De("Operation cancelled.");
|
|
4297
5176
|
process$1.exit(1);
|
|
4298
5177
|
}
|
|
4299
5178
|
start("Downloading community add-on packages");
|
|
@@ -4322,13 +5201,13 @@ else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '${a
|
|
|
4322
5201
|
value: id,
|
|
4323
5202
|
hint: `${shortDescription} - ${homepage$1}`
|
|
4324
5203
|
}));
|
|
4325
|
-
const selected = await
|
|
5204
|
+
const selected = await Ue({
|
|
4326
5205
|
message: `What would you like to add to your project? ${import_picocolors$2.default.dim("(use arrow keys / space bar)")}`,
|
|
4327
5206
|
options: addonOptions$1,
|
|
4328
5207
|
required: false
|
|
4329
5208
|
});
|
|
4330
|
-
if (
|
|
4331
|
-
|
|
5209
|
+
if (Vu(selected)) {
|
|
5210
|
+
De("Operation cancelled.");
|
|
4332
5211
|
process$1.exit(1);
|
|
4333
5212
|
}
|
|
4334
5213
|
for (const id of selected) {
|
|
@@ -4346,9 +5225,9 @@ else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '${a
|
|
|
4346
5225
|
for (const depId of missingDependencies) {
|
|
4347
5226
|
const dependency = officialAddons.find((a) => a.id === depId);
|
|
4348
5227
|
if (!dependency) throw new Error(`'${addon.id}' depends on an invalid add-on: '${depId}'`);
|
|
4349
|
-
const install = await
|
|
5228
|
+
const install = await ke({ message: `The ${import_picocolors$2.default.bold(import_picocolors$2.default.cyan(addon.id))} add-on requires ${import_picocolors$2.default.bold(import_picocolors$2.default.cyan(depId))} to also be setup. ${import_picocolors$2.default.green("Include it?")}` });
|
|
4350
5229
|
if (install !== true) {
|
|
4351
|
-
|
|
5230
|
+
De("Operation cancelled.");
|
|
4352
5231
|
process$1.exit(1);
|
|
4353
5232
|
}
|
|
4354
5233
|
selectedAddons.push({
|
|
@@ -4370,13 +5249,13 @@ else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '${a
|
|
|
4370
5249
|
}
|
|
4371
5250
|
if (fails.length > 0) {
|
|
4372
5251
|
const message = fails.map(({ name: name$1, message: message$1 }) => import_picocolors$2.default.yellow(`${name$1} (${message$1})`)).join("\n- ");
|
|
4373
|
-
|
|
4374
|
-
const force = await
|
|
5252
|
+
Ke(`- ${message}`, "Preconditions not met", { format: (line) => line });
|
|
5253
|
+
const force = await ke({
|
|
4375
5254
|
message: "Preconditions failed. Do you wish to continue?",
|
|
4376
5255
|
initialValue: false
|
|
4377
5256
|
});
|
|
4378
|
-
if (
|
|
4379
|
-
|
|
5257
|
+
if (Vu(force) || !force) {
|
|
5258
|
+
De("Operation cancelled.");
|
|
4380
5259
|
process$1.exit(1);
|
|
4381
5260
|
}
|
|
4382
5261
|
}
|
|
@@ -4398,23 +5277,23 @@ else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '${a
|
|
|
4398
5277
|
if (shouldAsk === false || values[questionId] !== undefined) continue;
|
|
4399
5278
|
let answer;
|
|
4400
5279
|
const message = questionPrefix + question.question;
|
|
4401
|
-
if (question.type === "boolean") answer = await
|
|
5280
|
+
if (question.type === "boolean") answer = await ke({
|
|
4402
5281
|
message,
|
|
4403
5282
|
initialValue: question.default
|
|
4404
5283
|
});
|
|
4405
|
-
if (question.type === "select") answer = await
|
|
5284
|
+
if (question.type === "select") answer = await ze({
|
|
4406
5285
|
message,
|
|
4407
5286
|
initialValue: question.default,
|
|
4408
5287
|
options: question.options
|
|
4409
5288
|
});
|
|
4410
|
-
if (question.type === "multiselect") answer = await
|
|
5289
|
+
if (question.type === "multiselect") answer = await Ue({
|
|
4411
5290
|
message,
|
|
4412
5291
|
initialValues: question.default,
|
|
4413
5292
|
required: false,
|
|
4414
5293
|
options: question.options
|
|
4415
5294
|
});
|
|
4416
5295
|
if (question.type === "string" || question.type === "number") {
|
|
4417
|
-
answer = await
|
|
5296
|
+
answer = await et({
|
|
4418
5297
|
message,
|
|
4419
5298
|
initialValue: question.default.toString(),
|
|
4420
5299
|
placeholder: question.placeholder,
|
|
@@ -4422,8 +5301,8 @@ else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '${a
|
|
|
4422
5301
|
});
|
|
4423
5302
|
if (question.type === "number") answer = Number(answer);
|
|
4424
5303
|
}
|
|
4425
|
-
if (
|
|
4426
|
-
|
|
5304
|
+
if (Vu(answer)) {
|
|
5305
|
+
De("Operation cancelled.");
|
|
4427
5306
|
process$1.exit(1);
|
|
4428
5307
|
}
|
|
4429
5308
|
values[questionId] = answer;
|
|
@@ -4440,7 +5319,7 @@ else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '${a
|
|
|
4440
5319
|
addons: addonMap,
|
|
4441
5320
|
options: official
|
|
4442
5321
|
});
|
|
4443
|
-
|
|
5322
|
+
T.success("Successfully setup add-ons");
|
|
4444
5323
|
let packageManager;
|
|
4445
5324
|
if (options$6.install) {
|
|
4446
5325
|
packageManager = options$6.install === true ? await packageManagerPrompt(options$6.cwd) : options$6.install;
|
|
@@ -4452,7 +5331,7 @@ else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '${a
|
|
|
4452
5331
|
}
|
|
4453
5332
|
workspace = await createWorkspace(workspace);
|
|
4454
5333
|
if (filesToFormat.length > 0 && packageManager && !!workspace.dependencyVersion("prettier")) {
|
|
4455
|
-
const { start, stop } =
|
|
5334
|
+
const { start, stop } = J();
|
|
4456
5335
|
start("Formatting modified files");
|
|
4457
5336
|
try {
|
|
4458
5337
|
await formatFiles({
|
|
@@ -4463,7 +5342,7 @@ else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '${a
|
|
|
4463
5342
|
stop("Successfully formatted modified files");
|
|
4464
5343
|
} catch (e) {
|
|
4465
5344
|
stop("Failed to format files");
|
|
4466
|
-
if (e instanceof Error)
|
|
5345
|
+
if (e instanceof Error) T.error(e.message);
|
|
4467
5346
|
}
|
|
4468
5347
|
}
|
|
4469
5348
|
const highlighter = getHighlighter();
|
|
@@ -4504,7 +5383,7 @@ function getAddonOptionFlags() {
|
|
|
4504
5383
|
const details = getAddonDetails(id);
|
|
4505
5384
|
if (Object.values(details.options).length === 0) continue;
|
|
4506
5385
|
const { defaults, groups } = getOptionChoices(details);
|
|
4507
|
-
const choices = Object.entries(groups).map(([group
|
|
5386
|
+
const choices = Object.entries(groups).map(([group, choices$1]) => `${import_picocolors$2.default.dim(`${group}:`)} ${choices$1.join(", ")}`).join("\n");
|
|
4508
5387
|
const preset = defaults.join(", ") || "none";
|
|
4509
5388
|
options$6.push({
|
|
4510
5389
|
id,
|
|
@@ -4530,14 +5409,14 @@ function getOptionChoices(details) {
|
|
|
4530
5409
|
}
|
|
4531
5410
|
}
|
|
4532
5411
|
if (question.type === "select") {
|
|
4533
|
-
values = question.options.map((o) => o.value);
|
|
5412
|
+
values = question.options.map((o$1) => o$1.value);
|
|
4534
5413
|
if (applyDefault) {
|
|
4535
5414
|
options$6[id] = question.default;
|
|
4536
5415
|
defaults.push(question.default);
|
|
4537
5416
|
}
|
|
4538
5417
|
}
|
|
4539
5418
|
if (question.type === "multiselect") {
|
|
4540
|
-
values = question.options.map((o) => o.value);
|
|
5419
|
+
values = question.options.map((o$1) => o$1.value);
|
|
4541
5420
|
if (applyDefault) {
|
|
4542
5421
|
options$6[id] = question.default;
|
|
4543
5422
|
defaults.push(...question.default);
|
|
@@ -4564,7 +5443,7 @@ function getOptionChoices(details) {
|
|
|
4564
5443
|
|
|
4565
5444
|
//#endregion
|
|
4566
5445
|
//#region packages/cli/commands/create.ts
|
|
4567
|
-
var import_picocolors$1 = __toESM
|
|
5446
|
+
var import_picocolors$1 = __toESM$1(require_picocolors(), 1);
|
|
4568
5447
|
const langs = ["ts", "jsdoc"];
|
|
4569
5448
|
const langMap = {
|
|
4570
5449
|
ts: "typescript",
|
|
@@ -4610,36 +5489,36 @@ const create$1 = new Command("create").description("scaffolds a new SvelteKit pr
|
|
|
4610
5489
|
"",
|
|
4611
5490
|
`Stuck? Visit us at ${import_picocolors$1.default.cyan("https://svelte.dev/chat")}`
|
|
4612
5491
|
];
|
|
4613
|
-
|
|
4614
|
-
if (addOnNextSteps)
|
|
5492
|
+
Ke(steps.join("\n"), "Project next steps", { format: (line) => line });
|
|
5493
|
+
if (addOnNextSteps) Ke(addOnNextSteps, "Add-on next steps", { format: (line) => line });
|
|
4615
5494
|
});
|
|
4616
5495
|
});
|
|
4617
5496
|
async function createProject(cwd, options$6) {
|
|
4618
|
-
const { directory, template, language } = await
|
|
5497
|
+
const { directory, template, language } = await We({
|
|
4619
5498
|
directory: () => {
|
|
4620
5499
|
if (cwd) return Promise.resolve(path.resolve(cwd));
|
|
4621
5500
|
const defaultPath = "./";
|
|
4622
|
-
return
|
|
5501
|
+
return et({
|
|
4623
5502
|
message: "Where would you like your project to be created?",
|
|
4624
5503
|
placeholder: ` (hit Enter to use '${defaultPath}')`,
|
|
4625
5504
|
defaultValue: defaultPath
|
|
4626
5505
|
});
|
|
4627
5506
|
},
|
|
4628
5507
|
force: async ({ results: { directory: directory$1 } }) => {
|
|
4629
|
-
if (fs.existsSync(directory$1) && fs.readdirSync(directory$1).filter((x) => !x.startsWith(".git")).length > 0) {
|
|
4630
|
-
const force = await
|
|
5508
|
+
if (fs.existsSync(directory$1) && fs.readdirSync(directory$1).filter((x$2) => !x$2.startsWith(".git")).length > 0) {
|
|
5509
|
+
const force = await ke({
|
|
4631
5510
|
message: "Directory not empty. Continue?",
|
|
4632
5511
|
initialValue: false
|
|
4633
5512
|
});
|
|
4634
|
-
if (
|
|
4635
|
-
|
|
5513
|
+
if (Vu(force) || !force) {
|
|
5514
|
+
De("Exiting.");
|
|
4636
5515
|
process$1.exit(0);
|
|
4637
5516
|
}
|
|
4638
5517
|
}
|
|
4639
5518
|
},
|
|
4640
5519
|
template: () => {
|
|
4641
5520
|
if (options$6.template) return Promise.resolve(options$6.template);
|
|
4642
|
-
return
|
|
5521
|
+
return ze({
|
|
4643
5522
|
message: "Which template would you like?",
|
|
4644
5523
|
initialValue: "minimal",
|
|
4645
5524
|
options: templates.map((t) => ({
|
|
@@ -4651,7 +5530,7 @@ async function createProject(cwd, options$6) {
|
|
|
4651
5530
|
},
|
|
4652
5531
|
language: () => {
|
|
4653
5532
|
if (options$6.types) return Promise.resolve(options$6.types);
|
|
4654
|
-
return
|
|
5533
|
+
return ze({
|
|
4655
5534
|
message: "Add type checking with TypeScript?",
|
|
4656
5535
|
initialValue: "typescript",
|
|
4657
5536
|
options: [
|
|
@@ -4671,7 +5550,7 @@ async function createProject(cwd, options$6) {
|
|
|
4671
5550
|
});
|
|
4672
5551
|
}
|
|
4673
5552
|
}, { onCancel: () => {
|
|
4674
|
-
|
|
5553
|
+
De("Operation cancelled.");
|
|
4675
5554
|
process$1.exit(0);
|
|
4676
5555
|
} });
|
|
4677
5556
|
const projectPath = path.resolve(directory);
|
|
@@ -4680,7 +5559,7 @@ async function createProject(cwd, options$6) {
|
|
|
4680
5559
|
template,
|
|
4681
5560
|
types: language
|
|
4682
5561
|
});
|
|
4683
|
-
|
|
5562
|
+
T.success("Project created");
|
|
4684
5563
|
let packageManager;
|
|
4685
5564
|
let addOnNextSteps;
|
|
4686
5565
|
const installDeps = async (install) => {
|
|
@@ -4732,7 +5611,7 @@ function runMigrate(cwd, args) {
|
|
|
4732
5611
|
|
|
4733
5612
|
//#endregion
|
|
4734
5613
|
//#region packages/cli/commands/check.ts
|
|
4735
|
-
var import_picocolors = __toESM
|
|
5614
|
+
var import_picocolors = __toESM$1(require_picocolors(), 1);
|
|
4736
5615
|
const check = new Command("check").description("a CLI for checking your Svelte code").allowUnknownOption(true).allowExcessArguments(true).option("-C, --cwd <path>", "path to working directory", process$1.cwd()).configureHelp({ formatHelp() {
|
|
4737
5616
|
runCheck(process$1.cwd(), ["--help"]);
|
|
4738
5617
|
return "";
|