@stacksjs/error-handling 0.59.11 → 0.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2486 -222
- package/package.json +2 -2
- package/src/handler.ts +28 -20
- package/src/index.ts +13 -1
- package/dist/handler.d.ts +0 -14
- package/dist/index.d.ts +0 -2
package/dist/index.js
CHANGED
|
@@ -16,8 +16,2160 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
19
|
+
var __export = (target, all) => {
|
|
20
|
+
for (var name in all)
|
|
21
|
+
__defProp(target, name, {
|
|
22
|
+
get: all[name],
|
|
23
|
+
enumerable: true,
|
|
24
|
+
configurable: true,
|
|
25
|
+
set: (newValue) => all[name] = () => newValue
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
19
29
|
var __require = createRequire(import.meta.url);
|
|
20
30
|
|
|
31
|
+
// ../../../../node_modules/consola/dist/core.mjs
|
|
32
|
+
class Consola {
|
|
33
|
+
constructor(options = {}) {
|
|
34
|
+
const types = options.types || LogTypes;
|
|
35
|
+
this.options = defu({
|
|
36
|
+
...options,
|
|
37
|
+
defaults: { ...options.defaults },
|
|
38
|
+
level: _normalizeLogLevel(options.level, types),
|
|
39
|
+
reporters: [...options.reporters || []]
|
|
40
|
+
}, {
|
|
41
|
+
types: LogTypes,
|
|
42
|
+
throttle: 1000,
|
|
43
|
+
throttleMin: 5,
|
|
44
|
+
formatOptions: {
|
|
45
|
+
date: true,
|
|
46
|
+
colors: false,
|
|
47
|
+
compact: true
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
for (const type in types) {
|
|
51
|
+
const defaults = {
|
|
52
|
+
type,
|
|
53
|
+
...this.options.defaults,
|
|
54
|
+
...types[type]
|
|
55
|
+
};
|
|
56
|
+
this[type] = this._wrapLogFn(defaults);
|
|
57
|
+
this[type].raw = this._wrapLogFn(defaults, true);
|
|
58
|
+
}
|
|
59
|
+
if (this.options.mockFn) {
|
|
60
|
+
this.mockTypes();
|
|
61
|
+
}
|
|
62
|
+
this._lastLog = {};
|
|
63
|
+
}
|
|
64
|
+
get level() {
|
|
65
|
+
return this.options.level;
|
|
66
|
+
}
|
|
67
|
+
set level(level) {
|
|
68
|
+
this.options.level = _normalizeLogLevel(level, this.options.types, this.options.level);
|
|
69
|
+
}
|
|
70
|
+
prompt(message, opts) {
|
|
71
|
+
if (!this.options.prompt) {
|
|
72
|
+
throw new Error("prompt is not supported!");
|
|
73
|
+
}
|
|
74
|
+
return this.options.prompt(message, opts);
|
|
75
|
+
}
|
|
76
|
+
create(options) {
|
|
77
|
+
const instance = new Consola({
|
|
78
|
+
...this.options,
|
|
79
|
+
...options
|
|
80
|
+
});
|
|
81
|
+
if (this._mockFn) {
|
|
82
|
+
instance.mockTypes(this._mockFn);
|
|
83
|
+
}
|
|
84
|
+
return instance;
|
|
85
|
+
}
|
|
86
|
+
withDefaults(defaults) {
|
|
87
|
+
return this.create({
|
|
88
|
+
...this.options,
|
|
89
|
+
defaults: {
|
|
90
|
+
...this.options.defaults,
|
|
91
|
+
...defaults
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
withTag(tag) {
|
|
96
|
+
return this.withDefaults({
|
|
97
|
+
tag: this.options.defaults.tag ? this.options.defaults.tag + ":" + tag : tag
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
addReporter(reporter) {
|
|
101
|
+
this.options.reporters.push(reporter);
|
|
102
|
+
return this;
|
|
103
|
+
}
|
|
104
|
+
removeReporter(reporter) {
|
|
105
|
+
if (reporter) {
|
|
106
|
+
const i = this.options.reporters.indexOf(reporter);
|
|
107
|
+
if (i >= 0) {
|
|
108
|
+
return this.options.reporters.splice(i, 1);
|
|
109
|
+
}
|
|
110
|
+
} else {
|
|
111
|
+
this.options.reporters.splice(0);
|
|
112
|
+
}
|
|
113
|
+
return this;
|
|
114
|
+
}
|
|
115
|
+
setReporters(reporters) {
|
|
116
|
+
this.options.reporters = Array.isArray(reporters) ? reporters : [reporters];
|
|
117
|
+
return this;
|
|
118
|
+
}
|
|
119
|
+
wrapAll() {
|
|
120
|
+
this.wrapConsole();
|
|
121
|
+
this.wrapStd();
|
|
122
|
+
}
|
|
123
|
+
restoreAll() {
|
|
124
|
+
this.restoreConsole();
|
|
125
|
+
this.restoreStd();
|
|
126
|
+
}
|
|
127
|
+
wrapConsole() {
|
|
128
|
+
for (const type in this.options.types) {
|
|
129
|
+
if (!console["__" + type]) {
|
|
130
|
+
console["__" + type] = console[type];
|
|
131
|
+
}
|
|
132
|
+
console[type] = this[type].raw;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
restoreConsole() {
|
|
136
|
+
for (const type in this.options.types) {
|
|
137
|
+
if (console["__" + type]) {
|
|
138
|
+
console[type] = console["__" + type];
|
|
139
|
+
delete console["__" + type];
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
wrapStd() {
|
|
144
|
+
this._wrapStream(this.options.stdout, "log");
|
|
145
|
+
this._wrapStream(this.options.stderr, "log");
|
|
146
|
+
}
|
|
147
|
+
_wrapStream(stream, type) {
|
|
148
|
+
if (!stream) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
if (!stream.__write) {
|
|
152
|
+
stream.__write = stream.write;
|
|
153
|
+
}
|
|
154
|
+
stream.write = (data) => {
|
|
155
|
+
this[type].raw(String(data).trim());
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
restoreStd() {
|
|
159
|
+
this._restoreStream(this.options.stdout);
|
|
160
|
+
this._restoreStream(this.options.stderr);
|
|
161
|
+
}
|
|
162
|
+
_restoreStream(stream) {
|
|
163
|
+
if (!stream) {
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
if (stream.__write) {
|
|
167
|
+
stream.write = stream.__write;
|
|
168
|
+
delete stream.__write;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
pauseLogs() {
|
|
172
|
+
paused = true;
|
|
173
|
+
}
|
|
174
|
+
resumeLogs() {
|
|
175
|
+
paused = false;
|
|
176
|
+
const _queue = queue.splice(0);
|
|
177
|
+
for (const item of _queue) {
|
|
178
|
+
item[0]._logFn(item[1], item[2]);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
mockTypes(mockFn) {
|
|
182
|
+
const _mockFn = mockFn || this.options.mockFn;
|
|
183
|
+
this._mockFn = _mockFn;
|
|
184
|
+
if (typeof _mockFn !== "function") {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
for (const type in this.options.types) {
|
|
188
|
+
this[type] = _mockFn(type, this.options.types[type]) || this[type];
|
|
189
|
+
this[type].raw = this[type];
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
_wrapLogFn(defaults, isRaw) {
|
|
193
|
+
return (...args) => {
|
|
194
|
+
if (paused) {
|
|
195
|
+
queue.push([this, defaults, args, isRaw]);
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
return this._logFn(defaults, args, isRaw);
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
_logFn(defaults, args, isRaw) {
|
|
202
|
+
if ((defaults.level || 0) > this.level) {
|
|
203
|
+
return false;
|
|
204
|
+
}
|
|
205
|
+
const logObj = {
|
|
206
|
+
date: new Date,
|
|
207
|
+
args: [],
|
|
208
|
+
...defaults,
|
|
209
|
+
level: _normalizeLogLevel(defaults.level, this.options.types)
|
|
210
|
+
};
|
|
211
|
+
if (!isRaw && args.length === 1 && isLogObj(args[0])) {
|
|
212
|
+
Object.assign(logObj, args[0]);
|
|
213
|
+
} else {
|
|
214
|
+
logObj.args = [...args];
|
|
215
|
+
}
|
|
216
|
+
if (logObj.message) {
|
|
217
|
+
logObj.args.unshift(logObj.message);
|
|
218
|
+
delete logObj.message;
|
|
219
|
+
}
|
|
220
|
+
if (logObj.additional) {
|
|
221
|
+
if (!Array.isArray(logObj.additional)) {
|
|
222
|
+
logObj.additional = logObj.additional.split("\n");
|
|
223
|
+
}
|
|
224
|
+
logObj.args.push("\n" + logObj.additional.join("\n"));
|
|
225
|
+
delete logObj.additional;
|
|
226
|
+
}
|
|
227
|
+
logObj.type = typeof logObj.type === "string" ? logObj.type.toLowerCase() : "log";
|
|
228
|
+
logObj.tag = typeof logObj.tag === "string" ? logObj.tag : "";
|
|
229
|
+
const resolveLog = (newLog = false) => {
|
|
230
|
+
const repeated = (this._lastLog.count || 0) - this.options.throttleMin;
|
|
231
|
+
if (this._lastLog.object && repeated > 0) {
|
|
232
|
+
const args2 = [...this._lastLog.object.args];
|
|
233
|
+
if (repeated > 1) {
|
|
234
|
+
args2.push(`(repeated ${repeated} times)`);
|
|
235
|
+
}
|
|
236
|
+
this._log({ ...this._lastLog.object, args: args2 });
|
|
237
|
+
this._lastLog.count = 1;
|
|
238
|
+
}
|
|
239
|
+
if (newLog) {
|
|
240
|
+
this._lastLog.object = logObj;
|
|
241
|
+
this._log(logObj);
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
clearTimeout(this._lastLog.timeout);
|
|
245
|
+
const diffTime = this._lastLog.time && logObj.date ? logObj.date.getTime() - this._lastLog.time.getTime() : 0;
|
|
246
|
+
this._lastLog.time = logObj.date;
|
|
247
|
+
if (diffTime < this.options.throttle) {
|
|
248
|
+
try {
|
|
249
|
+
const serializedLog = JSON.stringify([
|
|
250
|
+
logObj.type,
|
|
251
|
+
logObj.tag,
|
|
252
|
+
logObj.args
|
|
253
|
+
]);
|
|
254
|
+
const isSameLog = this._lastLog.serialized === serializedLog;
|
|
255
|
+
this._lastLog.serialized = serializedLog;
|
|
256
|
+
if (isSameLog) {
|
|
257
|
+
this._lastLog.count = (this._lastLog.count || 0) + 1;
|
|
258
|
+
if (this._lastLog.count > this.options.throttleMin) {
|
|
259
|
+
this._lastLog.timeout = setTimeout(resolveLog, this.options.throttle);
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
} catch {
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
resolveLog(true);
|
|
267
|
+
}
|
|
268
|
+
_log(logObj) {
|
|
269
|
+
for (const reporter of this.options.reporters) {
|
|
270
|
+
reporter.log(logObj, {
|
|
271
|
+
options: this.options
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
var isObject, _defu, createDefu, isPlainObject, isLogObj, _normalizeLogLevel, createConsola, LogLevels, LogTypes, defu, paused, queue;
|
|
277
|
+
var init_core = __esm(() => {
|
|
278
|
+
isObject = function(value) {
|
|
279
|
+
return value !== null && typeof value === "object";
|
|
280
|
+
};
|
|
281
|
+
_defu = function(baseObject, defaults, namespace = ".", merger) {
|
|
282
|
+
if (!isObject(defaults)) {
|
|
283
|
+
return _defu(baseObject, {}, namespace, merger);
|
|
284
|
+
}
|
|
285
|
+
const object = Object.assign({}, defaults);
|
|
286
|
+
for (const key in baseObject) {
|
|
287
|
+
if (key === "__proto__" || key === "constructor") {
|
|
288
|
+
continue;
|
|
289
|
+
}
|
|
290
|
+
const value = baseObject[key];
|
|
291
|
+
if (value === null || value === undefined) {
|
|
292
|
+
continue;
|
|
293
|
+
}
|
|
294
|
+
if (merger && merger(object, key, value, namespace)) {
|
|
295
|
+
continue;
|
|
296
|
+
}
|
|
297
|
+
if (Array.isArray(value) && Array.isArray(object[key])) {
|
|
298
|
+
object[key] = [...value, ...object[key]];
|
|
299
|
+
} else if (isObject(value) && isObject(object[key])) {
|
|
300
|
+
object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
|
|
301
|
+
} else {
|
|
302
|
+
object[key] = value;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
return object;
|
|
306
|
+
};
|
|
307
|
+
createDefu = function(merger) {
|
|
308
|
+
return (...arguments_) => arguments_.reduce((p, c) => _defu(p, c, "", merger), {});
|
|
309
|
+
};
|
|
310
|
+
isPlainObject = function(obj) {
|
|
311
|
+
return Object.prototype.toString.call(obj) === "[object Object]";
|
|
312
|
+
};
|
|
313
|
+
isLogObj = function(arg) {
|
|
314
|
+
if (!isPlainObject(arg)) {
|
|
315
|
+
return false;
|
|
316
|
+
}
|
|
317
|
+
if (!arg.message && !arg.args) {
|
|
318
|
+
return false;
|
|
319
|
+
}
|
|
320
|
+
if (arg.stack) {
|
|
321
|
+
return false;
|
|
322
|
+
}
|
|
323
|
+
return true;
|
|
324
|
+
};
|
|
325
|
+
_normalizeLogLevel = function(input, types = {}, defaultLevel = 3) {
|
|
326
|
+
if (input === undefined) {
|
|
327
|
+
return defaultLevel;
|
|
328
|
+
}
|
|
329
|
+
if (typeof input === "number") {
|
|
330
|
+
return input;
|
|
331
|
+
}
|
|
332
|
+
if (types[input] && types[input].level !== undefined) {
|
|
333
|
+
return types[input].level;
|
|
334
|
+
}
|
|
335
|
+
return defaultLevel;
|
|
336
|
+
};
|
|
337
|
+
createConsola = function(options = {}) {
|
|
338
|
+
return new Consola(options);
|
|
339
|
+
};
|
|
340
|
+
LogLevels = {
|
|
341
|
+
silent: Number.NEGATIVE_INFINITY,
|
|
342
|
+
fatal: 0,
|
|
343
|
+
error: 0,
|
|
344
|
+
warn: 1,
|
|
345
|
+
log: 2,
|
|
346
|
+
info: 3,
|
|
347
|
+
success: 3,
|
|
348
|
+
fail: 3,
|
|
349
|
+
ready: 3,
|
|
350
|
+
start: 3,
|
|
351
|
+
box: 3,
|
|
352
|
+
debug: 4,
|
|
353
|
+
trace: 5,
|
|
354
|
+
verbose: Number.POSITIVE_INFINITY
|
|
355
|
+
};
|
|
356
|
+
LogTypes = {
|
|
357
|
+
silent: {
|
|
358
|
+
level: -1
|
|
359
|
+
},
|
|
360
|
+
fatal: {
|
|
361
|
+
level: LogLevels.fatal
|
|
362
|
+
},
|
|
363
|
+
error: {
|
|
364
|
+
level: LogLevels.error
|
|
365
|
+
},
|
|
366
|
+
warn: {
|
|
367
|
+
level: LogLevels.warn
|
|
368
|
+
},
|
|
369
|
+
log: {
|
|
370
|
+
level: LogLevels.log
|
|
371
|
+
},
|
|
372
|
+
info: {
|
|
373
|
+
level: LogLevels.info
|
|
374
|
+
},
|
|
375
|
+
success: {
|
|
376
|
+
level: LogLevels.success
|
|
377
|
+
},
|
|
378
|
+
fail: {
|
|
379
|
+
level: LogLevels.fail
|
|
380
|
+
},
|
|
381
|
+
ready: {
|
|
382
|
+
level: LogLevels.info
|
|
383
|
+
},
|
|
384
|
+
start: {
|
|
385
|
+
level: LogLevels.info
|
|
386
|
+
},
|
|
387
|
+
box: {
|
|
388
|
+
level: LogLevels.info
|
|
389
|
+
},
|
|
390
|
+
debug: {
|
|
391
|
+
level: LogLevels.debug
|
|
392
|
+
},
|
|
393
|
+
trace: {
|
|
394
|
+
level: LogLevels.trace
|
|
395
|
+
},
|
|
396
|
+
verbose: {
|
|
397
|
+
level: LogLevels.verbose
|
|
398
|
+
}
|
|
399
|
+
};
|
|
400
|
+
defu = createDefu();
|
|
401
|
+
paused = false;
|
|
402
|
+
queue = [];
|
|
403
|
+
Consola.prototype.add = Consola.prototype.addReporter;
|
|
404
|
+
Consola.prototype.remove = Consola.prototype.removeReporter;
|
|
405
|
+
Consola.prototype.clear = Consola.prototype.removeReporter;
|
|
406
|
+
Consola.prototype.withScope = Consola.prototype.withTag;
|
|
407
|
+
Consola.prototype.mock = Consola.prototype.mockTypes;
|
|
408
|
+
Consola.prototype.pause = Consola.prototype.pauseLogs;
|
|
409
|
+
Consola.prototype.resume = Consola.prototype.resumeLogs;
|
|
410
|
+
});
|
|
411
|
+
|
|
412
|
+
// ../../../../node_modules/consola/dist/shared/consola.06ad8a64.mjs
|
|
413
|
+
import {formatWithOptions} from "node:util";
|
|
414
|
+
import {sep} from "node:path";
|
|
415
|
+
|
|
416
|
+
class BasicReporter {
|
|
417
|
+
formatStack(stack, opts) {
|
|
418
|
+
return " " + parseStack(stack).join("\n ");
|
|
419
|
+
}
|
|
420
|
+
formatArgs(args, opts) {
|
|
421
|
+
const _args = args.map((arg) => {
|
|
422
|
+
if (arg && typeof arg.stack === "string") {
|
|
423
|
+
return arg.message + "\n" + this.formatStack(arg.stack, opts);
|
|
424
|
+
}
|
|
425
|
+
return arg;
|
|
426
|
+
});
|
|
427
|
+
return formatWithOptions(opts, ..._args);
|
|
428
|
+
}
|
|
429
|
+
formatDate(date, opts) {
|
|
430
|
+
return opts.date ? date.toLocaleTimeString() : "";
|
|
431
|
+
}
|
|
432
|
+
filterAndJoin(arr) {
|
|
433
|
+
return arr.filter(Boolean).join(" ");
|
|
434
|
+
}
|
|
435
|
+
formatLogObj(logObj, opts) {
|
|
436
|
+
const message = this.formatArgs(logObj.args, opts);
|
|
437
|
+
if (logObj.type === "box") {
|
|
438
|
+
return "\n" + [
|
|
439
|
+
bracket(logObj.tag),
|
|
440
|
+
logObj.title && logObj.title,
|
|
441
|
+
...message.split("\n")
|
|
442
|
+
].filter(Boolean).map((l) => " > " + l).join("\n") + "\n";
|
|
443
|
+
}
|
|
444
|
+
return this.filterAndJoin([
|
|
445
|
+
bracket(logObj.type),
|
|
446
|
+
bracket(logObj.tag),
|
|
447
|
+
message
|
|
448
|
+
]);
|
|
449
|
+
}
|
|
450
|
+
log(logObj, ctx) {
|
|
451
|
+
const line = this.formatLogObj(logObj, {
|
|
452
|
+
columns: ctx.options.stdout.columns || 0,
|
|
453
|
+
...ctx.options.formatOptions
|
|
454
|
+
});
|
|
455
|
+
return writeStream(line + "\n", logObj.level < 2 ? ctx.options.stderr || process.stderr : ctx.options.stdout || process.stdout);
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
var parseStack, writeStream, bracket;
|
|
459
|
+
var init_consola_06ad8a64 = __esm(() => {
|
|
460
|
+
parseStack = function(stack) {
|
|
461
|
+
const cwd = process.cwd() + sep;
|
|
462
|
+
const lines = stack.split("\n").splice(1).map((l) => l.trim().replace("file://", "").replace(cwd, ""));
|
|
463
|
+
return lines;
|
|
464
|
+
};
|
|
465
|
+
writeStream = function(data, stream) {
|
|
466
|
+
const write = stream.__write || stream.write;
|
|
467
|
+
return write.call(stream, data);
|
|
468
|
+
};
|
|
469
|
+
bracket = (x) => x ? `[${x}]` : "";
|
|
470
|
+
});
|
|
471
|
+
|
|
472
|
+
// ../../../../node_modules/consola/dist/utils.mjs
|
|
473
|
+
import * as tty from "node:tty";
|
|
474
|
+
var replaceClose, clearBleed, filterEmpty, init, createColors, getColor, stripAnsi, box, env, argv, platform, isDisabled, isForced, isWindows, isDumbTerminal, isCompatibleTerminal, isCI, isColorSupported, colorDefs, colors, ansiRegex, boxStylePresets, defaultStyle;
|
|
475
|
+
var init_utils = __esm(() => {
|
|
476
|
+
replaceClose = function(index, string, close, replace, head = string.slice(0, Math.max(0, index)) + replace, tail = string.slice(Math.max(0, index + close.length)), next = tail.indexOf(close)) {
|
|
477
|
+
return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
|
|
478
|
+
};
|
|
479
|
+
clearBleed = function(index, string, open, close, replace) {
|
|
480
|
+
return index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
|
|
481
|
+
};
|
|
482
|
+
filterEmpty = function(open, close, replace = open, at = open.length + 1) {
|
|
483
|
+
return (string) => string || !(string === "" || string === undefined) ? clearBleed(("" + string).indexOf(close, at), string, open, close, replace) : "";
|
|
484
|
+
};
|
|
485
|
+
init = function(open, close, replace) {
|
|
486
|
+
return filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace);
|
|
487
|
+
};
|
|
488
|
+
createColors = function(useColor = isColorSupported) {
|
|
489
|
+
return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
|
|
490
|
+
};
|
|
491
|
+
getColor = function(color, fallback = "reset") {
|
|
492
|
+
return colors[color] || colors[fallback];
|
|
493
|
+
};
|
|
494
|
+
stripAnsi = function(text) {
|
|
495
|
+
return text.replace(new RegExp(ansiRegex, "g"), "");
|
|
496
|
+
};
|
|
497
|
+
box = function(text, _opts = {}) {
|
|
498
|
+
const opts = {
|
|
499
|
+
..._opts,
|
|
500
|
+
style: {
|
|
501
|
+
...defaultStyle,
|
|
502
|
+
..._opts.style
|
|
503
|
+
}
|
|
504
|
+
};
|
|
505
|
+
const textLines = text.split("\n");
|
|
506
|
+
const boxLines = [];
|
|
507
|
+
const _color = getColor(opts.style.borderColor);
|
|
508
|
+
const borderStyle = {
|
|
509
|
+
...typeof opts.style.borderStyle === "string" ? boxStylePresets[opts.style.borderStyle] || boxStylePresets.solid : opts.style.borderStyle
|
|
510
|
+
};
|
|
511
|
+
if (_color) {
|
|
512
|
+
for (const key in borderStyle) {
|
|
513
|
+
borderStyle[key] = _color(borderStyle[key]);
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;
|
|
517
|
+
const height = textLines.length + paddingOffset;
|
|
518
|
+
const width = Math.max(...textLines.map((line) => line.length)) + paddingOffset;
|
|
519
|
+
const widthOffset = width + paddingOffset;
|
|
520
|
+
const leftSpace = opts.style.marginLeft > 0 ? " ".repeat(opts.style.marginLeft) : "";
|
|
521
|
+
if (opts.style.marginTop > 0) {
|
|
522
|
+
boxLines.push("".repeat(opts.style.marginTop));
|
|
523
|
+
}
|
|
524
|
+
if (opts.title) {
|
|
525
|
+
const left = borderStyle.h.repeat(Math.floor((width - stripAnsi(opts.title).length) / 2));
|
|
526
|
+
const right = borderStyle.h.repeat(width - stripAnsi(opts.title).length - stripAnsi(left).length + paddingOffset);
|
|
527
|
+
boxLines.push(`${leftSpace}${borderStyle.tl}${left}${opts.title}${right}${borderStyle.tr}`);
|
|
528
|
+
} else {
|
|
529
|
+
boxLines.push(`${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`);
|
|
530
|
+
}
|
|
531
|
+
const valignOffset = opts.style.valign === "center" ? Math.floor((height - textLines.length) / 2) : opts.style.valign === "top" ? height - textLines.length - paddingOffset : height - textLines.length;
|
|
532
|
+
for (let i = 0;i < height; i++) {
|
|
533
|
+
if (i < valignOffset || i >= valignOffset + textLines.length) {
|
|
534
|
+
boxLines.push(`${leftSpace}${borderStyle.v}${" ".repeat(widthOffset)}${borderStyle.v}`);
|
|
535
|
+
} else {
|
|
536
|
+
const line = textLines[i - valignOffset];
|
|
537
|
+
const left = " ".repeat(paddingOffset);
|
|
538
|
+
const right = " ".repeat(width - stripAnsi(line).length);
|
|
539
|
+
boxLines.push(`${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`);
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
boxLines.push(`${leftSpace}${borderStyle.bl}${borderStyle.h.repeat(widthOffset)}${borderStyle.br}`);
|
|
543
|
+
if (opts.style.marginBottom > 0) {
|
|
544
|
+
boxLines.push("".repeat(opts.style.marginBottom));
|
|
545
|
+
}
|
|
546
|
+
return boxLines.join("\n");
|
|
547
|
+
};
|
|
548
|
+
({
|
|
549
|
+
env = {},
|
|
550
|
+
argv = [],
|
|
551
|
+
platform = ""
|
|
552
|
+
} = typeof process === "undefined" ? {} : process);
|
|
553
|
+
isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
|
|
554
|
+
isForced = "FORCE_COLOR" in env || argv.includes("--color");
|
|
555
|
+
isWindows = platform === "win32";
|
|
556
|
+
isDumbTerminal = env.TERM === "dumb";
|
|
557
|
+
isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;
|
|
558
|
+
isCI = "CI" in env && (("GITHUB_ACTIONS" in env) || ("GITLAB_CI" in env) || ("CIRCLECI" in env));
|
|
559
|
+
isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);
|
|
560
|
+
colorDefs = {
|
|
561
|
+
reset: init(0, 0),
|
|
562
|
+
bold: init(1, 22, "\x1B[22m\x1B[1m"),
|
|
563
|
+
dim: init(2, 22, "\x1B[22m\x1B[2m"),
|
|
564
|
+
italic: init(3, 23),
|
|
565
|
+
underline: init(4, 24),
|
|
566
|
+
inverse: init(7, 27),
|
|
567
|
+
hidden: init(8, 28),
|
|
568
|
+
strikethrough: init(9, 29),
|
|
569
|
+
black: init(30, 39),
|
|
570
|
+
red: init(31, 39),
|
|
571
|
+
green: init(32, 39),
|
|
572
|
+
yellow: init(33, 39),
|
|
573
|
+
blue: init(34, 39),
|
|
574
|
+
magenta: init(35, 39),
|
|
575
|
+
cyan: init(36, 39),
|
|
576
|
+
white: init(37, 39),
|
|
577
|
+
gray: init(90, 39),
|
|
578
|
+
bgBlack: init(40, 49),
|
|
579
|
+
bgRed: init(41, 49),
|
|
580
|
+
bgGreen: init(42, 49),
|
|
581
|
+
bgYellow: init(43, 49),
|
|
582
|
+
bgBlue: init(44, 49),
|
|
583
|
+
bgMagenta: init(45, 49),
|
|
584
|
+
bgCyan: init(46, 49),
|
|
585
|
+
bgWhite: init(47, 49),
|
|
586
|
+
blackBright: init(90, 39),
|
|
587
|
+
redBright: init(91, 39),
|
|
588
|
+
greenBright: init(92, 39),
|
|
589
|
+
yellowBright: init(93, 39),
|
|
590
|
+
blueBright: init(94, 39),
|
|
591
|
+
magentaBright: init(95, 39),
|
|
592
|
+
cyanBright: init(96, 39),
|
|
593
|
+
whiteBright: init(97, 39),
|
|
594
|
+
bgBlackBright: init(100, 49),
|
|
595
|
+
bgRedBright: init(101, 49),
|
|
596
|
+
bgGreenBright: init(102, 49),
|
|
597
|
+
bgYellowBright: init(103, 49),
|
|
598
|
+
bgBlueBright: init(104, 49),
|
|
599
|
+
bgMagentaBright: init(105, 49),
|
|
600
|
+
bgCyanBright: init(106, 49),
|
|
601
|
+
bgWhiteBright: init(107, 49)
|
|
602
|
+
};
|
|
603
|
+
colors = createColors();
|
|
604
|
+
ansiRegex = [
|
|
605
|
+
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
606
|
+
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"
|
|
607
|
+
].join("|");
|
|
608
|
+
boxStylePresets = {
|
|
609
|
+
solid: {
|
|
610
|
+
tl: "\u250C",
|
|
611
|
+
tr: "\u2510",
|
|
612
|
+
bl: "\u2514",
|
|
613
|
+
br: "\u2518",
|
|
614
|
+
h: "\u2500",
|
|
615
|
+
v: "\u2502"
|
|
616
|
+
},
|
|
617
|
+
double: {
|
|
618
|
+
tl: "\u2554",
|
|
619
|
+
tr: "\u2557",
|
|
620
|
+
bl: "\u255A",
|
|
621
|
+
br: "\u255D",
|
|
622
|
+
h: "\u2550",
|
|
623
|
+
v: "\u2551"
|
|
624
|
+
},
|
|
625
|
+
doubleSingle: {
|
|
626
|
+
tl: "\u2553",
|
|
627
|
+
tr: "\u2556",
|
|
628
|
+
bl: "\u2559",
|
|
629
|
+
br: "\u255C",
|
|
630
|
+
h: "\u2500",
|
|
631
|
+
v: "\u2551"
|
|
632
|
+
},
|
|
633
|
+
doubleSingleRounded: {
|
|
634
|
+
tl: "\u256D",
|
|
635
|
+
tr: "\u256E",
|
|
636
|
+
bl: "\u2570",
|
|
637
|
+
br: "\u256F",
|
|
638
|
+
h: "\u2500",
|
|
639
|
+
v: "\u2551"
|
|
640
|
+
},
|
|
641
|
+
singleThick: {
|
|
642
|
+
tl: "\u250F",
|
|
643
|
+
tr: "\u2513",
|
|
644
|
+
bl: "\u2517",
|
|
645
|
+
br: "\u251B",
|
|
646
|
+
h: "\u2501",
|
|
647
|
+
v: "\u2503"
|
|
648
|
+
},
|
|
649
|
+
singleDouble: {
|
|
650
|
+
tl: "\u2552",
|
|
651
|
+
tr: "\u2555",
|
|
652
|
+
bl: "\u2558",
|
|
653
|
+
br: "\u255B",
|
|
654
|
+
h: "\u2550",
|
|
655
|
+
v: "\u2502"
|
|
656
|
+
},
|
|
657
|
+
singleDoubleRounded: {
|
|
658
|
+
tl: "\u256D",
|
|
659
|
+
tr: "\u256E",
|
|
660
|
+
bl: "\u2570",
|
|
661
|
+
br: "\u256F",
|
|
662
|
+
h: "\u2550",
|
|
663
|
+
v: "\u2502"
|
|
664
|
+
},
|
|
665
|
+
rounded: {
|
|
666
|
+
tl: "\u256D",
|
|
667
|
+
tr: "\u256E",
|
|
668
|
+
bl: "\u2570",
|
|
669
|
+
br: "\u256F",
|
|
670
|
+
h: "\u2500",
|
|
671
|
+
v: "\u2502"
|
|
672
|
+
}
|
|
673
|
+
};
|
|
674
|
+
defaultStyle = {
|
|
675
|
+
borderColor: "white",
|
|
676
|
+
borderStyle: "rounded",
|
|
677
|
+
valign: "center",
|
|
678
|
+
padding: 2,
|
|
679
|
+
marginLeft: 1,
|
|
680
|
+
marginTop: 1,
|
|
681
|
+
marginBottom: 1
|
|
682
|
+
};
|
|
683
|
+
});
|
|
684
|
+
|
|
685
|
+
// ../../../../node_modules/consola/dist/chunks/prompt.mjs
|
|
686
|
+
var exports_prompt = {};
|
|
687
|
+
__export(exports_prompt, {
|
|
688
|
+
prompt: () => {
|
|
689
|
+
{
|
|
690
|
+
return prompt;
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
});
|
|
694
|
+
import {stdin, stdout} from "node:process";
|
|
695
|
+
import f from "node:readline";
|
|
696
|
+
import {WriteStream} from "node:tty";
|
|
697
|
+
import require$$0 from "tty";
|
|
698
|
+
async function prompt(message, opts = {}) {
|
|
699
|
+
if (!opts.type || opts.type === "text") {
|
|
700
|
+
return await text({
|
|
701
|
+
message,
|
|
702
|
+
defaultValue: opts.default,
|
|
703
|
+
placeholder: opts.placeholder,
|
|
704
|
+
initialValue: opts.initial
|
|
705
|
+
});
|
|
706
|
+
}
|
|
707
|
+
if (opts.type === "confirm") {
|
|
708
|
+
return await confirm({
|
|
709
|
+
message,
|
|
710
|
+
initialValue: opts.initial
|
|
711
|
+
});
|
|
712
|
+
}
|
|
713
|
+
if (opts.type === "select") {
|
|
714
|
+
return await select({
|
|
715
|
+
message,
|
|
716
|
+
options: opts.options.map((o) => typeof o === "string" ? { value: o, label: o } : o)
|
|
717
|
+
});
|
|
718
|
+
}
|
|
719
|
+
if (opts.type === "multiselect") {
|
|
720
|
+
return await multiselect({
|
|
721
|
+
message,
|
|
722
|
+
options: opts.options.map((o) => typeof o === "string" ? { value: o, label: o } : o),
|
|
723
|
+
required: opts.required
|
|
724
|
+
});
|
|
725
|
+
}
|
|
726
|
+
throw new Error(`Unknown prompt type: ${opts.type}`);
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
class h {
|
|
730
|
+
constructor({ render: u, input: F = stdin, output: e = stdout, ...s }, C = true) {
|
|
731
|
+
this._track = false, this._cursor = 0, this.state = "initial", this.error = "", this.subscribers = new Map, this._prevFrame = "", this.opts = s, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = u.bind(this), this._track = C, this.input = F, this.output = e;
|
|
732
|
+
}
|
|
733
|
+
prompt() {
|
|
734
|
+
const u = new WriteStream(0);
|
|
735
|
+
return u._write = (F, e, s) => {
|
|
736
|
+
this._track && (this.value = this.rl.line.replace(/\t/g, ""), this._cursor = this.rl.cursor, this.emit("value", this.value)), s();
|
|
737
|
+
}, this.input.pipe(u), this.rl = f.createInterface({ input: this.input, output: u, tabSize: 2, prompt: "", escapeCodeTimeout: 50 }), f.emitKeypressEvents(this.input, this.rl), this.rl.prompt(), this.opts.initialValue !== undefined && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), g(this.input, true), this.output.on("resize", this.render), this.render(), new Promise((F, e) => {
|
|
738
|
+
this.once("submit", () => {
|
|
739
|
+
this.output.write(src.cursor.show), this.output.off("resize", this.render), g(this.input, false), F(this.value);
|
|
740
|
+
}), this.once("cancel", () => {
|
|
741
|
+
this.output.write(src.cursor.show), this.output.off("resize", this.render), g(this.input, false), F(R);
|
|
742
|
+
});
|
|
743
|
+
});
|
|
744
|
+
}
|
|
745
|
+
on(u, F) {
|
|
746
|
+
const e = this.subscribers.get(u) ?? [];
|
|
747
|
+
e.push({ cb: F }), this.subscribers.set(u, e);
|
|
748
|
+
}
|
|
749
|
+
once(u, F) {
|
|
750
|
+
const e = this.subscribers.get(u) ?? [];
|
|
751
|
+
e.push({ cb: F, once: true }), this.subscribers.set(u, e);
|
|
752
|
+
}
|
|
753
|
+
emit(u, ...F) {
|
|
754
|
+
const e = this.subscribers.get(u) ?? [], s = [];
|
|
755
|
+
for (const C of e)
|
|
756
|
+
C.cb(...F), C.once && s.push(() => e.splice(e.indexOf(C), 1));
|
|
757
|
+
for (const C of s)
|
|
758
|
+
C();
|
|
759
|
+
}
|
|
760
|
+
unsubscribe() {
|
|
761
|
+
this.subscribers.clear();
|
|
762
|
+
}
|
|
763
|
+
onKeypress(u, F) {
|
|
764
|
+
if (this.state === "error" && (this.state = "active"), F?.name && !this._track && V.has(F.name) && this.emit("cursor", V.get(F.name)), F?.name && tD.has(F.name) && this.emit("cursor", F.name), u && (u.toLowerCase() === "y" || u.toLowerCase() === "n") && this.emit("confirm", u.toLowerCase() === "y"), u && this.emit("key", u.toLowerCase()), F?.name === "return") {
|
|
765
|
+
if (this.opts.validate) {
|
|
766
|
+
const e = this.opts.validate(this.value);
|
|
767
|
+
e && (this.error = e, this.state = "error", this.rl.write(this.value));
|
|
768
|
+
}
|
|
769
|
+
this.state !== "error" && (this.state = "submit");
|
|
770
|
+
}
|
|
771
|
+
u === "" && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
|
|
772
|
+
}
|
|
773
|
+
close() {
|
|
774
|
+
this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
|
|
775
|
+
`), g(this.input, false), this.rl.close(), this.emit(`${this.state}`, this.value), this.unsubscribe();
|
|
776
|
+
}
|
|
777
|
+
restoreCursor() {
|
|
778
|
+
const u = P(this._prevFrame, process.stdout.columns, { hard: true }).split(`
|
|
779
|
+
`).length - 1;
|
|
780
|
+
this.output.write(src.cursor.move(-999, u * -1));
|
|
781
|
+
}
|
|
782
|
+
render() {
|
|
783
|
+
const u = P(this._render(this) ?? "", process.stdout.columns, { hard: true });
|
|
784
|
+
if (u !== this._prevFrame) {
|
|
785
|
+
if (this.state === "initial")
|
|
786
|
+
this.output.write(src.cursor.hide);
|
|
787
|
+
else {
|
|
788
|
+
const F = FD(this._prevFrame, u);
|
|
789
|
+
if (this.restoreCursor(), F && F?.length === 1) {
|
|
790
|
+
const e = F[0];
|
|
791
|
+
this.output.write(src.cursor.move(0, e)), this.output.write(src.erase.lines(1));
|
|
792
|
+
const s = u.split(`
|
|
793
|
+
`);
|
|
794
|
+
this.output.write(s[e]), this._prevFrame = u, this.output.write(src.cursor.move(0, s.length - e - 1));
|
|
795
|
+
return;
|
|
796
|
+
} else if (F && F?.length > 1) {
|
|
797
|
+
const e = F[0];
|
|
798
|
+
this.output.write(src.cursor.move(0, e)), this.output.write(src.erase.down());
|
|
799
|
+
const C = u.split(`
|
|
800
|
+
`).slice(e);
|
|
801
|
+
this.output.write(C.join(`
|
|
802
|
+
`)), this._prevFrame = u;
|
|
803
|
+
return;
|
|
804
|
+
}
|
|
805
|
+
this.output.write(src.erase.down());
|
|
806
|
+
}
|
|
807
|
+
this.output.write(u), this.state === "initial" && (this.state = "active"), this._prevFrame = u;
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
class sD extends h {
|
|
813
|
+
get cursor() {
|
|
814
|
+
return this.value ? 0 : 1;
|
|
815
|
+
}
|
|
816
|
+
get _value() {
|
|
817
|
+
return this.cursor === 0;
|
|
818
|
+
}
|
|
819
|
+
constructor(u) {
|
|
820
|
+
super(u, false), this.value = !!u.initialValue, this.on("value", () => {
|
|
821
|
+
this.value = this._value;
|
|
822
|
+
}), this.on("confirm", (F) => {
|
|
823
|
+
this.output.write(src.cursor.move(0, -1)), this.value = F, this.state = "submit", this.close();
|
|
824
|
+
}), this.on("cursor", () => {
|
|
825
|
+
this.value = !this.value;
|
|
826
|
+
});
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
class iD extends h {
|
|
831
|
+
constructor(u) {
|
|
832
|
+
super(u, false), this.cursor = 0, this.options = u.options, this.value = [...u.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: F }) => F === u.cursorAt), 0), this.on("key", (F) => {
|
|
833
|
+
F === "a" && this.toggleAll();
|
|
834
|
+
}), this.on("cursor", (F) => {
|
|
835
|
+
switch (F) {
|
|
836
|
+
case "left":
|
|
837
|
+
case "up":
|
|
838
|
+
this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
|
|
839
|
+
break;
|
|
840
|
+
case "down":
|
|
841
|
+
case "right":
|
|
842
|
+
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
|
|
843
|
+
break;
|
|
844
|
+
case "space":
|
|
845
|
+
this.toggleValue();
|
|
846
|
+
break;
|
|
847
|
+
}
|
|
848
|
+
});
|
|
849
|
+
}
|
|
850
|
+
get _value() {
|
|
851
|
+
return this.options[this.cursor].value;
|
|
852
|
+
}
|
|
853
|
+
toggleAll() {
|
|
854
|
+
const u = this.value.length === this.options.length;
|
|
855
|
+
this.value = u ? [] : this.options.map((F) => F.value);
|
|
856
|
+
}
|
|
857
|
+
toggleValue() {
|
|
858
|
+
const u = this.value.includes(this._value);
|
|
859
|
+
this.value = u ? this.value.filter((F) => F !== this._value) : [...this.value, this._value];
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
class ED extends h {
|
|
864
|
+
constructor(u) {
|
|
865
|
+
super(u, false), this.cursor = 0, this.options = u.options, this.cursor = this.options.findIndex(({ value: F }) => F === u.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (F) => {
|
|
866
|
+
switch (F) {
|
|
867
|
+
case "left":
|
|
868
|
+
case "up":
|
|
869
|
+
this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
|
|
870
|
+
break;
|
|
871
|
+
case "down":
|
|
872
|
+
case "right":
|
|
873
|
+
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
|
|
874
|
+
break;
|
|
875
|
+
}
|
|
876
|
+
this.changeValue();
|
|
877
|
+
});
|
|
878
|
+
}
|
|
879
|
+
get _value() {
|
|
880
|
+
return this.options[this.cursor];
|
|
881
|
+
}
|
|
882
|
+
changeValue() {
|
|
883
|
+
this.value = this._value.value;
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
class oD extends h {
|
|
888
|
+
constructor(u) {
|
|
889
|
+
super(u), this.valueWithCursor = "", this.on("finalize", () => {
|
|
890
|
+
this.value || (this.value = u.defaultValue), this.valueWithCursor = this.value;
|
|
891
|
+
}), this.on("value", () => {
|
|
892
|
+
if (this.cursor >= this.value.length)
|
|
893
|
+
this.valueWithCursor = `${this.value}${l.inverse(l.hidden("_"))}`;
|
|
894
|
+
else {
|
|
895
|
+
const F = this.value.slice(0, this.cursor), e = this.value.slice(this.cursor);
|
|
896
|
+
this.valueWithCursor = `${F}${l.inverse(e[0])}${e.slice(1)}`;
|
|
897
|
+
}
|
|
898
|
+
});
|
|
899
|
+
}
|
|
900
|
+
get cursor() {
|
|
901
|
+
return this._cursor;
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
var z, $, c, U, P, FD, g, ESC, CSI, beep, cursor, scroll, erase, src, picocolors, tty2, isColorSupported2, formatter, replaceClose2, createColors2, picocolorsExports, l, m, G, K, Y, v, L, M, T, r, Z, H, q, p, J, b, W, Q, I, w, N, j, X, _, DD, uD, R, V, tD, unicode, s, S_STEP_ACTIVE, S_STEP_CANCEL, S_STEP_ERROR, S_STEP_SUBMIT, S_BAR, S_BAR_END, S_RADIO_ACTIVE, S_RADIO_INACTIVE, S_CHECKBOX_ACTIVE, S_CHECKBOX_SELECTED, S_CHECKBOX_INACTIVE, symbol, text, confirm, select, multiselect;
|
|
905
|
+
var init_prompt = __esm(() => {
|
|
906
|
+
init_consola_36c0034f();
|
|
907
|
+
init_utils();
|
|
908
|
+
init_core();
|
|
909
|
+
init_consola_06ad8a64();
|
|
910
|
+
z = function({ onlyFirst: t = false } = {}) {
|
|
911
|
+
const u = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");
|
|
912
|
+
return new RegExp(u, t ? undefined : "g");
|
|
913
|
+
};
|
|
914
|
+
$ = function(t) {
|
|
915
|
+
if (typeof t != "string")
|
|
916
|
+
throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);
|
|
917
|
+
return t.replace(z(), "");
|
|
918
|
+
};
|
|
919
|
+
c = function(t, u = {}) {
|
|
920
|
+
if (typeof t != "string" || t.length === 0 || (u = { ambiguousIsNarrow: true, ...u }, t = $(t), t.length === 0))
|
|
921
|
+
return 0;
|
|
922
|
+
t = t.replace(Y(), " ");
|
|
923
|
+
const F = u.ambiguousIsNarrow ? 1 : 2;
|
|
924
|
+
let e = 0;
|
|
925
|
+
for (const s of t) {
|
|
926
|
+
const C = s.codePointAt(0);
|
|
927
|
+
if (C <= 31 || C >= 127 && C <= 159 || C >= 768 && C <= 879)
|
|
928
|
+
continue;
|
|
929
|
+
switch (K.eastAsianWidth(s)) {
|
|
930
|
+
case "F":
|
|
931
|
+
case "W":
|
|
932
|
+
e += 2;
|
|
933
|
+
break;
|
|
934
|
+
case "A":
|
|
935
|
+
e += F;
|
|
936
|
+
break;
|
|
937
|
+
default:
|
|
938
|
+
e += 1;
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
return e;
|
|
942
|
+
};
|
|
943
|
+
U = function() {
|
|
944
|
+
const t = new Map;
|
|
945
|
+
for (const [u, F] of Object.entries(r)) {
|
|
946
|
+
for (const [e, s] of Object.entries(F))
|
|
947
|
+
r[e] = { open: `\x1B[${s[0]}m`, close: `\x1B[${s[1]}m` }, F[e] = r[e], t.set(s[0], s[1]);
|
|
948
|
+
Object.defineProperty(r, u, { value: F, enumerable: false });
|
|
949
|
+
}
|
|
950
|
+
return Object.defineProperty(r, "codes", { value: t, enumerable: false }), r.color.close = "\x1B[39m", r.bgColor.close = "\x1B[49m", r.color.ansi = L(), r.color.ansi256 = M(), r.color.ansi16m = T(), r.bgColor.ansi = L(v), r.bgColor.ansi256 = M(v), r.bgColor.ansi16m = T(v), Object.defineProperties(r, { rgbToAnsi256: { value: (u, F, e) => u === F && F === e ? u < 8 ? 16 : u > 248 ? 231 : Math.round((u - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u / 255 * 5) + 6 * Math.round(F / 255 * 5) + Math.round(e / 255 * 5), enumerable: false }, hexToRgb: { value: (u) => {
|
|
951
|
+
const F = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));
|
|
952
|
+
if (!F)
|
|
953
|
+
return [0, 0, 0];
|
|
954
|
+
let [e] = F;
|
|
955
|
+
e.length === 3 && (e = [...e].map((C) => C + C).join(""));
|
|
956
|
+
const s = Number.parseInt(e, 16);
|
|
957
|
+
return [s >> 16 & 255, s >> 8 & 255, s & 255];
|
|
958
|
+
}, enumerable: false }, hexToAnsi256: { value: (u) => r.rgbToAnsi256(...r.hexToRgb(u)), enumerable: false }, ansi256ToAnsi: { value: (u) => {
|
|
959
|
+
if (u < 8)
|
|
960
|
+
return 30 + u;
|
|
961
|
+
if (u < 16)
|
|
962
|
+
return 90 + (u - 8);
|
|
963
|
+
let F, e, s;
|
|
964
|
+
if (u >= 232)
|
|
965
|
+
F = ((u - 232) * 10 + 8) / 255, e = F, s = F;
|
|
966
|
+
else {
|
|
967
|
+
u -= 16;
|
|
968
|
+
const i = u % 36;
|
|
969
|
+
F = Math.floor(u / 36) / 5, e = Math.floor(i / 6) / 5, s = i % 6 / 5;
|
|
970
|
+
}
|
|
971
|
+
const C = Math.max(F, e, s) * 2;
|
|
972
|
+
if (C === 0)
|
|
973
|
+
return 30;
|
|
974
|
+
let D = 30 + (Math.round(s) << 2 | Math.round(e) << 1 | Math.round(F));
|
|
975
|
+
return C === 2 && (D += 60), D;
|
|
976
|
+
}, enumerable: false }, rgbToAnsi: { value: (u, F, e) => r.ansi256ToAnsi(r.rgbToAnsi256(u, F, e)), enumerable: false }, hexToAnsi: { value: (u) => r.ansi256ToAnsi(r.hexToAnsi256(u)), enumerable: false } }), r;
|
|
977
|
+
};
|
|
978
|
+
P = function(t, u, F) {
|
|
979
|
+
return String(t).normalize().replace(/\r\n/g, `
|
|
980
|
+
`).split(`
|
|
981
|
+
`).map((e) => uD(e, u, F)).join(`
|
|
982
|
+
`);
|
|
983
|
+
};
|
|
984
|
+
FD = function(t, u) {
|
|
985
|
+
if (t === u)
|
|
986
|
+
return;
|
|
987
|
+
const F = t.split(`
|
|
988
|
+
`), e = u.split(`
|
|
989
|
+
`), s = [];
|
|
990
|
+
for (let C = 0;C < Math.max(F.length, e.length); C++)
|
|
991
|
+
F[C] !== e[C] && s.push(C);
|
|
992
|
+
return s;
|
|
993
|
+
};
|
|
994
|
+
g = function(t, u) {
|
|
995
|
+
t.isTTY && t.setRawMode(u);
|
|
996
|
+
};
|
|
997
|
+
ESC = "\x1B";
|
|
998
|
+
CSI = `${ESC}[`;
|
|
999
|
+
beep = "\x07";
|
|
1000
|
+
cursor = {
|
|
1001
|
+
to(x, y) {
|
|
1002
|
+
if (!y)
|
|
1003
|
+
return `${CSI}${x + 1}G`;
|
|
1004
|
+
return `${CSI}${y + 1};${x + 1}H`;
|
|
1005
|
+
},
|
|
1006
|
+
move(x, y) {
|
|
1007
|
+
let ret = "";
|
|
1008
|
+
if (x < 0)
|
|
1009
|
+
ret += `${CSI}${-x}D`;
|
|
1010
|
+
else if (x > 0)
|
|
1011
|
+
ret += `${CSI}${x}C`;
|
|
1012
|
+
if (y < 0)
|
|
1013
|
+
ret += `${CSI}${-y}A`;
|
|
1014
|
+
else if (y > 0)
|
|
1015
|
+
ret += `${CSI}${y}B`;
|
|
1016
|
+
return ret;
|
|
1017
|
+
},
|
|
1018
|
+
up: (count = 1) => `${CSI}${count}A`,
|
|
1019
|
+
down: (count = 1) => `${CSI}${count}B`,
|
|
1020
|
+
forward: (count = 1) => `${CSI}${count}C`,
|
|
1021
|
+
backward: (count = 1) => `${CSI}${count}D`,
|
|
1022
|
+
nextLine: (count = 1) => `${CSI}E`.repeat(count),
|
|
1023
|
+
prevLine: (count = 1) => `${CSI}F`.repeat(count),
|
|
1024
|
+
left: `${CSI}G`,
|
|
1025
|
+
hide: `${CSI}?25l`,
|
|
1026
|
+
show: `${CSI}?25h`,
|
|
1027
|
+
save: `${ESC}7`,
|
|
1028
|
+
restore: `${ESC}8`
|
|
1029
|
+
};
|
|
1030
|
+
scroll = {
|
|
1031
|
+
up: (count = 1) => `${CSI}S`.repeat(count),
|
|
1032
|
+
down: (count = 1) => `${CSI}T`.repeat(count)
|
|
1033
|
+
};
|
|
1034
|
+
erase = {
|
|
1035
|
+
screen: `${CSI}2J`,
|
|
1036
|
+
up: (count = 1) => `${CSI}1J`.repeat(count),
|
|
1037
|
+
down: (count = 1) => `${CSI}J`.repeat(count),
|
|
1038
|
+
line: `${CSI}2K`,
|
|
1039
|
+
lineEnd: `${CSI}K`,
|
|
1040
|
+
lineStart: `${CSI}1K`,
|
|
1041
|
+
lines(count) {
|
|
1042
|
+
let clear = "";
|
|
1043
|
+
for (let i = 0;i < count; i++)
|
|
1044
|
+
clear += this.line + (i < count - 1 ? cursor.up() : "");
|
|
1045
|
+
if (count)
|
|
1046
|
+
clear += cursor.left;
|
|
1047
|
+
return clear;
|
|
1048
|
+
}
|
|
1049
|
+
};
|
|
1050
|
+
src = { cursor, scroll, erase, beep };
|
|
1051
|
+
picocolors = { exports: {} };
|
|
1052
|
+
tty2 = require$$0;
|
|
1053
|
+
isColorSupported2 = !(("NO_COLOR" in process.env) || process.argv.includes("--no-color")) && (("FORCE_COLOR" in process.env) || process.argv.includes("--color") || process.platform === "win32" || tty2.isatty(1) && process.env.TERM !== "dumb" || ("CI" in process.env));
|
|
1054
|
+
formatter = (open, close, replace = open) => (input) => {
|
|
1055
|
+
let string = "" + input;
|
|
1056
|
+
let index = string.indexOf(close, open.length);
|
|
1057
|
+
return ~index ? open + replaceClose2(string, close, replace, index) + close : open + string + close;
|
|
1058
|
+
};
|
|
1059
|
+
replaceClose2 = (string, close, replace, index) => {
|
|
1060
|
+
let start = string.substring(0, index) + replace;
|
|
1061
|
+
let end = string.substring(index + close.length);
|
|
1062
|
+
let nextIndex = end.indexOf(close);
|
|
1063
|
+
return ~nextIndex ? start + replaceClose2(end, close, replace, nextIndex) : start + end;
|
|
1064
|
+
};
|
|
1065
|
+
createColors2 = (enabled = isColorSupported2) => ({
|
|
1066
|
+
isColorSupported: enabled,
|
|
1067
|
+
reset: enabled ? (s) => `\x1B[0m${s}\x1B[0m` : String,
|
|
1068
|
+
bold: enabled ? formatter("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m") : String,
|
|
1069
|
+
dim: enabled ? formatter("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m") : String,
|
|
1070
|
+
italic: enabled ? formatter("\x1B[3m", "\x1B[23m") : String,
|
|
1071
|
+
underline: enabled ? formatter("\x1B[4m", "\x1B[24m") : String,
|
|
1072
|
+
inverse: enabled ? formatter("\x1B[7m", "\x1B[27m") : String,
|
|
1073
|
+
hidden: enabled ? formatter("\x1B[8m", "\x1B[28m") : String,
|
|
1074
|
+
strikethrough: enabled ? formatter("\x1B[9m", "\x1B[29m") : String,
|
|
1075
|
+
black: enabled ? formatter("\x1B[30m", "\x1B[39m") : String,
|
|
1076
|
+
red: enabled ? formatter("\x1B[31m", "\x1B[39m") : String,
|
|
1077
|
+
green: enabled ? formatter("\x1B[32m", "\x1B[39m") : String,
|
|
1078
|
+
yellow: enabled ? formatter("\x1B[33m", "\x1B[39m") : String,
|
|
1079
|
+
blue: enabled ? formatter("\x1B[34m", "\x1B[39m") : String,
|
|
1080
|
+
magenta: enabled ? formatter("\x1B[35m", "\x1B[39m") : String,
|
|
1081
|
+
cyan: enabled ? formatter("\x1B[36m", "\x1B[39m") : String,
|
|
1082
|
+
white: enabled ? formatter("\x1B[37m", "\x1B[39m") : String,
|
|
1083
|
+
gray: enabled ? formatter("\x1B[90m", "\x1B[39m") : String,
|
|
1084
|
+
bgBlack: enabled ? formatter("\x1B[40m", "\x1B[49m") : String,
|
|
1085
|
+
bgRed: enabled ? formatter("\x1B[41m", "\x1B[49m") : String,
|
|
1086
|
+
bgGreen: enabled ? formatter("\x1B[42m", "\x1B[49m") : String,
|
|
1087
|
+
bgYellow: enabled ? formatter("\x1B[43m", "\x1B[49m") : String,
|
|
1088
|
+
bgBlue: enabled ? formatter("\x1B[44m", "\x1B[49m") : String,
|
|
1089
|
+
bgMagenta: enabled ? formatter("\x1B[45m", "\x1B[49m") : String,
|
|
1090
|
+
bgCyan: enabled ? formatter("\x1B[46m", "\x1B[49m") : String,
|
|
1091
|
+
bgWhite: enabled ? formatter("\x1B[47m", "\x1B[49m") : String
|
|
1092
|
+
});
|
|
1093
|
+
picocolors.exports = createColors2();
|
|
1094
|
+
picocolors.exports.createColors = createColors2;
|
|
1095
|
+
picocolorsExports = picocolors.exports;
|
|
1096
|
+
l = getDefaultExportFromCjs(picocolorsExports);
|
|
1097
|
+
m = {};
|
|
1098
|
+
G = { get exports() {
|
|
1099
|
+
return m;
|
|
1100
|
+
}, set exports(t) {
|
|
1101
|
+
m = t;
|
|
1102
|
+
} };
|
|
1103
|
+
(function(t) {
|
|
1104
|
+
var u = {};
|
|
1105
|
+
t.exports = u, u.eastAsianWidth = function(e) {
|
|
1106
|
+
var s = e.charCodeAt(0), C = e.length == 2 ? e.charCodeAt(1) : 0, D = s;
|
|
1107
|
+
return 55296 <= s && s <= 56319 && 56320 <= C && C <= 57343 && (s &= 1023, C &= 1023, D = s << 10 | C, D += 65536), D == 12288 || 65281 <= D && D <= 65376 || 65504 <= D && D <= 65510 ? "F" : D == 8361 || 65377 <= D && D <= 65470 || 65474 <= D && D <= 65479 || 65482 <= D && D <= 65487 || 65490 <= D && D <= 65495 || 65498 <= D && D <= 65500 || 65512 <= D && D <= 65518 ? "H" : 4352 <= D && D <= 4447 || 4515 <= D && D <= 4519 || 4602 <= D && D <= 4607 || 9001 <= D && D <= 9002 || 11904 <= D && D <= 11929 || 11931 <= D && D <= 12019 || 12032 <= D && D <= 12245 || 12272 <= D && D <= 12283 || 12289 <= D && D <= 12350 || 12353 <= D && D <= 12438 || 12441 <= D && D <= 12543 || 12549 <= D && D <= 12589 || 12593 <= D && D <= 12686 || 12688 <= D && D <= 12730 || 12736 <= D && D <= 12771 || 12784 <= D && D <= 12830 || 12832 <= D && D <= 12871 || 12880 <= D && D <= 13054 || 13056 <= D && D <= 19903 || 19968 <= D && D <= 42124 || 42128 <= D && D <= 42182 || 43360 <= D && D <= 43388 || 44032 <= D && D <= 55203 || 55216 <= D && D <= 55238 || 55243 <= D && D <= 55291 || 63744 <= D && D <= 64255 || 65040 <= D && D <= 65049 || 65072 <= D && D <= 65106 || 65108 <= D && D <= 65126 || 65128 <= D && D <= 65131 || 110592 <= D && D <= 110593 || 127488 <= D && D <= 127490 || 127504 <= D && D <= 127546 || 127552 <= D && D <= 127560 || 127568 <= D && D <= 127569 || 131072 <= D && D <= 194367 || 177984 <= D && D <= 196605 || 196608 <= D && D <= 262141 ? "W" : 32 <= D && D <= 126 || 162 <= D && D <= 163 || 165 <= D && D <= 166 || D == 172 || D == 175 || 10214 <= D && D <= 10221 || 10629 <= D && D <= 10630 ? "Na" : D == 161 || D == 164 || 167 <= D && D <= 168 || D == 170 || 173 <= D && D <= 174 || 176 <= D && D <= 180 || 182 <= D && D <= 186 || 188 <= D && D <= 191 || D == 198 || D == 208 || 215 <= D && D <= 216 || 222 <= D && D <= 225 || D == 230 || 232 <= D && D <= 234 || 236 <= D && D <= 237 || D == 240 || 242 <= D && D <= 243 || 247 <= D && D <= 250 || D == 252 || D == 254 || D == 257 || D == 273 || D == 275 || D == 283 || 294 <= D && D <= 295 || D == 299 || 305 <= D && D <= 307 || D == 312 || 319 <= D && D <= 322 || D == 324 || 328 <= D && D <= 331 || D == 333 || 338 <= D && D <= 339 || 358 <= D && D <= 359 || D == 363 || D == 462 || D == 464 || D == 466 || D == 468 || D == 470 || D == 472 || D == 474 || D == 476 || D == 593 || D == 609 || D == 708 || D == 711 || 713 <= D && D <= 715 || D == 717 || D == 720 || 728 <= D && D <= 731 || D == 733 || D == 735 || 768 <= D && D <= 879 || 913 <= D && D <= 929 || 931 <= D && D <= 937 || 945 <= D && D <= 961 || 963 <= D && D <= 969 || D == 1025 || 1040 <= D && D <= 1103 || D == 1105 || D == 8208 || 8211 <= D && D <= 8214 || 8216 <= D && D <= 8217 || 8220 <= D && D <= 8221 || 8224 <= D && D <= 8226 || 8228 <= D && D <= 8231 || D == 8240 || 8242 <= D && D <= 8243 || D == 8245 || D == 8251 || D == 8254 || D == 8308 || D == 8319 || 8321 <= D && D <= 8324 || D == 8364 || D == 8451 || D == 8453 || D == 8457 || D == 8467 || D == 8470 || 8481 <= D && D <= 8482 || D == 8486 || D == 8491 || 8531 <= D && D <= 8532 || 8539 <= D && D <= 8542 || 8544 <= D && D <= 8555 || 8560 <= D && D <= 8569 || D == 8585 || 8592 <= D && D <= 8601 || 8632 <= D && D <= 8633 || D == 8658 || D == 8660 || D == 8679 || D == 8704 || 8706 <= D && D <= 8707 || 8711 <= D && D <= 8712 || D == 8715 || D == 8719 || D == 8721 || D == 8725 || D == 8730 || 8733 <= D && D <= 8736 || D == 8739 || D == 8741 || 8743 <= D && D <= 8748 || D == 8750 || 8756 <= D && D <= 8759 || 8764 <= D && D <= 8765 || D == 8776 || D == 8780 || D == 8786 || 8800 <= D && D <= 8801 || 8804 <= D && D <= 8807 || 8810 <= D && D <= 8811 || 8814 <= D && D <= 8815 || 8834 <= D && D <= 8835 || 8838 <= D && D <= 8839 || D == 8853 || D == 8857 || D == 8869 || D == 8895 || D == 8978 || 9312 <= D && D <= 9449 || 9451 <= D && D <= 9547 || 9552 <= D && D <= 9587 || 9600 <= D && D <= 9615 || 9618 <= D && D <= 9621 || 9632 <= D && D <= 9633 || 9635 <= D && D <= 9641 || 9650 <= D && D <= 9651 || 9654 <= D && D <= 9655 || 9660 <= D && D <= 9661 || 9664 <= D && D <= 9665 || 9670 <= D && D <= 9672 || D == 9675 || 9678 <= D && D <= 9681 || 9698 <= D && D <= 9701 || D == 9711 || 9733 <= D && D <= 9734 || D == 9737 || 9742 <= D && D <= 9743 || 9748 <= D && D <= 9749 || D == 9756 || D == 9758 || D == 9792 || D == 9794 || 9824 <= D && D <= 9825 || 9827 <= D && D <= 9829 || 9831 <= D && D <= 9834 || 9836 <= D && D <= 9837 || D == 9839 || 9886 <= D && D <= 9887 || 9918 <= D && D <= 9919 || 9924 <= D && D <= 9933 || 9935 <= D && D <= 9953 || D == 9955 || 9960 <= D && D <= 9983 || D == 10045 || D == 10071 || 10102 <= D && D <= 10111 || 11093 <= D && D <= 11097 || 12872 <= D && D <= 12879 || 57344 <= D && D <= 63743 || 65024 <= D && D <= 65039 || D == 65533 || 127232 <= D && D <= 127242 || 127248 <= D && D <= 127277 || 127280 <= D && D <= 127337 || 127344 <= D && D <= 127386 || 917760 <= D && D <= 917999 || 983040 <= D && D <= 1048573 || 1048576 <= D && D <= 1114109 ? "A" : "N";
|
|
1108
|
+
}, u.characterLength = function(e) {
|
|
1109
|
+
var s = this.eastAsianWidth(e);
|
|
1110
|
+
return s == "F" || s == "W" || s == "A" ? 2 : 1;
|
|
1111
|
+
};
|
|
1112
|
+
function F(e) {
|
|
1113
|
+
return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
|
|
1114
|
+
}
|
|
1115
|
+
u.length = function(e) {
|
|
1116
|
+
for (var s = F(e), C = 0, D = 0;D < s.length; D++)
|
|
1117
|
+
C = C + this.characterLength(s[D]);
|
|
1118
|
+
return C;
|
|
1119
|
+
}, u.slice = function(e, s, C) {
|
|
1120
|
+
textLen = u.length(e), s = s || 0, C = C || 1, s < 0 && (s = textLen + s), C < 0 && (C = textLen + C);
|
|
1121
|
+
for (var D = "", i = 0, o = F(e), E = 0;E < o.length; E++) {
|
|
1122
|
+
var a = o[E], n = u.length(a);
|
|
1123
|
+
if (i >= s - (n == 2 ? 1 : 0))
|
|
1124
|
+
if (i + n <= C)
|
|
1125
|
+
D += a;
|
|
1126
|
+
else
|
|
1127
|
+
break;
|
|
1128
|
+
i += n;
|
|
1129
|
+
}
|
|
1130
|
+
return D;
|
|
1131
|
+
};
|
|
1132
|
+
})(G);
|
|
1133
|
+
K = m;
|
|
1134
|
+
Y = function() {
|
|
1135
|
+
return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
|
|
1136
|
+
};
|
|
1137
|
+
v = 10;
|
|
1138
|
+
L = (t = 0) => (u) => `\x1B[${u + t}m`;
|
|
1139
|
+
M = (t = 0) => (u) => `\x1B[${38 + t};5;${u}m`;
|
|
1140
|
+
T = (t = 0) => (u, F, e) => `\x1B[${38 + t};2;${u};${F};${e}m`;
|
|
1141
|
+
r = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], gray: [90, 39], grey: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgGray: [100, 49], bgGrey: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } };
|
|
1142
|
+
Object.keys(r.modifier);
|
|
1143
|
+
Z = Object.keys(r.color);
|
|
1144
|
+
H = Object.keys(r.bgColor);
|
|
1145
|
+
[...Z];
|
|
1146
|
+
q = U();
|
|
1147
|
+
p = new Set(["\x1B", "\x9B"]);
|
|
1148
|
+
J = 39;
|
|
1149
|
+
b = "\x07";
|
|
1150
|
+
W = "[";
|
|
1151
|
+
Q = "]";
|
|
1152
|
+
I = "m";
|
|
1153
|
+
w = `${Q}8;;`;
|
|
1154
|
+
N = (t) => `${p.values().next().value}${W}${t}${I}`;
|
|
1155
|
+
j = (t) => `${p.values().next().value}${w}${t}${b}`;
|
|
1156
|
+
X = (t) => t.split(" ").map((u) => c(u));
|
|
1157
|
+
_ = (t, u, F) => {
|
|
1158
|
+
const e = [...u];
|
|
1159
|
+
let s = false, C = false, D = c($(t[t.length - 1]));
|
|
1160
|
+
for (const [i, o] of e.entries()) {
|
|
1161
|
+
const E = c(o);
|
|
1162
|
+
if (D + E <= F ? t[t.length - 1] += o : (t.push(o), D = 0), p.has(o) && (s = true, C = e.slice(i + 1).join("").startsWith(w)), s) {
|
|
1163
|
+
C ? o === b && (s = false, C = false) : o === I && (s = false);
|
|
1164
|
+
continue;
|
|
1165
|
+
}
|
|
1166
|
+
D += E, D === F && i < e.length - 1 && (t.push(""), D = 0);
|
|
1167
|
+
}
|
|
1168
|
+
!D && t[t.length - 1].length > 0 && t.length > 1 && (t[t.length - 2] += t.pop());
|
|
1169
|
+
};
|
|
1170
|
+
DD = (t) => {
|
|
1171
|
+
const u = t.split(" ");
|
|
1172
|
+
let F = u.length;
|
|
1173
|
+
for (;F > 0 && !(c(u[F - 1]) > 0); )
|
|
1174
|
+
F--;
|
|
1175
|
+
return F === u.length ? t : u.slice(0, F).join(" ") + u.slice(F).join("");
|
|
1176
|
+
};
|
|
1177
|
+
uD = (t, u, F = {}) => {
|
|
1178
|
+
if (F.trim !== false && t.trim() === "")
|
|
1179
|
+
return "";
|
|
1180
|
+
let e = "", s, C;
|
|
1181
|
+
const D = X(t);
|
|
1182
|
+
let i = [""];
|
|
1183
|
+
for (const [E, a] of t.split(" ").entries()) {
|
|
1184
|
+
F.trim !== false && (i[i.length - 1] = i[i.length - 1].trimStart());
|
|
1185
|
+
let n = c(i[i.length - 1]);
|
|
1186
|
+
if (E !== 0 && (n >= u && (F.wordWrap === false || F.trim === false) && (i.push(""), n = 0), (n > 0 || F.trim === false) && (i[i.length - 1] += " ", n++)), F.hard && D[E] > u) {
|
|
1187
|
+
const B = u - n, A = 1 + Math.floor((D[E] - B - 1) / u);
|
|
1188
|
+
Math.floor((D[E] - 1) / u) < A && i.push(""), _(i, a, u);
|
|
1189
|
+
continue;
|
|
1190
|
+
}
|
|
1191
|
+
if (n + D[E] > u && n > 0 && D[E] > 0) {
|
|
1192
|
+
if (F.wordWrap === false && n < u) {
|
|
1193
|
+
_(i, a, u);
|
|
1194
|
+
continue;
|
|
1195
|
+
}
|
|
1196
|
+
i.push("");
|
|
1197
|
+
}
|
|
1198
|
+
if (n + D[E] > u && F.wordWrap === false) {
|
|
1199
|
+
_(i, a, u);
|
|
1200
|
+
continue;
|
|
1201
|
+
}
|
|
1202
|
+
i[i.length - 1] += a;
|
|
1203
|
+
}
|
|
1204
|
+
F.trim !== false && (i = i.map((E) => DD(E)));
|
|
1205
|
+
const o = [...i.join(`
|
|
1206
|
+
`)];
|
|
1207
|
+
for (const [E, a] of o.entries()) {
|
|
1208
|
+
if (e += a, p.has(a)) {
|
|
1209
|
+
const { groups: B } = new RegExp(`(?:\\${W}(?<code>\\d+)m|\\${w}(?<uri>.*)${b})`).exec(o.slice(E).join("")) || { groups: {} };
|
|
1210
|
+
if (B.code !== undefined) {
|
|
1211
|
+
const A = Number.parseFloat(B.code);
|
|
1212
|
+
s = A === J ? undefined : A;
|
|
1213
|
+
} else
|
|
1214
|
+
B.uri !== undefined && (C = B.uri.length === 0 ? undefined : B.uri);
|
|
1215
|
+
}
|
|
1216
|
+
const n = q.codes.get(Number(s));
|
|
1217
|
+
o[E + 1] === `
|
|
1218
|
+
` ? (C && (e += j("")), s && n && (e += N(n))) : a === `
|
|
1219
|
+
` && (s && n && (e += N(s)), C && (e += j(C)));
|
|
1220
|
+
}
|
|
1221
|
+
return e;
|
|
1222
|
+
};
|
|
1223
|
+
R = Symbol("clack:cancel");
|
|
1224
|
+
V = new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"]]);
|
|
1225
|
+
tD = new Set(["up", "down", "left", "right", "space", "enter"]);
|
|
1226
|
+
unicode = isUnicodeSupported();
|
|
1227
|
+
s = (c2, fallback) => unicode ? c2 : fallback;
|
|
1228
|
+
S_STEP_ACTIVE = s("\u276F", ">");
|
|
1229
|
+
S_STEP_CANCEL = s("\u25A0", "x");
|
|
1230
|
+
S_STEP_ERROR = s("\u25B2", "x");
|
|
1231
|
+
S_STEP_SUBMIT = s("\u2714", "\u221A");
|
|
1232
|
+
S_BAR = "";
|
|
1233
|
+
S_BAR_END = "";
|
|
1234
|
+
S_RADIO_ACTIVE = s("\u25CF", ">");
|
|
1235
|
+
S_RADIO_INACTIVE = s("\u25CB", " ");
|
|
1236
|
+
S_CHECKBOX_ACTIVE = s("\u25FB", "[\u2022]");
|
|
1237
|
+
S_CHECKBOX_SELECTED = s("\u25FC", "[+]");
|
|
1238
|
+
S_CHECKBOX_INACTIVE = s("\u25FB", "[ ]");
|
|
1239
|
+
symbol = (state) => {
|
|
1240
|
+
switch (state) {
|
|
1241
|
+
case "initial":
|
|
1242
|
+
case "active": {
|
|
1243
|
+
return colors.cyan(S_STEP_ACTIVE);
|
|
1244
|
+
}
|
|
1245
|
+
case "cancel": {
|
|
1246
|
+
return colors.red(S_STEP_CANCEL);
|
|
1247
|
+
}
|
|
1248
|
+
case "error": {
|
|
1249
|
+
return colors.yellow(S_STEP_ERROR);
|
|
1250
|
+
}
|
|
1251
|
+
case "submit": {
|
|
1252
|
+
return colors.green(S_STEP_SUBMIT);
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
};
|
|
1256
|
+
text = (opts) => {
|
|
1257
|
+
return new oD({
|
|
1258
|
+
validate: opts.validate,
|
|
1259
|
+
placeholder: opts.placeholder,
|
|
1260
|
+
defaultValue: opts.defaultValue,
|
|
1261
|
+
initialValue: opts.initialValue,
|
|
1262
|
+
render() {
|
|
1263
|
+
const title = `${colors.gray(S_BAR)}
|
|
1264
|
+
${symbol(this.state)} ${opts.message}
|
|
1265
|
+
`;
|
|
1266
|
+
const placeholder = opts.placeholder ? colors.inverse(opts.placeholder[0]) + colors.dim(opts.placeholder.slice(1)) : colors.inverse(colors.hidden("_"));
|
|
1267
|
+
const value = this.value ? this.valueWithCursor : placeholder;
|
|
1268
|
+
switch (this.state) {
|
|
1269
|
+
case "error": {
|
|
1270
|
+
return `${title.trim()}
|
|
1271
|
+
${colors.yellow(S_BAR)} ${value}
|
|
1272
|
+
${colors.yellow(S_BAR_END)} ${colors.yellow(this.error)}
|
|
1273
|
+
`;
|
|
1274
|
+
}
|
|
1275
|
+
case "submit": {
|
|
1276
|
+
return `${title}${colors.gray(S_BAR)} ${colors.dim(this.value || opts.placeholder)}`;
|
|
1277
|
+
}
|
|
1278
|
+
case "cancel": {
|
|
1279
|
+
return `${title}${colors.gray(S_BAR)} ${colors.strikethrough(colors.dim(this.value ?? ""))}${this.value?.trim() ? "\n" + colors.gray(S_BAR) : ""}`;
|
|
1280
|
+
}
|
|
1281
|
+
default: {
|
|
1282
|
+
return `${title}${colors.cyan(S_BAR)} ${value}
|
|
1283
|
+
${colors.cyan(S_BAR_END)}
|
|
1284
|
+
`;
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
}).prompt();
|
|
1289
|
+
};
|
|
1290
|
+
confirm = (opts) => {
|
|
1291
|
+
const active = opts.active ?? "Yes";
|
|
1292
|
+
const inactive = opts.inactive ?? "No";
|
|
1293
|
+
return new sD({
|
|
1294
|
+
active,
|
|
1295
|
+
inactive,
|
|
1296
|
+
initialValue: opts.initialValue ?? true,
|
|
1297
|
+
render() {
|
|
1298
|
+
const title = `${colors.gray(S_BAR)}
|
|
1299
|
+
${symbol(this.state)} ${opts.message}
|
|
1300
|
+
`;
|
|
1301
|
+
const value = this.value ? active : inactive;
|
|
1302
|
+
switch (this.state) {
|
|
1303
|
+
case "submit": {
|
|
1304
|
+
return `${title}${colors.gray(S_BAR)} ${colors.dim(value)}`;
|
|
1305
|
+
}
|
|
1306
|
+
case "cancel": {
|
|
1307
|
+
return `${title}${colors.gray(S_BAR)} ${colors.strikethrough(colors.dim(value))}
|
|
1308
|
+
${colors.gray(S_BAR)}`;
|
|
1309
|
+
}
|
|
1310
|
+
default: {
|
|
1311
|
+
return `${title}${colors.cyan(S_BAR)} ${this.value ? `${colors.green(S_RADIO_ACTIVE)} ${active}` : `${colors.dim(S_RADIO_INACTIVE)} ${colors.dim(active)}`} ${colors.dim("/")} ${this.value ? `${colors.dim(S_RADIO_INACTIVE)} ${colors.dim(inactive)}` : `${colors.green(S_RADIO_ACTIVE)} ${inactive}`}
|
|
1312
|
+
${colors.cyan(S_BAR_END)}
|
|
1313
|
+
`;
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
}).prompt();
|
|
1318
|
+
};
|
|
1319
|
+
select = (opts) => {
|
|
1320
|
+
const opt = (option, state) => {
|
|
1321
|
+
const label = option.label ?? String(option.value);
|
|
1322
|
+
switch (state) {
|
|
1323
|
+
case "active": {
|
|
1324
|
+
return `${colors.green(S_RADIO_ACTIVE)} ${label} ${option.hint ? colors.dim(`(${option.hint})`) : ""}`;
|
|
1325
|
+
}
|
|
1326
|
+
case "selected": {
|
|
1327
|
+
return `${colors.dim(label)}`;
|
|
1328
|
+
}
|
|
1329
|
+
case "cancelled": {
|
|
1330
|
+
return `${colors.strikethrough(colors.dim(label))}`;
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
return `${colors.dim(S_RADIO_INACTIVE)} ${colors.dim(label)}`;
|
|
1334
|
+
};
|
|
1335
|
+
return new ED({
|
|
1336
|
+
options: opts.options,
|
|
1337
|
+
initialValue: opts.initialValue,
|
|
1338
|
+
render() {
|
|
1339
|
+
const title = `${colors.gray(S_BAR)}
|
|
1340
|
+
${symbol(this.state)} ${opts.message}
|
|
1341
|
+
`;
|
|
1342
|
+
switch (this.state) {
|
|
1343
|
+
case "submit": {
|
|
1344
|
+
return `${title}${colors.gray(S_BAR)} ${opt(this.options[this.cursor], "selected")}`;
|
|
1345
|
+
}
|
|
1346
|
+
case "cancel": {
|
|
1347
|
+
return `${title}${colors.gray(S_BAR)} ${opt(this.options[this.cursor], "cancelled")}
|
|
1348
|
+
${colors.gray(S_BAR)}`;
|
|
1349
|
+
}
|
|
1350
|
+
default: {
|
|
1351
|
+
return `${title}${colors.cyan(S_BAR)} ${this.options.map((option, i) => opt(option, i === this.cursor ? "active" : "inactive")).join(`
|
|
1352
|
+
${colors.cyan(S_BAR)} `)}
|
|
1353
|
+
${colors.cyan(S_BAR_END)}
|
|
1354
|
+
`;
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
}).prompt();
|
|
1359
|
+
};
|
|
1360
|
+
multiselect = (opts) => {
|
|
1361
|
+
const opt = (option, state) => {
|
|
1362
|
+
const label = option.label ?? String(option.value);
|
|
1363
|
+
switch (state) {
|
|
1364
|
+
case "active": {
|
|
1365
|
+
return `${colors.cyan(S_CHECKBOX_ACTIVE)} ${label} ${option.hint ? colors.dim(`(${option.hint})`) : ""}`;
|
|
1366
|
+
}
|
|
1367
|
+
case "selected": {
|
|
1368
|
+
return `${colors.green(S_CHECKBOX_SELECTED)} ${colors.dim(label)}`;
|
|
1369
|
+
}
|
|
1370
|
+
case "cancelled": {
|
|
1371
|
+
return `${colors.strikethrough(colors.dim(label))}`;
|
|
1372
|
+
}
|
|
1373
|
+
case "active-selected": {
|
|
1374
|
+
return `${colors.green(S_CHECKBOX_SELECTED)} ${label} ${option.hint ? colors.dim(`(${option.hint})`) : ""}`;
|
|
1375
|
+
}
|
|
1376
|
+
case "submitted": {
|
|
1377
|
+
return `${colors.dim(label)}`;
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
return `${colors.dim(S_CHECKBOX_INACTIVE)} ${colors.dim(label)}`;
|
|
1381
|
+
};
|
|
1382
|
+
return new iD({
|
|
1383
|
+
options: opts.options,
|
|
1384
|
+
initialValues: opts.initialValues,
|
|
1385
|
+
required: opts.required ?? true,
|
|
1386
|
+
cursorAt: opts.cursorAt,
|
|
1387
|
+
validate(selected) {
|
|
1388
|
+
if (this.required && selected.length === 0) {
|
|
1389
|
+
return `Please select at least one option.
|
|
1390
|
+
${colors.reset(colors.dim(`Press ${colors.gray(colors.bgWhite(colors.inverse(" space ")))} to select, ${colors.gray(colors.bgWhite(colors.inverse(" enter ")))} to submit`))}`;
|
|
1391
|
+
}
|
|
1392
|
+
},
|
|
1393
|
+
render() {
|
|
1394
|
+
const title = `${colors.gray(S_BAR)}
|
|
1395
|
+
${symbol(this.state)} ${opts.message}
|
|
1396
|
+
`;
|
|
1397
|
+
switch (this.state) {
|
|
1398
|
+
case "submit": {
|
|
1399
|
+
return `${title}${colors.gray(S_BAR)} ${this.options.filter(({ value }) => this.value.includes(value)).map((option) => opt(option, "submitted")).join(colors.dim(", ")) || colors.dim("none")}`;
|
|
1400
|
+
}
|
|
1401
|
+
case "cancel": {
|
|
1402
|
+
const label = this.options.filter(({ value }) => this.value.includes(value)).map((option) => opt(option, "cancelled")).join(colors.dim(", "));
|
|
1403
|
+
return `${title}${colors.gray(S_BAR)} ${label.trim() ? `${label}
|
|
1404
|
+
${colors.gray(S_BAR)}` : ""}`;
|
|
1405
|
+
}
|
|
1406
|
+
case "error": {
|
|
1407
|
+
const footer = this.error.split("\n").map((ln, i) => i === 0 ? `${colors.yellow(S_BAR_END)} ${colors.yellow(ln)}` : ` ${ln}`).join("\n");
|
|
1408
|
+
return title + colors.yellow(S_BAR) + " " + this.options.map((option, i) => {
|
|
1409
|
+
const selected = this.value.includes(option.value);
|
|
1410
|
+
const active = i === this.cursor;
|
|
1411
|
+
if (active && selected) {
|
|
1412
|
+
return opt(option, "active-selected");
|
|
1413
|
+
}
|
|
1414
|
+
if (selected) {
|
|
1415
|
+
return opt(option, "selected");
|
|
1416
|
+
}
|
|
1417
|
+
return opt(option, active ? "active" : "inactive");
|
|
1418
|
+
}).join(`
|
|
1419
|
+
${colors.yellow(S_BAR)} `) + "\n" + footer + "\n";
|
|
1420
|
+
}
|
|
1421
|
+
default: {
|
|
1422
|
+
return `${title}${colors.cyan(S_BAR)} ${this.options.map((option, i) => {
|
|
1423
|
+
const selected = this.value.includes(option.value);
|
|
1424
|
+
const active = i === this.cursor;
|
|
1425
|
+
if (active && selected) {
|
|
1426
|
+
return opt(option, "active-selected");
|
|
1427
|
+
}
|
|
1428
|
+
if (selected) {
|
|
1429
|
+
return opt(option, "selected");
|
|
1430
|
+
}
|
|
1431
|
+
return opt(option, active ? "active" : "inactive");
|
|
1432
|
+
}).join(`
|
|
1433
|
+
${colors.cyan(S_BAR)} `)}
|
|
1434
|
+
${colors.cyan(S_BAR_END)}
|
|
1435
|
+
`;
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
}).prompt();
|
|
1440
|
+
};
|
|
1441
|
+
});
|
|
1442
|
+
|
|
1443
|
+
// ../../../../node_modules/consola/dist/shared/consola.36c0034f.mjs
|
|
1444
|
+
import process$1 from "node:process";
|
|
1445
|
+
|
|
1446
|
+
class FancyReporter extends BasicReporter {
|
|
1447
|
+
formatStack(stack) {
|
|
1448
|
+
return "\n" + parseStack(stack).map((line) => " " + line.replace(/^at +/, (m2) => colors.gray(m2)).replace(/\((.+)\)/, (_2, m2) => `(${colors.cyan(m2)})`)).join("\n");
|
|
1449
|
+
}
|
|
1450
|
+
formatType(logObj, isBadge, opts) {
|
|
1451
|
+
const typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || "gray";
|
|
1452
|
+
if (isBadge) {
|
|
1453
|
+
return getBgColor(typeColor)(colors.black(` ${logObj.type.toUpperCase()} `));
|
|
1454
|
+
}
|
|
1455
|
+
const _type = typeof TYPE_ICONS[logObj.type] === "string" ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type;
|
|
1456
|
+
return _type ? getColor2(typeColor)(_type) : "";
|
|
1457
|
+
}
|
|
1458
|
+
formatLogObj(logObj, opts) {
|
|
1459
|
+
const [message, ...additional] = this.formatArgs(logObj.args, opts).split("\n");
|
|
1460
|
+
if (logObj.type === "box") {
|
|
1461
|
+
return box(characterFormat(message + (additional.length > 0 ? "\n" + additional.join("\n") : "")), {
|
|
1462
|
+
title: logObj.title ? characterFormat(logObj.title) : undefined,
|
|
1463
|
+
style: logObj.style
|
|
1464
|
+
});
|
|
1465
|
+
}
|
|
1466
|
+
const date = this.formatDate(logObj.date, opts);
|
|
1467
|
+
const coloredDate = date && colors.gray(date);
|
|
1468
|
+
const isBadge = logObj.badge ?? logObj.level < 2;
|
|
1469
|
+
const type = this.formatType(logObj, isBadge, opts);
|
|
1470
|
+
const tag = logObj.tag ? colors.gray(logObj.tag) : "";
|
|
1471
|
+
let line;
|
|
1472
|
+
const left = this.filterAndJoin([type, characterFormat(message)]);
|
|
1473
|
+
const right = this.filterAndJoin(opts.columns ? [tag, coloredDate] : [tag]);
|
|
1474
|
+
const space = (opts.columns || 0) - stringWidth(left) - stringWidth(right) - 2;
|
|
1475
|
+
line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors.gray(`[${right}]`)} ` : "") + left;
|
|
1476
|
+
line += characterFormat(additional.length > 0 ? "\n" + additional.join("\n") : "");
|
|
1477
|
+
if (logObj.type === "trace") {
|
|
1478
|
+
const _err = new Error("Trace: " + logObj.message);
|
|
1479
|
+
line += this.formatStack(_err.stack || "");
|
|
1480
|
+
}
|
|
1481
|
+
return isBadge ? "\n" + line + "\n" : line;
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
var detectProvider, toBoolean, ansiRegex2, stripAnsi2, getDefaultExportFromCjs, stringWidth$1, isUnicodeSupported, stringWidth, characterFormat, getColor2, getBgColor, createConsola2, _getDefaultLogLevel, providers, processShim, envShim, providerInfo, nodeENV, isCI2, hasTTY, isDebug, isTest, regex, eastasianwidth, eastasianwidthExports, eastAsianWidth, emojiRegex, TYPE_COLOR_MAP, LEVEL_COLOR_MAP, unicode2, s2, TYPE_ICONS, consola;
|
|
1485
|
+
var init_consola_36c0034f = __esm(() => {
|
|
1486
|
+
init_core();
|
|
1487
|
+
init_consola_06ad8a64();
|
|
1488
|
+
init_utils();
|
|
1489
|
+
detectProvider = function(env2) {
|
|
1490
|
+
for (const provider of providers) {
|
|
1491
|
+
const envName = provider[1] || provider[0];
|
|
1492
|
+
if (env2[envName]) {
|
|
1493
|
+
return {
|
|
1494
|
+
name: provider[0].toLowerCase(),
|
|
1495
|
+
...provider[2]
|
|
1496
|
+
};
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
if (env2.SHELL && env2.SHELL === "/bin/jsh") {
|
|
1500
|
+
return {
|
|
1501
|
+
name: "stackblitz",
|
|
1502
|
+
ci: false
|
|
1503
|
+
};
|
|
1504
|
+
}
|
|
1505
|
+
return {
|
|
1506
|
+
name: "",
|
|
1507
|
+
ci: false
|
|
1508
|
+
};
|
|
1509
|
+
};
|
|
1510
|
+
toBoolean = function(val) {
|
|
1511
|
+
return val ? val !== "false" : false;
|
|
1512
|
+
};
|
|
1513
|
+
ansiRegex2 = function({ onlyFirst = false } = {}) {
|
|
1514
|
+
const pattern = [
|
|
1515
|
+
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
1516
|
+
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
|
|
1517
|
+
].join("|");
|
|
1518
|
+
return new RegExp(pattern, onlyFirst ? undefined : "g");
|
|
1519
|
+
};
|
|
1520
|
+
stripAnsi2 = function(string) {
|
|
1521
|
+
if (typeof string !== "string") {
|
|
1522
|
+
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
1523
|
+
}
|
|
1524
|
+
return string.replace(regex, "");
|
|
1525
|
+
};
|
|
1526
|
+
getDefaultExportFromCjs = function(x) {
|
|
1527
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
1528
|
+
};
|
|
1529
|
+
stringWidth$1 = function(string, options) {
|
|
1530
|
+
if (typeof string !== "string" || string.length === 0) {
|
|
1531
|
+
return 0;
|
|
1532
|
+
}
|
|
1533
|
+
options = {
|
|
1534
|
+
ambiguousIsNarrow: true,
|
|
1535
|
+
countAnsiEscapeCodes: false,
|
|
1536
|
+
...options
|
|
1537
|
+
};
|
|
1538
|
+
if (!options.countAnsiEscapeCodes) {
|
|
1539
|
+
string = stripAnsi2(string);
|
|
1540
|
+
}
|
|
1541
|
+
if (string.length === 0) {
|
|
1542
|
+
return 0;
|
|
1543
|
+
}
|
|
1544
|
+
const ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2;
|
|
1545
|
+
let width = 0;
|
|
1546
|
+
for (const { segment: character } of new Intl.Segmenter().segment(string)) {
|
|
1547
|
+
const codePoint = character.codePointAt(0);
|
|
1548
|
+
if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
|
|
1549
|
+
continue;
|
|
1550
|
+
}
|
|
1551
|
+
if (codePoint >= 768 && codePoint <= 879) {
|
|
1552
|
+
continue;
|
|
1553
|
+
}
|
|
1554
|
+
if (emojiRegex().test(character)) {
|
|
1555
|
+
width += 2;
|
|
1556
|
+
continue;
|
|
1557
|
+
}
|
|
1558
|
+
const code = eastAsianWidth.eastAsianWidth(character);
|
|
1559
|
+
switch (code) {
|
|
1560
|
+
case "F":
|
|
1561
|
+
case "W": {
|
|
1562
|
+
width += 2;
|
|
1563
|
+
break;
|
|
1564
|
+
}
|
|
1565
|
+
case "A": {
|
|
1566
|
+
width += ambiguousCharacterWidth;
|
|
1567
|
+
break;
|
|
1568
|
+
}
|
|
1569
|
+
default: {
|
|
1570
|
+
width += 1;
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
return width;
|
|
1575
|
+
};
|
|
1576
|
+
isUnicodeSupported = function() {
|
|
1577
|
+
if (process$1.platform !== "win32") {
|
|
1578
|
+
return process$1.env.TERM !== "linux";
|
|
1579
|
+
}
|
|
1580
|
+
return Boolean(process$1.env.CI) || Boolean(process$1.env.WT_SESSION) || Boolean(process$1.env.TERMINUS_SUBLIME) || process$1.env.ConEmuTask === "{cmd::Cmder}" || process$1.env.TERM_PROGRAM === "Terminus-Sublime" || process$1.env.TERM_PROGRAM === "vscode" || process$1.env.TERM === "xterm-256color" || process$1.env.TERM === "alacritty" || process$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
1581
|
+
};
|
|
1582
|
+
stringWidth = function(str) {
|
|
1583
|
+
if (!Intl.Segmenter) {
|
|
1584
|
+
return stripAnsi(str).length;
|
|
1585
|
+
}
|
|
1586
|
+
return stringWidth$1(str);
|
|
1587
|
+
};
|
|
1588
|
+
characterFormat = function(str) {
|
|
1589
|
+
return str.replace(/`([^`]+)`/gm, (_2, m2) => colors.cyan(m2)).replace(/\s+_([^_]+)_\s+/gm, (_2, m2) => ` ${colors.underline(m2)} `);
|
|
1590
|
+
};
|
|
1591
|
+
getColor2 = function(color = "white") {
|
|
1592
|
+
return colors[color] || colors.white;
|
|
1593
|
+
};
|
|
1594
|
+
getBgColor = function(color = "bgWhite") {
|
|
1595
|
+
return colors[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors.bgWhite;
|
|
1596
|
+
};
|
|
1597
|
+
createConsola2 = function(options = {}) {
|
|
1598
|
+
let level = _getDefaultLogLevel();
|
|
1599
|
+
if (process.env.CONSOLA_LEVEL) {
|
|
1600
|
+
level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level;
|
|
1601
|
+
}
|
|
1602
|
+
const consola2 = createConsola({
|
|
1603
|
+
level,
|
|
1604
|
+
defaults: { level },
|
|
1605
|
+
stdout: process.stdout,
|
|
1606
|
+
stderr: process.stderr,
|
|
1607
|
+
prompt: (...args) => Promise.resolve().then(() => (init_prompt(), exports_prompt)).then((m2) => m2.prompt(...args)),
|
|
1608
|
+
reporters: options.reporters || [
|
|
1609
|
+
options.fancy ?? !(isCI2 || isTest) ? new FancyReporter : new BasicReporter
|
|
1610
|
+
],
|
|
1611
|
+
...options
|
|
1612
|
+
});
|
|
1613
|
+
return consola2;
|
|
1614
|
+
};
|
|
1615
|
+
_getDefaultLogLevel = function() {
|
|
1616
|
+
if (isDebug) {
|
|
1617
|
+
return LogLevels.debug;
|
|
1618
|
+
}
|
|
1619
|
+
if (isTest) {
|
|
1620
|
+
return LogLevels.warn;
|
|
1621
|
+
}
|
|
1622
|
+
return LogLevels.info;
|
|
1623
|
+
};
|
|
1624
|
+
providers = [
|
|
1625
|
+
["APPVEYOR"],
|
|
1626
|
+
["AZURE_PIPELINES", "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],
|
|
1627
|
+
["AZURE_STATIC", "INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],
|
|
1628
|
+
["APPCIRCLE", "AC_APPCIRCLE"],
|
|
1629
|
+
["BAMBOO", "bamboo_planKey"],
|
|
1630
|
+
["BITBUCKET", "BITBUCKET_COMMIT"],
|
|
1631
|
+
["BITRISE", "BITRISE_IO"],
|
|
1632
|
+
["BUDDY", "BUDDY_WORKSPACE_ID"],
|
|
1633
|
+
["BUILDKITE"],
|
|
1634
|
+
["CIRCLE", "CIRCLECI"],
|
|
1635
|
+
["CIRRUS", "CIRRUS_CI"],
|
|
1636
|
+
["CLOUDFLARE_PAGES", "CF_PAGES", { ci: true }],
|
|
1637
|
+
["CODEBUILD", "CODEBUILD_BUILD_ARN"],
|
|
1638
|
+
["CODEFRESH", "CF_BUILD_ID"],
|
|
1639
|
+
["DRONE"],
|
|
1640
|
+
["DRONE", "DRONE_BUILD_EVENT"],
|
|
1641
|
+
["DSARI"],
|
|
1642
|
+
["GITHUB_ACTIONS"],
|
|
1643
|
+
["GITLAB", "GITLAB_CI"],
|
|
1644
|
+
["GITLAB", "CI_MERGE_REQUEST_ID"],
|
|
1645
|
+
["GOCD", "GO_PIPELINE_LABEL"],
|
|
1646
|
+
["LAYERCI"],
|
|
1647
|
+
["HUDSON", "HUDSON_URL"],
|
|
1648
|
+
["JENKINS", "JENKINS_URL"],
|
|
1649
|
+
["MAGNUM"],
|
|
1650
|
+
["NETLIFY"],
|
|
1651
|
+
["NETLIFY", "NETLIFY_LOCAL", { ci: false }],
|
|
1652
|
+
["NEVERCODE"],
|
|
1653
|
+
["RENDER"],
|
|
1654
|
+
["SAIL", "SAILCI"],
|
|
1655
|
+
["SEMAPHORE"],
|
|
1656
|
+
["SCREWDRIVER"],
|
|
1657
|
+
["SHIPPABLE"],
|
|
1658
|
+
["SOLANO", "TDDIUM"],
|
|
1659
|
+
["STRIDER"],
|
|
1660
|
+
["TEAMCITY", "TEAMCITY_VERSION"],
|
|
1661
|
+
["TRAVIS"],
|
|
1662
|
+
["VERCEL", "NOW_BUILDER"],
|
|
1663
|
+
["APPCENTER", "APPCENTER_BUILD_ID"],
|
|
1664
|
+
["CODESANDBOX", "CODESANDBOX_SSE", { ci: false }],
|
|
1665
|
+
["STACKBLITZ"],
|
|
1666
|
+
["STORMKIT"],
|
|
1667
|
+
["CLEAVR"]
|
|
1668
|
+
];
|
|
1669
|
+
processShim = typeof process !== "undefined" ? process : {};
|
|
1670
|
+
envShim = processShim.env || {};
|
|
1671
|
+
providerInfo = detectProvider(envShim);
|
|
1672
|
+
nodeENV = typeof process !== "undefined" && process.env && "development" || "";
|
|
1673
|
+
processShim.platform;
|
|
1674
|
+
providerInfo.name;
|
|
1675
|
+
isCI2 = toBoolean(envShim.CI) || providerInfo.ci !== false;
|
|
1676
|
+
hasTTY = toBoolean(processShim.stdout && processShim.stdout.isTTY);
|
|
1677
|
+
isDebug = toBoolean(envShim.DEBUG);
|
|
1678
|
+
isTest = nodeENV === "test" || toBoolean(envShim.TEST);
|
|
1679
|
+
toBoolean(envShim.MINIMAL);
|
|
1680
|
+
regex = ansiRegex2();
|
|
1681
|
+
eastasianwidth = { exports: {} };
|
|
1682
|
+
(function(module) {
|
|
1683
|
+
var eaw = {};
|
|
1684
|
+
{
|
|
1685
|
+
module.exports = eaw;
|
|
1686
|
+
}
|
|
1687
|
+
eaw.eastAsianWidth = function(character) {
|
|
1688
|
+
var x = character.charCodeAt(0);
|
|
1689
|
+
var y = character.length == 2 ? character.charCodeAt(1) : 0;
|
|
1690
|
+
var codePoint = x;
|
|
1691
|
+
if (55296 <= x && x <= 56319 && (56320 <= y && y <= 57343)) {
|
|
1692
|
+
x &= 1023;
|
|
1693
|
+
y &= 1023;
|
|
1694
|
+
codePoint = x << 10 | y;
|
|
1695
|
+
codePoint += 65536;
|
|
1696
|
+
}
|
|
1697
|
+
if (codePoint == 12288 || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510) {
|
|
1698
|
+
return "F";
|
|
1699
|
+
}
|
|
1700
|
+
if (codePoint == 8361 || 65377 <= codePoint && codePoint <= 65470 || 65474 <= codePoint && codePoint <= 65479 || 65482 <= codePoint && codePoint <= 65487 || 65490 <= codePoint && codePoint <= 65495 || 65498 <= codePoint && codePoint <= 65500 || 65512 <= codePoint && codePoint <= 65518) {
|
|
1701
|
+
return "H";
|
|
1702
|
+
}
|
|
1703
|
+
if (4352 <= codePoint && codePoint <= 4447 || 4515 <= codePoint && codePoint <= 4519 || 4602 <= codePoint && codePoint <= 4607 || 9001 <= codePoint && codePoint <= 9002 || 11904 <= codePoint && codePoint <= 11929 || 11931 <= codePoint && codePoint <= 12019 || 12032 <= codePoint && codePoint <= 12245 || 12272 <= codePoint && codePoint <= 12283 || 12289 <= codePoint && codePoint <= 12350 || 12353 <= codePoint && codePoint <= 12438 || 12441 <= codePoint && codePoint <= 12543 || 12549 <= codePoint && codePoint <= 12589 || 12593 <= codePoint && codePoint <= 12686 || 12688 <= codePoint && codePoint <= 12730 || 12736 <= codePoint && codePoint <= 12771 || 12784 <= codePoint && codePoint <= 12830 || 12832 <= codePoint && codePoint <= 12871 || 12880 <= codePoint && codePoint <= 13054 || 13056 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42124 || 42128 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 55216 <= codePoint && codePoint <= 55238 || 55243 <= codePoint && codePoint <= 55291 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65106 || 65108 <= codePoint && codePoint <= 65126 || 65128 <= codePoint && codePoint <= 65131 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127490 || 127504 <= codePoint && codePoint <= 127546 || 127552 <= codePoint && codePoint <= 127560 || 127568 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 194367 || 177984 <= codePoint && codePoint <= 196605 || 196608 <= codePoint && codePoint <= 262141) {
|
|
1704
|
+
return "W";
|
|
1705
|
+
}
|
|
1706
|
+
if (32 <= codePoint && codePoint <= 126 || 162 <= codePoint && codePoint <= 163 || 165 <= codePoint && codePoint <= 166 || codePoint == 172 || codePoint == 175 || 10214 <= codePoint && codePoint <= 10221 || 10629 <= codePoint && codePoint <= 10630) {
|
|
1707
|
+
return "Na";
|
|
1708
|
+
}
|
|
1709
|
+
if (codePoint == 161 || codePoint == 164 || 167 <= codePoint && codePoint <= 168 || codePoint == 170 || 173 <= codePoint && codePoint <= 174 || 176 <= codePoint && codePoint <= 180 || 182 <= codePoint && codePoint <= 186 || 188 <= codePoint && codePoint <= 191 || codePoint == 198 || codePoint == 208 || 215 <= codePoint && codePoint <= 216 || 222 <= codePoint && codePoint <= 225 || codePoint == 230 || 232 <= codePoint && codePoint <= 234 || 236 <= codePoint && codePoint <= 237 || codePoint == 240 || 242 <= codePoint && codePoint <= 243 || 247 <= codePoint && codePoint <= 250 || codePoint == 252 || codePoint == 254 || codePoint == 257 || codePoint == 273 || codePoint == 275 || codePoint == 283 || 294 <= codePoint && codePoint <= 295 || codePoint == 299 || 305 <= codePoint && codePoint <= 307 || codePoint == 312 || 319 <= codePoint && codePoint <= 322 || codePoint == 324 || 328 <= codePoint && codePoint <= 331 || codePoint == 333 || 338 <= codePoint && codePoint <= 339 || 358 <= codePoint && codePoint <= 359 || codePoint == 363 || codePoint == 462 || codePoint == 464 || codePoint == 466 || codePoint == 468 || codePoint == 470 || codePoint == 472 || codePoint == 474 || codePoint == 476 || codePoint == 593 || codePoint == 609 || codePoint == 708 || codePoint == 711 || 713 <= codePoint && codePoint <= 715 || codePoint == 717 || codePoint == 720 || 728 <= codePoint && codePoint <= 731 || codePoint == 733 || codePoint == 735 || 768 <= codePoint && codePoint <= 879 || 913 <= codePoint && codePoint <= 929 || 931 <= codePoint && codePoint <= 937 || 945 <= codePoint && codePoint <= 961 || 963 <= codePoint && codePoint <= 969 || codePoint == 1025 || 1040 <= codePoint && codePoint <= 1103 || codePoint == 1105 || codePoint == 8208 || 8211 <= codePoint && codePoint <= 8214 || 8216 <= codePoint && codePoint <= 8217 || 8220 <= codePoint && codePoint <= 8221 || 8224 <= codePoint && codePoint <= 8226 || 8228 <= codePoint && codePoint <= 8231 || codePoint == 8240 || 8242 <= codePoint && codePoint <= 8243 || codePoint == 8245 || codePoint == 8251 || codePoint == 8254 || codePoint == 8308 || codePoint == 8319 || 8321 <= codePoint && codePoint <= 8324 || codePoint == 8364 || codePoint == 8451 || codePoint == 8453 || codePoint == 8457 || codePoint == 8467 || codePoint == 8470 || 8481 <= codePoint && codePoint <= 8482 || codePoint == 8486 || codePoint == 8491 || 8531 <= codePoint && codePoint <= 8532 || 8539 <= codePoint && codePoint <= 8542 || 8544 <= codePoint && codePoint <= 8555 || 8560 <= codePoint && codePoint <= 8569 || codePoint == 8585 || 8592 <= codePoint && codePoint <= 8601 || 8632 <= codePoint && codePoint <= 8633 || codePoint == 8658 || codePoint == 8660 || codePoint == 8679 || codePoint == 8704 || 8706 <= codePoint && codePoint <= 8707 || 8711 <= codePoint && codePoint <= 8712 || codePoint == 8715 || codePoint == 8719 || codePoint == 8721 || codePoint == 8725 || codePoint == 8730 || 8733 <= codePoint && codePoint <= 8736 || codePoint == 8739 || codePoint == 8741 || 8743 <= codePoint && codePoint <= 8748 || codePoint == 8750 || 8756 <= codePoint && codePoint <= 8759 || 8764 <= codePoint && codePoint <= 8765 || codePoint == 8776 || codePoint == 8780 || codePoint == 8786 || 8800 <= codePoint && codePoint <= 8801 || 8804 <= codePoint && codePoint <= 8807 || 8810 <= codePoint && codePoint <= 8811 || 8814 <= codePoint && codePoint <= 8815 || 8834 <= codePoint && codePoint <= 8835 || 8838 <= codePoint && codePoint <= 8839 || codePoint == 8853 || codePoint == 8857 || codePoint == 8869 || codePoint == 8895 || codePoint == 8978 || 9312 <= codePoint && codePoint <= 9449 || 9451 <= codePoint && codePoint <= 9547 || 9552 <= codePoint && codePoint <= 9587 || 9600 <= codePoint && codePoint <= 9615 || 9618 <= codePoint && codePoint <= 9621 || 9632 <= codePoint && codePoint <= 9633 || 9635 <= codePoint && codePoint <= 9641 || 9650 <= codePoint && codePoint <= 9651 || 9654 <= codePoint && codePoint <= 9655 || 9660 <= codePoint && codePoint <= 9661 || 9664 <= codePoint && codePoint <= 9665 || 9670 <= codePoint && codePoint <= 9672 || codePoint == 9675 || 9678 <= codePoint && codePoint <= 9681 || 9698 <= codePoint && codePoint <= 9701 || codePoint == 9711 || 9733 <= codePoint && codePoint <= 9734 || codePoint == 9737 || 9742 <= codePoint && codePoint <= 9743 || 9748 <= codePoint && codePoint <= 9749 || codePoint == 9756 || codePoint == 9758 || codePoint == 9792 || codePoint == 9794 || 9824 <= codePoint && codePoint <= 9825 || 9827 <= codePoint && codePoint <= 9829 || 9831 <= codePoint && codePoint <= 9834 || 9836 <= codePoint && codePoint <= 9837 || codePoint == 9839 || 9886 <= codePoint && codePoint <= 9887 || 9918 <= codePoint && codePoint <= 9919 || 9924 <= codePoint && codePoint <= 9933 || 9935 <= codePoint && codePoint <= 9953 || codePoint == 9955 || 9960 <= codePoint && codePoint <= 9983 || codePoint == 10045 || codePoint == 10071 || 10102 <= codePoint && codePoint <= 10111 || 11093 <= codePoint && codePoint <= 11097 || 12872 <= codePoint && codePoint <= 12879 || 57344 <= codePoint && codePoint <= 63743 || 65024 <= codePoint && codePoint <= 65039 || codePoint == 65533 || 127232 <= codePoint && codePoint <= 127242 || 127248 <= codePoint && codePoint <= 127277 || 127280 <= codePoint && codePoint <= 127337 || 127344 <= codePoint && codePoint <= 127386 || 917760 <= codePoint && codePoint <= 917999 || 983040 <= codePoint && codePoint <= 1048573 || 1048576 <= codePoint && codePoint <= 1114109) {
|
|
1710
|
+
return "A";
|
|
1711
|
+
}
|
|
1712
|
+
return "N";
|
|
1713
|
+
};
|
|
1714
|
+
eaw.characterLength = function(character) {
|
|
1715
|
+
var code = this.eastAsianWidth(character);
|
|
1716
|
+
if (code == "F" || code == "W" || code == "A") {
|
|
1717
|
+
return 2;
|
|
1718
|
+
} else {
|
|
1719
|
+
return 1;
|
|
1720
|
+
}
|
|
1721
|
+
};
|
|
1722
|
+
function stringToArray(string) {
|
|
1723
|
+
return string.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
|
|
1724
|
+
}
|
|
1725
|
+
eaw.length = function(string) {
|
|
1726
|
+
var characters = stringToArray(string);
|
|
1727
|
+
var len = 0;
|
|
1728
|
+
for (var i = 0;i < characters.length; i++) {
|
|
1729
|
+
len = len + this.characterLength(characters[i]);
|
|
1730
|
+
}
|
|
1731
|
+
return len;
|
|
1732
|
+
};
|
|
1733
|
+
eaw.slice = function(text2, start, end) {
|
|
1734
|
+
textLen = eaw.length(text2);
|
|
1735
|
+
start = start ? start : 0;
|
|
1736
|
+
end = end ? end : 1;
|
|
1737
|
+
if (start < 0) {
|
|
1738
|
+
start = textLen + start;
|
|
1739
|
+
}
|
|
1740
|
+
if (end < 0) {
|
|
1741
|
+
end = textLen + end;
|
|
1742
|
+
}
|
|
1743
|
+
var result = "";
|
|
1744
|
+
var eawLen = 0;
|
|
1745
|
+
var chars = stringToArray(text2);
|
|
1746
|
+
for (var i = 0;i < chars.length; i++) {
|
|
1747
|
+
var char = chars[i];
|
|
1748
|
+
var charLen = eaw.length(char);
|
|
1749
|
+
if (eawLen >= start - (charLen == 2 ? 1 : 0)) {
|
|
1750
|
+
if (eawLen + charLen <= end) {
|
|
1751
|
+
result += char;
|
|
1752
|
+
} else {
|
|
1753
|
+
break;
|
|
1754
|
+
}
|
|
1755
|
+
}
|
|
1756
|
+
eawLen += charLen;
|
|
1757
|
+
}
|
|
1758
|
+
return result;
|
|
1759
|
+
};
|
|
1760
|
+
})(eastasianwidth);
|
|
1761
|
+
eastasianwidthExports = eastasianwidth.exports;
|
|
1762
|
+
eastAsianWidth = getDefaultExportFromCjs(eastasianwidthExports);
|
|
1763
|
+
emojiRegex = () => {
|
|
1764
|
+
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
|
1765
|
+
};
|
|
1766
|
+
TYPE_COLOR_MAP = {
|
|
1767
|
+
info: "cyan",
|
|
1768
|
+
fail: "red",
|
|
1769
|
+
success: "green",
|
|
1770
|
+
ready: "green",
|
|
1771
|
+
start: "magenta"
|
|
1772
|
+
};
|
|
1773
|
+
LEVEL_COLOR_MAP = {
|
|
1774
|
+
0: "red",
|
|
1775
|
+
1: "yellow"
|
|
1776
|
+
};
|
|
1777
|
+
unicode2 = isUnicodeSupported();
|
|
1778
|
+
s2 = (c2, fallback) => unicode2 ? c2 : fallback;
|
|
1779
|
+
TYPE_ICONS = {
|
|
1780
|
+
error: s2("\u2716", "\xD7"),
|
|
1781
|
+
fatal: s2("\u2716", "\xD7"),
|
|
1782
|
+
ready: s2("\u2714", "\u221A"),
|
|
1783
|
+
warn: s2("\u26A0", "\u203C"),
|
|
1784
|
+
info: s2("\u2139", "i"),
|
|
1785
|
+
success: s2("\u2714", "\u221A"),
|
|
1786
|
+
debug: s2("\u2699", "D"),
|
|
1787
|
+
trace: s2("\u2192", "\u2192"),
|
|
1788
|
+
fail: s2("\u2716", "\xD7"),
|
|
1789
|
+
start: s2("\u25D0", "o"),
|
|
1790
|
+
log: ""
|
|
1791
|
+
};
|
|
1792
|
+
consola = createConsola2();
|
|
1793
|
+
});
|
|
1794
|
+
|
|
1795
|
+
// ../../../../node_modules/slugify/slugify.js
|
|
1796
|
+
var require_slugify = __commonJS((exports, module) => {
|
|
1797
|
+
(function(name, root, factory) {
|
|
1798
|
+
if (typeof exports === "object") {
|
|
1799
|
+
module.exports = factory();
|
|
1800
|
+
module.exports["default"] = factory();
|
|
1801
|
+
} else if (typeof define === "function" && define.amd) {
|
|
1802
|
+
define(factory);
|
|
1803
|
+
} else {
|
|
1804
|
+
root[name] = factory();
|
|
1805
|
+
}
|
|
1806
|
+
})("slugify", exports, function() {
|
|
1807
|
+
var charMap = JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xA2":"cent","\xA3":"pound","\xA4":"currency","\xA5":"yen","\xA9":"(c)","\xAA":"a","\xAE":"(r)","\xBA":"o","\xC0":"A","\xC1":"A","\xC2":"A","\xC3":"A","\xC4":"A","\xC5":"A","\xC6":"AE","\xC7":"C","\xC8":"E","\xC9":"E","\xCA":"E","\xCB":"E","\xCC":"I","\xCD":"I","\xCE":"I","\xCF":"I","\xD0":"D","\xD1":"N","\xD2":"O","\xD3":"O","\xD4":"O","\xD5":"O","\xD6":"O","\xD8":"O","\xD9":"U","\xDA":"U","\xDB":"U","\xDC":"U","\xDD":"Y","\xDE":"TH","\xDF":"ss","\xE0":"a","\xE1":"a","\xE2":"a","\xE3":"a","\xE4":"a","\xE5":"a","\xE6":"ae","\xE7":"c","\xE8":"e","\xE9":"e","\xEA":"e","\xEB":"e","\xEC":"i","\xED":"i","\xEE":"i","\xEF":"i","\xF0":"d","\xF1":"n","\xF2":"o","\xF3":"o","\xF4":"o","\xF5":"o","\xF6":"o","\xF8":"o","\xF9":"u","\xFA":"u","\xFB":"u","\xFC":"u","\xFD":"y","\xFE":"th","\xFF":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010C":"C","\u010D":"c","\u010E":"D","\u010F":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011A":"E","\u011B":"e","\u011E":"G","\u011F":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012A":"i","\u012B":"i","\u012E":"I","\u012F":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013B":"L","\u013C":"l","\u013D":"L","\u013E":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014C":"O","\u014D":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015A":"S","\u015B":"s","\u015E":"S","\u015F":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016A":"u","\u016B":"u","\u016E":"U","\u016F":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017A":"z","\u017B":"Z","\u017C":"z","\u017D":"Z","\u017E":"z","\u018F":"E","\u0192":"f","\u01A0":"O","\u01A1":"o","\u01AF":"U","\u01B0":"u","\u01C8":"LJ","\u01C9":"lj","\u01CB":"NJ","\u01CC":"nj","\u0218":"S","\u0219":"s","\u021A":"T","\u021B":"t","\u0259":"e","\u02DA":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038A":"I","\u038C":"O","\u038E":"Y","\u038F":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039A":"K","\u039B":"L","\u039C":"M","\u039D":"N","\u039E":"3","\u039F":"O","\u03A0":"P","\u03A1":"R","\u03A3":"S","\u03A4":"T","\u03A5":"Y","\u03A6":"F","\u03A7":"X","\u03A8":"PS","\u03A9":"W","\u03AA":"I","\u03AB":"Y","\u03AC":"a","\u03AD":"e","\u03AE":"h","\u03AF":"i","\u03B0":"y","\u03B1":"a","\u03B2":"b","\u03B3":"g","\u03B4":"d","\u03B5":"e","\u03B6":"z","\u03B7":"h","\u03B8":"8","\u03B9":"i","\u03BA":"k","\u03BB":"l","\u03BC":"m","\u03BD":"n","\u03BE":"3","\u03BF":"o","\u03C0":"p","\u03C1":"r","\u03C2":"s","\u03C3":"s","\u03C4":"t","\u03C5":"y","\u03C6":"f","\u03C7":"x","\u03C8":"ps","\u03C9":"w","\u03CA":"i","\u03CB":"y","\u03CC":"o","\u03CD":"y","\u03CE":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040A":"NJ","\u040B":"C","\u040F":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041A":"K","\u041B":"L","\u041C":"M","\u041D":"N","\u041E":"O","\u041F":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042A":"U","\u042B":"Y","\u042C":"","\u042D":"E","\u042E":"Yu","\u042F":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043A":"k","\u043B":"l","\u043C":"m","\u043D":"n","\u043E":"o","\u043F":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044A":"u","\u044B":"y","\u044C":"","\u044D":"e","\u044E":"yu","\u044F":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045A":"nj","\u045B":"c","\u045D":"u","\u045F":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049A":"KH","\u049B":"kh","\u04A2":"NG","\u04A3":"ng","\u04AE":"UE","\u04AF":"ue","\u04B0":"U","\u04B1":"u","\u04BA":"H","\u04BB":"h","\u04D8":"AE","\u04D9":"ae","\u04E8":"OE","\u04E9":"oe","\u0531":"A","\u0532":"B","\u0533":"G","\u0534":"D","\u0535":"E","\u0536":"Z","\u0537":"E'","\u0538":"Y'","\u0539":"T'","\u053A":"JH","\u053B":"I","\u053C":"L","\u053D":"X","\u053E":"C'","\u053F":"K","\u0540":"H","\u0541":"D'","\u0542":"GH","\u0543":"TW","\u0544":"M","\u0545":"Y","\u0546":"N","\u0547":"SH","\u0549":"CH","\u054A":"P","\u054B":"J","\u054C":"R'","\u054D":"S","\u054E":"V","\u054F":"T","\u0550":"R","\u0551":"C","\u0553":"P'","\u0554":"Q'","\u0555":"O''","\u0556":"F","\u0587":"EV","\u0621":"a","\u0622":"aa","\u0623":"a","\u0624":"u","\u0625":"i","\u0626":"e","\u0627":"a","\u0628":"b","\u0629":"h","\u062A":"t","\u062B":"th","\u062C":"j","\u062D":"h","\u062E":"kh","\u062F":"d","\u0630":"th","\u0631":"r","\u0632":"z","\u0633":"s","\u0634":"sh","\u0635":"s","\u0636":"dh","\u0637":"t","\u0638":"z","\u0639":"a","\u063A":"gh","\u0641":"f","\u0642":"q","\u0643":"k","\u0644":"l","\u0645":"m","\u0646":"n","\u0647":"h","\u0648":"w","\u0649":"a","\u064A":"y","\u064B":"an","\u064C":"on","\u064D":"en","\u064E":"a","\u064F":"u","\u0650":"e","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u067E":"p","\u0686":"ch","\u0698":"zh","\u06A9":"k","\u06AF":"g","\u06CC":"y","\u06F0":"0","\u06F1":"1","\u06F2":"2","\u06F3":"3","\u06F4":"4","\u06F5":"5","\u06F6":"6","\u06F7":"7","\u06F8":"8","\u06F9":"9","\u0E3F":"baht","\u10D0":"a","\u10D1":"b","\u10D2":"g","\u10D3":"d","\u10D4":"e","\u10D5":"v","\u10D6":"z","\u10D7":"t","\u10D8":"i","\u10D9":"k","\u10DA":"l","\u10DB":"m","\u10DC":"n","\u10DD":"o","\u10DE":"p","\u10DF":"zh","\u10E0":"r","\u10E1":"s","\u10E2":"t","\u10E3":"u","\u10E4":"f","\u10E5":"k","\u10E6":"gh","\u10E7":"q","\u10E8":"sh","\u10E9":"ch","\u10EA":"ts","\u10EB":"dz","\u10EC":"ts","\u10ED":"ch","\u10EE":"kh","\u10EF":"j","\u10F0":"h","\u1E62":"S","\u1E63":"s","\u1E80":"W","\u1E81":"w","\u1E82":"W","\u1E83":"w","\u1E84":"W","\u1E85":"w","\u1E9E":"SS","\u1EA0":"A","\u1EA1":"a","\u1EA2":"A","\u1EA3":"a","\u1EA4":"A","\u1EA5":"a","\u1EA6":"A","\u1EA7":"a","\u1EA8":"A","\u1EA9":"a","\u1EAA":"A","\u1EAB":"a","\u1EAC":"A","\u1EAD":"a","\u1EAE":"A","\u1EAF":"a","\u1EB0":"A","\u1EB1":"a","\u1EB2":"A","\u1EB3":"a","\u1EB4":"A","\u1EB5":"a","\u1EB6":"A","\u1EB7":"a","\u1EB8":"E","\u1EB9":"e","\u1EBA":"E","\u1EBB":"e","\u1EBC":"E","\u1EBD":"e","\u1EBE":"E","\u1EBF":"e","\u1EC0":"E","\u1EC1":"e","\u1EC2":"E","\u1EC3":"e","\u1EC4":"E","\u1EC5":"e","\u1EC6":"E","\u1EC7":"e","\u1EC8":"I","\u1EC9":"i","\u1ECA":"I","\u1ECB":"i","\u1ECC":"O","\u1ECD":"o","\u1ECE":"O","\u1ECF":"o","\u1ED0":"O","\u1ED1":"o","\u1ED2":"O","\u1ED3":"o","\u1ED4":"O","\u1ED5":"o","\u1ED6":"O","\u1ED7":"o","\u1ED8":"O","\u1ED9":"o","\u1EDA":"O","\u1EDB":"o","\u1EDC":"O","\u1EDD":"o","\u1EDE":"O","\u1EDF":"o","\u1EE0":"O","\u1EE1":"o","\u1EE2":"O","\u1EE3":"o","\u1EE4":"U","\u1EE5":"u","\u1EE6":"U","\u1EE7":"u","\u1EE8":"U","\u1EE9":"u","\u1EEA":"U","\u1EEB":"u","\u1EEC":"U","\u1EED":"u","\u1EEE":"U","\u1EEF":"u","\u1EF0":"U","\u1EF1":"u","\u1EF2":"Y","\u1EF3":"y","\u1EF4":"Y","\u1EF5":"y","\u1EF6":"Y","\u1EF7":"y","\u1EF8":"Y","\u1EF9":"y","\u2013":"-","\u2018":"'","\u2019":"'","\u201C":"\\"","\u201D":"\\"","\u201E":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20A0":"ecu","\u20A2":"cruzeiro","\u20A3":"french franc","\u20A4":"lira","\u20A5":"mill","\u20A6":"naira","\u20A7":"peseta","\u20A8":"rupee","\u20A9":"won","\u20AA":"new shequel","\u20AB":"dong","\u20AC":"euro","\u20AD":"kip","\u20AE":"tugrik","\u20AF":"drachma","\u20B0":"penny","\u20B1":"peso","\u20B2":"guarani","\u20B3":"austral","\u20B4":"hryvnia","\u20B5":"cedi","\u20B8":"kazakhstani tenge","\u20B9":"indian rupee","\u20BA":"turkish lira","\u20BD":"russian ruble","\u20BF":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221E":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\uFDFC":"rial","\uFEF5":"laa","\uFEF7":"laa","\uFEF9":"lai","\uFEFB":"la"}`);
|
|
1808
|
+
var locales = JSON.parse('{"bg":{"\u0419":"Y","\u0426":"Ts","\u0429":"Sht","\u042A":"A","\u042C":"Y","\u0439":"y","\u0446":"ts","\u0449":"sht","\u044A":"a","\u044C":"y"},"de":{"\xC4":"AE","\xE4":"ae","\xD6":"OE","\xF6":"oe","\xDC":"UE","\xFC":"ue","\xDF":"ss","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221E":"unendlich","\u2665":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","\xA2":"centavos","\xA3":"libras","\xA4":"moneda","\u20A3":"francos","\u2211":"suma","\u221E":"infinito","\u2665":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xA2":"centime","\xA3":"livre","\xA4":"devise","\u20A3":"franc","\u2211":"somme","\u221E":"infini","\u2665":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","\xA2":"centavo","\u2211":"soma","\xA3":"libra","\u221E":"infinito","\u2665":"amor"},"uk":{"\u0418":"Y","\u0438":"y","\u0419":"Y","\u0439":"y","\u0426":"Ts","\u0446":"ts","\u0425":"Kh","\u0445":"kh","\u0429":"Shch","\u0449":"shch","\u0413":"H","\u0433":"h"},"vi":{"\u0110":"D","\u0111":"d"},"da":{"\xD8":"OE","\xF8":"oe","\xC5":"AA","\xE5":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"st\xF8rre end"},"nb":{"&":"og","\xC5":"AA","\xC6":"AE","\xD8":"OE","\xE5":"aa","\xE6":"ae","\xF8":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","\xC5":"AA","\xC4":"AE","\xD6":"OE","\xE5":"aa","\xE4":"ae","\xF6":"oe"}}');
|
|
1809
|
+
function replace(string, options) {
|
|
1810
|
+
if (typeof string !== "string") {
|
|
1811
|
+
throw new Error("slugify: string argument expected");
|
|
1812
|
+
}
|
|
1813
|
+
options = typeof options === "string" ? { replacement: options } : options || {};
|
|
1814
|
+
var locale = locales[options.locale] || {};
|
|
1815
|
+
var replacement = options.replacement === undefined ? "-" : options.replacement;
|
|
1816
|
+
var trim = options.trim === undefined ? true : options.trim;
|
|
1817
|
+
var slug = string.normalize().split("").reduce(function(result, ch) {
|
|
1818
|
+
var appendChar = locale[ch];
|
|
1819
|
+
if (appendChar === undefined)
|
|
1820
|
+
appendChar = charMap[ch];
|
|
1821
|
+
if (appendChar === undefined)
|
|
1822
|
+
appendChar = ch;
|
|
1823
|
+
if (appendChar === replacement)
|
|
1824
|
+
appendChar = " ";
|
|
1825
|
+
return result + appendChar.replace(options.remove || /[^\w\s$*_+~.()'"!\-:@]+/g, "");
|
|
1826
|
+
}, "");
|
|
1827
|
+
if (options.strict) {
|
|
1828
|
+
slug = slug.replace(/[^A-Za-z0-9\s]/g, "");
|
|
1829
|
+
}
|
|
1830
|
+
if (trim) {
|
|
1831
|
+
slug = slug.trim();
|
|
1832
|
+
}
|
|
1833
|
+
slug = slug.replace(/\s+/g, replacement);
|
|
1834
|
+
if (options.lower) {
|
|
1835
|
+
slug = slug.toLowerCase();
|
|
1836
|
+
}
|
|
1837
|
+
return slug;
|
|
1838
|
+
}
|
|
1839
|
+
replace.extend = function(customMap) {
|
|
1840
|
+
Object.assign(charMap, customMap);
|
|
1841
|
+
};
|
|
1842
|
+
return replace;
|
|
1843
|
+
});
|
|
1844
|
+
});
|
|
1845
|
+
|
|
1846
|
+
// ../../../../node_modules/pluralize/pluralize.js
|
|
1847
|
+
var require_pluralize = __commonJS((exports, module) => {
|
|
1848
|
+
(function(root, pluralize) {
|
|
1849
|
+
if (typeof __require === "function" && typeof exports === "object" && typeof module === "object") {
|
|
1850
|
+
module.exports = pluralize();
|
|
1851
|
+
} else if (typeof define === "function" && define.amd) {
|
|
1852
|
+
define(function() {
|
|
1853
|
+
return pluralize();
|
|
1854
|
+
});
|
|
1855
|
+
} else {
|
|
1856
|
+
root.pluralize = pluralize();
|
|
1857
|
+
}
|
|
1858
|
+
})(exports, function() {
|
|
1859
|
+
var pluralRules = [];
|
|
1860
|
+
var singularRules = [];
|
|
1861
|
+
var uncountables = {};
|
|
1862
|
+
var irregularPlurals = {};
|
|
1863
|
+
var irregularSingles = {};
|
|
1864
|
+
function sanitizeRule(rule) {
|
|
1865
|
+
if (typeof rule === "string") {
|
|
1866
|
+
return new RegExp("^" + rule + "$", "i");
|
|
1867
|
+
}
|
|
1868
|
+
return rule;
|
|
1869
|
+
}
|
|
1870
|
+
function restoreCase(word, token) {
|
|
1871
|
+
if (word === token)
|
|
1872
|
+
return token;
|
|
1873
|
+
if (word === word.toLowerCase())
|
|
1874
|
+
return token.toLowerCase();
|
|
1875
|
+
if (word === word.toUpperCase())
|
|
1876
|
+
return token.toUpperCase();
|
|
1877
|
+
if (word[0] === word[0].toUpperCase()) {
|
|
1878
|
+
return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase();
|
|
1879
|
+
}
|
|
1880
|
+
return token.toLowerCase();
|
|
1881
|
+
}
|
|
1882
|
+
function interpolate(str, args) {
|
|
1883
|
+
return str.replace(/\$(\d{1,2})/g, function(match, index) {
|
|
1884
|
+
return args[index] || "";
|
|
1885
|
+
});
|
|
1886
|
+
}
|
|
1887
|
+
function replace(word, rule) {
|
|
1888
|
+
return word.replace(rule[0], function(match, index) {
|
|
1889
|
+
var result = interpolate(rule[1], arguments);
|
|
1890
|
+
if (match === "") {
|
|
1891
|
+
return restoreCase(word[index - 1], result);
|
|
1892
|
+
}
|
|
1893
|
+
return restoreCase(match, result);
|
|
1894
|
+
});
|
|
1895
|
+
}
|
|
1896
|
+
function sanitizeWord(token, word, rules) {
|
|
1897
|
+
if (!token.length || uncountables.hasOwnProperty(token)) {
|
|
1898
|
+
return word;
|
|
1899
|
+
}
|
|
1900
|
+
var len = rules.length;
|
|
1901
|
+
while (len--) {
|
|
1902
|
+
var rule = rules[len];
|
|
1903
|
+
if (rule[0].test(word))
|
|
1904
|
+
return replace(word, rule);
|
|
1905
|
+
}
|
|
1906
|
+
return word;
|
|
1907
|
+
}
|
|
1908
|
+
function replaceWord(replaceMap, keepMap, rules) {
|
|
1909
|
+
return function(word) {
|
|
1910
|
+
var token = word.toLowerCase();
|
|
1911
|
+
if (keepMap.hasOwnProperty(token)) {
|
|
1912
|
+
return restoreCase(word, token);
|
|
1913
|
+
}
|
|
1914
|
+
if (replaceMap.hasOwnProperty(token)) {
|
|
1915
|
+
return restoreCase(word, replaceMap[token]);
|
|
1916
|
+
}
|
|
1917
|
+
return sanitizeWord(token, word, rules);
|
|
1918
|
+
};
|
|
1919
|
+
}
|
|
1920
|
+
function checkWord(replaceMap, keepMap, rules, bool) {
|
|
1921
|
+
return function(word) {
|
|
1922
|
+
var token = word.toLowerCase();
|
|
1923
|
+
if (keepMap.hasOwnProperty(token))
|
|
1924
|
+
return true;
|
|
1925
|
+
if (replaceMap.hasOwnProperty(token))
|
|
1926
|
+
return false;
|
|
1927
|
+
return sanitizeWord(token, token, rules) === token;
|
|
1928
|
+
};
|
|
1929
|
+
}
|
|
1930
|
+
function pluralize(word, count, inclusive) {
|
|
1931
|
+
var pluralized = count === 1 ? pluralize.singular(word) : pluralize.plural(word);
|
|
1932
|
+
return (inclusive ? count + " " : "") + pluralized;
|
|
1933
|
+
}
|
|
1934
|
+
pluralize.plural = replaceWord(irregularSingles, irregularPlurals, pluralRules);
|
|
1935
|
+
pluralize.isPlural = checkWord(irregularSingles, irregularPlurals, pluralRules);
|
|
1936
|
+
pluralize.singular = replaceWord(irregularPlurals, irregularSingles, singularRules);
|
|
1937
|
+
pluralize.isSingular = checkWord(irregularPlurals, irregularSingles, singularRules);
|
|
1938
|
+
pluralize.addPluralRule = function(rule, replacement) {
|
|
1939
|
+
pluralRules.push([sanitizeRule(rule), replacement]);
|
|
1940
|
+
};
|
|
1941
|
+
pluralize.addSingularRule = function(rule, replacement) {
|
|
1942
|
+
singularRules.push([sanitizeRule(rule), replacement]);
|
|
1943
|
+
};
|
|
1944
|
+
pluralize.addUncountableRule = function(word) {
|
|
1945
|
+
if (typeof word === "string") {
|
|
1946
|
+
uncountables[word.toLowerCase()] = true;
|
|
1947
|
+
return;
|
|
1948
|
+
}
|
|
1949
|
+
pluralize.addPluralRule(word, "$0");
|
|
1950
|
+
pluralize.addSingularRule(word, "$0");
|
|
1951
|
+
};
|
|
1952
|
+
pluralize.addIrregularRule = function(single, plural) {
|
|
1953
|
+
plural = plural.toLowerCase();
|
|
1954
|
+
single = single.toLowerCase();
|
|
1955
|
+
irregularSingles[single] = plural;
|
|
1956
|
+
irregularPlurals[plural] = single;
|
|
1957
|
+
};
|
|
1958
|
+
[
|
|
1959
|
+
["I", "we"],
|
|
1960
|
+
["me", "us"],
|
|
1961
|
+
["he", "they"],
|
|
1962
|
+
["she", "they"],
|
|
1963
|
+
["them", "them"],
|
|
1964
|
+
["myself", "ourselves"],
|
|
1965
|
+
["yourself", "yourselves"],
|
|
1966
|
+
["itself", "themselves"],
|
|
1967
|
+
["herself", "themselves"],
|
|
1968
|
+
["himself", "themselves"],
|
|
1969
|
+
["themself", "themselves"],
|
|
1970
|
+
["is", "are"],
|
|
1971
|
+
["was", "were"],
|
|
1972
|
+
["has", "have"],
|
|
1973
|
+
["this", "these"],
|
|
1974
|
+
["that", "those"],
|
|
1975
|
+
["echo", "echoes"],
|
|
1976
|
+
["dingo", "dingoes"],
|
|
1977
|
+
["volcano", "volcanoes"],
|
|
1978
|
+
["tornado", "tornadoes"],
|
|
1979
|
+
["torpedo", "torpedoes"],
|
|
1980
|
+
["genus", "genera"],
|
|
1981
|
+
["viscus", "viscera"],
|
|
1982
|
+
["stigma", "stigmata"],
|
|
1983
|
+
["stoma", "stomata"],
|
|
1984
|
+
["dogma", "dogmata"],
|
|
1985
|
+
["lemma", "lemmata"],
|
|
1986
|
+
["schema", "schemata"],
|
|
1987
|
+
["anathema", "anathemata"],
|
|
1988
|
+
["ox", "oxen"],
|
|
1989
|
+
["axe", "axes"],
|
|
1990
|
+
["die", "dice"],
|
|
1991
|
+
["yes", "yeses"],
|
|
1992
|
+
["foot", "feet"],
|
|
1993
|
+
["eave", "eaves"],
|
|
1994
|
+
["goose", "geese"],
|
|
1995
|
+
["tooth", "teeth"],
|
|
1996
|
+
["quiz", "quizzes"],
|
|
1997
|
+
["human", "humans"],
|
|
1998
|
+
["proof", "proofs"],
|
|
1999
|
+
["carve", "carves"],
|
|
2000
|
+
["valve", "valves"],
|
|
2001
|
+
["looey", "looies"],
|
|
2002
|
+
["thief", "thieves"],
|
|
2003
|
+
["groove", "grooves"],
|
|
2004
|
+
["pickaxe", "pickaxes"],
|
|
2005
|
+
["passerby", "passersby"]
|
|
2006
|
+
].forEach(function(rule) {
|
|
2007
|
+
return pluralize.addIrregularRule(rule[0], rule[1]);
|
|
2008
|
+
});
|
|
2009
|
+
[
|
|
2010
|
+
[/s?$/i, "s"],
|
|
2011
|
+
[/[^\u0000-\u007F]$/i, "$0"],
|
|
2012
|
+
[/([^aeiou]ese)$/i, "$1"],
|
|
2013
|
+
[/(ax|test)is$/i, "$1es"],
|
|
2014
|
+
[/(alias|[^aou]us|t[lm]as|gas|ris)$/i, "$1es"],
|
|
2015
|
+
[/(e[mn]u)s?$/i, "$1s"],
|
|
2016
|
+
[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i, "$1"],
|
|
2017
|
+
[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1i"],
|
|
2018
|
+
[/(alumn|alg|vertebr)(?:a|ae)$/i, "$1ae"],
|
|
2019
|
+
[/(seraph|cherub)(?:im)?$/i, "$1im"],
|
|
2020
|
+
[/(her|at|gr)o$/i, "$1oes"],
|
|
2021
|
+
[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, "$1a"],
|
|
2022
|
+
[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, "$1a"],
|
|
2023
|
+
[/sis$/i, "ses"],
|
|
2024
|
+
[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, "$1$2ves"],
|
|
2025
|
+
[/([^aeiouy]|qu)y$/i, "$1ies"],
|
|
2026
|
+
[/([^ch][ieo][ln])ey$/i, "$1ies"],
|
|
2027
|
+
[/(x|ch|ss|sh|zz)$/i, "$1es"],
|
|
2028
|
+
[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, "$1ices"],
|
|
2029
|
+
[/\b((?:tit)?m|l)(?:ice|ouse)$/i, "$1ice"],
|
|
2030
|
+
[/(pe)(?:rson|ople)$/i, "$1ople"],
|
|
2031
|
+
[/(child)(?:ren)?$/i, "$1ren"],
|
|
2032
|
+
[/eaux$/i, "$0"],
|
|
2033
|
+
[/m[ae]n$/i, "men"],
|
|
2034
|
+
["thou", "you"]
|
|
2035
|
+
].forEach(function(rule) {
|
|
2036
|
+
return pluralize.addPluralRule(rule[0], rule[1]);
|
|
2037
|
+
});
|
|
2038
|
+
[
|
|
2039
|
+
[/s$/i, ""],
|
|
2040
|
+
[/(ss)$/i, "$1"],
|
|
2041
|
+
[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i, "$1fe"],
|
|
2042
|
+
[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, "$1f"],
|
|
2043
|
+
[/ies$/i, "y"],
|
|
2044
|
+
[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, "$1ie"],
|
|
2045
|
+
[/\b(mon|smil)ies$/i, "$1ey"],
|
|
2046
|
+
[/\b((?:tit)?m|l)ice$/i, "$1ouse"],
|
|
2047
|
+
[/(seraph|cherub)im$/i, "$1"],
|
|
2048
|
+
[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i, "$1"],
|
|
2049
|
+
[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i, "$1sis"],
|
|
2050
|
+
[/(movie|twelve|abuse|e[mn]u)s$/i, "$1"],
|
|
2051
|
+
[/(test)(?:is|es)$/i, "$1is"],
|
|
2052
|
+
[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1us"],
|
|
2053
|
+
[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, "$1um"],
|
|
2054
|
+
[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, "$1on"],
|
|
2055
|
+
[/(alumn|alg|vertebr)ae$/i, "$1a"],
|
|
2056
|
+
[/(cod|mur|sil|vert|ind)ices$/i, "$1ex"],
|
|
2057
|
+
[/(matr|append)ices$/i, "$1ix"],
|
|
2058
|
+
[/(pe)(rson|ople)$/i, "$1rson"],
|
|
2059
|
+
[/(child)ren$/i, "$1"],
|
|
2060
|
+
[/(eau)x?$/i, "$1"],
|
|
2061
|
+
[/men$/i, "man"]
|
|
2062
|
+
].forEach(function(rule) {
|
|
2063
|
+
return pluralize.addSingularRule(rule[0], rule[1]);
|
|
2064
|
+
});
|
|
2065
|
+
[
|
|
2066
|
+
"adulthood",
|
|
2067
|
+
"advice",
|
|
2068
|
+
"agenda",
|
|
2069
|
+
"aid",
|
|
2070
|
+
"aircraft",
|
|
2071
|
+
"alcohol",
|
|
2072
|
+
"ammo",
|
|
2073
|
+
"analytics",
|
|
2074
|
+
"anime",
|
|
2075
|
+
"athletics",
|
|
2076
|
+
"audio",
|
|
2077
|
+
"bison",
|
|
2078
|
+
"blood",
|
|
2079
|
+
"bream",
|
|
2080
|
+
"buffalo",
|
|
2081
|
+
"butter",
|
|
2082
|
+
"carp",
|
|
2083
|
+
"cash",
|
|
2084
|
+
"chassis",
|
|
2085
|
+
"chess",
|
|
2086
|
+
"clothing",
|
|
2087
|
+
"cod",
|
|
2088
|
+
"commerce",
|
|
2089
|
+
"cooperation",
|
|
2090
|
+
"corps",
|
|
2091
|
+
"debris",
|
|
2092
|
+
"diabetes",
|
|
2093
|
+
"digestion",
|
|
2094
|
+
"elk",
|
|
2095
|
+
"energy",
|
|
2096
|
+
"equipment",
|
|
2097
|
+
"excretion",
|
|
2098
|
+
"expertise",
|
|
2099
|
+
"firmware",
|
|
2100
|
+
"flounder",
|
|
2101
|
+
"fun",
|
|
2102
|
+
"gallows",
|
|
2103
|
+
"garbage",
|
|
2104
|
+
"graffiti",
|
|
2105
|
+
"hardware",
|
|
2106
|
+
"headquarters",
|
|
2107
|
+
"health",
|
|
2108
|
+
"herpes",
|
|
2109
|
+
"highjinks",
|
|
2110
|
+
"homework",
|
|
2111
|
+
"housework",
|
|
2112
|
+
"information",
|
|
2113
|
+
"jeans",
|
|
2114
|
+
"justice",
|
|
2115
|
+
"kudos",
|
|
2116
|
+
"labour",
|
|
2117
|
+
"literature",
|
|
2118
|
+
"machinery",
|
|
2119
|
+
"mackerel",
|
|
2120
|
+
"mail",
|
|
2121
|
+
"media",
|
|
2122
|
+
"mews",
|
|
2123
|
+
"moose",
|
|
2124
|
+
"music",
|
|
2125
|
+
"mud",
|
|
2126
|
+
"manga",
|
|
2127
|
+
"news",
|
|
2128
|
+
"only",
|
|
2129
|
+
"personnel",
|
|
2130
|
+
"pike",
|
|
2131
|
+
"plankton",
|
|
2132
|
+
"pliers",
|
|
2133
|
+
"police",
|
|
2134
|
+
"pollution",
|
|
2135
|
+
"premises",
|
|
2136
|
+
"rain",
|
|
2137
|
+
"research",
|
|
2138
|
+
"rice",
|
|
2139
|
+
"salmon",
|
|
2140
|
+
"scissors",
|
|
2141
|
+
"series",
|
|
2142
|
+
"sewage",
|
|
2143
|
+
"shambles",
|
|
2144
|
+
"shrimp",
|
|
2145
|
+
"software",
|
|
2146
|
+
"species",
|
|
2147
|
+
"staff",
|
|
2148
|
+
"swine",
|
|
2149
|
+
"tennis",
|
|
2150
|
+
"traffic",
|
|
2151
|
+
"transportation",
|
|
2152
|
+
"trout",
|
|
2153
|
+
"tuna",
|
|
2154
|
+
"wealth",
|
|
2155
|
+
"welfare",
|
|
2156
|
+
"whiting",
|
|
2157
|
+
"wildebeest",
|
|
2158
|
+
"wildlife",
|
|
2159
|
+
"you",
|
|
2160
|
+
/pok[eé]mon$/i,
|
|
2161
|
+
/[^aeiou]ese$/i,
|
|
2162
|
+
/deer$/i,
|
|
2163
|
+
/fish$/i,
|
|
2164
|
+
/measles$/i,
|
|
2165
|
+
/o[iu]s$/i,
|
|
2166
|
+
/pox$/i,
|
|
2167
|
+
/sheep$/i
|
|
2168
|
+
].forEach(pluralize.addUncountableRule);
|
|
2169
|
+
return pluralize;
|
|
2170
|
+
});
|
|
2171
|
+
});
|
|
2172
|
+
|
|
21
2173
|
// ../../../../node_modules/universalify/index.js
|
|
22
2174
|
var require_universalify = __commonJS((exports) => {
|
|
23
2175
|
exports.fromCallback = function(fn) {
|
|
@@ -39,7 +2191,7 @@ var require_universalify = __commonJS((exports) => {
|
|
|
39
2191
|
return fn.apply(this, args);
|
|
40
2192
|
else {
|
|
41
2193
|
args.pop();
|
|
42
|
-
fn.apply(this, args).then((
|
|
2194
|
+
fn.apply(this, args).then((r2) => cb(null, r2), cb);
|
|
43
2195
|
}
|
|
44
2196
|
}, "name", { value: fn.name });
|
|
45
2197
|
};
|
|
@@ -88,7 +2240,7 @@ var require_polyfills = __commonJS((exports, module) => {
|
|
|
88
2240
|
fs.lchownSync = function() {
|
|
89
2241
|
};
|
|
90
2242
|
}
|
|
91
|
-
if (
|
|
2243
|
+
if (platform2 === "win32") {
|
|
92
2244
|
fs.rename = typeof fs.rename !== "function" ? fs.rename : function(fs$rename) {
|
|
93
2245
|
function rename(from, to, cb) {
|
|
94
2246
|
var start = Date.now();
|
|
@@ -121,7 +2273,7 @@ var require_polyfills = __commonJS((exports, module) => {
|
|
|
121
2273
|
var callback;
|
|
122
2274
|
if (callback_ && typeof callback_ === "function") {
|
|
123
2275
|
var eagCounter = 0;
|
|
124
|
-
callback = function(er,
|
|
2276
|
+
callback = function(er, _2, __) {
|
|
125
2277
|
if (er && er.code === "EAGAIN" && eagCounter < 10) {
|
|
126
2278
|
eagCounter++;
|
|
127
2279
|
return fs$read.call(fs, fd, buffer, offset, length, position, callback);
|
|
@@ -331,7 +2483,7 @@ var require_polyfills = __commonJS((exports, module) => {
|
|
|
331
2483
|
var constants = __require("constants");
|
|
332
2484
|
var origCwd = process.cwd;
|
|
333
2485
|
var cwd = null;
|
|
334
|
-
var
|
|
2486
|
+
var platform2 = process.env.GRACEFUL_FS_PLATFORM || process.platform;
|
|
335
2487
|
process.cwd = function() {
|
|
336
2488
|
if (!cwd)
|
|
337
2489
|
cwd = origCwd.call(process);
|
|
@@ -359,7 +2511,7 @@ var require_legacy_streams = __commonJS((exports, module) => {
|
|
|
359
2511
|
var legacy = function(fs) {
|
|
360
2512
|
return {
|
|
361
2513
|
ReadStream,
|
|
362
|
-
WriteStream
|
|
2514
|
+
WriteStream: WriteStream2
|
|
363
2515
|
};
|
|
364
2516
|
function ReadStream(path, options) {
|
|
365
2517
|
if (!(this instanceof ReadStream))
|
|
@@ -412,9 +2564,9 @@ var require_legacy_streams = __commonJS((exports, module) => {
|
|
|
412
2564
|
self._read();
|
|
413
2565
|
});
|
|
414
2566
|
}
|
|
415
|
-
function
|
|
416
|
-
if (!(this instanceof
|
|
417
|
-
return new
|
|
2567
|
+
function WriteStream2(path, options) {
|
|
2568
|
+
if (!(this instanceof WriteStream2))
|
|
2569
|
+
return new WriteStream2(path, options);
|
|
418
2570
|
Stream.call(this);
|
|
419
2571
|
this.path = path;
|
|
420
2572
|
this.fd = null;
|
|
@@ -475,10 +2627,10 @@ var require_clone = __commonJS((exports, module) => {
|
|
|
475
2627
|
var require_graceful_fs = __commonJS((exports, module) => {
|
|
476
2628
|
var noop = function() {
|
|
477
2629
|
};
|
|
478
|
-
var publishQueue = function(context,
|
|
2630
|
+
var publishQueue = function(context, queue4) {
|
|
479
2631
|
Object.defineProperty(context, gracefulQueue, {
|
|
480
2632
|
get: function() {
|
|
481
|
-
return
|
|
2633
|
+
return queue4;
|
|
482
2634
|
}
|
|
483
2635
|
});
|
|
484
2636
|
};
|
|
@@ -542,16 +2694,16 @@ var require_graceful_fs = __commonJS((exports, module) => {
|
|
|
542
2694
|
var fs$copyFile = fs2.copyFile;
|
|
543
2695
|
if (fs$copyFile)
|
|
544
2696
|
fs2.copyFile = copyFile;
|
|
545
|
-
function copyFile(
|
|
2697
|
+
function copyFile(src2, dest, flags, cb) {
|
|
546
2698
|
if (typeof flags === "function") {
|
|
547
2699
|
cb = flags;
|
|
548
2700
|
flags = 0;
|
|
549
2701
|
}
|
|
550
|
-
return go$copyFile(
|
|
551
|
-
function go$copyFile(
|
|
552
|
-
return fs$copyFile(
|
|
2702
|
+
return go$copyFile(src2, dest, flags, cb);
|
|
2703
|
+
function go$copyFile(src3, dest2, flags2, cb2, startTime) {
|
|
2704
|
+
return fs$copyFile(src3, dest2, flags2, function(err) {
|
|
553
2705
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
554
|
-
enqueue([go$copyFile, [
|
|
2706
|
+
enqueue([go$copyFile, [src3, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
555
2707
|
else {
|
|
556
2708
|
if (typeof cb2 === "function")
|
|
557
2709
|
cb2.apply(this, arguments);
|
|
@@ -593,7 +2745,7 @@ var require_graceful_fs = __commonJS((exports, module) => {
|
|
|
593
2745
|
if (process.version.substr(0, 4) === "v0.8") {
|
|
594
2746
|
var legStreams = legacy(fs2);
|
|
595
2747
|
ReadStream = legStreams.ReadStream;
|
|
596
|
-
|
|
2748
|
+
WriteStream2 = legStreams.WriteStream;
|
|
597
2749
|
}
|
|
598
2750
|
var fs$ReadStream = fs2.ReadStream;
|
|
599
2751
|
if (fs$ReadStream) {
|
|
@@ -602,8 +2754,8 @@ var require_graceful_fs = __commonJS((exports, module) => {
|
|
|
602
2754
|
}
|
|
603
2755
|
var fs$WriteStream = fs2.WriteStream;
|
|
604
2756
|
if (fs$WriteStream) {
|
|
605
|
-
|
|
606
|
-
|
|
2757
|
+
WriteStream2.prototype = Object.create(fs$WriteStream.prototype);
|
|
2758
|
+
WriteStream2.prototype.open = WriteStream$open;
|
|
607
2759
|
}
|
|
608
2760
|
Object.defineProperty(fs2, "ReadStream", {
|
|
609
2761
|
get: function() {
|
|
@@ -617,10 +2769,10 @@ var require_graceful_fs = __commonJS((exports, module) => {
|
|
|
617
2769
|
});
|
|
618
2770
|
Object.defineProperty(fs2, "WriteStream", {
|
|
619
2771
|
get: function() {
|
|
620
|
-
return
|
|
2772
|
+
return WriteStream2;
|
|
621
2773
|
},
|
|
622
2774
|
set: function(val) {
|
|
623
|
-
|
|
2775
|
+
WriteStream2 = val;
|
|
624
2776
|
},
|
|
625
2777
|
enumerable: true,
|
|
626
2778
|
configurable: true
|
|
@@ -636,7 +2788,7 @@ var require_graceful_fs = __commonJS((exports, module) => {
|
|
|
636
2788
|
enumerable: true,
|
|
637
2789
|
configurable: true
|
|
638
2790
|
});
|
|
639
|
-
var FileWriteStream =
|
|
2791
|
+
var FileWriteStream = WriteStream2;
|
|
640
2792
|
Object.defineProperty(fs2, "FileWriteStream", {
|
|
641
2793
|
get: function() {
|
|
642
2794
|
return FileWriteStream;
|
|
@@ -667,11 +2819,11 @@ var require_graceful_fs = __commonJS((exports, module) => {
|
|
|
667
2819
|
}
|
|
668
2820
|
});
|
|
669
2821
|
}
|
|
670
|
-
function
|
|
671
|
-
if (this instanceof
|
|
2822
|
+
function WriteStream2(path, options) {
|
|
2823
|
+
if (this instanceof WriteStream2)
|
|
672
2824
|
return fs$WriteStream.apply(this, arguments), this;
|
|
673
2825
|
else
|
|
674
|
-
return
|
|
2826
|
+
return WriteStream2.apply(Object.create(WriteStream2.prototype), arguments);
|
|
675
2827
|
}
|
|
676
2828
|
function WriteStream$open() {
|
|
677
2829
|
var that = this;
|
|
@@ -778,13 +2930,13 @@ var require_graceful_fs = __commonJS((exports, module) => {
|
|
|
778
2930
|
debug = util.debuglog("gfs4");
|
|
779
2931
|
else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
|
|
780
2932
|
debug = function() {
|
|
781
|
-
var
|
|
782
|
-
|
|
783
|
-
console.error(
|
|
2933
|
+
var m2 = util.format.apply(util, arguments);
|
|
2934
|
+
m2 = "GFS4: " + m2.split(/\n/).join("\nGFS4: ");
|
|
2935
|
+
console.error(m2);
|
|
784
2936
|
};
|
|
785
2937
|
if (!fs[gracefulQueue]) {
|
|
786
|
-
|
|
787
|
-
publishQueue(fs,
|
|
2938
|
+
queue3 = global[gracefulQueue] || [];
|
|
2939
|
+
publishQueue(fs, queue3);
|
|
788
2940
|
fs.close = function(fs$close) {
|
|
789
2941
|
function close(fd, cb) {
|
|
790
2942
|
return fs$close.call(fs, fd, function(err) {
|
|
@@ -817,7 +2969,7 @@ var require_graceful_fs = __commonJS((exports, module) => {
|
|
|
817
2969
|
});
|
|
818
2970
|
}
|
|
819
2971
|
}
|
|
820
|
-
var
|
|
2972
|
+
var queue3;
|
|
821
2973
|
if (!global[gracefulQueue]) {
|
|
822
2974
|
publishQueue(global, fs[gracefulQueue]);
|
|
823
2975
|
}
|
|
@@ -833,7 +2985,7 @@ var require_graceful_fs = __commonJS((exports, module) => {
|
|
|
833
2985
|
var require_fs = __commonJS((exports) => {
|
|
834
2986
|
var u = require_universalify().fromCallback;
|
|
835
2987
|
var fs = require_graceful_fs();
|
|
836
|
-
var
|
|
2988
|
+
var api2 = [
|
|
837
2989
|
"access",
|
|
838
2990
|
"appendFile",
|
|
839
2991
|
"chmod",
|
|
@@ -872,7 +3024,7 @@ var require_fs = __commonJS((exports) => {
|
|
|
872
3024
|
return typeof fs[key] === "function";
|
|
873
3025
|
});
|
|
874
3026
|
Object.assign(exports, fs);
|
|
875
|
-
|
|
3027
|
+
api2.forEach((method) => {
|
|
876
3028
|
exports[method] = u(fs[method]);
|
|
877
3029
|
});
|
|
878
3030
|
exports.exists = function(filename, callback) {
|
|
@@ -1040,10 +3192,10 @@ var require_utimes = __commonJS((exports, module) => {
|
|
|
1040
3192
|
|
|
1041
3193
|
// ../../../../node_modules/fs-extra/lib/util/stat.js
|
|
1042
3194
|
var require_stat = __commonJS((exports, module) => {
|
|
1043
|
-
var getStats = function(
|
|
3195
|
+
var getStats = function(src2, dest, opts) {
|
|
1044
3196
|
const statFunc = opts.dereference ? (file) => fs.stat(file, { bigint: true }) : (file) => fs.lstat(file, { bigint: true });
|
|
1045
3197
|
return Promise.all([
|
|
1046
|
-
statFunc(
|
|
3198
|
+
statFunc(src2),
|
|
1047
3199
|
statFunc(dest).catch((err) => {
|
|
1048
3200
|
if (err.code === "ENOENT")
|
|
1049
3201
|
return null;
|
|
@@ -1051,10 +3203,10 @@ var require_stat = __commonJS((exports, module) => {
|
|
|
1051
3203
|
})
|
|
1052
3204
|
]).then(([srcStat, destStat]) => ({ srcStat, destStat }));
|
|
1053
3205
|
};
|
|
1054
|
-
var getStatsSync = function(
|
|
3206
|
+
var getStatsSync = function(src2, dest, opts) {
|
|
1055
3207
|
let destStat;
|
|
1056
3208
|
const statFunc = opts.dereference ? (file) => fs.statSync(file, { bigint: true }) : (file) => fs.lstatSync(file, { bigint: true });
|
|
1057
|
-
const srcStat = statFunc(
|
|
3209
|
+
const srcStat = statFunc(src2);
|
|
1058
3210
|
try {
|
|
1059
3211
|
destStat = statFunc(dest);
|
|
1060
3212
|
} catch (err) {
|
|
@@ -1064,11 +3216,11 @@ var require_stat = __commonJS((exports, module) => {
|
|
|
1064
3216
|
}
|
|
1065
3217
|
return { srcStat, destStat };
|
|
1066
3218
|
};
|
|
1067
|
-
async function checkPaths(
|
|
1068
|
-
const { srcStat, destStat } = await getStats(
|
|
3219
|
+
async function checkPaths(src2, dest, funcName, opts) {
|
|
3220
|
+
const { srcStat, destStat } = await getStats(src2, dest, opts);
|
|
1069
3221
|
if (destStat) {
|
|
1070
3222
|
if (areIdentical(srcStat, destStat)) {
|
|
1071
|
-
const srcBaseName = path.basename(
|
|
3223
|
+
const srcBaseName = path.basename(src2);
|
|
1072
3224
|
const destBaseName = path.basename(dest);
|
|
1073
3225
|
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
1074
3226
|
return { srcStat, destStat, isChangingCase: true };
|
|
@@ -1076,22 +3228,22 @@ var require_stat = __commonJS((exports, module) => {
|
|
|
1076
3228
|
throw new Error("Source and destination must not be the same.");
|
|
1077
3229
|
}
|
|
1078
3230
|
if (srcStat.isDirectory() && !destStat.isDirectory()) {
|
|
1079
|
-
throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${
|
|
3231
|
+
throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src2}'.`);
|
|
1080
3232
|
}
|
|
1081
3233
|
if (!srcStat.isDirectory() && destStat.isDirectory()) {
|
|
1082
|
-
throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${
|
|
3234
|
+
throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src2}'.`);
|
|
1083
3235
|
}
|
|
1084
3236
|
}
|
|
1085
|
-
if (srcStat.isDirectory() && isSrcSubdir(
|
|
1086
|
-
throw new Error(errMsg(
|
|
3237
|
+
if (srcStat.isDirectory() && isSrcSubdir(src2, dest)) {
|
|
3238
|
+
throw new Error(errMsg(src2, dest, funcName));
|
|
1087
3239
|
}
|
|
1088
3240
|
return { srcStat, destStat };
|
|
1089
3241
|
}
|
|
1090
|
-
var checkPathsSync = function(
|
|
1091
|
-
const { srcStat, destStat } = getStatsSync(
|
|
3242
|
+
var checkPathsSync = function(src2, dest, funcName, opts) {
|
|
3243
|
+
const { srcStat, destStat } = getStatsSync(src2, dest, opts);
|
|
1092
3244
|
if (destStat) {
|
|
1093
3245
|
if (areIdentical(srcStat, destStat)) {
|
|
1094
|
-
const srcBaseName = path.basename(
|
|
3246
|
+
const srcBaseName = path.basename(src2);
|
|
1095
3247
|
const destBaseName = path.basename(dest);
|
|
1096
3248
|
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
1097
3249
|
return { srcStat, destStat, isChangingCase: true };
|
|
@@ -1099,19 +3251,19 @@ var require_stat = __commonJS((exports, module) => {
|
|
|
1099
3251
|
throw new Error("Source and destination must not be the same.");
|
|
1100
3252
|
}
|
|
1101
3253
|
if (srcStat.isDirectory() && !destStat.isDirectory()) {
|
|
1102
|
-
throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${
|
|
3254
|
+
throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src2}'.`);
|
|
1103
3255
|
}
|
|
1104
3256
|
if (!srcStat.isDirectory() && destStat.isDirectory()) {
|
|
1105
|
-
throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${
|
|
3257
|
+
throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src2}'.`);
|
|
1106
3258
|
}
|
|
1107
3259
|
}
|
|
1108
|
-
if (srcStat.isDirectory() && isSrcSubdir(
|
|
1109
|
-
throw new Error(errMsg(
|
|
3260
|
+
if (srcStat.isDirectory() && isSrcSubdir(src2, dest)) {
|
|
3261
|
+
throw new Error(errMsg(src2, dest, funcName));
|
|
1110
3262
|
}
|
|
1111
3263
|
return { srcStat, destStat };
|
|
1112
3264
|
};
|
|
1113
|
-
async function checkParentPaths(
|
|
1114
|
-
const srcParent = path.resolve(path.dirname(
|
|
3265
|
+
async function checkParentPaths(src2, srcStat, dest, funcName) {
|
|
3266
|
+
const srcParent = path.resolve(path.dirname(src2));
|
|
1115
3267
|
const destParent = path.resolve(path.dirname(dest));
|
|
1116
3268
|
if (destParent === srcParent || destParent === path.parse(destParent).root)
|
|
1117
3269
|
return;
|
|
@@ -1124,12 +3276,12 @@ var require_stat = __commonJS((exports, module) => {
|
|
|
1124
3276
|
throw err;
|
|
1125
3277
|
}
|
|
1126
3278
|
if (areIdentical(srcStat, destStat)) {
|
|
1127
|
-
throw new Error(errMsg(
|
|
3279
|
+
throw new Error(errMsg(src2, dest, funcName));
|
|
1128
3280
|
}
|
|
1129
|
-
return checkParentPaths(
|
|
3281
|
+
return checkParentPaths(src2, srcStat, destParent, funcName);
|
|
1130
3282
|
}
|
|
1131
|
-
var checkParentPathsSync = function(
|
|
1132
|
-
const srcParent = path.resolve(path.dirname(
|
|
3283
|
+
var checkParentPathsSync = function(src2, srcStat, dest, funcName) {
|
|
3284
|
+
const srcParent = path.resolve(path.dirname(src2));
|
|
1133
3285
|
const destParent = path.resolve(path.dirname(dest));
|
|
1134
3286
|
if (destParent === srcParent || destParent === path.parse(destParent).root)
|
|
1135
3287
|
return;
|
|
@@ -1142,20 +3294,20 @@ var require_stat = __commonJS((exports, module) => {
|
|
|
1142
3294
|
throw err;
|
|
1143
3295
|
}
|
|
1144
3296
|
if (areIdentical(srcStat, destStat)) {
|
|
1145
|
-
throw new Error(errMsg(
|
|
3297
|
+
throw new Error(errMsg(src2, dest, funcName));
|
|
1146
3298
|
}
|
|
1147
|
-
return checkParentPathsSync(
|
|
3299
|
+
return checkParentPathsSync(src2, srcStat, destParent, funcName);
|
|
1148
3300
|
};
|
|
1149
3301
|
var areIdentical = function(srcStat, destStat) {
|
|
1150
3302
|
return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
|
|
1151
3303
|
};
|
|
1152
|
-
var isSrcSubdir = function(
|
|
1153
|
-
const srcArr = path.resolve(
|
|
3304
|
+
var isSrcSubdir = function(src2, dest) {
|
|
3305
|
+
const srcArr = path.resolve(src2).split(path.sep).filter((i) => i);
|
|
1154
3306
|
const destArr = path.resolve(dest).split(path.sep).filter((i) => i);
|
|
1155
3307
|
return srcArr.every((cur, i) => destArr[i] === cur);
|
|
1156
3308
|
};
|
|
1157
|
-
var errMsg = function(
|
|
1158
|
-
return `Cannot ${funcName} '${
|
|
3309
|
+
var errMsg = function(src2, dest, funcName) {
|
|
3310
|
+
return `Cannot ${funcName} '${src2}' to a subdirectory of itself, '${dest}'.`;
|
|
1159
3311
|
};
|
|
1160
3312
|
var fs = require_fs();
|
|
1161
3313
|
var path = __require("path");
|
|
@@ -1172,7 +3324,7 @@ var require_stat = __commonJS((exports, module) => {
|
|
|
1172
3324
|
|
|
1173
3325
|
// ../../../../node_modules/fs-extra/lib/copy/copy.js
|
|
1174
3326
|
var require_copy = __commonJS((exports, module) => {
|
|
1175
|
-
async function copy(
|
|
3327
|
+
async function copy(src2, dest, opts = {}) {
|
|
1176
3328
|
if (typeof opts === "function") {
|
|
1177
3329
|
opts = { filter: opts };
|
|
1178
3330
|
}
|
|
@@ -1181,9 +3333,9 @@ var require_copy = __commonJS((exports, module) => {
|
|
|
1181
3333
|
if (opts.preserveTimestamps && process.arch === "ia32") {
|
|
1182
3334
|
process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269", "Warning", "fs-extra-WARN0001");
|
|
1183
3335
|
}
|
|
1184
|
-
const { srcStat, destStat } = await stat.checkPaths(
|
|
1185
|
-
await stat.checkParentPaths(
|
|
1186
|
-
const include = await runFilter(
|
|
3336
|
+
const { srcStat, destStat } = await stat.checkPaths(src2, dest, "copy", opts);
|
|
3337
|
+
await stat.checkParentPaths(src2, srcStat, dest, "copy");
|
|
3338
|
+
const include = await runFilter(src2, dest, opts);
|
|
1187
3339
|
if (!include)
|
|
1188
3340
|
return;
|
|
1189
3341
|
const destParent = path.dirname(dest);
|
|
@@ -1191,46 +3343,46 @@ var require_copy = __commonJS((exports, module) => {
|
|
|
1191
3343
|
if (!dirExists) {
|
|
1192
3344
|
await mkdirs(destParent);
|
|
1193
3345
|
}
|
|
1194
|
-
await getStatsAndPerformCopy(destStat,
|
|
3346
|
+
await getStatsAndPerformCopy(destStat, src2, dest, opts);
|
|
1195
3347
|
}
|
|
1196
|
-
async function runFilter(
|
|
3348
|
+
async function runFilter(src2, dest, opts) {
|
|
1197
3349
|
if (!opts.filter)
|
|
1198
3350
|
return true;
|
|
1199
|
-
return opts.filter(
|
|
3351
|
+
return opts.filter(src2, dest);
|
|
1200
3352
|
}
|
|
1201
|
-
async function getStatsAndPerformCopy(destStat,
|
|
3353
|
+
async function getStatsAndPerformCopy(destStat, src2, dest, opts) {
|
|
1202
3354
|
const statFn = opts.dereference ? fs.stat : fs.lstat;
|
|
1203
|
-
const srcStat = await statFn(
|
|
3355
|
+
const srcStat = await statFn(src2);
|
|
1204
3356
|
if (srcStat.isDirectory())
|
|
1205
|
-
return onDir(srcStat, destStat,
|
|
3357
|
+
return onDir(srcStat, destStat, src2, dest, opts);
|
|
1206
3358
|
if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice())
|
|
1207
|
-
return onFile(srcStat, destStat,
|
|
3359
|
+
return onFile(srcStat, destStat, src2, dest, opts);
|
|
1208
3360
|
if (srcStat.isSymbolicLink())
|
|
1209
|
-
return onLink(destStat,
|
|
3361
|
+
return onLink(destStat, src2, dest, opts);
|
|
1210
3362
|
if (srcStat.isSocket())
|
|
1211
|
-
throw new Error(`Cannot copy a socket file: ${
|
|
3363
|
+
throw new Error(`Cannot copy a socket file: ${src2}`);
|
|
1212
3364
|
if (srcStat.isFIFO())
|
|
1213
|
-
throw new Error(`Cannot copy a FIFO pipe: ${
|
|
1214
|
-
throw new Error(`Unknown file: ${
|
|
3365
|
+
throw new Error(`Cannot copy a FIFO pipe: ${src2}`);
|
|
3366
|
+
throw new Error(`Unknown file: ${src2}`);
|
|
1215
3367
|
}
|
|
1216
|
-
async function onFile(srcStat, destStat,
|
|
3368
|
+
async function onFile(srcStat, destStat, src2, dest, opts) {
|
|
1217
3369
|
if (!destStat)
|
|
1218
|
-
return copyFile(srcStat,
|
|
3370
|
+
return copyFile(srcStat, src2, dest, opts);
|
|
1219
3371
|
if (opts.overwrite) {
|
|
1220
3372
|
await fs.unlink(dest);
|
|
1221
|
-
return copyFile(srcStat,
|
|
3373
|
+
return copyFile(srcStat, src2, dest, opts);
|
|
1222
3374
|
}
|
|
1223
3375
|
if (opts.errorOnExist) {
|
|
1224
3376
|
throw new Error(`'${dest}' already exists`);
|
|
1225
3377
|
}
|
|
1226
3378
|
}
|
|
1227
|
-
async function copyFile(srcStat,
|
|
1228
|
-
await fs.copyFile(
|
|
3379
|
+
async function copyFile(srcStat, src2, dest, opts) {
|
|
3380
|
+
await fs.copyFile(src2, dest);
|
|
1229
3381
|
if (opts.preserveTimestamps) {
|
|
1230
3382
|
if (fileIsNotWritable(srcStat.mode)) {
|
|
1231
3383
|
await makeFileWritable(dest, srcStat.mode);
|
|
1232
3384
|
}
|
|
1233
|
-
const updatedSrcStat = await fs.stat(
|
|
3385
|
+
const updatedSrcStat = await fs.stat(src2);
|
|
1234
3386
|
await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
|
|
1235
3387
|
}
|
|
1236
3388
|
return fs.chmod(dest, srcStat.mode);
|
|
@@ -1241,13 +3393,13 @@ var require_copy = __commonJS((exports, module) => {
|
|
|
1241
3393
|
var makeFileWritable = function(dest, srcMode) {
|
|
1242
3394
|
return fs.chmod(dest, srcMode | 128);
|
|
1243
3395
|
};
|
|
1244
|
-
async function onDir(srcStat, destStat,
|
|
3396
|
+
async function onDir(srcStat, destStat, src2, dest, opts) {
|
|
1245
3397
|
if (!destStat) {
|
|
1246
3398
|
await fs.mkdir(dest);
|
|
1247
3399
|
}
|
|
1248
|
-
const items = await fs.readdir(
|
|
3400
|
+
const items = await fs.readdir(src2);
|
|
1249
3401
|
await Promise.all(items.map(async (item) => {
|
|
1250
|
-
const srcItem = path.join(
|
|
3402
|
+
const srcItem = path.join(src2, item);
|
|
1251
3403
|
const destItem = path.join(dest, item);
|
|
1252
3404
|
const include = await runFilter(srcItem, destItem, opts);
|
|
1253
3405
|
if (!include)
|
|
@@ -1259,8 +3411,8 @@ var require_copy = __commonJS((exports, module) => {
|
|
|
1259
3411
|
await fs.chmod(dest, srcStat.mode);
|
|
1260
3412
|
}
|
|
1261
3413
|
}
|
|
1262
|
-
async function onLink(destStat,
|
|
1263
|
-
let resolvedSrc = await fs.readlink(
|
|
3414
|
+
async function onLink(destStat, src2, dest, opts) {
|
|
3415
|
+
let resolvedSrc = await fs.readlink(src2);
|
|
1264
3416
|
if (opts.dereference) {
|
|
1265
3417
|
resolvedSrc = path.resolve(process.cwd(), resolvedSrc);
|
|
1266
3418
|
}
|
|
@@ -1298,7 +3450,7 @@ var require_copy = __commonJS((exports, module) => {
|
|
|
1298
3450
|
|
|
1299
3451
|
// ../../../../node_modules/fs-extra/lib/copy/copy-sync.js
|
|
1300
3452
|
var require_copy_sync = __commonJS((exports, module) => {
|
|
1301
|
-
var copySync = function(
|
|
3453
|
+
var copySync = function(src2, dest, opts) {
|
|
1302
3454
|
if (typeof opts === "function") {
|
|
1303
3455
|
opts = { filter: opts };
|
|
1304
3456
|
}
|
|
@@ -1308,53 +3460,53 @@ var require_copy_sync = __commonJS((exports, module) => {
|
|
|
1308
3460
|
if (opts.preserveTimestamps && process.arch === "ia32") {
|
|
1309
3461
|
process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269", "Warning", "fs-extra-WARN0002");
|
|
1310
3462
|
}
|
|
1311
|
-
const { srcStat, destStat } = stat.checkPathsSync(
|
|
1312
|
-
stat.checkParentPathsSync(
|
|
1313
|
-
if (opts.filter && !opts.filter(
|
|
3463
|
+
const { srcStat, destStat } = stat.checkPathsSync(src2, dest, "copy", opts);
|
|
3464
|
+
stat.checkParentPathsSync(src2, srcStat, dest, "copy");
|
|
3465
|
+
if (opts.filter && !opts.filter(src2, dest))
|
|
1314
3466
|
return;
|
|
1315
3467
|
const destParent = path.dirname(dest);
|
|
1316
3468
|
if (!fs.existsSync(destParent))
|
|
1317
3469
|
mkdirsSync(destParent);
|
|
1318
|
-
return getStats(destStat,
|
|
3470
|
+
return getStats(destStat, src2, dest, opts);
|
|
1319
3471
|
};
|
|
1320
|
-
var getStats = function(destStat,
|
|
3472
|
+
var getStats = function(destStat, src2, dest, opts) {
|
|
1321
3473
|
const statSync = opts.dereference ? fs.statSync : fs.lstatSync;
|
|
1322
|
-
const srcStat = statSync(
|
|
3474
|
+
const srcStat = statSync(src2);
|
|
1323
3475
|
if (srcStat.isDirectory())
|
|
1324
|
-
return onDir(srcStat, destStat,
|
|
3476
|
+
return onDir(srcStat, destStat, src2, dest, opts);
|
|
1325
3477
|
else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice())
|
|
1326
|
-
return onFile(srcStat, destStat,
|
|
3478
|
+
return onFile(srcStat, destStat, src2, dest, opts);
|
|
1327
3479
|
else if (srcStat.isSymbolicLink())
|
|
1328
|
-
return onLink(destStat,
|
|
3480
|
+
return onLink(destStat, src2, dest, opts);
|
|
1329
3481
|
else if (srcStat.isSocket())
|
|
1330
|
-
throw new Error(`Cannot copy a socket file: ${
|
|
3482
|
+
throw new Error(`Cannot copy a socket file: ${src2}`);
|
|
1331
3483
|
else if (srcStat.isFIFO())
|
|
1332
|
-
throw new Error(`Cannot copy a FIFO pipe: ${
|
|
1333
|
-
throw new Error(`Unknown file: ${
|
|
3484
|
+
throw new Error(`Cannot copy a FIFO pipe: ${src2}`);
|
|
3485
|
+
throw new Error(`Unknown file: ${src2}`);
|
|
1334
3486
|
};
|
|
1335
|
-
var onFile = function(srcStat, destStat,
|
|
3487
|
+
var onFile = function(srcStat, destStat, src2, dest, opts) {
|
|
1336
3488
|
if (!destStat)
|
|
1337
|
-
return copyFile(srcStat,
|
|
1338
|
-
return mayCopyFile(srcStat,
|
|
3489
|
+
return copyFile(srcStat, src2, dest, opts);
|
|
3490
|
+
return mayCopyFile(srcStat, src2, dest, opts);
|
|
1339
3491
|
};
|
|
1340
|
-
var mayCopyFile = function(srcStat,
|
|
3492
|
+
var mayCopyFile = function(srcStat, src2, dest, opts) {
|
|
1341
3493
|
if (opts.overwrite) {
|
|
1342
3494
|
fs.unlinkSync(dest);
|
|
1343
|
-
return copyFile(srcStat,
|
|
3495
|
+
return copyFile(srcStat, src2, dest, opts);
|
|
1344
3496
|
} else if (opts.errorOnExist) {
|
|
1345
3497
|
throw new Error(`'${dest}' already exists`);
|
|
1346
3498
|
}
|
|
1347
3499
|
};
|
|
1348
|
-
var copyFile = function(srcStat,
|
|
1349
|
-
fs.copyFileSync(
|
|
3500
|
+
var copyFile = function(srcStat, src2, dest, opts) {
|
|
3501
|
+
fs.copyFileSync(src2, dest);
|
|
1350
3502
|
if (opts.preserveTimestamps)
|
|
1351
|
-
handleTimestamps(srcStat.mode,
|
|
3503
|
+
handleTimestamps(srcStat.mode, src2, dest);
|
|
1352
3504
|
return setDestMode(dest, srcStat.mode);
|
|
1353
3505
|
};
|
|
1354
|
-
var handleTimestamps = function(srcMode,
|
|
3506
|
+
var handleTimestamps = function(srcMode, src2, dest) {
|
|
1355
3507
|
if (fileIsNotWritable(srcMode))
|
|
1356
3508
|
makeFileWritable(dest, srcMode);
|
|
1357
|
-
return setDestTimestamps(
|
|
3509
|
+
return setDestTimestamps(src2, dest);
|
|
1358
3510
|
};
|
|
1359
3511
|
var fileIsNotWritable = function(srcMode) {
|
|
1360
3512
|
return (srcMode & 128) === 0;
|
|
@@ -1365,33 +3517,33 @@ var require_copy_sync = __commonJS((exports, module) => {
|
|
|
1365
3517
|
var setDestMode = function(dest, srcMode) {
|
|
1366
3518
|
return fs.chmodSync(dest, srcMode);
|
|
1367
3519
|
};
|
|
1368
|
-
var setDestTimestamps = function(
|
|
1369
|
-
const updatedSrcStat = fs.statSync(
|
|
3520
|
+
var setDestTimestamps = function(src2, dest) {
|
|
3521
|
+
const updatedSrcStat = fs.statSync(src2);
|
|
1370
3522
|
return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
|
|
1371
3523
|
};
|
|
1372
|
-
var onDir = function(srcStat, destStat,
|
|
3524
|
+
var onDir = function(srcStat, destStat, src2, dest, opts) {
|
|
1373
3525
|
if (!destStat)
|
|
1374
|
-
return mkDirAndCopy(srcStat.mode,
|
|
1375
|
-
return copyDir(
|
|
3526
|
+
return mkDirAndCopy(srcStat.mode, src2, dest, opts);
|
|
3527
|
+
return copyDir(src2, dest, opts);
|
|
1376
3528
|
};
|
|
1377
|
-
var mkDirAndCopy = function(srcMode,
|
|
3529
|
+
var mkDirAndCopy = function(srcMode, src2, dest, opts) {
|
|
1378
3530
|
fs.mkdirSync(dest);
|
|
1379
|
-
copyDir(
|
|
3531
|
+
copyDir(src2, dest, opts);
|
|
1380
3532
|
return setDestMode(dest, srcMode);
|
|
1381
3533
|
};
|
|
1382
|
-
var copyDir = function(
|
|
1383
|
-
fs.readdirSync(
|
|
3534
|
+
var copyDir = function(src2, dest, opts) {
|
|
3535
|
+
fs.readdirSync(src2).forEach((item) => copyDirItem(item, src2, dest, opts));
|
|
1384
3536
|
};
|
|
1385
|
-
var copyDirItem = function(item,
|
|
1386
|
-
const srcItem = path.join(
|
|
3537
|
+
var copyDirItem = function(item, src2, dest, opts) {
|
|
3538
|
+
const srcItem = path.join(src2, item);
|
|
1387
3539
|
const destItem = path.join(dest, item);
|
|
1388
3540
|
if (opts.filter && !opts.filter(srcItem, destItem))
|
|
1389
3541
|
return;
|
|
1390
3542
|
const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts);
|
|
1391
3543
|
return getStats(destStat, srcItem, destItem, opts);
|
|
1392
3544
|
};
|
|
1393
|
-
var onLink = function(destStat,
|
|
1394
|
-
let resolvedSrc = fs.readlinkSync(
|
|
3545
|
+
var onLink = function(destStat, src2, dest, opts) {
|
|
3546
|
+
let resolvedSrc = fs.readlinkSync(src2);
|
|
1395
3547
|
if (opts.dereference) {
|
|
1396
3548
|
resolvedSrc = path.resolve(process.cwd(), resolvedSrc);
|
|
1397
3549
|
}
|
|
@@ -1864,7 +4016,7 @@ var require_jsonfile = __commonJS((exports, module) => {
|
|
|
1864
4016
|
var _fs;
|
|
1865
4017
|
try {
|
|
1866
4018
|
_fs = require_graceful_fs();
|
|
1867
|
-
} catch (
|
|
4019
|
+
} catch (_2) {
|
|
1868
4020
|
_fs = __require("fs");
|
|
1869
4021
|
}
|
|
1870
4022
|
var universalify = require_universalify();
|
|
@@ -1957,18 +4109,18 @@ var require_json = __commonJS((exports, module) => {
|
|
|
1957
4109
|
|
|
1958
4110
|
// ../../../../node_modules/fs-extra/lib/move/move.js
|
|
1959
4111
|
var require_move = __commonJS((exports, module) => {
|
|
1960
|
-
async function move(
|
|
4112
|
+
async function move(src2, dest, opts = {}) {
|
|
1961
4113
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
1962
|
-
const { srcStat, isChangingCase = false } = await stat.checkPaths(
|
|
1963
|
-
await stat.checkParentPaths(
|
|
4114
|
+
const { srcStat, isChangingCase = false } = await stat.checkPaths(src2, dest, "move", opts);
|
|
4115
|
+
await stat.checkParentPaths(src2, srcStat, dest, "move");
|
|
1964
4116
|
const destParent = path.dirname(dest);
|
|
1965
4117
|
const parsedParentPath = path.parse(destParent);
|
|
1966
4118
|
if (parsedParentPath.root !== destParent) {
|
|
1967
4119
|
await mkdirp(destParent);
|
|
1968
4120
|
}
|
|
1969
|
-
return doRename(
|
|
4121
|
+
return doRename(src2, dest, overwrite, isChangingCase);
|
|
1970
4122
|
}
|
|
1971
|
-
async function doRename(
|
|
4123
|
+
async function doRename(src2, dest, overwrite, isChangingCase) {
|
|
1972
4124
|
if (!isChangingCase) {
|
|
1973
4125
|
if (overwrite) {
|
|
1974
4126
|
await remove(dest);
|
|
@@ -1977,22 +4129,22 @@ var require_move = __commonJS((exports, module) => {
|
|
|
1977
4129
|
}
|
|
1978
4130
|
}
|
|
1979
4131
|
try {
|
|
1980
|
-
await fs.rename(
|
|
4132
|
+
await fs.rename(src2, dest);
|
|
1981
4133
|
} catch (err) {
|
|
1982
4134
|
if (err.code !== "EXDEV") {
|
|
1983
4135
|
throw err;
|
|
1984
4136
|
}
|
|
1985
|
-
await moveAcrossDevice(
|
|
4137
|
+
await moveAcrossDevice(src2, dest, overwrite);
|
|
1986
4138
|
}
|
|
1987
4139
|
}
|
|
1988
|
-
async function moveAcrossDevice(
|
|
4140
|
+
async function moveAcrossDevice(src2, dest, overwrite) {
|
|
1989
4141
|
const opts = {
|
|
1990
4142
|
overwrite,
|
|
1991
4143
|
errorOnExist: true,
|
|
1992
4144
|
preserveTimestamps: true
|
|
1993
4145
|
};
|
|
1994
|
-
await copy(
|
|
1995
|
-
return remove(
|
|
4146
|
+
await copy(src2, dest, opts);
|
|
4147
|
+
return remove(src2);
|
|
1996
4148
|
}
|
|
1997
4149
|
var fs = require_fs();
|
|
1998
4150
|
var path = __require("path");
|
|
@@ -2006,48 +4158,48 @@ var require_move = __commonJS((exports, module) => {
|
|
|
2006
4158
|
|
|
2007
4159
|
// ../../../../node_modules/fs-extra/lib/move/move-sync.js
|
|
2008
4160
|
var require_move_sync = __commonJS((exports, module) => {
|
|
2009
|
-
var moveSync = function(
|
|
4161
|
+
var moveSync = function(src2, dest, opts) {
|
|
2010
4162
|
opts = opts || {};
|
|
2011
4163
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
2012
|
-
const { srcStat, isChangingCase = false } = stat.checkPathsSync(
|
|
2013
|
-
stat.checkParentPathsSync(
|
|
4164
|
+
const { srcStat, isChangingCase = false } = stat.checkPathsSync(src2, dest, "move", opts);
|
|
4165
|
+
stat.checkParentPathsSync(src2, srcStat, dest, "move");
|
|
2014
4166
|
if (!isParentRoot(dest))
|
|
2015
4167
|
mkdirpSync(path.dirname(dest));
|
|
2016
|
-
return doRename(
|
|
4168
|
+
return doRename(src2, dest, overwrite, isChangingCase);
|
|
2017
4169
|
};
|
|
2018
4170
|
var isParentRoot = function(dest) {
|
|
2019
4171
|
const parent = path.dirname(dest);
|
|
2020
4172
|
const parsedPath = path.parse(parent);
|
|
2021
4173
|
return parsedPath.root === parent;
|
|
2022
4174
|
};
|
|
2023
|
-
var doRename = function(
|
|
4175
|
+
var doRename = function(src2, dest, overwrite, isChangingCase) {
|
|
2024
4176
|
if (isChangingCase)
|
|
2025
|
-
return rename(
|
|
4177
|
+
return rename(src2, dest, overwrite);
|
|
2026
4178
|
if (overwrite) {
|
|
2027
4179
|
removeSync(dest);
|
|
2028
|
-
return rename(
|
|
4180
|
+
return rename(src2, dest, overwrite);
|
|
2029
4181
|
}
|
|
2030
4182
|
if (fs.existsSync(dest))
|
|
2031
4183
|
throw new Error("dest already exists.");
|
|
2032
|
-
return rename(
|
|
4184
|
+
return rename(src2, dest, overwrite);
|
|
2033
4185
|
};
|
|
2034
|
-
var rename = function(
|
|
4186
|
+
var rename = function(src2, dest, overwrite) {
|
|
2035
4187
|
try {
|
|
2036
|
-
fs.renameSync(
|
|
4188
|
+
fs.renameSync(src2, dest);
|
|
2037
4189
|
} catch (err) {
|
|
2038
4190
|
if (err.code !== "EXDEV")
|
|
2039
4191
|
throw err;
|
|
2040
|
-
return moveAcrossDevice(
|
|
4192
|
+
return moveAcrossDevice(src2, dest, overwrite);
|
|
2041
4193
|
}
|
|
2042
4194
|
};
|
|
2043
|
-
var moveAcrossDevice = function(
|
|
4195
|
+
var moveAcrossDevice = function(src2, dest, overwrite) {
|
|
2044
4196
|
const opts = {
|
|
2045
4197
|
overwrite,
|
|
2046
4198
|
errorOnExist: true,
|
|
2047
4199
|
preserveTimestamps: true
|
|
2048
4200
|
};
|
|
2049
|
-
copySync(
|
|
2050
|
-
return removeSync(
|
|
4201
|
+
copySync(src2, dest, opts);
|
|
4202
|
+
return removeSync(src2);
|
|
2051
4203
|
};
|
|
2052
4204
|
var fs = require_graceful_fs();
|
|
2053
4205
|
var path = __require("path");
|
|
@@ -2085,13 +4237,13 @@ var require_lib = __commonJS((exports, module) => {
|
|
|
2085
4237
|
|
|
2086
4238
|
// ../../../../node_modules/neverthrow/dist/index.cjs.js
|
|
2087
4239
|
var require_index_cjs = __commonJS((exports) => {
|
|
2088
|
-
var __awaiter = function(thisArg, _arguments,
|
|
4240
|
+
var __awaiter = function(thisArg, _arguments, P2, generator) {
|
|
2089
4241
|
function adopt(value) {
|
|
2090
|
-
return value instanceof
|
|
4242
|
+
return value instanceof P2 ? value : new P2(function(resolve) {
|
|
2091
4243
|
resolve(value);
|
|
2092
4244
|
});
|
|
2093
4245
|
}
|
|
2094
|
-
return new (
|
|
4246
|
+
return new (P2 || (P2 = Promise))(function(resolve, reject) {
|
|
2095
4247
|
function fulfilled(value) {
|
|
2096
4248
|
try {
|
|
2097
4249
|
step(generator.next(value));
|
|
@@ -2113,9 +4265,9 @@ var require_index_cjs = __commonJS((exports) => {
|
|
|
2113
4265
|
});
|
|
2114
4266
|
};
|
|
2115
4267
|
var __values = function(o) {
|
|
2116
|
-
var
|
|
2117
|
-
if (
|
|
2118
|
-
return
|
|
4268
|
+
var s3 = typeof Symbol === "function" && Symbol.iterator, m2 = s3 && o[s3], i = 0;
|
|
4269
|
+
if (m2)
|
|
4270
|
+
return m2.call(o);
|
|
2119
4271
|
if (o && typeof o.length === "number")
|
|
2120
4272
|
return {
|
|
2121
4273
|
next: function() {
|
|
@@ -2124,35 +4276,35 @@ var require_index_cjs = __commonJS((exports) => {
|
|
|
2124
4276
|
return { value: o && o[i++], done: !o };
|
|
2125
4277
|
}
|
|
2126
4278
|
};
|
|
2127
|
-
throw new TypeError(
|
|
4279
|
+
throw new TypeError(s3 ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
2128
4280
|
};
|
|
2129
|
-
var __await = function(
|
|
2130
|
-
return this instanceof __await ? (this.v =
|
|
4281
|
+
var __await = function(v2) {
|
|
4282
|
+
return this instanceof __await ? (this.v = v2, this) : new __await(v2);
|
|
2131
4283
|
};
|
|
2132
4284
|
var __asyncGenerator = function(thisArg, _arguments, generator) {
|
|
2133
4285
|
if (!Symbol.asyncIterator)
|
|
2134
4286
|
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
2135
|
-
var
|
|
4287
|
+
var g2 = generator.apply(thisArg, _arguments || []), i, q2 = [];
|
|
2136
4288
|
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
|
|
2137
4289
|
return this;
|
|
2138
4290
|
}, i;
|
|
2139
4291
|
function verb(n) {
|
|
2140
|
-
if (
|
|
2141
|
-
i[n] = function(
|
|
2142
|
-
return new Promise(function(a,
|
|
2143
|
-
|
|
4292
|
+
if (g2[n])
|
|
4293
|
+
i[n] = function(v2) {
|
|
4294
|
+
return new Promise(function(a, b2) {
|
|
4295
|
+
q2.push([n, v2, a, b2]) > 1 || resume(n, v2);
|
|
2144
4296
|
});
|
|
2145
4297
|
};
|
|
2146
4298
|
}
|
|
2147
|
-
function resume(n,
|
|
4299
|
+
function resume(n, v2) {
|
|
2148
4300
|
try {
|
|
2149
|
-
step(
|
|
4301
|
+
step(g2[n](v2));
|
|
2150
4302
|
} catch (e) {
|
|
2151
|
-
settle(
|
|
4303
|
+
settle(q2[0][3], e);
|
|
2152
4304
|
}
|
|
2153
4305
|
}
|
|
2154
|
-
function step(
|
|
2155
|
-
|
|
4306
|
+
function step(r2) {
|
|
4307
|
+
r2.value instanceof __await ? Promise.resolve(r2.value.v).then(fulfill, reject) : settle(q2[0][2], r2);
|
|
2156
4308
|
}
|
|
2157
4309
|
function fulfill(value) {
|
|
2158
4310
|
resume("next", value);
|
|
@@ -2160,48 +4312,48 @@ var require_index_cjs = __commonJS((exports) => {
|
|
|
2160
4312
|
function reject(value) {
|
|
2161
4313
|
resume("throw", value);
|
|
2162
4314
|
}
|
|
2163
|
-
function settle(
|
|
2164
|
-
if (
|
|
2165
|
-
resume(
|
|
4315
|
+
function settle(f2, v2) {
|
|
4316
|
+
if (f2(v2), q2.shift(), q2.length)
|
|
4317
|
+
resume(q2[0][0], q2[0][1]);
|
|
2166
4318
|
}
|
|
2167
4319
|
};
|
|
2168
4320
|
var __asyncDelegator = function(o) {
|
|
2169
|
-
var i,
|
|
4321
|
+
var i, p2;
|
|
2170
4322
|
return i = {}, verb("next"), verb("throw", function(e) {
|
|
2171
4323
|
throw e;
|
|
2172
4324
|
}), verb("return"), i[Symbol.iterator] = function() {
|
|
2173
4325
|
return this;
|
|
2174
4326
|
}, i;
|
|
2175
|
-
function verb(n,
|
|
2176
|
-
i[n] = o[n] ? function(
|
|
2177
|
-
return (
|
|
2178
|
-
} :
|
|
4327
|
+
function verb(n, f2) {
|
|
4328
|
+
i[n] = o[n] ? function(v2) {
|
|
4329
|
+
return (p2 = !p2) ? { value: __await(o[n](v2)), done: n === "return" } : f2 ? f2(v2) : v2;
|
|
4330
|
+
} : f2;
|
|
2179
4331
|
}
|
|
2180
4332
|
};
|
|
2181
4333
|
var __asyncValues = function(o) {
|
|
2182
4334
|
if (!Symbol.asyncIterator)
|
|
2183
4335
|
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
2184
|
-
var
|
|
2185
|
-
return
|
|
4336
|
+
var m2 = o[Symbol.asyncIterator], i;
|
|
4337
|
+
return m2 ? m2.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
|
|
2186
4338
|
return this;
|
|
2187
4339
|
}, i);
|
|
2188
4340
|
function verb(n) {
|
|
2189
|
-
i[n] = o[n] && function(
|
|
4341
|
+
i[n] = o[n] && function(v2) {
|
|
2190
4342
|
return new Promise(function(resolve, reject) {
|
|
2191
|
-
|
|
4343
|
+
v2 = o[n](v2), settle(resolve, reject, v2.done, v2.value);
|
|
2192
4344
|
});
|
|
2193
4345
|
};
|
|
2194
4346
|
}
|
|
2195
|
-
function settle(resolve, reject, d,
|
|
2196
|
-
Promise.resolve(
|
|
2197
|
-
resolve({ value:
|
|
4347
|
+
function settle(resolve, reject, d, v2) {
|
|
4348
|
+
Promise.resolve(v2).then(function(v3) {
|
|
4349
|
+
resolve({ value: v3, done: d });
|
|
2198
4350
|
}, reject);
|
|
2199
4351
|
}
|
|
2200
4352
|
};
|
|
2201
4353
|
var safeTry = function(body) {
|
|
2202
4354
|
const n = body().next();
|
|
2203
4355
|
if (n instanceof Promise) {
|
|
2204
|
-
return n.then((
|
|
4356
|
+
return n.then((r2) => r2.value);
|
|
2205
4357
|
}
|
|
2206
4358
|
return n.value;
|
|
2207
4359
|
};
|
|
@@ -2223,49 +4375,60 @@ var require_index_cjs = __commonJS((exports) => {
|
|
|
2223
4375
|
constructor(res) {
|
|
2224
4376
|
this._promise = res;
|
|
2225
4377
|
}
|
|
2226
|
-
static fromSafePromise(
|
|
2227
|
-
const newPromise =
|
|
4378
|
+
static fromSafePromise(promise2) {
|
|
4379
|
+
const newPromise = promise2.then((value) => new Ok(value));
|
|
2228
4380
|
return new ResultAsync(newPromise);
|
|
2229
4381
|
}
|
|
2230
|
-
static fromPromise(
|
|
2231
|
-
const newPromise =
|
|
4382
|
+
static fromPromise(promise2, errorFn) {
|
|
4383
|
+
const newPromise = promise2.then((value) => new Ok(value)).catch((e) => new Err(errorFn(e)));
|
|
2232
4384
|
return new ResultAsync(newPromise);
|
|
2233
4385
|
}
|
|
4386
|
+
static fromThrowable(fn, errorFn) {
|
|
4387
|
+
return (...args) => {
|
|
4388
|
+
return new ResultAsync((() => __awaiter(this, undefined, undefined, function* () {
|
|
4389
|
+
try {
|
|
4390
|
+
return new Ok(yield fn(...args));
|
|
4391
|
+
} catch (error) {
|
|
4392
|
+
return new Err(errorFn ? errorFn(error) : error);
|
|
4393
|
+
}
|
|
4394
|
+
}))());
|
|
4395
|
+
};
|
|
4396
|
+
}
|
|
2234
4397
|
static combine(asyncResultList) {
|
|
2235
4398
|
return combineResultAsyncList(asyncResultList);
|
|
2236
4399
|
}
|
|
2237
4400
|
static combineWithAllErrors(asyncResultList) {
|
|
2238
4401
|
return combineResultAsyncListWithAllErrors(asyncResultList);
|
|
2239
4402
|
}
|
|
2240
|
-
map(
|
|
4403
|
+
map(f2) {
|
|
2241
4404
|
return new ResultAsync(this._promise.then((res) => __awaiter(this, undefined, undefined, function* () {
|
|
2242
4405
|
if (res.isErr()) {
|
|
2243
4406
|
return new Err(res.error);
|
|
2244
4407
|
}
|
|
2245
|
-
return new Ok(yield
|
|
4408
|
+
return new Ok(yield f2(res.value));
|
|
2246
4409
|
})));
|
|
2247
4410
|
}
|
|
2248
|
-
mapErr(
|
|
4411
|
+
mapErr(f2) {
|
|
2249
4412
|
return new ResultAsync(this._promise.then((res) => __awaiter(this, undefined, undefined, function* () {
|
|
2250
4413
|
if (res.isOk()) {
|
|
2251
4414
|
return new Ok(res.value);
|
|
2252
4415
|
}
|
|
2253
|
-
return new Err(yield
|
|
4416
|
+
return new Err(yield f2(res.error));
|
|
2254
4417
|
})));
|
|
2255
4418
|
}
|
|
2256
|
-
andThen(
|
|
4419
|
+
andThen(f2) {
|
|
2257
4420
|
return new ResultAsync(this._promise.then((res) => {
|
|
2258
4421
|
if (res.isErr()) {
|
|
2259
4422
|
return new Err(res.error);
|
|
2260
4423
|
}
|
|
2261
|
-
const newValue =
|
|
4424
|
+
const newValue = f2(res.value);
|
|
2262
4425
|
return newValue instanceof ResultAsync ? newValue._promise : newValue;
|
|
2263
4426
|
}));
|
|
2264
4427
|
}
|
|
2265
|
-
orElse(
|
|
4428
|
+
orElse(f2) {
|
|
2266
4429
|
return new ResultAsync(this._promise.then((res) => __awaiter(this, undefined, undefined, function* () {
|
|
2267
4430
|
if (res.isErr()) {
|
|
2268
|
-
return
|
|
4431
|
+
return f2(res.error);
|
|
2269
4432
|
}
|
|
2270
4433
|
return new Ok(res.value);
|
|
2271
4434
|
})));
|
|
@@ -2289,6 +4452,7 @@ var require_index_cjs = __commonJS((exports) => {
|
|
|
2289
4452
|
var errAsync = (err2) => new ResultAsync(Promise.resolve(new Err(err2)));
|
|
2290
4453
|
var fromPromise = ResultAsync.fromPromise;
|
|
2291
4454
|
var fromSafePromise = ResultAsync.fromSafePromise;
|
|
4455
|
+
var fromAsyncThrowable = ResultAsync.fromThrowable;
|
|
2292
4456
|
var appendValueToEndOfList = (value) => (list) => [...list, value];
|
|
2293
4457
|
var combineResultList = (resultList) => resultList.reduce((acc, result) => acc.isOk() ? result.isErr() ? err(result.error) : acc.map(appendValueToEndOfList(result.value)) : acc, ok([]));
|
|
2294
4458
|
var combineResultAsyncList = (asyncResultList) => ResultAsync.fromSafePromise(Promise.all(asyncResultList)).andThen(combineResultList);
|
|
@@ -2329,23 +4493,23 @@ var require_index_cjs = __commonJS((exports) => {
|
|
|
2329
4493
|
isErr() {
|
|
2330
4494
|
return !this.isOk();
|
|
2331
4495
|
}
|
|
2332
|
-
map(
|
|
2333
|
-
return ok(
|
|
4496
|
+
map(f2) {
|
|
4497
|
+
return ok(f2(this.value));
|
|
2334
4498
|
}
|
|
2335
4499
|
mapErr(_f) {
|
|
2336
4500
|
return ok(this.value);
|
|
2337
4501
|
}
|
|
2338
|
-
andThen(
|
|
2339
|
-
return
|
|
4502
|
+
andThen(f2) {
|
|
4503
|
+
return f2(this.value);
|
|
2340
4504
|
}
|
|
2341
4505
|
orElse(_f) {
|
|
2342
4506
|
return ok(this.value);
|
|
2343
4507
|
}
|
|
2344
|
-
asyncAndThen(
|
|
2345
|
-
return
|
|
4508
|
+
asyncAndThen(f2) {
|
|
4509
|
+
return f2(this.value);
|
|
2346
4510
|
}
|
|
2347
|
-
asyncMap(
|
|
2348
|
-
return ResultAsync.fromSafePromise(
|
|
4511
|
+
asyncMap(f2) {
|
|
4512
|
+
return ResultAsync.fromSafePromise(f2(this.value));
|
|
2349
4513
|
}
|
|
2350
4514
|
unwrapOr(_v) {
|
|
2351
4515
|
return this.value;
|
|
@@ -2359,7 +4523,7 @@ var require_index_cjs = __commonJS((exports) => {
|
|
|
2359
4523
|
return value;
|
|
2360
4524
|
}();
|
|
2361
4525
|
}
|
|
2362
|
-
_unsafeUnwrap(
|
|
4526
|
+
_unsafeUnwrap(_2) {
|
|
2363
4527
|
return this.value;
|
|
2364
4528
|
}
|
|
2365
4529
|
_unsafeUnwrapErr(config) {
|
|
@@ -2380,14 +4544,14 @@ var require_index_cjs = __commonJS((exports) => {
|
|
|
2380
4544
|
map(_f) {
|
|
2381
4545
|
return err(this.error);
|
|
2382
4546
|
}
|
|
2383
|
-
mapErr(
|
|
2384
|
-
return err(
|
|
4547
|
+
mapErr(f2) {
|
|
4548
|
+
return err(f2(this.error));
|
|
2385
4549
|
}
|
|
2386
4550
|
andThen(_f) {
|
|
2387
4551
|
return err(this.error);
|
|
2388
4552
|
}
|
|
2389
|
-
orElse(
|
|
2390
|
-
return
|
|
4553
|
+
orElse(f2) {
|
|
4554
|
+
return f2(this.error);
|
|
2391
4555
|
}
|
|
2392
4556
|
asyncAndThen(_f) {
|
|
2393
4557
|
return errAsync(this.error);
|
|
@@ -2395,8 +4559,8 @@ var require_index_cjs = __commonJS((exports) => {
|
|
|
2395
4559
|
asyncMap(_f) {
|
|
2396
4560
|
return errAsync(this.error);
|
|
2397
4561
|
}
|
|
2398
|
-
unwrapOr(
|
|
2399
|
-
return
|
|
4562
|
+
unwrapOr(v2) {
|
|
4563
|
+
return v2;
|
|
2400
4564
|
}
|
|
2401
4565
|
match(_ok, err2) {
|
|
2402
4566
|
return err2(this.error);
|
|
@@ -2411,7 +4575,7 @@ var require_index_cjs = __commonJS((exports) => {
|
|
|
2411
4575
|
_unsafeUnwrap(config) {
|
|
2412
4576
|
throw createNeverThrowError("Called `_unsafeUnwrap` on an Err", this, config);
|
|
2413
4577
|
}
|
|
2414
|
-
_unsafeUnwrapErr(
|
|
4578
|
+
_unsafeUnwrapErr(_2) {
|
|
2415
4579
|
return this.error;
|
|
2416
4580
|
}
|
|
2417
4581
|
}
|
|
@@ -2421,6 +4585,7 @@ var require_index_cjs = __commonJS((exports) => {
|
|
|
2421
4585
|
exports.ResultAsync = ResultAsync;
|
|
2422
4586
|
exports.err = err;
|
|
2423
4587
|
exports.errAsync = errAsync;
|
|
4588
|
+
exports.fromAsyncThrowable = fromAsyncThrowable;
|
|
2424
4589
|
exports.fromPromise = fromPromise;
|
|
2425
4590
|
exports.fromSafePromise = fromSafePromise;
|
|
2426
4591
|
exports.fromThrowable = fromThrowable;
|
|
@@ -2429,19 +4594,114 @@ var require_index_cjs = __commonJS((exports) => {
|
|
|
2429
4594
|
exports.safeTry = safeTry;
|
|
2430
4595
|
});
|
|
2431
4596
|
|
|
4597
|
+
// src/handler.ts
|
|
4598
|
+
import * as path from "@stacksjs/path";
|
|
4599
|
+
// ../types/src/cron-jobs.ts
|
|
4600
|
+
var Every;
|
|
4601
|
+
(function(Every2) {
|
|
4602
|
+
Every2["Minute"] = "* * * * *";
|
|
4603
|
+
Every2["TwoMinutes"] = "*/2 * * * *";
|
|
4604
|
+
Every2["FiveMinutes"] = "*/5 * * * *";
|
|
4605
|
+
Every2["TenMinutes"] = "*/10 * * * *";
|
|
4606
|
+
Every2["FifteenMinutes"] = "*/15 * * * *";
|
|
4607
|
+
Every2["ThirtyMinutes"] = "*/30 * * * *";
|
|
4608
|
+
Every2["Hour"] = "0 * * * *";
|
|
4609
|
+
Every2["HalfHour"] = "0,30 * * * *";
|
|
4610
|
+
Every2["Day"] = "0 0 * * *";
|
|
4611
|
+
Every2["Week"] = "0 0 * * 0";
|
|
4612
|
+
Every2["Weekday"] = "0 0 * * 1-5";
|
|
4613
|
+
Every2["Weekend"] = "0 0 * * 0,6";
|
|
4614
|
+
Every2["Month"] = "0 0 1 * *";
|
|
4615
|
+
Every2["Year"] = "0 0 1 1 *";
|
|
4616
|
+
})(Every || (Every = {}));
|
|
4617
|
+
// ../types/src/docs.ts
|
|
4618
|
+
var SocialLinkIcon;
|
|
4619
|
+
(function(SocialLinkIcon2) {
|
|
4620
|
+
SocialLinkIcon2["Discord"] = "discord";
|
|
4621
|
+
SocialLinkIcon2["Facebook"] = "facebook";
|
|
4622
|
+
SocialLinkIcon2["GitHub"] = "github";
|
|
4623
|
+
SocialLinkIcon2["Instagram"] = "instagram";
|
|
4624
|
+
SocialLinkIcon2["LinkedIn"] = "linkedin";
|
|
4625
|
+
SocialLinkIcon2["Mastodon"] = "mastodon";
|
|
4626
|
+
SocialLinkIcon2["Slack"] = "slack";
|
|
4627
|
+
SocialLinkIcon2["Twitter"] = "twitter";
|
|
4628
|
+
SocialLinkIcon2["YouTube"] = "youtube";
|
|
4629
|
+
})(SocialLinkIcon || (SocialLinkIcon = {}));
|
|
4630
|
+
// ../types/src/exit-code.ts
|
|
4631
|
+
var ExitCode;
|
|
4632
|
+
(function(ExitCode2) {
|
|
4633
|
+
ExitCode2[ExitCode2["Success"] = 0] = "Success";
|
|
4634
|
+
ExitCode2[ExitCode2["FatalError"] = 1] = "FatalError";
|
|
4635
|
+
ExitCode2[ExitCode2["InvalidArgument"] = 9] = "InvalidArgument";
|
|
4636
|
+
})(ExitCode || (ExitCode = {}));
|
|
4637
|
+
// ../../../../node_modules/consola/dist/index.mjs
|
|
4638
|
+
init_consola_36c0034f();
|
|
4639
|
+
init_core();
|
|
4640
|
+
init_consola_06ad8a64();
|
|
4641
|
+
init_utils();
|
|
4642
|
+
// ../strings/src/utils.ts
|
|
4643
|
+
var import_slugify = __toESM(require_slugify(), 1);
|
|
4644
|
+
// ../../../../node_modules/title-case/dist/index.js
|
|
4645
|
+
var WORD_SEPARATORS = new Set(["\u2014", "\u2013", "-", "\u2015", "/"]);
|
|
4646
|
+
var SENTENCE_TERMINATORS = new Set([".", "!", "?"]);
|
|
4647
|
+
var TITLE_TERMINATORS = new Set([
|
|
4648
|
+
...SENTENCE_TERMINATORS,
|
|
4649
|
+
":",
|
|
4650
|
+
'"',
|
|
4651
|
+
"'",
|
|
4652
|
+
"\u201D"
|
|
4653
|
+
]);
|
|
4654
|
+
var SMALL_WORDS = new Set([
|
|
4655
|
+
"a",
|
|
4656
|
+
"an",
|
|
4657
|
+
"and",
|
|
4658
|
+
"as",
|
|
4659
|
+
"at",
|
|
4660
|
+
"because",
|
|
4661
|
+
"but",
|
|
4662
|
+
"by",
|
|
4663
|
+
"en",
|
|
4664
|
+
"for",
|
|
4665
|
+
"if",
|
|
4666
|
+
"in",
|
|
4667
|
+
"neither",
|
|
4668
|
+
"nor",
|
|
4669
|
+
"of",
|
|
4670
|
+
"on",
|
|
4671
|
+
"only",
|
|
4672
|
+
"or",
|
|
4673
|
+
"over",
|
|
4674
|
+
"per",
|
|
4675
|
+
"so",
|
|
4676
|
+
"some",
|
|
4677
|
+
"than",
|
|
4678
|
+
"that",
|
|
4679
|
+
"the",
|
|
4680
|
+
"to",
|
|
4681
|
+
"up",
|
|
4682
|
+
"upon",
|
|
4683
|
+
"v",
|
|
4684
|
+
"versus",
|
|
4685
|
+
"via",
|
|
4686
|
+
"vs",
|
|
4687
|
+
"when",
|
|
4688
|
+
"with",
|
|
4689
|
+
"without",
|
|
4690
|
+
"yet"
|
|
4691
|
+
]);
|
|
4692
|
+
// ../strings/src/pluralize.ts
|
|
4693
|
+
var pluralize = __toESM(require_pluralize(), 1);
|
|
2432
4694
|
// src/handler.ts
|
|
2433
4695
|
var import_fs_extra = __toESM(require_lib(), 1);
|
|
2434
|
-
import {dirname, logsPath} from "@stacksjs/path";
|
|
2435
4696
|
function handleError(err, options) {
|
|
2436
4697
|
return ErrorHandler.handle(err, options);
|
|
2437
4698
|
}
|
|
2438
4699
|
var StacksError = Error;
|
|
2439
4700
|
|
|
2440
4701
|
class ErrorHandler {
|
|
2441
|
-
static logFile = logsPath("errors.log");
|
|
2442
4702
|
static handle(err, options) {
|
|
2443
|
-
if (
|
|
2444
|
-
this.writeErrorToConsole(err
|
|
4703
|
+
if (options?.silent !== false)
|
|
4704
|
+
this.writeErrorToConsole(err);
|
|
2445
4705
|
if (typeof err === "string")
|
|
2446
4706
|
err = new StacksError(err);
|
|
2447
4707
|
this.writeErrorToFile(err).catch((e) => console.error(e));
|
|
@@ -2452,20 +4712,24 @@ class ErrorHandler {
|
|
|
2452
4712
|
return err;
|
|
2453
4713
|
}
|
|
2454
4714
|
static async writeErrorToFile(err) {
|
|
4715
|
+
if (!(err instanceof Error)) {
|
|
4716
|
+
console.error("Error is not an instance of Error:", err);
|
|
4717
|
+
return;
|
|
4718
|
+
}
|
|
2455
4719
|
const formattedError = `[${new Date().toISOString()}] ${err.name}: ${err.message}\n`;
|
|
2456
|
-
const errorsLogFilePath = logsPath("errors.log");
|
|
4720
|
+
const errorsLogFilePath = path.logsPath("errors.log");
|
|
2457
4721
|
try {
|
|
2458
|
-
await import_fs_extra.default.mkdir(dirname(errorsLogFilePath), { recursive: true });
|
|
4722
|
+
await import_fs_extra.default.mkdir(path.dirname(errorsLogFilePath), { recursive: true });
|
|
2459
4723
|
await import_fs_extra.default.appendFile(errorsLogFilePath, formattedError);
|
|
2460
4724
|
} catch (error) {
|
|
2461
4725
|
console.error("Failed to write to error file:", error);
|
|
2462
4726
|
}
|
|
2463
4727
|
}
|
|
2464
|
-
static writeErrorToConsole(err
|
|
2465
|
-
if (
|
|
2466
|
-
console.error(err, options);
|
|
2467
|
-
else
|
|
4728
|
+
static writeErrorToConsole(err) {
|
|
4729
|
+
if (err === "Failed to execute command: bunx biome check --apply ." || err === "Failed to execute command: bun --bun storage/framework/core/actions/src/lint/fix.ts")
|
|
2468
4730
|
console.error(err);
|
|
4731
|
+
process.exit(ExitCode.FatalError);
|
|
4732
|
+
console.error(err);
|
|
2469
4733
|
}
|
|
2470
4734
|
}
|
|
2471
4735
|
|