wxt 0.17.12 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-C4ZVXF53.js → chunk-A7YRDAFI.js} +244 -167
- package/dist/chunk-NAMV4VWQ.js +1065 -0
- package/dist/chunk-ZZCTFNQ5.js +1063 -0
- package/dist/cli.js +355 -251
- package/dist/client.d.ts +1 -1
- package/dist/{execa-Y2EWTC4S.js → execa-6HO2IY2B.js} +62 -62
- package/dist/{execa-4F7CCWCA.js → execa-VDW6HLFV.js} +62 -62
- package/dist/{index-mYGv2dqk.d.ts → index-CiL7hzu6.d.ts} +17 -5
- package/dist/{index-NHTTcok1.d.ts → index-DKN-8I90.d.cts} +40 -5
- package/dist/{index-NHTTcok1.d.cts → index-DKN-8I90.d.ts} +40 -5
- package/dist/index.cjs +2395 -418
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +22 -16
- package/dist/prompt-TFJ7OLL7.js +781 -0
- package/dist/prompt-Y7B5HSD5.js +782 -0
- package/dist/sandbox.d.ts +1 -1
- package/dist/testing.cjs +1951 -57
- package/dist/testing.d.cts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +2 -1
- package/dist/virtual/content-script-isolated-world-entrypoint.js +7 -2
- package/dist/virtual/content-script-main-world-entrypoint.js +7 -2
- package/dist/virtual/unlisted-script-entrypoint.js +7 -2
- package/package.json +7 -41
package/dist/testing.cjs
CHANGED
|
@@ -5,6 +5,9 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __esm = (fn, res) => function __init() {
|
|
9
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
10
|
+
};
|
|
8
11
|
var __export = (target, all) => {
|
|
9
12
|
for (var name in all)
|
|
10
13
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -27,6 +30,1877 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
30
|
));
|
|
28
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
32
|
|
|
33
|
+
// ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/core.mjs
|
|
34
|
+
function isObject(value) {
|
|
35
|
+
return value !== null && typeof value === "object";
|
|
36
|
+
}
|
|
37
|
+
function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
38
|
+
if (!isObject(defaults)) {
|
|
39
|
+
return _defu(baseObject, {}, namespace, merger);
|
|
40
|
+
}
|
|
41
|
+
const object = Object.assign({}, defaults);
|
|
42
|
+
for (const key in baseObject) {
|
|
43
|
+
if (key === "__proto__" || key === "constructor") {
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
const value = baseObject[key];
|
|
47
|
+
if (value === null || value === void 0) {
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
if (merger && merger(object, key, value, namespace)) {
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
if (Array.isArray(value) && Array.isArray(object[key])) {
|
|
54
|
+
object[key] = [...value, ...object[key]];
|
|
55
|
+
} else if (isObject(value) && isObject(object[key])) {
|
|
56
|
+
object[key] = _defu(
|
|
57
|
+
value,
|
|
58
|
+
object[key],
|
|
59
|
+
(namespace ? `${namespace}.` : "") + key.toString(),
|
|
60
|
+
merger
|
|
61
|
+
);
|
|
62
|
+
} else {
|
|
63
|
+
object[key] = value;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return object;
|
|
67
|
+
}
|
|
68
|
+
function createDefu(merger) {
|
|
69
|
+
return (...arguments_) => (
|
|
70
|
+
// eslint-disable-next-line unicorn/no-array-reduce
|
|
71
|
+
arguments_.reduce((p2, c2) => _defu(p2, c2, "", merger), {})
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
function isPlainObject(obj) {
|
|
75
|
+
return Object.prototype.toString.call(obj) === "[object Object]";
|
|
76
|
+
}
|
|
77
|
+
function isLogObj(arg) {
|
|
78
|
+
if (!isPlainObject(arg)) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
if (!arg.message && !arg.args) {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
if (arg.stack) {
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
function _normalizeLogLevel(input, types = {}, defaultLevel = 3) {
|
|
90
|
+
if (input === void 0) {
|
|
91
|
+
return defaultLevel;
|
|
92
|
+
}
|
|
93
|
+
if (typeof input === "number") {
|
|
94
|
+
return input;
|
|
95
|
+
}
|
|
96
|
+
if (types[input] && types[input].level !== void 0) {
|
|
97
|
+
return types[input].level;
|
|
98
|
+
}
|
|
99
|
+
return defaultLevel;
|
|
100
|
+
}
|
|
101
|
+
function createConsola(options = {}) {
|
|
102
|
+
return new Consola(options);
|
|
103
|
+
}
|
|
104
|
+
var LogLevels, LogTypes, defu, paused, queue, Consola;
|
|
105
|
+
var init_core = __esm({
|
|
106
|
+
"../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/core.mjs"() {
|
|
107
|
+
"use strict";
|
|
108
|
+
LogLevels = {
|
|
109
|
+
silent: Number.NEGATIVE_INFINITY,
|
|
110
|
+
fatal: 0,
|
|
111
|
+
error: 0,
|
|
112
|
+
warn: 1,
|
|
113
|
+
log: 2,
|
|
114
|
+
info: 3,
|
|
115
|
+
success: 3,
|
|
116
|
+
fail: 3,
|
|
117
|
+
ready: 3,
|
|
118
|
+
start: 3,
|
|
119
|
+
box: 3,
|
|
120
|
+
debug: 4,
|
|
121
|
+
trace: 5,
|
|
122
|
+
verbose: Number.POSITIVE_INFINITY
|
|
123
|
+
};
|
|
124
|
+
LogTypes = {
|
|
125
|
+
// Silent
|
|
126
|
+
silent: {
|
|
127
|
+
level: -1
|
|
128
|
+
},
|
|
129
|
+
// Level 0
|
|
130
|
+
fatal: {
|
|
131
|
+
level: LogLevels.fatal
|
|
132
|
+
},
|
|
133
|
+
error: {
|
|
134
|
+
level: LogLevels.error
|
|
135
|
+
},
|
|
136
|
+
// Level 1
|
|
137
|
+
warn: {
|
|
138
|
+
level: LogLevels.warn
|
|
139
|
+
},
|
|
140
|
+
// Level 2
|
|
141
|
+
log: {
|
|
142
|
+
level: LogLevels.log
|
|
143
|
+
},
|
|
144
|
+
// Level 3
|
|
145
|
+
info: {
|
|
146
|
+
level: LogLevels.info
|
|
147
|
+
},
|
|
148
|
+
success: {
|
|
149
|
+
level: LogLevels.success
|
|
150
|
+
},
|
|
151
|
+
fail: {
|
|
152
|
+
level: LogLevels.fail
|
|
153
|
+
},
|
|
154
|
+
ready: {
|
|
155
|
+
level: LogLevels.info
|
|
156
|
+
},
|
|
157
|
+
start: {
|
|
158
|
+
level: LogLevels.info
|
|
159
|
+
},
|
|
160
|
+
box: {
|
|
161
|
+
level: LogLevels.info
|
|
162
|
+
},
|
|
163
|
+
// Level 4
|
|
164
|
+
debug: {
|
|
165
|
+
level: LogLevels.debug
|
|
166
|
+
},
|
|
167
|
+
// Level 5
|
|
168
|
+
trace: {
|
|
169
|
+
level: LogLevels.trace
|
|
170
|
+
},
|
|
171
|
+
// Verbose
|
|
172
|
+
verbose: {
|
|
173
|
+
level: LogLevels.verbose
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
defu = createDefu();
|
|
177
|
+
paused = false;
|
|
178
|
+
queue = [];
|
|
179
|
+
Consola = class _Consola {
|
|
180
|
+
constructor(options = {}) {
|
|
181
|
+
const types = options.types || LogTypes;
|
|
182
|
+
this.options = defu(
|
|
183
|
+
{
|
|
184
|
+
...options,
|
|
185
|
+
defaults: { ...options.defaults },
|
|
186
|
+
level: _normalizeLogLevel(options.level, types),
|
|
187
|
+
reporters: [...options.reporters || []]
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
types: LogTypes,
|
|
191
|
+
throttle: 1e3,
|
|
192
|
+
throttleMin: 5,
|
|
193
|
+
formatOptions: {
|
|
194
|
+
date: true,
|
|
195
|
+
colors: false,
|
|
196
|
+
compact: true
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
);
|
|
200
|
+
for (const type in types) {
|
|
201
|
+
const defaults = {
|
|
202
|
+
type,
|
|
203
|
+
...this.options.defaults,
|
|
204
|
+
...types[type]
|
|
205
|
+
};
|
|
206
|
+
this[type] = this._wrapLogFn(defaults);
|
|
207
|
+
this[type].raw = this._wrapLogFn(
|
|
208
|
+
defaults,
|
|
209
|
+
true
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
if (this.options.mockFn) {
|
|
213
|
+
this.mockTypes();
|
|
214
|
+
}
|
|
215
|
+
this._lastLog = {};
|
|
216
|
+
}
|
|
217
|
+
get level() {
|
|
218
|
+
return this.options.level;
|
|
219
|
+
}
|
|
220
|
+
set level(level) {
|
|
221
|
+
this.options.level = _normalizeLogLevel(
|
|
222
|
+
level,
|
|
223
|
+
this.options.types,
|
|
224
|
+
this.options.level
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
prompt(message, opts) {
|
|
228
|
+
if (!this.options.prompt) {
|
|
229
|
+
throw new Error("prompt is not supported!");
|
|
230
|
+
}
|
|
231
|
+
return this.options.prompt(message, opts);
|
|
232
|
+
}
|
|
233
|
+
create(options) {
|
|
234
|
+
const instance = new _Consola({
|
|
235
|
+
...this.options,
|
|
236
|
+
...options
|
|
237
|
+
});
|
|
238
|
+
if (this._mockFn) {
|
|
239
|
+
instance.mockTypes(this._mockFn);
|
|
240
|
+
}
|
|
241
|
+
return instance;
|
|
242
|
+
}
|
|
243
|
+
withDefaults(defaults) {
|
|
244
|
+
return this.create({
|
|
245
|
+
...this.options,
|
|
246
|
+
defaults: {
|
|
247
|
+
...this.options.defaults,
|
|
248
|
+
...defaults
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
withTag(tag) {
|
|
253
|
+
return this.withDefaults({
|
|
254
|
+
tag: this.options.defaults.tag ? this.options.defaults.tag + ":" + tag : tag
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
addReporter(reporter) {
|
|
258
|
+
this.options.reporters.push(reporter);
|
|
259
|
+
return this;
|
|
260
|
+
}
|
|
261
|
+
removeReporter(reporter) {
|
|
262
|
+
if (reporter) {
|
|
263
|
+
const i = this.options.reporters.indexOf(reporter);
|
|
264
|
+
if (i >= 0) {
|
|
265
|
+
return this.options.reporters.splice(i, 1);
|
|
266
|
+
}
|
|
267
|
+
} else {
|
|
268
|
+
this.options.reporters.splice(0);
|
|
269
|
+
}
|
|
270
|
+
return this;
|
|
271
|
+
}
|
|
272
|
+
setReporters(reporters) {
|
|
273
|
+
this.options.reporters = Array.isArray(reporters) ? reporters : [reporters];
|
|
274
|
+
return this;
|
|
275
|
+
}
|
|
276
|
+
wrapAll() {
|
|
277
|
+
this.wrapConsole();
|
|
278
|
+
this.wrapStd();
|
|
279
|
+
}
|
|
280
|
+
restoreAll() {
|
|
281
|
+
this.restoreConsole();
|
|
282
|
+
this.restoreStd();
|
|
283
|
+
}
|
|
284
|
+
wrapConsole() {
|
|
285
|
+
for (const type in this.options.types) {
|
|
286
|
+
if (!console["__" + type]) {
|
|
287
|
+
console["__" + type] = console[type];
|
|
288
|
+
}
|
|
289
|
+
console[type] = this[type].raw;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
restoreConsole() {
|
|
293
|
+
for (const type in this.options.types) {
|
|
294
|
+
if (console["__" + type]) {
|
|
295
|
+
console[type] = console["__" + type];
|
|
296
|
+
delete console["__" + type];
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
wrapStd() {
|
|
301
|
+
this._wrapStream(this.options.stdout, "log");
|
|
302
|
+
this._wrapStream(this.options.stderr, "log");
|
|
303
|
+
}
|
|
304
|
+
_wrapStream(stream, type) {
|
|
305
|
+
if (!stream) {
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
if (!stream.__write) {
|
|
309
|
+
stream.__write = stream.write;
|
|
310
|
+
}
|
|
311
|
+
stream.write = (data) => {
|
|
312
|
+
this[type].raw(String(data).trim());
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
restoreStd() {
|
|
316
|
+
this._restoreStream(this.options.stdout);
|
|
317
|
+
this._restoreStream(this.options.stderr);
|
|
318
|
+
}
|
|
319
|
+
_restoreStream(stream) {
|
|
320
|
+
if (!stream) {
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
if (stream.__write) {
|
|
324
|
+
stream.write = stream.__write;
|
|
325
|
+
delete stream.__write;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
pauseLogs() {
|
|
329
|
+
paused = true;
|
|
330
|
+
}
|
|
331
|
+
resumeLogs() {
|
|
332
|
+
paused = false;
|
|
333
|
+
const _queue = queue.splice(0);
|
|
334
|
+
for (const item of _queue) {
|
|
335
|
+
item[0]._logFn(item[1], item[2]);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
mockTypes(mockFn) {
|
|
339
|
+
const _mockFn = mockFn || this.options.mockFn;
|
|
340
|
+
this._mockFn = _mockFn;
|
|
341
|
+
if (typeof _mockFn !== "function") {
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
for (const type in this.options.types) {
|
|
345
|
+
this[type] = _mockFn(type, this.options.types[type]) || this[type];
|
|
346
|
+
this[type].raw = this[type];
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
_wrapLogFn(defaults, isRaw) {
|
|
350
|
+
return (...args) => {
|
|
351
|
+
if (paused) {
|
|
352
|
+
queue.push([this, defaults, args, isRaw]);
|
|
353
|
+
return;
|
|
354
|
+
}
|
|
355
|
+
return this._logFn(defaults, args, isRaw);
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
_logFn(defaults, args, isRaw) {
|
|
359
|
+
if ((defaults.level || 0) > this.level) {
|
|
360
|
+
return false;
|
|
361
|
+
}
|
|
362
|
+
const logObj = {
|
|
363
|
+
date: /* @__PURE__ */ new Date(),
|
|
364
|
+
args: [],
|
|
365
|
+
...defaults,
|
|
366
|
+
level: _normalizeLogLevel(defaults.level, this.options.types)
|
|
367
|
+
};
|
|
368
|
+
if (!isRaw && args.length === 1 && isLogObj(args[0])) {
|
|
369
|
+
Object.assign(logObj, args[0]);
|
|
370
|
+
} else {
|
|
371
|
+
logObj.args = [...args];
|
|
372
|
+
}
|
|
373
|
+
if (logObj.message) {
|
|
374
|
+
logObj.args.unshift(logObj.message);
|
|
375
|
+
delete logObj.message;
|
|
376
|
+
}
|
|
377
|
+
if (logObj.additional) {
|
|
378
|
+
if (!Array.isArray(logObj.additional)) {
|
|
379
|
+
logObj.additional = logObj.additional.split("\n");
|
|
380
|
+
}
|
|
381
|
+
logObj.args.push("\n" + logObj.additional.join("\n"));
|
|
382
|
+
delete logObj.additional;
|
|
383
|
+
}
|
|
384
|
+
logObj.type = typeof logObj.type === "string" ? logObj.type.toLowerCase() : "log";
|
|
385
|
+
logObj.tag = typeof logObj.tag === "string" ? logObj.tag : "";
|
|
386
|
+
const resolveLog = (newLog = false) => {
|
|
387
|
+
const repeated = (this._lastLog.count || 0) - this.options.throttleMin;
|
|
388
|
+
if (this._lastLog.object && repeated > 0) {
|
|
389
|
+
const args2 = [...this._lastLog.object.args];
|
|
390
|
+
if (repeated > 1) {
|
|
391
|
+
args2.push(`(repeated ${repeated} times)`);
|
|
392
|
+
}
|
|
393
|
+
this._log({ ...this._lastLog.object, args: args2 });
|
|
394
|
+
this._lastLog.count = 1;
|
|
395
|
+
}
|
|
396
|
+
if (newLog) {
|
|
397
|
+
this._lastLog.object = logObj;
|
|
398
|
+
this._log(logObj);
|
|
399
|
+
}
|
|
400
|
+
};
|
|
401
|
+
clearTimeout(this._lastLog.timeout);
|
|
402
|
+
const diffTime = this._lastLog.time && logObj.date ? logObj.date.getTime() - this._lastLog.time.getTime() : 0;
|
|
403
|
+
this._lastLog.time = logObj.date;
|
|
404
|
+
if (diffTime < this.options.throttle) {
|
|
405
|
+
try {
|
|
406
|
+
const serializedLog = JSON.stringify([
|
|
407
|
+
logObj.type,
|
|
408
|
+
logObj.tag,
|
|
409
|
+
logObj.args
|
|
410
|
+
]);
|
|
411
|
+
const isSameLog = this._lastLog.serialized === serializedLog;
|
|
412
|
+
this._lastLog.serialized = serializedLog;
|
|
413
|
+
if (isSameLog) {
|
|
414
|
+
this._lastLog.count = (this._lastLog.count || 0) + 1;
|
|
415
|
+
if (this._lastLog.count > this.options.throttleMin) {
|
|
416
|
+
this._lastLog.timeout = setTimeout(
|
|
417
|
+
resolveLog,
|
|
418
|
+
this.options.throttle
|
|
419
|
+
);
|
|
420
|
+
return;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
} catch {
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
resolveLog(true);
|
|
427
|
+
}
|
|
428
|
+
_log(logObj) {
|
|
429
|
+
for (const reporter of this.options.reporters) {
|
|
430
|
+
reporter.log(logObj, {
|
|
431
|
+
options: this.options
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
};
|
|
436
|
+
Consola.prototype.add = Consola.prototype.addReporter;
|
|
437
|
+
Consola.prototype.remove = Consola.prototype.removeReporter;
|
|
438
|
+
Consola.prototype.clear = Consola.prototype.removeReporter;
|
|
439
|
+
Consola.prototype.withScope = Consola.prototype.withTag;
|
|
440
|
+
Consola.prototype.mock = Consola.prototype.mockTypes;
|
|
441
|
+
Consola.prototype.pause = Consola.prototype.pauseLogs;
|
|
442
|
+
Consola.prototype.resume = Consola.prototype.resumeLogs;
|
|
443
|
+
}
|
|
444
|
+
});
|
|
445
|
+
|
|
446
|
+
// ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/shared/consola.06ad8a64.mjs
|
|
447
|
+
function parseStack(stack) {
|
|
448
|
+
const cwd = process.cwd() + import_node_path11.sep;
|
|
449
|
+
const lines = stack.split("\n").splice(1).map((l2) => l2.trim().replace("file://", "").replace(cwd, ""));
|
|
450
|
+
return lines;
|
|
451
|
+
}
|
|
452
|
+
function writeStream(data, stream) {
|
|
453
|
+
const write = stream.__write || stream.write;
|
|
454
|
+
return write.call(stream, data);
|
|
455
|
+
}
|
|
456
|
+
var import_node_util, import_node_path11, bracket, BasicReporter;
|
|
457
|
+
var init_consola_06ad8a64 = __esm({
|
|
458
|
+
"../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/shared/consola.06ad8a64.mjs"() {
|
|
459
|
+
"use strict";
|
|
460
|
+
import_node_util = require("util");
|
|
461
|
+
import_node_path11 = require("path");
|
|
462
|
+
bracket = (x) => x ? `[${x}]` : "";
|
|
463
|
+
BasicReporter = class {
|
|
464
|
+
formatStack(stack, opts) {
|
|
465
|
+
return " " + parseStack(stack).join("\n ");
|
|
466
|
+
}
|
|
467
|
+
formatArgs(args, opts) {
|
|
468
|
+
const _args = args.map((arg) => {
|
|
469
|
+
if (arg && typeof arg.stack === "string") {
|
|
470
|
+
return arg.message + "\n" + this.formatStack(arg.stack, opts);
|
|
471
|
+
}
|
|
472
|
+
return arg;
|
|
473
|
+
});
|
|
474
|
+
return (0, import_node_util.formatWithOptions)(opts, ..._args);
|
|
475
|
+
}
|
|
476
|
+
formatDate(date, opts) {
|
|
477
|
+
return opts.date ? date.toLocaleTimeString() : "";
|
|
478
|
+
}
|
|
479
|
+
filterAndJoin(arr) {
|
|
480
|
+
return arr.filter(Boolean).join(" ");
|
|
481
|
+
}
|
|
482
|
+
formatLogObj(logObj, opts) {
|
|
483
|
+
const message = this.formatArgs(logObj.args, opts);
|
|
484
|
+
if (logObj.type === "box") {
|
|
485
|
+
return "\n" + [
|
|
486
|
+
bracket(logObj.tag),
|
|
487
|
+
logObj.title && logObj.title,
|
|
488
|
+
...message.split("\n")
|
|
489
|
+
].filter(Boolean).map((l2) => " > " + l2).join("\n") + "\n";
|
|
490
|
+
}
|
|
491
|
+
return this.filterAndJoin([
|
|
492
|
+
bracket(logObj.type),
|
|
493
|
+
bracket(logObj.tag),
|
|
494
|
+
message
|
|
495
|
+
]);
|
|
496
|
+
}
|
|
497
|
+
log(logObj, ctx) {
|
|
498
|
+
const line = this.formatLogObj(logObj, {
|
|
499
|
+
columns: ctx.options.stdout.columns || 0,
|
|
500
|
+
...ctx.options.formatOptions
|
|
501
|
+
});
|
|
502
|
+
return writeStream(
|
|
503
|
+
line + "\n",
|
|
504
|
+
logObj.level < 2 ? ctx.options.stderr || process.stderr : ctx.options.stdout || process.stdout
|
|
505
|
+
);
|
|
506
|
+
}
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
});
|
|
510
|
+
|
|
511
|
+
// ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/utils.mjs
|
|
512
|
+
function replaceClose(index, string, close, replace, head = string.slice(0, Math.max(0, index)) + replace, tail = string.slice(Math.max(0, index + close.length)), next = tail.indexOf(close)) {
|
|
513
|
+
return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
|
|
514
|
+
}
|
|
515
|
+
function clearBleed(index, string, open, close, replace) {
|
|
516
|
+
return index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
|
|
517
|
+
}
|
|
518
|
+
function filterEmpty(open, close, replace = open, at = open.length + 1) {
|
|
519
|
+
return (string) => string || !(string === "" || string === void 0) ? clearBleed(
|
|
520
|
+
("" + string).indexOf(close, at),
|
|
521
|
+
string,
|
|
522
|
+
open,
|
|
523
|
+
close,
|
|
524
|
+
replace
|
|
525
|
+
) : "";
|
|
526
|
+
}
|
|
527
|
+
function init(open, close, replace) {
|
|
528
|
+
return filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace);
|
|
529
|
+
}
|
|
530
|
+
function createColors(useColor = isColorSupported) {
|
|
531
|
+
return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
|
|
532
|
+
}
|
|
533
|
+
function getColor(color, fallback = "reset") {
|
|
534
|
+
return colors[color] || colors[fallback];
|
|
535
|
+
}
|
|
536
|
+
function stripAnsi(text2) {
|
|
537
|
+
return text2.replace(new RegExp(ansiRegex, "g"), "");
|
|
538
|
+
}
|
|
539
|
+
function box(text2, _opts = {}) {
|
|
540
|
+
const opts = {
|
|
541
|
+
..._opts,
|
|
542
|
+
style: {
|
|
543
|
+
...defaultStyle,
|
|
544
|
+
..._opts.style
|
|
545
|
+
}
|
|
546
|
+
};
|
|
547
|
+
const textLines = text2.split("\n");
|
|
548
|
+
const boxLines = [];
|
|
549
|
+
const _color = getColor(opts.style.borderColor);
|
|
550
|
+
const borderStyle = {
|
|
551
|
+
...typeof opts.style.borderStyle === "string" ? boxStylePresets[opts.style.borderStyle] || boxStylePresets.solid : opts.style.borderStyle
|
|
552
|
+
};
|
|
553
|
+
if (_color) {
|
|
554
|
+
for (const key in borderStyle) {
|
|
555
|
+
borderStyle[key] = _color(
|
|
556
|
+
borderStyle[key]
|
|
557
|
+
);
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;
|
|
561
|
+
const height = textLines.length + paddingOffset;
|
|
562
|
+
const width = Math.max(...textLines.map((line) => line.length)) + paddingOffset;
|
|
563
|
+
const widthOffset = width + paddingOffset;
|
|
564
|
+
const leftSpace = opts.style.marginLeft > 0 ? " ".repeat(opts.style.marginLeft) : "";
|
|
565
|
+
if (opts.style.marginTop > 0) {
|
|
566
|
+
boxLines.push("".repeat(opts.style.marginTop));
|
|
567
|
+
}
|
|
568
|
+
if (opts.title) {
|
|
569
|
+
const left = borderStyle.h.repeat(
|
|
570
|
+
Math.floor((width - stripAnsi(opts.title).length) / 2)
|
|
571
|
+
);
|
|
572
|
+
const right = borderStyle.h.repeat(
|
|
573
|
+
width - stripAnsi(opts.title).length - stripAnsi(left).length + paddingOffset
|
|
574
|
+
);
|
|
575
|
+
boxLines.push(
|
|
576
|
+
`${leftSpace}${borderStyle.tl}${left}${opts.title}${right}${borderStyle.tr}`
|
|
577
|
+
);
|
|
578
|
+
} else {
|
|
579
|
+
boxLines.push(
|
|
580
|
+
`${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`
|
|
581
|
+
);
|
|
582
|
+
}
|
|
583
|
+
const valignOffset = opts.style.valign === "center" ? Math.floor((height - textLines.length) / 2) : opts.style.valign === "top" ? height - textLines.length - paddingOffset : height - textLines.length;
|
|
584
|
+
for (let i = 0; i < height; i++) {
|
|
585
|
+
if (i < valignOffset || i >= valignOffset + textLines.length) {
|
|
586
|
+
boxLines.push(
|
|
587
|
+
`${leftSpace}${borderStyle.v}${" ".repeat(widthOffset)}${borderStyle.v}`
|
|
588
|
+
);
|
|
589
|
+
} else {
|
|
590
|
+
const line = textLines[i - valignOffset];
|
|
591
|
+
const left = " ".repeat(paddingOffset);
|
|
592
|
+
const right = " ".repeat(width - stripAnsi(line).length);
|
|
593
|
+
boxLines.push(
|
|
594
|
+
`${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`
|
|
595
|
+
);
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
boxLines.push(
|
|
599
|
+
`${leftSpace}${borderStyle.bl}${borderStyle.h.repeat(widthOffset)}${borderStyle.br}`
|
|
600
|
+
);
|
|
601
|
+
if (opts.style.marginBottom > 0) {
|
|
602
|
+
boxLines.push("".repeat(opts.style.marginBottom));
|
|
603
|
+
}
|
|
604
|
+
return boxLines.join("\n");
|
|
605
|
+
}
|
|
606
|
+
var tty, env, argv, platform, isDisabled, isForced, isWindows, isDumbTerminal, isCompatibleTerminal, isCI, isColorSupported, colorDefs, colors, ansiRegex, boxStylePresets, defaultStyle;
|
|
607
|
+
var init_utils = __esm({
|
|
608
|
+
"../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/utils.mjs"() {
|
|
609
|
+
"use strict";
|
|
610
|
+
tty = __toESM(require("tty"), 1);
|
|
611
|
+
({
|
|
612
|
+
env = {},
|
|
613
|
+
argv = [],
|
|
614
|
+
platform = ""
|
|
615
|
+
} = typeof process === "undefined" ? {} : process);
|
|
616
|
+
isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
|
|
617
|
+
isForced = "FORCE_COLOR" in env || argv.includes("--color");
|
|
618
|
+
isWindows = platform === "win32";
|
|
619
|
+
isDumbTerminal = env.TERM === "dumb";
|
|
620
|
+
isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;
|
|
621
|
+
isCI = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
|
|
622
|
+
isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);
|
|
623
|
+
colorDefs = {
|
|
624
|
+
reset: init(0, 0),
|
|
625
|
+
bold: init(1, 22, "\x1B[22m\x1B[1m"),
|
|
626
|
+
dim: init(2, 22, "\x1B[22m\x1B[2m"),
|
|
627
|
+
italic: init(3, 23),
|
|
628
|
+
underline: init(4, 24),
|
|
629
|
+
inverse: init(7, 27),
|
|
630
|
+
hidden: init(8, 28),
|
|
631
|
+
strikethrough: init(9, 29),
|
|
632
|
+
black: init(30, 39),
|
|
633
|
+
red: init(31, 39),
|
|
634
|
+
green: init(32, 39),
|
|
635
|
+
yellow: init(33, 39),
|
|
636
|
+
blue: init(34, 39),
|
|
637
|
+
magenta: init(35, 39),
|
|
638
|
+
cyan: init(36, 39),
|
|
639
|
+
white: init(37, 39),
|
|
640
|
+
gray: init(90, 39),
|
|
641
|
+
bgBlack: init(40, 49),
|
|
642
|
+
bgRed: init(41, 49),
|
|
643
|
+
bgGreen: init(42, 49),
|
|
644
|
+
bgYellow: init(43, 49),
|
|
645
|
+
bgBlue: init(44, 49),
|
|
646
|
+
bgMagenta: init(45, 49),
|
|
647
|
+
bgCyan: init(46, 49),
|
|
648
|
+
bgWhite: init(47, 49),
|
|
649
|
+
blackBright: init(90, 39),
|
|
650
|
+
redBright: init(91, 39),
|
|
651
|
+
greenBright: init(92, 39),
|
|
652
|
+
yellowBright: init(93, 39),
|
|
653
|
+
blueBright: init(94, 39),
|
|
654
|
+
magentaBright: init(95, 39),
|
|
655
|
+
cyanBright: init(96, 39),
|
|
656
|
+
whiteBright: init(97, 39),
|
|
657
|
+
bgBlackBright: init(100, 49),
|
|
658
|
+
bgRedBright: init(101, 49),
|
|
659
|
+
bgGreenBright: init(102, 49),
|
|
660
|
+
bgYellowBright: init(103, 49),
|
|
661
|
+
bgBlueBright: init(104, 49),
|
|
662
|
+
bgMagentaBright: init(105, 49),
|
|
663
|
+
bgCyanBright: init(106, 49),
|
|
664
|
+
bgWhiteBright: init(107, 49)
|
|
665
|
+
};
|
|
666
|
+
colors = createColors();
|
|
667
|
+
ansiRegex = [
|
|
668
|
+
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
669
|
+
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"
|
|
670
|
+
].join("|");
|
|
671
|
+
boxStylePresets = {
|
|
672
|
+
solid: {
|
|
673
|
+
tl: "\u250C",
|
|
674
|
+
tr: "\u2510",
|
|
675
|
+
bl: "\u2514",
|
|
676
|
+
br: "\u2518",
|
|
677
|
+
h: "\u2500",
|
|
678
|
+
v: "\u2502"
|
|
679
|
+
},
|
|
680
|
+
double: {
|
|
681
|
+
tl: "\u2554",
|
|
682
|
+
tr: "\u2557",
|
|
683
|
+
bl: "\u255A",
|
|
684
|
+
br: "\u255D",
|
|
685
|
+
h: "\u2550",
|
|
686
|
+
v: "\u2551"
|
|
687
|
+
},
|
|
688
|
+
doubleSingle: {
|
|
689
|
+
tl: "\u2553",
|
|
690
|
+
tr: "\u2556",
|
|
691
|
+
bl: "\u2559",
|
|
692
|
+
br: "\u255C",
|
|
693
|
+
h: "\u2500",
|
|
694
|
+
v: "\u2551"
|
|
695
|
+
},
|
|
696
|
+
doubleSingleRounded: {
|
|
697
|
+
tl: "\u256D",
|
|
698
|
+
tr: "\u256E",
|
|
699
|
+
bl: "\u2570",
|
|
700
|
+
br: "\u256F",
|
|
701
|
+
h: "\u2500",
|
|
702
|
+
v: "\u2551"
|
|
703
|
+
},
|
|
704
|
+
singleThick: {
|
|
705
|
+
tl: "\u250F",
|
|
706
|
+
tr: "\u2513",
|
|
707
|
+
bl: "\u2517",
|
|
708
|
+
br: "\u251B",
|
|
709
|
+
h: "\u2501",
|
|
710
|
+
v: "\u2503"
|
|
711
|
+
},
|
|
712
|
+
singleDouble: {
|
|
713
|
+
tl: "\u2552",
|
|
714
|
+
tr: "\u2555",
|
|
715
|
+
bl: "\u2558",
|
|
716
|
+
br: "\u255B",
|
|
717
|
+
h: "\u2550",
|
|
718
|
+
v: "\u2502"
|
|
719
|
+
},
|
|
720
|
+
singleDoubleRounded: {
|
|
721
|
+
tl: "\u256D",
|
|
722
|
+
tr: "\u256E",
|
|
723
|
+
bl: "\u2570",
|
|
724
|
+
br: "\u256F",
|
|
725
|
+
h: "\u2550",
|
|
726
|
+
v: "\u2502"
|
|
727
|
+
},
|
|
728
|
+
rounded: {
|
|
729
|
+
tl: "\u256D",
|
|
730
|
+
tr: "\u256E",
|
|
731
|
+
bl: "\u2570",
|
|
732
|
+
br: "\u256F",
|
|
733
|
+
h: "\u2500",
|
|
734
|
+
v: "\u2502"
|
|
735
|
+
}
|
|
736
|
+
};
|
|
737
|
+
defaultStyle = {
|
|
738
|
+
borderColor: "white",
|
|
739
|
+
borderStyle: "rounded",
|
|
740
|
+
valign: "center",
|
|
741
|
+
padding: 2,
|
|
742
|
+
marginLeft: 1,
|
|
743
|
+
marginTop: 1,
|
|
744
|
+
marginBottom: 1
|
|
745
|
+
};
|
|
746
|
+
}
|
|
747
|
+
});
|
|
748
|
+
|
|
749
|
+
// ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/chunks/prompt.mjs
|
|
750
|
+
var prompt_exports = {};
|
|
751
|
+
__export(prompt_exports, {
|
|
752
|
+
prompt: () => prompt
|
|
753
|
+
});
|
|
754
|
+
function z({ onlyFirst: t = false } = {}) {
|
|
755
|
+
const u = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");
|
|
756
|
+
return new RegExp(u, t ? void 0 : "g");
|
|
757
|
+
}
|
|
758
|
+
function $(t) {
|
|
759
|
+
if (typeof t != "string")
|
|
760
|
+
throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);
|
|
761
|
+
return t.replace(z(), "");
|
|
762
|
+
}
|
|
763
|
+
function c(t, u = {}) {
|
|
764
|
+
if (typeof t != "string" || t.length === 0 || (u = { ambiguousIsNarrow: true, ...u }, t = $(t), t.length === 0))
|
|
765
|
+
return 0;
|
|
766
|
+
t = t.replace(Y(), " ");
|
|
767
|
+
const F = u.ambiguousIsNarrow ? 1 : 2;
|
|
768
|
+
let e = 0;
|
|
769
|
+
for (const s3 of t) {
|
|
770
|
+
const C = s3.codePointAt(0);
|
|
771
|
+
if (C <= 31 || C >= 127 && C <= 159 || C >= 768 && C <= 879)
|
|
772
|
+
continue;
|
|
773
|
+
switch (K.eastAsianWidth(s3)) {
|
|
774
|
+
case "F":
|
|
775
|
+
case "W":
|
|
776
|
+
e += 2;
|
|
777
|
+
break;
|
|
778
|
+
case "A":
|
|
779
|
+
e += F;
|
|
780
|
+
break;
|
|
781
|
+
default:
|
|
782
|
+
e += 1;
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
return e;
|
|
786
|
+
}
|
|
787
|
+
function U() {
|
|
788
|
+
const t = /* @__PURE__ */ new Map();
|
|
789
|
+
for (const [u, F] of Object.entries(r)) {
|
|
790
|
+
for (const [e, s3] of Object.entries(F))
|
|
791
|
+
r[e] = { open: `\x1B[${s3[0]}m`, close: `\x1B[${s3[1]}m` }, F[e] = r[e], t.set(s3[0], s3[1]);
|
|
792
|
+
Object.defineProperty(r, u, { value: F, enumerable: false });
|
|
793
|
+
}
|
|
794
|
+
return Object.defineProperty(r, "codes", { value: t, enumerable: false }), r.color.close = "\x1B[39m", r.bgColor.close = "\x1B[49m", r.color.ansi = L(), r.color.ansi256 = M(), r.color.ansi16m = T(), r.bgColor.ansi = L(v), r.bgColor.ansi256 = M(v), r.bgColor.ansi16m = T(v), Object.defineProperties(r, { rgbToAnsi256: { value: (u, F, e) => u === F && F === e ? u < 8 ? 16 : u > 248 ? 231 : Math.round((u - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u / 255 * 5) + 6 * Math.round(F / 255 * 5) + Math.round(e / 255 * 5), enumerable: false }, hexToRgb: { value: (u) => {
|
|
795
|
+
const F = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));
|
|
796
|
+
if (!F)
|
|
797
|
+
return [0, 0, 0];
|
|
798
|
+
let [e] = F;
|
|
799
|
+
e.length === 3 && (e = [...e].map((C) => C + C).join(""));
|
|
800
|
+
const s3 = Number.parseInt(e, 16);
|
|
801
|
+
return [s3 >> 16 & 255, s3 >> 8 & 255, s3 & 255];
|
|
802
|
+
}, enumerable: false }, hexToAnsi256: { value: (u) => r.rgbToAnsi256(...r.hexToRgb(u)), enumerable: false }, ansi256ToAnsi: { value: (u) => {
|
|
803
|
+
if (u < 8)
|
|
804
|
+
return 30 + u;
|
|
805
|
+
if (u < 16)
|
|
806
|
+
return 90 + (u - 8);
|
|
807
|
+
let F, e, s3;
|
|
808
|
+
if (u >= 232)
|
|
809
|
+
F = ((u - 232) * 10 + 8) / 255, e = F, s3 = F;
|
|
810
|
+
else {
|
|
811
|
+
u -= 16;
|
|
812
|
+
const i = u % 36;
|
|
813
|
+
F = Math.floor(u / 36) / 5, e = Math.floor(i / 6) / 5, s3 = i % 6 / 5;
|
|
814
|
+
}
|
|
815
|
+
const C = Math.max(F, e, s3) * 2;
|
|
816
|
+
if (C === 0)
|
|
817
|
+
return 30;
|
|
818
|
+
let D = 30 + (Math.round(s3) << 2 | Math.round(e) << 1 | Math.round(F));
|
|
819
|
+
return C === 2 && (D += 60), D;
|
|
820
|
+
}, enumerable: false }, rgbToAnsi: { value: (u, F, e) => r.ansi256ToAnsi(r.rgbToAnsi256(u, F, e)), enumerable: false }, hexToAnsi: { value: (u) => r.ansi256ToAnsi(r.hexToAnsi256(u)), enumerable: false } }), r;
|
|
821
|
+
}
|
|
822
|
+
function P(t, u, F) {
|
|
823
|
+
return String(t).normalize().replace(/\r\n/g, `
|
|
824
|
+
`).split(`
|
|
825
|
+
`).map((e) => uD(e, u, F)).join(`
|
|
826
|
+
`);
|
|
827
|
+
}
|
|
828
|
+
function FD(t, u) {
|
|
829
|
+
if (t === u)
|
|
830
|
+
return;
|
|
831
|
+
const F = t.split(`
|
|
832
|
+
`), e = u.split(`
|
|
833
|
+
`), s3 = [];
|
|
834
|
+
for (let C = 0; C < Math.max(F.length, e.length); C++)
|
|
835
|
+
F[C] !== e[C] && s3.push(C);
|
|
836
|
+
return s3;
|
|
837
|
+
}
|
|
838
|
+
function g(t, u) {
|
|
839
|
+
t.isTTY && t.setRawMode(u);
|
|
840
|
+
}
|
|
841
|
+
async function prompt(message, opts = {}) {
|
|
842
|
+
if (!opts.type || opts.type === "text") {
|
|
843
|
+
return await text({
|
|
844
|
+
message,
|
|
845
|
+
defaultValue: opts.default,
|
|
846
|
+
placeholder: opts.placeholder,
|
|
847
|
+
initialValue: opts.initial
|
|
848
|
+
});
|
|
849
|
+
}
|
|
850
|
+
if (opts.type === "confirm") {
|
|
851
|
+
return await confirm({
|
|
852
|
+
message,
|
|
853
|
+
initialValue: opts.initial
|
|
854
|
+
});
|
|
855
|
+
}
|
|
856
|
+
if (opts.type === "select") {
|
|
857
|
+
return await select({
|
|
858
|
+
message,
|
|
859
|
+
options: opts.options.map(
|
|
860
|
+
(o) => typeof o === "string" ? { value: o, label: o } : o
|
|
861
|
+
)
|
|
862
|
+
});
|
|
863
|
+
}
|
|
864
|
+
if (opts.type === "multiselect") {
|
|
865
|
+
return await multiselect({
|
|
866
|
+
message,
|
|
867
|
+
options: opts.options.map(
|
|
868
|
+
(o) => typeof o === "string" ? { value: o, label: o } : o
|
|
869
|
+
),
|
|
870
|
+
required: opts.required
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
throw new Error(`Unknown prompt type: ${opts.type}`);
|
|
874
|
+
}
|
|
875
|
+
var import_node_process, import_node_readline, import_node_tty, import_tty, import_node_util2, import_node_path12, ESC, CSI, beep, cursor, scroll, erase, src, picocolors, tty2, isColorSupported2, formatter, replaceClose2, createColors2, picocolorsExports, l, m, G, K, Y, v, L, M, T, r, Z, H, q, p, J, b, W, Q, I, w, N, j, X, _, DD, uD, R, V, tD, h, sD, iD, ED, oD, unicode, s, S_STEP_ACTIVE, S_STEP_CANCEL, S_STEP_ERROR, S_STEP_SUBMIT, S_BAR, S_BAR_END, S_RADIO_ACTIVE, S_RADIO_INACTIVE, S_CHECKBOX_ACTIVE, S_CHECKBOX_SELECTED, S_CHECKBOX_INACTIVE, symbol, text, confirm, select, multiselect;
|
|
876
|
+
var init_prompt = __esm({
|
|
877
|
+
"../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/chunks/prompt.mjs"() {
|
|
878
|
+
"use strict";
|
|
879
|
+
import_node_process = require("process");
|
|
880
|
+
import_node_readline = __toESM(require("readline"), 1);
|
|
881
|
+
import_node_tty = require("tty");
|
|
882
|
+
init_consola_36c0034f();
|
|
883
|
+
import_tty = __toESM(require("tty"), 1);
|
|
884
|
+
init_utils();
|
|
885
|
+
init_core();
|
|
886
|
+
init_consola_06ad8a64();
|
|
887
|
+
import_node_util2 = require("util");
|
|
888
|
+
import_node_path12 = require("path");
|
|
889
|
+
ESC = "\x1B";
|
|
890
|
+
CSI = `${ESC}[`;
|
|
891
|
+
beep = "\x07";
|
|
892
|
+
cursor = {
|
|
893
|
+
to(x, y) {
|
|
894
|
+
if (!y)
|
|
895
|
+
return `${CSI}${x + 1}G`;
|
|
896
|
+
return `${CSI}${y + 1};${x + 1}H`;
|
|
897
|
+
},
|
|
898
|
+
move(x, y) {
|
|
899
|
+
let ret = "";
|
|
900
|
+
if (x < 0)
|
|
901
|
+
ret += `${CSI}${-x}D`;
|
|
902
|
+
else if (x > 0)
|
|
903
|
+
ret += `${CSI}${x}C`;
|
|
904
|
+
if (y < 0)
|
|
905
|
+
ret += `${CSI}${-y}A`;
|
|
906
|
+
else if (y > 0)
|
|
907
|
+
ret += `${CSI}${y}B`;
|
|
908
|
+
return ret;
|
|
909
|
+
},
|
|
910
|
+
up: (count = 1) => `${CSI}${count}A`,
|
|
911
|
+
down: (count = 1) => `${CSI}${count}B`,
|
|
912
|
+
forward: (count = 1) => `${CSI}${count}C`,
|
|
913
|
+
backward: (count = 1) => `${CSI}${count}D`,
|
|
914
|
+
nextLine: (count = 1) => `${CSI}E`.repeat(count),
|
|
915
|
+
prevLine: (count = 1) => `${CSI}F`.repeat(count),
|
|
916
|
+
left: `${CSI}G`,
|
|
917
|
+
hide: `${CSI}?25l`,
|
|
918
|
+
show: `${CSI}?25h`,
|
|
919
|
+
save: `${ESC}7`,
|
|
920
|
+
restore: `${ESC}8`
|
|
921
|
+
};
|
|
922
|
+
scroll = {
|
|
923
|
+
up: (count = 1) => `${CSI}S`.repeat(count),
|
|
924
|
+
down: (count = 1) => `${CSI}T`.repeat(count)
|
|
925
|
+
};
|
|
926
|
+
erase = {
|
|
927
|
+
screen: `${CSI}2J`,
|
|
928
|
+
up: (count = 1) => `${CSI}1J`.repeat(count),
|
|
929
|
+
down: (count = 1) => `${CSI}J`.repeat(count),
|
|
930
|
+
line: `${CSI}2K`,
|
|
931
|
+
lineEnd: `${CSI}K`,
|
|
932
|
+
lineStart: `${CSI}1K`,
|
|
933
|
+
lines(count) {
|
|
934
|
+
let clear = "";
|
|
935
|
+
for (let i = 0; i < count; i++)
|
|
936
|
+
clear += this.line + (i < count - 1 ? cursor.up() : "");
|
|
937
|
+
if (count)
|
|
938
|
+
clear += cursor.left;
|
|
939
|
+
return clear;
|
|
940
|
+
}
|
|
941
|
+
};
|
|
942
|
+
src = { cursor, scroll, erase, beep };
|
|
943
|
+
picocolors = { exports: {} };
|
|
944
|
+
tty2 = import_tty.default;
|
|
945
|
+
isColorSupported2 = !("NO_COLOR" in process.env || process.argv.includes("--no-color")) && ("FORCE_COLOR" in process.env || process.argv.includes("--color") || process.platform === "win32" || tty2.isatty(1) && process.env.TERM !== "dumb" || "CI" in process.env);
|
|
946
|
+
formatter = (open, close, replace = open) => (input) => {
|
|
947
|
+
let string = "" + input;
|
|
948
|
+
let index = string.indexOf(close, open.length);
|
|
949
|
+
return ~index ? open + replaceClose2(string, close, replace, index) + close : open + string + close;
|
|
950
|
+
};
|
|
951
|
+
replaceClose2 = (string, close, replace, index) => {
|
|
952
|
+
let start = string.substring(0, index) + replace;
|
|
953
|
+
let end = string.substring(index + close.length);
|
|
954
|
+
let nextIndex = end.indexOf(close);
|
|
955
|
+
return ~nextIndex ? start + replaceClose2(end, close, replace, nextIndex) : start + end;
|
|
956
|
+
};
|
|
957
|
+
createColors2 = (enabled = isColorSupported2) => ({
|
|
958
|
+
isColorSupported: enabled,
|
|
959
|
+
reset: enabled ? (s3) => `\x1B[0m${s3}\x1B[0m` : String,
|
|
960
|
+
bold: enabled ? formatter("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m") : String,
|
|
961
|
+
dim: enabled ? formatter("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m") : String,
|
|
962
|
+
italic: enabled ? formatter("\x1B[3m", "\x1B[23m") : String,
|
|
963
|
+
underline: enabled ? formatter("\x1B[4m", "\x1B[24m") : String,
|
|
964
|
+
inverse: enabled ? formatter("\x1B[7m", "\x1B[27m") : String,
|
|
965
|
+
hidden: enabled ? formatter("\x1B[8m", "\x1B[28m") : String,
|
|
966
|
+
strikethrough: enabled ? formatter("\x1B[9m", "\x1B[29m") : String,
|
|
967
|
+
black: enabled ? formatter("\x1B[30m", "\x1B[39m") : String,
|
|
968
|
+
red: enabled ? formatter("\x1B[31m", "\x1B[39m") : String,
|
|
969
|
+
green: enabled ? formatter("\x1B[32m", "\x1B[39m") : String,
|
|
970
|
+
yellow: enabled ? formatter("\x1B[33m", "\x1B[39m") : String,
|
|
971
|
+
blue: enabled ? formatter("\x1B[34m", "\x1B[39m") : String,
|
|
972
|
+
magenta: enabled ? formatter("\x1B[35m", "\x1B[39m") : String,
|
|
973
|
+
cyan: enabled ? formatter("\x1B[36m", "\x1B[39m") : String,
|
|
974
|
+
white: enabled ? formatter("\x1B[37m", "\x1B[39m") : String,
|
|
975
|
+
gray: enabled ? formatter("\x1B[90m", "\x1B[39m") : String,
|
|
976
|
+
bgBlack: enabled ? formatter("\x1B[40m", "\x1B[49m") : String,
|
|
977
|
+
bgRed: enabled ? formatter("\x1B[41m", "\x1B[49m") : String,
|
|
978
|
+
bgGreen: enabled ? formatter("\x1B[42m", "\x1B[49m") : String,
|
|
979
|
+
bgYellow: enabled ? formatter("\x1B[43m", "\x1B[49m") : String,
|
|
980
|
+
bgBlue: enabled ? formatter("\x1B[44m", "\x1B[49m") : String,
|
|
981
|
+
bgMagenta: enabled ? formatter("\x1B[45m", "\x1B[49m") : String,
|
|
982
|
+
bgCyan: enabled ? formatter("\x1B[46m", "\x1B[49m") : String,
|
|
983
|
+
bgWhite: enabled ? formatter("\x1B[47m", "\x1B[49m") : String
|
|
984
|
+
});
|
|
985
|
+
picocolors.exports = createColors2();
|
|
986
|
+
picocolors.exports.createColors = createColors2;
|
|
987
|
+
picocolorsExports = picocolors.exports;
|
|
988
|
+
l = /* @__PURE__ */ getDefaultExportFromCjs(picocolorsExports);
|
|
989
|
+
m = {};
|
|
990
|
+
G = { get exports() {
|
|
991
|
+
return m;
|
|
992
|
+
}, set exports(t) {
|
|
993
|
+
m = t;
|
|
994
|
+
} };
|
|
995
|
+
(function(t) {
|
|
996
|
+
var u = {};
|
|
997
|
+
t.exports = u, u.eastAsianWidth = function(e) {
|
|
998
|
+
var s3 = e.charCodeAt(0), C = e.length == 2 ? e.charCodeAt(1) : 0, D = s3;
|
|
999
|
+
return 55296 <= s3 && s3 <= 56319 && 56320 <= C && C <= 57343 && (s3 &= 1023, C &= 1023, D = s3 << 10 | C, D += 65536), D == 12288 || 65281 <= D && D <= 65376 || 65504 <= D && D <= 65510 ? "F" : D == 8361 || 65377 <= D && D <= 65470 || 65474 <= D && D <= 65479 || 65482 <= D && D <= 65487 || 65490 <= D && D <= 65495 || 65498 <= D && D <= 65500 || 65512 <= D && D <= 65518 ? "H" : 4352 <= D && D <= 4447 || 4515 <= D && D <= 4519 || 4602 <= D && D <= 4607 || 9001 <= D && D <= 9002 || 11904 <= D && D <= 11929 || 11931 <= D && D <= 12019 || 12032 <= D && D <= 12245 || 12272 <= D && D <= 12283 || 12289 <= D && D <= 12350 || 12353 <= D && D <= 12438 || 12441 <= D && D <= 12543 || 12549 <= D && D <= 12589 || 12593 <= D && D <= 12686 || 12688 <= D && D <= 12730 || 12736 <= D && D <= 12771 || 12784 <= D && D <= 12830 || 12832 <= D && D <= 12871 || 12880 <= D && D <= 13054 || 13056 <= D && D <= 19903 || 19968 <= D && D <= 42124 || 42128 <= D && D <= 42182 || 43360 <= D && D <= 43388 || 44032 <= D && D <= 55203 || 55216 <= D && D <= 55238 || 55243 <= D && D <= 55291 || 63744 <= D && D <= 64255 || 65040 <= D && D <= 65049 || 65072 <= D && D <= 65106 || 65108 <= D && D <= 65126 || 65128 <= D && D <= 65131 || 110592 <= D && D <= 110593 || 127488 <= D && D <= 127490 || 127504 <= D && D <= 127546 || 127552 <= D && D <= 127560 || 127568 <= D && D <= 127569 || 131072 <= D && D <= 194367 || 177984 <= D && D <= 196605 || 196608 <= D && D <= 262141 ? "W" : 32 <= D && D <= 126 || 162 <= D && D <= 163 || 165 <= D && D <= 166 || D == 172 || D == 175 || 10214 <= D && D <= 10221 || 10629 <= D && D <= 10630 ? "Na" : D == 161 || D == 164 || 167 <= D && D <= 168 || D == 170 || 173 <= D && D <= 174 || 176 <= D && D <= 180 || 182 <= D && D <= 186 || 188 <= D && D <= 191 || D == 198 || D == 208 || 215 <= D && D <= 216 || 222 <= D && D <= 225 || D == 230 || 232 <= D && D <= 234 || 236 <= D && D <= 237 || D == 240 || 242 <= D && D <= 243 || 247 <= D && D <= 250 || D == 252 || D == 254 || D == 257 || D == 273 || D == 275 || D == 283 || 294 <= D && D <= 295 || D == 299 || 305 <= D && D <= 307 || D == 312 || 319 <= D && D <= 322 || D == 324 || 328 <= D && D <= 331 || D == 333 || 338 <= D && D <= 339 || 358 <= D && D <= 359 || D == 363 || D == 462 || D == 464 || D == 466 || D == 468 || D == 470 || D == 472 || D == 474 || D == 476 || D == 593 || D == 609 || D == 708 || D == 711 || 713 <= D && D <= 715 || D == 717 || D == 720 || 728 <= D && D <= 731 || D == 733 || D == 735 || 768 <= D && D <= 879 || 913 <= D && D <= 929 || 931 <= D && D <= 937 || 945 <= D && D <= 961 || 963 <= D && D <= 969 || D == 1025 || 1040 <= D && D <= 1103 || D == 1105 || D == 8208 || 8211 <= D && D <= 8214 || 8216 <= D && D <= 8217 || 8220 <= D && D <= 8221 || 8224 <= D && D <= 8226 || 8228 <= D && D <= 8231 || D == 8240 || 8242 <= D && D <= 8243 || D == 8245 || D == 8251 || D == 8254 || D == 8308 || D == 8319 || 8321 <= D && D <= 8324 || D == 8364 || D == 8451 || D == 8453 || D == 8457 || D == 8467 || D == 8470 || 8481 <= D && D <= 8482 || D == 8486 || D == 8491 || 8531 <= D && D <= 8532 || 8539 <= D && D <= 8542 || 8544 <= D && D <= 8555 || 8560 <= D && D <= 8569 || D == 8585 || 8592 <= D && D <= 8601 || 8632 <= D && D <= 8633 || D == 8658 || D == 8660 || D == 8679 || D == 8704 || 8706 <= D && D <= 8707 || 8711 <= D && D <= 8712 || D == 8715 || D == 8719 || D == 8721 || D == 8725 || D == 8730 || 8733 <= D && D <= 8736 || D == 8739 || D == 8741 || 8743 <= D && D <= 8748 || D == 8750 || 8756 <= D && D <= 8759 || 8764 <= D && D <= 8765 || D == 8776 || D == 8780 || D == 8786 || 8800 <= D && D <= 8801 || 8804 <= D && D <= 8807 || 8810 <= D && D <= 8811 || 8814 <= D && D <= 8815 || 8834 <= D && D <= 8835 || 8838 <= D && D <= 8839 || D == 8853 || D == 8857 || D == 8869 || D == 8895 || D == 8978 || 9312 <= D && D <= 9449 || 9451 <= D && D <= 9547 || 9552 <= D && D <= 9587 || 9600 <= D && D <= 9615 || 9618 <= D && D <= 9621 || 9632 <= D && D <= 9633 || 9635 <= D && D <= 9641 || 9650 <= D && D <= 9651 || 9654 <= D && D <= 9655 || 9660 <= D && D <= 9661 || 9664 <= D && D <= 9665 || 9670 <= D && D <= 9672 || D == 9675 || 9678 <= D && D <= 9681 || 9698 <= D && D <= 9701 || D == 9711 || 9733 <= D && D <= 9734 || D == 9737 || 9742 <= D && D <= 9743 || 9748 <= D && D <= 9749 || D == 9756 || D == 9758 || D == 9792 || D == 9794 || 9824 <= D && D <= 9825 || 9827 <= D && D <= 9829 || 9831 <= D && D <= 9834 || 9836 <= D && D <= 9837 || D == 9839 || 9886 <= D && D <= 9887 || 9918 <= D && D <= 9919 || 9924 <= D && D <= 9933 || 9935 <= D && D <= 9953 || D == 9955 || 9960 <= D && D <= 9983 || D == 10045 || D == 10071 || 10102 <= D && D <= 10111 || 11093 <= D && D <= 11097 || 12872 <= D && D <= 12879 || 57344 <= D && D <= 63743 || 65024 <= D && D <= 65039 || D == 65533 || 127232 <= D && D <= 127242 || 127248 <= D && D <= 127277 || 127280 <= D && D <= 127337 || 127344 <= D && D <= 127386 || 917760 <= D && D <= 917999 || 983040 <= D && D <= 1048573 || 1048576 <= D && D <= 1114109 ? "A" : "N";
|
|
1000
|
+
}, u.characterLength = function(e) {
|
|
1001
|
+
var s3 = this.eastAsianWidth(e);
|
|
1002
|
+
return s3 == "F" || s3 == "W" || s3 == "A" ? 2 : 1;
|
|
1003
|
+
};
|
|
1004
|
+
function F(e) {
|
|
1005
|
+
return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
|
|
1006
|
+
}
|
|
1007
|
+
u.length = function(e) {
|
|
1008
|
+
for (var s3 = F(e), C = 0, D = 0; D < s3.length; D++)
|
|
1009
|
+
C = C + this.characterLength(s3[D]);
|
|
1010
|
+
return C;
|
|
1011
|
+
}, u.slice = function(e, s3, C) {
|
|
1012
|
+
textLen = u.length(e), s3 = s3 || 0, C = C || 1, s3 < 0 && (s3 = textLen + s3), C < 0 && (C = textLen + C);
|
|
1013
|
+
for (var D = "", i = 0, o = F(e), E = 0; E < o.length; E++) {
|
|
1014
|
+
var a = o[E], n = u.length(a);
|
|
1015
|
+
if (i >= s3 - (n == 2 ? 1 : 0))
|
|
1016
|
+
if (i + n <= C)
|
|
1017
|
+
D += a;
|
|
1018
|
+
else
|
|
1019
|
+
break;
|
|
1020
|
+
i += n;
|
|
1021
|
+
}
|
|
1022
|
+
return D;
|
|
1023
|
+
};
|
|
1024
|
+
})(G);
|
|
1025
|
+
K = m;
|
|
1026
|
+
Y = function() {
|
|
1027
|
+
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;
|
|
1028
|
+
};
|
|
1029
|
+
v = 10;
|
|
1030
|
+
L = (t = 0) => (u) => `\x1B[${u + t}m`;
|
|
1031
|
+
M = (t = 0) => (u) => `\x1B[${38 + t};5;${u}m`;
|
|
1032
|
+
T = (t = 0) => (u, F, e) => `\x1B[${38 + t};2;${u};${F};${e}m`;
|
|
1033
|
+
r = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], gray: [90, 39], grey: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgGray: [100, 49], bgGrey: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } };
|
|
1034
|
+
Object.keys(r.modifier);
|
|
1035
|
+
Z = Object.keys(r.color);
|
|
1036
|
+
H = Object.keys(r.bgColor);
|
|
1037
|
+
[...Z, ...H];
|
|
1038
|
+
q = U();
|
|
1039
|
+
p = /* @__PURE__ */ new Set(["\x1B", "\x9B"]);
|
|
1040
|
+
J = 39;
|
|
1041
|
+
b = "\x07";
|
|
1042
|
+
W = "[";
|
|
1043
|
+
Q = "]";
|
|
1044
|
+
I = "m";
|
|
1045
|
+
w = `${Q}8;;`;
|
|
1046
|
+
N = (t) => `${p.values().next().value}${W}${t}${I}`;
|
|
1047
|
+
j = (t) => `${p.values().next().value}${w}${t}${b}`;
|
|
1048
|
+
X = (t) => t.split(" ").map((u) => c(u));
|
|
1049
|
+
_ = (t, u, F) => {
|
|
1050
|
+
const e = [...u];
|
|
1051
|
+
let s3 = false, C = false, D = c($(t[t.length - 1]));
|
|
1052
|
+
for (const [i, o] of e.entries()) {
|
|
1053
|
+
const E = c(o);
|
|
1054
|
+
if (D + E <= F ? t[t.length - 1] += o : (t.push(o), D = 0), p.has(o) && (s3 = true, C = e.slice(i + 1).join("").startsWith(w)), s3) {
|
|
1055
|
+
C ? o === b && (s3 = false, C = false) : o === I && (s3 = false);
|
|
1056
|
+
continue;
|
|
1057
|
+
}
|
|
1058
|
+
D += E, D === F && i < e.length - 1 && (t.push(""), D = 0);
|
|
1059
|
+
}
|
|
1060
|
+
!D && t[t.length - 1].length > 0 && t.length > 1 && (t[t.length - 2] += t.pop());
|
|
1061
|
+
};
|
|
1062
|
+
DD = (t) => {
|
|
1063
|
+
const u = t.split(" ");
|
|
1064
|
+
let F = u.length;
|
|
1065
|
+
for (; F > 0 && !(c(u[F - 1]) > 0); )
|
|
1066
|
+
F--;
|
|
1067
|
+
return F === u.length ? t : u.slice(0, F).join(" ") + u.slice(F).join("");
|
|
1068
|
+
};
|
|
1069
|
+
uD = (t, u, F = {}) => {
|
|
1070
|
+
if (F.trim !== false && t.trim() === "")
|
|
1071
|
+
return "";
|
|
1072
|
+
let e = "", s3, C;
|
|
1073
|
+
const D = X(t);
|
|
1074
|
+
let i = [""];
|
|
1075
|
+
for (const [E, a] of t.split(" ").entries()) {
|
|
1076
|
+
F.trim !== false && (i[i.length - 1] = i[i.length - 1].trimStart());
|
|
1077
|
+
let n = c(i[i.length - 1]);
|
|
1078
|
+
if (E !== 0 && (n >= u && (F.wordWrap === false || F.trim === false) && (i.push(""), n = 0), (n > 0 || F.trim === false) && (i[i.length - 1] += " ", n++)), F.hard && D[E] > u) {
|
|
1079
|
+
const B = u - n, A = 1 + Math.floor((D[E] - B - 1) / u);
|
|
1080
|
+
Math.floor((D[E] - 1) / u) < A && i.push(""), _(i, a, u);
|
|
1081
|
+
continue;
|
|
1082
|
+
}
|
|
1083
|
+
if (n + D[E] > u && n > 0 && D[E] > 0) {
|
|
1084
|
+
if (F.wordWrap === false && n < u) {
|
|
1085
|
+
_(i, a, u);
|
|
1086
|
+
continue;
|
|
1087
|
+
}
|
|
1088
|
+
i.push("");
|
|
1089
|
+
}
|
|
1090
|
+
if (n + D[E] > u && F.wordWrap === false) {
|
|
1091
|
+
_(i, a, u);
|
|
1092
|
+
continue;
|
|
1093
|
+
}
|
|
1094
|
+
i[i.length - 1] += a;
|
|
1095
|
+
}
|
|
1096
|
+
F.trim !== false && (i = i.map((E) => DD(E)));
|
|
1097
|
+
const o = [...i.join(`
|
|
1098
|
+
`)];
|
|
1099
|
+
for (const [E, a] of o.entries()) {
|
|
1100
|
+
if (e += a, p.has(a)) {
|
|
1101
|
+
const { groups: B } = new RegExp(`(?:\\${W}(?<code>\\d+)m|\\${w}(?<uri>.*)${b})`).exec(o.slice(E).join("")) || { groups: {} };
|
|
1102
|
+
if (B.code !== void 0) {
|
|
1103
|
+
const A = Number.parseFloat(B.code);
|
|
1104
|
+
s3 = A === J ? void 0 : A;
|
|
1105
|
+
} else
|
|
1106
|
+
B.uri !== void 0 && (C = B.uri.length === 0 ? void 0 : B.uri);
|
|
1107
|
+
}
|
|
1108
|
+
const n = q.codes.get(Number(s3));
|
|
1109
|
+
o[E + 1] === `
|
|
1110
|
+
` ? (C && (e += j("")), s3 && n && (e += N(n))) : a === `
|
|
1111
|
+
` && (s3 && n && (e += N(s3)), C && (e += j(C)));
|
|
1112
|
+
}
|
|
1113
|
+
return e;
|
|
1114
|
+
};
|
|
1115
|
+
R = Symbol("clack:cancel");
|
|
1116
|
+
V = /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"]]);
|
|
1117
|
+
tD = /* @__PURE__ */ new Set(["up", "down", "left", "right", "space", "enter"]);
|
|
1118
|
+
h = class {
|
|
1119
|
+
constructor({ render: u, input: F = import_node_process.stdin, output: e = import_node_process.stdout, ...s3 }, C = true) {
|
|
1120
|
+
this._track = false, this._cursor = 0, this.state = "initial", this.error = "", this.subscribers = /* @__PURE__ */ new Map(), this._prevFrame = "", this.opts = s3, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = u.bind(this), this._track = C, this.input = F, this.output = e;
|
|
1121
|
+
}
|
|
1122
|
+
prompt() {
|
|
1123
|
+
const u = new import_node_tty.WriteStream(0);
|
|
1124
|
+
return u._write = (F, e, s3) => {
|
|
1125
|
+
this._track && (this.value = this.rl.line.replace(/\t/g, ""), this._cursor = this.rl.cursor, this.emit("value", this.value)), s3();
|
|
1126
|
+
}, this.input.pipe(u), this.rl = import_node_readline.default.createInterface({ input: this.input, output: u, tabSize: 2, prompt: "", escapeCodeTimeout: 50 }), import_node_readline.default.emitKeypressEvents(this.input, this.rl), this.rl.prompt(), this.opts.initialValue !== void 0 && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), g(this.input, true), this.output.on("resize", this.render), this.render(), new Promise((F, e) => {
|
|
1127
|
+
this.once("submit", () => {
|
|
1128
|
+
this.output.write(src.cursor.show), this.output.off("resize", this.render), g(this.input, false), F(this.value);
|
|
1129
|
+
}), this.once("cancel", () => {
|
|
1130
|
+
this.output.write(src.cursor.show), this.output.off("resize", this.render), g(this.input, false), F(R);
|
|
1131
|
+
});
|
|
1132
|
+
});
|
|
1133
|
+
}
|
|
1134
|
+
on(u, F) {
|
|
1135
|
+
const e = this.subscribers.get(u) ?? [];
|
|
1136
|
+
e.push({ cb: F }), this.subscribers.set(u, e);
|
|
1137
|
+
}
|
|
1138
|
+
once(u, F) {
|
|
1139
|
+
const e = this.subscribers.get(u) ?? [];
|
|
1140
|
+
e.push({ cb: F, once: true }), this.subscribers.set(u, e);
|
|
1141
|
+
}
|
|
1142
|
+
emit(u, ...F) {
|
|
1143
|
+
const e = this.subscribers.get(u) ?? [], s3 = [];
|
|
1144
|
+
for (const C of e)
|
|
1145
|
+
C.cb(...F), C.once && s3.push(() => e.splice(e.indexOf(C), 1));
|
|
1146
|
+
for (const C of s3)
|
|
1147
|
+
C();
|
|
1148
|
+
}
|
|
1149
|
+
unsubscribe() {
|
|
1150
|
+
this.subscribers.clear();
|
|
1151
|
+
}
|
|
1152
|
+
onKeypress(u, F) {
|
|
1153
|
+
if (this.state === "error" && (this.state = "active"), F?.name && !this._track && V.has(F.name) && this.emit("cursor", V.get(F.name)), F?.name && tD.has(F.name) && this.emit("cursor", F.name), u && (u.toLowerCase() === "y" || u.toLowerCase() === "n") && this.emit("confirm", u.toLowerCase() === "y"), u && this.emit("key", u.toLowerCase()), F?.name === "return") {
|
|
1154
|
+
if (this.opts.validate) {
|
|
1155
|
+
const e = this.opts.validate(this.value);
|
|
1156
|
+
e && (this.error = e, this.state = "error", this.rl.write(this.value));
|
|
1157
|
+
}
|
|
1158
|
+
this.state !== "error" && (this.state = "submit");
|
|
1159
|
+
}
|
|
1160
|
+
u === "" && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
|
|
1161
|
+
}
|
|
1162
|
+
close() {
|
|
1163
|
+
this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
|
|
1164
|
+
`), g(this.input, false), this.rl.close(), this.emit(`${this.state}`, this.value), this.unsubscribe();
|
|
1165
|
+
}
|
|
1166
|
+
restoreCursor() {
|
|
1167
|
+
const u = P(this._prevFrame, process.stdout.columns, { hard: true }).split(`
|
|
1168
|
+
`).length - 1;
|
|
1169
|
+
this.output.write(src.cursor.move(-999, u * -1));
|
|
1170
|
+
}
|
|
1171
|
+
render() {
|
|
1172
|
+
const u = P(this._render(this) ?? "", process.stdout.columns, { hard: true });
|
|
1173
|
+
if (u !== this._prevFrame) {
|
|
1174
|
+
if (this.state === "initial")
|
|
1175
|
+
this.output.write(src.cursor.hide);
|
|
1176
|
+
else {
|
|
1177
|
+
const F = FD(this._prevFrame, u);
|
|
1178
|
+
if (this.restoreCursor(), F && F?.length === 1) {
|
|
1179
|
+
const e = F[0];
|
|
1180
|
+
this.output.write(src.cursor.move(0, e)), this.output.write(src.erase.lines(1));
|
|
1181
|
+
const s3 = u.split(`
|
|
1182
|
+
`);
|
|
1183
|
+
this.output.write(s3[e]), this._prevFrame = u, this.output.write(src.cursor.move(0, s3.length - e - 1));
|
|
1184
|
+
return;
|
|
1185
|
+
} else if (F && F?.length > 1) {
|
|
1186
|
+
const e = F[0];
|
|
1187
|
+
this.output.write(src.cursor.move(0, e)), this.output.write(src.erase.down());
|
|
1188
|
+
const C = u.split(`
|
|
1189
|
+
`).slice(e);
|
|
1190
|
+
this.output.write(C.join(`
|
|
1191
|
+
`)), this._prevFrame = u;
|
|
1192
|
+
return;
|
|
1193
|
+
}
|
|
1194
|
+
this.output.write(src.erase.down());
|
|
1195
|
+
}
|
|
1196
|
+
this.output.write(u), this.state === "initial" && (this.state = "active"), this._prevFrame = u;
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
};
|
|
1200
|
+
sD = class extends h {
|
|
1201
|
+
get cursor() {
|
|
1202
|
+
return this.value ? 0 : 1;
|
|
1203
|
+
}
|
|
1204
|
+
get _value() {
|
|
1205
|
+
return this.cursor === 0;
|
|
1206
|
+
}
|
|
1207
|
+
constructor(u) {
|
|
1208
|
+
super(u, false), this.value = !!u.initialValue, this.on("value", () => {
|
|
1209
|
+
this.value = this._value;
|
|
1210
|
+
}), this.on("confirm", (F) => {
|
|
1211
|
+
this.output.write(src.cursor.move(0, -1)), this.value = F, this.state = "submit", this.close();
|
|
1212
|
+
}), this.on("cursor", () => {
|
|
1213
|
+
this.value = !this.value;
|
|
1214
|
+
});
|
|
1215
|
+
}
|
|
1216
|
+
};
|
|
1217
|
+
iD = class extends h {
|
|
1218
|
+
constructor(u) {
|
|
1219
|
+
super(u, false), this.cursor = 0, this.options = u.options, this.value = [...u.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: F }) => F === u.cursorAt), 0), this.on("key", (F) => {
|
|
1220
|
+
F === "a" && this.toggleAll();
|
|
1221
|
+
}), this.on("cursor", (F) => {
|
|
1222
|
+
switch (F) {
|
|
1223
|
+
case "left":
|
|
1224
|
+
case "up":
|
|
1225
|
+
this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
|
|
1226
|
+
break;
|
|
1227
|
+
case "down":
|
|
1228
|
+
case "right":
|
|
1229
|
+
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
|
|
1230
|
+
break;
|
|
1231
|
+
case "space":
|
|
1232
|
+
this.toggleValue();
|
|
1233
|
+
break;
|
|
1234
|
+
}
|
|
1235
|
+
});
|
|
1236
|
+
}
|
|
1237
|
+
get _value() {
|
|
1238
|
+
return this.options[this.cursor].value;
|
|
1239
|
+
}
|
|
1240
|
+
toggleAll() {
|
|
1241
|
+
const u = this.value.length === this.options.length;
|
|
1242
|
+
this.value = u ? [] : this.options.map((F) => F.value);
|
|
1243
|
+
}
|
|
1244
|
+
toggleValue() {
|
|
1245
|
+
const u = this.value.includes(this._value);
|
|
1246
|
+
this.value = u ? this.value.filter((F) => F !== this._value) : [...this.value, this._value];
|
|
1247
|
+
}
|
|
1248
|
+
};
|
|
1249
|
+
ED = class extends h {
|
|
1250
|
+
constructor(u) {
|
|
1251
|
+
super(u, false), this.cursor = 0, this.options = u.options, this.cursor = this.options.findIndex(({ value: F }) => F === u.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (F) => {
|
|
1252
|
+
switch (F) {
|
|
1253
|
+
case "left":
|
|
1254
|
+
case "up":
|
|
1255
|
+
this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
|
|
1256
|
+
break;
|
|
1257
|
+
case "down":
|
|
1258
|
+
case "right":
|
|
1259
|
+
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
|
|
1260
|
+
break;
|
|
1261
|
+
}
|
|
1262
|
+
this.changeValue();
|
|
1263
|
+
});
|
|
1264
|
+
}
|
|
1265
|
+
get _value() {
|
|
1266
|
+
return this.options[this.cursor];
|
|
1267
|
+
}
|
|
1268
|
+
changeValue() {
|
|
1269
|
+
this.value = this._value.value;
|
|
1270
|
+
}
|
|
1271
|
+
};
|
|
1272
|
+
oD = class extends h {
|
|
1273
|
+
constructor(u) {
|
|
1274
|
+
super(u), this.valueWithCursor = "", this.on("finalize", () => {
|
|
1275
|
+
this.value || (this.value = u.defaultValue), this.valueWithCursor = this.value;
|
|
1276
|
+
}), this.on("value", () => {
|
|
1277
|
+
if (this.cursor >= this.value.length)
|
|
1278
|
+
this.valueWithCursor = `${this.value}${l.inverse(l.hidden("_"))}`;
|
|
1279
|
+
else {
|
|
1280
|
+
const F = this.value.slice(0, this.cursor), e = this.value.slice(this.cursor);
|
|
1281
|
+
this.valueWithCursor = `${F}${l.inverse(e[0])}${e.slice(1)}`;
|
|
1282
|
+
}
|
|
1283
|
+
});
|
|
1284
|
+
}
|
|
1285
|
+
get cursor() {
|
|
1286
|
+
return this._cursor;
|
|
1287
|
+
}
|
|
1288
|
+
};
|
|
1289
|
+
unicode = isUnicodeSupported();
|
|
1290
|
+
s = (c2, fallback) => unicode ? c2 : fallback;
|
|
1291
|
+
S_STEP_ACTIVE = s("\u276F", ">");
|
|
1292
|
+
S_STEP_CANCEL = s("\u25A0", "x");
|
|
1293
|
+
S_STEP_ERROR = s("\u25B2", "x");
|
|
1294
|
+
S_STEP_SUBMIT = s("\u2714", "\u221A");
|
|
1295
|
+
S_BAR = "";
|
|
1296
|
+
S_BAR_END = "";
|
|
1297
|
+
S_RADIO_ACTIVE = s("\u25CF", ">");
|
|
1298
|
+
S_RADIO_INACTIVE = s("\u25CB", " ");
|
|
1299
|
+
S_CHECKBOX_ACTIVE = s("\u25FB", "[\u2022]");
|
|
1300
|
+
S_CHECKBOX_SELECTED = s("\u25FC", "[+]");
|
|
1301
|
+
S_CHECKBOX_INACTIVE = s("\u25FB", "[ ]");
|
|
1302
|
+
symbol = (state) => {
|
|
1303
|
+
switch (state) {
|
|
1304
|
+
case "initial":
|
|
1305
|
+
case "active": {
|
|
1306
|
+
return colors.cyan(S_STEP_ACTIVE);
|
|
1307
|
+
}
|
|
1308
|
+
case "cancel": {
|
|
1309
|
+
return colors.red(S_STEP_CANCEL);
|
|
1310
|
+
}
|
|
1311
|
+
case "error": {
|
|
1312
|
+
return colors.yellow(S_STEP_ERROR);
|
|
1313
|
+
}
|
|
1314
|
+
case "submit": {
|
|
1315
|
+
return colors.green(S_STEP_SUBMIT);
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
};
|
|
1319
|
+
text = (opts) => {
|
|
1320
|
+
return new oD({
|
|
1321
|
+
validate: opts.validate,
|
|
1322
|
+
placeholder: opts.placeholder,
|
|
1323
|
+
defaultValue: opts.defaultValue,
|
|
1324
|
+
initialValue: opts.initialValue,
|
|
1325
|
+
render() {
|
|
1326
|
+
const title = `${colors.gray(S_BAR)}
|
|
1327
|
+
${symbol(this.state)} ${opts.message}
|
|
1328
|
+
`;
|
|
1329
|
+
const placeholder = opts.placeholder ? colors.inverse(opts.placeholder[0]) + colors.dim(opts.placeholder.slice(1)) : colors.inverse(colors.hidden("_"));
|
|
1330
|
+
const value = this.value ? this.valueWithCursor : placeholder;
|
|
1331
|
+
switch (this.state) {
|
|
1332
|
+
case "error": {
|
|
1333
|
+
return `${title.trim()}
|
|
1334
|
+
${colors.yellow(
|
|
1335
|
+
S_BAR
|
|
1336
|
+
)} ${value}
|
|
1337
|
+
${colors.yellow(S_BAR_END)} ${colors.yellow(
|
|
1338
|
+
this.error
|
|
1339
|
+
)}
|
|
1340
|
+
`;
|
|
1341
|
+
}
|
|
1342
|
+
case "submit": {
|
|
1343
|
+
return `${title}${colors.gray(S_BAR)} ${colors.dim(
|
|
1344
|
+
this.value || opts.placeholder
|
|
1345
|
+
)}`;
|
|
1346
|
+
}
|
|
1347
|
+
case "cancel": {
|
|
1348
|
+
return `${title}${colors.gray(S_BAR)} ${colors.strikethrough(
|
|
1349
|
+
colors.dim(this.value ?? "")
|
|
1350
|
+
)}${this.value?.trim() ? "\n" + colors.gray(S_BAR) : ""}`;
|
|
1351
|
+
}
|
|
1352
|
+
default: {
|
|
1353
|
+
return `${title}${colors.cyan(S_BAR)} ${value}
|
|
1354
|
+
${colors.cyan(
|
|
1355
|
+
S_BAR_END
|
|
1356
|
+
)}
|
|
1357
|
+
`;
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
}
|
|
1361
|
+
}).prompt();
|
|
1362
|
+
};
|
|
1363
|
+
confirm = (opts) => {
|
|
1364
|
+
const active = opts.active ?? "Yes";
|
|
1365
|
+
const inactive = opts.inactive ?? "No";
|
|
1366
|
+
return new sD({
|
|
1367
|
+
active,
|
|
1368
|
+
inactive,
|
|
1369
|
+
initialValue: opts.initialValue ?? true,
|
|
1370
|
+
render() {
|
|
1371
|
+
const title = `${colors.gray(S_BAR)}
|
|
1372
|
+
${symbol(this.state)} ${opts.message}
|
|
1373
|
+
`;
|
|
1374
|
+
const value = this.value ? active : inactive;
|
|
1375
|
+
switch (this.state) {
|
|
1376
|
+
case "submit": {
|
|
1377
|
+
return `${title}${colors.gray(S_BAR)} ${colors.dim(value)}`;
|
|
1378
|
+
}
|
|
1379
|
+
case "cancel": {
|
|
1380
|
+
return `${title}${colors.gray(S_BAR)} ${colors.strikethrough(
|
|
1381
|
+
colors.dim(value)
|
|
1382
|
+
)}
|
|
1383
|
+
${colors.gray(S_BAR)}`;
|
|
1384
|
+
}
|
|
1385
|
+
default: {
|
|
1386
|
+
return `${title}${colors.cyan(S_BAR)} ${this.value ? `${colors.green(S_RADIO_ACTIVE)} ${active}` : `${colors.dim(S_RADIO_INACTIVE)} ${colors.dim(active)}`} ${colors.dim("/")} ${this.value ? `${colors.dim(S_RADIO_INACTIVE)} ${colors.dim(inactive)}` : `${colors.green(S_RADIO_ACTIVE)} ${inactive}`}
|
|
1387
|
+
${colors.cyan(S_BAR_END)}
|
|
1388
|
+
`;
|
|
1389
|
+
}
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
}).prompt();
|
|
1393
|
+
};
|
|
1394
|
+
select = (opts) => {
|
|
1395
|
+
const opt = (option, state) => {
|
|
1396
|
+
const label = option.label ?? String(option.value);
|
|
1397
|
+
switch (state) {
|
|
1398
|
+
case "active": {
|
|
1399
|
+
return `${colors.green(S_RADIO_ACTIVE)} ${label} ${option.hint ? colors.dim(`(${option.hint})`) : ""}`;
|
|
1400
|
+
}
|
|
1401
|
+
case "selected": {
|
|
1402
|
+
return `${colors.dim(label)}`;
|
|
1403
|
+
}
|
|
1404
|
+
case "cancelled": {
|
|
1405
|
+
return `${colors.strikethrough(colors.dim(label))}`;
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
return `${colors.dim(S_RADIO_INACTIVE)} ${colors.dim(label)}`;
|
|
1409
|
+
};
|
|
1410
|
+
return new ED({
|
|
1411
|
+
options: opts.options,
|
|
1412
|
+
initialValue: opts.initialValue,
|
|
1413
|
+
render() {
|
|
1414
|
+
const title = `${colors.gray(S_BAR)}
|
|
1415
|
+
${symbol(this.state)} ${opts.message}
|
|
1416
|
+
`;
|
|
1417
|
+
switch (this.state) {
|
|
1418
|
+
case "submit": {
|
|
1419
|
+
return `${title}${colors.gray(S_BAR)} ${opt(
|
|
1420
|
+
this.options[this.cursor],
|
|
1421
|
+
"selected"
|
|
1422
|
+
)}`;
|
|
1423
|
+
}
|
|
1424
|
+
case "cancel": {
|
|
1425
|
+
return `${title}${colors.gray(S_BAR)} ${opt(
|
|
1426
|
+
this.options[this.cursor],
|
|
1427
|
+
"cancelled"
|
|
1428
|
+
)}
|
|
1429
|
+
${colors.gray(S_BAR)}`;
|
|
1430
|
+
}
|
|
1431
|
+
default: {
|
|
1432
|
+
return `${title}${colors.cyan(S_BAR)} ${this.options.map(
|
|
1433
|
+
(option, i) => opt(option, i === this.cursor ? "active" : "inactive")
|
|
1434
|
+
).join(`
|
|
1435
|
+
${colors.cyan(S_BAR)} `)}
|
|
1436
|
+
${colors.cyan(S_BAR_END)}
|
|
1437
|
+
`;
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
}).prompt();
|
|
1442
|
+
};
|
|
1443
|
+
multiselect = (opts) => {
|
|
1444
|
+
const opt = (option, state) => {
|
|
1445
|
+
const label = option.label ?? String(option.value);
|
|
1446
|
+
switch (state) {
|
|
1447
|
+
case "active": {
|
|
1448
|
+
return `${colors.cyan(S_CHECKBOX_ACTIVE)} ${label} ${option.hint ? colors.dim(`(${option.hint})`) : ""}`;
|
|
1449
|
+
}
|
|
1450
|
+
case "selected": {
|
|
1451
|
+
return `${colors.green(S_CHECKBOX_SELECTED)} ${colors.dim(label)}`;
|
|
1452
|
+
}
|
|
1453
|
+
case "cancelled": {
|
|
1454
|
+
return `${colors.strikethrough(colors.dim(label))}`;
|
|
1455
|
+
}
|
|
1456
|
+
case "active-selected": {
|
|
1457
|
+
return `${colors.green(S_CHECKBOX_SELECTED)} ${label} ${option.hint ? colors.dim(`(${option.hint})`) : ""}`;
|
|
1458
|
+
}
|
|
1459
|
+
case "submitted": {
|
|
1460
|
+
return `${colors.dim(label)}`;
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
return `${colors.dim(S_CHECKBOX_INACTIVE)} ${colors.dim(label)}`;
|
|
1464
|
+
};
|
|
1465
|
+
return new iD({
|
|
1466
|
+
options: opts.options,
|
|
1467
|
+
initialValues: opts.initialValues,
|
|
1468
|
+
required: opts.required ?? true,
|
|
1469
|
+
cursorAt: opts.cursorAt,
|
|
1470
|
+
validate(selected) {
|
|
1471
|
+
if (this.required && selected.length === 0) {
|
|
1472
|
+
return `Please select at least one option.
|
|
1473
|
+
${colors.reset(
|
|
1474
|
+
colors.dim(
|
|
1475
|
+
`Press ${colors.gray(
|
|
1476
|
+
colors.bgWhite(colors.inverse(" space "))
|
|
1477
|
+
)} to select, ${colors.gray(
|
|
1478
|
+
colors.bgWhite(colors.inverse(" enter "))
|
|
1479
|
+
)} to submit`
|
|
1480
|
+
)
|
|
1481
|
+
)}`;
|
|
1482
|
+
}
|
|
1483
|
+
},
|
|
1484
|
+
render() {
|
|
1485
|
+
const title = `${colors.gray(S_BAR)}
|
|
1486
|
+
${symbol(this.state)} ${opts.message}
|
|
1487
|
+
`;
|
|
1488
|
+
switch (this.state) {
|
|
1489
|
+
case "submit": {
|
|
1490
|
+
return `${title}${colors.gray(S_BAR)} ${this.options.filter(({ value }) => this.value.includes(value)).map((option) => opt(option, "submitted")).join(colors.dim(", ")) || colors.dim("none")}`;
|
|
1491
|
+
}
|
|
1492
|
+
case "cancel": {
|
|
1493
|
+
const label = this.options.filter(({ value }) => this.value.includes(value)).map((option) => opt(option, "cancelled")).join(colors.dim(", "));
|
|
1494
|
+
return `${title}${colors.gray(S_BAR)} ${label.trim() ? `${label}
|
|
1495
|
+
${colors.gray(S_BAR)}` : ""}`;
|
|
1496
|
+
}
|
|
1497
|
+
case "error": {
|
|
1498
|
+
const footer = this.error.split("\n").map(
|
|
1499
|
+
(ln, i) => i === 0 ? `${colors.yellow(S_BAR_END)} ${colors.yellow(ln)}` : ` ${ln}`
|
|
1500
|
+
).join("\n");
|
|
1501
|
+
return title + colors.yellow(S_BAR) + " " + this.options.map((option, i) => {
|
|
1502
|
+
const selected = this.value.includes(option.value);
|
|
1503
|
+
const active = i === this.cursor;
|
|
1504
|
+
if (active && selected) {
|
|
1505
|
+
return opt(option, "active-selected");
|
|
1506
|
+
}
|
|
1507
|
+
if (selected) {
|
|
1508
|
+
return opt(option, "selected");
|
|
1509
|
+
}
|
|
1510
|
+
return opt(option, active ? "active" : "inactive");
|
|
1511
|
+
}).join(`
|
|
1512
|
+
${colors.yellow(S_BAR)} `) + "\n" + footer + "\n";
|
|
1513
|
+
}
|
|
1514
|
+
default: {
|
|
1515
|
+
return `${title}${colors.cyan(S_BAR)} ${this.options.map((option, i) => {
|
|
1516
|
+
const selected = this.value.includes(option.value);
|
|
1517
|
+
const active = i === this.cursor;
|
|
1518
|
+
if (active && selected) {
|
|
1519
|
+
return opt(option, "active-selected");
|
|
1520
|
+
}
|
|
1521
|
+
if (selected) {
|
|
1522
|
+
return opt(option, "selected");
|
|
1523
|
+
}
|
|
1524
|
+
return opt(option, active ? "active" : "inactive");
|
|
1525
|
+
}).join(`
|
|
1526
|
+
${colors.cyan(S_BAR)} `)}
|
|
1527
|
+
${colors.cyan(S_BAR_END)}
|
|
1528
|
+
`;
|
|
1529
|
+
}
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
}).prompt();
|
|
1533
|
+
};
|
|
1534
|
+
}
|
|
1535
|
+
});
|
|
1536
|
+
|
|
1537
|
+
// ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/shared/consola.36c0034f.mjs
|
|
1538
|
+
function detectProvider(env2) {
|
|
1539
|
+
for (const provider of providers) {
|
|
1540
|
+
const envName = provider[1] || provider[0];
|
|
1541
|
+
if (env2[envName]) {
|
|
1542
|
+
return {
|
|
1543
|
+
name: provider[0].toLowerCase(),
|
|
1544
|
+
...provider[2]
|
|
1545
|
+
};
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
if (env2.SHELL && env2.SHELL === "/bin/jsh") {
|
|
1549
|
+
return {
|
|
1550
|
+
name: "stackblitz",
|
|
1551
|
+
ci: false
|
|
1552
|
+
};
|
|
1553
|
+
}
|
|
1554
|
+
return {
|
|
1555
|
+
name: "",
|
|
1556
|
+
ci: false
|
|
1557
|
+
};
|
|
1558
|
+
}
|
|
1559
|
+
function toBoolean(val) {
|
|
1560
|
+
return val ? val !== "false" : false;
|
|
1561
|
+
}
|
|
1562
|
+
function ansiRegex2({ onlyFirst = false } = {}) {
|
|
1563
|
+
const pattern = [
|
|
1564
|
+
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
1565
|
+
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
|
|
1566
|
+
].join("|");
|
|
1567
|
+
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
1568
|
+
}
|
|
1569
|
+
function stripAnsi2(string) {
|
|
1570
|
+
if (typeof string !== "string") {
|
|
1571
|
+
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
1572
|
+
}
|
|
1573
|
+
return string.replace(regex, "");
|
|
1574
|
+
}
|
|
1575
|
+
function getDefaultExportFromCjs(x) {
|
|
1576
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
1577
|
+
}
|
|
1578
|
+
function stringWidth$1(string, options) {
|
|
1579
|
+
if (typeof string !== "string" || string.length === 0) {
|
|
1580
|
+
return 0;
|
|
1581
|
+
}
|
|
1582
|
+
options = {
|
|
1583
|
+
ambiguousIsNarrow: true,
|
|
1584
|
+
countAnsiEscapeCodes: false,
|
|
1585
|
+
...options
|
|
1586
|
+
};
|
|
1587
|
+
if (!options.countAnsiEscapeCodes) {
|
|
1588
|
+
string = stripAnsi2(string);
|
|
1589
|
+
}
|
|
1590
|
+
if (string.length === 0) {
|
|
1591
|
+
return 0;
|
|
1592
|
+
}
|
|
1593
|
+
const ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2;
|
|
1594
|
+
let width = 0;
|
|
1595
|
+
for (const { segment: character } of new Intl.Segmenter().segment(string)) {
|
|
1596
|
+
const codePoint = character.codePointAt(0);
|
|
1597
|
+
if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
|
|
1598
|
+
continue;
|
|
1599
|
+
}
|
|
1600
|
+
if (codePoint >= 768 && codePoint <= 879) {
|
|
1601
|
+
continue;
|
|
1602
|
+
}
|
|
1603
|
+
if (emojiRegex().test(character)) {
|
|
1604
|
+
width += 2;
|
|
1605
|
+
continue;
|
|
1606
|
+
}
|
|
1607
|
+
const code = eastAsianWidth.eastAsianWidth(character);
|
|
1608
|
+
switch (code) {
|
|
1609
|
+
case "F":
|
|
1610
|
+
case "W": {
|
|
1611
|
+
width += 2;
|
|
1612
|
+
break;
|
|
1613
|
+
}
|
|
1614
|
+
case "A": {
|
|
1615
|
+
width += ambiguousCharacterWidth;
|
|
1616
|
+
break;
|
|
1617
|
+
}
|
|
1618
|
+
default: {
|
|
1619
|
+
width += 1;
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
}
|
|
1623
|
+
return width;
|
|
1624
|
+
}
|
|
1625
|
+
function isUnicodeSupported() {
|
|
1626
|
+
if (import_node_process2.default.platform !== "win32") {
|
|
1627
|
+
return import_node_process2.default.env.TERM !== "linux";
|
|
1628
|
+
}
|
|
1629
|
+
return Boolean(import_node_process2.default.env.CI) || Boolean(import_node_process2.default.env.WT_SESSION) || Boolean(import_node_process2.default.env.TERMINUS_SUBLIME) || import_node_process2.default.env.ConEmuTask === "{cmd::Cmder}" || import_node_process2.default.env.TERM_PROGRAM === "Terminus-Sublime" || import_node_process2.default.env.TERM_PROGRAM === "vscode" || import_node_process2.default.env.TERM === "xterm-256color" || import_node_process2.default.env.TERM === "alacritty" || import_node_process2.default.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
1630
|
+
}
|
|
1631
|
+
function stringWidth(str) {
|
|
1632
|
+
if (!Intl.Segmenter) {
|
|
1633
|
+
return stripAnsi(str).length;
|
|
1634
|
+
}
|
|
1635
|
+
return stringWidth$1(str);
|
|
1636
|
+
}
|
|
1637
|
+
function characterFormat(str) {
|
|
1638
|
+
return str.replace(/`([^`]+)`/gm, (_2, m2) => colors.cyan(m2)).replace(/\s+_([^_]+)_\s+/gm, (_2, m2) => ` ${colors.underline(m2)} `);
|
|
1639
|
+
}
|
|
1640
|
+
function getColor2(color = "white") {
|
|
1641
|
+
return colors[color] || colors.white;
|
|
1642
|
+
}
|
|
1643
|
+
function getBgColor(color = "bgWhite") {
|
|
1644
|
+
return colors[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors.bgWhite;
|
|
1645
|
+
}
|
|
1646
|
+
function createConsola2(options = {}) {
|
|
1647
|
+
let level = _getDefaultLogLevel();
|
|
1648
|
+
if (process.env.CONSOLA_LEVEL) {
|
|
1649
|
+
level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level;
|
|
1650
|
+
}
|
|
1651
|
+
const consola2 = createConsola({
|
|
1652
|
+
level,
|
|
1653
|
+
defaults: { level },
|
|
1654
|
+
stdout: process.stdout,
|
|
1655
|
+
stderr: process.stderr,
|
|
1656
|
+
prompt: (...args) => Promise.resolve().then(() => (init_prompt(), prompt_exports)).then((m2) => m2.prompt(...args)),
|
|
1657
|
+
reporters: options.reporters || [
|
|
1658
|
+
options.fancy ?? !(isCI2 || isTest) ? new FancyReporter() : new BasicReporter()
|
|
1659
|
+
],
|
|
1660
|
+
...options
|
|
1661
|
+
});
|
|
1662
|
+
return consola2;
|
|
1663
|
+
}
|
|
1664
|
+
function _getDefaultLogLevel() {
|
|
1665
|
+
if (isDebug) {
|
|
1666
|
+
return LogLevels.debug;
|
|
1667
|
+
}
|
|
1668
|
+
if (isTest) {
|
|
1669
|
+
return LogLevels.warn;
|
|
1670
|
+
}
|
|
1671
|
+
return LogLevels.info;
|
|
1672
|
+
}
|
|
1673
|
+
var import_node_process2, providers, processShim, envShim, providerInfo, nodeENV, isCI2, hasTTY, isDebug, isTest, regex, eastasianwidth, eastasianwidthExports, eastAsianWidth, emojiRegex, TYPE_COLOR_MAP, LEVEL_COLOR_MAP, unicode2, s2, TYPE_ICONS, FancyReporter, consola;
|
|
1674
|
+
var init_consola_36c0034f = __esm({
|
|
1675
|
+
"../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/shared/consola.36c0034f.mjs"() {
|
|
1676
|
+
"use strict";
|
|
1677
|
+
init_core();
|
|
1678
|
+
init_consola_06ad8a64();
|
|
1679
|
+
import_node_process2 = __toESM(require("process"), 1);
|
|
1680
|
+
init_utils();
|
|
1681
|
+
providers = [
|
|
1682
|
+
["APPVEYOR"],
|
|
1683
|
+
["AZURE_PIPELINES", "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],
|
|
1684
|
+
["AZURE_STATIC", "INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],
|
|
1685
|
+
["APPCIRCLE", "AC_APPCIRCLE"],
|
|
1686
|
+
["BAMBOO", "bamboo_planKey"],
|
|
1687
|
+
["BITBUCKET", "BITBUCKET_COMMIT"],
|
|
1688
|
+
["BITRISE", "BITRISE_IO"],
|
|
1689
|
+
["BUDDY", "BUDDY_WORKSPACE_ID"],
|
|
1690
|
+
["BUILDKITE"],
|
|
1691
|
+
["CIRCLE", "CIRCLECI"],
|
|
1692
|
+
["CIRRUS", "CIRRUS_CI"],
|
|
1693
|
+
["CLOUDFLARE_PAGES", "CF_PAGES", { ci: true }],
|
|
1694
|
+
["CODEBUILD", "CODEBUILD_BUILD_ARN"],
|
|
1695
|
+
["CODEFRESH", "CF_BUILD_ID"],
|
|
1696
|
+
["DRONE"],
|
|
1697
|
+
["DRONE", "DRONE_BUILD_EVENT"],
|
|
1698
|
+
["DSARI"],
|
|
1699
|
+
["GITHUB_ACTIONS"],
|
|
1700
|
+
["GITLAB", "GITLAB_CI"],
|
|
1701
|
+
["GITLAB", "CI_MERGE_REQUEST_ID"],
|
|
1702
|
+
["GOCD", "GO_PIPELINE_LABEL"],
|
|
1703
|
+
["LAYERCI"],
|
|
1704
|
+
["HUDSON", "HUDSON_URL"],
|
|
1705
|
+
["JENKINS", "JENKINS_URL"],
|
|
1706
|
+
["MAGNUM"],
|
|
1707
|
+
["NETLIFY"],
|
|
1708
|
+
["NETLIFY", "NETLIFY_LOCAL", { ci: false }],
|
|
1709
|
+
["NEVERCODE"],
|
|
1710
|
+
["RENDER"],
|
|
1711
|
+
["SAIL", "SAILCI"],
|
|
1712
|
+
["SEMAPHORE"],
|
|
1713
|
+
["SCREWDRIVER"],
|
|
1714
|
+
["SHIPPABLE"],
|
|
1715
|
+
["SOLANO", "TDDIUM"],
|
|
1716
|
+
["STRIDER"],
|
|
1717
|
+
["TEAMCITY", "TEAMCITY_VERSION"],
|
|
1718
|
+
["TRAVIS"],
|
|
1719
|
+
["VERCEL", "NOW_BUILDER"],
|
|
1720
|
+
["APPCENTER", "APPCENTER_BUILD_ID"],
|
|
1721
|
+
["CODESANDBOX", "CODESANDBOX_SSE", { ci: false }],
|
|
1722
|
+
["STACKBLITZ"],
|
|
1723
|
+
["STORMKIT"],
|
|
1724
|
+
["CLEAVR"]
|
|
1725
|
+
];
|
|
1726
|
+
processShim = typeof process !== "undefined" ? process : {};
|
|
1727
|
+
envShim = processShim.env || {};
|
|
1728
|
+
providerInfo = detectProvider(envShim);
|
|
1729
|
+
nodeENV = typeof process !== "undefined" && process.env && process.env.NODE_ENV || "";
|
|
1730
|
+
processShim.platform;
|
|
1731
|
+
providerInfo.name;
|
|
1732
|
+
isCI2 = toBoolean(envShim.CI) || providerInfo.ci !== false;
|
|
1733
|
+
hasTTY = toBoolean(processShim.stdout && processShim.stdout.isTTY);
|
|
1734
|
+
isDebug = toBoolean(envShim.DEBUG);
|
|
1735
|
+
isTest = nodeENV === "test" || toBoolean(envShim.TEST);
|
|
1736
|
+
toBoolean(envShim.MINIMAL) || isCI2 || isTest || !hasTTY;
|
|
1737
|
+
regex = ansiRegex2();
|
|
1738
|
+
eastasianwidth = { exports: {} };
|
|
1739
|
+
(function(module2) {
|
|
1740
|
+
var eaw = {};
|
|
1741
|
+
{
|
|
1742
|
+
module2.exports = eaw;
|
|
1743
|
+
}
|
|
1744
|
+
eaw.eastAsianWidth = function(character) {
|
|
1745
|
+
var x = character.charCodeAt(0);
|
|
1746
|
+
var y = character.length == 2 ? character.charCodeAt(1) : 0;
|
|
1747
|
+
var codePoint = x;
|
|
1748
|
+
if (55296 <= x && x <= 56319 && (56320 <= y && y <= 57343)) {
|
|
1749
|
+
x &= 1023;
|
|
1750
|
+
y &= 1023;
|
|
1751
|
+
codePoint = x << 10 | y;
|
|
1752
|
+
codePoint += 65536;
|
|
1753
|
+
}
|
|
1754
|
+
if (12288 == codePoint || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510) {
|
|
1755
|
+
return "F";
|
|
1756
|
+
}
|
|
1757
|
+
if (8361 == codePoint || 65377 <= codePoint && codePoint <= 65470 || 65474 <= codePoint && codePoint <= 65479 || 65482 <= codePoint && codePoint <= 65487 || 65490 <= codePoint && codePoint <= 65495 || 65498 <= codePoint && codePoint <= 65500 || 65512 <= codePoint && codePoint <= 65518) {
|
|
1758
|
+
return "H";
|
|
1759
|
+
}
|
|
1760
|
+
if (4352 <= codePoint && codePoint <= 4447 || 4515 <= codePoint && codePoint <= 4519 || 4602 <= codePoint && codePoint <= 4607 || 9001 <= codePoint && codePoint <= 9002 || 11904 <= codePoint && codePoint <= 11929 || 11931 <= codePoint && codePoint <= 12019 || 12032 <= codePoint && codePoint <= 12245 || 12272 <= codePoint && codePoint <= 12283 || 12289 <= codePoint && codePoint <= 12350 || 12353 <= codePoint && codePoint <= 12438 || 12441 <= codePoint && codePoint <= 12543 || 12549 <= codePoint && codePoint <= 12589 || 12593 <= codePoint && codePoint <= 12686 || 12688 <= codePoint && codePoint <= 12730 || 12736 <= codePoint && codePoint <= 12771 || 12784 <= codePoint && codePoint <= 12830 || 12832 <= codePoint && codePoint <= 12871 || 12880 <= codePoint && codePoint <= 13054 || 13056 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42124 || 42128 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 55216 <= codePoint && codePoint <= 55238 || 55243 <= codePoint && codePoint <= 55291 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65106 || 65108 <= codePoint && codePoint <= 65126 || 65128 <= codePoint && codePoint <= 65131 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127490 || 127504 <= codePoint && codePoint <= 127546 || 127552 <= codePoint && codePoint <= 127560 || 127568 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 194367 || 177984 <= codePoint && codePoint <= 196605 || 196608 <= codePoint && codePoint <= 262141) {
|
|
1761
|
+
return "W";
|
|
1762
|
+
}
|
|
1763
|
+
if (32 <= codePoint && codePoint <= 126 || 162 <= codePoint && codePoint <= 163 || 165 <= codePoint && codePoint <= 166 || 172 == codePoint || 175 == codePoint || 10214 <= codePoint && codePoint <= 10221 || 10629 <= codePoint && codePoint <= 10630) {
|
|
1764
|
+
return "Na";
|
|
1765
|
+
}
|
|
1766
|
+
if (161 == codePoint || 164 == codePoint || 167 <= codePoint && codePoint <= 168 || 170 == codePoint || 173 <= codePoint && codePoint <= 174 || 176 <= codePoint && codePoint <= 180 || 182 <= codePoint && codePoint <= 186 || 188 <= codePoint && codePoint <= 191 || 198 == codePoint || 208 == codePoint || 215 <= codePoint && codePoint <= 216 || 222 <= codePoint && codePoint <= 225 || 230 == codePoint || 232 <= codePoint && codePoint <= 234 || 236 <= codePoint && codePoint <= 237 || 240 == codePoint || 242 <= codePoint && codePoint <= 243 || 247 <= codePoint && codePoint <= 250 || 252 == codePoint || 254 == codePoint || 257 == codePoint || 273 == codePoint || 275 == codePoint || 283 == codePoint || 294 <= codePoint && codePoint <= 295 || 299 == codePoint || 305 <= codePoint && codePoint <= 307 || 312 == codePoint || 319 <= codePoint && codePoint <= 322 || 324 == codePoint || 328 <= codePoint && codePoint <= 331 || 333 == codePoint || 338 <= codePoint && codePoint <= 339 || 358 <= codePoint && codePoint <= 359 || 363 == codePoint || 462 == codePoint || 464 == codePoint || 466 == codePoint || 468 == codePoint || 470 == codePoint || 472 == codePoint || 474 == codePoint || 476 == codePoint || 593 == codePoint || 609 == codePoint || 708 == codePoint || 711 == codePoint || 713 <= codePoint && codePoint <= 715 || 717 == codePoint || 720 == codePoint || 728 <= codePoint && codePoint <= 731 || 733 == codePoint || 735 == codePoint || 768 <= codePoint && codePoint <= 879 || 913 <= codePoint && codePoint <= 929 || 931 <= codePoint && codePoint <= 937 || 945 <= codePoint && codePoint <= 961 || 963 <= codePoint && codePoint <= 969 || 1025 == codePoint || 1040 <= codePoint && codePoint <= 1103 || 1105 == codePoint || 8208 == codePoint || 8211 <= codePoint && codePoint <= 8214 || 8216 <= codePoint && codePoint <= 8217 || 8220 <= codePoint && codePoint <= 8221 || 8224 <= codePoint && codePoint <= 8226 || 8228 <= codePoint && codePoint <= 8231 || 8240 == codePoint || 8242 <= codePoint && codePoint <= 8243 || 8245 == codePoint || 8251 == codePoint || 8254 == codePoint || 8308 == codePoint || 8319 == codePoint || 8321 <= codePoint && codePoint <= 8324 || 8364 == codePoint || 8451 == codePoint || 8453 == codePoint || 8457 == codePoint || 8467 == codePoint || 8470 == codePoint || 8481 <= codePoint && codePoint <= 8482 || 8486 == codePoint || 8491 == codePoint || 8531 <= codePoint && codePoint <= 8532 || 8539 <= codePoint && codePoint <= 8542 || 8544 <= codePoint && codePoint <= 8555 || 8560 <= codePoint && codePoint <= 8569 || 8585 == codePoint || 8592 <= codePoint && codePoint <= 8601 || 8632 <= codePoint && codePoint <= 8633 || 8658 == codePoint || 8660 == codePoint || 8679 == codePoint || 8704 == codePoint || 8706 <= codePoint && codePoint <= 8707 || 8711 <= codePoint && codePoint <= 8712 || 8715 == codePoint || 8719 == codePoint || 8721 == codePoint || 8725 == codePoint || 8730 == codePoint || 8733 <= codePoint && codePoint <= 8736 || 8739 == codePoint || 8741 == codePoint || 8743 <= codePoint && codePoint <= 8748 || 8750 == codePoint || 8756 <= codePoint && codePoint <= 8759 || 8764 <= codePoint && codePoint <= 8765 || 8776 == codePoint || 8780 == codePoint || 8786 == codePoint || 8800 <= codePoint && codePoint <= 8801 || 8804 <= codePoint && codePoint <= 8807 || 8810 <= codePoint && codePoint <= 8811 || 8814 <= codePoint && codePoint <= 8815 || 8834 <= codePoint && codePoint <= 8835 || 8838 <= codePoint && codePoint <= 8839 || 8853 == codePoint || 8857 == codePoint || 8869 == codePoint || 8895 == codePoint || 8978 == codePoint || 9312 <= codePoint && codePoint <= 9449 || 9451 <= codePoint && codePoint <= 9547 || 9552 <= codePoint && codePoint <= 9587 || 9600 <= codePoint && codePoint <= 9615 || 9618 <= codePoint && codePoint <= 9621 || 9632 <= codePoint && codePoint <= 9633 || 9635 <= codePoint && codePoint <= 9641 || 9650 <= codePoint && codePoint <= 9651 || 9654 <= codePoint && codePoint <= 9655 || 9660 <= codePoint && codePoint <= 9661 || 9664 <= codePoint && codePoint <= 9665 || 9670 <= codePoint && codePoint <= 9672 || 9675 == codePoint || 9678 <= codePoint && codePoint <= 9681 || 9698 <= codePoint && codePoint <= 9701 || 9711 == codePoint || 9733 <= codePoint && codePoint <= 9734 || 9737 == codePoint || 9742 <= codePoint && codePoint <= 9743 || 9748 <= codePoint && codePoint <= 9749 || 9756 == codePoint || 9758 == codePoint || 9792 == codePoint || 9794 == codePoint || 9824 <= codePoint && codePoint <= 9825 || 9827 <= codePoint && codePoint <= 9829 || 9831 <= codePoint && codePoint <= 9834 || 9836 <= codePoint && codePoint <= 9837 || 9839 == codePoint || 9886 <= codePoint && codePoint <= 9887 || 9918 <= codePoint && codePoint <= 9919 || 9924 <= codePoint && codePoint <= 9933 || 9935 <= codePoint && codePoint <= 9953 || 9955 == codePoint || 9960 <= codePoint && codePoint <= 9983 || 10045 == codePoint || 10071 == codePoint || 10102 <= codePoint && codePoint <= 10111 || 11093 <= codePoint && codePoint <= 11097 || 12872 <= codePoint && codePoint <= 12879 || 57344 <= codePoint && codePoint <= 63743 || 65024 <= codePoint && codePoint <= 65039 || 65533 == codePoint || 127232 <= codePoint && codePoint <= 127242 || 127248 <= codePoint && codePoint <= 127277 || 127280 <= codePoint && codePoint <= 127337 || 127344 <= codePoint && codePoint <= 127386 || 917760 <= codePoint && codePoint <= 917999 || 983040 <= codePoint && codePoint <= 1048573 || 1048576 <= codePoint && codePoint <= 1114109) {
|
|
1767
|
+
return "A";
|
|
1768
|
+
}
|
|
1769
|
+
return "N";
|
|
1770
|
+
};
|
|
1771
|
+
eaw.characterLength = function(character) {
|
|
1772
|
+
var code = this.eastAsianWidth(character);
|
|
1773
|
+
if (code == "F" || code == "W" || code == "A") {
|
|
1774
|
+
return 2;
|
|
1775
|
+
} else {
|
|
1776
|
+
return 1;
|
|
1777
|
+
}
|
|
1778
|
+
};
|
|
1779
|
+
function stringToArray(string) {
|
|
1780
|
+
return string.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
|
|
1781
|
+
}
|
|
1782
|
+
eaw.length = function(string) {
|
|
1783
|
+
var characters = stringToArray(string);
|
|
1784
|
+
var len = 0;
|
|
1785
|
+
for (var i = 0; i < characters.length; i++) {
|
|
1786
|
+
len = len + this.characterLength(characters[i]);
|
|
1787
|
+
}
|
|
1788
|
+
return len;
|
|
1789
|
+
};
|
|
1790
|
+
eaw.slice = function(text2, start, end) {
|
|
1791
|
+
textLen = eaw.length(text2);
|
|
1792
|
+
start = start ? start : 0;
|
|
1793
|
+
end = end ? end : 1;
|
|
1794
|
+
if (start < 0) {
|
|
1795
|
+
start = textLen + start;
|
|
1796
|
+
}
|
|
1797
|
+
if (end < 0) {
|
|
1798
|
+
end = textLen + end;
|
|
1799
|
+
}
|
|
1800
|
+
var result = "";
|
|
1801
|
+
var eawLen = 0;
|
|
1802
|
+
var chars = stringToArray(text2);
|
|
1803
|
+
for (var i = 0; i < chars.length; i++) {
|
|
1804
|
+
var char = chars[i];
|
|
1805
|
+
var charLen = eaw.length(char);
|
|
1806
|
+
if (eawLen >= start - (charLen == 2 ? 1 : 0)) {
|
|
1807
|
+
if (eawLen + charLen <= end) {
|
|
1808
|
+
result += char;
|
|
1809
|
+
} else {
|
|
1810
|
+
break;
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
eawLen += charLen;
|
|
1814
|
+
}
|
|
1815
|
+
return result;
|
|
1816
|
+
};
|
|
1817
|
+
})(eastasianwidth);
|
|
1818
|
+
eastasianwidthExports = eastasianwidth.exports;
|
|
1819
|
+
eastAsianWidth = /* @__PURE__ */ getDefaultExportFromCjs(eastasianwidthExports);
|
|
1820
|
+
emojiRegex = () => {
|
|
1821
|
+
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
|
1822
|
+
};
|
|
1823
|
+
TYPE_COLOR_MAP = {
|
|
1824
|
+
info: "cyan",
|
|
1825
|
+
fail: "red",
|
|
1826
|
+
success: "green",
|
|
1827
|
+
ready: "green",
|
|
1828
|
+
start: "magenta"
|
|
1829
|
+
};
|
|
1830
|
+
LEVEL_COLOR_MAP = {
|
|
1831
|
+
0: "red",
|
|
1832
|
+
1: "yellow"
|
|
1833
|
+
};
|
|
1834
|
+
unicode2 = isUnicodeSupported();
|
|
1835
|
+
s2 = (c2, fallback) => unicode2 ? c2 : fallback;
|
|
1836
|
+
TYPE_ICONS = {
|
|
1837
|
+
error: s2("\u2716", "\xD7"),
|
|
1838
|
+
fatal: s2("\u2716", "\xD7"),
|
|
1839
|
+
ready: s2("\u2714", "\u221A"),
|
|
1840
|
+
warn: s2("\u26A0", "\u203C"),
|
|
1841
|
+
info: s2("\u2139", "i"),
|
|
1842
|
+
success: s2("\u2714", "\u221A"),
|
|
1843
|
+
debug: s2("\u2699", "D"),
|
|
1844
|
+
trace: s2("\u2192", "\u2192"),
|
|
1845
|
+
fail: s2("\u2716", "\xD7"),
|
|
1846
|
+
start: s2("\u25D0", "o"),
|
|
1847
|
+
log: ""
|
|
1848
|
+
};
|
|
1849
|
+
FancyReporter = class extends BasicReporter {
|
|
1850
|
+
formatStack(stack) {
|
|
1851
|
+
return "\n" + parseStack(stack).map(
|
|
1852
|
+
(line) => " " + line.replace(/^at +/, (m2) => colors.gray(m2)).replace(/\((.+)\)/, (_2, m2) => `(${colors.cyan(m2)})`)
|
|
1853
|
+
).join("\n");
|
|
1854
|
+
}
|
|
1855
|
+
formatType(logObj, isBadge, opts) {
|
|
1856
|
+
const typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || "gray";
|
|
1857
|
+
if (isBadge) {
|
|
1858
|
+
return getBgColor(typeColor)(
|
|
1859
|
+
colors.black(` ${logObj.type.toUpperCase()} `)
|
|
1860
|
+
);
|
|
1861
|
+
}
|
|
1862
|
+
const _type = typeof TYPE_ICONS[logObj.type] === "string" ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type;
|
|
1863
|
+
return _type ? getColor2(typeColor)(_type) : "";
|
|
1864
|
+
}
|
|
1865
|
+
formatLogObj(logObj, opts) {
|
|
1866
|
+
const [message, ...additional] = this.formatArgs(logObj.args, opts).split(
|
|
1867
|
+
"\n"
|
|
1868
|
+
);
|
|
1869
|
+
if (logObj.type === "box") {
|
|
1870
|
+
return box(
|
|
1871
|
+
characterFormat(
|
|
1872
|
+
message + (additional.length > 0 ? "\n" + additional.join("\n") : "")
|
|
1873
|
+
),
|
|
1874
|
+
{
|
|
1875
|
+
title: logObj.title ? characterFormat(logObj.title) : void 0,
|
|
1876
|
+
style: logObj.style
|
|
1877
|
+
}
|
|
1878
|
+
);
|
|
1879
|
+
}
|
|
1880
|
+
const date = this.formatDate(logObj.date, opts);
|
|
1881
|
+
const coloredDate = date && colors.gray(date);
|
|
1882
|
+
const isBadge = logObj.badge ?? logObj.level < 2;
|
|
1883
|
+
const type = this.formatType(logObj, isBadge, opts);
|
|
1884
|
+
const tag = logObj.tag ? colors.gray(logObj.tag) : "";
|
|
1885
|
+
let line;
|
|
1886
|
+
const left = this.filterAndJoin([type, characterFormat(message)]);
|
|
1887
|
+
const right = this.filterAndJoin(opts.columns ? [tag, coloredDate] : [tag]);
|
|
1888
|
+
const space = (opts.columns || 0) - stringWidth(left) - stringWidth(right) - 2;
|
|
1889
|
+
line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors.gray(`[${right}]`)} ` : "") + left;
|
|
1890
|
+
line += characterFormat(
|
|
1891
|
+
additional.length > 0 ? "\n" + additional.join("\n") : ""
|
|
1892
|
+
);
|
|
1893
|
+
if (logObj.type === "trace") {
|
|
1894
|
+
const _err = new Error("Trace: " + logObj.message);
|
|
1895
|
+
line += this.formatStack(_err.stack || "");
|
|
1896
|
+
}
|
|
1897
|
+
return isBadge ? "\n" + line + "\n" : line;
|
|
1898
|
+
}
|
|
1899
|
+
};
|
|
1900
|
+
consola = createConsola2();
|
|
1901
|
+
}
|
|
1902
|
+
});
|
|
1903
|
+
|
|
30
1904
|
// src/testing/index.ts
|
|
31
1905
|
var testing_exports = {};
|
|
32
1906
|
__export(testing_exports, {
|
|
@@ -289,6 +2163,12 @@ function webextensionPolyfillMock(config) {
|
|
|
289
2163
|
};
|
|
290
2164
|
}
|
|
291
2165
|
|
|
2166
|
+
// src/core/utils/transform.ts
|
|
2167
|
+
var import_magicast = require("magicast");
|
|
2168
|
+
|
|
2169
|
+
// src/core/builders/vite/plugins/removeEntrypointMainFunction.ts
|
|
2170
|
+
var import_node_path7 = require("path");
|
|
2171
|
+
|
|
292
2172
|
// src/core/utils/fs.ts
|
|
293
2173
|
var import_fs_extra4 = __toESM(require("fs-extra"), 1);
|
|
294
2174
|
var import_fast_glob = __toESM(require("fast-glob"), 1);
|
|
@@ -300,7 +2180,7 @@ var import_hookable = require("hookable");
|
|
|
300
2180
|
var import_nypm = require("nypm");
|
|
301
2181
|
|
|
302
2182
|
// src/core/package-managers/npm.ts
|
|
303
|
-
var
|
|
2183
|
+
var import_node_path8 = __toESM(require("path"), 1);
|
|
304
2184
|
var import_fs_extra3 = require("fs-extra");
|
|
305
2185
|
|
|
306
2186
|
// src/core/utils/fs.ts
|
|
@@ -316,12 +2196,22 @@ var import_fs_extra5 = __toESM(require("fs-extra"), 1);
|
|
|
316
2196
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
317
2197
|
|
|
318
2198
|
// src/core/utils/building/find-entrypoints.ts
|
|
319
|
-
var
|
|
2199
|
+
var import_fs_extra7 = __toESM(require("fs-extra"), 1);
|
|
320
2200
|
var import_minimatch = require("minimatch");
|
|
321
2201
|
var import_linkedom2 = require("linkedom");
|
|
322
2202
|
var import_json5 = __toESM(require("json5"), 1);
|
|
323
2203
|
var import_fast_glob2 = __toESM(require("fast-glob"), 1);
|
|
324
2204
|
var import_picocolors2 = __toESM(require("picocolors"), 1);
|
|
2205
|
+
|
|
2206
|
+
// src/core/utils/building/import-entrypoint.ts
|
|
2207
|
+
var import_jiti = __toESM(require("jiti"), 1);
|
|
2208
|
+
var import_unimport2 = require("unimport");
|
|
2209
|
+
var import_fs_extra6 = __toESM(require("fs-extra"), 1);
|
|
2210
|
+
var import_node_path9 = require("path");
|
|
2211
|
+
var import_esbuild = require("esbuild");
|
|
2212
|
+
var import_node_url = require("url");
|
|
2213
|
+
|
|
2214
|
+
// src/core/utils/building/find-entrypoints.ts
|
|
325
2215
|
var PATH_GLOB_TO_TYPE_MAP = {
|
|
326
2216
|
"sandbox.html": "sandbox",
|
|
327
2217
|
"sandbox/index.html": "sandbox",
|
|
@@ -363,29 +2253,29 @@ var PATH_GLOB_TO_TYPE_MAP = {
|
|
|
363
2253
|
};
|
|
364
2254
|
|
|
365
2255
|
// src/core/utils/building/generate-wxt-dir.ts
|
|
366
|
-
var
|
|
367
|
-
var
|
|
368
|
-
var
|
|
2256
|
+
var import_unimport3 = require("unimport");
|
|
2257
|
+
var import_fs_extra8 = __toESM(require("fs-extra"), 1);
|
|
2258
|
+
var import_node_path10 = __toESM(require("path"), 1);
|
|
369
2259
|
|
|
370
2260
|
// src/core/utils/building/resolve-config.ts
|
|
371
2261
|
var import_c12 = require("c12");
|
|
372
|
-
var
|
|
2262
|
+
var import_node_path15 = __toESM(require("path"), 1);
|
|
373
2263
|
|
|
374
2264
|
// src/core/utils/cache.ts
|
|
375
|
-
var
|
|
2265
|
+
var import_fs_extra9 = __toESM(require("fs-extra"), 1);
|
|
376
2266
|
var import_path2 = require("path");
|
|
377
2267
|
function createFsCache(wxtDir) {
|
|
378
2268
|
const getPath = (key) => (0, import_path2.resolve)(wxtDir, "cache", encodeURIComponent(key));
|
|
379
2269
|
return {
|
|
380
2270
|
async set(key, value) {
|
|
381
2271
|
const path8 = getPath(key);
|
|
382
|
-
await (0,
|
|
2272
|
+
await (0, import_fs_extra9.ensureDir)((0, import_path2.dirname)(path8));
|
|
383
2273
|
await writeFileIfDifferent(path8, value);
|
|
384
2274
|
},
|
|
385
2275
|
async get(key) {
|
|
386
2276
|
const path8 = getPath(key);
|
|
387
2277
|
try {
|
|
388
|
-
return await
|
|
2278
|
+
return await import_fs_extra9.default.readFile(path8, "utf-8");
|
|
389
2279
|
} catch {
|
|
390
2280
|
return void 0;
|
|
391
2281
|
}
|
|
@@ -393,19 +2283,31 @@ function createFsCache(wxtDir) {
|
|
|
393
2283
|
};
|
|
394
2284
|
}
|
|
395
2285
|
|
|
2286
|
+
// ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/index.mjs
|
|
2287
|
+
init_consola_36c0034f();
|
|
2288
|
+
init_core();
|
|
2289
|
+
init_consola_06ad8a64();
|
|
2290
|
+
var import_node_process3 = require("process");
|
|
2291
|
+
init_utils();
|
|
2292
|
+
var import_node_tty2 = require("tty");
|
|
2293
|
+
var import_node_util3 = require("util");
|
|
2294
|
+
var import_node_path13 = require("path");
|
|
2295
|
+
|
|
396
2296
|
// src/core/utils/building/resolve-config.ts
|
|
397
|
-
var import_consola = __toESM(require("consola"), 1);
|
|
398
2297
|
var import_defu = __toESM(require("defu"), 1);
|
|
399
2298
|
|
|
400
2299
|
// src/core/utils/package.ts
|
|
401
|
-
var
|
|
402
|
-
var
|
|
2300
|
+
var import_node_path14 = require("path");
|
|
2301
|
+
var import_fs_extra10 = __toESM(require("fs-extra"), 1);
|
|
403
2302
|
function isModuleInstalled(name) {
|
|
404
|
-
return import(
|
|
2303
|
+
return import(
|
|
2304
|
+
/* @vite-ignore */
|
|
2305
|
+
name
|
|
2306
|
+
).then(() => true).catch(() => false);
|
|
405
2307
|
}
|
|
406
2308
|
|
|
407
2309
|
// src/core/utils/building/resolve-config.ts
|
|
408
|
-
var
|
|
2310
|
+
var import_fs_extra11 = __toESM(require("fs-extra"), 1);
|
|
409
2311
|
var import_meta = {};
|
|
410
2312
|
async function resolveConfig(inlineConfig, command) {
|
|
411
2313
|
let userConfig = {};
|
|
@@ -425,20 +2327,20 @@ async function resolveConfig(inlineConfig, command) {
|
|
|
425
2327
|
}
|
|
426
2328
|
const mergedConfig = await mergeInlineConfig(inlineConfig, userConfig);
|
|
427
2329
|
const debug = mergedConfig.debug ?? false;
|
|
428
|
-
const logger = mergedConfig.logger ??
|
|
2330
|
+
const logger = mergedConfig.logger ?? consola;
|
|
429
2331
|
if (debug)
|
|
430
|
-
logger.level =
|
|
2332
|
+
logger.level = LogLevels.debug;
|
|
431
2333
|
const browser = mergedConfig.browser ?? "chrome";
|
|
432
2334
|
const manifestVersion = mergedConfig.manifestVersion ?? (browser === "firefox" || browser === "safari" ? 2 : 3);
|
|
433
2335
|
const mode = mergedConfig.mode ?? COMMAND_MODES[command];
|
|
434
|
-
const
|
|
435
|
-
const root =
|
|
2336
|
+
const env2 = { browser, command, manifestVersion, mode };
|
|
2337
|
+
const root = import_node_path15.default.resolve(
|
|
436
2338
|
inlineConfig.root ?? userConfig.root ?? process.cwd()
|
|
437
2339
|
);
|
|
438
|
-
const wxtDir =
|
|
2340
|
+
const wxtDir = import_node_path15.default.resolve(root, ".wxt");
|
|
439
2341
|
const wxtModuleDir = await resolveWxtModuleDir();
|
|
440
|
-
const srcDir =
|
|
441
|
-
const entrypointsDir =
|
|
2342
|
+
const srcDir = import_node_path15.default.resolve(root, mergedConfig.srcDir ?? root);
|
|
2343
|
+
const entrypointsDir = import_node_path15.default.resolve(
|
|
442
2344
|
srcDir,
|
|
443
2345
|
mergedConfig.entrypointsDir ?? "entrypoints"
|
|
444
2346
|
);
|
|
@@ -446,13 +2348,13 @@ async function resolveConfig(inlineConfig, command) {
|
|
|
446
2348
|
logMissingDir(logger, "Entrypoints", entrypointsDir);
|
|
447
2349
|
}
|
|
448
2350
|
const filterEntrypoints = !!mergedConfig.filterEntrypoints?.length ? new Set(mergedConfig.filterEntrypoints) : void 0;
|
|
449
|
-
const publicDir =
|
|
2351
|
+
const publicDir = import_node_path15.default.resolve(srcDir, mergedConfig.publicDir ?? "public");
|
|
450
2352
|
if (await isDirMissing(publicDir)) {
|
|
451
2353
|
logMissingDir(logger, "Public", publicDir);
|
|
452
2354
|
}
|
|
453
|
-
const typesDir =
|
|
454
|
-
const outBaseDir =
|
|
455
|
-
const outDir =
|
|
2355
|
+
const typesDir = import_node_path15.default.resolve(wxtDir, "types");
|
|
2356
|
+
const outBaseDir = import_node_path15.default.resolve(root, mergedConfig.outDir ?? ".output");
|
|
2357
|
+
const outDir = import_node_path15.default.resolve(outBaseDir, `${browser}-mv${manifestVersion}`);
|
|
456
2358
|
const reloadCommand = mergedConfig.dev?.reloadCommand ?? "Alt+R";
|
|
457
2359
|
const runnerConfig = await (0, import_c12.loadConfig)({
|
|
458
2360
|
name: "web-ext",
|
|
@@ -469,7 +2371,7 @@ async function resolveConfig(inlineConfig, command) {
|
|
|
469
2371
|
"~": srcDir,
|
|
470
2372
|
"@@": root,
|
|
471
2373
|
"~~": root
|
|
472
|
-
}).map(([key, value]) => [key,
|
|
2374
|
+
}).map(([key, value]) => [key, import_node_path15.default.resolve(root, value)])
|
|
473
2375
|
);
|
|
474
2376
|
let devServerConfig;
|
|
475
2377
|
if (command === "serve") {
|
|
@@ -489,11 +2391,11 @@ async function resolveConfig(inlineConfig, command) {
|
|
|
489
2391
|
debug,
|
|
490
2392
|
entrypointsDir,
|
|
491
2393
|
filterEntrypoints,
|
|
492
|
-
env,
|
|
2394
|
+
env: env2,
|
|
493
2395
|
fsCache: createFsCache(wxtDir),
|
|
494
2396
|
imports: await getUnimportOptions(wxtDir, logger, mergedConfig),
|
|
495
2397
|
logger,
|
|
496
|
-
manifest: await resolveManifestConfig(
|
|
2398
|
+
manifest: await resolveManifestConfig(env2, mergedConfig.manifest),
|
|
497
2399
|
manifestVersion,
|
|
498
2400
|
mode,
|
|
499
2401
|
outBaseDir,
|
|
@@ -511,7 +2413,8 @@ async function resolveConfig(inlineConfig, command) {
|
|
|
511
2413
|
userConfigMetadata: userConfigMetadata ?? {},
|
|
512
2414
|
alias,
|
|
513
2415
|
experimental: (0, import_defu.default)(mergedConfig.experimental, {
|
|
514
|
-
includeBrowserPolyfill: true
|
|
2416
|
+
includeBrowserPolyfill: true,
|
|
2417
|
+
viteRuntime: false
|
|
515
2418
|
}),
|
|
516
2419
|
dev: {
|
|
517
2420
|
server: devServerConfig,
|
|
@@ -521,14 +2424,14 @@ async function resolveConfig(inlineConfig, command) {
|
|
|
521
2424
|
vite: mergedConfig.vite ?? (() => ({}))
|
|
522
2425
|
};
|
|
523
2426
|
}
|
|
524
|
-
async function resolveManifestConfig(
|
|
525
|
-
return await (typeof manifest === "function" ? manifest(
|
|
2427
|
+
async function resolveManifestConfig(env2, manifest) {
|
|
2428
|
+
return await (typeof manifest === "function" ? manifest(env2) : manifest ?? {});
|
|
526
2429
|
}
|
|
527
2430
|
async function mergeInlineConfig(inlineConfig, userConfig) {
|
|
528
2431
|
const imports = inlineConfig.imports === false || userConfig.imports === false ? false : userConfig.imports == null && inlineConfig.imports == null ? void 0 : (0, import_defu.default)(inlineConfig.imports ?? {}, userConfig.imports ?? {});
|
|
529
|
-
const manifest = async (
|
|
530
|
-
const user = await resolveManifestConfig(
|
|
531
|
-
const inline = await resolveManifestConfig(
|
|
2432
|
+
const manifest = async (env2) => {
|
|
2433
|
+
const user = await resolveManifestConfig(env2, userConfig.manifest);
|
|
2434
|
+
const inline = await resolveManifestConfig(env2, inlineConfig.manifest);
|
|
532
2435
|
return (0, import_defu.default)(inline, user);
|
|
533
2436
|
};
|
|
534
2437
|
const transformManifest = (manifest2) => {
|
|
@@ -546,13 +2449,14 @@ async function mergeInlineConfig(inlineConfig, userConfig) {
|
|
|
546
2449
|
};
|
|
547
2450
|
}
|
|
548
2451
|
function resolveZipConfig(root, mergedConfig) {
|
|
549
|
-
const downloadedPackagesDir =
|
|
2452
|
+
const downloadedPackagesDir = import_node_path15.default.resolve(root, ".wxt/local_modules");
|
|
550
2453
|
return {
|
|
551
2454
|
name: void 0,
|
|
552
2455
|
sourcesTemplate: "{{name}}-{{version}}-sources.zip",
|
|
553
2456
|
artifactTemplate: "{{name}}-{{version}}-{{browser}}.zip",
|
|
554
2457
|
sourcesRoot: root,
|
|
555
2458
|
includeSources: [],
|
|
2459
|
+
compressionLevel: 9,
|
|
556
2460
|
...mergedConfig.zip,
|
|
557
2461
|
excludeSources: [
|
|
558
2462
|
"**/node_modules",
|
|
@@ -571,12 +2475,12 @@ function resolveZipConfig(root, mergedConfig) {
|
|
|
571
2475
|
};
|
|
572
2476
|
}
|
|
573
2477
|
function resolveAnalysisConfig(root, mergedConfig) {
|
|
574
|
-
const analysisOutputFile =
|
|
2478
|
+
const analysisOutputFile = import_node_path15.default.resolve(
|
|
575
2479
|
root,
|
|
576
2480
|
mergedConfig.analysis?.outputFile ?? "stats.html"
|
|
577
2481
|
);
|
|
578
|
-
const analysisOutputDir =
|
|
579
|
-
const analysisOutputName =
|
|
2482
|
+
const analysisOutputDir = import_node_path15.default.dirname(analysisOutputFile);
|
|
2483
|
+
const analysisOutputName = import_node_path15.default.parse(analysisOutputFile).name;
|
|
580
2484
|
return {
|
|
581
2485
|
enabled: mergedConfig.analysis?.enabled ?? false,
|
|
582
2486
|
open: mergedConfig.analysis?.open ?? false,
|
|
@@ -616,7 +2520,7 @@ async function getUnimportOptions(wxtDir, logger, config) {
|
|
|
616
2520
|
dirs: ["components", "composables", "hooks", "utils"],
|
|
617
2521
|
eslintrc: {
|
|
618
2522
|
enabled,
|
|
619
|
-
filePath:
|
|
2523
|
+
filePath: import_node_path15.default.resolve(wxtDir, "eslintrc-auto-import.json"),
|
|
620
2524
|
globalsPropValue: true
|
|
621
2525
|
}
|
|
622
2526
|
};
|
|
@@ -627,15 +2531,15 @@ async function getUnimportOptions(wxtDir, logger, config) {
|
|
|
627
2531
|
}
|
|
628
2532
|
async function resolveWxtModuleDir() {
|
|
629
2533
|
const requireResolve = require?.resolve ?? (await import("module")).default.createRequire(import_meta.url).resolve;
|
|
630
|
-
return
|
|
2534
|
+
return import_node_path15.default.resolve(requireResolve("wxt"), "../..");
|
|
631
2535
|
}
|
|
632
2536
|
async function isDirMissing(dir) {
|
|
633
|
-
return !await
|
|
2537
|
+
return !await import_fs_extra11.default.exists(dir);
|
|
634
2538
|
}
|
|
635
2539
|
function logMissingDir(logger, name, expected) {
|
|
636
2540
|
logger.warn(
|
|
637
2541
|
`${name} directory not found: ./${normalizePath(
|
|
638
|
-
|
|
2542
|
+
import_node_path15.default.relative(process.cwd(), expected)
|
|
639
2543
|
)}`
|
|
640
2544
|
);
|
|
641
2545
|
}
|
|
@@ -647,9 +2551,9 @@ async function mergeBuilderConfig(inlineConfig, userConfig) {
|
|
|
647
2551
|
const vite = await import("vite").catch(() => void 0);
|
|
648
2552
|
if (vite) {
|
|
649
2553
|
return {
|
|
650
|
-
vite: async (
|
|
651
|
-
const resolvedInlineConfig = await inlineConfig.vite?.(
|
|
652
|
-
const resolvedUserConfig = await userConfig.vite?.(
|
|
2554
|
+
vite: async (env2) => {
|
|
2555
|
+
const resolvedInlineConfig = await inlineConfig.vite?.(env2) ?? {};
|
|
2556
|
+
const resolvedUserConfig = await userConfig.vite?.(env2) ?? {};
|
|
653
2557
|
return vite.mergeConfig(resolvedUserConfig, resolvedInlineConfig);
|
|
654
2558
|
}
|
|
655
2559
|
};
|
|
@@ -657,20 +2561,12 @@ async function mergeBuilderConfig(inlineConfig, userConfig) {
|
|
|
657
2561
|
throw Error("Builder not found. Make sure vite is installed.");
|
|
658
2562
|
}
|
|
659
2563
|
|
|
660
|
-
// src/core/utils/building/import-entrypoint.ts
|
|
661
|
-
var import_jiti = __toESM(require("jiti"), 1);
|
|
662
|
-
var import_unimport3 = require("unimport");
|
|
663
|
-
var import_fs_extra11 = __toESM(require("fs-extra"), 1);
|
|
664
|
-
var import_node_path11 = require("path");
|
|
665
|
-
var import_esbuild = require("esbuild");
|
|
666
|
-
var import_node_url = require("url");
|
|
667
|
-
|
|
668
2564
|
// src/core/utils/building/internal-build.ts
|
|
669
2565
|
var import_picocolors5 = __toESM(require("picocolors"), 1);
|
|
670
2566
|
var import_fs_extra14 = __toESM(require("fs-extra"), 1);
|
|
671
2567
|
|
|
672
2568
|
// src/core/utils/log/printFileList.ts
|
|
673
|
-
var
|
|
2569
|
+
var import_node_path16 = __toESM(require("path"), 1);
|
|
674
2570
|
var import_picocolors3 = __toESM(require("picocolors"), 1);
|
|
675
2571
|
var import_fs_extra12 = __toESM(require("fs-extra"), 1);
|
|
676
2572
|
var import_filesize = require("filesize");
|
|
@@ -689,7 +2585,6 @@ var CHUNK_COLORS = {
|
|
|
689
2585
|
|
|
690
2586
|
// src/core/utils/log/printHeader.ts
|
|
691
2587
|
var import_picocolors4 = __toESM(require("picocolors"), 1);
|
|
692
|
-
var import_consola2 = require("consola");
|
|
693
2588
|
|
|
694
2589
|
// src/core/utils/building/internal-build.ts
|
|
695
2590
|
var import_fast_glob3 = __toESM(require("fast-glob"), 1);
|
|
@@ -699,8 +2594,7 @@ var import_fs_extra13 = __toESM(require("fs-extra"), 1);
|
|
|
699
2594
|
var import_defu2 = __toESM(require("defu"), 1);
|
|
700
2595
|
|
|
701
2596
|
// src/core/utils/building/internal-build.ts
|
|
702
|
-
var
|
|
703
|
-
var import_consola3 = __toESM(require("consola"), 1);
|
|
2597
|
+
var import_node_path17 = require("path");
|
|
704
2598
|
var import_rollup_plugin_visualizer2 = require("@aklinker1/rollup-plugin-visualizer");
|
|
705
2599
|
var import_ci_info = require("ci-info");
|
|
706
2600
|
|