@hot-updater/firebase 0.21.6 → 0.21.8

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.
@@ -12,7 +12,7 @@ var __copyProps = (to, from, except, desc) => {
12
12
  if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i$1 = 0, n$1 = keys.length, key; i$1 < n$1; i$1++) {
13
13
  key = keys[i$1];
14
14
  if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
- get: ((k$2) => from[k$2]).bind(null, key),
15
+ get: ((k) => from[k]).bind(null, key),
16
16
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
17
  });
18
18
  }
@@ -24,22 +24,20 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  }) : target, mod));
25
25
 
26
26
  //#endregion
27
- let node_util = require("node:util");
28
- node_util = __toESM(node_util);
29
- let node_process = require("node:process");
30
- node_process = __toESM(node_process);
31
- let node_readline = require("node:readline");
32
- node_readline = __toESM(node_readline);
33
- let node_tty = require("node:tty");
34
- node_tty = __toESM(node_tty);
35
- let __hot_updater_plugin_core = require("@hot-updater/plugin-core");
36
- __hot_updater_plugin_core = __toESM(__hot_updater_plugin_core);
27
+ let __hot_updater_cli_tools = require("@hot-updater/cli-tools");
28
+ __hot_updater_cli_tools = __toESM(__hot_updater_cli_tools);
37
29
  let node_url = require("node:url");
38
30
  node_url = __toESM(node_url);
39
31
  let node_child_process = require("node:child_process");
40
32
  node_child_process = __toESM(node_child_process);
41
33
  let node_string_decoder = require("node:string_decoder");
42
34
  node_string_decoder = __toESM(node_string_decoder);
35
+ let node_util = require("node:util");
36
+ node_util = __toESM(node_util);
37
+ let node_process = require("node:process");
38
+ node_process = __toESM(node_process);
39
+ let node_tty = require("node:tty");
40
+ node_tty = __toESM(node_tty);
43
41
  let node_path = require("node:path");
44
42
  node_path = __toESM(node_path);
45
43
  let path = require("path");
@@ -63,1186 +61,23 @@ node_stream = __toESM(node_stream);
63
61
  let node_buffer = require("node:buffer");
64
62
  node_buffer = __toESM(node_buffer);
65
63
 
66
- //#region ../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
67
- var require_src = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js": ((exports, module) => {
68
- const ESC = "\x1B";
69
- const CSI = `${ESC}[`;
70
- const beep = "\x07";
71
- const cursor = {
72
- to(x$1, y$1) {
73
- if (!y$1) return `${CSI}${x$1 + 1}G`;
74
- return `${CSI}${y$1 + 1};${x$1 + 1}H`;
75
- },
76
- move(x$1, y$1) {
77
- let ret = "";
78
- if (x$1 < 0) ret += `${CSI}${-x$1}D`;
79
- else if (x$1 > 0) ret += `${CSI}${x$1}C`;
80
- if (y$1 < 0) ret += `${CSI}${-y$1}A`;
81
- else if (y$1 > 0) ret += `${CSI}${y$1}B`;
82
- return ret;
83
- },
84
- up: (count$1 = 1) => `${CSI}${count$1}A`,
85
- down: (count$1 = 1) => `${CSI}${count$1}B`,
86
- forward: (count$1 = 1) => `${CSI}${count$1}C`,
87
- backward: (count$1 = 1) => `${CSI}${count$1}D`,
88
- nextLine: (count$1 = 1) => `${CSI}E`.repeat(count$1),
89
- prevLine: (count$1 = 1) => `${CSI}F`.repeat(count$1),
90
- left: `${CSI}G`,
91
- hide: `${CSI}?25l`,
92
- show: `${CSI}?25h`,
93
- save: `${ESC}7`,
94
- restore: `${ESC}8`
95
- };
96
- const scroll = {
97
- up: (count$1 = 1) => `${CSI}S`.repeat(count$1),
98
- down: (count$1 = 1) => `${CSI}T`.repeat(count$1)
99
- };
100
- const erase = {
101
- screen: `${CSI}2J`,
102
- up: (count$1 = 1) => `${CSI}1J`.repeat(count$1),
103
- down: (count$1 = 1) => `${CSI}J`.repeat(count$1),
104
- line: `${CSI}2K`,
105
- lineEnd: `${CSI}K`,
106
- lineStart: `${CSI}1K`,
107
- lines(count$1) {
108
- let clear = "";
109
- for (let i$1 = 0; i$1 < count$1; i$1++) clear += this.line + (i$1 < count$1 - 1 ? cursor.up() : "");
110
- if (count$1) clear += cursor.left;
111
- return clear;
112
- }
113
- };
114
- module.exports = {
115
- cursor,
116
- scroll,
117
- erase,
118
- beep
119
- };
120
- }) });
121
-
122
- //#endregion
123
- //#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
124
- var require_picocolors = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js": ((exports, module) => {
125
- let p = process || {}, argv = p.argv || [], env = p.env || {};
126
- let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
127
- let formatter = (open, close, replace = open) => (input) => {
128
- let string = "" + input, index = string.indexOf(close, open.length);
129
- return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
130
- };
131
- let replaceClose = (string, close, replace, index) => {
132
- let result = "", cursor$1 = 0;
133
- do {
134
- result += string.substring(cursor$1, index) + replace;
135
- cursor$1 = index + close.length;
136
- index = string.indexOf(close, cursor$1);
137
- } while (~index);
138
- return result + string.substring(cursor$1);
139
- };
140
- let createColors = (enabled = isColorSupported) => {
141
- let f$1 = enabled ? formatter : () => String;
142
- return {
143
- isColorSupported: enabled,
144
- reset: f$1("\x1B[0m", "\x1B[0m"),
145
- bold: f$1("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
146
- dim: f$1("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
147
- italic: f$1("\x1B[3m", "\x1B[23m"),
148
- underline: f$1("\x1B[4m", "\x1B[24m"),
149
- inverse: f$1("\x1B[7m", "\x1B[27m"),
150
- hidden: f$1("\x1B[8m", "\x1B[28m"),
151
- strikethrough: f$1("\x1B[9m", "\x1B[29m"),
152
- black: f$1("\x1B[30m", "\x1B[39m"),
153
- red: f$1("\x1B[31m", "\x1B[39m"),
154
- green: f$1("\x1B[32m", "\x1B[39m"),
155
- yellow: f$1("\x1B[33m", "\x1B[39m"),
156
- blue: f$1("\x1B[34m", "\x1B[39m"),
157
- magenta: f$1("\x1B[35m", "\x1B[39m"),
158
- cyan: f$1("\x1B[36m", "\x1B[39m"),
159
- white: f$1("\x1B[37m", "\x1B[39m"),
160
- gray: f$1("\x1B[90m", "\x1B[39m"),
161
- bgBlack: f$1("\x1B[40m", "\x1B[49m"),
162
- bgRed: f$1("\x1B[41m", "\x1B[49m"),
163
- bgGreen: f$1("\x1B[42m", "\x1B[49m"),
164
- bgYellow: f$1("\x1B[43m", "\x1B[49m"),
165
- bgBlue: f$1("\x1B[44m", "\x1B[49m"),
166
- bgMagenta: f$1("\x1B[45m", "\x1B[49m"),
167
- bgCyan: f$1("\x1B[46m", "\x1B[49m"),
168
- bgWhite: f$1("\x1B[47m", "\x1B[49m"),
169
- blackBright: f$1("\x1B[90m", "\x1B[39m"),
170
- redBright: f$1("\x1B[91m", "\x1B[39m"),
171
- greenBright: f$1("\x1B[92m", "\x1B[39m"),
172
- yellowBright: f$1("\x1B[93m", "\x1B[39m"),
173
- blueBright: f$1("\x1B[94m", "\x1B[39m"),
174
- magentaBright: f$1("\x1B[95m", "\x1B[39m"),
175
- cyanBright: f$1("\x1B[96m", "\x1B[39m"),
176
- whiteBright: f$1("\x1B[97m", "\x1B[39m"),
177
- bgBlackBright: f$1("\x1B[100m", "\x1B[49m"),
178
- bgRedBright: f$1("\x1B[101m", "\x1B[49m"),
179
- bgGreenBright: f$1("\x1B[102m", "\x1B[49m"),
180
- bgYellowBright: f$1("\x1B[103m", "\x1B[49m"),
181
- bgBlueBright: f$1("\x1B[104m", "\x1B[49m"),
182
- bgMagentaBright: f$1("\x1B[105m", "\x1B[49m"),
183
- bgCyanBright: f$1("\x1B[106m", "\x1B[49m"),
184
- bgWhiteBright: f$1("\x1B[107m", "\x1B[49m")
185
- };
186
- };
187
- module.exports = createColors();
188
- module.exports.createColors = createColors;
189
- }) });
190
-
191
- //#endregion
192
- //#region ../../node_modules/.pnpm/@clack+core@0.4.1/node_modules/@clack/core/dist/index.mjs
193
- var import_src$1 = /* @__PURE__ */ __toESM(require_src(), 1);
194
- var import_picocolors$1 = /* @__PURE__ */ __toESM(require_picocolors(), 1);
195
- function J$1({ onlyFirst: t = !1 } = {}) {
196
- const F$1 = ["[\\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("|");
197
- return new RegExp(F$1, t ? void 0 : "g");
198
- }
199
- const Q = J$1();
200
- function T$1(t) {
201
- if (typeof t != "string") throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);
202
- return t.replace(Q, "");
203
- }
204
- function O(t) {
205
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
206
- }
207
- var P$1 = { exports: {} };
208
- (function(t) {
209
- var u$2 = {};
210
- t.exports = u$2, u$2.eastAsianWidth = function(e$1) {
211
- var s = e$1.charCodeAt(0), i$1 = e$1.length == 2 ? e$1.charCodeAt(1) : 0, D$1 = s;
212
- return 55296 <= s && s <= 56319 && 56320 <= i$1 && i$1 <= 57343 && (s &= 1023, i$1 &= 1023, D$1 = s << 10 | i$1, D$1 += 65536), D$1 == 12288 || 65281 <= D$1 && D$1 <= 65376 || 65504 <= D$1 && D$1 <= 65510 ? "F" : D$1 == 8361 || 65377 <= D$1 && D$1 <= 65470 || 65474 <= D$1 && D$1 <= 65479 || 65482 <= D$1 && D$1 <= 65487 || 65490 <= D$1 && D$1 <= 65495 || 65498 <= D$1 && D$1 <= 65500 || 65512 <= D$1 && D$1 <= 65518 ? "H" : 4352 <= D$1 && D$1 <= 4447 || 4515 <= D$1 && D$1 <= 4519 || 4602 <= D$1 && D$1 <= 4607 || 9001 <= D$1 && D$1 <= 9002 || 11904 <= D$1 && D$1 <= 11929 || 11931 <= D$1 && D$1 <= 12019 || 12032 <= D$1 && D$1 <= 12245 || 12272 <= D$1 && D$1 <= 12283 || 12289 <= D$1 && D$1 <= 12350 || 12353 <= D$1 && D$1 <= 12438 || 12441 <= D$1 && D$1 <= 12543 || 12549 <= D$1 && D$1 <= 12589 || 12593 <= D$1 && D$1 <= 12686 || 12688 <= D$1 && D$1 <= 12730 || 12736 <= D$1 && D$1 <= 12771 || 12784 <= D$1 && D$1 <= 12830 || 12832 <= D$1 && D$1 <= 12871 || 12880 <= D$1 && D$1 <= 13054 || 13056 <= D$1 && D$1 <= 19903 || 19968 <= D$1 && D$1 <= 42124 || 42128 <= D$1 && D$1 <= 42182 || 43360 <= D$1 && D$1 <= 43388 || 44032 <= D$1 && D$1 <= 55203 || 55216 <= D$1 && D$1 <= 55238 || 55243 <= D$1 && D$1 <= 55291 || 63744 <= D$1 && D$1 <= 64255 || 65040 <= D$1 && D$1 <= 65049 || 65072 <= D$1 && D$1 <= 65106 || 65108 <= D$1 && D$1 <= 65126 || 65128 <= D$1 && D$1 <= 65131 || 110592 <= D$1 && D$1 <= 110593 || 127488 <= D$1 && D$1 <= 127490 || 127504 <= D$1 && D$1 <= 127546 || 127552 <= D$1 && D$1 <= 127560 || 127568 <= D$1 && D$1 <= 127569 || 131072 <= D$1 && D$1 <= 194367 || 177984 <= D$1 && D$1 <= 196605 || 196608 <= D$1 && D$1 <= 262141 ? "W" : 32 <= D$1 && D$1 <= 126 || 162 <= D$1 && D$1 <= 163 || 165 <= D$1 && D$1 <= 166 || D$1 == 172 || D$1 == 175 || 10214 <= D$1 && D$1 <= 10221 || 10629 <= D$1 && D$1 <= 10630 ? "Na" : D$1 == 161 || D$1 == 164 || 167 <= D$1 && D$1 <= 168 || D$1 == 170 || 173 <= D$1 && D$1 <= 174 || 176 <= D$1 && D$1 <= 180 || 182 <= D$1 && D$1 <= 186 || 188 <= D$1 && D$1 <= 191 || D$1 == 198 || D$1 == 208 || 215 <= D$1 && D$1 <= 216 || 222 <= D$1 && D$1 <= 225 || D$1 == 230 || 232 <= D$1 && D$1 <= 234 || 236 <= D$1 && D$1 <= 237 || D$1 == 240 || 242 <= D$1 && D$1 <= 243 || 247 <= D$1 && D$1 <= 250 || D$1 == 252 || D$1 == 254 || D$1 == 257 || D$1 == 273 || D$1 == 275 || D$1 == 283 || 294 <= D$1 && D$1 <= 295 || D$1 == 299 || 305 <= D$1 && D$1 <= 307 || D$1 == 312 || 319 <= D$1 && D$1 <= 322 || D$1 == 324 || 328 <= D$1 && D$1 <= 331 || D$1 == 333 || 338 <= D$1 && D$1 <= 339 || 358 <= D$1 && D$1 <= 359 || D$1 == 363 || D$1 == 462 || D$1 == 464 || D$1 == 466 || D$1 == 468 || D$1 == 470 || D$1 == 472 || D$1 == 474 || D$1 == 476 || D$1 == 593 || D$1 == 609 || D$1 == 708 || D$1 == 711 || 713 <= D$1 && D$1 <= 715 || D$1 == 717 || D$1 == 720 || 728 <= D$1 && D$1 <= 731 || D$1 == 733 || D$1 == 735 || 768 <= D$1 && D$1 <= 879 || 913 <= D$1 && D$1 <= 929 || 931 <= D$1 && D$1 <= 937 || 945 <= D$1 && D$1 <= 961 || 963 <= D$1 && D$1 <= 969 || D$1 == 1025 || 1040 <= D$1 && D$1 <= 1103 || D$1 == 1105 || D$1 == 8208 || 8211 <= D$1 && D$1 <= 8214 || 8216 <= D$1 && D$1 <= 8217 || 8220 <= D$1 && D$1 <= 8221 || 8224 <= D$1 && D$1 <= 8226 || 8228 <= D$1 && D$1 <= 8231 || D$1 == 8240 || 8242 <= D$1 && D$1 <= 8243 || D$1 == 8245 || D$1 == 8251 || D$1 == 8254 || D$1 == 8308 || D$1 == 8319 || 8321 <= D$1 && D$1 <= 8324 || D$1 == 8364 || D$1 == 8451 || D$1 == 8453 || D$1 == 8457 || D$1 == 8467 || D$1 == 8470 || 8481 <= D$1 && D$1 <= 8482 || D$1 == 8486 || D$1 == 8491 || 8531 <= D$1 && D$1 <= 8532 || 8539 <= D$1 && D$1 <= 8542 || 8544 <= D$1 && D$1 <= 8555 || 8560 <= D$1 && D$1 <= 8569 || D$1 == 8585 || 8592 <= D$1 && D$1 <= 8601 || 8632 <= D$1 && D$1 <= 8633 || D$1 == 8658 || D$1 == 8660 || D$1 == 8679 || D$1 == 8704 || 8706 <= D$1 && D$1 <= 8707 || 8711 <= D$1 && D$1 <= 8712 || D$1 == 8715 || D$1 == 8719 || D$1 == 8721 || D$1 == 8725 || D$1 == 8730 || 8733 <= D$1 && D$1 <= 8736 || D$1 == 8739 || D$1 == 8741 || 8743 <= D$1 && D$1 <= 8748 || D$1 == 8750 || 8756 <= D$1 && D$1 <= 8759 || 8764 <= D$1 && D$1 <= 8765 || D$1 == 8776 || D$1 == 8780 || D$1 == 8786 || 8800 <= D$1 && D$1 <= 8801 || 8804 <= D$1 && D$1 <= 8807 || 8810 <= D$1 && D$1 <= 8811 || 8814 <= D$1 && D$1 <= 8815 || 8834 <= D$1 && D$1 <= 8835 || 8838 <= D$1 && D$1 <= 8839 || D$1 == 8853 || D$1 == 8857 || D$1 == 8869 || D$1 == 8895 || D$1 == 8978 || 9312 <= D$1 && D$1 <= 9449 || 9451 <= D$1 && D$1 <= 9547 || 9552 <= D$1 && D$1 <= 9587 || 9600 <= D$1 && D$1 <= 9615 || 9618 <= D$1 && D$1 <= 9621 || 9632 <= D$1 && D$1 <= 9633 || 9635 <= D$1 && D$1 <= 9641 || 9650 <= D$1 && D$1 <= 9651 || 9654 <= D$1 && D$1 <= 9655 || 9660 <= D$1 && D$1 <= 9661 || 9664 <= D$1 && D$1 <= 9665 || 9670 <= D$1 && D$1 <= 9672 || D$1 == 9675 || 9678 <= D$1 && D$1 <= 9681 || 9698 <= D$1 && D$1 <= 9701 || D$1 == 9711 || 9733 <= D$1 && D$1 <= 9734 || D$1 == 9737 || 9742 <= D$1 && D$1 <= 9743 || 9748 <= D$1 && D$1 <= 9749 || D$1 == 9756 || D$1 == 9758 || D$1 == 9792 || D$1 == 9794 || 9824 <= D$1 && D$1 <= 9825 || 9827 <= D$1 && D$1 <= 9829 || 9831 <= D$1 && D$1 <= 9834 || 9836 <= D$1 && D$1 <= 9837 || D$1 == 9839 || 9886 <= D$1 && D$1 <= 9887 || 9918 <= D$1 && D$1 <= 9919 || 9924 <= D$1 && D$1 <= 9933 || 9935 <= D$1 && D$1 <= 9953 || D$1 == 9955 || 9960 <= D$1 && D$1 <= 9983 || D$1 == 10045 || D$1 == 10071 || 10102 <= D$1 && D$1 <= 10111 || 11093 <= D$1 && D$1 <= 11097 || 12872 <= D$1 && D$1 <= 12879 || 57344 <= D$1 && D$1 <= 63743 || 65024 <= D$1 && D$1 <= 65039 || D$1 == 65533 || 127232 <= D$1 && D$1 <= 127242 || 127248 <= D$1 && D$1 <= 127277 || 127280 <= D$1 && D$1 <= 127337 || 127344 <= D$1 && D$1 <= 127386 || 917760 <= D$1 && D$1 <= 917999 || 983040 <= D$1 && D$1 <= 1048573 || 1048576 <= D$1 && D$1 <= 1114109 ? "A" : "N";
213
- }, u$2.characterLength = function(e$1) {
214
- var s = this.eastAsianWidth(e$1);
215
- return s == "F" || s == "W" || s == "A" ? 2 : 1;
216
- };
217
- function F$1(e$1) {
218
- return e$1.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
219
- }
220
- u$2.length = function(e$1) {
221
- for (var s = F$1(e$1), i$1 = 0, D$1 = 0; D$1 < s.length; D$1++) i$1 = i$1 + this.characterLength(s[D$1]);
222
- return i$1;
223
- }, u$2.slice = function(e$1, s, i$1) {
224
- textLen = u$2.length(e$1), s = s || 0, i$1 = i$1 || 1, s < 0 && (s = textLen + s), i$1 < 0 && (i$1 = textLen + i$1);
225
- for (var D$1 = "", C$1 = 0, o$2 = F$1(e$1), E = 0; E < o$2.length; E++) {
226
- var a$1 = o$2[E], n$1 = u$2.length(a$1);
227
- if (C$1 >= s - (n$1 == 2 ? 1 : 0)) if (C$1 + n$1 <= i$1) D$1 += a$1;
228
- else break;
229
- C$1 += n$1;
230
- }
231
- return D$1;
232
- };
233
- })(P$1);
234
- var X = P$1.exports;
235
- const DD = O(X);
236
- var uD = function() {
237
- 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;
238
- };
239
- const FD = O(uD);
240
- function A$1(t, u$2 = {}) {
241
- if (typeof t != "string" || t.length === 0 || (u$2 = {
242
- ambiguousIsNarrow: !0,
243
- ...u$2
244
- }, t = T$1(t), t.length === 0)) return 0;
245
- t = t.replace(FD(), " ");
246
- const F$1 = u$2.ambiguousIsNarrow ? 1 : 2;
247
- let e$1 = 0;
248
- for (const s of t) {
249
- const i$1 = s.codePointAt(0);
250
- if (i$1 <= 31 || i$1 >= 127 && i$1 <= 159 || i$1 >= 768 && i$1 <= 879) continue;
251
- switch (DD.eastAsianWidth(s)) {
252
- case "F":
253
- case "W":
254
- e$1 += 2;
255
- break;
256
- case "A":
257
- e$1 += F$1;
258
- break;
259
- default: e$1 += 1;
260
- }
261
- }
262
- return e$1;
263
- }
264
- const m = 10, L$1 = (t = 0) => (u$2) => `\x1B[${u$2 + t}m`, N = (t = 0) => (u$2) => `\x1B[${38 + t};5;${u$2}m`, I = (t = 0) => (u$2, F$1, e$1) => `\x1B[${38 + t};2;${u$2};${F$1};${e$1}m`, r = {
265
- modifier: {
266
- reset: [0, 0],
267
- bold: [1, 22],
268
- dim: [2, 22],
269
- italic: [3, 23],
270
- underline: [4, 24],
271
- overline: [53, 55],
272
- inverse: [7, 27],
273
- hidden: [8, 28],
274
- strikethrough: [9, 29]
275
- },
276
- color: {
277
- black: [30, 39],
278
- red: [31, 39],
279
- green: [32, 39],
280
- yellow: [33, 39],
281
- blue: [34, 39],
282
- magenta: [35, 39],
283
- cyan: [36, 39],
284
- white: [37, 39],
285
- blackBright: [90, 39],
286
- gray: [90, 39],
287
- grey: [90, 39],
288
- redBright: [91, 39],
289
- greenBright: [92, 39],
290
- yellowBright: [93, 39],
291
- blueBright: [94, 39],
292
- magentaBright: [95, 39],
293
- cyanBright: [96, 39],
294
- whiteBright: [97, 39]
295
- },
296
- bgColor: {
297
- bgBlack: [40, 49],
298
- bgRed: [41, 49],
299
- bgGreen: [42, 49],
300
- bgYellow: [43, 49],
301
- bgBlue: [44, 49],
302
- bgMagenta: [45, 49],
303
- bgCyan: [46, 49],
304
- bgWhite: [47, 49],
305
- bgBlackBright: [100, 49],
306
- bgGray: [100, 49],
307
- bgGrey: [100, 49],
308
- bgRedBright: [101, 49],
309
- bgGreenBright: [102, 49],
310
- bgYellowBright: [103, 49],
311
- bgBlueBright: [104, 49],
312
- bgMagentaBright: [105, 49],
313
- bgCyanBright: [106, 49],
314
- bgWhiteBright: [107, 49]
315
- }
316
- };
317
- Object.keys(r.modifier);
318
- const tD = Object.keys(r.color), eD = Object.keys(r.bgColor);
319
- [...tD, ...eD];
320
- function sD() {
321
- const t = /* @__PURE__ */ new Map();
322
- for (const [u$2, F$1] of Object.entries(r)) {
323
- for (const [e$1, s] of Object.entries(F$1)) r[e$1] = {
324
- open: `\x1B[${s[0]}m`,
325
- close: `\x1B[${s[1]}m`
326
- }, F$1[e$1] = r[e$1], t.set(s[0], s[1]);
327
- Object.defineProperty(r, u$2, {
328
- value: F$1,
329
- enumerable: !1
330
- });
331
- }
332
- return Object.defineProperty(r, "codes", {
333
- value: t,
334
- enumerable: !1
335
- }), r.color.close = "\x1B[39m", r.bgColor.close = "\x1B[49m", r.color.ansi = L$1(), r.color.ansi256 = N(), r.color.ansi16m = I(), r.bgColor.ansi = L$1(m), r.bgColor.ansi256 = N(m), r.bgColor.ansi16m = I(m), Object.defineProperties(r, {
336
- rgbToAnsi256: {
337
- value: (u$2, F$1, e$1) => u$2 === F$1 && F$1 === e$1 ? u$2 < 8 ? 16 : u$2 > 248 ? 231 : Math.round((u$2 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u$2 / 255 * 5) + 6 * Math.round(F$1 / 255 * 5) + Math.round(e$1 / 255 * 5),
338
- enumerable: !1
339
- },
340
- hexToRgb: {
341
- value: (u$2) => {
342
- const F$1 = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u$2.toString(16));
343
- if (!F$1) return [
344
- 0,
345
- 0,
346
- 0
347
- ];
348
- let [e$1] = F$1;
349
- e$1.length === 3 && (e$1 = [...e$1].map((i$1) => i$1 + i$1).join(""));
350
- const s = Number.parseInt(e$1, 16);
351
- return [
352
- s >> 16 & 255,
353
- s >> 8 & 255,
354
- s & 255
355
- ];
356
- },
357
- enumerable: !1
358
- },
359
- hexToAnsi256: {
360
- value: (u$2) => r.rgbToAnsi256(...r.hexToRgb(u$2)),
361
- enumerable: !1
362
- },
363
- ansi256ToAnsi: {
364
- value: (u$2) => {
365
- if (u$2 < 8) return 30 + u$2;
366
- if (u$2 < 16) return 90 + (u$2 - 8);
367
- let F$1, e$1, s;
368
- if (u$2 >= 232) F$1 = ((u$2 - 232) * 10 + 8) / 255, e$1 = F$1, s = F$1;
369
- else {
370
- u$2 -= 16;
371
- const C$1 = u$2 % 36;
372
- F$1 = Math.floor(u$2 / 36) / 5, e$1 = Math.floor(C$1 / 6) / 5, s = C$1 % 6 / 5;
373
- }
374
- const i$1 = Math.max(F$1, e$1, s) * 2;
375
- if (i$1 === 0) return 30;
376
- let D$1 = 30 + (Math.round(s) << 2 | Math.round(e$1) << 1 | Math.round(F$1));
377
- return i$1 === 2 && (D$1 += 60), D$1;
378
- },
379
- enumerable: !1
380
- },
381
- rgbToAnsi: {
382
- value: (u$2, F$1, e$1) => r.ansi256ToAnsi(r.rgbToAnsi256(u$2, F$1, e$1)),
383
- enumerable: !1
384
- },
385
- hexToAnsi: {
386
- value: (u$2) => r.ansi256ToAnsi(r.hexToAnsi256(u$2)),
387
- enumerable: !1
388
- }
389
- }), r;
390
- }
391
- const iD = sD(), v = new Set(["\x1B", "›"]), CD = 39, w$1 = "\x07", W$1 = "[", rD = "]", R = "m", y = `${rD}8;;`, V$1 = (t) => `${v.values().next().value}${W$1}${t}${R}`, z = (t) => `${v.values().next().value}${y}${t}${w$1}`, ED = (t) => t.split(" ").map((u$2) => A$1(u$2)), _$1 = (t, u$2, F$1) => {
392
- const e$1 = [...u$2];
393
- let s = !1, i$1 = !1, D$1 = A$1(T$1(t[t.length - 1]));
394
- for (const [C$1, o$2] of e$1.entries()) {
395
- const E = A$1(o$2);
396
- if (D$1 + E <= F$1 ? t[t.length - 1] += o$2 : (t.push(o$2), D$1 = 0), v.has(o$2) && (s = !0, i$1 = e$1.slice(C$1 + 1).join("").startsWith(y)), s) {
397
- i$1 ? o$2 === w$1 && (s = !1, i$1 = !1) : o$2 === R && (s = !1);
398
- continue;
399
- }
400
- D$1 += E, D$1 === F$1 && C$1 < e$1.length - 1 && (t.push(""), D$1 = 0);
401
- }
402
- !D$1 && t[t.length - 1].length > 0 && t.length > 1 && (t[t.length - 2] += t.pop());
403
- }, nD = (t) => {
404
- const u$2 = t.split(" ");
405
- let F$1 = u$2.length;
406
- for (; F$1 > 0 && !(A$1(u$2[F$1 - 1]) > 0);) F$1--;
407
- return F$1 === u$2.length ? t : u$2.slice(0, F$1).join(" ") + u$2.slice(F$1).join("");
408
- }, oD = (t, u$2, F$1 = {}) => {
409
- if (F$1.trim !== !1 && t.trim() === "") return "";
410
- let e$1 = "", s, i$1;
411
- const D$1 = ED(t);
412
- let C$1 = [""];
413
- for (const [E, a$1] of t.split(" ").entries()) {
414
- F$1.trim !== !1 && (C$1[C$1.length - 1] = C$1[C$1.length - 1].trimStart());
415
- let n$1 = A$1(C$1[C$1.length - 1]);
416
- if (E !== 0 && (n$1 >= u$2 && (F$1.wordWrap === !1 || F$1.trim === !1) && (C$1.push(""), n$1 = 0), (n$1 > 0 || F$1.trim === !1) && (C$1[C$1.length - 1] += " ", n$1++)), F$1.hard && D$1[E] > u$2) {
417
- const B$1 = u$2 - n$1, p$1 = 1 + Math.floor((D$1[E] - B$1 - 1) / u$2);
418
- Math.floor((D$1[E] - 1) / u$2) < p$1 && C$1.push(""), _$1(C$1, a$1, u$2);
419
- continue;
420
- }
421
- if (n$1 + D$1[E] > u$2 && n$1 > 0 && D$1[E] > 0) {
422
- if (F$1.wordWrap === !1 && n$1 < u$2) {
423
- _$1(C$1, a$1, u$2);
424
- continue;
425
- }
426
- C$1.push("");
427
- }
428
- if (n$1 + D$1[E] > u$2 && F$1.wordWrap === !1) {
429
- _$1(C$1, a$1, u$2);
430
- continue;
431
- }
432
- C$1[C$1.length - 1] += a$1;
433
- }
434
- F$1.trim !== !1 && (C$1 = C$1.map((E) => nD(E)));
435
- const o$2 = [...C$1.join(`
436
- `)];
437
- for (const [E, a$1] of o$2.entries()) {
438
- if (e$1 += a$1, v.has(a$1)) {
439
- const { groups: B$1 } = (/* @__PURE__ */ new RegExp(`(?:\\${W$1}(?<code>\\d+)m|\\${y}(?<uri>.*)${w$1})`)).exec(o$2.slice(E).join("")) || { groups: {} };
440
- if (B$1.code !== void 0) {
441
- const p$1 = Number.parseFloat(B$1.code);
442
- s = p$1 === CD ? void 0 : p$1;
443
- } else B$1.uri !== void 0 && (i$1 = B$1.uri.length === 0 ? void 0 : B$1.uri);
444
- }
445
- const n$1 = iD.codes.get(Number(s));
446
- o$2[E + 1] === `
447
- ` ? (i$1 && (e$1 += z("")), s && n$1 && (e$1 += V$1(n$1))) : a$1 === `
448
- ` && (s && n$1 && (e$1 += V$1(s)), i$1 && (e$1 += z(i$1)));
449
- }
450
- return e$1;
451
- };
452
- function G(t, u$2, F$1) {
453
- return String(t).normalize().replace(/\r\n/g, `
454
- `).split(`
455
- `).map((e$1) => oD(e$1, u$2, F$1)).join(`
456
- `);
457
- }
458
- const c$1 = {
459
- actions: new Set([
460
- "up",
461
- "down",
462
- "left",
463
- "right",
464
- "space",
465
- "enter",
466
- "cancel"
467
- ]),
468
- aliases: new Map([
469
- ["k", "up"],
470
- ["j", "down"],
471
- ["h", "left"],
472
- ["l", "right"],
473
- ["", "cancel"],
474
- ["escape", "cancel"]
475
- ])
476
- };
477
- function k$1(t, u$2) {
478
- if (typeof t == "string") return c$1.aliases.get(t) === u$2;
479
- for (const F$1 of t) if (F$1 !== void 0 && k$1(F$1, u$2)) return !0;
480
- return !1;
481
- }
482
- function lD(t, u$2) {
483
- if (t === u$2) return;
484
- const F$1 = t.split(`
485
- `), e$1 = u$2.split(`
486
- `), s = [];
487
- for (let i$1 = 0; i$1 < Math.max(F$1.length, e$1.length); i$1++) F$1[i$1] !== e$1[i$1] && s.push(i$1);
488
- return s;
489
- }
490
- const xD = globalThis.process.platform.startsWith("win"), S$1 = Symbol("clack:cancel");
491
- function BD(t) {
492
- return t === S$1;
493
- }
494
- function d$1(t, u$2) {
495
- const F$1 = t;
496
- F$1.isTTY && F$1.setRawMode(u$2);
497
- }
498
- function cD({ input: t = node_process.stdin, output: u$2 = node_process.stdout, overwrite: F$1 = !0, hideCursor: e$1 = !0 } = {}) {
499
- const s = node_readline.createInterface({
500
- input: t,
501
- output: u$2,
502
- prompt: "",
503
- tabSize: 1
504
- });
505
- node_readline.emitKeypressEvents(t, s), t.isTTY && t.setRawMode(!0);
506
- const i$1 = (D$1, { name: C$1, sequence: o$2 }) => {
507
- if (k$1([
508
- String(D$1),
509
- C$1,
510
- o$2
511
- ], "cancel")) {
512
- e$1 && u$2.write(import_src$1.cursor.show), process.exit(0);
513
- return;
514
- }
515
- if (!F$1) return;
516
- const a$1 = C$1 === "return" ? 0 : -1, n$1 = C$1 === "return" ? -1 : 0;
517
- node_readline.moveCursor(u$2, a$1, n$1, () => {
518
- node_readline.clearLine(u$2, 1, () => {
519
- t.once("keypress", i$1);
520
- });
521
- });
522
- };
523
- return e$1 && u$2.write(import_src$1.cursor.hide), t.once("keypress", i$1), () => {
524
- t.off("keypress", i$1), e$1 && u$2.write(import_src$1.cursor.show), t.isTTY && !xD && t.setRawMode(!1), s.terminal = !1, s.close();
525
- };
526
- }
527
- var AD = Object.defineProperty, pD = (t, u$2, F$1) => u$2 in t ? AD(t, u$2, {
528
- enumerable: !0,
529
- configurable: !0,
530
- writable: !0,
531
- value: F$1
532
- }) : t[u$2] = F$1, h$1 = (t, u$2, F$1) => (pD(t, typeof u$2 != "symbol" ? u$2 + "" : u$2, F$1), F$1);
533
- var x = class {
534
- constructor(u$2, F$1 = !0) {
535
- h$1(this, "input"), h$1(this, "output"), h$1(this, "_abortSignal"), h$1(this, "rl"), h$1(this, "opts"), h$1(this, "_render"), h$1(this, "_track", !1), h$1(this, "_prevFrame", ""), h$1(this, "_subscribers", /* @__PURE__ */ new Map()), h$1(this, "_cursor", 0), h$1(this, "state", "initial"), h$1(this, "error", ""), h$1(this, "value");
536
- const { input: e$1 = node_process.stdin, output: s = node_process.stdout, render: i$1, signal: D$1,...C$1 } = u$2;
537
- this.opts = C$1, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = i$1.bind(this), this._track = F$1, this._abortSignal = D$1, this.input = e$1, this.output = s;
538
- }
539
- unsubscribe() {
540
- this._subscribers.clear();
541
- }
542
- setSubscriber(u$2, F$1) {
543
- const e$1 = this._subscribers.get(u$2) ?? [];
544
- e$1.push(F$1), this._subscribers.set(u$2, e$1);
545
- }
546
- on(u$2, F$1) {
547
- this.setSubscriber(u$2, { cb: F$1 });
548
- }
549
- once(u$2, F$1) {
550
- this.setSubscriber(u$2, {
551
- cb: F$1,
552
- once: !0
553
- });
554
- }
555
- emit(u$2, ...F$1) {
556
- const e$1 = this._subscribers.get(u$2) ?? [], s = [];
557
- for (const i$1 of e$1) i$1.cb(...F$1), i$1.once && s.push(() => e$1.splice(e$1.indexOf(i$1), 1));
558
- for (const i$1 of s) i$1();
559
- }
560
- prompt() {
561
- return new Promise((u$2, F$1) => {
562
- if (this._abortSignal) {
563
- if (this._abortSignal.aborted) return this.state = "cancel", this.close(), u$2(S$1);
564
- this._abortSignal.addEventListener("abort", () => {
565
- this.state = "cancel", this.close();
566
- }, { once: !0 });
567
- }
568
- const e$1 = new node_tty.WriteStream(0);
569
- e$1._write = (s, i$1, D$1) => {
570
- this._track && (this.value = this.rl?.line.replace(/\t/g, ""), this._cursor = this.rl?.cursor ?? 0, this.emit("value", this.value)), D$1();
571
- }, this.input.pipe(e$1), this.rl = node_readline.default.createInterface({
572
- input: this.input,
573
- output: e$1,
574
- tabSize: 2,
575
- prompt: "",
576
- escapeCodeTimeout: 50
577
- }), node_readline.default.emitKeypressEvents(this.input, this.rl), this.rl.prompt(), this.opts.initialValue !== void 0 && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), d$1(this.input, !0), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
578
- this.output.write(import_src$1.cursor.show), this.output.off("resize", this.render), d$1(this.input, !1), u$2(this.value);
579
- }), this.once("cancel", () => {
580
- this.output.write(import_src$1.cursor.show), this.output.off("resize", this.render), d$1(this.input, !1), u$2(S$1);
581
- });
582
- });
583
- }
584
- onKeypress(u$2, F$1) {
585
- if (this.state === "error" && (this.state = "active"), F$1?.name && (!this._track && c$1.aliases.has(F$1.name) && this.emit("cursor", c$1.aliases.get(F$1.name)), c$1.actions.has(F$1.name) && this.emit("cursor", F$1.name)), u$2 && (u$2.toLowerCase() === "y" || u$2.toLowerCase() === "n") && this.emit("confirm", u$2.toLowerCase() === "y"), u$2 === " " && this.opts.placeholder && (this.value || (this.rl?.write(this.opts.placeholder), this.emit("value", this.opts.placeholder))), u$2 && this.emit("key", u$2.toLowerCase()), F$1?.name === "return") {
586
- if (this.opts.validate) {
587
- const e$1 = this.opts.validate(this.value);
588
- e$1 && (this.error = e$1 instanceof Error ? e$1.message : e$1, this.state = "error", this.rl?.write(this.value));
589
- }
590
- this.state !== "error" && (this.state = "submit");
591
- }
592
- k$1([
593
- u$2,
594
- F$1?.name,
595
- F$1?.sequence
596
- ], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
597
- }
598
- close() {
599
- this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
600
- `), d$1(this.input, !1), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
601
- }
602
- restoreCursor() {
603
- const u$2 = G(this._prevFrame, process.stdout.columns, { hard: !0 }).split(`
604
- `).length - 1;
605
- this.output.write(import_src$1.cursor.move(-999, u$2 * -1));
606
- }
607
- render() {
608
- const u$2 = G(this._render(this) ?? "", process.stdout.columns, { hard: !0 });
609
- if (u$2 !== this._prevFrame) {
610
- if (this.state === "initial") this.output.write(import_src$1.cursor.hide);
611
- else {
612
- const F$1 = lD(this._prevFrame, u$2);
613
- if (this.restoreCursor(), F$1 && F$1?.length === 1) {
614
- const e$1 = F$1[0];
615
- this.output.write(import_src$1.cursor.move(0, e$1)), this.output.write(import_src$1.erase.lines(1));
616
- const s = u$2.split(`
617
- `);
618
- this.output.write(s[e$1]), this._prevFrame = u$2, this.output.write(import_src$1.cursor.move(0, s.length - e$1 - 1));
619
- return;
620
- }
621
- if (F$1 && F$1?.length > 1) {
622
- const e$1 = F$1[0];
623
- this.output.write(import_src$1.cursor.move(0, e$1)), this.output.write(import_src$1.erase.down());
624
- const s = u$2.split(`
625
- `).slice(e$1);
626
- this.output.write(s.join(`
627
- `)), this._prevFrame = u$2;
628
- return;
629
- }
630
- this.output.write(import_src$1.erase.down());
631
- }
632
- this.output.write(u$2), this.state === "initial" && (this.state = "active"), this._prevFrame = u$2;
633
- }
634
- }
635
- };
636
- var fD = class extends x {
637
- get cursor() {
638
- return this.value ? 0 : 1;
639
- }
640
- get _value() {
641
- return this.cursor === 0;
642
- }
643
- constructor(u$2) {
644
- super(u$2, !1), this.value = !!u$2.initialValue, this.on("value", () => {
645
- this.value = this._value;
646
- }), this.on("confirm", (F$1) => {
647
- this.output.write(import_src$1.cursor.move(0, -1)), this.value = F$1, this.state = "submit", this.close();
648
- }), this.on("cursor", () => {
649
- this.value = !this.value;
650
- });
651
- }
652
- };
653
- var gD = Object.defineProperty, vD = (t, u$2, F$1) => u$2 in t ? gD(t, u$2, {
654
- enumerable: !0,
655
- configurable: !0,
656
- writable: !0,
657
- value: F$1
658
- }) : t[u$2] = F$1, K$1 = (t, u$2, F$1) => (vD(t, typeof u$2 != "symbol" ? u$2 + "" : u$2, F$1), F$1);
659
- let dD = class extends x {
660
- constructor(u$2) {
661
- super(u$2, !1), K$1(this, "options"), K$1(this, "cursor", 0);
662
- const { options: F$1 } = u$2;
663
- this.options = Object.entries(F$1).flatMap(([e$1, s]) => [{
664
- value: e$1,
665
- group: !0,
666
- label: e$1
667
- }, ...s.map((i$1) => ({
668
- ...i$1,
669
- group: e$1
670
- }))]), this.value = [...u$2.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: e$1 }) => e$1 === u$2.cursorAt), 0), this.on("cursor", (e$1) => {
671
- switch (e$1) {
672
- case "left":
673
- case "up":
674
- this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
675
- break;
676
- case "down":
677
- case "right":
678
- this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
679
- break;
680
- case "space":
681
- this.toggleValue();
682
- break;
683
- }
684
- });
685
- }
686
- getGroupItems(u$2) {
687
- return this.options.filter((F$1) => F$1.group === u$2);
688
- }
689
- isGroupSelected(u$2) {
690
- return this.getGroupItems(u$2).every((F$1) => this.value.includes(F$1.value));
691
- }
692
- toggleValue() {
693
- const u$2 = this.options[this.cursor];
694
- if (u$2.group === !0) {
695
- const F$1 = u$2.value, e$1 = this.getGroupItems(F$1);
696
- this.isGroupSelected(F$1) ? this.value = this.value.filter((s) => e$1.findIndex((i$1) => i$1.value === s) === -1) : this.value = [...this.value, ...e$1.map((s) => s.value)], this.value = Array.from(new Set(this.value));
697
- } else this.value = this.value.includes(u$2.value) ? this.value.filter((e$1) => e$1 !== u$2.value) : [...this.value, u$2.value];
698
- }
699
- };
700
- var bD = Object.defineProperty, mD = (t, u$2, F$1) => u$2 in t ? bD(t, u$2, {
701
- enumerable: !0,
702
- configurable: !0,
703
- writable: !0,
704
- value: F$1
705
- }) : t[u$2] = F$1, Y$1 = (t, u$2, F$1) => (mD(t, typeof u$2 != "symbol" ? u$2 + "" : u$2, F$1), F$1);
706
- let wD = class extends x {
707
- constructor(u$2) {
708
- super(u$2, !1), Y$1(this, "options"), Y$1(this, "cursor", 0), this.options = u$2.options, this.value = [...u$2.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: F$1 }) => F$1 === u$2.cursorAt), 0), this.on("key", (F$1) => {
709
- F$1 === "a" && this.toggleAll();
710
- }), this.on("cursor", (F$1) => {
711
- switch (F$1) {
712
- case "left":
713
- case "up":
714
- this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
715
- break;
716
- case "down":
717
- case "right":
718
- this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
719
- break;
720
- case "space":
721
- this.toggleValue();
722
- break;
723
- }
724
- });
725
- }
726
- get _value() {
727
- return this.options[this.cursor].value;
728
- }
729
- toggleAll() {
730
- this.value = this.value.length === this.options.length ? [] : this.options.map((F$1) => F$1.value);
731
- }
732
- toggleValue() {
733
- this.value = this.value.includes(this._value) ? this.value.filter((F$1) => F$1 !== this._value) : [...this.value, this._value];
734
- }
735
- };
736
- var yD = Object.defineProperty, _D = (t, u$2, F$1) => u$2 in t ? yD(t, u$2, {
737
- enumerable: !0,
738
- configurable: !0,
739
- writable: !0,
740
- value: F$1
741
- }) : t[u$2] = F$1, Z = (t, u$2, F$1) => (_D(t, typeof u$2 != "symbol" ? u$2 + "" : u$2, F$1), F$1);
742
- var kD = class extends x {
743
- constructor({ mask: u$2,...F$1 }) {
744
- super(F$1), Z(this, "valueWithCursor", ""), Z(this, "_mask", "•"), this._mask = u$2 ?? "•", this.on("finalize", () => {
745
- this.valueWithCursor = this.masked;
746
- }), this.on("value", () => {
747
- if (this.cursor >= this.value.length) this.valueWithCursor = `${this.masked}${import_picocolors$1.default.inverse(import_picocolors$1.default.hidden("_"))}`;
748
- else {
749
- const e$1 = this.masked.slice(0, this.cursor), s = this.masked.slice(this.cursor);
750
- this.valueWithCursor = `${e$1}${import_picocolors$1.default.inverse(s[0])}${s.slice(1)}`;
751
- }
752
- });
753
- }
754
- get cursor() {
755
- return this._cursor;
756
- }
757
- get masked() {
758
- return this.value.replaceAll(/./g, this._mask);
759
- }
760
- };
761
- var SD = Object.defineProperty, $D = (t, u$2, F$1) => u$2 in t ? SD(t, u$2, {
762
- enumerable: !0,
763
- configurable: !0,
764
- writable: !0,
765
- value: F$1
766
- }) : t[u$2] = F$1, q$1 = (t, u$2, F$1) => ($D(t, typeof u$2 != "symbol" ? u$2 + "" : u$2, F$1), F$1);
767
- var jD = class extends x {
768
- constructor(u$2) {
769
- super(u$2, !1), q$1(this, "options"), q$1(this, "cursor", 0), this.options = u$2.options, this.cursor = this.options.findIndex(({ value: F$1 }) => F$1 === u$2.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (F$1) => {
770
- switch (F$1) {
771
- case "left":
772
- case "up":
773
- this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
774
- break;
775
- case "down":
776
- case "right":
777
- this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
778
- break;
779
- }
780
- this.changeValue();
781
- });
782
- }
783
- get _value() {
784
- return this.options[this.cursor];
785
- }
786
- changeValue() {
787
- this.value = this._value.value;
788
- }
789
- };
790
- var MD = Object.defineProperty, TD = (t, u$2, F$1) => u$2 in t ? MD(t, u$2, {
791
- enumerable: !0,
792
- configurable: !0,
793
- writable: !0,
794
- value: F$1
795
- }) : t[u$2] = F$1, H = (t, u$2, F$1) => (TD(t, typeof u$2 != "symbol" ? u$2 + "" : u$2, F$1), F$1);
796
- var OD = class extends x {
797
- constructor(u$2) {
798
- super(u$2, !1), H(this, "options"), H(this, "cursor", 0), this.options = u$2.options;
799
- const F$1 = this.options.map(({ value: [e$1] }) => e$1?.toLowerCase());
800
- this.cursor = Math.max(F$1.indexOf(u$2.initialValue), 0), this.on("key", (e$1) => {
801
- if (!F$1.includes(e$1)) return;
802
- const s = this.options.find(({ value: [i$1] }) => i$1?.toLowerCase() === e$1);
803
- s && (this.value = s.value, this.state = "submit", this.emit("submit"));
804
- });
805
- }
806
- };
807
- var PD = class extends x {
808
- get valueWithCursor() {
809
- if (this.state === "submit") return this.value;
810
- if (this.cursor >= this.value.length) return `${this.value}\u2588`;
811
- const u$2 = this.value.slice(0, this.cursor), [F$1, ...e$1] = this.value.slice(this.cursor);
812
- return `${u$2}${import_picocolors$1.default.inverse(F$1)}${e$1.join("")}`;
813
- }
814
- get cursor() {
815
- return this._cursor;
816
- }
817
- constructor(u$2) {
818
- super(u$2), this.on("finalize", () => {
819
- this.value || (this.value = u$2.defaultValue);
820
- });
821
- }
822
- };
823
-
824
- //#endregion
825
- //#region ../../node_modules/.pnpm/@clack+prompts@0.10.0/node_modules/@clack/prompts/dist/index.mjs
826
- var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
827
- var import_src = /* @__PURE__ */ __toESM(require_src(), 1);
828
- function ce() {
829
- return node_process.default.platform !== "win32" ? node_process.default.env.TERM !== "linux" : !!node_process.default.env.CI || !!node_process.default.env.WT_SESSION || !!node_process.default.env.TERMINUS_SUBLIME || node_process.default.env.ConEmuTask === "{cmd::Cmder}" || node_process.default.env.TERM_PROGRAM === "Terminus-Sublime" || node_process.default.env.TERM_PROGRAM === "vscode" || node_process.default.env.TERM === "xterm-256color" || node_process.default.env.TERM === "alacritty" || node_process.default.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
830
- }
831
- const V = ce(), u$1 = (t, n$1) => V ? t : n$1, le = u$1("◆", "*"), L = u$1("■", "x"), W = u$1("▲", "x"), C = u$1("◇", "o"), ue = u$1("┌", "T"), o$1 = u$1("│", "|"), d = u$1("└", "—"), k = u$1("●", ">"), P = u$1("○", " "), A = u$1("◻", "[•]"), T = u$1("◼", "[+]"), F = u$1("◻", "[ ]"), $e = u$1("▪", "•"), _ = u$1("─", "-"), me = u$1("╮", "+"), de = u$1("├", "+"), pe = u$1("╯", "+"), q = u$1("●", "•"), D = u$1("◆", "*"), U = u$1("▲", "!"), K = u$1("■", "x"), w = (t) => {
832
- switch (t) {
833
- case "initial":
834
- case "active": return import_picocolors.default.cyan(le);
835
- case "cancel": return import_picocolors.default.red(L);
836
- case "error": return import_picocolors.default.yellow(W);
837
- case "submit": return import_picocolors.default.green(C);
838
- }
839
- }, B = (t) => {
840
- const { cursor: n$1, options: s, style: r$1 } = t, i$1 = t.maxItems ?? Number.POSITIVE_INFINITY, a$1 = Math.max(process.stdout.rows - 4, 0), c$2 = Math.min(a$1, Math.max(i$1, 5));
841
- let l$1 = 0;
842
- n$1 >= l$1 + c$2 - 3 ? l$1 = Math.max(Math.min(n$1 - c$2 + 3, s.length - c$2), 0) : n$1 < l$1 + 2 && (l$1 = Math.max(n$1 - 2, 0));
843
- const $$2 = c$2 < s.length && l$1 > 0, p$1 = c$2 < s.length && l$1 + c$2 < s.length;
844
- return s.slice(l$1, l$1 + c$2).map((M$1, v$1, x$1) => {
845
- const j$1 = v$1 === 0 && $$2, E = v$1 === x$1.length - 1 && p$1;
846
- return j$1 || E ? import_picocolors.default.dim("...") : r$1(M$1, v$1 + l$1 === n$1);
847
- });
848
- }, he = (t) => new PD({
849
- validate: t.validate,
850
- placeholder: t.placeholder,
851
- defaultValue: t.defaultValue,
852
- initialValue: t.initialValue,
853
- render() {
854
- const n$1 = `${import_picocolors.default.gray(o$1)}
855
- ${w(this.state)} ${t.message}
856
- `, s = t.placeholder ? import_picocolors.default.inverse(t.placeholder[0]) + import_picocolors.default.dim(t.placeholder.slice(1)) : import_picocolors.default.inverse(import_picocolors.default.hidden("_")), r$1 = this.value ? this.valueWithCursor : s;
857
- switch (this.state) {
858
- case "error": return `${n$1.trim()}
859
- ${import_picocolors.default.yellow(o$1)} ${r$1}
860
- ${import_picocolors.default.yellow(d)} ${import_picocolors.default.yellow(this.error)}
861
- `;
862
- case "submit": return `${n$1}${import_picocolors.default.gray(o$1)} ${import_picocolors.default.dim(this.value || t.placeholder)}`;
863
- case "cancel": return `${n$1}${import_picocolors.default.gray(o$1)} ${import_picocolors.default.strikethrough(import_picocolors.default.dim(this.value ?? ""))}${this.value?.trim() ? `
864
- ${import_picocolors.default.gray(o$1)}` : ""}`;
865
- default: return `${n$1}${import_picocolors.default.cyan(o$1)} ${r$1}
866
- ${import_picocolors.default.cyan(d)}
867
- `;
868
- }
869
- }
870
- }).prompt(), ge = (t) => new kD({
871
- validate: t.validate,
872
- mask: t.mask ?? $e,
873
- render() {
874
- const n$1 = `${import_picocolors.default.gray(o$1)}
875
- ${w(this.state)} ${t.message}
876
- `, s = this.valueWithCursor, r$1 = this.masked;
877
- switch (this.state) {
878
- case "error": return `${n$1.trim()}
879
- ${import_picocolors.default.yellow(o$1)} ${r$1}
880
- ${import_picocolors.default.yellow(d)} ${import_picocolors.default.yellow(this.error)}
881
- `;
882
- case "submit": return `${n$1}${import_picocolors.default.gray(o$1)} ${import_picocolors.default.dim(r$1)}`;
883
- case "cancel": return `${n$1}${import_picocolors.default.gray(o$1)} ${import_picocolors.default.strikethrough(import_picocolors.default.dim(r$1 ?? ""))}${r$1 ? `
884
- ${import_picocolors.default.gray(o$1)}` : ""}`;
885
- default: return `${n$1}${import_picocolors.default.cyan(o$1)} ${s}
886
- ${import_picocolors.default.cyan(d)}
887
- `;
888
- }
889
- }
890
- }).prompt(), ye = (t) => {
891
- const n$1 = t.active ?? "Yes", s = t.inactive ?? "No";
892
- return new fD({
893
- active: n$1,
894
- inactive: s,
895
- initialValue: t.initialValue ?? !0,
896
- render() {
897
- const r$1 = `${import_picocolors.default.gray(o$1)}
898
- ${w(this.state)} ${t.message}
899
- `, i$1 = this.value ? n$1 : s;
900
- switch (this.state) {
901
- case "submit": return `${r$1}${import_picocolors.default.gray(o$1)} ${import_picocolors.default.dim(i$1)}`;
902
- case "cancel": return `${r$1}${import_picocolors.default.gray(o$1)} ${import_picocolors.default.strikethrough(import_picocolors.default.dim(i$1))}
903
- ${import_picocolors.default.gray(o$1)}`;
904
- default: return `${r$1}${import_picocolors.default.cyan(o$1)} ${this.value ? `${import_picocolors.default.green(k)} ${n$1}` : `${import_picocolors.default.dim(P)} ${import_picocolors.default.dim(n$1)}`} ${import_picocolors.default.dim("/")} ${this.value ? `${import_picocolors.default.dim(P)} ${import_picocolors.default.dim(s)}` : `${import_picocolors.default.green(k)} ${s}`}
905
- ${import_picocolors.default.cyan(d)}
906
- `;
907
- }
908
- }
909
- }).prompt();
910
- }, ve = (t) => {
911
- const n$1 = (s, r$1) => {
912
- const i$1 = s.label ?? String(s.value);
913
- switch (r$1) {
914
- case "selected": return `${import_picocolors.default.dim(i$1)}`;
915
- case "active": return `${import_picocolors.default.green(k)} ${i$1} ${s.hint ? import_picocolors.default.dim(`(${s.hint})`) : ""}`;
916
- case "cancelled": return `${import_picocolors.default.strikethrough(import_picocolors.default.dim(i$1))}`;
917
- default: return `${import_picocolors.default.dim(P)} ${import_picocolors.default.dim(i$1)}`;
918
- }
919
- };
920
- return new jD({
921
- options: t.options,
922
- initialValue: t.initialValue,
923
- render() {
924
- const s = `${import_picocolors.default.gray(o$1)}
925
- ${w(this.state)} ${t.message}
926
- `;
927
- switch (this.state) {
928
- case "submit": return `${s}${import_picocolors.default.gray(o$1)} ${n$1(this.options[this.cursor], "selected")}`;
929
- case "cancel": return `${s}${import_picocolors.default.gray(o$1)} ${n$1(this.options[this.cursor], "cancelled")}
930
- ${import_picocolors.default.gray(o$1)}`;
931
- default: return `${s}${import_picocolors.default.cyan(o$1)} ${B({
932
- cursor: this.cursor,
933
- options: this.options,
934
- maxItems: t.maxItems,
935
- style: (r$1, i$1) => n$1(r$1, i$1 ? "active" : "inactive")
936
- }).join(`
937
- ${import_picocolors.default.cyan(o$1)} `)}
938
- ${import_picocolors.default.cyan(d)}
939
- `;
940
- }
941
- }
942
- }).prompt();
943
- }, we = (t) => {
944
- const n$1 = (s, r$1 = "inactive") => {
945
- const i$1 = s.label ?? String(s.value);
946
- return r$1 === "selected" ? `${import_picocolors.default.dim(i$1)}` : r$1 === "cancelled" ? `${import_picocolors.default.strikethrough(import_picocolors.default.dim(i$1))}` : r$1 === "active" ? `${import_picocolors.default.bgCyan(import_picocolors.default.gray(` ${s.value} `))} ${i$1} ${s.hint ? import_picocolors.default.dim(`(${s.hint})`) : ""}` : `${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(` ${s.value} `)))} ${i$1} ${s.hint ? import_picocolors.default.dim(`(${s.hint})`) : ""}`;
947
- };
948
- return new OD({
949
- options: t.options,
950
- initialValue: t.initialValue,
951
- render() {
952
- const s = `${import_picocolors.default.gray(o$1)}
953
- ${w(this.state)} ${t.message}
954
- `;
955
- switch (this.state) {
956
- case "submit": return `${s}${import_picocolors.default.gray(o$1)} ${n$1(this.options.find((r$1) => r$1.value === this.value) ?? t.options[0], "selected")}`;
957
- case "cancel": return `${s}${import_picocolors.default.gray(o$1)} ${n$1(this.options[0], "cancelled")}
958
- ${import_picocolors.default.gray(o$1)}`;
959
- default: return `${s}${import_picocolors.default.cyan(o$1)} ${this.options.map((r$1, i$1) => n$1(r$1, i$1 === this.cursor ? "active" : "inactive")).join(`
960
- ${import_picocolors.default.cyan(o$1)} `)}
961
- ${import_picocolors.default.cyan(d)}
962
- `;
963
- }
964
- }
965
- }).prompt();
966
- }, fe = (t) => {
967
- const n$1 = (s, r$1) => {
968
- const i$1 = s.label ?? String(s.value);
969
- return r$1 === "active" ? `${import_picocolors.default.cyan(A)} ${i$1} ${s.hint ? import_picocolors.default.dim(`(${s.hint})`) : ""}` : r$1 === "selected" ? `${import_picocolors.default.green(T)} ${import_picocolors.default.dim(i$1)}` : r$1 === "cancelled" ? `${import_picocolors.default.strikethrough(import_picocolors.default.dim(i$1))}` : r$1 === "active-selected" ? `${import_picocolors.default.green(T)} ${i$1} ${s.hint ? import_picocolors.default.dim(`(${s.hint})`) : ""}` : r$1 === "submitted" ? `${import_picocolors.default.dim(i$1)}` : `${import_picocolors.default.dim(F)} ${import_picocolors.default.dim(i$1)}`;
970
- };
971
- return new wD({
972
- options: t.options,
973
- initialValues: t.initialValues,
974
- required: t.required ?? !0,
975
- cursorAt: t.cursorAt,
976
- validate(s) {
977
- if (this.required && s.length === 0) return `Please select at least one option.
978
- ${import_picocolors.default.reset(import_picocolors.default.dim(`Press ${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(" space ")))} to select, ${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(" enter ")))} to submit`))}`;
979
- },
980
- render() {
981
- const s = `${import_picocolors.default.gray(o$1)}
982
- ${w(this.state)} ${t.message}
983
- `, r$1 = (i$1, a$1) => {
984
- const c$2 = this.value.includes(i$1.value);
985
- return a$1 && c$2 ? n$1(i$1, "active-selected") : c$2 ? n$1(i$1, "selected") : n$1(i$1, a$1 ? "active" : "inactive");
986
- };
987
- switch (this.state) {
988
- case "submit": return `${s}${import_picocolors.default.gray(o$1)} ${this.options.filter(({ value: i$1 }) => this.value.includes(i$1)).map((i$1) => n$1(i$1, "submitted")).join(import_picocolors.default.dim(", ")) || import_picocolors.default.dim("none")}`;
989
- case "cancel": {
990
- const i$1 = this.options.filter(({ value: a$1 }) => this.value.includes(a$1)).map((a$1) => n$1(a$1, "cancelled")).join(import_picocolors.default.dim(", "));
991
- return `${s}${import_picocolors.default.gray(o$1)} ${i$1.trim() ? `${i$1}
992
- ${import_picocolors.default.gray(o$1)}` : ""}`;
993
- }
994
- case "error": {
995
- const i$1 = this.error.split(`
996
- `).map((a$1, c$2) => c$2 === 0 ? `${import_picocolors.default.yellow(d)} ${import_picocolors.default.yellow(a$1)}` : ` ${a$1}`).join(`
997
- `);
998
- return `${s + import_picocolors.default.yellow(o$1)} ${B({
999
- options: this.options,
1000
- cursor: this.cursor,
1001
- maxItems: t.maxItems,
1002
- style: r$1
1003
- }).join(`
1004
- ${import_picocolors.default.yellow(o$1)} `)}
1005
- ${i$1}
1006
- `;
1007
- }
1008
- default: return `${s}${import_picocolors.default.cyan(o$1)} ${B({
1009
- options: this.options,
1010
- cursor: this.cursor,
1011
- maxItems: t.maxItems,
1012
- style: r$1
1013
- }).join(`
1014
- ${import_picocolors.default.cyan(o$1)} `)}
1015
- ${import_picocolors.default.cyan(d)}
1016
- `;
1017
- }
1018
- }
1019
- }).prompt();
1020
- }, be = (t) => {
1021
- const n$1 = (s, r$1, i$1 = []) => {
1022
- const a$1 = s.label ?? String(s.value), c$2 = typeof s.group == "string", l$1 = c$2 && (i$1[i$1.indexOf(s) + 1] ?? { group: !0 }), $$2 = c$2 && l$1.group === !0, p$1 = c$2 ? `${$$2 ? d : o$1} ` : "";
1023
- return r$1 === "active" ? `${import_picocolors.default.dim(p$1)}${import_picocolors.default.cyan(A)} ${a$1} ${s.hint ? import_picocolors.default.dim(`(${s.hint})`) : ""}` : r$1 === "group-active" ? `${p$1}${import_picocolors.default.cyan(A)} ${import_picocolors.default.dim(a$1)}` : r$1 === "group-active-selected" ? `${p$1}${import_picocolors.default.green(T)} ${import_picocolors.default.dim(a$1)}` : r$1 === "selected" ? `${import_picocolors.default.dim(p$1)}${import_picocolors.default.green(T)} ${import_picocolors.default.dim(a$1)}` : r$1 === "cancelled" ? `${import_picocolors.default.strikethrough(import_picocolors.default.dim(a$1))}` : r$1 === "active-selected" ? `${import_picocolors.default.dim(p$1)}${import_picocolors.default.green(T)} ${a$1} ${s.hint ? import_picocolors.default.dim(`(${s.hint})`) : ""}` : r$1 === "submitted" ? `${import_picocolors.default.dim(a$1)}` : `${import_picocolors.default.dim(p$1)}${import_picocolors.default.dim(F)} ${import_picocolors.default.dim(a$1)}`;
1024
- };
1025
- return new dD({
1026
- options: t.options,
1027
- initialValues: t.initialValues,
1028
- required: t.required ?? !0,
1029
- cursorAt: t.cursorAt,
1030
- validate(s) {
1031
- if (this.required && s.length === 0) return `Please select at least one option.
1032
- ${import_picocolors.default.reset(import_picocolors.default.dim(`Press ${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(" space ")))} to select, ${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(" enter ")))} to submit`))}`;
1033
- },
1034
- render() {
1035
- const s = `${import_picocolors.default.gray(o$1)}
1036
- ${w(this.state)} ${t.message}
1037
- `;
1038
- switch (this.state) {
1039
- case "submit": return `${s}${import_picocolors.default.gray(o$1)} ${this.options.filter(({ value: r$1 }) => this.value.includes(r$1)).map((r$1) => n$1(r$1, "submitted")).join(import_picocolors.default.dim(", "))}`;
1040
- case "cancel": {
1041
- const r$1 = this.options.filter(({ value: i$1 }) => this.value.includes(i$1)).map((i$1) => n$1(i$1, "cancelled")).join(import_picocolors.default.dim(", "));
1042
- return `${s}${import_picocolors.default.gray(o$1)} ${r$1.trim() ? `${r$1}
1043
- ${import_picocolors.default.gray(o$1)}` : ""}`;
1044
- }
1045
- case "error": {
1046
- const r$1 = this.error.split(`
1047
- `).map((i$1, a$1) => a$1 === 0 ? `${import_picocolors.default.yellow(d)} ${import_picocolors.default.yellow(i$1)}` : ` ${i$1}`).join(`
1048
- `);
1049
- return `${s}${import_picocolors.default.yellow(o$1)} ${this.options.map((i$1, a$1, c$2) => {
1050
- const l$1 = this.value.includes(i$1.value) || i$1.group === !0 && this.isGroupSelected(`${i$1.value}`), $$2 = a$1 === this.cursor;
1051
- return !$$2 && typeof i$1.group == "string" && this.options[this.cursor].value === i$1.group ? n$1(i$1, l$1 ? "group-active-selected" : "group-active", c$2) : $$2 && l$1 ? n$1(i$1, "active-selected", c$2) : l$1 ? n$1(i$1, "selected", c$2) : n$1(i$1, $$2 ? "active" : "inactive", c$2);
1052
- }).join(`
1053
- ${import_picocolors.default.yellow(o$1)} `)}
1054
- ${r$1}
1055
- `;
1056
- }
1057
- default: return `${s}${import_picocolors.default.cyan(o$1)} ${this.options.map((r$1, i$1, a$1) => {
1058
- const c$2 = this.value.includes(r$1.value) || r$1.group === !0 && this.isGroupSelected(`${r$1.value}`), l$1 = i$1 === this.cursor;
1059
- return !l$1 && typeof r$1.group == "string" && this.options[this.cursor].value === r$1.group ? n$1(r$1, c$2 ? "group-active-selected" : "group-active", a$1) : l$1 && c$2 ? n$1(r$1, "active-selected", a$1) : c$2 ? n$1(r$1, "selected", a$1) : n$1(r$1, l$1 ? "active" : "inactive", a$1);
1060
- }).join(`
1061
- ${import_picocolors.default.cyan(o$1)} `)}
1062
- ${import_picocolors.default.cyan(d)}
1063
- `;
1064
- }
1065
- }
1066
- }).prompt();
1067
- }, Me = (t = "", n$1 = "") => {
1068
- const s = `
1069
- ${t}
1070
- `.split(`
1071
- `), r$1 = (0, node_util.stripVTControlCharacters)(n$1).length, i$1 = Math.max(s.reduce((c$2, l$1) => {
1072
- const $$2 = (0, node_util.stripVTControlCharacters)(l$1);
1073
- return $$2.length > c$2 ? $$2.length : c$2;
1074
- }, 0), r$1) + 2, a$1 = s.map((c$2) => `${import_picocolors.default.gray(o$1)} ${import_picocolors.default.dim(c$2)}${" ".repeat(i$1 - (0, node_util.stripVTControlCharacters)(c$2).length)}${import_picocolors.default.gray(o$1)}`).join(`
1075
- `);
1076
- process.stdout.write(`${import_picocolors.default.gray(o$1)}
1077
- ${import_picocolors.default.green(C)} ${import_picocolors.default.reset(n$1)} ${import_picocolors.default.gray(_.repeat(Math.max(i$1 - r$1 - 1, 1)) + me)}
1078
- ${a$1}
1079
- ${import_picocolors.default.gray(de + _.repeat(i$1 + 2) + pe)}
1080
- `);
1081
- }, xe = (t = "") => {
1082
- process.stdout.write(`${import_picocolors.default.gray(d)} ${import_picocolors.default.red(t)}
1083
-
1084
- `);
1085
- }, Ie = (t = "") => {
1086
- process.stdout.write(`${import_picocolors.default.gray(ue)} ${t}
1087
- `);
1088
- }, Se = (t = "") => {
1089
- process.stdout.write(`${import_picocolors.default.gray(o$1)}
1090
- ${import_picocolors.default.gray(d)} ${t}
1091
-
1092
- `);
1093
- }, f = {
1094
- message: (t = "", { symbol: n$1 = import_picocolors.default.gray(o$1) } = {}) => {
1095
- const s = [`${import_picocolors.default.gray(o$1)}`];
1096
- if (t) {
1097
- const [r$1, ...i$1] = t.split(`
1098
- `);
1099
- s.push(`${n$1} ${r$1}`, ...i$1.map((a$1) => `${import_picocolors.default.gray(o$1)} ${a$1}`));
1100
- }
1101
- process.stdout.write(`${s.join(`
1102
- `)}
1103
- `);
1104
- },
1105
- info: (t) => {
1106
- f.message(t, { symbol: import_picocolors.default.blue(q) });
1107
- },
1108
- success: (t) => {
1109
- f.message(t, { symbol: import_picocolors.default.green(D) });
1110
- },
1111
- step: (t) => {
1112
- f.message(t, { symbol: import_picocolors.default.green(C) });
1113
- },
1114
- warn: (t) => {
1115
- f.message(t, { symbol: import_picocolors.default.yellow(U) });
1116
- },
1117
- warning: (t) => {
1118
- f.warn(t);
1119
- },
1120
- error: (t) => {
1121
- f.message(t, { symbol: import_picocolors.default.red(K) });
1122
- }
1123
- }, J = `${import_picocolors.default.gray(o$1)} `, b = {
1124
- message: async (t, { symbol: n$1 = import_picocolors.default.gray(o$1) } = {}) => {
1125
- process.stdout.write(`${import_picocolors.default.gray(o$1)}
1126
- ${n$1} `);
1127
- let s = 3;
1128
- for await (let r$1 of t) {
1129
- r$1 = r$1.replace(/\n/g, `
1130
- ${J}`), r$1.includes(`
1131
- `) && (s = 3 + (0, node_util.stripVTControlCharacters)(r$1.slice(r$1.lastIndexOf(`
1132
- `))).length);
1133
- const i$1 = (0, node_util.stripVTControlCharacters)(r$1).length;
1134
- s + i$1 < process.stdout.columns ? (s += i$1, process.stdout.write(r$1)) : (process.stdout.write(`
1135
- ${J}${r$1.trimStart()}`), s = 3 + (0, node_util.stripVTControlCharacters)(r$1.trimStart()).length);
1136
- }
1137
- process.stdout.write(`
1138
- `);
1139
- },
1140
- info: (t) => b.message(t, { symbol: import_picocolors.default.blue(q) }),
1141
- success: (t) => b.message(t, { symbol: import_picocolors.default.green(D) }),
1142
- step: (t) => b.message(t, { symbol: import_picocolors.default.green(C) }),
1143
- warn: (t) => b.message(t, { symbol: import_picocolors.default.yellow(U) }),
1144
- warning: (t) => b.warn(t),
1145
- error: (t) => b.message(t, { symbol: import_picocolors.default.red(K) })
1146
- }, Y = ({ indicator: t = "dots" } = {}) => {
1147
- const n$1 = V ? [
1148
- "◒",
1149
- "◐",
1150
- "◓",
1151
- "◑"
1152
- ] : [
1153
- "•",
1154
- "o",
1155
- "O",
1156
- "0"
1157
- ], s = V ? 80 : 120, r$1 = process.env.CI === "true";
1158
- let i$1, a$1, c$2 = !1, l$1 = "", $$2, p$1 = performance.now();
1159
- const M$1 = (m$1) => {
1160
- c$2 && N$1(m$1 > 1 ? "Something went wrong" : "Canceled", m$1);
1161
- }, v$1 = () => M$1(2), x$1 = () => M$1(1), j$1 = () => {
1162
- process.on("uncaughtExceptionMonitor", v$1), process.on("unhandledRejection", v$1), process.on("SIGINT", x$1), process.on("SIGTERM", x$1), process.on("exit", M$1);
1163
- }, E = () => {
1164
- process.removeListener("uncaughtExceptionMonitor", v$1), process.removeListener("unhandledRejection", v$1), process.removeListener("SIGINT", x$1), process.removeListener("SIGTERM", x$1), process.removeListener("exit", M$1);
1165
- }, O$1 = () => {
1166
- if ($$2 === void 0) return;
1167
- r$1 && process.stdout.write(`
1168
- `);
1169
- const m$1 = $$2.split(`
1170
- `);
1171
- process.stdout.write(import_src.cursor.move(-999, m$1.length - 1)), process.stdout.write(import_src.erase.down(m$1.length));
1172
- }, R$1 = (m$1) => m$1.replace(/\.+$/, ""), G$1 = (m$1) => {
1173
- const h$2 = (performance.now() - m$1) / 1e3, y$1 = Math.floor(h$2 / 60), I$1 = Math.floor(h$2 % 60);
1174
- return y$1 > 0 ? `[${y$1}m ${I$1}s]` : `[${I$1}s]`;
1175
- }, H$1 = (m$1 = "") => {
1176
- c$2 = !0, i$1 = cD(), l$1 = R$1(m$1), p$1 = performance.now(), process.stdout.write(`${import_picocolors.default.gray(o$1)}
1177
- `);
1178
- let h$2 = 0, y$1 = 0;
1179
- j$1(), a$1 = setInterval(() => {
1180
- if (r$1 && l$1 === $$2) return;
1181
- O$1(), $$2 = l$1;
1182
- const I$1 = import_picocolors.default.magenta(n$1[h$2]);
1183
- if (r$1) process.stdout.write(`${I$1} ${l$1}...`);
1184
- else if (t === "timer") process.stdout.write(`${I$1} ${l$1} ${G$1(p$1)}`);
1185
- else {
1186
- const z$1 = ".".repeat(Math.floor(y$1)).slice(0, 3);
1187
- process.stdout.write(`${I$1} ${l$1}${z$1}`);
1188
- }
1189
- h$2 = h$2 + 1 < n$1.length ? h$2 + 1 : 0, y$1 = y$1 < n$1.length ? y$1 + .125 : 0;
1190
- }, s);
1191
- }, N$1 = (m$1 = "", h$2 = 0) => {
1192
- c$2 = !1, clearInterval(a$1), O$1();
1193
- const y$1 = h$2 === 0 ? import_picocolors.default.green(C) : h$2 === 1 ? import_picocolors.default.red(L) : import_picocolors.default.red(W);
1194
- l$1 = R$1(m$1 ?? l$1), t === "timer" ? process.stdout.write(`${y$1} ${l$1} ${G$1(p$1)}
1195
- `) : process.stdout.write(`${y$1} ${l$1}
1196
- `), E(), i$1();
1197
- };
1198
- return {
1199
- start: H$1,
1200
- stop: N$1,
1201
- message: (m$1 = "") => {
1202
- l$1 = R$1(m$1 ?? l$1);
1203
- }
1204
- };
1205
- }, Ce = async (t, n$1) => {
1206
- const s = {}, r$1 = Object.keys(t);
1207
- for (const i$1 of r$1) {
1208
- const a$1 = t[i$1], c$2 = await a$1({ results: s })?.catch((l$1) => {
1209
- throw l$1;
1210
- });
1211
- if (typeof n$1?.onCancel == "function" && BD(c$2)) {
1212
- s[i$1] = "canceled", n$1.onCancel({ results: s });
1213
- continue;
1214
- }
1215
- s[i$1] = c$2;
1216
- }
1217
- return s;
1218
- }, Te = async (t) => {
1219
- for (const n$1 of t) {
1220
- if (n$1.enabled === !1) continue;
1221
- const s = Y();
1222
- s.start(n$1.title);
1223
- const r$1 = await n$1.task(s.message);
1224
- s.stop(r$1 || n$1.title);
1225
- }
1226
- };
1227
-
1228
- //#endregion
1229
64
  //#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/_internal/compareValues.mjs
1230
- function compareValues(a$1, b$2, order) {
1231
- if (a$1 < b$2) return order === "asc" ? -1 : 1;
1232
- if (a$1 > b$2) return order === "asc" ? 1 : -1;
65
+ function compareValues(a$1, b, order) {
66
+ if (a$1 < b) return order === "asc" ? -1 : 1;
67
+ if (a$1 > b) return order === "asc" ? 1 : -1;
1233
68
  return 0;
1234
69
  }
1235
70
 
1236
71
  //#endregion
1237
72
  //#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/array/orderBy.mjs
1238
73
  function orderBy(arr, criteria, orders) {
1239
- return arr.slice().sort((a$1, b$2) => {
74
+ return arr.slice().sort((a$1, b) => {
1240
75
  const ordersLength = orders.length;
1241
76
  for (let i$1 = 0; i$1 < criteria.length; i$1++) {
1242
77
  const order = ordersLength > i$1 ? orders[i$1] : orders[ordersLength - 1];
1243
78
  const criterion = criteria[i$1];
1244
79
  const criterionIsFunction = typeof criterion === "function";
1245
- const result = compareValues(criterionIsFunction ? criterion(a$1) : a$1[criterion], criterionIsFunction ? criterion(b$2) : b$2[criterion], order);
80
+ const result = compareValues(criterionIsFunction ? criterion(a$1) : a$1[criterion], criterionIsFunction ? criterion(b) : b[criterion], order);
1246
81
  if (result !== 0) return result;
1247
82
  }
1248
83
  return 0;
@@ -1261,7 +96,7 @@ function uniqWith(arr, areItemsEqual) {
1261
96
  const result = [];
1262
97
  for (let i$1 = 0; i$1 < arr.length; i$1++) {
1263
98
  const item = arr[i$1];
1264
- if (result.every((v$1) => !areItemsEqual(v$1, item))) result.push(item);
99
+ if (result.every((v) => !areItemsEqual(v, item))) result.push(item);
1265
100
  }
1266
101
  return result;
1267
102
  }
@@ -1346,60 +181,60 @@ function eq(value, other) {
1346
181
 
1347
182
  //#endregion
1348
183
  //#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isEqualWith.mjs
1349
- function isEqualWith(a$1, b$2, areValuesEqual) {
1350
- return isEqualWithImpl(a$1, b$2, void 0, void 0, void 0, void 0, areValuesEqual);
184
+ function isEqualWith(a$1, b, areValuesEqual) {
185
+ return isEqualWithImpl(a$1, b, void 0, void 0, void 0, void 0, areValuesEqual);
1351
186
  }
1352
- function isEqualWithImpl(a$1, b$2, property, aParent, bParent, stack, areValuesEqual) {
1353
- const result = areValuesEqual(a$1, b$2, property, aParent, bParent, stack);
187
+ function isEqualWithImpl(a$1, b, property, aParent, bParent, stack, areValuesEqual) {
188
+ const result = areValuesEqual(a$1, b, property, aParent, bParent, stack);
1354
189
  if (result !== void 0) return result;
1355
- if (typeof a$1 === typeof b$2) switch (typeof a$1) {
190
+ if (typeof a$1 === typeof b) switch (typeof a$1) {
1356
191
  case "bigint":
1357
192
  case "string":
1358
193
  case "boolean":
1359
194
  case "symbol":
1360
- case "undefined": return a$1 === b$2;
1361
- case "number": return a$1 === b$2 || Object.is(a$1, b$2);
1362
- case "function": return a$1 === b$2;
1363
- case "object": return areObjectsEqual(a$1, b$2, stack, areValuesEqual);
195
+ case "undefined": return a$1 === b;
196
+ case "number": return a$1 === b || Object.is(a$1, b);
197
+ case "function": return a$1 === b;
198
+ case "object": return areObjectsEqual(a$1, b, stack, areValuesEqual);
1364
199
  }
1365
- return areObjectsEqual(a$1, b$2, stack, areValuesEqual);
200
+ return areObjectsEqual(a$1, b, stack, areValuesEqual);
1366
201
  }
1367
- function areObjectsEqual(a$1, b$2, stack, areValuesEqual) {
1368
- if (Object.is(a$1, b$2)) return true;
202
+ function areObjectsEqual(a$1, b, stack, areValuesEqual) {
203
+ if (Object.is(a$1, b)) return true;
1369
204
  let aTag = getTag(a$1);
1370
- let bTag = getTag(b$2);
205
+ let bTag = getTag(b);
1371
206
  if (aTag === argumentsTag) aTag = objectTag;
1372
207
  if (bTag === argumentsTag) bTag = objectTag;
1373
208
  if (aTag !== bTag) return false;
1374
209
  switch (aTag) {
1375
- case stringTag: return a$1.toString() === b$2.toString();
1376
- case numberTag: return eq(a$1.valueOf(), b$2.valueOf());
210
+ case stringTag: return a$1.toString() === b.toString();
211
+ case numberTag: return eq(a$1.valueOf(), b.valueOf());
1377
212
  case booleanTag:
1378
213
  case dateTag:
1379
- case symbolTag: return Object.is(a$1.valueOf(), b$2.valueOf());
1380
- case regexpTag: return a$1.source === b$2.source && a$1.flags === b$2.flags;
1381
- case functionTag: return a$1 === b$2;
214
+ case symbolTag: return Object.is(a$1.valueOf(), b.valueOf());
215
+ case regexpTag: return a$1.source === b.source && a$1.flags === b.flags;
216
+ case functionTag: return a$1 === b;
1382
217
  }
1383
218
  stack = stack ?? /* @__PURE__ */ new Map();
1384
219
  const aStack = stack.get(a$1);
1385
- const bStack = stack.get(b$2);
1386
- if (aStack != null && bStack != null) return aStack === b$2;
1387
- stack.set(a$1, b$2);
1388
- stack.set(b$2, a$1);
220
+ const bStack = stack.get(b);
221
+ if (aStack != null && bStack != null) return aStack === b;
222
+ stack.set(a$1, b);
223
+ stack.set(b, a$1);
1389
224
  try {
1390
225
  switch (aTag) {
1391
226
  case mapTag:
1392
- if (a$1.size !== b$2.size) return false;
1393
- for (const [key, value] of a$1.entries()) if (!b$2.has(key) || !isEqualWithImpl(value, b$2.get(key), key, a$1, b$2, stack, areValuesEqual)) return false;
227
+ if (a$1.size !== b.size) return false;
228
+ for (const [key, value] of a$1.entries()) if (!b.has(key) || !isEqualWithImpl(value, b.get(key), key, a$1, b, stack, areValuesEqual)) return false;
1394
229
  return true;
1395
230
  case setTag: {
1396
- if (a$1.size !== b$2.size) return false;
231
+ if (a$1.size !== b.size) return false;
1397
232
  const aValues = Array.from(a$1.values());
1398
- const bValues = Array.from(b$2.values());
233
+ const bValues = Array.from(b.values());
1399
234
  for (let i$1 = 0; i$1 < aValues.length; i$1++) {
1400
235
  const aValue = aValues[i$1];
1401
236
  const index = bValues.findIndex((bValue) => {
1402
- return isEqualWithImpl(aValue, bValue, void 0, a$1, b$2, stack, areValuesEqual);
237
+ return isEqualWithImpl(aValue, bValue, void 0, a$1, b, stack, areValuesEqual);
1403
238
  });
1404
239
  if (index === -1) return false;
1405
240
  bValues.splice(index, 1);
@@ -1418,28 +253,28 @@ function areObjectsEqual(a$1, b$2, stack, areValuesEqual) {
1418
253
  case bigInt64ArrayTag:
1419
254
  case float32ArrayTag:
1420
255
  case float64ArrayTag:
1421
- if (typeof Buffer !== "undefined" && Buffer.isBuffer(a$1) !== Buffer.isBuffer(b$2)) return false;
1422
- if (a$1.length !== b$2.length) return false;
1423
- for (let i$1 = 0; i$1 < a$1.length; i$1++) if (!isEqualWithImpl(a$1[i$1], b$2[i$1], i$1, a$1, b$2, stack, areValuesEqual)) return false;
256
+ if (typeof Buffer !== "undefined" && Buffer.isBuffer(a$1) !== Buffer.isBuffer(b)) return false;
257
+ if (a$1.length !== b.length) return false;
258
+ for (let i$1 = 0; i$1 < a$1.length; i$1++) if (!isEqualWithImpl(a$1[i$1], b[i$1], i$1, a$1, b, stack, areValuesEqual)) return false;
1424
259
  return true;
1425
260
  case arrayBufferTag:
1426
- if (a$1.byteLength !== b$2.byteLength) return false;
1427
- return areObjectsEqual(new Uint8Array(a$1), new Uint8Array(b$2), stack, areValuesEqual);
261
+ if (a$1.byteLength !== b.byteLength) return false;
262
+ return areObjectsEqual(new Uint8Array(a$1), new Uint8Array(b), stack, areValuesEqual);
1428
263
  case dataViewTag:
1429
- if (a$1.byteLength !== b$2.byteLength || a$1.byteOffset !== b$2.byteOffset) return false;
1430
- return areObjectsEqual(new Uint8Array(a$1), new Uint8Array(b$2), stack, areValuesEqual);
1431
- case errorTag: return a$1.name === b$2.name && a$1.message === b$2.message;
264
+ if (a$1.byteLength !== b.byteLength || a$1.byteOffset !== b.byteOffset) return false;
265
+ return areObjectsEqual(new Uint8Array(a$1), new Uint8Array(b), stack, areValuesEqual);
266
+ case errorTag: return a$1.name === b.name && a$1.message === b.message;
1432
267
  case objectTag: {
1433
- if (!(areObjectsEqual(a$1.constructor, b$2.constructor, stack, areValuesEqual) || isPlainObject$1(a$1) && isPlainObject$1(b$2))) return false;
268
+ if (!(areObjectsEqual(a$1.constructor, b.constructor, stack, areValuesEqual) || isPlainObject$1(a$1) && isPlainObject$1(b))) return false;
1434
269
  const aKeys = [...Object.keys(a$1), ...getSymbols(a$1)];
1435
- const bKeys = [...Object.keys(b$2), ...getSymbols(b$2)];
270
+ const bKeys = [...Object.keys(b), ...getSymbols(b)];
1436
271
  if (aKeys.length !== bKeys.length) return false;
1437
272
  for (let i$1 = 0; i$1 < aKeys.length; i$1++) {
1438
273
  const propKey = aKeys[i$1];
1439
274
  const aProp = a$1[propKey];
1440
- if (!Object.hasOwn(b$2, propKey)) return false;
1441
- const bProp = b$2[propKey];
1442
- if (!isEqualWithImpl(aProp, bProp, propKey, a$1, b$2, stack, areValuesEqual)) return false;
275
+ if (!Object.hasOwn(b, propKey)) return false;
276
+ const bProp = b[propKey];
277
+ if (!isEqualWithImpl(aProp, bProp, propKey, a$1, b, stack, areValuesEqual)) return false;
1443
278
  }
1444
279
  return true;
1445
280
  }
@@ -1447,14 +282,14 @@ function areObjectsEqual(a$1, b$2, stack, areValuesEqual) {
1447
282
  }
1448
283
  } finally {
1449
284
  stack.delete(a$1);
1450
- stack.delete(b$2);
285
+ stack.delete(b);
1451
286
  }
1452
287
  }
1453
288
 
1454
289
  //#endregion
1455
290
  //#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isEqual.mjs
1456
- function isEqual(a$1, b$2) {
1457
- return isEqualWith(a$1, b$2, noop$2);
291
+ function isEqual(a$1, b) {
292
+ return isEqualWith(a$1, b, noop$2);
1458
293
  }
1459
294
 
1460
295
  //#endregion
@@ -1754,10 +589,10 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
1754
589
  //#endregion
1755
590
  //#region ../../node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
1756
591
  function isUnicodeSupported() {
1757
- const { env: env$1 } = node_process.default;
1758
- const { TERM, TERM_PROGRAM } = env$1;
592
+ const { env } = node_process.default;
593
+ const { TERM, TERM_PROGRAM } = env;
1759
594
  if (node_process.default.platform !== "win32") return TERM !== "linux";
1760
- return Boolean(env$1.WT_SESSION) || Boolean(env$1.TERMINUS_SUBLIME) || env$1.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env$1.TERMINAL_EMULATOR === "JetBrains-JediTerm";
595
+ return Boolean(env.WT_SESSION) || Boolean(env.TERMINUS_SUBLIME) || env.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
1761
596
  }
1762
597
 
1763
598
  //#endregion
@@ -2255,8 +1090,8 @@ var require_windows = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ise
2255
1090
  pathext = pathext.split(";");
2256
1091
  if (pathext.indexOf("") !== -1) return true;
2257
1092
  for (var i$1 = 0; i$1 < pathext.length; i$1++) {
2258
- var p$1 = pathext[i$1].toLowerCase();
2259
- if (p$1 && path$10.substr(-p$1.length).toLowerCase() === p$1) return true;
1093
+ var p$2 = pathext[i$1].toLowerCase();
1094
+ if (p$2 && path$10.substr(-p$2.length).toLowerCase() === p$2) return true;
2260
1095
  }
2261
1096
  return false;
2262
1097
  }
@@ -2297,11 +1132,11 @@ var require_mode = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@
2297
1132
  var gid = stat.gid;
2298
1133
  var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid();
2299
1134
  var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid();
2300
- var u$2 = parseInt("100", 8);
2301
- var g$2 = parseInt("010", 8);
2302
- var o$2 = parseInt("001", 8);
2303
- var ug = u$2 | g$2;
2304
- return mod & o$2 || mod & g$2 && gid === myGid || mod & u$2 && uid === myUid || mod & ug && myUid === 0;
1135
+ var u$1 = parseInt("100", 8);
1136
+ var g = parseInt("010", 8);
1137
+ var o$1 = parseInt("001", 8);
1138
+ var ug = u$1 | g;
1139
+ return mod & o$1 || mod & g && gid === myGid || mod & u$1 && uid === myUid || mod & ug && myUid === 0;
2305
1140
  }
2306
1141
  }) });
2307
1142
 
@@ -2385,13 +1220,13 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
2385
1220
  const pCmd = path$9.join(pathPart, cmd);
2386
1221
  resolve(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i$1, 0));
2387
1222
  });
2388
- const subStep = (p$1, i$1, ii) => new Promise((resolve, reject) => {
1223
+ const subStep = (p$2, i$1, ii) => new Promise((resolve, reject) => {
2389
1224
  if (ii === pathExt.length) return resolve(step(i$1 + 1));
2390
1225
  const ext = pathExt[ii];
2391
- isexe(p$1 + ext, { pathExt: pathExtExe }, (er, is) => {
2392
- if (!er && is) if (opt.all) found.push(p$1 + ext);
2393
- else return resolve(p$1 + ext);
2394
- return resolve(subStep(p$1, i$1, ii + 1));
1226
+ isexe(p$2 + ext, { pathExt: pathExtExe }, (er, is) => {
1227
+ if (!er && is) if (opt.all) found.push(p$2 + ext);
1228
+ else return resolve(p$2 + ext);
1229
+ return resolve(subStep(p$2, i$1, ii + 1));
2395
1230
  });
2396
1231
  });
2397
1232
  return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
@@ -2404,9 +1239,9 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
2404
1239
  const ppRaw = pathEnv[i$1];
2405
1240
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
2406
1241
  const pCmd = path$9.join(pathPart, cmd);
2407
- const p$1 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
2408
- for (let j$1 = 0; j$1 < pathExt.length; j$1++) {
2409
- const cur = p$1 + pathExt[j$1];
1242
+ const p$2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
1243
+ for (let j = 0; j < pathExt.length; j++) {
1244
+ const cur = p$2 + pathExt[j];
2410
1245
  try {
2411
1246
  if (isexe.sync(cur, { pathExt: pathExtExe })) if (opt.all) found.push(cur);
2412
1247
  else return cur;
@@ -2440,7 +1275,7 @@ var require_resolveCommand = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
2440
1275
  const which = require_which();
2441
1276
  const getPathKey = require_path_key();
2442
1277
  function resolveCommandAttempt(parsed, withoutPathExt) {
2443
- const env$1 = parsed.options.env || process.env;
1278
+ const env = parsed.options.env || process.env;
2444
1279
  const cwd = process.cwd();
2445
1280
  const hasCustomCwd = parsed.options.cwd != null;
2446
1281
  const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
@@ -2450,10 +1285,10 @@ var require_resolveCommand = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
2450
1285
  let resolved;
2451
1286
  try {
2452
1287
  resolved = which.sync(parsed.command, {
2453
- path: env$1[getPathKey({ env: env$1 })],
1288
+ path: env[getPathKey({ env })],
2454
1289
  pathExt: withoutPathExt ? path$8.delimiter : void 0
2455
1290
  });
2456
- } catch (e$1) {} finally {
1291
+ } catch (e) {} finally {
2457
1292
  if (shouldSwitchCwd) process.chdir(cwd);
2458
1293
  }
2459
1294
  if (resolved) resolved = path$8.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
@@ -2519,7 +1354,7 @@ var require_readShebang = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
2519
1354
  fd = fs$3.openSync(command, "r");
2520
1355
  fs$3.readSync(fd, buffer, 0, size, 0);
2521
1356
  fs$3.closeSync(fd);
2522
- } catch (e$1) {}
1357
+ } catch (e) {}
2523
1358
  return shebangCommand(buffer.toString());
2524
1359
  }
2525
1360
  module.exports = readShebang$1;
@@ -2656,9 +1491,9 @@ var require_cross_spawn = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
2656
1491
  //#region ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
2657
1492
  var import_cross_spawn = /* @__PURE__ */ __toESM(require_cross_spawn(), 1);
2658
1493
  function pathKey(options = {}) {
2659
- const { env: env$1 = process.env, platform: platform$1 = process.platform } = options;
1494
+ const { env = process.env, platform: platform$1 = process.platform } = options;
2660
1495
  if (platform$1 !== "win32") return "PATH";
2661
- return Object.keys(env$1).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
1496
+ return Object.keys(env).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
2662
1497
  }
2663
1498
 
2664
1499
  //#endregion
@@ -2700,12 +1535,12 @@ const applyExecPath = (result, pathParts, execPath$1, cwdPath) => {
2700
1535
  const pathPart = node_path.default.resolve(cwdPath, toPath(execPath$1), "..");
2701
1536
  if (!pathParts.includes(pathPart)) result.push(pathPart);
2702
1537
  };
2703
- const npmRunPathEnv = ({ env: env$1 = node_process.default.env,...options } = {}) => {
2704
- env$1 = { ...env$1 };
2705
- const pathName = pathKey({ env: env$1 });
2706
- options.path = env$1[pathName];
2707
- env$1[pathName] = npmRunPath(options);
2708
- return env$1;
1538
+ const npmRunPathEnv = ({ env = node_process.default.env,...options } = {}) => {
1539
+ env = { ...env };
1540
+ const pathName = pathKey({ env });
1541
+ options.path = env[pathName];
1542
+ env[pathName] = npmRunPath(options);
1543
+ return env;
2709
1544
  };
2710
1545
 
2711
1546
  //#endregion
@@ -3896,18 +2731,18 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
3896
2731
  serialization
3897
2732
  });
3898
2733
  const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
3899
- const env$1 = extendEnv ? {
2734
+ const env = extendEnv ? {
3900
2735
  ...node_process.default.env,
3901
2736
  ...envOption
3902
2737
  } : envOption;
3903
2738
  if (preferLocal || node) return npmRunPathEnv({
3904
- env: env$1,
2739
+ env,
3905
2740
  cwd: localDirectory,
3906
2741
  execPath: nodePath,
3907
2742
  preferLocal,
3908
2743
  addExecPath: node
3909
2744
  });
3910
- return env$1;
2745
+ return env;
3911
2746
  };
3912
2747
 
3913
2748
  //#endregion
@@ -3950,15 +2785,15 @@ var c = class {
3950
2785
  #n;
3951
2786
  #r = !1;
3952
2787
  #e = void 0;
3953
- constructor(e$1, t) {
3954
- this.#t = e$1, this.#n = t;
2788
+ constructor(e, t) {
2789
+ this.#t = e, this.#n = t;
3955
2790
  }
3956
2791
  next() {
3957
- const e$1 = () => this.#s();
3958
- return this.#e = this.#e ? this.#e.then(e$1, e$1) : e$1(), this.#e;
2792
+ const e = () => this.#s();
2793
+ return this.#e = this.#e ? this.#e.then(e, e) : e(), this.#e;
3959
2794
  }
3960
- return(e$1) {
3961
- const t = () => this.#i(e$1);
2795
+ return(e) {
2796
+ const t = () => this.#i(e);
3962
2797
  return this.#e ? this.#e.then(t, t) : t();
3963
2798
  }
3964
2799
  async #s() {
@@ -3966,29 +2801,29 @@ var c = class {
3966
2801
  done: !0,
3967
2802
  value: void 0
3968
2803
  };
3969
- let e$1;
2804
+ let e;
3970
2805
  try {
3971
- e$1 = await this.#t.read();
2806
+ e = await this.#t.read();
3972
2807
  } catch (t) {
3973
2808
  throw this.#e = void 0, this.#r = !0, this.#t.releaseLock(), t;
3974
2809
  }
3975
- return e$1.done && (this.#e = void 0, this.#r = !0, this.#t.releaseLock()), e$1;
2810
+ return e.done && (this.#e = void 0, this.#r = !0, this.#t.releaseLock()), e;
3976
2811
  }
3977
- async #i(e$1) {
2812
+ async #i(e) {
3978
2813
  if (this.#r) return {
3979
2814
  done: !0,
3980
- value: e$1
2815
+ value: e
3981
2816
  };
3982
2817
  if (this.#r = !0, !this.#n) {
3983
- const t = this.#t.cancel(e$1);
2818
+ const t = this.#t.cancel(e);
3984
2819
  return this.#t.releaseLock(), await t, {
3985
2820
  done: !0,
3986
- value: e$1
2821
+ value: e
3987
2822
  };
3988
2823
  }
3989
2824
  return this.#t.releaseLock(), {
3990
2825
  done: !0,
3991
- value: e$1
2826
+ value: e
3992
2827
  };
3993
2828
  }
3994
2829
  };
@@ -3997,8 +2832,8 @@ function i() {
3997
2832
  return this[n].next();
3998
2833
  }
3999
2834
  Object.defineProperty(i, "name", { value: "next" });
4000
- function o(r$1) {
4001
- return this[n].return(r$1);
2835
+ function o(r) {
2836
+ return this[n].return(r);
4002
2837
  }
4003
2838
  Object.defineProperty(o, "name", { value: "return" });
4004
2839
  const u = Object.create(a, {
@@ -4015,8 +2850,8 @@ const u = Object.create(a, {
4015
2850
  value: o
4016
2851
  }
4017
2852
  });
4018
- function h({ preventCancel: r$1 = !1 } = {}) {
4019
- const t = new c(this.getReader(), r$1), s = Object.create(u);
2853
+ function h({ preventCancel: r = !1 } = {}) {
2854
+ const t = new c(this.getReader(), r), s = Object.create(u);
4020
2855
  return s[n] = t, s;
4021
2856
  }
4022
2857
 
@@ -4915,7 +3750,7 @@ const getStdioArray = (stdio, options) => {
4915
3750
  ];
4916
3751
  if (!Array.isArray(stdio)) throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);
4917
3752
  const length = Math.max(stdio.length, STANDARD_STREAMS_ALIASES.length);
4918
- return Array.from({ length }, (_$2, fdNumber) => stdio[fdNumber]);
3753
+ return Array.from({ length }, (_, fdNumber) => stdio[fdNumber]);
4919
3754
  };
4920
3755
  const hasAlias = (options) => STANDARD_STREAMS_ALIASES.some((alias) => options[alias] !== void 0);
4921
3756
  const addDefaultValue = (stdioOption, fdNumber) => {
@@ -6449,8 +5284,8 @@ var SignalExit = class extends SignalExitBase {
6449
5284
  const listeners = this.#process.listeners(sig);
6450
5285
  let { count: count$1 } = this.#emitter;
6451
5286
  /* c8 ignore start */
6452
- const p$1 = process$9;
6453
- if (typeof p$1.__signal_exit_emitter__ === "object" && typeof p$1.__signal_exit_emitter__.count === "number") count$1 += p$1.__signal_exit_emitter__.count;
5287
+ const p$2 = process$9;
5288
+ if (typeof p$2.__signal_exit_emitter__ === "object" && typeof p$2.__signal_exit_emitter__.count === "number") count$1 += p$2.__signal_exit_emitter__.count;
6454
5289
  /* c8 ignore stop */
6455
5290
  if (listeners.length === count$1) {
6456
5291
  this.unload();
@@ -6482,7 +5317,7 @@ var SignalExit = class extends SignalExitBase {
6482
5317
  for (const sig of signals) try {
6483
5318
  const fn = this.#sigListeners[sig];
6484
5319
  if (fn) this.#process.on(sig, fn);
6485
- } catch (_$2) {}
5320
+ } catch (_) {}
6486
5321
  this.#process.emit = (ev, ...a$1) => {
6487
5322
  return this.#processEmit(ev, ...a$1);
6488
5323
  };
@@ -6500,7 +5335,7 @@ var SignalExit = class extends SignalExitBase {
6500
5335
  /* c8 ignore stop */
6501
5336
  try {
6502
5337
  this.#process.removeListener(sig, listener);
6503
- } catch (_$2) {}
5338
+ } catch (_) {}
6504
5339
  /* c8 ignore stop */
6505
5340
  });
6506
5341
  this.#process.emit = this.#originalProcessEmit;
@@ -7798,13 +6633,13 @@ const getConfigTemplate = (build) => {
7798
6633
  // Set the GOOGLE_APPLICATION_CREDENTIALS environment variable to your credentials file path
7799
6634
  // Example: GOOGLE_APPLICATION_CREDENTIALS=./firebase-adminsdk-credentials.json
7800
6635
  const credential = admin.credential.applicationDefault();`.trim();
7801
- return new __hot_updater_plugin_core.ConfigBuilder().setBuildType(build).setStorage(storageConfig).setDatabase(databaseConfig).addImport({
6636
+ return new __hot_updater_cli_tools.ConfigBuilder().setBuildType(build).setStorage(storageConfig).setDatabase(databaseConfig).addImport({
7802
6637
  pkg: "firebase-admin",
7803
6638
  defaultOrNamespace: "admin"
7804
6639
  }).setIntermediateCode(intermediate).getResult();
7805
6640
  };
7806
6641
  const setEnv = async ({ projectId, storageBucket, build }) => {
7807
- await (0, __hot_updater_plugin_core.makeEnv)({
6642
+ await (0, __hot_updater_cli_tools.makeEnv)({
7808
6643
  GOOGLE_APPLICATION_CREDENTIALS: {
7809
6644
  comment: "Project Settings > Service Accounts > New Private Key > Download JSON",
7810
6645
  value: "your-credentials.json"
@@ -7812,17 +6647,17 @@ const setEnv = async ({ projectId, storageBucket, build }) => {
7812
6647
  HOT_UPDATER_FIREBASE_PROJECT_ID: projectId,
7813
6648
  HOT_UPDATER_FIREBASE_STORAGE_BUCKET: storageBucket
7814
6649
  });
7815
- f.success("Firebase credentials have been successfully configured.");
6650
+ __hot_updater_cli_tools.p.log.success("Firebase credentials have been successfully configured.");
7816
6651
  try {
7817
6652
  await fs.default.promises.writeFile("hot-updater.config.ts", getConfigTemplate(build));
7818
- f.success("Configuration file 'hot-updater.config.ts' has been created.");
6653
+ __hot_updater_cli_tools.p.log.success("Configuration file 'hot-updater.config.ts' has been created.");
7819
6654
  } catch (error) {
7820
6655
  console.error("Error writing configuration file:", error.message);
7821
6656
  }
7822
6657
  };
7823
6658
  const handleError = (err) => {
7824
- if (err instanceof ExecaError) f.error(err.stderr || err.stdout || err.message);
7825
- else if (err instanceof Error) f.error(`Error occurred: ${err.message}`);
6659
+ if (err instanceof ExecaError) __hot_updater_cli_tools.p.log.error(err.stderr || err.stdout || err.message);
6660
+ else if (err instanceof Error) __hot_updater_cli_tools.p.log.error(`Error occurred: ${err.message}`);
7826
6661
  process.exit(1);
7827
6662
  };
7828
6663
  const listProjects = async () => {
@@ -7861,7 +6696,7 @@ const initFirebaseUser = async (cwd) => {
7861
6696
  }
7862
6697
  const projects = await listProjects();
7863
6698
  const createKey = `create/${Math.random().toString(36).substring(2, 15)}`;
7864
- const projectId = await ve({
6699
+ const projectId = await __hot_updater_cli_tools.p.select({
7865
6700
  message: "Select a Firebase project",
7866
6701
  options: [...projects.map((project$1) => ({
7867
6702
  label: project$1.displayName,
@@ -7871,14 +6706,14 @@ const initFirebaseUser = async (cwd) => {
7871
6706
  label: "Create new Firebase project"
7872
6707
  }]
7873
6708
  });
7874
- if (BD(projectId)) {
7875
- f.error("Project ID is required");
6709
+ if (__hot_updater_cli_tools.p.isCancel(projectId)) {
6710
+ __hot_updater_cli_tools.p.log.error("Project ID is required");
7876
6711
  process.exit(1);
7877
6712
  }
7878
6713
  if (projectId === createKey) {
7879
- const newProjectId = await he({ message: "Enter the Firebase project ID:" });
7880
- if (BD(newProjectId)) {
7881
- f.error("Project ID is required");
6714
+ const newProjectId = await __hot_updater_cli_tools.p.text({ message: "Enter the Firebase project ID:" });
6715
+ if (__hot_updater_cli_tools.p.isCancel(newProjectId)) {
6716
+ __hot_updater_cli_tools.p.log.error("Project ID is required");
7882
6717
  process.exit(1);
7883
6718
  }
7884
6719
  try {
@@ -7890,16 +6725,16 @@ const initFirebaseUser = async (cwd) => {
7890
6725
  stdio: "inherit",
7891
6726
  shell: true
7892
6727
  });
7893
- f.success("Firebase project created successfully");
7894
- f.step("Please Go to the following links to enable Firestore and Storage and Billing");
7895
- f.step((0, __hot_updater_plugin_core.link)(`https://console.firebase.google.com/project/${newProjectId}/firestore`));
7896
- f.step((0, __hot_updater_plugin_core.link)(`https://console.firebase.google.com/project/${newProjectId}/storage`));
6728
+ __hot_updater_cli_tools.p.log.success("Firebase project created successfully");
6729
+ __hot_updater_cli_tools.p.log.step("Please Go to the following links to enable Firestore and Storage and Billing");
6730
+ __hot_updater_cli_tools.p.log.step((0, __hot_updater_cli_tools.link)(`https://console.firebase.google.com/project/${newProjectId}/firestore`));
6731
+ __hot_updater_cli_tools.p.log.step((0, __hot_updater_cli_tools.link)(`https://console.firebase.google.com/project/${newProjectId}/storage`));
7897
6732
  } catch (err) {
7898
6733
  handleError(err);
7899
6734
  }
7900
6735
  process.exit(0);
7901
6736
  }
7902
- await Te([{
6737
+ await __hot_updater_cli_tools.p.tasks([{
7903
6738
  title: `Select Firebase project (${projectId})...`,
7904
6739
  task: async () => {
7905
6740
  try {
@@ -7913,8 +6748,8 @@ const initFirebaseUser = async (cwd) => {
7913
6748
  shell: true
7914
6749
  });
7915
6750
  } catch (error) {
7916
- if (error instanceof ExecaError) f.error(error.stderr || error.stdout || error.message);
7917
- else if (error instanceof Error) f.error(error.message);
6751
+ if (error instanceof ExecaError) __hot_updater_cli_tools.p.log.error(error.stderr || error.stdout || error.message);
6752
+ else if (error instanceof Error) __hot_updater_cli_tools.p.log.error(error.message);
7918
6753
  process.exit(1);
7919
6754
  }
7920
6755
  }
@@ -7931,17 +6766,17 @@ const initFirebaseUser = async (cwd) => {
7931
6766
  input: "N\n"
7932
6767
  });
7933
6768
  if (JSON.parse(databases.stdout).length === 0) {
7934
- f.warning("Firestore Database not found");
7935
- f.step("Please enable Firestore in the Firebase Console:");
7936
- f.step((0, __hot_updater_plugin_core.link)(`https://console.firebase.google.com/project/${projectId}/firestore`));
7937
- f.step("After enabling Firestore, please run 'npx hot-updater init' again.");
6769
+ __hot_updater_cli_tools.p.log.warning("Firestore Database not found");
6770
+ __hot_updater_cli_tools.p.log.step("Please enable Firestore in the Firebase Console:");
6771
+ __hot_updater_cli_tools.p.log.step((0, __hot_updater_cli_tools.link)(`https://console.firebase.google.com/project/${projectId}/firestore`));
6772
+ __hot_updater_cli_tools.p.log.step("After enabling Firestore, please run 'npx hot-updater init' again.");
7938
6773
  process.exit(1);
7939
6774
  }
7940
6775
  } catch (err) {
7941
6776
  handleError(err);
7942
6777
  }
7943
6778
  let storageBucket = null;
7944
- await Te([{
6779
+ await __hot_updater_cli_tools.p.tasks([{
7945
6780
  title: "Getting storage bucket...",
7946
6781
  task: async () => {
7947
6782
  const buckets = await execa("gcloud", [
@@ -7953,16 +6788,16 @@ const initFirebaseUser = async (cwd) => {
7953
6788
  ], { shell: true });
7954
6789
  storageBucket = JSON.parse(buckets.stdout).find((bucket) => bucket.name === `${projectId}.firebasestorage.app` || bucket.name === `${projectId}.appspot.com`)?.name;
7955
6790
  if (!storageBucket) {
7956
- f.error("Storage Bucket not found");
7957
- f.step("Please Go to the following links to enable Firestore and Storage and Billing");
7958
- f.step((0, __hot_updater_plugin_core.link)(`https://console.firebase.google.com/project/${projectId}/firestore`));
6791
+ __hot_updater_cli_tools.p.log.error("Storage Bucket not found");
6792
+ __hot_updater_cli_tools.p.log.step("Please Go to the following links to enable Firestore and Storage and Billing");
6793
+ __hot_updater_cli_tools.p.log.step((0, __hot_updater_cli_tools.link)(`https://console.firebase.google.com/project/${projectId}/firestore`));
7959
6794
  process.exit(1);
7960
6795
  }
7961
6796
  return `Storage Bucket: ${storageBucket}`;
7962
6797
  }
7963
6798
  }]);
7964
6799
  if (!storageBucket) {
7965
- f.error("Storage Bucket not found");
6800
+ __hot_updater_cli_tools.p.log.error("Storage Bucket not found");
7966
6801
  process.exit(1);
7967
6802
  }
7968
6803
  const project = await execa("gcloud", [
@@ -7974,7 +6809,7 @@ const initFirebaseUser = async (cwd) => {
7974
6809
  const projectJson = JSON.parse(project.stdout);
7975
6810
  const projectNumber = Number(projectJson.projectNumber);
7976
6811
  if (Number.isNaN(projectNumber)) {
7977
- f.error("Project Number not found");
6812
+ __hot_updater_cli_tools.p.log.error("Project Number not found");
7978
6813
  process.exit(1);
7979
6814
  }
7980
6815
  return {
@@ -8089,7 +6924,7 @@ function normalizeIndex(index) {
8089
6924
  }
8090
6925
  const mergeIndexes = (originalIndexes, newIndexes) => {
8091
6926
  return {
8092
- indexes: uniqWith(originalIndexes.indexes.concat(newIndexes.indexes), (a$1, b$2) => isEqual(normalizeIndex(a$1), normalizeIndex(b$2))),
6927
+ indexes: uniqWith(originalIndexes.indexes.concat(newIndexes.indexes), (a$1, b) => isEqual(normalizeIndex(a$1), normalizeIndex(b))),
8093
6928
  fieldOverrides: merge(originalIndexes.fieldOverrides, newIndexes.fieldOverrides)
8094
6929
  };
8095
6930
  };
@@ -8122,9 +6957,9 @@ const deployFirestore = async (cwd) => {
8122
6957
  stdio: "inherit",
8123
6958
  shell: true
8124
6959
  });
8125
- } catch (e$1) {
8126
- if (e$1 instanceof ExecaError) f.error(e$1.stderr || e$1.stdout || e$1.message);
8127
- else if (e$1 instanceof Error) f.error(e$1.message);
6960
+ } catch (e) {
6961
+ if (e instanceof ExecaError) __hot_updater_cli_tools.p.log.error(e.stderr || e.stdout || e.message);
6962
+ else if (e instanceof Error) __hot_updater_cli_tools.p.log.error(e.message);
8128
6963
  process.exit(1);
8129
6964
  }
8130
6965
  };
@@ -8140,9 +6975,9 @@ const deployFunctions = async (cwd) => {
8140
6975
  stdio: "inherit",
8141
6976
  shell: true
8142
6977
  });
8143
- } catch (e$1) {
8144
- if (e$1 instanceof ExecaError) f.error(e$1.stderr || e$1.stdout || e$1.message);
8145
- else if (e$1 instanceof Error) f.error(e$1.message);
6978
+ } catch (e) {
6979
+ if (e instanceof ExecaError) __hot_updater_cli_tools.p.log.error(e.stderr || e.stdout || e.message);
6980
+ else if (e instanceof Error) __hot_updater_cli_tools.p.log.error(e.message);
8146
6981
  process.exit(1);
8147
6982
  }
8148
6983
  };
@@ -8160,10 +6995,10 @@ const printTemplate = async (projectId, region) => {
8160
6995
  ], { shell: true });
8161
6996
  const parsedData = JSON.parse(stdout);
8162
6997
  const functionUrl = `${parsedData?.serviceConfig?.uri ?? parsedData.url}/api/check-update`;
8163
- Me((0, __hot_updater_plugin_core.transformTemplate)(SOURCE_TEMPLATE, { source: functionUrl }));
6998
+ __hot_updater_cli_tools.p.note((0, __hot_updater_cli_tools.transformTemplate)(SOURCE_TEMPLATE, { source: functionUrl }));
8164
6999
  } catch (error) {
8165
- if (error instanceof ExecaError) f.error(error.stderr || error.stdout || error.message);
8166
- else if (error instanceof Error) f.error(error.message);
7000
+ if (error instanceof ExecaError) __hot_updater_cli_tools.p.log.error(error.stderr || error.stdout || error.message);
7001
+ else if (error instanceof Error) __hot_updater_cli_tools.p.log.error(error.message);
8167
7002
  process.exit(1);
8168
7003
  }
8169
7004
  };
@@ -8177,12 +7012,12 @@ const checkIfGcloudCliInstalled = async () => {
8177
7012
  };
8178
7013
  const runInit = async ({ build }) => {
8179
7014
  if (!await checkIfGcloudCliInstalled()) {
8180
- f.error("gcloud CLI is not installed");
8181
- f.step("Please go to the following link to install the gcloud CLI");
8182
- f.step((0, __hot_updater_plugin_core.link)("https://cloud.google.com/sdk/docs/install"));
7015
+ __hot_updater_cli_tools.p.log.error("gcloud CLI is not installed");
7016
+ __hot_updater_cli_tools.p.log.step("Please go to the following link to install the gcloud CLI");
7017
+ __hot_updater_cli_tools.p.log.step((0, __hot_updater_cli_tools.link)("https://cloud.google.com/sdk/docs/install"));
8183
7018
  process.exit(1);
8184
7019
  }
8185
- const { tmpDir, removeTmpDir } = await (0, __hot_updater_plugin_core.copyDirToTmp)(path.default.dirname(path.default.dirname(require.resolve("@hot-updater/firebase/functions"))));
7020
+ const { tmpDir, removeTmpDir } = await (0, __hot_updater_cli_tools.copyDirToTmp)(path.default.dirname(path.default.dirname(require.resolve("@hot-updater/firebase/functions"))));
8186
7021
  const functionsDir = path.default.join(tmpDir, "functions");
8187
7022
  const functionsIndexPath = path.default.join(functionsDir, "index.cjs");
8188
7023
  await fs.default.promises.rename(path.default.join(functionsDir, "_package.json"), path.default.join(functionsDir, "package.json"));
@@ -8193,7 +7028,7 @@ const runInit = async ({ build }) => {
8193
7028
  storageBucket: initializeVariable.storageBucket,
8194
7029
  build
8195
7030
  });
8196
- await Te([{
7031
+ await __hot_updater_cli_tools.p.tasks([{
8197
7032
  title: "Installing dependencies...",
8198
7033
  task: async () => {
8199
7034
  try {
@@ -8203,8 +7038,8 @@ const runInit = async ({ build }) => {
8203
7038
  });
8204
7039
  return "Installed dependencies";
8205
7040
  } catch (error) {
8206
- if (error instanceof ExecaError) f.error(error.stderr || error.stdout || error.message);
8207
- else if (error instanceof Error) f.error(error.message);
7041
+ if (error instanceof ExecaError) __hot_updater_cli_tools.p.log.error(error.stderr || error.stdout || error.message);
7042
+ else if (error instanceof Error) __hot_updater_cli_tools.p.log.error(error.message);
8208
7043
  process.exit(1);
8209
7044
  }
8210
7045
  }
@@ -8228,30 +7063,30 @@ const runInit = async ({ build }) => {
8228
7063
  }
8229
7064
  } catch {}
8230
7065
  if (!isFunctionsExist) {
8231
- const selectedRegion = await ve({
7066
+ const selectedRegion = await __hot_updater_cli_tools.p.select({
8232
7067
  message: "Select Region",
8233
7068
  options: REGIONS,
8234
7069
  initialValue: REGIONS[0].value
8235
7070
  });
8236
- if (BD(selectedRegion)) {
8237
- xe("Operation cancelled.");
7071
+ if (__hot_updater_cli_tools.p.isCancel(selectedRegion)) {
7072
+ __hot_updater_cli_tools.p.cancel("Operation cancelled.");
8238
7073
  process.exit(1);
8239
7074
  }
8240
7075
  currentRegion = selectedRegion;
8241
7076
  }
8242
7077
  if (!currentRegion) {
8243
- f.error("Region is not set");
7078
+ __hot_updater_cli_tools.p.log.error("Region is not set");
8244
7079
  await removeTmpDir();
8245
7080
  process.exit(1);
8246
7081
  }
8247
- const code = (0, __hot_updater_plugin_core.transformEnv)(functionsIndexPath, { REGION: currentRegion });
7082
+ const code = (0, __hot_updater_cli_tools.transformEnv)(functionsIndexPath, { REGION: currentRegion });
8248
7083
  await fs.default.promises.writeFile(functionsIndexPath, code);
8249
7084
  return `Using ${isFunctionsExist ? "existing" : "new"} functions in region: ${currentRegion}`;
8250
7085
  }
8251
7086
  }]);
8252
7087
  await deployFirestore(tmpDir);
8253
7088
  await deployFunctions(tmpDir);
8254
- await Te([{
7089
+ await __hot_updater_cli_tools.p.tasks([{
8255
7090
  title: "Check IAM policy",
8256
7091
  async task(message) {
8257
7092
  const functionsList = await execa("npx", [
@@ -8264,7 +7099,7 @@ const runInit = async ({ build }) => {
8264
7099
  });
8265
7100
  const account = (JSON.parse(functionsList.stdout).result || []).find((fn) => fn.id === "hot-updater")?.serviceAccount;
8266
7101
  if (!account) {
8267
- f.error("hot-updater function not found");
7102
+ __hot_updater_cli_tools.p.log.error("hot-updater function not found");
8268
7103
  await removeTmpDir();
8269
7104
  process.exit(1);
8270
7105
  }
@@ -8286,10 +7121,10 @@ const runInit = async ({ build }) => {
8286
7121
  stdio: "inherit",
8287
7122
  shell: true
8288
7123
  });
8289
- f.success("IAM Service Account Token Creator role has been added to the service account");
7124
+ __hot_updater_cli_tools.p.log.success("IAM Service Account Token Creator role has been added to the service account");
8290
7125
  } catch {
8291
- f.error("Please go to the following link to add the IAM Service Account Token Creator role to the service account");
8292
- f.step((0, __hot_updater_plugin_core.link)(`https://console.cloud.google.com/iam-admin/iam/project/${initializeVariable.projectId}/serviceaccounts/${account}/edit?inv=1`));
7126
+ __hot_updater_cli_tools.p.log.error("Please go to the following link to add the IAM Service Account Token Creator role to the service account");
7127
+ __hot_updater_cli_tools.p.log.step((0, __hot_updater_cli_tools.link)(`https://console.cloud.google.com/iam-admin/iam/project/${initializeVariable.projectId}/serviceaccounts/${account}/edit?inv=1`));
8293
7128
  await removeTmpDir();
8294
7129
  process.exit(1);
8295
7130
  }
@@ -8297,15 +7132,15 @@ const runInit = async ({ build }) => {
8297
7132
  }
8298
7133
  }]);
8299
7134
  if (!currentRegion) {
8300
- f.error("Region is not set");
7135
+ __hot_updater_cli_tools.p.log.error("Region is not set");
8301
7136
  await removeTmpDir();
8302
7137
  process.exit(1);
8303
7138
  }
8304
7139
  await printTemplate(initializeVariable.projectId, currentRegion);
8305
7140
  await removeTmpDir();
8306
- f.message(`Next step: ${(0, __hot_updater_plugin_core.link)("https://hot-updater.dev/guide/providers/4_firebase.html#step-3-generated-configurations")}`);
8307
- f.message("Next step: Change GOOGLE_APPLICATION_CREDENTIALS=your-credentials.json in .env file");
8308
- f.success("Done! 🎉");
7141
+ __hot_updater_cli_tools.p.log.message(`Next step: ${(0, __hot_updater_cli_tools.link)("https://hot-updater.dev/docs/managed/firebase#step-3-generated-configurations")}`);
7142
+ __hot_updater_cli_tools.p.log.message("Next step: Change GOOGLE_APPLICATION_CREDENTIALS=your-credentials.json in .env file");
7143
+ __hot_updater_cli_tools.p.log.success("Done! 🎉");
8309
7144
  };
8310
7145
 
8311
7146
  //#endregion