rolldown 0.14.0 → 0.15.0-commit.1265c2c

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 (103) hide show
  1. package/dist/cjs/cli.cjs +960 -966
  2. package/dist/cjs/experimental-index.cjs +68 -26
  3. package/dist/cjs/index.cjs +6 -8
  4. package/dist/cjs/parallel-plugin-worker.cjs +20 -14
  5. package/dist/cjs/parallel-plugin.cjs +1 -3
  6. package/dist/esm/cli.mjs +914 -922
  7. package/dist/esm/experimental-index.mjs +44 -7
  8. package/dist/esm/index.mjs +2 -4
  9. package/dist/esm/parallel-plugin-worker.mjs +15 -10
  10. package/dist/esm/parallel-plugin.mjs +1 -3
  11. package/dist/shared/{chunk-JoMxl5V2.cjs → chunk-BFvIen8E.cjs} +13 -11
  12. package/dist/shared/{consola.36c0034f-HcmWcfPe.cjs → consola_36c0034f-B7L-radJ.cjs} +249 -295
  13. package/dist/shared/{consola.36c0034f-Xyw7SC_7.mjs → consola_36c0034f-D9ce-831.mjs} +221 -286
  14. package/dist/shared/{prompt-9Ij3R3TG.cjs → prompt-BiXtYIJ2.cjs} +157 -204
  15. package/dist/shared/{prompt-hoPhcrA-.mjs → prompt-DlQ-08lk.mjs} +125 -174
  16. package/dist/shared/src-BtX1cCkj.mjs +2851 -0
  17. package/dist/shared/src-Di4duR8G.cjs +2985 -0
  18. package/dist/tsconfig.dts.tsbuildinfo +1 -0
  19. package/dist/types/api/build.d.ts +16 -0
  20. package/dist/types/api/experimental.d.ts +7 -0
  21. package/dist/types/api/rolldown/index.d.ts +3 -0
  22. package/dist/types/api/rolldown/rolldown-build.d.ts +12 -0
  23. package/dist/types/api/watch/index.d.ts +3 -0
  24. package/dist/types/{watcher.d.ts → api/watch/watch-emitter.d.ts} +17 -17
  25. package/dist/types/api/watch/watcher.d.ts +13 -0
  26. package/dist/types/binding.d.ts +273 -49
  27. package/dist/types/builtin-plugin/alias-plugin.d.ts +10 -0
  28. package/dist/types/builtin-plugin/constructors.d.ts +16 -0
  29. package/dist/types/builtin-plugin/replace-plugin.d.ts +28 -0
  30. package/dist/types/{options/normalized-ecma-transform-plugin-config.d.ts → builtin-plugin/transform-plugin.d.ts} +2 -1
  31. package/dist/types/builtin-plugin/utils.d.ts +8 -0
  32. package/dist/types/cli/arguments/index.d.ts +5 -3
  33. package/dist/types/cli/arguments/normalize.d.ts +2 -6
  34. package/dist/types/cli/arguments/schema.d.ts +10 -309
  35. package/dist/types/cli/colors.d.ts +11 -1
  36. package/dist/types/cli/load-config.d.ts +3 -0
  37. package/dist/types/cli/logger.d.ts +5 -0
  38. package/dist/types/constants/plugin.d.ts +10 -1
  39. package/dist/types/experimental-index.d.ts +5 -2
  40. package/dist/types/index.d.ts +13 -10
  41. package/dist/types/log/logger.d.ts +2 -16
  42. package/dist/types/log/logging.d.ts +11 -8
  43. package/dist/types/log/logs.d.ts +3 -0
  44. package/dist/types/options/input-options-schema.d.ts +4 -0
  45. package/dist/types/options/input-options.d.ts +89 -430
  46. package/dist/types/options/normalized-input-options.d.ts +17 -11
  47. package/dist/types/options/normalized-output-options.d.ts +60 -21
  48. package/dist/types/options/output-options-schema.d.ts +3 -0
  49. package/dist/types/options/output-options.d.ts +73 -265
  50. package/dist/types/options/watch-options.d.ts +5 -0
  51. package/dist/types/plugin/bindingify-build-hooks.d.ts +9 -11
  52. package/dist/types/plugin/bindingify-hook-filter.d.ts +5 -5
  53. package/dist/types/plugin/bindingify-output-hooks.d.ts +13 -16
  54. package/dist/types/plugin/bindingify-plugin.d.ts +12 -3
  55. package/dist/types/plugin/bindingify-watch-hooks.d.ts +3 -5
  56. package/dist/types/plugin/hook-filter.d.ts +1 -1
  57. package/dist/types/plugin/index.d.ts +21 -18
  58. package/dist/types/plugin/minimal-plugin-context.d.ts +15 -0
  59. package/dist/types/plugin/plugin-context-data.d.ts +4 -4
  60. package/dist/types/plugin/plugin-context.d.ts +9 -4
  61. package/dist/types/plugin/plugin-driver.d.ts +4 -5
  62. package/dist/types/plugin/transform-plugin-context.d.ts +4 -3
  63. package/dist/types/rollup-types.d.ts +1 -1
  64. package/dist/types/rollup.d.ts +4 -0
  65. package/dist/types/treeshake/index.d.ts +0 -12
  66. package/dist/types/treeshake/module-side-effects.d.ts +14 -15
  67. package/dist/types/types/rolldown-output.d.ts +17 -2
  68. package/dist/types/types/utils.d.ts +1 -0
  69. package/dist/types/utils/bindingify-input-options.d.ts +7 -0
  70. package/dist/types/utils/bindingify-output-options.d.ts +3 -0
  71. package/dist/types/utils/create-bundler-option.d.ts +11 -0
  72. package/dist/types/utils/define-config.d.ts +3 -0
  73. package/dist/types/utils/error.d.ts +2 -0
  74. package/dist/types/utils/misc.d.ts +1 -0
  75. package/dist/types/utils/normalize-hook.d.ts +1 -1
  76. package/dist/types/utils/normalize-plugin-option.d.ts +8 -3
  77. package/dist/types/{options/utils.d.ts → utils/normalize-string-or-regex.d.ts} +1 -1
  78. package/dist/types/utils/transform-rendered-chunk.d.ts +4 -0
  79. package/dist/types/utils/transform-rendered-module.d.ts +3 -0
  80. package/dist/types/utils/transform-sourcemap.d.ts +2 -0
  81. package/dist/types/utils/transform-to-rollup-output.d.ts +1 -0
  82. package/dist/types/utils/zod-ext.d.ts +6 -5
  83. package/package.json +30 -22
  84. package/dist/shared/rolldown-binding.wasi.cjs +0 -187
  85. package/dist/shared/src_index-3pqhEViJ.cjs +0 -2785
  86. package/dist/shared/src_index-ywYMd4vB.mjs +0 -2786
  87. package/dist/shared/wasi-worker-browser.mjs +0 -39
  88. package/dist/shared/wasi-worker.mjs +0 -63
  89. package/dist/shared/watcher-worker.js +0 -1
  90. package/dist/types/cli/utils.d.ts +0 -6
  91. package/dist/types/constants/types.d.ts +0 -1
  92. package/dist/types/options/bindingify-input-options.d.ts +0 -4
  93. package/dist/types/options/bindingify-output-options.d.ts +0 -3
  94. package/dist/types/options/normalized-alias-plugin-config.d.ts +0 -8
  95. package/dist/types/options/watch-option.d.ts +0 -5
  96. package/dist/types/plugin/builtin-plugin.d.ts +0 -81
  97. package/dist/types/rolldown-build.d.ts +0 -10
  98. package/dist/types/rolldown.d.ts +0 -12
  99. package/dist/types/types/rendered-module.d.ts +0 -2
  100. package/dist/types/utils/normalize-input-options.d.ts +0 -3
  101. package/dist/types/utils/normalize-output-options.d.ts +0 -3
  102. package/dist/types/utils/normalize-tree-shake.d.ts +0 -3
  103. /package/dist/types/{utils/type-assert.d.ts → types/assert.d.ts} +0 -0
@@ -1,10 +1,9 @@
1
1
  "use strict";
2
-
3
- const { __toESM } = require("./chunk-JoMxl5V2.cjs");
4
- const { sep } = __toESM(require("node:path"));
5
- const { default: process$1 } = __toESM(require("node:process"));
6
- const { formatWithOptions } = __toESM(require("node:util"));
7
- const tty = __toESM(require("node:tty"));
2
+ const require_chunk = require('./chunk-BFvIen8E.cjs');
3
+ const node_path = require_chunk.__toESM(require("node:path"));
4
+ const node_process = require_chunk.__toESM(require("node:process"));
5
+ const node_util = require_chunk.__toESM(require("node:util"));
6
+ const node_tty = require_chunk.__toESM(require("node:tty"));
8
7
 
9
8
  //#region ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/core.mjs
10
9
  const LogLevels = {
@@ -24,47 +23,35 @@ const LogLevels = {
24
23
  verbose: Number.POSITIVE_INFINITY
25
24
  };
26
25
  const LogTypes = {
27
- silent: {level: -1},
28
- fatal: {level: LogLevels.fatal},
29
- error: {level: LogLevels.error},
30
- warn: {level: LogLevels.warn},
31
- log: {level: LogLevels.log},
32
- info: {level: LogLevels.info},
33
- success: {level: LogLevels.success},
34
- fail: {level: LogLevels.fail},
35
- ready: {level: LogLevels.info},
36
- start: {level: LogLevels.info},
37
- box: {level: LogLevels.info},
38
- debug: {level: LogLevels.debug},
39
- trace: {level: LogLevels.trace},
40
- verbose: {level: LogLevels.verbose}
26
+ silent: { level: -1 },
27
+ fatal: { level: LogLevels.fatal },
28
+ error: { level: LogLevels.error },
29
+ warn: { level: LogLevels.warn },
30
+ log: { level: LogLevels.log },
31
+ info: { level: LogLevels.info },
32
+ success: { level: LogLevels.success },
33
+ fail: { level: LogLevels.fail },
34
+ ready: { level: LogLevels.info },
35
+ start: { level: LogLevels.info },
36
+ box: { level: LogLevels.info },
37
+ debug: { level: LogLevels.debug },
38
+ trace: { level: LogLevels.trace },
39
+ verbose: { level: LogLevels.verbose }
41
40
  };
42
41
  function isObject(value) {
43
42
  return value !== null && typeof value === "object";
44
43
  }
45
44
  function _defu(baseObject, defaults, namespace = ".", merger) {
46
- if (!isObject(defaults)) {
47
- return _defu(baseObject, {}, namespace, merger);
48
- }
45
+ if (!isObject(defaults)) return _defu(baseObject, {}, namespace, merger);
49
46
  const object = Object.assign({}, defaults);
50
47
  for (const key in baseObject) {
51
- if (key === "__proto__" || key === "constructor") {
52
- continue;
53
- }
48
+ if (key === "__proto__" || key === "constructor") continue;
54
49
  const value = baseObject[key];
55
- if (value === null || value === void 0) {
56
- continue;
57
- }
58
- if (merger && merger(object, key, value, namespace)) {
59
- continue;
60
- }
61
- if (Array.isArray(value) && Array.isArray(object[key])) {
62
- object[key] = [...value, ...object[key]];
63
- } else if (isObject(value) && isObject(object[key])) {
64
- object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
65
- } else {
66
- object[key] = value;
67
- }
50
+ if (value === null || value === void 0) continue;
51
+ if (merger && merger(object, key, value, namespace)) continue;
52
+ if (Array.isArray(value) && Array.isArray(object[key])) object[key] = [...value, ...object[key]];
53
+ else if (isObject(value) && isObject(object[key])) object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
54
+ else object[key] = value;
68
55
  }
69
56
  return object;
70
57
  }
@@ -76,25 +63,19 @@ function isPlainObject(obj) {
76
63
  return Object.prototype.toString.call(obj) === "[object Object]";
77
64
  }
78
65
  function isLogObj(arg) {
79
- if (!isPlainObject(arg)) {
80
- return false;
81
- }
82
- if (!arg.message && !arg.args) {
83
- return false;
84
- }
85
- if (arg.stack) {
86
- return false;
87
- }
66
+ if (!isPlainObject(arg)) return false;
67
+ if (!arg.message && !arg.args) return false;
68
+ if (arg.stack) return false;
88
69
  return true;
89
70
  }
90
71
  let paused = false;
91
72
  const queue = [];
92
- class Consola {
73
+ var Consola = class Consola {
93
74
  constructor(options = {}) {
94
75
  const types = options.types || LogTypes;
95
76
  this.options = defu({
96
77
  ...options,
97
- defaults: {...options.defaults},
78
+ defaults: { ...options.defaults },
98
79
  level: _normalizeLogLevel(options.level, types),
99
80
  reporters: [...options.reporters || []]
100
81
  }, {
@@ -116,9 +97,7 @@ class Consola {
116
97
  this[type] = this._wrapLogFn(defaults);
117
98
  this[type].raw = this._wrapLogFn(defaults, true);
118
99
  }
119
- if (this.options.mockFn) {
120
- this.mockTypes();
121
- }
100
+ if (this.options.mockFn) this.mockTypes();
122
101
  this._lastLog = {};
123
102
  }
124
103
  get level() {
@@ -128,9 +107,7 @@ class Consola {
128
107
  this.options.level = _normalizeLogLevel(level, this.options.types, this.options.level);
129
108
  }
130
109
  prompt(message, opts) {
131
- if (!this.options.prompt) {
132
- throw new Error("prompt is not supported!");
133
- }
110
+ if (!this.options.prompt) throw new Error("prompt is not supported!");
134
111
  return this.options.prompt(message, opts);
135
112
  }
136
113
  create(options) {
@@ -138,9 +115,7 @@ class Consola {
138
115
  ...this.options,
139
116
  ...options
140
117
  });
141
- if (this._mockFn) {
142
- instance.mockTypes(this._mockFn);
143
- }
118
+ if (this._mockFn) instance.mockTypes(this._mockFn);
144
119
  return instance;
145
120
  }
146
121
  withDefaults(defaults) {
@@ -153,7 +128,7 @@ class Consola {
153
128
  });
154
129
  }
155
130
  withTag(tag) {
156
- return this.withDefaults({tag: this.options.defaults.tag ? this.options.defaults.tag + ":" + tag : tag});
131
+ return this.withDefaults({ tag: this.options.defaults.tag ? this.options.defaults.tag + ":" + tag : tag });
157
132
  }
158
133
  addReporter(reporter) {
159
134
  this.options.reporters.push(reporter);
@@ -162,12 +137,8 @@ class Consola {
162
137
  removeReporter(reporter) {
163
138
  if (reporter) {
164
139
  const i = this.options.reporters.indexOf(reporter);
165
- if (i >= 0) {
166
- return this.options.reporters.splice(i, 1);
167
- }
168
- } else {
169
- this.options.reporters.splice(0);
170
- }
140
+ if (i >= 0) return this.options.reporters.splice(i, 1);
141
+ } else this.options.reporters.splice(0);
171
142
  return this;
172
143
  }
173
144
  setReporters(reporters) {
@@ -184,18 +155,14 @@ class Consola {
184
155
  }
185
156
  wrapConsole() {
186
157
  for (const type in this.options.types) {
187
- if (!console["__" + type]) {
188
- console["__" + type] = console[type];
189
- }
158
+ if (!console["__" + type]) console["__" + type] = console[type];
190
159
  console[type] = this[type].raw;
191
160
  }
192
161
  }
193
162
  restoreConsole() {
194
- for (const type in this.options.types) {
195
- if (console["__" + type]) {
196
- console[type] = console["__" + type];
197
- delete console["__" + type];
198
- }
163
+ for (const type in this.options.types) if (console["__" + type]) {
164
+ console[type] = console["__" + type];
165
+ delete console["__" + type];
199
166
  }
200
167
  }
201
168
  wrapStd() {
@@ -203,14 +170,10 @@ class Consola {
203
170
  this._wrapStream(this.options.stderr, "log");
204
171
  }
205
172
  _wrapStream(stream, type) {
206
- if (!stream) {
207
- return;
208
- }
209
- if (!stream.__write) {
210
- stream.__write = stream.write;
211
- }
173
+ if (!stream) return;
174
+ if (!stream.__write) stream.__write = stream.write;
212
175
  stream.write = (data) => {
213
- this[type].raw((String(data)).trim());
176
+ this[type].raw(String(data).trim());
214
177
  };
215
178
  }
216
179
  restoreStd() {
@@ -218,9 +181,7 @@ class Consola {
218
181
  this._restoreStream(this.options.stderr);
219
182
  }
220
183
  _restoreStream(stream) {
221
- if (!stream) {
222
- return;
223
- }
184
+ if (!stream) return;
224
185
  if (stream.__write) {
225
186
  stream.write = stream.__write;
226
187
  delete stream.__write;
@@ -232,16 +193,12 @@ class Consola {
232
193
  resumeLogs() {
233
194
  paused = false;
234
195
  const _queue = queue.splice(0);
235
- for (const item of _queue) {
236
- item[0]._logFn(item[1], item[2]);
237
- }
196
+ for (const item of _queue) item[0]._logFn(item[1], item[2]);
238
197
  }
239
198
  mockTypes(mockFn) {
240
199
  const _mockFn = mockFn || this.options.mockFn;
241
200
  this._mockFn = _mockFn;
242
- if (typeof _mockFn !== "function") {
243
- return;
244
- }
201
+ if (typeof _mockFn !== "function") return;
245
202
  for (const type in this.options.types) {
246
203
  this[type] = _mockFn(type, this.options.types[type]) || this[type];
247
204
  this[type].raw = this[type];
@@ -250,35 +207,33 @@ class Consola {
250
207
  _wrapLogFn(defaults, isRaw) {
251
208
  return (...args) => {
252
209
  if (paused) {
253
- queue.push([this, defaults, args, isRaw]);
210
+ queue.push([
211
+ this,
212
+ defaults,
213
+ args,
214
+ isRaw
215
+ ]);
254
216
  return;
255
217
  }
256
218
  return this._logFn(defaults, args, isRaw);
257
219
  };
258
220
  }
259
221
  _logFn(defaults, args, isRaw) {
260
- if ((defaults.level || 0) > this.level) {
261
- return false;
262
- }
222
+ if ((defaults.level || 0) > this.level) return false;
263
223
  const logObj = {
264
224
  date: /* @__PURE__ */ new Date(),
265
225
  args: [],
266
226
  ...defaults,
267
227
  level: _normalizeLogLevel(defaults.level, this.options.types)
268
228
  };
269
- if (!isRaw && args.length === 1 && isLogObj(args[0])) {
270
- Object.assign(logObj, args[0]);
271
- } else {
272
- logObj.args = [...args];
273
- }
229
+ if (!isRaw && args.length === 1 && isLogObj(args[0])) Object.assign(logObj, args[0]);
230
+ else logObj.args = [...args];
274
231
  if (logObj.message) {
275
232
  logObj.args.unshift(logObj.message);
276
233
  delete logObj.message;
277
234
  }
278
235
  if (logObj.additional) {
279
- if (!Array.isArray(logObj.additional)) {
280
- logObj.additional = logObj.additional.split("\n");
281
- }
236
+ if (!Array.isArray(logObj.additional)) logObj.additional = logObj.additional.split("\n");
282
237
  logObj.args.push("\n" + logObj.additional.join("\n"));
283
238
  delete logObj.additional;
284
239
  }
@@ -288,9 +243,7 @@ class Consola {
288
243
  const repeated = (this._lastLog.count || 0) - this.options.throttleMin;
289
244
  if (this._lastLog.object && repeated > 0) {
290
245
  const args2 = [...this._lastLog.object.args];
291
- if (repeated > 1) {
292
- args2.push(`(repeated ${repeated} times)`);
293
- }
246
+ if (repeated > 1) args2.push(`(repeated ${repeated} times)`);
294
247
  this._log({
295
248
  ...this._lastLog.object,
296
249
  args: args2
@@ -305,38 +258,32 @@ class Consola {
305
258
  clearTimeout(this._lastLog.timeout);
306
259
  const diffTime = this._lastLog.time && logObj.date ? logObj.date.getTime() - this._lastLog.time.getTime() : 0;
307
260
  this._lastLog.time = logObj.date;
308
- if (diffTime < this.options.throttle) {
309
- try {
310
- const serializedLog = JSON.stringify([logObj.type, logObj.tag, logObj.args]);
311
- const isSameLog = this._lastLog.serialized === serializedLog;
312
- this._lastLog.serialized = serializedLog;
313
- if (isSameLog) {
314
- this._lastLog.count = (this._lastLog.count || 0) + 1;
315
- if (this._lastLog.count > this.options.throttleMin) {
316
- this._lastLog.timeout = setTimeout(resolveLog, this.options.throttle);
317
- return;
318
- }
261
+ if (diffTime < this.options.throttle) try {
262
+ const serializedLog = JSON.stringify([
263
+ logObj.type,
264
+ logObj.tag,
265
+ logObj.args
266
+ ]);
267
+ const isSameLog = this._lastLog.serialized === serializedLog;
268
+ this._lastLog.serialized = serializedLog;
269
+ if (isSameLog) {
270
+ this._lastLog.count = (this._lastLog.count || 0) + 1;
271
+ if (this._lastLog.count > this.options.throttleMin) {
272
+ this._lastLog.timeout = setTimeout(resolveLog, this.options.throttle);
273
+ return;
319
274
  }
320
- } catch {}
321
- }
275
+ }
276
+ } catch {}
322
277
  resolveLog(true);
323
278
  }
324
279
  _log(logObj) {
325
- for (const reporter of this.options.reporters) {
326
- reporter.log(logObj, {options: this.options});
327
- }
280
+ for (const reporter of this.options.reporters) reporter.log(logObj, { options: this.options });
328
281
  }
329
- }
282
+ };
330
283
  function _normalizeLogLevel(input, types = {}, defaultLevel = 3) {
331
- if (input === void 0) {
332
- return defaultLevel;
333
- }
334
- if (typeof input === "number") {
335
- return input;
336
- }
337
- if (types[input] && types[input].level !== void 0) {
338
- return types[input].level;
339
- }
284
+ if (input === void 0) return defaultLevel;
285
+ if (typeof input === "number") return input;
286
+ if (types[input] && types[input].level !== void 0) return types[input].level;
340
287
  return defaultLevel;
341
288
  }
342
289
  Consola.prototype.add = Consola.prototype.addReporter;
@@ -353,8 +300,8 @@ function createConsola$1(options = {}) {
353
300
  //#endregion
354
301
  //#region ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/shared/consola.06ad8a64.mjs
355
302
  function parseStack(stack) {
356
- const cwd = process.cwd() + sep;
357
- const lines = ((stack.split("\n")).splice(1)).map((l) => ((l.trim()).replace("file://", "")).replace(cwd, ""));
303
+ const cwd = process.cwd() + node_path.sep;
304
+ const lines = stack.split("\n").splice(1).map((l) => l.trim().replace("file://", "").replace(cwd, ""));
358
305
  return lines;
359
306
  }
360
307
  function writeStream(data, stream) {
@@ -362,31 +309,35 @@ function writeStream(data, stream) {
362
309
  return write.call(stream, data);
363
310
  }
364
311
  const bracket = (x) => x ? `[${x}]` : "";
365
- class BasicReporter {
312
+ var BasicReporter = class {
366
313
  formatStack(stack, opts) {
367
- return " " + (parseStack(stack)).join("\n ");
314
+ return " " + parseStack(stack).join("\n ");
368
315
  }
369
316
  formatArgs(args, opts) {
370
317
  const _args = args.map((arg) => {
371
- if (arg && typeof arg.stack === "string") {
372
- return arg.message + "\n" + this.formatStack(arg.stack, opts);
373
- }
318
+ if (arg && typeof arg.stack === "string") return arg.message + "\n" + this.formatStack(arg.stack, opts);
374
319
  return arg;
375
320
  });
376
- return formatWithOptions(opts, ..._args);
321
+ return (0, node_util.formatWithOptions)(opts, ..._args);
377
322
  }
378
323
  formatDate(date, opts) {
379
324
  return opts.date ? date.toLocaleTimeString() : "";
380
325
  }
381
326
  filterAndJoin(arr) {
382
- return (arr.filter(Boolean)).join(" ");
327
+ return arr.filter(Boolean).join(" ");
383
328
  }
384
329
  formatLogObj(logObj, opts) {
385
330
  const message = this.formatArgs(logObj.args, opts);
386
- if (logObj.type === "box") {
387
- return "\n" + (([bracket(logObj.tag), logObj.title && logObj.title, ...message.split("\n")].filter(Boolean)).map((l) => " > " + l)).join("\n") + "\n";
388
- }
389
- return this.filterAndJoin([bracket(logObj.type), bracket(logObj.tag), message]);
331
+ if (logObj.type === "box") return "\n" + [
332
+ bracket(logObj.tag),
333
+ logObj.title && logObj.title,
334
+ ...message.split("\n")
335
+ ].filter(Boolean).map((l) => " > " + l).join("\n") + "\n";
336
+ return this.filterAndJoin([
337
+ bracket(logObj.type),
338
+ bracket(logObj.tag),
339
+ message
340
+ ]);
390
341
  }
391
342
  log(logObj, ctx) {
392
343
  const line = this.formatLogObj(logObj, {
@@ -395,17 +346,17 @@ class BasicReporter {
395
346
  });
396
347
  return writeStream(line + "\n", logObj.level < 2 ? ctx.options.stderr || process.stderr : ctx.options.stdout || process.stdout);
397
348
  }
398
- }
349
+ };
399
350
 
400
351
  //#endregion
401
352
  //#region ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/utils.mjs
402
- const { env: env = {}, argv: argv = [], platform: platform = "" } = typeof process === "undefined" ? {} : process;
403
- const isDisabled = "NO_COLOR"in env || argv.includes("--no-color");
404
- const isForced = "FORCE_COLOR"in env || argv.includes("--color");
353
+ const { env = {}, argv = [], platform = "" } = typeof process === "undefined" ? {} : process;
354
+ const isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
355
+ const isForced = "FORCE_COLOR" in env || argv.includes("--color");
405
356
  const isWindows = platform === "win32";
406
357
  const isDumbTerminal = env.TERM === "dumb";
407
- const isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;
408
- const isCI$1 = "CI"in env && ("GITHUB_ACTIONS"in env || "GITLAB_CI"in env || "CIRCLECI"in env);
358
+ const isCompatibleTerminal = node_tty && node_tty.isatty && node_tty.isatty(1) && env.TERM && !isDumbTerminal;
359
+ const isCI$1 = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
409
360
  const isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI$1);
410
361
  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)) {
411
362
  return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
@@ -463,7 +414,7 @@ const colorDefs = {
463
414
  bgWhiteBright: init(107, 49)
464
415
  };
465
416
  function createColors(useColor = isColorSupported) {
466
- return useColor ? colorDefs : Object.fromEntries((Object.keys(colorDefs)).map((key) => [key, String]));
417
+ return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
467
418
  }
468
419
  const colors = createColors();
469
420
  function getColor$1(color, fallback = "reset") {
@@ -559,64 +510,103 @@ function box(text, _opts = {}) {
559
510
  const textLines = text.split("\n");
560
511
  const boxLines = [];
561
512
  const _color = getColor$1(opts.style.borderColor);
562
- const borderStyle = {...typeof opts.style.borderStyle === "string" ? boxStylePresets[opts.style.borderStyle] || boxStylePresets.solid : opts.style.borderStyle};
563
- if (_color) {
564
- for (const key in borderStyle) {
565
- borderStyle[key] = _color(borderStyle[key]);
566
- }
567
- }
513
+ const borderStyle = { ...typeof opts.style.borderStyle === "string" ? boxStylePresets[opts.style.borderStyle] || boxStylePresets.solid : opts.style.borderStyle };
514
+ if (_color) for (const key in borderStyle) borderStyle[key] = _color(borderStyle[key]);
568
515
  const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;
569
516
  const height = textLines.length + paddingOffset;
570
517
  const width = Math.max(...textLines.map((line) => line.length)) + paddingOffset;
571
518
  const widthOffset = width + paddingOffset;
572
519
  const leftSpace = opts.style.marginLeft > 0 ? " ".repeat(opts.style.marginLeft) : "";
573
- if (opts.style.marginTop > 0) {
574
- boxLines.push("".repeat(opts.style.marginTop));
575
- }
520
+ if (opts.style.marginTop > 0) boxLines.push("".repeat(opts.style.marginTop));
576
521
  if (opts.title) {
577
- const left = borderStyle.h.repeat(Math.floor((width - (stripAnsi$1(opts.title)).length) / 2));
578
- const right = borderStyle.h.repeat(width - (stripAnsi$1(opts.title)).length - (stripAnsi$1(left)).length + paddingOffset);
522
+ const left = borderStyle.h.repeat(Math.floor((width - stripAnsi$1(opts.title).length) / 2));
523
+ const right = borderStyle.h.repeat(width - stripAnsi$1(opts.title).length - stripAnsi$1(left).length + paddingOffset);
579
524
  boxLines.push(`${leftSpace}${borderStyle.tl}${left}${opts.title}${right}${borderStyle.tr}`);
580
- } else {
581
- boxLines.push(`${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`);
582
- }
525
+ } else boxLines.push(`${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`);
583
526
  const valignOffset = opts.style.valign === "center" ? Math.floor((height - textLines.length) / 2) : opts.style.valign === "top" ? height - textLines.length - paddingOffset : height - textLines.length;
584
- for (let i = 0; i < height; i++) {
585
- if (i < valignOffset || i >= valignOffset + textLines.length) {
586
- boxLines.push(`${leftSpace}${borderStyle.v}${" ".repeat(widthOffset)}${borderStyle.v}`);
587
- } else {
588
- const line = textLines[i - valignOffset];
589
- const left = " ".repeat(paddingOffset);
590
- const right = " ".repeat(width - (stripAnsi$1(line)).length);
591
- boxLines.push(`${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`);
592
- }
527
+ for (let i = 0; i < height; i++) if (i < valignOffset || i >= valignOffset + textLines.length) boxLines.push(`${leftSpace}${borderStyle.v}${" ".repeat(widthOffset)}${borderStyle.v}`);
528
+ else {
529
+ const line = textLines[i - valignOffset];
530
+ const left = " ".repeat(paddingOffset);
531
+ const right = " ".repeat(width - stripAnsi$1(line).length);
532
+ boxLines.push(`${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`);
593
533
  }
594
534
  boxLines.push(`${leftSpace}${borderStyle.bl}${borderStyle.h.repeat(widthOffset)}${borderStyle.br}`);
595
- if (opts.style.marginBottom > 0) {
596
- boxLines.push("".repeat(opts.style.marginBottom));
597
- }
535
+ if (opts.style.marginBottom > 0) boxLines.push("".repeat(opts.style.marginBottom));
598
536
  return boxLines.join("\n");
599
537
  }
600
538
 
601
539
  //#endregion
602
540
  //#region ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/shared/consola.36c0034f.mjs
603
- 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", {ci: true}], ["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", {ci: false}], ["NEVERCODE"], ["RENDER"], ["SAIL", "SAILCI"], ["SEMAPHORE"], ["SCREWDRIVER"], ["SHIPPABLE"], ["SOLANO", "TDDIUM"], ["STRIDER"], ["TEAMCITY", "TEAMCITY_VERSION"], ["TRAVIS"], ["VERCEL", "NOW_BUILDER"], ["APPCENTER", "APPCENTER_BUILD_ID"], ["CODESANDBOX", "CODESANDBOX_SSE", {ci: false}], ["STACKBLITZ"], ["STORMKIT"], ["CLEAVR"]];
541
+ const providers = [
542
+ ["APPVEYOR"],
543
+ ["AZURE_PIPELINES", "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],
544
+ ["AZURE_STATIC", "INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],
545
+ ["APPCIRCLE", "AC_APPCIRCLE"],
546
+ ["BAMBOO", "bamboo_planKey"],
547
+ ["BITBUCKET", "BITBUCKET_COMMIT"],
548
+ ["BITRISE", "BITRISE_IO"],
549
+ ["BUDDY", "BUDDY_WORKSPACE_ID"],
550
+ ["BUILDKITE"],
551
+ ["CIRCLE", "CIRCLECI"],
552
+ ["CIRRUS", "CIRRUS_CI"],
553
+ [
554
+ "CLOUDFLARE_PAGES",
555
+ "CF_PAGES",
556
+ { ci: true }
557
+ ],
558
+ ["CODEBUILD", "CODEBUILD_BUILD_ARN"],
559
+ ["CODEFRESH", "CF_BUILD_ID"],
560
+ ["DRONE"],
561
+ ["DRONE", "DRONE_BUILD_EVENT"],
562
+ ["DSARI"],
563
+ ["GITHUB_ACTIONS"],
564
+ ["GITLAB", "GITLAB_CI"],
565
+ ["GITLAB", "CI_MERGE_REQUEST_ID"],
566
+ ["GOCD", "GO_PIPELINE_LABEL"],
567
+ ["LAYERCI"],
568
+ ["HUDSON", "HUDSON_URL"],
569
+ ["JENKINS", "JENKINS_URL"],
570
+ ["MAGNUM"],
571
+ ["NETLIFY"],
572
+ [
573
+ "NETLIFY",
574
+ "NETLIFY_LOCAL",
575
+ { ci: false }
576
+ ],
577
+ ["NEVERCODE"],
578
+ ["RENDER"],
579
+ ["SAIL", "SAILCI"],
580
+ ["SEMAPHORE"],
581
+ ["SCREWDRIVER"],
582
+ ["SHIPPABLE"],
583
+ ["SOLANO", "TDDIUM"],
584
+ ["STRIDER"],
585
+ ["TEAMCITY", "TEAMCITY_VERSION"],
586
+ ["TRAVIS"],
587
+ ["VERCEL", "NOW_BUILDER"],
588
+ ["APPCENTER", "APPCENTER_BUILD_ID"],
589
+ [
590
+ "CODESANDBOX",
591
+ "CODESANDBOX_SSE",
592
+ { ci: false }
593
+ ],
594
+ ["STACKBLITZ"],
595
+ ["STORMKIT"],
596
+ ["CLEAVR"]
597
+ ];
604
598
  function detectProvider(env$1) {
605
599
  for (const provider of providers) {
606
600
  const envName = provider[1] || provider[0];
607
- if (env$1[envName]) {
608
- return {
609
- name: provider[0].toLowerCase(),
610
- ...provider[2]
611
- };
612
- }
613
- }
614
- if (env$1.SHELL && env$1.SHELL === "/bin/jsh") {
615
- return {
616
- name: "stackblitz",
617
- ci: false
601
+ if (env$1[envName]) return {
602
+ name: provider[0].toLowerCase(),
603
+ ...provider[2]
618
604
  };
619
605
  }
606
+ if (env$1.SHELL && env$1.SHELL === "/bin/jsh") return {
607
+ name: "stackblitz",
608
+ ci: false
609
+ };
620
610
  return {
621
611
  name: "",
622
612
  ci: false
@@ -636,60 +626,43 @@ toBoolean(envShim.MINIMAL) || isCI || isTest || !hasTTY;
636
626
  function toBoolean(val) {
637
627
  return val ? val !== "false" : false;
638
628
  }
639
- function ansiRegex({ onlyFirst: onlyFirst = false } = {}) {
629
+ function ansiRegex({ onlyFirst = false } = {}) {
640
630
  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("|");
641
631
  return new RegExp(pattern, onlyFirst ? undefined : "g");
642
632
  }
643
633
  const regex = ansiRegex();
644
634
  function stripAnsi(string) {
645
- if (typeof string !== "string") {
646
- throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
647
- }
635
+ if (typeof string !== "string") throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
648
636
  return string.replace(regex, "");
649
637
  }
650
638
  function getDefaultExportFromCjs(x) {
651
639
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
652
640
  }
653
- var eastasianwidth = {exports: {}};
654
- (function(module) {
641
+ var eastasianwidth = { exports: {} };
642
+ (function(module$1) {
655
643
  var eaw = {};
656
- {
657
- module.exports = eaw;
658
- }
644
+ module$1.exports = eaw;
659
645
  eaw.eastAsianWidth = function(character) {
660
646
  var x = character.charCodeAt(0);
661
647
  var y = character.length == 2 ? character.charCodeAt(1) : 0;
662
648
  var codePoint = x;
663
- if (0xD800 <= x && x <= 0xDBFF && 0xDC00 <= y && y <= 0xDFFF) {
664
- x &= 0x3FF;
665
- y &= 0x3FF;
649
+ if (55296 <= x && x <= 56319 && 56320 <= y && y <= 57343) {
650
+ x &= 1023;
651
+ y &= 1023;
666
652
  codePoint = x << 10 | y;
667
- codePoint += 0x10000;
668
- }
669
- if (0x3000 == codePoint || 0xFF01 <= codePoint && codePoint <= 0xFF60 || 0xFFE0 <= codePoint && codePoint <= 0xFFE6) {
670
- return "F";
671
- }
672
- 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) {
673
- return "H";
674
- }
675
- 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) {
676
- return "W";
677
- }
678
- 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) {
679
- return "Na";
680
- }
681
- 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) {
682
- return "A";
653
+ codePoint += 65536;
683
654
  }
655
+ if (12288 == codePoint || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510) return "F";
656
+ if (8361 == codePoint || 65377 <= codePoint && codePoint <= 65470 || 65474 <= codePoint && codePoint <= 65479 || 65482 <= codePoint && codePoint <= 65487 || 65490 <= codePoint && codePoint <= 65495 || 65498 <= codePoint && codePoint <= 65500 || 65512 <= codePoint && codePoint <= 65518) return "H";
657
+ if (4352 <= codePoint && codePoint <= 4447 || 4515 <= codePoint && codePoint <= 4519 || 4602 <= codePoint && codePoint <= 4607 || 9001 <= codePoint && codePoint <= 9002 || 11904 <= codePoint && codePoint <= 11929 || 11931 <= codePoint && codePoint <= 12019 || 12032 <= codePoint && codePoint <= 12245 || 12272 <= codePoint && codePoint <= 12283 || 12289 <= codePoint && codePoint <= 12350 || 12353 <= codePoint && codePoint <= 12438 || 12441 <= codePoint && codePoint <= 12543 || 12549 <= codePoint && codePoint <= 12589 || 12593 <= codePoint && codePoint <= 12686 || 12688 <= codePoint && codePoint <= 12730 || 12736 <= codePoint && codePoint <= 12771 || 12784 <= codePoint && codePoint <= 12830 || 12832 <= codePoint && codePoint <= 12871 || 12880 <= codePoint && codePoint <= 13054 || 13056 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42124 || 42128 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 55216 <= codePoint && codePoint <= 55238 || 55243 <= codePoint && codePoint <= 55291 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65106 || 65108 <= codePoint && codePoint <= 65126 || 65128 <= codePoint && codePoint <= 65131 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127490 || 127504 <= codePoint && codePoint <= 127546 || 127552 <= codePoint && codePoint <= 127560 || 127568 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 194367 || 177984 <= codePoint && codePoint <= 196605 || 196608 <= codePoint && codePoint <= 262141) return "W";
658
+ if (32 <= codePoint && codePoint <= 126 || 162 <= codePoint && codePoint <= 163 || 165 <= codePoint && codePoint <= 166 || 172 == codePoint || 175 == codePoint || 10214 <= codePoint && codePoint <= 10221 || 10629 <= codePoint && codePoint <= 10630) return "Na";
659
+ if (161 == codePoint || 164 == codePoint || 167 <= codePoint && codePoint <= 168 || 170 == codePoint || 173 <= codePoint && codePoint <= 174 || 176 <= codePoint && codePoint <= 180 || 182 <= codePoint && codePoint <= 186 || 188 <= codePoint && codePoint <= 191 || 198 == codePoint || 208 == codePoint || 215 <= codePoint && codePoint <= 216 || 222 <= codePoint && codePoint <= 225 || 230 == codePoint || 232 <= codePoint && codePoint <= 234 || 236 <= codePoint && codePoint <= 237 || 240 == codePoint || 242 <= codePoint && codePoint <= 243 || 247 <= codePoint && codePoint <= 250 || 252 == codePoint || 254 == codePoint || 257 == codePoint || 273 == codePoint || 275 == codePoint || 283 == codePoint || 294 <= codePoint && codePoint <= 295 || 299 == codePoint || 305 <= codePoint && codePoint <= 307 || 312 == codePoint || 319 <= codePoint && codePoint <= 322 || 324 == codePoint || 328 <= codePoint && codePoint <= 331 || 333 == codePoint || 338 <= codePoint && codePoint <= 339 || 358 <= codePoint && codePoint <= 359 || 363 == codePoint || 462 == codePoint || 464 == codePoint || 466 == codePoint || 468 == codePoint || 470 == codePoint || 472 == codePoint || 474 == codePoint || 476 == codePoint || 593 == codePoint || 609 == codePoint || 708 == codePoint || 711 == codePoint || 713 <= codePoint && codePoint <= 715 || 717 == codePoint || 720 == codePoint || 728 <= codePoint && codePoint <= 731 || 733 == codePoint || 735 == codePoint || 768 <= codePoint && codePoint <= 879 || 913 <= codePoint && codePoint <= 929 || 931 <= codePoint && codePoint <= 937 || 945 <= codePoint && codePoint <= 961 || 963 <= codePoint && codePoint <= 969 || 1025 == codePoint || 1040 <= codePoint && codePoint <= 1103 || 1105 == codePoint || 8208 == codePoint || 8211 <= codePoint && codePoint <= 8214 || 8216 <= codePoint && codePoint <= 8217 || 8220 <= codePoint && codePoint <= 8221 || 8224 <= codePoint && codePoint <= 8226 || 8228 <= codePoint && codePoint <= 8231 || 8240 == codePoint || 8242 <= codePoint && codePoint <= 8243 || 8245 == codePoint || 8251 == codePoint || 8254 == codePoint || 8308 == codePoint || 8319 == codePoint || 8321 <= codePoint && codePoint <= 8324 || 8364 == codePoint || 8451 == codePoint || 8453 == codePoint || 8457 == codePoint || 8467 == codePoint || 8470 == codePoint || 8481 <= codePoint && codePoint <= 8482 || 8486 == codePoint || 8491 == codePoint || 8531 <= codePoint && codePoint <= 8532 || 8539 <= codePoint && codePoint <= 8542 || 8544 <= codePoint && codePoint <= 8555 || 8560 <= codePoint && codePoint <= 8569 || 8585 == codePoint || 8592 <= codePoint && codePoint <= 8601 || 8632 <= codePoint && codePoint <= 8633 || 8658 == codePoint || 8660 == codePoint || 8679 == codePoint || 8704 == codePoint || 8706 <= codePoint && codePoint <= 8707 || 8711 <= codePoint && codePoint <= 8712 || 8715 == codePoint || 8719 == codePoint || 8721 == codePoint || 8725 == codePoint || 8730 == codePoint || 8733 <= codePoint && codePoint <= 8736 || 8739 == codePoint || 8741 == codePoint || 8743 <= codePoint && codePoint <= 8748 || 8750 == codePoint || 8756 <= codePoint && codePoint <= 8759 || 8764 <= codePoint && codePoint <= 8765 || 8776 == codePoint || 8780 == codePoint || 8786 == codePoint || 8800 <= codePoint && codePoint <= 8801 || 8804 <= codePoint && codePoint <= 8807 || 8810 <= codePoint && codePoint <= 8811 || 8814 <= codePoint && codePoint <= 8815 || 8834 <= codePoint && codePoint <= 8835 || 8838 <= codePoint && codePoint <= 8839 || 8853 == codePoint || 8857 == codePoint || 8869 == codePoint || 8895 == codePoint || 8978 == codePoint || 9312 <= codePoint && codePoint <= 9449 || 9451 <= codePoint && codePoint <= 9547 || 9552 <= codePoint && codePoint <= 9587 || 9600 <= codePoint && codePoint <= 9615 || 9618 <= codePoint && codePoint <= 9621 || 9632 <= codePoint && codePoint <= 9633 || 9635 <= codePoint && codePoint <= 9641 || 9650 <= codePoint && codePoint <= 9651 || 9654 <= codePoint && codePoint <= 9655 || 9660 <= codePoint && codePoint <= 9661 || 9664 <= codePoint && codePoint <= 9665 || 9670 <= codePoint && codePoint <= 9672 || 9675 == codePoint || 9678 <= codePoint && codePoint <= 9681 || 9698 <= codePoint && codePoint <= 9701 || 9711 == codePoint || 9733 <= codePoint && codePoint <= 9734 || 9737 == codePoint || 9742 <= codePoint && codePoint <= 9743 || 9748 <= codePoint && codePoint <= 9749 || 9756 == codePoint || 9758 == codePoint || 9792 == codePoint || 9794 == codePoint || 9824 <= codePoint && codePoint <= 9825 || 9827 <= codePoint && codePoint <= 9829 || 9831 <= codePoint && codePoint <= 9834 || 9836 <= codePoint && codePoint <= 9837 || 9839 == codePoint || 9886 <= codePoint && codePoint <= 9887 || 9918 <= codePoint && codePoint <= 9919 || 9924 <= codePoint && codePoint <= 9933 || 9935 <= codePoint && codePoint <= 9953 || 9955 == codePoint || 9960 <= codePoint && codePoint <= 9983 || 10045 == codePoint || 10071 == codePoint || 10102 <= codePoint && codePoint <= 10111 || 11093 <= codePoint && codePoint <= 11097 || 12872 <= codePoint && codePoint <= 12879 || 57344 <= codePoint && codePoint <= 63743 || 65024 <= codePoint && codePoint <= 65039 || 65533 == codePoint || 127232 <= codePoint && codePoint <= 127242 || 127248 <= codePoint && codePoint <= 127277 || 127280 <= codePoint && codePoint <= 127337 || 127344 <= codePoint && codePoint <= 127386 || 917760 <= codePoint && codePoint <= 917999 || 983040 <= codePoint && codePoint <= 1048573 || 1048576 <= codePoint && codePoint <= 1114109) return "A";
684
660
  return "N";
685
661
  };
686
662
  eaw.characterLength = function(character) {
687
663
  var code = this.eastAsianWidth(character);
688
- if (code == "F" || code == "W" || code == "A") {
689
- return 2;
690
- } else {
691
- return 1;
692
- }
664
+ if (code == "F" || code == "W" || code == "A") return 2;
665
+ else return 1;
693
666
  };
694
667
  function stringToArray(string) {
695
668
  return string.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
@@ -697,34 +670,23 @@ var eastasianwidth = {exports: {}};
697
670
  eaw.length = function(string) {
698
671
  var characters = stringToArray(string);
699
672
  var len = 0;
700
- for (var i = 0; i < characters.length; i++) {
701
- len = len + this.characterLength(characters[i]);
702
- }
673
+ for (var i = 0; i < characters.length; i++) len = len + this.characterLength(characters[i]);
703
674
  return len;
704
675
  };
705
676
  eaw.slice = function(text, start, end) {
706
677
  textLen = eaw.length(text);
707
678
  start = start ? start : 0;
708
679
  end = end ? end : 1;
709
- if (start < 0) {
710
- start = textLen + start;
711
- }
712
- if (end < 0) {
713
- end = textLen + end;
714
- }
680
+ if (start < 0) start = textLen + start;
681
+ if (end < 0) end = textLen + end;
715
682
  var result = "";
716
683
  var eawLen = 0;
717
684
  var chars = stringToArray(text);
718
685
  for (var i = 0; i < chars.length; i++) {
719
686
  var char = chars[i];
720
687
  var charLen = eaw.length(char);
721
- if (eawLen >= start - (charLen == 2 ? 1 : 0)) {
722
- if (eawLen + charLen <= end) {
723
- result += char;
724
- } else {
725
- break;
726
- }
727
- }
688
+ if (eawLen >= start - (charLen == 2 ? 1 : 0)) if (eawLen + charLen <= end) result += char;
689
+ else break;
728
690
  eawLen += charLen;
729
691
  }
730
692
  return result;
@@ -736,31 +698,21 @@ const emojiRegex = () => {
736
698
  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;
737
699
  };
738
700
  function stringWidth$1(string, options) {
739
- if (typeof string !== "string" || string.length === 0) {
740
- return 0;
741
- }
701
+ if (typeof string !== "string" || string.length === 0) return 0;
742
702
  options = {
743
703
  ambiguousIsNarrow: true,
744
704
  countAnsiEscapeCodes: false,
745
705
  ...options
746
706
  };
747
- if (!options.countAnsiEscapeCodes) {
748
- string = stripAnsi(string);
749
- }
750
- if (string.length === 0) {
751
- return 0;
752
- }
707
+ if (!options.countAnsiEscapeCodes) string = stripAnsi(string);
708
+ if (string.length === 0) return 0;
753
709
  const ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2;
754
710
  let width = 0;
755
- for (const { segment: character } of (new Intl.Segmenter()).segment(string)) {
711
+ for (const { segment: character } of new Intl.Segmenter().segment(string)) {
756
712
  const codePoint = character.codePointAt(0);
757
- if (codePoint <= 0x1F || codePoint >= 0x7F && codePoint <= 0x9F) {
758
- continue;
759
- }
760
- if (codePoint >= 0x3_00 && codePoint <= 0x3_6F) {
761
- continue;
762
- }
763
- if ((emojiRegex()).test(character)) {
713
+ if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) continue;
714
+ if (codePoint >= 768 && codePoint <= 879) continue;
715
+ if (emojiRegex().test(character)) {
764
716
  width += 2;
765
717
  continue;
766
718
  }
@@ -775,18 +727,14 @@ function stringWidth$1(string, options) {
775
727
  width += ambiguousCharacterWidth;
776
728
  break;
777
729
  }
778
- default: {
779
- width += 1;
780
- }
730
+ default: width += 1;
781
731
  }
782
732
  }
783
733
  return width;
784
734
  }
785
735
  function isUnicodeSupported() {
786
- if (process$1.platform !== "win32") {
787
- return process$1.env.TERM !== "linux";
788
- }
789
- 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";
736
+ if (node_process.default.platform !== "win32") return node_process.default.env.TERM !== "linux";
737
+ return Boolean(node_process.default.env.CI) || Boolean(node_process.default.env.WT_SESSION) || Boolean(node_process.default.env.TERMINUS_SUBLIME) || node_process.default.env.ConEmuTask === "{cmd::Cmder}" || node_process.default.env.TERM_PROGRAM === "Terminus-Sublime" || node_process.default.env.TERM_PROGRAM === "vscode" || node_process.default.env.TERM === "xterm-256color" || node_process.default.env.TERM === "alacritty" || node_process.default.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
790
738
  }
791
739
  const TYPE_COLOR_MAP = {
792
740
  info: "cyan",
@@ -815,31 +763,25 @@ const TYPE_ICONS = {
815
763
  log: ""
816
764
  };
817
765
  function stringWidth(str) {
818
- if (!Intl.Segmenter) {
819
- return (stripAnsi$1(str)).length;
820
- }
766
+ if (!Intl.Segmenter) return stripAnsi$1(str).length;
821
767
  return stringWidth$1(str);
822
768
  }
823
- class FancyReporter extends BasicReporter {
769
+ var FancyReporter = class extends BasicReporter {
824
770
  formatStack(stack) {
825
- return "\n" + ((parseStack(stack)).map((line) => " " + (line.replace(/^at +/, (m) => colors.gray(m))).replace(/\((.+)\)/, (_, m) => `(${colors.cyan(m)})`))).join("\n");
771
+ return "\n" + parseStack(stack).map((line) => " " + line.replace(/^at +/, (m) => colors.gray(m)).replace(/\((.+)\)/, (_, m) => `(${colors.cyan(m)})`)).join("\n");
826
772
  }
827
773
  formatType(logObj, isBadge, opts) {
828
774
  const typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || "gray";
829
- if (isBadge) {
830
- return getBgColor(typeColor)(colors.black(` ${logObj.type.toUpperCase()} `));
831
- }
775
+ if (isBadge) return getBgColor(typeColor)(colors.black(` ${logObj.type.toUpperCase()} `));
832
776
  const _type = typeof TYPE_ICONS[logObj.type] === "string" ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type;
833
777
  return _type ? getColor(typeColor)(_type) : "";
834
778
  }
835
779
  formatLogObj(logObj, opts) {
836
- const [message, ...additional] = (this.formatArgs(logObj.args, opts)).split("\n");
837
- if (logObj.type === "box") {
838
- return box(characterFormat(message + (additional.length > 0 ? "\n" + additional.join("\n") : "")), {
839
- title: logObj.title ? characterFormat(logObj.title) : void 0,
840
- style: logObj.style
841
- });
842
- }
780
+ const [message, ...additional] = this.formatArgs(logObj.args, opts).split("\n");
781
+ if (logObj.type === "box") return box(characterFormat(message + (additional.length > 0 ? "\n" + additional.join("\n") : "")), {
782
+ title: logObj.title ? characterFormat(logObj.title) : void 0,
783
+ style: logObj.style
784
+ });
843
785
  const date = this.formatDate(logObj.date, opts);
844
786
  const coloredDate = date && colors.gray(date);
845
787
  const isBadge = logObj.badge ?? logObj.level < 2;
@@ -857,9 +799,9 @@ class FancyReporter extends BasicReporter {
857
799
  }
858
800
  return isBadge ? "\n" + line + "\n" : line;
859
801
  }
860
- }
802
+ };
861
803
  function characterFormat(str) {
862
- return (str.replace(/`([^`]+)`/gm, (_, m) => colors.cyan(m))).replace(/\s+_([^_]+)_\s+/gm, (_, m) => ` ${colors.underline(m)} `);
804
+ return str.replace(/`([^`]+)`/gm, (_, m) => colors.cyan(m)).replace(/\s+_([^_]+)_\s+/gm, (_, m) => ` ${colors.underline(m)} `);
863
805
  }
864
806
  function getColor(color = "white") {
865
807
  return colors[color] || colors.white;
@@ -869,34 +811,46 @@ function getBgColor(color = "bgWhite") {
869
811
  }
870
812
  function createConsola(options = {}) {
871
813
  let level = _getDefaultLogLevel();
872
- if (process.env.CONSOLA_LEVEL) {
873
- level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level;
874
- }
814
+ if (process.env.CONSOLA_LEVEL) level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level;
875
815
  const consola2 = createConsola$1({
876
816
  level,
877
- defaults: {level},
817
+ defaults: { level },
878
818
  stdout: process.stdout,
879
819
  stderr: process.stderr,
880
- prompt: (...args) => (import("./prompt-9Ij3R3TG.cjs")).then((m) => m.prompt(...args)),
820
+ prompt: (...args) => Promise.resolve().then(function() {
821
+ return require("./prompt-BiXtYIJ2.cjs");
822
+ }).then((m) => m.prompt(...args)),
881
823
  reporters: options.reporters || [options.fancy ?? !(isCI || isTest) ? new FancyReporter() : new BasicReporter()],
882
824
  ...options
883
825
  });
884
826
  return consola2;
885
827
  }
886
828
  function _getDefaultLogLevel() {
887
- if (isDebug) {
888
- return LogLevels.debug;
889
- }
890
- if (isTest) {
891
- return LogLevels.warn;
892
- }
829
+ if (isDebug) return LogLevels.debug;
830
+ if (isTest) return LogLevels.warn;
893
831
  return LogLevels.info;
894
832
  }
895
833
  const consola = createConsola();
896
834
 
897
835
  //#endregion
898
- exports.colors = colors;
899
- exports.createConsola = createConsola;
900
- exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
901
- exports.isUnicodeSupported = isUnicodeSupported;
902
-
836
+ Object.defineProperty(exports, 'colors', {
837
+ enumerable: true,
838
+ get: function () {
839
+ return colors;
840
+ }
841
+ });Object.defineProperty(exports, 'createConsola', {
842
+ enumerable: true,
843
+ get: function () {
844
+ return createConsola;
845
+ }
846
+ });Object.defineProperty(exports, 'getDefaultExportFromCjs', {
847
+ enumerable: true,
848
+ get: function () {
849
+ return getDefaultExportFromCjs;
850
+ }
851
+ });Object.defineProperty(exports, 'isUnicodeSupported', {
852
+ enumerable: true,
853
+ get: function () {
854
+ return isUnicodeSupported;
855
+ }
856
+ });