rolldown 0.10.2 → 0.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/bin/cli.js +1 -1
  2. package/dist/cjs/cli.cjs +772 -0
  3. package/dist/cjs/index.cjs +26 -0
  4. package/dist/cjs/parallel-plugin-worker.cjs +32 -0
  5. package/dist/{parallel-plugin.cjs → cjs/parallel-plugin.cjs} +2 -3
  6. package/dist/esm/cli.mjs +773 -0
  7. package/dist/esm/index.mjs +24 -0
  8. package/dist/esm/parallel-plugin-worker.mjs +33 -0
  9. package/dist/esm/parallel-plugin.mjs +9 -0
  10. package/dist/shared/chunk-WMSF1LUG.cjs +37 -0
  11. package/dist/shared/consola_36c0034f-ED9jtJgC.mjs +942 -0
  12. package/dist/shared/consola_36c0034f-RVbq7gBJ.cjs +945 -0
  13. package/dist/shared/prompt-Q6AgPcFh.cjs +859 -0
  14. package/dist/shared/prompt-uoOfg_gh.mjs +860 -0
  15. package/dist/shared/rolldown-7z0huS4W.mjs +49 -0
  16. package/dist/shared/rolldown-binding.wasi.cjs +26 -13
  17. package/dist/shared/rolldown-pt4wPK1i.cjs +48 -0
  18. package/dist/shared/utils_index-0Q22WhZL.cjs +5331 -0
  19. package/dist/shared/utils_index-Wfcc8MjH.mjs +5361 -0
  20. package/dist/shared/wasi-worker-browser.mjs +6 -7
  21. package/dist/shared/wasi-worker.mjs +5 -2
  22. package/package.json +52 -37
  23. package/dist/chunks/prompt.cjs +0 -443
  24. package/dist/chunks/prompt.cjs.map +0 -1
  25. package/dist/chunks/prompt.mjs +0 -436
  26. package/dist/chunks/prompt.mjs.map +0 -1
  27. package/dist/cli.cjs +0 -1961
  28. package/dist/cli.cjs.map +0 -1
  29. package/dist/cli.d.cts +0 -2
  30. package/dist/cli.d.mts +0 -2
  31. package/dist/cli.d.ts +0 -2
  32. package/dist/cli.mjs +0 -1939
  33. package/dist/cli.mjs.map +0 -1
  34. package/dist/index.cjs +0 -26
  35. package/dist/index.cjs.map +0 -1
  36. package/dist/index.d.cts +0 -66
  37. package/dist/index.d.mts +0 -66
  38. package/dist/index.d.ts +0 -66
  39. package/dist/index.mjs +0 -21
  40. package/dist/index.mjs.map +0 -1
  41. package/dist/parallel-plugin-worker.cjs +0 -34
  42. package/dist/parallel-plugin-worker.cjs.map +0 -1
  43. package/dist/parallel-plugin-worker.d.cts +0 -2
  44. package/dist/parallel-plugin-worker.d.mts +0 -2
  45. package/dist/parallel-plugin-worker.d.ts +0 -2
  46. package/dist/parallel-plugin-worker.mjs +0 -32
  47. package/dist/parallel-plugin-worker.mjs.map +0 -1
  48. package/dist/parallel-plugin.cjs.map +0 -1
  49. package/dist/parallel-plugin.d.cts +0 -12
  50. package/dist/parallel-plugin.d.mts +0 -12
  51. package/dist/parallel-plugin.d.ts +0 -12
  52. package/dist/parallel-plugin.mjs +0 -6
  53. package/dist/parallel-plugin.mjs.map +0 -1
  54. package/dist/shared/rolldown.1ea1dc1e.d.cts +0 -1160
  55. package/dist/shared/rolldown.1ea1dc1e.d.mts +0 -1160
  56. package/dist/shared/rolldown.1ea1dc1e.d.ts +0 -1160
  57. package/dist/shared/rolldown.4d4592d7.cjs +0 -348
  58. package/dist/shared/rolldown.4d4592d7.cjs.map +0 -1
  59. package/dist/shared/rolldown.65028ebe.cjs +0 -547
  60. package/dist/shared/rolldown.65028ebe.cjs.map +0 -1
  61. package/dist/shared/rolldown.7d1ce9fc.mjs +0 -546
  62. package/dist/shared/rolldown.7d1ce9fc.mjs.map +0 -1
  63. package/dist/shared/rolldown.b914368a.mjs +0 -340
  64. package/dist/shared/rolldown.b914368a.mjs.map +0 -1
@@ -0,0 +1,945 @@
1
+ const { __toESM } = require("./chunk-WMSF1LUG.cjs");
2
+ const { sep } = __toESM(require("node:path"));
3
+ const { default: process$1 } = __toESM(require("node:process"));
4
+ const { formatWithOptions } = __toESM(require("node:util"));
5
+ const tty = __toESM(require("node:tty"));
6
+
7
+ // ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/core.mjs
8
+ const LogLevels = {
9
+ silent:Number.NEGATIVE_INFINITY,
10
+ fatal:0,
11
+ error:0,
12
+ warn:1,
13
+ log:2,
14
+ info:3,
15
+ success:3,
16
+ fail:3,
17
+ ready:3,
18
+ start:3,
19
+ box:3,
20
+ debug:4,
21
+ trace:5,
22
+ verbose:Number.POSITIVE_INFINITY
23
+ };
24
+ const LogTypes = {
25
+ silent:{
26
+ level: -1
27
+ },
28
+ fatal:{
29
+ level:LogLevels.fatal
30
+ },
31
+ error:{
32
+ level:LogLevels.error
33
+ },
34
+ warn:{
35
+ level:LogLevels.warn
36
+ },
37
+ log:{
38
+ level:LogLevels.log
39
+ },
40
+ info:{
41
+ level:LogLevels.info
42
+ },
43
+ success:{
44
+ level:LogLevels.success
45
+ },
46
+ fail:{
47
+ level:LogLevels.fail
48
+ },
49
+ ready:{
50
+ level:LogLevels.info
51
+ },
52
+ start:{
53
+ level:LogLevels.info
54
+ },
55
+ box:{
56
+ level:LogLevels.info
57
+ },
58
+ debug:{
59
+ level:LogLevels.debug
60
+ },
61
+ trace:{
62
+ level:LogLevels.trace
63
+ },
64
+ verbose:{
65
+ level:LogLevels.verbose
66
+ }
67
+ };
68
+ function isObject(value) {
69
+ return value !== null && typeof value === 'object';
70
+ }
71
+ function _defu(baseObject, defaults, namespace='.', merger) {
72
+ if ( !isObject(defaults)) {
73
+ return _defu(baseObject, {}, namespace, merger);
74
+ }
75
+ const object = Object.assign({}, defaults);
76
+ for (const key in baseObject) {
77
+ if (key === '__proto__' || key === 'constructor') {
78
+ continue;
79
+ }
80
+ const value = baseObject[key];
81
+ if (value === null || value === void 0) {
82
+ continue;
83
+ }
84
+ if (merger && merger(object, key, value, namespace)) {
85
+ continue;
86
+ }
87
+ if (Array.isArray(value) && Array.isArray(object[key])) {
88
+ (object[key] = [...value, ...object[key]]);
89
+ } else if (isObject(value) && isObject(object[key])) {
90
+ (object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : '') + key.toString(), merger));
91
+ } else {
92
+ (object[key] = value);
93
+ }
94
+ }
95
+ return object;
96
+ }
97
+ function createDefu(merger) {
98
+ return (...arguments_) => arguments_.reduce((p, c) => _defu(p, c, '', merger), {});
99
+ }
100
+ const defu = createDefu();
101
+ function isPlainObject(obj) {
102
+ return Object.prototype.toString.call(obj) === '[object Object]';
103
+ }
104
+ function isLogObj(arg) {
105
+ if ( !isPlainObject(arg)) {
106
+ return false;
107
+ }
108
+ if ( !arg.message && !arg.args) {
109
+ return false;
110
+ }
111
+ if (arg.stack) {
112
+ return false;
113
+ }
114
+ return true;
115
+ }
116
+ let paused = false;
117
+ const queue = [];
118
+ class Consola {
119
+ constructor(options={}){
120
+ const types = options.types || LogTypes;
121
+ this.options = defu({
122
+ ...options,
123
+ defaults:{
124
+ ...options.defaults
125
+ },
126
+ level:_normalizeLogLevel(options.level, types),
127
+ reporters:[...options.reporters || []]
128
+ }, {
129
+ types:LogTypes,
130
+ throttle:1e3,
131
+ throttleMin:5,
132
+ formatOptions:{
133
+ date:true,
134
+ colors:false,
135
+ compact:true
136
+ }
137
+ });
138
+ for (const type in types) {
139
+ const defaults = {
140
+ type,
141
+ ...this.options.defaults,
142
+ ...types[type]
143
+ };
144
+ this[type] = this._wrapLogFn(defaults);
145
+ this[type].raw = this._wrapLogFn(defaults, true);
146
+ }
147
+ if (this.options.mockFn) {
148
+ this.mockTypes();
149
+ }
150
+ this._lastLog = {};
151
+ }
152
+ get level(){
153
+ return this.options.level;
154
+ }
155
+ set level(level){
156
+ this.options.level = _normalizeLogLevel(level, this.options.types, this.options.level);
157
+ }
158
+ prompt(message, opts){
159
+ if ( !this.options.prompt) {
160
+ throw new Error('prompt is not supported!');
161
+ }
162
+ return this.options.prompt(message, opts);
163
+ }
164
+ create(options){
165
+ const instance = new Consola({
166
+ ...this.options,
167
+ ...options
168
+ });
169
+ if (this._mockFn) {
170
+ instance.mockTypes(this._mockFn);
171
+ }
172
+ return instance;
173
+ }
174
+ withDefaults(defaults){
175
+ return this.create({
176
+ ...this.options,
177
+ defaults:{
178
+ ...this.options.defaults,
179
+ ...defaults
180
+ }
181
+ });
182
+ }
183
+ withTag(tag){
184
+ return this.withDefaults({
185
+ tag:this.options.defaults.tag ? this.options.defaults.tag + ':' + tag : tag
186
+ });
187
+ }
188
+ addReporter(reporter){
189
+ this.options.reporters.push(reporter);
190
+ return this;
191
+ }
192
+ removeReporter(reporter){
193
+ if (reporter) {
194
+ const i = this.options.reporters.indexOf(reporter);
195
+ if (i >= 0) {
196
+ return this.options.reporters.splice(i, 1);
197
+ }
198
+ } else {
199
+ this.options.reporters.splice(0);
200
+ }
201
+ return this;
202
+ }
203
+ setReporters(reporters){
204
+ this.options.reporters = Array.isArray(reporters) ? reporters : [reporters];
205
+ return this;
206
+ }
207
+ wrapAll(){
208
+ this.wrapConsole();
209
+ this.wrapStd();
210
+ }
211
+ restoreAll(){
212
+ this.restoreConsole();
213
+ this.restoreStd();
214
+ }
215
+ wrapConsole(){
216
+ for (const type in this.options.types) {
217
+ if ( !console['__' + type]) {
218
+ console['__' + type] = console[type];
219
+ }
220
+ console[type] = this[type].raw;
221
+ }
222
+ }
223
+ restoreConsole(){
224
+ for (const type in this.options.types) {
225
+ if (console['__' + type]) {
226
+ console[type] = console['__' + type];
227
+ delete console['__' + type];
228
+ }
229
+ }
230
+ }
231
+ wrapStd(){
232
+ this._wrapStream(this.options.stdout, 'log');
233
+ this._wrapStream(this.options.stderr, 'log');
234
+ }
235
+ _wrapStream(stream, type){
236
+ if ( !stream) {
237
+ return;
238
+ }
239
+ if ( !stream.__write) {
240
+ stream.__write = stream.write;
241
+ }
242
+ stream.write = data => {
243
+ this[type].raw(String(data).trim());
244
+ };
245
+ }
246
+ restoreStd(){
247
+ this._restoreStream(this.options.stdout);
248
+ this._restoreStream(this.options.stderr);
249
+ }
250
+ _restoreStream(stream){
251
+ if ( !stream) {
252
+ return;
253
+ }
254
+ if (stream.__write) {
255
+ stream.write = stream.__write;
256
+ delete stream.__write;
257
+ }
258
+ }
259
+ pauseLogs(){
260
+ paused = true;
261
+ }
262
+ resumeLogs(){
263
+ paused = false;
264
+ const _queue = queue.splice(0);
265
+ for (const item of _queue) {
266
+ item[0]._logFn(item[1], item[2]);
267
+ }
268
+ }
269
+ mockTypes(mockFn){
270
+ const _mockFn = mockFn || this.options.mockFn;
271
+ this._mockFn = _mockFn;
272
+ if (typeof _mockFn !== 'function') {
273
+ return;
274
+ }
275
+ for (const type in this.options.types) {
276
+ this[type] = _mockFn(type, this.options.types[type]) || this[type];
277
+ this[type].raw = this[type];
278
+ }
279
+ }
280
+ _wrapLogFn(defaults, isRaw){
281
+ return (...args) => {
282
+ if (paused) {
283
+ queue.push([this, defaults, args, isRaw]);
284
+ return;
285
+ }
286
+ return this._logFn(defaults, args, isRaw);
287
+ };
288
+ }
289
+ _logFn(defaults, args, isRaw){
290
+ if ((defaults.level || 0) > this.level) {
291
+ return false;
292
+ }
293
+ const logObj = {
294
+ date:new Date(),
295
+ args:[],
296
+ ...defaults,
297
+ level:_normalizeLogLevel(defaults.level, this.options.types)
298
+ };
299
+ if ( !isRaw && args.length === 1 && isLogObj(args[0])) {
300
+ Object.assign(logObj, args[0]);
301
+ } else {
302
+ logObj.args = [...args];
303
+ }
304
+ if (logObj.message) {
305
+ logObj.args.unshift(logObj.message);
306
+ delete logObj.message;
307
+ }
308
+ if (logObj.additional) {
309
+ if ( !Array.isArray(logObj.additional)) {
310
+ logObj.additional = logObj.additional.split('\n');
311
+ }
312
+ logObj.args.push('\n' + logObj.additional.join('\n'));
313
+ delete logObj.additional;
314
+ }
315
+ (logObj.type = typeof logObj.type === 'string' ? logObj.type.toLowerCase() : 'log');
316
+ logObj.tag = typeof logObj.tag === 'string' ? logObj.tag : '';
317
+ const resolveLog = (newLog=false) => {
318
+ const repeated = (this._lastLog.count || 0) - this.options.throttleMin;
319
+ if (this._lastLog.object && repeated > 0) {
320
+ const args2 = [...this._lastLog.object.args];
321
+ if (repeated > 1) {
322
+ args2.push(`(repeated ${repeated} times)`);
323
+ }
324
+ this._log({
325
+ ...this._lastLog.object,
326
+ args:args2
327
+ });
328
+ this._lastLog.count = 1;
329
+ }
330
+ if (newLog) {
331
+ (this._lastLog.object = logObj);
332
+ this._log(logObj);
333
+ }
334
+ };
335
+ clearTimeout(this._lastLog.timeout);
336
+ const diffTime = this._lastLog.time && logObj.date ? logObj.date.getTime() - this._lastLog.time.getTime() : 0;
337
+ this._lastLog.time = logObj.date;
338
+ if (diffTime < this.options.throttle) {
339
+ try{
340
+ const serializedLog = JSON.stringify([logObj.type, logObj.tag, logObj.args]);
341
+ const isSameLog = this._lastLog.serialized === serializedLog;
342
+ this._lastLog.serialized = serializedLog;
343
+ if (isSameLog) {
344
+ this._lastLog.count = (this._lastLog.count || 0) + 1;
345
+ if (this._lastLog.count > this.options.throttleMin) {
346
+ this._lastLog.timeout = setTimeout(resolveLog, this.options.throttle);
347
+ return;
348
+ }
349
+ }
350
+ }catch{
351
+ } }
352
+ resolveLog(true);
353
+ }
354
+ _log(logObj){
355
+ for (const reporter of this.options.reporters) {
356
+ reporter.log(logObj, {
357
+ options:this.options
358
+ });
359
+ }
360
+ }
361
+ }
362
+ function _normalizeLogLevel(input, types={}, defaultLevel=3) {
363
+ if (input === void 0) {
364
+ return defaultLevel;
365
+ }
366
+ if (typeof input === 'number') {
367
+ return input;
368
+ }
369
+ if (types[input] && types[input].level !== void 0) {
370
+ return types[input].level;
371
+ }
372
+ return defaultLevel;
373
+ }
374
+ Consola.prototype.add = Consola.prototype.addReporter;
375
+ Consola.prototype.remove = Consola.prototype.removeReporter;
376
+ Consola.prototype.clear = Consola.prototype.removeReporter;
377
+ Consola.prototype.withScope = Consola.prototype.withTag;
378
+ Consola.prototype.mock = Consola.prototype.mockTypes;
379
+ Consola.prototype.pause = Consola.prototype.pauseLogs;
380
+ Consola.prototype.resume = Consola.prototype.resumeLogs;
381
+ function createConsola$1(options={}) {
382
+ return new Consola(options);
383
+ }
384
+
385
+ // ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/shared/consola.06ad8a64.mjs
386
+ function parseStack(stack) {
387
+ const cwd = process.cwd() + sep;
388
+ const lines = stack.split('\n').splice(1).map(l => l.trim().replace('file://', '').replace(cwd, ''));
389
+ return lines;
390
+ }
391
+ function writeStream(data, stream) {
392
+ const write = stream.__write || stream.write;
393
+ return write.call(stream, data);
394
+ }
395
+ const bracket = x => x ? `[${x}]` : '';
396
+ class BasicReporter {
397
+ formatStack(stack, opts){
398
+ return ' ' + parseStack(stack).join('\n ');
399
+ }
400
+ formatArgs(args, opts){
401
+ const _args = args.map(arg => {
402
+ if (arg && typeof arg.stack === 'string') {
403
+ return arg.message + '\n' + this.formatStack(arg.stack, opts);
404
+ }
405
+ return arg;
406
+ });
407
+ return formatWithOptions(opts, ..._args);
408
+ }
409
+ formatDate(date, opts){
410
+ return opts.date ? date.toLocaleTimeString() : '';
411
+ }
412
+ filterAndJoin(arr){
413
+ return arr.filter(Boolean).join(' ');
414
+ }
415
+ formatLogObj(logObj, opts){
416
+ const message = this.formatArgs(logObj.args, opts);
417
+ if (logObj.type === 'box') {
418
+ return '\n' + [bracket(logObj.tag), logObj.title && logObj.title, ...message.split('\n')].filter(Boolean).map(l => ' > ' + l).join('\n') + '\n';
419
+ }
420
+ return this.filterAndJoin([bracket(logObj.type), bracket(logObj.tag), message]);
421
+ }
422
+ log(logObj, ctx){
423
+ const line = this.formatLogObj(logObj, {
424
+ columns:ctx.options.stdout.columns || 0,
425
+ ...ctx.options.formatOptions
426
+ });
427
+ return writeStream(line + '\n', logObj.level < 2 ? ctx.options.stderr || process.stderr : ctx.options.stdout || process.stdout);
428
+ }
429
+ }
430
+
431
+ // ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/utils.mjs
432
+ const {env={}, argv=[], platform=''} = typeof process === 'undefined' ? {} : process;
433
+ const isDisabled = 'NO_COLOR'in env || argv.includes('--no-color');
434
+ const isForced = 'FORCE_COLOR'in env || argv.includes('--color');
435
+ const isWindows = platform === 'win32';
436
+ const isDumbTerminal = env.TERM === 'dumb';
437
+ const isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;
438
+ const isCI$1 = 'CI'in env && ('GITHUB_ACTIONS'in env || 'GITLAB_CI'in env || 'CIRCLECI'in env);
439
+ const isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI$1);
440
+ function replaceClose(index, string, close, replace, head=string.slice(0, Math.max(0, index)) + replace, tail=string.slice(Math.max(0, index + close.length)), next=tail.indexOf(close)) {
441
+ return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
442
+ }
443
+ function clearBleed(index, string, open, close, replace) {
444
+ return index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
445
+ }
446
+ function filterEmpty(open, close, replace=open, at=open.length + 1) {
447
+ return string => string || !(string === '' || string === void 0) ? clearBleed(('' + string).indexOf(close, at), string, open, close, replace) : '';
448
+ }
449
+ function init(open, close, replace) {
450
+ return filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace);
451
+ }
452
+ const colorDefs = {
453
+ reset:init(0, 0),
454
+ bold:init(1, 22, '\x1B[22m\x1B[1m'),
455
+ dim:init(2, 22, '\x1B[22m\x1B[2m'),
456
+ italic:init(3, 23),
457
+ underline:init(4, 24),
458
+ inverse:init(7, 27),
459
+ hidden:init(8, 28),
460
+ strikethrough:init(9, 29),
461
+ black:init(30, 39),
462
+ red:init(31, 39),
463
+ green:init(32, 39),
464
+ yellow:init(33, 39),
465
+ blue:init(34, 39),
466
+ magenta:init(35, 39),
467
+ cyan:init(36, 39),
468
+ white:init(37, 39),
469
+ gray:init(90, 39),
470
+ bgBlack:init(40, 49),
471
+ bgRed:init(41, 49),
472
+ bgGreen:init(42, 49),
473
+ bgYellow:init(43, 49),
474
+ bgBlue:init(44, 49),
475
+ bgMagenta:init(45, 49),
476
+ bgCyan:init(46, 49),
477
+ bgWhite:init(47, 49),
478
+ blackBright:init(90, 39),
479
+ redBright:init(91, 39),
480
+ greenBright:init(92, 39),
481
+ yellowBright:init(93, 39),
482
+ blueBright:init(94, 39),
483
+ magentaBright:init(95, 39),
484
+ cyanBright:init(96, 39),
485
+ whiteBright:init(97, 39),
486
+ bgBlackBright:init(100, 49),
487
+ bgRedBright:init(101, 49),
488
+ bgGreenBright:init(102, 49),
489
+ bgYellowBright:init(103, 49),
490
+ bgBlueBright:init(104, 49),
491
+ bgMagentaBright:init(105, 49),
492
+ bgCyanBright:init(106, 49),
493
+ bgWhiteBright:init(107, 49)
494
+ };
495
+ function createColors(useColor=isColorSupported) {
496
+ return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map(key => [key, String]));
497
+ }
498
+ const colors = createColors();
499
+ function getColor$1(color, fallback='reset') {
500
+ return colors[color] || colors[fallback];
501
+ }
502
+ const ansiRegex$1 = ['[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))'].join('|');
503
+ function stripAnsi$1(text) {
504
+ return text.replace(new RegExp(ansiRegex$1, 'g'), '');
505
+ }
506
+ const boxStylePresets = {
507
+ solid:{
508
+ tl:'\u{250c}',
509
+ tr:'\u{2510}',
510
+ bl:'\u{2514}',
511
+ br:'\u{2518}',
512
+ h:'\u{2500}',
513
+ v:'\u{2502}'
514
+ },
515
+ double:{
516
+ tl:'\u{2554}',
517
+ tr:'\u{2557}',
518
+ bl:'\u{255a}',
519
+ br:'\u{255d}',
520
+ h:'\u{2550}',
521
+ v:'\u{2551}'
522
+ },
523
+ doubleSingle:{
524
+ tl:'\u{2553}',
525
+ tr:'\u{2556}',
526
+ bl:'\u{2559}',
527
+ br:'\u{255c}',
528
+ h:'\u{2500}',
529
+ v:'\u{2551}'
530
+ },
531
+ doubleSingleRounded:{
532
+ tl:'\u{256d}',
533
+ tr:'\u{256e}',
534
+ bl:'\u{2570}',
535
+ br:'\u{256f}',
536
+ h:'\u{2500}',
537
+ v:'\u{2551}'
538
+ },
539
+ singleThick:{
540
+ tl:'\u{250f}',
541
+ tr:'\u{2513}',
542
+ bl:'\u{2517}',
543
+ br:'\u{251b}',
544
+ h:'\u{2501}',
545
+ v:'\u{2503}'
546
+ },
547
+ singleDouble:{
548
+ tl:'\u{2552}',
549
+ tr:'\u{2555}',
550
+ bl:'\u{2558}',
551
+ br:'\u{255b}',
552
+ h:'\u{2550}',
553
+ v:'\u{2502}'
554
+ },
555
+ singleDoubleRounded:{
556
+ tl:'\u{256d}',
557
+ tr:'\u{256e}',
558
+ bl:'\u{2570}',
559
+ br:'\u{256f}',
560
+ h:'\u{2550}',
561
+ v:'\u{2502}'
562
+ },
563
+ rounded:{
564
+ tl:'\u{256d}',
565
+ tr:'\u{256e}',
566
+ bl:'\u{2570}',
567
+ br:'\u{256f}',
568
+ h:'\u{2500}',
569
+ v:'\u{2502}'
570
+ }
571
+ };
572
+ const defaultStyle = {
573
+ borderColor:'white',
574
+ borderStyle:'rounded',
575
+ valign:'center',
576
+ padding:2,
577
+ marginLeft:1,
578
+ marginTop:1,
579
+ marginBottom:1
580
+ };
581
+ function box(text, _opts={}) {
582
+ const opts = {
583
+ ..._opts,
584
+ style:{
585
+ ...defaultStyle,
586
+ ..._opts.style
587
+ }
588
+ };
589
+ const textLines = text.split('\n');
590
+ const boxLines = [];
591
+ const _color = getColor$1(opts.style.borderColor);
592
+ const borderStyle = {
593
+ ...typeof opts.style.borderStyle === 'string' ? boxStylePresets[opts.style.borderStyle] || boxStylePresets.solid : opts.style.borderStyle
594
+ };
595
+ if (_color) {
596
+ for (const key in borderStyle) {
597
+ borderStyle[key] = _color(borderStyle[key]);
598
+ }
599
+ }
600
+ const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;
601
+ const height = textLines.length + paddingOffset;
602
+ const width = Math.max(...textLines.map(line => line.length)) + paddingOffset;
603
+ const widthOffset = width + paddingOffset;
604
+ const leftSpace = opts.style.marginLeft > 0 ? ' '.repeat(opts.style.marginLeft) : '';
605
+ if (opts.style.marginTop > 0) {
606
+ boxLines.push(''.repeat(opts.style.marginTop));
607
+ }
608
+ if (opts.title) {
609
+ const left = borderStyle.h.repeat(Math.floor((width - stripAnsi$1(opts.title).length) / 2));
610
+ const right = borderStyle.h.repeat(width - stripAnsi$1(opts.title).length - stripAnsi$1(left).length + paddingOffset);
611
+ boxLines.push(`${leftSpace}${borderStyle.tl}${left}${opts.title}${right}${borderStyle.tr}`);
612
+ } else {
613
+ boxLines.push(`${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`);
614
+ }
615
+ const valignOffset = opts.style.valign === 'center' ? Math.floor((height - textLines.length) / 2) : opts.style.valign === 'top' ? height - textLines.length - paddingOffset : height - textLines.length;
616
+ for (let i = 0; i < height; i++) {
617
+ if (i < valignOffset || i >= valignOffset + textLines.length) {
618
+ boxLines.push(`${leftSpace}${borderStyle.v}${' '.repeat(widthOffset)}${borderStyle.v}`);
619
+ } else {
620
+ const line = textLines[i - valignOffset];
621
+ const left = ' '.repeat(paddingOffset);
622
+ const right = ' '.repeat(width - stripAnsi$1(line).length);
623
+ boxLines.push(`${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`);
624
+ }
625
+ }
626
+ boxLines.push(`${leftSpace}${borderStyle.bl}${borderStyle.h.repeat(widthOffset)}${borderStyle.br}`);
627
+ if (opts.style.marginBottom > 0) {
628
+ boxLines.push(''.repeat(opts.style.marginBottom));
629
+ }
630
+ return boxLines.join('\n');
631
+ }
632
+
633
+ // ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/shared/consola.36c0034f.mjs
634
+ const providers = [['APPVEYOR'], ['AZURE_PIPELINES', 'SYSTEM_TEAMFOUNDATIONCOLLECTIONURI'], ['AZURE_STATIC', 'INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN'], ['APPCIRCLE', 'AC_APPCIRCLE'], ['BAMBOO', 'bamboo_planKey'], ['BITBUCKET', 'BITBUCKET_COMMIT'], ['BITRISE', 'BITRISE_IO'], ['BUDDY', 'BUDDY_WORKSPACE_ID'], ['BUILDKITE'], ['CIRCLE', 'CIRCLECI'], ['CIRRUS', 'CIRRUS_CI'], ['CLOUDFLARE_PAGES', 'CF_PAGES', {
635
+ ci:true
636
+ }], ['CODEBUILD', 'CODEBUILD_BUILD_ARN'], ['CODEFRESH', 'CF_BUILD_ID'], ['DRONE'], ['DRONE', 'DRONE_BUILD_EVENT'], ['DSARI'], ['GITHUB_ACTIONS'], ['GITLAB', 'GITLAB_CI'], ['GITLAB', 'CI_MERGE_REQUEST_ID'], ['GOCD', 'GO_PIPELINE_LABEL'], ['LAYERCI'], ['HUDSON', 'HUDSON_URL'], ['JENKINS', 'JENKINS_URL'], ['MAGNUM'], ['NETLIFY'], ['NETLIFY', 'NETLIFY_LOCAL', {
637
+ ci:false
638
+ }], ['NEVERCODE'], ['RENDER'], ['SAIL', 'SAILCI'], ['SEMAPHORE'], ['SCREWDRIVER'], ['SHIPPABLE'], ['SOLANO', 'TDDIUM'], ['STRIDER'], ['TEAMCITY', 'TEAMCITY_VERSION'], ['TRAVIS'], ['VERCEL', 'NOW_BUILDER'], ['APPCENTER', 'APPCENTER_BUILD_ID'], ['CODESANDBOX', 'CODESANDBOX_SSE', {
639
+ ci:false
640
+ }], ['STACKBLITZ'], ['STORMKIT'], ['CLEAVR']];
641
+ function detectProvider(env$1) {
642
+ for (const provider of providers) {
643
+ const envName = provider[1] || provider[0];
644
+ if (env$1[envName]) {
645
+ return {
646
+ name:provider[0].toLowerCase(),
647
+ ...provider[2]
648
+ };
649
+ }
650
+ }
651
+ if (env$1.SHELL && env$1.SHELL === '/bin/jsh') {
652
+ return {
653
+ name:'stackblitz',
654
+ ci:false
655
+ };
656
+ }
657
+ return {
658
+ name:'',
659
+ ci:false
660
+ };
661
+ }
662
+ const processShim = typeof process !== 'undefined' ? process : {};
663
+ const envShim = processShim.env || {};
664
+ const providerInfo = detectProvider(envShim);
665
+ const nodeENV = typeof process !== 'undefined' && process.env && process.env.NODE_ENV || '';
666
+ processShim.platform;
667
+ providerInfo.name;
668
+ const isCI = toBoolean(envShim.CI) || providerInfo.ci !== false;
669
+ const hasTTY = toBoolean(processShim.stdout && processShim.stdout.isTTY);
670
+ const isDebug = toBoolean(envShim.DEBUG);
671
+ const isTest = nodeENV === 'test' || toBoolean(envShim.TEST);
672
+ toBoolean(envShim.MINIMAL) || isCI || isTest || !hasTTY;
673
+ function toBoolean(val) {
674
+ return val ? val !== 'false' : false;
675
+ }
676
+ function ansiRegex({onlyFirst=false}={}) {
677
+ const pattern = ['[\\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('|');
678
+ return new RegExp(pattern, onlyFirst ? undefined : 'g');
679
+ }
680
+ const regex = ansiRegex();
681
+ function stripAnsi(string) {
682
+ if (typeof string !== 'string') {
683
+ throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
684
+ }
685
+ return string.replace(regex, '');
686
+ }
687
+ function getDefaultExportFromCjs(x) {
688
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
689
+ }
690
+ var eastasianwidth = {
691
+ exports:{}
692
+ };
693
+ (function(module) {
694
+ var eaw = {};
695
+ {
696
+ module.exports = eaw;
697
+ }
698
+ eaw.eastAsianWidth = function(character) {
699
+ var x = character.charCodeAt(0);
700
+ var y = character.length == 2 ? character.charCodeAt(1) : 0;
701
+ var codePoint = x;
702
+ if (0xD800 <= x && x <= 0xDBFF && 0xDC00 <= y && y <= 0xDFFF) {
703
+ x &= 0x3FF;
704
+ y &= 0x3FF;
705
+ codePoint = x << 10 | y;
706
+ codePoint += 0x10000;
707
+ }
708
+ if (0x3000 == codePoint || 0xFF01 <= codePoint && codePoint <= 0xFF60 || 0xFFE0 <= codePoint && codePoint <= 0xFFE6) {
709
+ return 'F';
710
+ }
711
+ if (0x20A9 == codePoint || 0xFF61 <= codePoint && codePoint <= 0xFFBE || 0xFFC2 <= codePoint && codePoint <= 0xFFC7 || 0xFFCA <= codePoint && codePoint <= 0xFFCF || 0xFFD2 <= codePoint && codePoint <= 0xFFD7 || 0xFFDA <= codePoint && codePoint <= 0xFFDC || 0xFFE8 <= codePoint && codePoint <= 0xFFEE) {
712
+ return 'H';
713
+ }
714
+ if (0x1100 <= codePoint && codePoint <= 0x115F || 0x11A3 <= codePoint && codePoint <= 0x11A7 || 0x11FA <= codePoint && codePoint <= 0x11FF || 0x2329 <= codePoint && codePoint <= 0x232A || 0x2E80 <= codePoint && codePoint <= 0x2E99 || 0x2E9B <= codePoint && codePoint <= 0x2EF3 || 0x2F00 <= codePoint && codePoint <= 0x2FD5 || 0x2FF0 <= codePoint && codePoint <= 0x2FFB || 0x3001 <= codePoint && codePoint <= 0x303E || 0x3041 <= codePoint && codePoint <= 0x3096 || 0x3099 <= codePoint && codePoint <= 0x30FF || 0x3105 <= codePoint && codePoint <= 0x312D || 0x3131 <= codePoint && codePoint <= 0x318E || 0x3190 <= codePoint && codePoint <= 0x31BA || 0x31C0 <= codePoint && codePoint <= 0x31E3 || 0x31F0 <= codePoint && codePoint <= 0x321E || 0x3220 <= codePoint && codePoint <= 0x3247 || 0x3250 <= codePoint && codePoint <= 0x32FE || 0x3300 <= codePoint && codePoint <= 0x4DBF || 0x4E00 <= codePoint && codePoint <= 0xA48C || 0xA490 <= codePoint && codePoint <= 0xA4C6 || 0xA960 <= codePoint && codePoint <= 0xA97C || 0xAC00 <= codePoint && codePoint <= 0xD7A3 || 0xD7B0 <= codePoint && codePoint <= 0xD7C6 || 0xD7CB <= codePoint && codePoint <= 0xD7FB || 0xF900 <= codePoint && codePoint <= 0xFAFF || 0xFE10 <= codePoint && codePoint <= 0xFE19 || 0xFE30 <= codePoint && codePoint <= 0xFE52 || 0xFE54 <= codePoint && codePoint <= 0xFE66 || 0xFE68 <= codePoint && codePoint <= 0xFE6B || 0x1B000 <= codePoint && codePoint <= 0x1B001 || 0x1F200 <= codePoint && codePoint <= 0x1F202 || 0x1F210 <= codePoint && codePoint <= 0x1F23A || 0x1F240 <= codePoint && codePoint <= 0x1F248 || 0x1F250 <= codePoint && codePoint <= 0x1F251 || 0x20000 <= codePoint && codePoint <= 0x2F73F || 0x2B740 <= codePoint && codePoint <= 0x2FFFD || 0x30000 <= codePoint && codePoint <= 0x3FFFD) {
715
+ return 'W';
716
+ }
717
+ if (0x0020 <= codePoint && codePoint <= 0x007E || 0x00A2 <= codePoint && codePoint <= 0x00A3 || 0x00A5 <= codePoint && codePoint <= 0x00A6 || 0x00AC == codePoint || 0x00AF == codePoint || 0x27E6 <= codePoint && codePoint <= 0x27ED || 0x2985 <= codePoint && codePoint <= 0x2986) {
718
+ return 'Na';
719
+ }
720
+ if (0x00A1 == codePoint || 0x00A4 == codePoint || 0x00A7 <= codePoint && codePoint <= 0x00A8 || 0x00AA == codePoint || 0x00AD <= codePoint && codePoint <= 0x00AE || 0x00B0 <= codePoint && codePoint <= 0x00B4 || 0x00B6 <= codePoint && codePoint <= 0x00BA || 0x00BC <= codePoint && codePoint <= 0x00BF || 0x00C6 == codePoint || 0x00D0 == codePoint || 0x00D7 <= codePoint && codePoint <= 0x00D8 || 0x00DE <= codePoint && codePoint <= 0x00E1 || 0x00E6 == codePoint || 0x00E8 <= codePoint && codePoint <= 0x00EA || 0x00EC <= codePoint && codePoint <= 0x00ED || 0x00F0 == codePoint || 0x00F2 <= codePoint && codePoint <= 0x00F3 || 0x00F7 <= codePoint && codePoint <= 0x00FA || 0x00FC == codePoint || 0x00FE == codePoint || 0x0101 == codePoint || 0x0111 == codePoint || 0x0113 == codePoint || 0x011B == codePoint || 0x0126 <= codePoint && codePoint <= 0x0127 || 0x012B == codePoint || 0x0131 <= codePoint && codePoint <= 0x0133 || 0x0138 == codePoint || 0x013F <= codePoint && codePoint <= 0x0142 || 0x0144 == codePoint || 0x0148 <= codePoint && codePoint <= 0x014B || 0x014D == codePoint || 0x0152 <= codePoint && codePoint <= 0x0153 || 0x0166 <= codePoint && codePoint <= 0x0167 || 0x016B == codePoint || 0x01CE == codePoint || 0x01D0 == codePoint || 0x01D2 == codePoint || 0x01D4 == codePoint || 0x01D6 == codePoint || 0x01D8 == codePoint || 0x01DA == codePoint || 0x01DC == codePoint || 0x0251 == codePoint || 0x0261 == codePoint || 0x02C4 == codePoint || 0x02C7 == codePoint || 0x02C9 <= codePoint && codePoint <= 0x02CB || 0x02CD == codePoint || 0x02D0 == codePoint || 0x02D8 <= codePoint && codePoint <= 0x02DB || 0x02DD == codePoint || 0x02DF == codePoint || 0x0300 <= codePoint && codePoint <= 0x036F || 0x0391 <= codePoint && codePoint <= 0x03A1 || 0x03A3 <= codePoint && codePoint <= 0x03A9 || 0x03B1 <= codePoint && codePoint <= 0x03C1 || 0x03C3 <= codePoint && codePoint <= 0x03C9 || 0x0401 == codePoint || 0x0410 <= codePoint && codePoint <= 0x044F || 0x0451 == codePoint || 0x2010 == codePoint || 0x2013 <= codePoint && codePoint <= 0x2016 || 0x2018 <= codePoint && codePoint <= 0x2019 || 0x201C <= codePoint && codePoint <= 0x201D || 0x2020 <= codePoint && codePoint <= 0x2022 || 0x2024 <= codePoint && codePoint <= 0x2027 || 0x2030 == codePoint || 0x2032 <= codePoint && codePoint <= 0x2033 || 0x2035 == codePoint || 0x203B == codePoint || 0x203E == codePoint || 0x2074 == codePoint || 0x207F == codePoint || 0x2081 <= codePoint && codePoint <= 0x2084 || 0x20AC == codePoint || 0x2103 == codePoint || 0x2105 == codePoint || 0x2109 == codePoint || 0x2113 == codePoint || 0x2116 == codePoint || 0x2121 <= codePoint && codePoint <= 0x2122 || 0x2126 == codePoint || 0x212B == codePoint || 0x2153 <= codePoint && codePoint <= 0x2154 || 0x215B <= codePoint && codePoint <= 0x215E || 0x2160 <= codePoint && codePoint <= 0x216B || 0x2170 <= codePoint && codePoint <= 0x2179 || 0x2189 == codePoint || 0x2190 <= codePoint && codePoint <= 0x2199 || 0x21B8 <= codePoint && codePoint <= 0x21B9 || 0x21D2 == codePoint || 0x21D4 == codePoint || 0x21E7 == codePoint || 0x2200 == codePoint || 0x2202 <= codePoint && codePoint <= 0x2203 || 0x2207 <= codePoint && codePoint <= 0x2208 || 0x220B == codePoint || 0x220F == codePoint || 0x2211 == codePoint || 0x2215 == codePoint || 0x221A == codePoint || 0x221D <= codePoint && codePoint <= 0x2220 || 0x2223 == codePoint || 0x2225 == codePoint || 0x2227 <= codePoint && codePoint <= 0x222C || 0x222E == codePoint || 0x2234 <= codePoint && codePoint <= 0x2237 || 0x223C <= codePoint && codePoint <= 0x223D || 0x2248 == codePoint || 0x224C == codePoint || 0x2252 == codePoint || 0x2260 <= codePoint && codePoint <= 0x2261 || 0x2264 <= codePoint && codePoint <= 0x2267 || 0x226A <= codePoint && codePoint <= 0x226B || 0x226E <= codePoint && codePoint <= 0x226F || 0x2282 <= codePoint && codePoint <= 0x2283 || 0x2286 <= codePoint && codePoint <= 0x2287 || 0x2295 == codePoint || 0x2299 == codePoint || 0x22A5 == codePoint || 0x22BF == codePoint || 0x2312 == codePoint || 0x2460 <= codePoint && codePoint <= 0x24E9 || 0x24EB <= codePoint && codePoint <= 0x254B || 0x2550 <= codePoint && codePoint <= 0x2573 || 0x2580 <= codePoint && codePoint <= 0x258F || 0x2592 <= codePoint && codePoint <= 0x2595 || 0x25A0 <= codePoint && codePoint <= 0x25A1 || 0x25A3 <= codePoint && codePoint <= 0x25A9 || 0x25B2 <= codePoint && codePoint <= 0x25B3 || 0x25B6 <= codePoint && codePoint <= 0x25B7 || 0x25BC <= codePoint && codePoint <= 0x25BD || 0x25C0 <= codePoint && codePoint <= 0x25C1 || 0x25C6 <= codePoint && codePoint <= 0x25C8 || 0x25CB == codePoint || 0x25CE <= codePoint && codePoint <= 0x25D1 || 0x25E2 <= codePoint && codePoint <= 0x25E5 || 0x25EF == codePoint || 0x2605 <= codePoint && codePoint <= 0x2606 || 0x2609 == codePoint || 0x260E <= codePoint && codePoint <= 0x260F || 0x2614 <= codePoint && codePoint <= 0x2615 || 0x261C == codePoint || 0x261E == codePoint || 0x2640 == codePoint || 0x2642 == codePoint || 0x2660 <= codePoint && codePoint <= 0x2661 || 0x2663 <= codePoint && codePoint <= 0x2665 || 0x2667 <= codePoint && codePoint <= 0x266A || 0x266C <= codePoint && codePoint <= 0x266D || 0x266F == codePoint || 0x269E <= codePoint && codePoint <= 0x269F || 0x26BE <= codePoint && codePoint <= 0x26BF || 0x26C4 <= codePoint && codePoint <= 0x26CD || 0x26CF <= codePoint && codePoint <= 0x26E1 || 0x26E3 == codePoint || 0x26E8 <= codePoint && codePoint <= 0x26FF || 0x273D == codePoint || 0x2757 == codePoint || 0x2776 <= codePoint && codePoint <= 0x277F || 0x2B55 <= codePoint && codePoint <= 0x2B59 || 0x3248 <= codePoint && codePoint <= 0x324F || 0xE000 <= codePoint && codePoint <= 0xF8FF || 0xFE00 <= codePoint && codePoint <= 0xFE0F || 0xFFFD == codePoint || 0x1F100 <= codePoint && codePoint <= 0x1F10A || 0x1F110 <= codePoint && codePoint <= 0x1F12D || 0x1F130 <= codePoint && codePoint <= 0x1F169 || 0x1F170 <= codePoint && codePoint <= 0x1F19A || 0xE0100 <= codePoint && codePoint <= 0xE01EF || 0xF0000 <= codePoint && codePoint <= 0xFFFFD || 0x100000 <= codePoint && codePoint <= 0x10FFFD) {
721
+ return 'A';
722
+ }
723
+ return 'N';
724
+ };
725
+ eaw.characterLength = function(character) {
726
+ var code = this.eastAsianWidth(character);
727
+ if (code == 'F' || code == 'W' || code == 'A') {
728
+ return 2;
729
+ } else {
730
+ return 1;
731
+ }
732
+ };
733
+ function stringToArray(string) {
734
+ return string.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
735
+ }
736
+ eaw.length = function(string) {
737
+ var characters = stringToArray(string);
738
+ var len = 0;
739
+ for (var i = 0; i < characters.length; i++) {
740
+ len = len + this.characterLength(characters[i]);
741
+ }
742
+ return len;
743
+ };
744
+ eaw.slice = function(text, start, end) {
745
+ textLen = eaw.length(text);
746
+ start = start ? start : 0;
747
+ end = end ? end : 1;
748
+ if (start < 0) {
749
+ start = textLen + start;
750
+ }
751
+ if (end < 0) {
752
+ end = textLen + end;
753
+ }
754
+ var result = '';
755
+ var eawLen = 0;
756
+ var chars = stringToArray(text);
757
+ for (var i = 0; i < chars.length; i++) {
758
+ var char = chars[i];
759
+ var charLen = eaw.length(char);
760
+ if (eawLen >= start - (charLen == 2 ? 1 : 0)) {
761
+ if (eawLen + charLen <= end) {
762
+ result += char;
763
+ } else {
764
+ break;
765
+ }
766
+ }
767
+ eawLen += charLen;
768
+ }
769
+ return result;
770
+ };
771
+ })(eastasianwidth);
772
+ var eastasianwidthExports = eastasianwidth.exports;
773
+ const eastAsianWidth = getDefaultExportFromCjs(eastasianwidthExports);
774
+ const emojiRegex = () => {
775
+ 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;
776
+ };
777
+ function stringWidth$1(string, options) {
778
+ if (typeof string !== 'string' || string.length === 0) {
779
+ return 0;
780
+ }
781
+ options = {
782
+ ambiguousIsNarrow:true,
783
+ countAnsiEscapeCodes:false,
784
+ ...options
785
+ };
786
+ if ( !options.countAnsiEscapeCodes) {
787
+ (string = stripAnsi(string));
788
+ }
789
+ if (string.length === 0) {
790
+ return 0;
791
+ }
792
+ const ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2;
793
+ let width = 0;
794
+ for (const {segment:character} of new Intl.Segmenter().segment(string)) {
795
+ const codePoint = character.codePointAt(0);
796
+ if (codePoint <= 0x1F || codePoint >= 0x7F && codePoint <= 0x9F) {
797
+ continue;
798
+ }
799
+ if (codePoint >= 0x3_00 && codePoint <= 0x3_6F) {
800
+ continue;
801
+ }
802
+ if (emojiRegex().test(character)) {
803
+ width += 2;
804
+ continue;
805
+ }
806
+ const code = eastAsianWidth.eastAsianWidth(character);
807
+ switch(code){
808
+ case 'F':
809
+ case 'W':
810
+ {
811
+ width += 2;
812
+ break;
813
+ }
814
+ case 'A':
815
+ {
816
+ width += ambiguousCharacterWidth;
817
+ break;
818
+ }
819
+ default:
820
+ {
821
+ width += 1;
822
+ }
823
+ }
824
+ }
825
+ return width;
826
+ }
827
+ function isUnicodeSupported() {
828
+ if (process$1.platform !== 'win32') {
829
+ return process$1.env.TERM !== 'linux';
830
+ }
831
+ 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';
832
+ }
833
+ const TYPE_COLOR_MAP = {
834
+ info:'cyan',
835
+ fail:'red',
836
+ success:'green',
837
+ ready:'green',
838
+ start:'magenta'
839
+ };
840
+ const LEVEL_COLOR_MAP = {
841
+ 0:'red',
842
+ 1:'yellow'
843
+ };
844
+ const unicode = isUnicodeSupported();
845
+ const s = (c, fallback) => unicode ? c : fallback;
846
+ const TYPE_ICONS = {
847
+ error:s('\u{2716}', '\u{d7}'),
848
+ fatal:s('\u{2716}', '\u{d7}'),
849
+ ready:s('\u{2714}', '\u{221a}'),
850
+ warn:s('\u{26a0}', '\u{203c}'),
851
+ info:s('\u{2139}', 'i'),
852
+ success:s('\u{2714}', '\u{221a}'),
853
+ debug:s('\u{2699}', 'D'),
854
+ trace:s('\u{2192}', '\u{2192}'),
855
+ fail:s('\u{2716}', '\u{d7}'),
856
+ start:s('\u{25d0}', 'o'),
857
+ log:''
858
+ };
859
+ function stringWidth(str) {
860
+ if ( !Intl.Segmenter) {
861
+ return stripAnsi$1(str).length;
862
+ }
863
+ return stringWidth$1(str);
864
+ }
865
+ class FancyReporter extends BasicReporter {
866
+ formatStack(stack){
867
+ return '\n' + parseStack(stack).map(line => ' ' + line.replace(/^at +/, m => colors.gray(m)).replace(/\((.+)\)/, (_, m) => `(${colors.cyan(m)})`)).join('\n');
868
+ }
869
+ formatType(logObj, isBadge, opts){
870
+ const typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || 'gray';
871
+ if (isBadge) {
872
+ return getBgColor(typeColor)(colors.black(` ${logObj.type.toUpperCase()} `));
873
+ }
874
+ const _type = typeof TYPE_ICONS[logObj.type] === 'string' ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type;
875
+ return _type ? getColor(typeColor)(_type) : '';
876
+ }
877
+ formatLogObj(logObj, opts){
878
+ const [message,...additional] = this.formatArgs(logObj.args, opts).split('\n');
879
+ if (logObj.type === 'box') {
880
+ return box(characterFormat(message + (additional.length > 0 ? '\n' + additional.join('\n') : '')), {
881
+ title:logObj.title ? characterFormat(logObj.title) : void 0,
882
+ style:logObj.style
883
+ });
884
+ }
885
+ const date = this.formatDate(logObj.date, opts);
886
+ const coloredDate = date && colors.gray(date);
887
+ const isBadge = logObj.badge ?? logObj.level < 2;
888
+ const type = this.formatType(logObj, isBadge, opts);
889
+ const tag = logObj.tag ? colors.gray(logObj.tag) : '';
890
+ let line;
891
+ const left = this.filterAndJoin([type, characterFormat(message)]);
892
+ const right = this.filterAndJoin(opts.columns ? [tag, coloredDate] : [tag]);
893
+ const space = (opts.columns || 0) - stringWidth(left) - stringWidth(right) - 2;
894
+ line = space > 0 && (opts.columns || 0) >= 80 ? left + ' '.repeat(space) + right : (right ? `${colors.gray(`[${right}]`)} ` : '') + left;
895
+ line += characterFormat(additional.length > 0 ? '\n' + additional.join('\n') : '');
896
+ if (logObj.type === 'trace') {
897
+ const _err = new Error('Trace: ' + logObj.message);
898
+ line += this.formatStack(_err.stack || '');
899
+ }
900
+ return isBadge ? '\n' + line + '\n' : line;
901
+ }
902
+ }
903
+ function characterFormat(str) {
904
+ return str.replace(/`([^`]+)`/gm, (_, m) => colors.cyan(m)).replace(/\s+_([^_]+)_\s+/gm, (_, m) => ` ${colors.underline(m)} `);
905
+ }
906
+ function getColor(color='white') {
907
+ return colors[color] || colors.white;
908
+ }
909
+ function getBgColor(color='bgWhite') {
910
+ return colors[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors.bgWhite;
911
+ }
912
+ function createConsola(options={}) {
913
+ let level = _getDefaultLogLevel();
914
+ if (process.env.CONSOLA_LEVEL) {
915
+ level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level;
916
+ }
917
+ const consola2 = createConsola$1({
918
+ level,
919
+ defaults:{
920
+ level
921
+ },
922
+ stdout:process.stdout,
923
+ stderr:process.stderr,
924
+ prompt:(...args) => import('./prompt-Q6AgPcFh.cjs').then(m => m.prompt(...args)),
925
+ reporters:options.reporters || [options.fancy ?? !(isCI || isTest) ? new FancyReporter() : new BasicReporter()],
926
+ ...options
927
+ });
928
+ return consola2;
929
+ }
930
+ function _getDefaultLogLevel() {
931
+ if (isDebug) {
932
+ return LogLevels.debug;
933
+ }
934
+ if (isTest) {
935
+ return LogLevels.warn;
936
+ }
937
+ return LogLevels.info;
938
+ }
939
+ const consola = createConsola();
940
+
941
+ exports.colors = colors;
942
+ exports.consola = consola;
943
+ exports.createConsola = createConsola;
944
+ exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
945
+ exports.isUnicodeSupported = isUnicodeSupported;