ccusage 11.0.0 → 11.0.2

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 (44) hide show
  1. package/README.md +23 -1
  2. package/dist/arktype-C-GObzDh-Bx7Fdrqj.js +2 -0
  3. package/dist/{calculate-cost-2IwHSzmi.js → calculate-cost-D3IraeGW.js} +16 -4
  4. package/dist/calculate-cost.d.ts +26 -2
  5. package/dist/calculate-cost.js +2 -3
  6. package/dist/core-eFvU0K4V.js +689 -0
  7. package/dist/{data-loader-BAoqS297.js → data-loader-B2EwZ_7B.js} +446 -392
  8. package/dist/{data-loader-DPQaq8_n.d.ts → data-loader-dbZm5kOW.d.ts} +116 -25
  9. package/dist/data-loader.d.ts +3 -3
  10. package/dist/data-loader.js +4 -5
  11. package/dist/{debug-DzFJHzM5.js → debug-D4Ka6IrY.js} +21 -12
  12. package/dist/debug.d.ts +17 -0
  13. package/dist/debug.js +5 -6
  14. package/dist/{dist-BZzwBtZs.js → dist-Cb1UHXV5.js} +1 -5
  15. package/dist/dist-DCvt9hEv.js +1 -4
  16. package/dist/effect-WSjEuzC9-CZCpOgOT.js +6 -0
  17. package/dist/{esm-BU3FhOe-.js → esm-D74K9ESq.js} +2 -111
  18. package/dist/{index-CISmcbXk-CW1Gj6Ab.js → index-CISmcbXk-DpuCarFe.js} +6 -9
  19. package/dist/index.js +1912 -105
  20. package/dist/{logger-D3WD64Tx.js → logger-DPEwxrOW.js} +9 -22
  21. package/dist/logger.d.ts +9 -4
  22. package/dist/logger.js +2 -3
  23. package/dist/{mcp-1J7r1g6-.js → mcp-CklIto13.js} +366 -947
  24. package/dist/mcp.d.ts +2 -2
  25. package/dist/mcp.js +7 -8
  26. package/dist/{pricing-fetcher-D-eJQBEJ.js → pricing-fetcher-DDs53oR8.js} +151 -14
  27. package/dist/{pricing-fetcher-BkSZh4lR.d.ts → pricing-fetcher-DHaTs-k2.d.ts} +67 -2
  28. package/dist/pricing-fetcher.d.ts +1 -1
  29. package/dist/pricing-fetcher.js +3 -4
  30. package/dist/{prompt-DtZgx4wU.js → prompt-CUbwSrjo.js} +1 -5
  31. package/dist/sury-DmrZ3_Oj-Lq7x0IZW.js +6 -0
  32. package/dist/{types-BlyCnKwN.js → types-5-VF7WcO.js} +1 -22
  33. package/dist/valibot-CQk-M5rL-btpzU8Qa.js +6 -0
  34. package/dist/{zod-Db63SLXj-BIXn64AP.js → zod-Db63SLXj-BqWqpKnQ.js} +4 -8
  35. package/package.json +1 -2
  36. package/dist/arktype-C-GObzDh-CNoBqQrr.js +0 -5
  37. package/dist/chunk-BLXvPPr8.js +0 -30
  38. package/dist/core-DHCbAXJf.js +0 -693
  39. package/dist/effect-WSjEuzC9-DHMVzzyB.js +0 -10
  40. package/dist/sury-DmrZ3_Oj-Cpjsc2Lm.js +0 -10
  41. package/dist/utils.table-USks3NGv.js +0 -1844
  42. package/dist/utils.table.d.ts +0 -27
  43. package/dist/utils.table.js +0 -3
  44. package/dist/valibot-CQk-M5rL-BcaCeUrF.js +0 -10
package/dist/index.js CHANGED
@@ -1,18 +1,14 @@
1
1
  #!/usr/bin/env node
2
- import { __commonJS, __toESM } from "./chunk-BLXvPPr8.js";
3
- import { calculateTotals, createTotalsObject, getTotalTokens } from "./calculate-cost-2IwHSzmi.js";
4
- import { calculateBurnRate, filterRecentBlocks, formatDateCompact, getDefaultClaudePath, loadDailyUsageData, loadFiveHourBlockData, loadMonthlyUsageData, loadSessionData, projectBlockUsage } from "./data-loader-BAoqS297.js";
2
+ import { CostModes, SortOrders, __commonJSMin, __require, __toESM, dateSchema } from "./pricing-fetcher-DDs53oR8.js";
3
+ import { calculateTotals, createTotalsObject, getTotalTokens } from "./calculate-cost-D3IraeGW.js";
4
+ import { DEFAULT_SESSION_DURATION_HOURS, calculateBurnRate, filterRecentBlocks, formatDateCompact, getDefaultClaudePath, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData, projectBlockUsage } from "./data-loader-B2EwZ_7B.js";
5
5
  import { safeParse } from "./dist-DCvt9hEv.js";
6
- import { description, log, logger, name, version } from "./logger-D3WD64Tx.js";
7
- import { CostModes, SortOrders, dateSchema } from "./pricing-fetcher-D-eJQBEJ.js";
8
- import { detectMismatches, printMismatchReport } from "./debug-DzFJHzM5.js";
9
- import { ResponsiveTable } from "./utils.table-USks3NGv.js";
10
- import "./types-BlyCnKwN.js";
11
- import { createMcpServer } from "./mcp-1J7r1g6-.js";
12
- import "./index-CISmcbXk-CW1Gj6Ab.js";
6
+ import { description, log, logger, name, version } from "./logger-DPEwxrOW.js";
7
+ import { detectMismatches, printMismatchReport } from "./debug-D4Ka6IrY.js";
8
+ import "./types-5-VF7WcO.js";
9
+ import { createMcpServer } from "./mcp-CklIto13.js";
10
+ import "./index-CISmcbXk-DpuCarFe.js";
13
11
  import process$1 from "node:process";
14
-
15
- //#region node_modules/gunshi/lib/utils-D41C8Abf.js
16
12
  /**
17
13
  * The default locale string, which format is BCP 47 language tag.
18
14
  */
@@ -109,9 +105,6 @@ function deepFreeze(obj) {
109
105
  }
110
106
  return Object.freeze(obj);
111
107
  }
112
-
113
- //#endregion
114
- //#region node_modules/gunshi/lib/context-D_EmfRNA.js
115
108
  var COMMAND = "COMMAND";
116
109
  var COMMANDS = "COMMANDS";
117
110
  var SUBCOMMAND = "SUBCOMMAND";
@@ -188,7 +181,7 @@ async function createCommandContext({ args, values, positionals, rest, argv: arg
188
181
  /**
189
182
  * setup the environment
190
183
  */
191
- const env$1 = Object.assign(create(), COMMAND_OPTIONS_DEFAULT, cliOptions);
184
+ const env$2 = Object.assign(create(), COMMAND_OPTIONS_DEFAULT, cliOptions);
192
185
  const locale = resolveLocale(cliOptions.locale);
193
186
  const localeStr = locale.toString();
194
187
  const translationAdapterFactory = cliOptions.translationAdapterFactory || createTranslationAdapter;
@@ -235,7 +228,7 @@ async function createCommandContext({ args, values, positionals, rest, argv: arg
235
228
  omitted,
236
229
  callMode,
237
230
  locale,
238
- env: env$1,
231
+ env: env$2,
239
232
  args: _args,
240
233
  values,
241
234
  positionals,
@@ -287,9 +280,6 @@ async function loadCommandResource(ctx, command) {
287
280
  } catch {}
288
281
  return resource;
289
282
  }
290
-
291
- //#endregion
292
- //#region node_modules/gunshi/lib/definition-wq1Kmbvq.js
293
283
  /**
294
284
  * Define a {@link Command | command} with type inference
295
285
  * @param definition A {@link Command | command} definition
@@ -298,9 +288,6 @@ async function loadCommandResource(ctx, command) {
298
288
  function define(definition) {
299
289
  return definition;
300
290
  }
301
-
302
- //#endregion
303
- //#region node_modules/args-tokens/lib/utils-N7UlhLbz.js
304
291
  /**
305
292
  * Entry point of utils.
306
293
  *
@@ -315,9 +302,6 @@ function define(definition) {
315
302
  function kebabnize(str) {
316
303
  return str.replace(/[A-Z]/g, (match, offset) => (offset > 0 ? "-" : "") + match.toLowerCase());
317
304
  }
318
-
319
- //#endregion
320
- //#region node_modules/gunshi/lib/renderer-BzRfaLdJ.js
321
305
  /**
322
306
  * Render the header.
323
307
  * @param ctx A {@link CommandContext | command context}
@@ -334,18 +318,18 @@ const COMMON_ARGS_KEYS = Object.keys(COMMON_ARGS);
334
318
  * @returns A rendered usage.
335
319
  */
336
320
  async function renderUsage(ctx) {
337
- const messages = [];
321
+ const messages$1 = [];
338
322
  if (!ctx.omitted) {
339
323
  const description$1 = resolveDescription(ctx);
340
- if (description$1) messages.push(description$1, "");
324
+ if (description$1) messages$1.push(description$1, "");
341
325
  }
342
- messages.push(...await renderUsageSection(ctx), "");
343
- if (ctx.omitted && await hasCommands(ctx)) messages.push(...await renderCommandsSection(ctx), "");
344
- if (hasPositionalArgs(ctx)) messages.push(...await renderPositionalArgsSection(ctx), "");
345
- if (hasOptionalArgs(ctx)) messages.push(...await renderOptionalArgsSection(ctx), "");
326
+ messages$1.push(...await renderUsageSection(ctx), "");
327
+ if (ctx.omitted && await hasCommands(ctx)) messages$1.push(...await renderCommandsSection(ctx), "");
328
+ if (hasPositionalArgs(ctx)) messages$1.push(...await renderPositionalArgsSection(ctx), "");
329
+ if (hasOptionalArgs(ctx)) messages$1.push(...await renderOptionalArgsSection(ctx), "");
346
330
  const examples = await renderExamplesSection(ctx);
347
- if (examples.length > 0) messages.push(...examples, "");
348
- return messages.join("\n");
331
+ if (examples.length > 0) messages$1.push(...examples, "");
332
+ return messages$1.join("\n");
349
333
  }
350
334
  /**
351
335
  * Render the positional arguments section
@@ -353,10 +337,10 @@ async function renderUsage(ctx) {
353
337
  * @returns A rendered arguments section
354
338
  */
355
339
  async function renderPositionalArgsSection(ctx) {
356
- const messages = [];
357
- messages.push(`${ctx.translate(resolveBuiltInKey("ARGUMENTS"))}:`);
358
- messages.push(await generatePositionalArgsUsage(ctx));
359
- return messages;
340
+ const messages$1 = [];
341
+ messages$1.push(`${ctx.translate(resolveBuiltInKey("ARGUMENTS"))}:`);
342
+ messages$1.push(await generatePositionalArgsUsage(ctx));
343
+ return messages$1;
360
344
  }
361
345
  /**
362
346
  * Render the optional arguments section
@@ -364,10 +348,10 @@ async function renderPositionalArgsSection(ctx) {
364
348
  * @returns A rendered options section
365
349
  */
366
350
  async function renderOptionalArgsSection(ctx) {
367
- const messages = [];
368
- messages.push(`${ctx.translate(resolveBuiltInKey("OPTIONS"))}:`);
369
- messages.push(await generateOptionalArgsUsage(ctx, getOptionalArgsPairs(ctx)));
370
- return messages;
351
+ const messages$1 = [];
352
+ messages$1.push(`${ctx.translate(resolveBuiltInKey("OPTIONS"))}:`);
353
+ messages$1.push(await generateOptionalArgsUsage(ctx, getOptionalArgsPairs(ctx)));
354
+ return messages$1;
371
355
  }
372
356
  /**
373
357
  * Render the examples section
@@ -375,13 +359,13 @@ async function renderOptionalArgsSection(ctx) {
375
359
  * @returns A rendered examples section
376
360
  */
377
361
  async function renderExamplesSection(ctx) {
378
- const messages = [];
362
+ const messages$1 = [];
379
363
  const resolvedExamples = await resolveExamples$1(ctx);
380
364
  if (resolvedExamples) {
381
365
  const examples = resolvedExamples.split("\n").map((example) => example.padStart(ctx.env.leftMargin + example.length));
382
- messages.push(`${ctx.translate(resolveBuiltInKey("EXAMPLES"))}:`, ...examples);
366
+ messages$1.push(`${ctx.translate(resolveBuiltInKey("EXAMPLES"))}:`, ...examples);
383
367
  }
384
- return messages;
368
+ return messages$1;
385
369
  }
386
370
  /**
387
371
  * Render the usage section
@@ -389,19 +373,19 @@ async function renderExamplesSection(ctx) {
389
373
  * @returns A rendered usage section
390
374
  */
391
375
  async function renderUsageSection(ctx) {
392
- const messages = [`${ctx.translate(resolveBuiltInKey("USAGE"))}:`];
376
+ const messages$1 = [`${ctx.translate(resolveBuiltInKey("USAGE"))}:`];
393
377
  if (ctx.omitted) {
394
378
  const defaultCommand = `${resolveEntry(ctx)}${await hasCommands(ctx) ? ` [${resolveSubCommand(ctx)}]` : ""} ${[generateOptionsSymbols(ctx), generatePositionalSymbols(ctx)].filter(Boolean).join(" ")}`;
395
- messages.push(defaultCommand.padStart(ctx.env.leftMargin + defaultCommand.length));
379
+ messages$1.push(defaultCommand.padStart(ctx.env.leftMargin + defaultCommand.length));
396
380
  if (await hasCommands(ctx)) {
397
381
  const commandsUsage = `${resolveEntry(ctx)} <${ctx.translate(resolveBuiltInKey("COMMANDS"))}>`;
398
- messages.push(commandsUsage.padStart(ctx.env.leftMargin + commandsUsage.length));
382
+ messages$1.push(commandsUsage.padStart(ctx.env.leftMargin + commandsUsage.length));
399
383
  }
400
384
  } else {
401
385
  const usageStr = `${resolveEntry(ctx)} ${resolveSubCommand(ctx)} ${[generateOptionsSymbols(ctx), generatePositionalSymbols(ctx)].filter(Boolean).join(" ")}`;
402
- messages.push(usageStr.padStart(ctx.env.leftMargin + usageStr.length));
386
+ messages$1.push(usageStr.padStart(ctx.env.leftMargin + usageStr.length));
403
387
  }
404
- return messages;
388
+ return messages$1;
405
389
  }
406
390
  /**
407
391
  * Render the commands section
@@ -409,7 +393,7 @@ async function renderUsageSection(ctx) {
409
393
  * @returns A rendered commands section
410
394
  */
411
395
  async function renderCommandsSection(ctx) {
412
- const messages = [`${ctx.translate(resolveBuiltInKey("COMMANDS"))}:`];
396
+ const messages$1 = [`${ctx.translate(resolveBuiltInKey("COMMANDS"))}:`];
413
397
  const loadedCommands = await ctx.loadCommands();
414
398
  const commandMaxLength = Math.max(...loadedCommands.map((cmd) => (cmd.name || "").length));
415
399
  const commandsStr = await Promise.all(loadedCommands.map((cmd) => {
@@ -418,12 +402,12 @@ async function renderCommandsSection(ctx) {
418
402
  const command = `${key.padEnd(commandMaxLength + ctx.env.middleMargin)}${desc} `;
419
403
  return `${command.padStart(ctx.env.leftMargin + command.length)} `;
420
404
  }));
421
- messages.push(...commandsStr, "", ctx.translate(resolveBuiltInKey("FORMORE")));
422
- messages.push(...loadedCommands.map((cmd) => {
405
+ messages$1.push(...commandsStr, "", ctx.translate(resolveBuiltInKey("FORMORE")));
406
+ messages$1.push(...loadedCommands.map((cmd) => {
423
407
  const commandHelp = `${ctx.env.name} ${cmd.name} --help`;
424
408
  return `${commandHelp.padStart(ctx.env.leftMargin + commandHelp.length)}`;
425
409
  }));
426
- return messages;
410
+ return messages$1;
427
411
  }
428
412
  /**
429
413
  * Resolve the entry command name
@@ -594,13 +578,10 @@ function generatePositionalSymbols(ctx) {
594
578
  * @returns A rendered validation error.
595
579
  */
596
580
  function renderValidationErrors(_ctx, error) {
597
- const messages = [];
598
- for (const err of error.errors) messages.push(err.message);
599
- return Promise.resolve(messages.join("\n"));
581
+ const messages$1 = [];
582
+ for (const err of error.errors) messages$1.push(err.message);
583
+ return Promise.resolve(messages$1.join("\n"));
600
584
  }
601
-
602
- //#endregion
603
- //#region node_modules/args-tokens/lib/parser-Dr4iAGaX.js
604
585
  const HYPHEN_CHAR = "-";
605
586
  const HYPHEN_CODE = HYPHEN_CHAR.codePointAt(0);
606
587
  const EQUAL_CHAR = "=";
@@ -788,9 +769,6 @@ function hasLongOptionPrefix(arg) {
788
769
  function hasOptionValue(value) {
789
770
  return !(value == null) && value.codePointAt(0) !== HYPHEN_CODE;
790
771
  }
791
-
792
- //#endregion
793
- //#region node_modules/args-tokens/lib/resolver-Q4k2fgTW.js
794
772
  const SKIP_POSITIONAL_DEFAULT = -1;
795
773
  /**
796
774
  * Resolve command line arguments.
@@ -1001,9 +979,6 @@ function isNumeric(str) {
1001
979
  function createTypeError(option, schema) {
1002
980
  return new ArgResolveError(`Optional argument '--${option}' ${schema.short ? `or '-${schema.short}' ` : ""}should be '${schema.type}'`, option, "type", schema);
1003
981
  }
1004
-
1005
- //#endregion
1006
- //#region node_modules/gunshi/lib/cli-DVGNVw3h.js
1007
982
  /**
1008
983
  * Run the command.
1009
984
  * @param args Command line arguments
@@ -1142,12 +1117,9 @@ async function executeCommand(cmd, ctx, name$1) {
1142
1117
  if (resolved.run == null) throw new Error(`'run' not found on Command \`${name$1}\``);
1143
1118
  await resolved.run(ctx);
1144
1119
  }
1145
-
1146
- //#endregion
1147
- //#region node_modules/picocolors/picocolors.js
1148
- var require_picocolors = __commonJS({ "node_modules/picocolors/picocolors.js"(exports, module) {
1149
- let p = process || {}, argv = p.argv || [], env = p.env || {};
1150
- let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
1120
+ var require_picocolors = __commonJSMin((exports, module) => {
1121
+ let p = process || {}, argv = p.argv || [], env$1 = p.env || {};
1122
+ let isColorSupported = !(!!env$1.NO_COLOR || argv.includes("--no-color")) && (!!env$1.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env$1.TERM !== "dumb" || !!env$1.CI);
1151
1123
  let formatter = (open, close, replace = open) => (input) => {
1152
1124
  let string = "" + input, index = string.indexOf(close, open.length);
1153
1125
  return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
@@ -1210,15 +1182,21 @@ var require_picocolors = __commonJS({ "node_modules/picocolors/picocolors.js"(ex
1210
1182
  };
1211
1183
  module.exports = createColors();
1212
1184
  module.exports.createColors = createColors;
1213
- } });
1214
-
1215
- //#endregion
1216
- //#region src/shared-args.internal.ts
1185
+ });
1186
+ /**
1187
+ * Parses and validates a date argument in YYYYMMDD format
1188
+ * @param value - Date string to parse
1189
+ * @returns Validated date string
1190
+ * @throws TypeError if date format is invalid
1191
+ */
1217
1192
  function parseDateArg(value) {
1218
1193
  const result = safeParse(dateSchema, value);
1219
1194
  if (!result.success) throw new TypeError(result.issues[0].message);
1220
1195
  return result.output;
1221
1196
  }
1197
+ /**
1198
+ * Shared command line arguments used across multiple CLI commands
1199
+ */
1222
1200
  const sharedArgs = {
1223
1201
  since: {
1224
1202
  type: "custom",
@@ -1277,25 +1255,1827 @@ const sharedArgs = {
1277
1255
  default: false
1278
1256
  }
1279
1257
  };
1258
+ /**
1259
+ * Shared command configuration for Gunshi CLI commands
1260
+ */
1280
1261
  const sharedCommandConfig = {
1281
1262
  args: sharedArgs,
1282
1263
  toKebab: true
1283
1264
  };
1284
-
1285
- //#endregion
1286
- //#region src/utils.internal.ts
1265
+ var require_debug$1 = __commonJSMin((exports, module) => {
1266
+ let messages = [];
1267
+ let level = 0;
1268
+ const debug$3 = (msg, min) => {
1269
+ if (level >= min) messages.push(msg);
1270
+ };
1271
+ debug$3.WARN = 1;
1272
+ debug$3.INFO = 2;
1273
+ debug$3.DEBUG = 3;
1274
+ debug$3.reset = () => {
1275
+ messages = [];
1276
+ };
1277
+ debug$3.setDebugLevel = (v) => {
1278
+ level = v;
1279
+ };
1280
+ debug$3.warn = (msg) => debug$3(msg, debug$3.WARN);
1281
+ debug$3.info = (msg) => debug$3(msg, debug$3.INFO);
1282
+ debug$3.debug = (msg) => debug$3(msg, debug$3.DEBUG);
1283
+ debug$3.debugMessages = () => messages;
1284
+ module.exports = debug$3;
1285
+ });
1286
+ var require_ansi_regex = __commonJSMin((exports, module) => {
1287
+ module.exports = ({ onlyFirst = false } = {}) => {
1288
+ 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("|");
1289
+ return new RegExp(pattern, onlyFirst ? void 0 : "g");
1290
+ };
1291
+ });
1292
+ var require_strip_ansi = __commonJSMin((exports, module) => {
1293
+ const ansiRegex$1 = require_ansi_regex();
1294
+ module.exports = (string) => typeof string === "string" ? string.replace(ansiRegex$1(), "") : string;
1295
+ });
1296
+ var require_is_fullwidth_code_point = __commonJSMin((exports, module) => {
1297
+ const isFullwidthCodePoint$1 = (codePoint) => {
1298
+ if (Number.isNaN(codePoint)) return false;
1299
+ if (codePoint >= 4352 && (codePoint <= 4447 || codePoint === 9001 || codePoint === 9002 || 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || 12880 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65131 || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 262141)) return true;
1300
+ return false;
1301
+ };
1302
+ module.exports = isFullwidthCodePoint$1;
1303
+ module.exports.default = isFullwidthCodePoint$1;
1304
+ });
1305
+ var require_emoji_regex$1 = __commonJSMin((exports, module) => {
1306
+ module.exports = function() {
1307
+ return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
1308
+ };
1309
+ });
1310
+ var require_string_width = __commonJSMin((exports, module) => {
1311
+ const stripAnsi$1 = require_strip_ansi();
1312
+ const isFullwidthCodePoint = require_is_fullwidth_code_point();
1313
+ const emojiRegex$1 = require_emoji_regex$1();
1314
+ const stringWidth$2 = (string) => {
1315
+ if (typeof string !== "string" || string.length === 0) return 0;
1316
+ string = stripAnsi$1(string);
1317
+ if (string.length === 0) return 0;
1318
+ string = string.replace(emojiRegex$1(), " ");
1319
+ let width = 0;
1320
+ for (let i = 0; i < string.length; i++) {
1321
+ const code = string.codePointAt(i);
1322
+ if (code <= 31 || code >= 127 && code <= 159) continue;
1323
+ if (code >= 768 && code <= 879) continue;
1324
+ if (code > 65535) i++;
1325
+ width += isFullwidthCodePoint(code) ? 2 : 1;
1326
+ }
1327
+ return width;
1328
+ };
1329
+ module.exports = stringWidth$2;
1330
+ module.exports.default = stringWidth$2;
1331
+ });
1332
+ var require_utils = __commonJSMin((exports, module) => {
1333
+ const stringWidth$1 = require_string_width();
1334
+ function codeRegex(capture) {
1335
+ return capture ? /\u001b\[((?:\d*;){0,5}\d*)m/g : /\u001b\[(?:\d*;){0,5}\d*m/g;
1336
+ }
1337
+ function strlen(str) {
1338
+ let code = codeRegex();
1339
+ let stripped = ("" + str).replace(code, "");
1340
+ let split = stripped.split("\n");
1341
+ return split.reduce(function(memo, s) {
1342
+ return stringWidth$1(s) > memo ? stringWidth$1(s) : memo;
1343
+ }, 0);
1344
+ }
1345
+ function repeat(str, times) {
1346
+ return Array(times + 1).join(str);
1347
+ }
1348
+ function pad(str, len, pad$1, dir) {
1349
+ let length = strlen(str);
1350
+ if (len + 1 >= length) {
1351
+ let padlen = len - length;
1352
+ switch (dir) {
1353
+ case "right": {
1354
+ str = repeat(pad$1, padlen) + str;
1355
+ break;
1356
+ }
1357
+ case "center": {
1358
+ let right = Math.ceil(padlen / 2);
1359
+ let left = padlen - right;
1360
+ str = repeat(pad$1, left) + str + repeat(pad$1, right);
1361
+ break;
1362
+ }
1363
+ default: {
1364
+ str = str + repeat(pad$1, padlen);
1365
+ break;
1366
+ }
1367
+ }
1368
+ }
1369
+ return str;
1370
+ }
1371
+ let codeCache = {};
1372
+ function addToCodeCache(name$1, on, off) {
1373
+ on = "\x1B[" + on + "m";
1374
+ off = "\x1B[" + off + "m";
1375
+ codeCache[on] = {
1376
+ set: name$1,
1377
+ to: true
1378
+ };
1379
+ codeCache[off] = {
1380
+ set: name$1,
1381
+ to: false
1382
+ };
1383
+ codeCache[name$1] = {
1384
+ on,
1385
+ off
1386
+ };
1387
+ }
1388
+ addToCodeCache("bold", 1, 22);
1389
+ addToCodeCache("italics", 3, 23);
1390
+ addToCodeCache("underline", 4, 24);
1391
+ addToCodeCache("inverse", 7, 27);
1392
+ addToCodeCache("strikethrough", 9, 29);
1393
+ function updateState(state, controlChars) {
1394
+ let controlCode = controlChars[1] ? parseInt(controlChars[1].split(";")[0]) : 0;
1395
+ if (controlCode >= 30 && controlCode <= 39 || controlCode >= 90 && controlCode <= 97) {
1396
+ state.lastForegroundAdded = controlChars[0];
1397
+ return;
1398
+ }
1399
+ if (controlCode >= 40 && controlCode <= 49 || controlCode >= 100 && controlCode <= 107) {
1400
+ state.lastBackgroundAdded = controlChars[0];
1401
+ return;
1402
+ }
1403
+ if (controlCode === 0) {
1404
+ for (let i in state)
1405
+ /* istanbul ignore else */
1406
+ if (Object.prototype.hasOwnProperty.call(state, i)) delete state[i];
1407
+ return;
1408
+ }
1409
+ let info$1 = codeCache[controlChars[0]];
1410
+ if (info$1) state[info$1.set] = info$1.to;
1411
+ }
1412
+ function readState(line) {
1413
+ let code = codeRegex(true);
1414
+ let controlChars = code.exec(line);
1415
+ let state = {};
1416
+ while (controlChars !== null) {
1417
+ updateState(state, controlChars);
1418
+ controlChars = code.exec(line);
1419
+ }
1420
+ return state;
1421
+ }
1422
+ function unwindState(state, ret) {
1423
+ let lastBackgroundAdded = state.lastBackgroundAdded;
1424
+ let lastForegroundAdded = state.lastForegroundAdded;
1425
+ delete state.lastBackgroundAdded;
1426
+ delete state.lastForegroundAdded;
1427
+ Object.keys(state).forEach(function(key) {
1428
+ if (state[key]) ret += codeCache[key].off;
1429
+ });
1430
+ if (lastBackgroundAdded && lastBackgroundAdded != "\x1B[49m") ret += "\x1B[49m";
1431
+ if (lastForegroundAdded && lastForegroundAdded != "\x1B[39m") ret += "\x1B[39m";
1432
+ return ret;
1433
+ }
1434
+ function rewindState(state, ret) {
1435
+ let lastBackgroundAdded = state.lastBackgroundAdded;
1436
+ let lastForegroundAdded = state.lastForegroundAdded;
1437
+ delete state.lastBackgroundAdded;
1438
+ delete state.lastForegroundAdded;
1439
+ Object.keys(state).forEach(function(key) {
1440
+ if (state[key]) ret = codeCache[key].on + ret;
1441
+ });
1442
+ if (lastBackgroundAdded && lastBackgroundAdded != "\x1B[49m") ret = lastBackgroundAdded + ret;
1443
+ if (lastForegroundAdded && lastForegroundAdded != "\x1B[39m") ret = lastForegroundAdded + ret;
1444
+ return ret;
1445
+ }
1446
+ function truncateWidth(str, desiredLength) {
1447
+ if (str.length === strlen(str)) return str.substr(0, desiredLength);
1448
+ while (strlen(str) > desiredLength) str = str.slice(0, -1);
1449
+ return str;
1450
+ }
1451
+ function truncateWidthWithAnsi(str, desiredLength) {
1452
+ let code = codeRegex(true);
1453
+ let split = str.split(codeRegex());
1454
+ let splitIndex = 0;
1455
+ let retLen = 0;
1456
+ let ret = "";
1457
+ let myArray;
1458
+ let state = {};
1459
+ while (retLen < desiredLength) {
1460
+ myArray = code.exec(str);
1461
+ let toAdd = split[splitIndex];
1462
+ splitIndex++;
1463
+ if (retLen + strlen(toAdd) > desiredLength) toAdd = truncateWidth(toAdd, desiredLength - retLen);
1464
+ ret += toAdd;
1465
+ retLen += strlen(toAdd);
1466
+ if (retLen < desiredLength) {
1467
+ if (!myArray) break;
1468
+ ret += myArray[0];
1469
+ updateState(state, myArray);
1470
+ }
1471
+ }
1472
+ return unwindState(state, ret);
1473
+ }
1474
+ function truncate(str, desiredLength, truncateChar) {
1475
+ truncateChar = truncateChar || "…";
1476
+ let lengthOfStr = strlen(str);
1477
+ if (lengthOfStr <= desiredLength) return str;
1478
+ desiredLength -= strlen(truncateChar);
1479
+ let ret = truncateWidthWithAnsi(str, desiredLength);
1480
+ ret += truncateChar;
1481
+ const hrefTag = "\x1B]8;;\x07";
1482
+ if (str.includes(hrefTag) && !ret.includes(hrefTag)) ret += hrefTag;
1483
+ return ret;
1484
+ }
1485
+ function defaultOptions() {
1486
+ return {
1487
+ chars: {
1488
+ top: "─",
1489
+ "top-mid": "┬",
1490
+ "top-left": "┌",
1491
+ "top-right": "┐",
1492
+ bottom: "─",
1493
+ "bottom-mid": "┴",
1494
+ "bottom-left": "└",
1495
+ "bottom-right": "┘",
1496
+ left: "│",
1497
+ "left-mid": "├",
1498
+ mid: "─",
1499
+ "mid-mid": "┼",
1500
+ right: "│",
1501
+ "right-mid": "┤",
1502
+ middle: "│"
1503
+ },
1504
+ truncate: "…",
1505
+ colWidths: [],
1506
+ rowHeights: [],
1507
+ colAligns: [],
1508
+ rowAligns: [],
1509
+ style: {
1510
+ "padding-left": 1,
1511
+ "padding-right": 1,
1512
+ head: ["red"],
1513
+ border: ["grey"],
1514
+ compact: false
1515
+ },
1516
+ head: []
1517
+ };
1518
+ }
1519
+ function mergeOptions(options, defaults) {
1520
+ options = options || {};
1521
+ defaults = defaults || defaultOptions();
1522
+ let ret = Object.assign({}, defaults, options);
1523
+ ret.chars = Object.assign({}, defaults.chars, options.chars);
1524
+ ret.style = Object.assign({}, defaults.style, options.style);
1525
+ return ret;
1526
+ }
1527
+ function wordWrap(maxLength, input) {
1528
+ let lines = [];
1529
+ let split = input.split(/(\s+)/g);
1530
+ let line = [];
1531
+ let lineLength = 0;
1532
+ let whitespace;
1533
+ for (let i = 0; i < split.length; i += 2) {
1534
+ let word = split[i];
1535
+ let newLength = lineLength + strlen(word);
1536
+ if (lineLength > 0 && whitespace) newLength += whitespace.length;
1537
+ if (newLength > maxLength) {
1538
+ if (lineLength !== 0) lines.push(line.join(""));
1539
+ line = [word];
1540
+ lineLength = strlen(word);
1541
+ } else {
1542
+ line.push(whitespace || "", word);
1543
+ lineLength = newLength;
1544
+ }
1545
+ whitespace = split[i + 1];
1546
+ }
1547
+ if (lineLength) lines.push(line.join(""));
1548
+ return lines;
1549
+ }
1550
+ function textWrap(maxLength, input) {
1551
+ let lines = [];
1552
+ let line = "";
1553
+ function pushLine(str, ws) {
1554
+ if (line.length && ws) line += ws;
1555
+ line += str;
1556
+ while (line.length > maxLength) {
1557
+ lines.push(line.slice(0, maxLength));
1558
+ line = line.slice(maxLength);
1559
+ }
1560
+ }
1561
+ let split = input.split(/(\s+)/g);
1562
+ for (let i = 0; i < split.length; i += 2) pushLine(split[i], i && split[i - 1]);
1563
+ if (line.length) lines.push(line);
1564
+ return lines;
1565
+ }
1566
+ function multiLineWordWrap(maxLength, input, wrapOnWordBoundary = true) {
1567
+ let output = [];
1568
+ input = input.split("\n");
1569
+ const handler = wrapOnWordBoundary ? wordWrap : textWrap;
1570
+ for (let i = 0; i < input.length; i++) output.push.apply(output, handler(maxLength, input[i]));
1571
+ return output;
1572
+ }
1573
+ function colorizeLines(input) {
1574
+ let state = {};
1575
+ let output = [];
1576
+ for (let i = 0; i < input.length; i++) {
1577
+ let line = rewindState(state, input[i]);
1578
+ state = readState(line);
1579
+ let temp = Object.assign({}, state);
1580
+ output.push(unwindState(temp, line));
1581
+ }
1582
+ return output;
1583
+ }
1584
+ /**
1585
+ * Credit: Matheus Sampaio https://github.com/matheussampaio
1586
+ */
1587
+ function hyperlink(url, text) {
1588
+ const OSC = "\x1B]";
1589
+ const BEL = "\x07";
1590
+ const SEP = ";";
1591
+ return [
1592
+ OSC,
1593
+ "8",
1594
+ SEP,
1595
+ SEP,
1596
+ url || text,
1597
+ BEL,
1598
+ text,
1599
+ OSC,
1600
+ "8",
1601
+ SEP,
1602
+ SEP,
1603
+ BEL
1604
+ ].join("");
1605
+ }
1606
+ module.exports = {
1607
+ strlen,
1608
+ repeat,
1609
+ pad,
1610
+ truncate,
1611
+ mergeOptions,
1612
+ wordWrap: multiLineWordWrap,
1613
+ colorizeLines,
1614
+ hyperlink
1615
+ };
1616
+ });
1617
+ var require_styles = __commonJSMin((exports, module) => {
1618
+ var styles$1 = {};
1619
+ module["exports"] = styles$1;
1620
+ var codes = {
1621
+ reset: [0, 0],
1622
+ bold: [1, 22],
1623
+ dim: [2, 22],
1624
+ italic: [3, 23],
1625
+ underline: [4, 24],
1626
+ inverse: [7, 27],
1627
+ hidden: [8, 28],
1628
+ strikethrough: [9, 29],
1629
+ black: [30, 39],
1630
+ red: [31, 39],
1631
+ green: [32, 39],
1632
+ yellow: [33, 39],
1633
+ blue: [34, 39],
1634
+ magenta: [35, 39],
1635
+ cyan: [36, 39],
1636
+ white: [37, 39],
1637
+ gray: [90, 39],
1638
+ grey: [90, 39],
1639
+ brightRed: [91, 39],
1640
+ brightGreen: [92, 39],
1641
+ brightYellow: [93, 39],
1642
+ brightBlue: [94, 39],
1643
+ brightMagenta: [95, 39],
1644
+ brightCyan: [96, 39],
1645
+ brightWhite: [97, 39],
1646
+ bgBlack: [40, 49],
1647
+ bgRed: [41, 49],
1648
+ bgGreen: [42, 49],
1649
+ bgYellow: [43, 49],
1650
+ bgBlue: [44, 49],
1651
+ bgMagenta: [45, 49],
1652
+ bgCyan: [46, 49],
1653
+ bgWhite: [47, 49],
1654
+ bgGray: [100, 49],
1655
+ bgGrey: [100, 49],
1656
+ bgBrightRed: [101, 49],
1657
+ bgBrightGreen: [102, 49],
1658
+ bgBrightYellow: [103, 49],
1659
+ bgBrightBlue: [104, 49],
1660
+ bgBrightMagenta: [105, 49],
1661
+ bgBrightCyan: [106, 49],
1662
+ bgBrightWhite: [107, 49],
1663
+ blackBG: [40, 49],
1664
+ redBG: [41, 49],
1665
+ greenBG: [42, 49],
1666
+ yellowBG: [43, 49],
1667
+ blueBG: [44, 49],
1668
+ magentaBG: [45, 49],
1669
+ cyanBG: [46, 49],
1670
+ whiteBG: [47, 49]
1671
+ };
1672
+ Object.keys(codes).forEach(function(key) {
1673
+ var val = codes[key];
1674
+ var style = styles$1[key] = [];
1675
+ style.open = "\x1B[" + val[0] + "m";
1676
+ style.close = "\x1B[" + val[1] + "m";
1677
+ });
1678
+ });
1679
+ var require_has_flag = __commonJSMin((exports, module) => {
1680
+ module.exports = function(flag, argv$1) {
1681
+ argv$1 = argv$1 || process.argv;
1682
+ var terminatorPos = argv$1.indexOf("--");
1683
+ var prefix = /^-{1,2}/.test(flag) ? "" : "--";
1684
+ var pos = argv$1.indexOf(prefix + flag);
1685
+ return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
1686
+ };
1687
+ });
1688
+ var require_supports_colors = __commonJSMin((exports, module) => {
1689
+ var os = __require("os");
1690
+ var hasFlag = require_has_flag();
1691
+ var env = process.env;
1692
+ var forceColor = void 0;
1693
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) forceColor = false;
1694
+ else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) forceColor = true;
1695
+ if ("FORCE_COLOR" in env) forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
1696
+ function translateLevel(level$1) {
1697
+ if (level$1 === 0) return false;
1698
+ return {
1699
+ level: level$1,
1700
+ hasBasic: true,
1701
+ has256: level$1 >= 2,
1702
+ has16m: level$1 >= 3
1703
+ };
1704
+ }
1705
+ function supportsColor(stream) {
1706
+ if (forceColor === false) return 0;
1707
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) return 3;
1708
+ if (hasFlag("color=256")) return 2;
1709
+ if (stream && !stream.isTTY && forceColor !== true) return 0;
1710
+ var min = forceColor ? 1 : 0;
1711
+ if (process.platform === "win32") {
1712
+ var osRelease = os.release().split(".");
1713
+ if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
1714
+ return 1;
1715
+ }
1716
+ if ("CI" in env) {
1717
+ if ([
1718
+ "TRAVIS",
1719
+ "CIRCLECI",
1720
+ "APPVEYOR",
1721
+ "GITLAB_CI"
1722
+ ].some(function(sign) {
1723
+ return sign in env;
1724
+ }) || env.CI_NAME === "codeship") return 1;
1725
+ return min;
1726
+ }
1727
+ if ("TEAMCITY_VERSION" in env) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
1728
+ if ("TERM_PROGRAM" in env) {
1729
+ var version$2 = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
1730
+ switch (env.TERM_PROGRAM) {
1731
+ case "iTerm.app": return version$2 >= 3 ? 3 : 2;
1732
+ case "Hyper": return 3;
1733
+ case "Apple_Terminal": return 2;
1734
+ }
1735
+ }
1736
+ if (/-256(color)?$/i.test(env.TERM)) return 2;
1737
+ if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) return 1;
1738
+ if ("COLORTERM" in env) return 1;
1739
+ if (env.TERM === "dumb") return min;
1740
+ return min;
1741
+ }
1742
+ function getSupportLevel(stream) {
1743
+ var level$1 = supportsColor(stream);
1744
+ return translateLevel(level$1);
1745
+ }
1746
+ module.exports = {
1747
+ supportsColor: getSupportLevel,
1748
+ stdout: getSupportLevel(process.stdout),
1749
+ stderr: getSupportLevel(process.stderr)
1750
+ };
1751
+ });
1752
+ var require_trap = __commonJSMin((exports, module) => {
1753
+ module["exports"] = function runTheTrap(text, options) {
1754
+ var result = "";
1755
+ text = text || "Run the trap, drop the bass";
1756
+ text = text.split("");
1757
+ var trap = {
1758
+ a: [
1759
+ "@",
1760
+ "Ą",
1761
+ "Ⱥ",
1762
+ "Ʌ",
1763
+ "Δ",
1764
+ "Λ",
1765
+ "Д"
1766
+ ],
1767
+ b: [
1768
+ "ß",
1769
+ "Ɓ",
1770
+ "Ƀ",
1771
+ "ɮ",
1772
+ "β",
1773
+ "฿"
1774
+ ],
1775
+ c: [
1776
+ "©",
1777
+ "Ȼ",
1778
+ "Ͼ"
1779
+ ],
1780
+ d: [
1781
+ "Ð",
1782
+ "Ɗ",
1783
+ "Ԁ",
1784
+ "ԁ",
1785
+ "Ԃ",
1786
+ "ԃ"
1787
+ ],
1788
+ e: [
1789
+ "Ë",
1790
+ "ĕ",
1791
+ "Ǝ",
1792
+ "ɘ",
1793
+ "Σ",
1794
+ "ξ",
1795
+ "Ҽ",
1796
+ "੬"
1797
+ ],
1798
+ f: ["Ӻ"],
1799
+ g: ["ɢ"],
1800
+ h: [
1801
+ "Ħ",
1802
+ "ƕ",
1803
+ "Ң",
1804
+ "Һ",
1805
+ "Ӈ",
1806
+ "Ԋ"
1807
+ ],
1808
+ i: ["༏"],
1809
+ j: ["Ĵ"],
1810
+ k: [
1811
+ "ĸ",
1812
+ "Ҡ",
1813
+ "Ӄ",
1814
+ "Ԟ"
1815
+ ],
1816
+ l: ["Ĺ"],
1817
+ m: [
1818
+ "ʍ",
1819
+ "Ӎ",
1820
+ "ӎ",
1821
+ "Ԡ",
1822
+ "ԡ",
1823
+ "൩"
1824
+ ],
1825
+ n: [
1826
+ "Ñ",
1827
+ "ŋ",
1828
+ "Ɲ",
1829
+ "Ͷ",
1830
+ "Π",
1831
+ "Ҋ"
1832
+ ],
1833
+ o: [
1834
+ "Ø",
1835
+ "õ",
1836
+ "ø",
1837
+ "Ǿ",
1838
+ "ʘ",
1839
+ "Ѻ",
1840
+ "ם",
1841
+ "۝",
1842
+ "๏"
1843
+ ],
1844
+ p: ["Ƿ", "Ҏ"],
1845
+ q: ["্"],
1846
+ r: [
1847
+ "®",
1848
+ "Ʀ",
1849
+ "Ȑ",
1850
+ "Ɍ",
1851
+ "ʀ",
1852
+ "Я"
1853
+ ],
1854
+ s: [
1855
+ "§",
1856
+ "Ϟ",
1857
+ "ϟ",
1858
+ "Ϩ"
1859
+ ],
1860
+ t: [
1861
+ "Ł",
1862
+ "Ŧ",
1863
+ "ͳ"
1864
+ ],
1865
+ u: ["Ʊ", "Ս"],
1866
+ v: ["ט"],
1867
+ w: [
1868
+ "Ш",
1869
+ "Ѡ",
1870
+ "Ѽ",
1871
+ "൰"
1872
+ ],
1873
+ x: [
1874
+ "Ҳ",
1875
+ "Ӿ",
1876
+ "Ӽ",
1877
+ "ӽ"
1878
+ ],
1879
+ y: [
1880
+ "¥",
1881
+ "Ұ",
1882
+ "Ӌ"
1883
+ ],
1884
+ z: ["Ƶ", "ɀ"]
1885
+ };
1886
+ text.forEach(function(c) {
1887
+ c = c.toLowerCase();
1888
+ var chars = trap[c] || [" "];
1889
+ var rand = Math.floor(Math.random() * chars.length);
1890
+ if (typeof trap[c] !== "undefined") result += trap[c][rand];
1891
+ else result += c;
1892
+ });
1893
+ return result;
1894
+ };
1895
+ });
1896
+ var require_zalgo = __commonJSMin((exports, module) => {
1897
+ module["exports"] = function zalgo(text, options) {
1898
+ text = text || " he is here ";
1899
+ var soul = {
1900
+ "up": [
1901
+ "̍",
1902
+ "̎",
1903
+ "̄",
1904
+ "̅",
1905
+ "̿",
1906
+ "̑",
1907
+ "̆",
1908
+ "̐",
1909
+ "͒",
1910
+ "͗",
1911
+ "͑",
1912
+ "̇",
1913
+ "̈",
1914
+ "̊",
1915
+ "͂",
1916
+ "̓",
1917
+ "̈",
1918
+ "͊",
1919
+ "͋",
1920
+ "͌",
1921
+ "̃",
1922
+ "̂",
1923
+ "̌",
1924
+ "͐",
1925
+ "̀",
1926
+ "́",
1927
+ "̋",
1928
+ "̏",
1929
+ "̒",
1930
+ "̓",
1931
+ "̔",
1932
+ "̽",
1933
+ "̉",
1934
+ "ͣ",
1935
+ "ͤ",
1936
+ "ͥ",
1937
+ "ͦ",
1938
+ "ͧ",
1939
+ "ͨ",
1940
+ "ͩ",
1941
+ "ͪ",
1942
+ "ͫ",
1943
+ "ͬ",
1944
+ "ͭ",
1945
+ "ͮ",
1946
+ "ͯ",
1947
+ "̾",
1948
+ "͛",
1949
+ "͆",
1950
+ "̚"
1951
+ ],
1952
+ "down": [
1953
+ "̖",
1954
+ "̗",
1955
+ "̘",
1956
+ "̙",
1957
+ "̜",
1958
+ "̝",
1959
+ "̞",
1960
+ "̟",
1961
+ "̠",
1962
+ "̤",
1963
+ "̥",
1964
+ "̦",
1965
+ "̩",
1966
+ "̪",
1967
+ "̫",
1968
+ "̬",
1969
+ "̭",
1970
+ "̮",
1971
+ "̯",
1972
+ "̰",
1973
+ "̱",
1974
+ "̲",
1975
+ "̳",
1976
+ "̹",
1977
+ "̺",
1978
+ "̻",
1979
+ "̼",
1980
+ "ͅ",
1981
+ "͇",
1982
+ "͈",
1983
+ "͉",
1984
+ "͍",
1985
+ "͎",
1986
+ "͓",
1987
+ "͔",
1988
+ "͕",
1989
+ "͖",
1990
+ "͙",
1991
+ "͚",
1992
+ "̣"
1993
+ ],
1994
+ "mid": [
1995
+ "̕",
1996
+ "̛",
1997
+ "̀",
1998
+ "́",
1999
+ "͘",
2000
+ "̡",
2001
+ "̢",
2002
+ "̧",
2003
+ "̨",
2004
+ "̴",
2005
+ "̵",
2006
+ "̶",
2007
+ "͜",
2008
+ "͝",
2009
+ "͞",
2010
+ "͟",
2011
+ "͠",
2012
+ "͢",
2013
+ "̸",
2014
+ "̷",
2015
+ "͡",
2016
+ " ҉"
2017
+ ]
2018
+ };
2019
+ var all = [].concat(soul.up, soul.down, soul.mid);
2020
+ function randomNumber(range) {
2021
+ var r = Math.floor(Math.random() * range);
2022
+ return r;
2023
+ }
2024
+ function isChar(character) {
2025
+ var bool = false;
2026
+ all.filter(function(i) {
2027
+ bool = i === character;
2028
+ });
2029
+ return bool;
2030
+ }
2031
+ function heComes(text$1, options$1) {
2032
+ var result = "";
2033
+ var counts;
2034
+ var l;
2035
+ options$1 = options$1 || {};
2036
+ options$1["up"] = typeof options$1["up"] !== "undefined" ? options$1["up"] : true;
2037
+ options$1["mid"] = typeof options$1["mid"] !== "undefined" ? options$1["mid"] : true;
2038
+ options$1["down"] = typeof options$1["down"] !== "undefined" ? options$1["down"] : true;
2039
+ options$1["size"] = typeof options$1["size"] !== "undefined" ? options$1["size"] : "maxi";
2040
+ text$1 = text$1.split("");
2041
+ for (l in text$1) {
2042
+ if (isChar(l)) continue;
2043
+ result = result + text$1[l];
2044
+ counts = {
2045
+ "up": 0,
2046
+ "down": 0,
2047
+ "mid": 0
2048
+ };
2049
+ switch (options$1.size) {
2050
+ case "mini":
2051
+ counts.up = randomNumber(8);
2052
+ counts.mid = randomNumber(2);
2053
+ counts.down = randomNumber(8);
2054
+ break;
2055
+ case "maxi":
2056
+ counts.up = randomNumber(16) + 3;
2057
+ counts.mid = randomNumber(4) + 1;
2058
+ counts.down = randomNumber(64) + 3;
2059
+ break;
2060
+ default:
2061
+ counts.up = randomNumber(8) + 1;
2062
+ counts.mid = randomNumber(6) / 2;
2063
+ counts.down = randomNumber(8) + 1;
2064
+ break;
2065
+ }
2066
+ var arr = [
2067
+ "up",
2068
+ "mid",
2069
+ "down"
2070
+ ];
2071
+ for (var d in arr) {
2072
+ var index = arr[d];
2073
+ for (var i = 0; i <= counts[index]; i++) if (options$1[index]) result = result + soul[index][randomNumber(soul[index].length)];
2074
+ }
2075
+ }
2076
+ return result;
2077
+ }
2078
+ return heComes(text, options);
2079
+ };
2080
+ });
2081
+ var require_america = __commonJSMin((exports, module) => {
2082
+ module["exports"] = function(colors$2) {
2083
+ return function(letter, i, exploded) {
2084
+ if (letter === " ") return letter;
2085
+ switch (i % 3) {
2086
+ case 0: return colors$2.red(letter);
2087
+ case 1: return colors$2.white(letter);
2088
+ case 2: return colors$2.blue(letter);
2089
+ }
2090
+ };
2091
+ };
2092
+ });
2093
+ var require_zebra = __commonJSMin((exports, module) => {
2094
+ module["exports"] = function(colors$2) {
2095
+ return function(letter, i, exploded) {
2096
+ return i % 2 === 0 ? letter : colors$2.inverse(letter);
2097
+ };
2098
+ };
2099
+ });
2100
+ var require_rainbow = __commonJSMin((exports, module) => {
2101
+ module["exports"] = function(colors$2) {
2102
+ var rainbowColors = [
2103
+ "red",
2104
+ "yellow",
2105
+ "green",
2106
+ "blue",
2107
+ "magenta"
2108
+ ];
2109
+ return function(letter, i, exploded) {
2110
+ if (letter === " ") return letter;
2111
+ else return colors$2[rainbowColors[i++ % rainbowColors.length]](letter);
2112
+ };
2113
+ };
2114
+ });
2115
+ var require_random = __commonJSMin((exports, module) => {
2116
+ module["exports"] = function(colors$2) {
2117
+ var available = [
2118
+ "underline",
2119
+ "inverse",
2120
+ "grey",
2121
+ "yellow",
2122
+ "red",
2123
+ "green",
2124
+ "blue",
2125
+ "white",
2126
+ "cyan",
2127
+ "magenta",
2128
+ "brightYellow",
2129
+ "brightRed",
2130
+ "brightGreen",
2131
+ "brightBlue",
2132
+ "brightWhite",
2133
+ "brightCyan",
2134
+ "brightMagenta"
2135
+ ];
2136
+ return function(letter, i, exploded) {
2137
+ return letter === " " ? letter : colors$2[available[Math.round(Math.random() * (available.length - 2))]](letter);
2138
+ };
2139
+ };
2140
+ });
2141
+ var require_colors = __commonJSMin((exports, module) => {
2142
+ var colors$1 = {};
2143
+ module["exports"] = colors$1;
2144
+ colors$1.themes = {};
2145
+ var util = __require("util");
2146
+ var ansiStyles = colors$1.styles = require_styles();
2147
+ var defineProps = Object.defineProperties;
2148
+ var newLineRegex = new RegExp(/[\r\n]+/g);
2149
+ colors$1.supportsColor = require_supports_colors().supportsColor;
2150
+ if (typeof colors$1.enabled === "undefined") colors$1.enabled = colors$1.supportsColor() !== false;
2151
+ colors$1.enable = function() {
2152
+ colors$1.enabled = true;
2153
+ };
2154
+ colors$1.disable = function() {
2155
+ colors$1.enabled = false;
2156
+ };
2157
+ colors$1.stripColors = colors$1.strip = function(str) {
2158
+ return ("" + str).replace(/\x1B\[\d+m/g, "");
2159
+ };
2160
+ var stylize = colors$1.stylize = function stylize$1(str, style) {
2161
+ if (!colors$1.enabled) return str + "";
2162
+ var styleMap = ansiStyles[style];
2163
+ if (!styleMap && style in colors$1) return colors$1[style](str);
2164
+ return styleMap.open + str + styleMap.close;
2165
+ };
2166
+ var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
2167
+ var escapeStringRegexp = function(str) {
2168
+ if (typeof str !== "string") throw new TypeError("Expected a string");
2169
+ return str.replace(matchOperatorsRe, "\\$&");
2170
+ };
2171
+ function build(_styles) {
2172
+ var builder = function builder$1() {
2173
+ return applyStyle.apply(builder$1, arguments);
2174
+ };
2175
+ builder._styles = _styles;
2176
+ builder.__proto__ = proto;
2177
+ return builder;
2178
+ }
2179
+ var styles = function() {
2180
+ var ret = {};
2181
+ ansiStyles.grey = ansiStyles.gray;
2182
+ Object.keys(ansiStyles).forEach(function(key) {
2183
+ ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g");
2184
+ ret[key] = { get: function() {
2185
+ return build(this._styles.concat(key));
2186
+ } };
2187
+ });
2188
+ return ret;
2189
+ }();
2190
+ var proto = defineProps(function colors$2() {}, styles);
2191
+ function applyStyle() {
2192
+ var args = Array.prototype.slice.call(arguments);
2193
+ var str = args.map(function(arg) {
2194
+ if (arg != null && arg.constructor === String) return arg;
2195
+ else return util.inspect(arg);
2196
+ }).join(" ");
2197
+ if (!colors$1.enabled || !str) return str;
2198
+ var newLinesPresent = str.indexOf("\n") != -1;
2199
+ var nestedStyles = this._styles;
2200
+ var i = nestedStyles.length;
2201
+ while (i--) {
2202
+ var code = ansiStyles[nestedStyles[i]];
2203
+ str = code.open + str.replace(code.closeRe, code.open) + code.close;
2204
+ if (newLinesPresent) str = str.replace(newLineRegex, function(match) {
2205
+ return code.close + match + code.open;
2206
+ });
2207
+ }
2208
+ return str;
2209
+ }
2210
+ colors$1.setTheme = function(theme) {
2211
+ if (typeof theme === "string") {
2212
+ console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");
2213
+ return;
2214
+ }
2215
+ for (var style in theme) (function(style$1) {
2216
+ colors$1[style$1] = function(str) {
2217
+ if (typeof theme[style$1] === "object") {
2218
+ var out = str;
2219
+ for (var i in theme[style$1]) out = colors$1[theme[style$1][i]](out);
2220
+ return out;
2221
+ }
2222
+ return colors$1[theme[style$1]](str);
2223
+ };
2224
+ })(style);
2225
+ };
2226
+ function init() {
2227
+ var ret = {};
2228
+ Object.keys(styles).forEach(function(name$1) {
2229
+ ret[name$1] = { get: function() {
2230
+ return build([name$1]);
2231
+ } };
2232
+ });
2233
+ return ret;
2234
+ }
2235
+ var sequencer = function sequencer$1(map$1, str) {
2236
+ var exploded = str.split("");
2237
+ exploded = exploded.map(map$1);
2238
+ return exploded.join("");
2239
+ };
2240
+ colors$1.trap = require_trap();
2241
+ colors$1.zalgo = require_zalgo();
2242
+ colors$1.maps = {};
2243
+ colors$1.maps.america = require_america()(colors$1);
2244
+ colors$1.maps.zebra = require_zebra()(colors$1);
2245
+ colors$1.maps.rainbow = require_rainbow()(colors$1);
2246
+ colors$1.maps.random = require_random()(colors$1);
2247
+ for (var map in colors$1.maps) (function(map$1) {
2248
+ colors$1[map$1] = function(str) {
2249
+ return sequencer(colors$1.maps[map$1], str);
2250
+ };
2251
+ })(map);
2252
+ defineProps(colors$1, init());
2253
+ });
2254
+ var require_safe = __commonJSMin((exports, module) => {
2255
+ var colors = require_colors();
2256
+ module["exports"] = colors;
2257
+ });
2258
+ var require_cell = __commonJSMin((exports, module) => {
2259
+ const { info, debug: debug$2 } = require_debug$1();
2260
+ const utils$1 = require_utils();
2261
+ var Cell$1 = class Cell$1 {
2262
+ /**
2263
+ * A representation of a cell within the table.
2264
+ * Implementations must have `init` and `draw` methods,
2265
+ * as well as `colSpan`, `rowSpan`, `desiredHeight` and `desiredWidth` properties.
2266
+ * @param options
2267
+ * @constructor
2268
+ */
2269
+ constructor(options) {
2270
+ this.setOptions(options);
2271
+ /**
2272
+ * Each cell will have it's `x` and `y` values set by the `layout-manager` prior to
2273
+ * `init` being called;
2274
+ * @type {Number}
2275
+ */
2276
+ this.x = null;
2277
+ this.y = null;
2278
+ }
2279
+ setOptions(options) {
2280
+ if ([
2281
+ "boolean",
2282
+ "number",
2283
+ "bigint",
2284
+ "string"
2285
+ ].indexOf(typeof options) !== -1) options = { content: "" + options };
2286
+ options = options || {};
2287
+ this.options = options;
2288
+ let content = options.content;
2289
+ if ([
2290
+ "boolean",
2291
+ "number",
2292
+ "bigint",
2293
+ "string"
2294
+ ].indexOf(typeof content) !== -1) this.content = String(content);
2295
+ else if (!content) this.content = this.options.href || "";
2296
+ else throw new Error("Content needs to be a primitive, got: " + typeof content);
2297
+ this.colSpan = options.colSpan || 1;
2298
+ this.rowSpan = options.rowSpan || 1;
2299
+ if (this.options.href) Object.defineProperty(this, "href", { get() {
2300
+ return this.options.href;
2301
+ } });
2302
+ }
2303
+ mergeTableOptions(tableOptions, cells) {
2304
+ this.cells = cells;
2305
+ let optionsChars = this.options.chars || {};
2306
+ let tableChars = tableOptions.chars;
2307
+ let chars = this.chars = {};
2308
+ CHAR_NAMES.forEach(function(name$1) {
2309
+ setOption(optionsChars, tableChars, name$1, chars);
2310
+ });
2311
+ this.truncate = this.options.truncate || tableOptions.truncate;
2312
+ let style = this.options.style = this.options.style || {};
2313
+ let tableStyle = tableOptions.style;
2314
+ setOption(style, tableStyle, "padding-left", this);
2315
+ setOption(style, tableStyle, "padding-right", this);
2316
+ this.head = style.head || tableStyle.head;
2317
+ this.border = style.border || tableStyle.border;
2318
+ this.fixedWidth = tableOptions.colWidths[this.x];
2319
+ this.lines = this.computeLines(tableOptions);
2320
+ this.desiredWidth = utils$1.strlen(this.content) + this.paddingLeft + this.paddingRight;
2321
+ this.desiredHeight = this.lines.length;
2322
+ }
2323
+ computeLines(tableOptions) {
2324
+ const tableWordWrap = tableOptions.wordWrap || tableOptions.textWrap;
2325
+ const { wordWrap: wordWrap$1 = tableWordWrap } = this.options;
2326
+ if (this.fixedWidth && wordWrap$1) {
2327
+ this.fixedWidth -= this.paddingLeft + this.paddingRight;
2328
+ if (this.colSpan) {
2329
+ let i = 1;
2330
+ while (i < this.colSpan) {
2331
+ this.fixedWidth += tableOptions.colWidths[this.x + i];
2332
+ i++;
2333
+ }
2334
+ }
2335
+ const { wrapOnWordBoundary: tableWrapOnWordBoundary = true } = tableOptions;
2336
+ const { wrapOnWordBoundary = tableWrapOnWordBoundary } = this.options;
2337
+ return this.wrapLines(utils$1.wordWrap(this.fixedWidth, this.content, wrapOnWordBoundary));
2338
+ }
2339
+ return this.wrapLines(this.content.split("\n"));
2340
+ }
2341
+ wrapLines(computedLines) {
2342
+ const lines = utils$1.colorizeLines(computedLines);
2343
+ if (this.href) return lines.map((line) => utils$1.hyperlink(this.href, line));
2344
+ return lines;
2345
+ }
2346
+ /**
2347
+ * Initializes the Cells data structure.
2348
+ *
2349
+ * @param tableOptions - A fully populated set of tableOptions.
2350
+ * In addition to the standard default values, tableOptions must have fully populated the
2351
+ * `colWidths` and `rowWidths` arrays. Those arrays must have lengths equal to the number
2352
+ * of columns or rows (respectively) in this table, and each array item must be a Number.
2353
+ *
2354
+ */
2355
+ init(tableOptions) {
2356
+ let x = this.x;
2357
+ let y = this.y;
2358
+ this.widths = tableOptions.colWidths.slice(x, x + this.colSpan);
2359
+ this.heights = tableOptions.rowHeights.slice(y, y + this.rowSpan);
2360
+ this.width = this.widths.reduce(sumPlusOne, -1);
2361
+ this.height = this.heights.reduce(sumPlusOne, -1);
2362
+ this.hAlign = this.options.hAlign || tableOptions.colAligns[x];
2363
+ this.vAlign = this.options.vAlign || tableOptions.rowAligns[y];
2364
+ this.drawRight = x + this.colSpan == tableOptions.colWidths.length;
2365
+ }
2366
+ /**
2367
+ * Draws the given line of the cell.
2368
+ * This default implementation defers to methods `drawTop`, `drawBottom`, `drawLine` and `drawEmpty`.
2369
+ * @param lineNum - can be `top`, `bottom` or a numerical line number.
2370
+ * @param spanningCell - will be a number if being called from a RowSpanCell, and will represent how
2371
+ * many rows below it's being called from. Otherwise it's undefined.
2372
+ * @returns {String} The representation of this line.
2373
+ */
2374
+ draw(lineNum, spanningCell) {
2375
+ if (lineNum == "top") return this.drawTop(this.drawRight);
2376
+ if (lineNum == "bottom") return this.drawBottom(this.drawRight);
2377
+ let content = utils$1.truncate(this.content, 10, this.truncate);
2378
+ if (!lineNum) info(`${this.y}-${this.x}: ${this.rowSpan - lineNum}x${this.colSpan} Cell ${content}`);
2379
+ let padLen = Math.max(this.height - this.lines.length, 0);
2380
+ let padTop;
2381
+ switch (this.vAlign) {
2382
+ case "center":
2383
+ padTop = Math.ceil(padLen / 2);
2384
+ break;
2385
+ case "bottom":
2386
+ padTop = padLen;
2387
+ break;
2388
+ default: padTop = 0;
2389
+ }
2390
+ if (lineNum < padTop || lineNum >= padTop + this.lines.length) return this.drawEmpty(this.drawRight, spanningCell);
2391
+ let forceTruncation = this.lines.length > this.height && lineNum + 1 >= this.height;
2392
+ return this.drawLine(lineNum - padTop, this.drawRight, forceTruncation, spanningCell);
2393
+ }
2394
+ /**
2395
+ * Renders the top line of the cell.
2396
+ * @param drawRight - true if this method should render the right edge of the cell.
2397
+ * @returns {String}
2398
+ */
2399
+ drawTop(drawRight) {
2400
+ let content = [];
2401
+ if (this.cells) this.widths.forEach(function(width, index) {
2402
+ content.push(this._topLeftChar(index));
2403
+ content.push(utils$1.repeat(this.chars[this.y == 0 ? "top" : "mid"], width));
2404
+ }, this);
2405
+ else {
2406
+ content.push(this._topLeftChar(0));
2407
+ content.push(utils$1.repeat(this.chars[this.y == 0 ? "top" : "mid"], this.width));
2408
+ }
2409
+ if (drawRight) content.push(this.chars[this.y == 0 ? "topRight" : "rightMid"]);
2410
+ return this.wrapWithStyleColors("border", content.join(""));
2411
+ }
2412
+ _topLeftChar(offset) {
2413
+ let x = this.x + offset;
2414
+ let leftChar;
2415
+ if (this.y == 0) leftChar = x == 0 ? "topLeft" : offset == 0 ? "topMid" : "top";
2416
+ else if (x == 0) leftChar = "leftMid";
2417
+ else {
2418
+ leftChar = offset == 0 ? "midMid" : "bottomMid";
2419
+ if (this.cells) {
2420
+ let spanAbove = this.cells[this.y - 1][x] instanceof Cell$1.ColSpanCell;
2421
+ if (spanAbove) leftChar = offset == 0 ? "topMid" : "mid";
2422
+ if (offset == 0) {
2423
+ let i = 1;
2424
+ while (this.cells[this.y][x - i] instanceof Cell$1.ColSpanCell) i++;
2425
+ if (this.cells[this.y][x - i] instanceof Cell$1.RowSpanCell) leftChar = "leftMid";
2426
+ }
2427
+ }
2428
+ }
2429
+ return this.chars[leftChar];
2430
+ }
2431
+ wrapWithStyleColors(styleProperty, content) {
2432
+ if (this[styleProperty] && this[styleProperty].length) try {
2433
+ let colors$2 = require_safe();
2434
+ for (let i = this[styleProperty].length - 1; i >= 0; i--) colors$2 = colors$2[this[styleProperty][i]];
2435
+ return colors$2(content);
2436
+ } catch (e) {
2437
+ return content;
2438
+ }
2439
+ else return content;
2440
+ }
2441
+ /**
2442
+ * Renders a line of text.
2443
+ * @param lineNum - Which line of text to render. This is not necessarily the line within the cell.
2444
+ * There may be top-padding above the first line of text.
2445
+ * @param drawRight - true if this method should render the right edge of the cell.
2446
+ * @param forceTruncationSymbol - `true` if the rendered text should end with the truncation symbol even
2447
+ * if the text fits. This is used when the cell is vertically truncated. If `false` the text should
2448
+ * only include the truncation symbol if the text will not fit horizontally within the cell width.
2449
+ * @param spanningCell - a number of if being called from a RowSpanCell. (how many rows below). otherwise undefined.
2450
+ * @returns {String}
2451
+ */
2452
+ drawLine(lineNum, drawRight, forceTruncationSymbol, spanningCell) {
2453
+ let left = this.chars[this.x == 0 ? "left" : "middle"];
2454
+ if (this.x && spanningCell && this.cells) {
2455
+ let cellLeft = this.cells[this.y + spanningCell][this.x - 1];
2456
+ while (cellLeft instanceof ColSpanCell$1) cellLeft = this.cells[cellLeft.y][cellLeft.x - 1];
2457
+ if (!(cellLeft instanceof RowSpanCell$1)) left = this.chars["rightMid"];
2458
+ }
2459
+ let leftPadding = utils$1.repeat(" ", this.paddingLeft);
2460
+ let right = drawRight ? this.chars["right"] : "";
2461
+ let rightPadding = utils$1.repeat(" ", this.paddingRight);
2462
+ let line = this.lines[lineNum];
2463
+ let len = this.width - (this.paddingLeft + this.paddingRight);
2464
+ if (forceTruncationSymbol) line += this.truncate || "…";
2465
+ let content = utils$1.truncate(line, len, this.truncate);
2466
+ content = utils$1.pad(content, len, " ", this.hAlign);
2467
+ content = leftPadding + content + rightPadding;
2468
+ return this.stylizeLine(left, content, right);
2469
+ }
2470
+ stylizeLine(left, content, right) {
2471
+ left = this.wrapWithStyleColors("border", left);
2472
+ right = this.wrapWithStyleColors("border", right);
2473
+ if (this.y === 0) content = this.wrapWithStyleColors("head", content);
2474
+ return left + content + right;
2475
+ }
2476
+ /**
2477
+ * Renders the bottom line of the cell.
2478
+ * @param drawRight - true if this method should render the right edge of the cell.
2479
+ * @returns {String}
2480
+ */
2481
+ drawBottom(drawRight) {
2482
+ let left = this.chars[this.x == 0 ? "bottomLeft" : "bottomMid"];
2483
+ let content = utils$1.repeat(this.chars.bottom, this.width);
2484
+ let right = drawRight ? this.chars["bottomRight"] : "";
2485
+ return this.wrapWithStyleColors("border", left + content + right);
2486
+ }
2487
+ /**
2488
+ * Renders a blank line of text within the cell. Used for top and/or bottom padding.
2489
+ * @param drawRight - true if this method should render the right edge of the cell.
2490
+ * @param spanningCell - a number of if being called from a RowSpanCell. (how many rows below). otherwise undefined.
2491
+ * @returns {String}
2492
+ */
2493
+ drawEmpty(drawRight, spanningCell) {
2494
+ let left = this.chars[this.x == 0 ? "left" : "middle"];
2495
+ if (this.x && spanningCell && this.cells) {
2496
+ let cellLeft = this.cells[this.y + spanningCell][this.x - 1];
2497
+ while (cellLeft instanceof ColSpanCell$1) cellLeft = this.cells[cellLeft.y][cellLeft.x - 1];
2498
+ if (!(cellLeft instanceof RowSpanCell$1)) left = this.chars["rightMid"];
2499
+ }
2500
+ let right = drawRight ? this.chars["right"] : "";
2501
+ let content = utils$1.repeat(" ", this.width);
2502
+ return this.stylizeLine(left, content, right);
2503
+ }
2504
+ };
2505
+ var ColSpanCell$1 = class {
2506
+ /**
2507
+ * A Cell that doesn't do anything. It just draws empty lines.
2508
+ * Used as a placeholder in column spanning.
2509
+ * @constructor
2510
+ */
2511
+ constructor() {}
2512
+ draw(lineNum) {
2513
+ if (typeof lineNum === "number") debug$2(`${this.y}-${this.x}: 1x1 ColSpanCell`);
2514
+ return "";
2515
+ }
2516
+ init() {}
2517
+ mergeTableOptions() {}
2518
+ };
2519
+ var RowSpanCell$1 = class {
2520
+ /**
2521
+ * A placeholder Cell for a Cell that spans multiple rows.
2522
+ * It delegates rendering to the original cell, but adds the appropriate offset.
2523
+ * @param originalCell
2524
+ * @constructor
2525
+ */
2526
+ constructor(originalCell) {
2527
+ this.originalCell = originalCell;
2528
+ }
2529
+ init(tableOptions) {
2530
+ let y = this.y;
2531
+ let originalY = this.originalCell.y;
2532
+ this.cellOffset = y - originalY;
2533
+ this.offset = findDimension(tableOptions.rowHeights, originalY, this.cellOffset);
2534
+ }
2535
+ draw(lineNum) {
2536
+ if (lineNum == "top") return this.originalCell.draw(this.offset, this.cellOffset);
2537
+ if (lineNum == "bottom") return this.originalCell.draw("bottom");
2538
+ debug$2(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`);
2539
+ return this.originalCell.draw(this.offset + 1 + lineNum);
2540
+ }
2541
+ mergeTableOptions() {}
2542
+ };
2543
+ function firstDefined(...args) {
2544
+ return args.filter((v) => v !== void 0 && v !== null).shift();
2545
+ }
2546
+ function setOption(objA, objB, nameB, targetObj) {
2547
+ let nameA = nameB.split("-");
2548
+ if (nameA.length > 1) {
2549
+ nameA[1] = nameA[1].charAt(0).toUpperCase() + nameA[1].substr(1);
2550
+ nameA = nameA.join("");
2551
+ targetObj[nameA] = firstDefined(objA[nameA], objA[nameB], objB[nameA], objB[nameB]);
2552
+ } else targetObj[nameB] = firstDefined(objA[nameB], objB[nameB]);
2553
+ }
2554
+ function findDimension(dimensionTable, startingIndex, span) {
2555
+ let ret = dimensionTable[startingIndex];
2556
+ for (let i = 1; i < span; i++) ret += 1 + dimensionTable[startingIndex + i];
2557
+ return ret;
2558
+ }
2559
+ function sumPlusOne(a, b) {
2560
+ return a + b + 1;
2561
+ }
2562
+ let CHAR_NAMES = [
2563
+ "top",
2564
+ "top-mid",
2565
+ "top-left",
2566
+ "top-right",
2567
+ "bottom",
2568
+ "bottom-mid",
2569
+ "bottom-left",
2570
+ "bottom-right",
2571
+ "left",
2572
+ "left-mid",
2573
+ "mid",
2574
+ "mid-mid",
2575
+ "right",
2576
+ "right-mid",
2577
+ "middle"
2578
+ ];
2579
+ module.exports = Cell$1;
2580
+ module.exports.ColSpanCell = ColSpanCell$1;
2581
+ module.exports.RowSpanCell = RowSpanCell$1;
2582
+ });
2583
+ var require_layout_manager = __commonJSMin((exports, module) => {
2584
+ const { warn, debug: debug$1 } = require_debug$1();
2585
+ const Cell = require_cell();
2586
+ const { ColSpanCell, RowSpanCell } = Cell;
2587
+ (function() {
2588
+ function next(alloc, col) {
2589
+ if (alloc[col] > 0) return next(alloc, col + 1);
2590
+ return col;
2591
+ }
2592
+ function layoutTable(table) {
2593
+ let alloc = {};
2594
+ table.forEach(function(row, rowIndex) {
2595
+ let col = 0;
2596
+ row.forEach(function(cell) {
2597
+ cell.y = rowIndex;
2598
+ cell.x = rowIndex ? next(alloc, col) : col;
2599
+ const rowSpan = cell.rowSpan || 1;
2600
+ const colSpan = cell.colSpan || 1;
2601
+ if (rowSpan > 1) for (let cs = 0; cs < colSpan; cs++) alloc[cell.x + cs] = rowSpan;
2602
+ col = cell.x + colSpan;
2603
+ });
2604
+ Object.keys(alloc).forEach((idx) => {
2605
+ alloc[idx]--;
2606
+ if (alloc[idx] < 1) delete alloc[idx];
2607
+ });
2608
+ });
2609
+ }
2610
+ function maxWidth(table) {
2611
+ let mw = 0;
2612
+ table.forEach(function(row) {
2613
+ row.forEach(function(cell) {
2614
+ mw = Math.max(mw, cell.x + (cell.colSpan || 1));
2615
+ });
2616
+ });
2617
+ return mw;
2618
+ }
2619
+ function maxHeight(table) {
2620
+ return table.length;
2621
+ }
2622
+ function cellsConflict(cell1, cell2) {
2623
+ let yMin1 = cell1.y;
2624
+ let yMax1 = cell1.y - 1 + (cell1.rowSpan || 1);
2625
+ let yMin2 = cell2.y;
2626
+ let yMax2 = cell2.y - 1 + (cell2.rowSpan || 1);
2627
+ let yConflict = !(yMin1 > yMax2 || yMin2 > yMax1);
2628
+ let xMin1 = cell1.x;
2629
+ let xMax1 = cell1.x - 1 + (cell1.colSpan || 1);
2630
+ let xMin2 = cell2.x;
2631
+ let xMax2 = cell2.x - 1 + (cell2.colSpan || 1);
2632
+ let xConflict = !(xMin1 > xMax2 || xMin2 > xMax1);
2633
+ return yConflict && xConflict;
2634
+ }
2635
+ function conflictExists(rows, x, y) {
2636
+ let i_max = Math.min(rows.length - 1, y);
2637
+ let cell = {
2638
+ x,
2639
+ y
2640
+ };
2641
+ for (let i = 0; i <= i_max; i++) {
2642
+ let row = rows[i];
2643
+ for (let j = 0; j < row.length; j++) if (cellsConflict(cell, row[j])) return true;
2644
+ }
2645
+ return false;
2646
+ }
2647
+ function allBlank(rows, y, xMin, xMax) {
2648
+ for (let x = xMin; x < xMax; x++) if (conflictExists(rows, x, y)) return false;
2649
+ return true;
2650
+ }
2651
+ function addRowSpanCells(table) {
2652
+ table.forEach(function(row, rowIndex) {
2653
+ row.forEach(function(cell) {
2654
+ for (let i = 1; i < cell.rowSpan; i++) {
2655
+ let rowSpanCell = new RowSpanCell(cell);
2656
+ rowSpanCell.x = cell.x;
2657
+ rowSpanCell.y = cell.y + i;
2658
+ rowSpanCell.colSpan = cell.colSpan;
2659
+ insertCell(rowSpanCell, table[rowIndex + i]);
2660
+ }
2661
+ });
2662
+ });
2663
+ }
2664
+ function addColSpanCells(cellRows) {
2665
+ for (let rowIndex = cellRows.length - 1; rowIndex >= 0; rowIndex--) {
2666
+ let cellColumns = cellRows[rowIndex];
2667
+ for (let columnIndex = 0; columnIndex < cellColumns.length; columnIndex++) {
2668
+ let cell = cellColumns[columnIndex];
2669
+ for (let k = 1; k < cell.colSpan; k++) {
2670
+ let colSpanCell = new ColSpanCell();
2671
+ colSpanCell.x = cell.x + k;
2672
+ colSpanCell.y = cell.y;
2673
+ cellColumns.splice(columnIndex + 1, 0, colSpanCell);
2674
+ }
2675
+ }
2676
+ }
2677
+ }
2678
+ function insertCell(cell, row) {
2679
+ let x = 0;
2680
+ while (x < row.length && row[x].x < cell.x) x++;
2681
+ row.splice(x, 0, cell);
2682
+ }
2683
+ function fillInTable(table) {
2684
+ let h_max = maxHeight(table);
2685
+ let w_max = maxWidth(table);
2686
+ debug$1(`Max rows: ${h_max}; Max cols: ${w_max}`);
2687
+ for (let y = 0; y < h_max; y++) for (let x = 0; x < w_max; x++) if (!conflictExists(table, x, y)) {
2688
+ let opts = {
2689
+ x,
2690
+ y,
2691
+ colSpan: 1,
2692
+ rowSpan: 1
2693
+ };
2694
+ x++;
2695
+ while (x < w_max && !conflictExists(table, x, y)) {
2696
+ opts.colSpan++;
2697
+ x++;
2698
+ }
2699
+ let y2 = y + 1;
2700
+ while (y2 < h_max && allBlank(table, y2, opts.x, opts.x + opts.colSpan)) {
2701
+ opts.rowSpan++;
2702
+ y2++;
2703
+ }
2704
+ let cell = new Cell(opts);
2705
+ cell.x = opts.x;
2706
+ cell.y = opts.y;
2707
+ warn(`Missing cell at ${cell.y}-${cell.x}.`);
2708
+ insertCell(cell, table[y]);
2709
+ }
2710
+ }
2711
+ function generateCells(rows) {
2712
+ return rows.map(function(row) {
2713
+ if (!Array.isArray(row)) {
2714
+ let key = Object.keys(row)[0];
2715
+ row = row[key];
2716
+ if (Array.isArray(row)) {
2717
+ row = row.slice();
2718
+ row.unshift(key);
2719
+ } else row = [key, row];
2720
+ }
2721
+ return row.map(function(cell) {
2722
+ return new Cell(cell);
2723
+ });
2724
+ });
2725
+ }
2726
+ function makeTableLayout(rows) {
2727
+ let cellRows = generateCells(rows);
2728
+ layoutTable(cellRows);
2729
+ fillInTable(cellRows);
2730
+ addRowSpanCells(cellRows);
2731
+ addColSpanCells(cellRows);
2732
+ return cellRows;
2733
+ }
2734
+ module.exports = {
2735
+ makeTableLayout,
2736
+ layoutTable,
2737
+ addRowSpanCells,
2738
+ maxWidth,
2739
+ fillInTable,
2740
+ computeWidths: makeComputeWidths("colSpan", "desiredWidth", "x", 1),
2741
+ computeHeights: makeComputeWidths("rowSpan", "desiredHeight", "y", 1)
2742
+ };
2743
+ })();
2744
+ function makeComputeWidths(colSpan, desiredWidth, x, forcedMin) {
2745
+ return function(vals, table) {
2746
+ let result = [];
2747
+ let spanners = [];
2748
+ let auto = {};
2749
+ table.forEach(function(row) {
2750
+ row.forEach(function(cell) {
2751
+ if ((cell[colSpan] || 1) > 1) spanners.push(cell);
2752
+ else result[cell[x]] = Math.max(result[cell[x]] || 0, cell[desiredWidth] || 0, forcedMin);
2753
+ });
2754
+ });
2755
+ vals.forEach(function(val, index) {
2756
+ if (typeof val === "number") result[index] = val;
2757
+ });
2758
+ for (let k = spanners.length - 1; k >= 0; k--) {
2759
+ let cell = spanners[k];
2760
+ let span = cell[colSpan];
2761
+ let col = cell[x];
2762
+ let existingWidth = result[col];
2763
+ let editableCols = typeof vals[col] === "number" ? 0 : 1;
2764
+ if (typeof existingWidth === "number") for (let i = 1; i < span; i++) {
2765
+ existingWidth += 1 + result[col + i];
2766
+ if (typeof vals[col + i] !== "number") editableCols++;
2767
+ }
2768
+ else {
2769
+ existingWidth = desiredWidth === "desiredWidth" ? cell.desiredWidth - 1 : 1;
2770
+ if (!auto[col] || auto[col] < existingWidth) auto[col] = existingWidth;
2771
+ }
2772
+ if (cell[desiredWidth] > existingWidth) {
2773
+ let i = 0;
2774
+ while (editableCols > 0 && cell[desiredWidth] > existingWidth) {
2775
+ if (typeof vals[col + i] !== "number") {
2776
+ let dif = Math.round((cell[desiredWidth] - existingWidth) / editableCols);
2777
+ existingWidth += dif;
2778
+ result[col + i] += dif;
2779
+ editableCols--;
2780
+ }
2781
+ i++;
2782
+ }
2783
+ }
2784
+ }
2785
+ Object.assign(vals, result, auto);
2786
+ for (let j = 0; j < vals.length; j++) vals[j] = Math.max(forcedMin, vals[j] || 0);
2787
+ };
2788
+ }
2789
+ });
2790
+ var require_table = __commonJSMin((exports, module) => {
2791
+ const debug = require_debug$1();
2792
+ const utils = require_utils();
2793
+ const tableLayout = require_layout_manager();
2794
+ var Table$1 = class extends Array {
2795
+ constructor(opts) {
2796
+ super();
2797
+ const options = utils.mergeOptions(opts);
2798
+ Object.defineProperty(this, "options", {
2799
+ value: options,
2800
+ enumerable: options.debug
2801
+ });
2802
+ if (options.debug) {
2803
+ switch (typeof options.debug) {
2804
+ case "boolean":
2805
+ debug.setDebugLevel(debug.WARN);
2806
+ break;
2807
+ case "number":
2808
+ debug.setDebugLevel(options.debug);
2809
+ break;
2810
+ case "string":
2811
+ debug.setDebugLevel(parseInt(options.debug, 10));
2812
+ break;
2813
+ default:
2814
+ debug.setDebugLevel(debug.WARN);
2815
+ debug.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof options.debug}`);
2816
+ }
2817
+ Object.defineProperty(this, "messages", { get() {
2818
+ return debug.debugMessages();
2819
+ } });
2820
+ }
2821
+ }
2822
+ toString() {
2823
+ let array = this;
2824
+ let headersPresent = this.options.head && this.options.head.length;
2825
+ if (headersPresent) {
2826
+ array = [this.options.head];
2827
+ if (this.length) array.push.apply(array, this);
2828
+ } else this.options.style.head = [];
2829
+ let cells = tableLayout.makeTableLayout(array);
2830
+ cells.forEach(function(row) {
2831
+ row.forEach(function(cell) {
2832
+ cell.mergeTableOptions(this.options, cells);
2833
+ }, this);
2834
+ }, this);
2835
+ tableLayout.computeWidths(this.options.colWidths, cells);
2836
+ tableLayout.computeHeights(this.options.rowHeights, cells);
2837
+ cells.forEach(function(row) {
2838
+ row.forEach(function(cell) {
2839
+ cell.init(this.options);
2840
+ }, this);
2841
+ }, this);
2842
+ let result = [];
2843
+ for (let rowIndex = 0; rowIndex < cells.length; rowIndex++) {
2844
+ let row = cells[rowIndex];
2845
+ let heightOfRow = this.options.rowHeights[rowIndex];
2846
+ if (rowIndex === 0 || !this.options.style.compact || rowIndex == 1 && headersPresent) doDraw(row, "top", result);
2847
+ for (let lineNum = 0; lineNum < heightOfRow; lineNum++) doDraw(row, lineNum, result);
2848
+ if (rowIndex + 1 == cells.length) doDraw(row, "bottom", result);
2849
+ }
2850
+ return result.join("\n");
2851
+ }
2852
+ get width() {
2853
+ let str = this.toString().split("\n");
2854
+ return str[0].length;
2855
+ }
2856
+ };
2857
+ Table$1.reset = () => debug.reset();
2858
+ function doDraw(row, lineNum, result) {
2859
+ let line = [];
2860
+ row.forEach(function(cell) {
2861
+ line.push(cell.draw(lineNum));
2862
+ });
2863
+ let str = line.join("");
2864
+ if (str.length) result.push(str);
2865
+ }
2866
+ module.exports = Table$1;
2867
+ });
2868
+ var require_cli_table3 = __commonJSMin((exports, module) => {
2869
+ module.exports = require_table();
2870
+ });
2871
+ function ansiRegex({ onlyFirst = false } = {}) {
2872
+ const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
2873
+ const pattern = [`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`, "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
2874
+ return new RegExp(pattern, onlyFirst ? void 0 : "g");
2875
+ }
2876
+ const regex = ansiRegex();
2877
+ function stripAnsi(string) {
2878
+ if (typeof string !== "string") throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
2879
+ return string.replace(regex, "");
2880
+ }
2881
+ function isAmbiguous(x) {
2882
+ return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
2883
+ }
2884
+ function isFullWidth(x) {
2885
+ return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
2886
+ }
2887
+ function isWide(x) {
2888
+ return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101631 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129673 || x >= 129679 && x <= 129734 || x >= 129742 && x <= 129756 || x >= 129759 && x <= 129769 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
2889
+ }
2890
+ function validate(codePoint) {
2891
+ if (!Number.isSafeInteger(codePoint)) throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
2892
+ }
2893
+ function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
2894
+ validate(codePoint);
2895
+ if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) return 2;
2896
+ return 1;
2897
+ }
2898
+ var require_emoji_regex = __commonJSMin((exports, module) => {
2899
+ module.exports = () => {
2900
+ 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\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](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\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]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\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])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\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-\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]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\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(?:[\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\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\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-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\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-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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;
2901
+ };
2902
+ });
2903
+ var import_emoji_regex = __toESM(require_emoji_regex(), 1);
2904
+ const segmenter = new Intl.Segmenter();
2905
+ const defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
2906
+ function stringWidth(string, options = {}) {
2907
+ if (typeof string !== "string" || string.length === 0) return 0;
2908
+ const { ambiguousIsNarrow = true, countAnsiEscapeCodes = false } = options;
2909
+ if (!countAnsiEscapeCodes) string = stripAnsi(string);
2910
+ if (string.length === 0) return 0;
2911
+ let width = 0;
2912
+ const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
2913
+ for (const { segment: character } of segmenter.segment(string)) {
2914
+ const codePoint = character.codePointAt(0);
2915
+ if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) continue;
2916
+ if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) continue;
2917
+ if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) continue;
2918
+ if (codePoint >= 55296 && codePoint <= 57343) continue;
2919
+ if (codePoint >= 65024 && codePoint <= 65039) continue;
2920
+ if (defaultIgnorableCodePointRegex.test(character)) continue;
2921
+ if ((0, import_emoji_regex.default)().test(character)) {
2922
+ width += 2;
2923
+ continue;
2924
+ }
2925
+ width += eastAsianWidth(codePoint, eastAsianWidthOptions);
2926
+ }
2927
+ return width;
2928
+ }
2929
+ var import_cli_table3 = __toESM(require_cli_table3(), 1);
1287
2930
  var import_picocolors$4 = __toESM(require_picocolors(), 1);
2931
+ /**
2932
+ * Responsive table class that adapts column widths based on terminal size
2933
+ * Automatically adjusts formatting and layout for different screen sizes
2934
+ */
2935
+ var ResponsiveTable = class {
2936
+ head;
2937
+ rows = [];
2938
+ colAligns;
2939
+ style;
2940
+ dateFormatter;
2941
+ /**
2942
+ * Creates a new responsive table instance
2943
+ * @param options - Table configuration options
2944
+ */
2945
+ constructor(options) {
2946
+ this.head = options.head;
2947
+ this.colAligns = options.colAligns ?? Array.from({ length: this.head.length }, () => "left");
2948
+ this.style = options.style;
2949
+ this.dateFormatter = options.dateFormatter;
2950
+ }
2951
+ /**
2952
+ * Adds a row to the table
2953
+ * @param row - Row data to add
2954
+ */
2955
+ push(row) {
2956
+ this.rows.push(row);
2957
+ }
2958
+ /**
2959
+ * Renders the table as a formatted string
2960
+ * Automatically adjusts layout based on terminal width
2961
+ * @returns Formatted table string
2962
+ */
2963
+ toString() {
2964
+ const terminalWidth = process$1.stdout.columns || 120;
2965
+ const dataRows = this.rows.filter((row) => !this.isSeparatorRow(row));
2966
+ const allRows = [this.head.map(String), ...dataRows.map((row) => row.map((cell) => {
2967
+ if (typeof cell === "object" && cell != null && "content" in cell) return String(cell.content);
2968
+ return String(cell ?? "");
2969
+ }))];
2970
+ const contentWidths = this.head.map((_, colIndex) => {
2971
+ const maxLength = Math.max(...allRows.map((row) => stringWidth(String(row[colIndex] ?? ""))));
2972
+ return maxLength;
2973
+ });
2974
+ const numColumns = this.head.length;
2975
+ const tableOverhead = 3 * numColumns + 1;
2976
+ const availableWidth = terminalWidth - tableOverhead;
2977
+ const columnWidths = contentWidths.map((width, index) => {
2978
+ const align = this.colAligns[index];
2979
+ if (align === "right") return Math.max(width + 3, 11);
2980
+ else if (index === 1) return Math.max(width + 2, 15);
2981
+ return Math.max(width + 2, 10);
2982
+ });
2983
+ const totalRequiredWidth = columnWidths.reduce((sum, width) => sum + width, 0) + tableOverhead;
2984
+ if (totalRequiredWidth > terminalWidth) {
2985
+ const scaleFactor = availableWidth / columnWidths.reduce((sum, width) => sum + width, 0);
2986
+ const adjustedWidths = columnWidths.map((width, index) => {
2987
+ const align = this.colAligns[index];
2988
+ let adjustedWidth = Math.floor(width * scaleFactor);
2989
+ if (align === "right") adjustedWidth = Math.max(adjustedWidth, 10);
2990
+ else if (index === 0) adjustedWidth = Math.max(adjustedWidth, 10);
2991
+ else if (index === 1) adjustedWidth = Math.max(adjustedWidth, 12);
2992
+ else adjustedWidth = Math.max(adjustedWidth, 8);
2993
+ return adjustedWidth;
2994
+ });
2995
+ const table = new import_cli_table3.default({
2996
+ head: this.head,
2997
+ style: this.style,
2998
+ colAligns: this.colAligns,
2999
+ colWidths: adjustedWidths,
3000
+ wordWrap: true,
3001
+ wrapOnWordBoundary: true
3002
+ });
3003
+ for (const row of this.rows) if (this.isSeparatorRow(row)) continue;
3004
+ else {
3005
+ const processedRow = row.map((cell, index) => {
3006
+ if (index === 0 && this.dateFormatter != null && typeof cell === "string" && this.isDateString(cell)) return this.dateFormatter(cell);
3007
+ return cell;
3008
+ });
3009
+ table.push(processedRow);
3010
+ }
3011
+ return table.toString();
3012
+ } else {
3013
+ const table = new import_cli_table3.default({
3014
+ head: this.head,
3015
+ style: this.style,
3016
+ colAligns: this.colAligns,
3017
+ colWidths: columnWidths,
3018
+ wordWrap: true,
3019
+ wrapOnWordBoundary: true
3020
+ });
3021
+ for (const row of this.rows) if (this.isSeparatorRow(row)) continue;
3022
+ else table.push(row);
3023
+ return table.toString();
3024
+ }
3025
+ }
3026
+ /**
3027
+ * Checks if a row is a separator row (contains only empty cells or dashes)
3028
+ * @param row - Row to check
3029
+ * @returns True if the row is a separator
3030
+ */
3031
+ isSeparatorRow(row) {
3032
+ return row.every((cell) => {
3033
+ if (typeof cell === "object" && cell != null && "content" in cell) return cell.content === "" || /^─+$/.test(cell.content);
3034
+ return typeof cell === "string" && (cell === "" || /^─+$/.test(cell));
3035
+ });
3036
+ }
3037
+ /**
3038
+ * Checks if a string matches the YYYY-MM-DD date format
3039
+ * @param text - String to check
3040
+ * @returns True if the string is a valid date format
3041
+ */
3042
+ isDateString(text) {
3043
+ return /^\d{4}-\d{2}-\d{2}$/.test(text);
3044
+ }
3045
+ };
3046
+ /**
3047
+ * Formats a number with locale-specific thousand separators
3048
+ * @param num - The number to format
3049
+ * @returns Formatted number string with commas as thousand separators
3050
+ */
1288
3051
  function formatNumber(num) {
1289
3052
  return num.toLocaleString("en-US");
1290
3053
  }
3054
+ /**
3055
+ * Formats a number as USD currency with dollar sign and 2 decimal places
3056
+ * @param amount - The amount to format
3057
+ * @returns Formatted currency string (e.g., "$12.34")
3058
+ */
1291
3059
  function formatCurrency(amount) {
1292
3060
  return `$${amount.toFixed(2)}`;
1293
3061
  }
3062
+ /**
3063
+ * Formats Claude model names into a shorter, more readable format
3064
+ * Extracts model type and generation from full model name
3065
+ * @param modelName - Full model name (e.g., "claude-sonnet-4-20250514")
3066
+ * @returns Shortened model name (e.g., "sonnet-4") or original if pattern doesn't match
3067
+ */
1294
3068
  function formatModelName(modelName) {
1295
3069
  const match = modelName.match(/claude-(\w+)-(\d+)-\d+/);
1296
3070
  if (match != null) return `${match[1]}-${match[2]}`;
1297
3071
  return modelName;
1298
3072
  }
3073
+ /**
3074
+ * Formats an array of model names for display as a comma-separated string
3075
+ * Removes duplicates and sorts alphabetically
3076
+ * @param models - Array of model names
3077
+ * @returns Formatted string with unique, sorted model names separated by commas
3078
+ */
1299
3079
  function formatModelsDisplay(models) {
1300
3080
  const uniqueModels = [...new Set(models.map(formatModelName))];
1301
3081
  return uniqueModels.sort().join(", ");
@@ -1318,14 +3098,29 @@ function pushBreakdownRows(table, breakdowns, extraColumns = 1, trailingColumns
1318
3098
  table.push(row);
1319
3099
  }
1320
3100
  }
1321
-
1322
- //#endregion
1323
- //#region src/commands/blocks.ts
1324
3101
  var import_picocolors$3 = __toESM(require_picocolors(), 1);
3102
+ /**
3103
+ * Default number of recent days to show in blocks view
3104
+ */
1325
3105
  const RECENT_DAYS_DEFAULT = 3;
3106
+ /**
3107
+ * Threshold percentage for showing usage warnings (80%)
3108
+ */
1326
3109
  const WARNING_THRESHOLD = .8;
3110
+ /**
3111
+ * Terminal width threshold for switching to compact display mode
3112
+ */
1327
3113
  const COMPACT_WIDTH_THRESHOLD = 120;
3114
+ /**
3115
+ * Default terminal width when stdout.columns is not available
3116
+ */
1328
3117
  const DEFAULT_TERMINAL_WIDTH = 120;
3118
+ /**
3119
+ * Formats the time display for a session block
3120
+ * @param block - Session block to format
3121
+ * @param compact - Whether to use compact formatting for narrow terminals
3122
+ * @returns Formatted time string with duration and status information
3123
+ */
1329
3124
  function formatBlockTime(block, compact = false) {
1330
3125
  const start = compact ? block.startTime.toLocaleString(void 0, {
1331
3126
  month: "2-digit",
@@ -1359,10 +3154,22 @@ function formatBlockTime(block, compact = false) {
1359
3154
  if (hours > 0) return `${start} (${hours}h ${mins}m)`;
1360
3155
  return `${start} (${mins}m)`;
1361
3156
  }
3157
+ /**
3158
+ * Formats the list of models used in a block for display
3159
+ * @param models - Array of model names
3160
+ * @param compact - Whether to use compact formatting (unused currently)
3161
+ * @returns Formatted model names string
3162
+ */
1362
3163
  function formatModels(models, compact = false) {
1363
3164
  if (models.length === 0) return "-";
1364
3165
  return compact ? formatModelsDisplay(models) : formatModelsDisplay(models);
1365
3166
  }
3167
+ /**
3168
+ * Parses token limit argument, supporting 'max' keyword
3169
+ * @param value - Token limit string value
3170
+ * @param maxFromAll - Maximum token count found in all blocks
3171
+ * @returns Parsed token limit or undefined if invalid
3172
+ */
1366
3173
  function parseTokenLimit(value, maxFromAll) {
1367
3174
  if (value == null || value === "") return void 0;
1368
3175
  if (value === "max") return maxFromAll > 0 ? maxFromAll : void 0;
@@ -1371,7 +3178,7 @@ function parseTokenLimit(value, maxFromAll) {
1371
3178
  }
1372
3179
  const blocksCommand = define({
1373
3180
  name: "blocks",
1374
- description: "Show usage report grouped by 5-hour billing blocks",
3181
+ description: "Show usage report grouped by session billing blocks",
1375
3182
  args: {
1376
3183
  ...sharedCommandConfig.args,
1377
3184
  active: {
@@ -1390,17 +3197,28 @@ const blocksCommand = define({
1390
3197
  type: "string",
1391
3198
  short: "t",
1392
3199
  description: "Token limit for quota warnings (e.g., 500000 or \"max\" for highest previous block)"
3200
+ },
3201
+ sessionLength: {
3202
+ type: "number",
3203
+ short: "l",
3204
+ description: `Session block duration in hours (default: ${DEFAULT_SESSION_DURATION_HOURS})`,
3205
+ default: DEFAULT_SESSION_DURATION_HOURS
1393
3206
  }
1394
3207
  },
1395
3208
  toKebab: true,
1396
3209
  async run(ctx) {
1397
3210
  if (ctx.values.json) logger.level = 0;
1398
- let blocks = await loadFiveHourBlockData({
3211
+ if (ctx.values.sessionLength <= 0) {
3212
+ logger.error("Session length must be a positive number");
3213
+ process$1.exit(1);
3214
+ }
3215
+ let blocks = await loadSessionBlockData({
1399
3216
  since: ctx.values.since,
1400
3217
  until: ctx.values.until,
1401
3218
  claudePath: getDefaultClaudePath(),
1402
3219
  mode: ctx.values.mode,
1403
- order: ctx.values.order
3220
+ order: ctx.values.order,
3221
+ sessionDurationHours: ctx.values.sessionLength
1404
3222
  });
1405
3223
  if (blocks.length === 0) {
1406
3224
  if (ctx.values.json) log(JSON.stringify({ blocks: [] }));
@@ -1423,7 +3241,7 @@ const blocksCommand = define({
1423
3241
  blocks: [],
1424
3242
  message: "No active block"
1425
3243
  }));
1426
- else logger.info("No active 5-hour block found.");
3244
+ else logger.info("No active session block found.");
1427
3245
  process$1.exit(0);
1428
3246
  }
1429
3247
  }
@@ -1465,7 +3283,7 @@ const blocksCommand = define({
1465
3283
  }
1466
3284
  const burnRate = calculateBurnRate(block);
1467
3285
  const projection = projectBlockUsage(block);
1468
- logger.box("Current 5-Hour Block Status");
3286
+ logger.box("Current Session Block Status");
1469
3287
  const now = /* @__PURE__ */ new Date();
1470
3288
  const elapsed = Math.round((now.getTime() - block.startTime.getTime()) / (1e3 * 60));
1471
3289
  const remaining = Math.round((block.endTime.getTime() - now.getTime()) / (1e3 * 60));
@@ -1500,7 +3318,7 @@ const blocksCommand = define({
1500
3318
  }
1501
3319
  }
1502
3320
  } else {
1503
- logger.box("Claude Code Token Usage Report - 5-Hour Blocks");
3321
+ logger.box("Claude Code Token Usage Report - Session Blocks");
1504
3322
  const actualTokenLimit = parseTokenLimit(ctx.values.tokenLimit, maxTokensFromAll);
1505
3323
  const tableHeaders = [
1506
3324
  "Block Start",
@@ -1600,9 +3418,6 @@ const blocksCommand = define({
1600
3418
  }
1601
3419
  }
1602
3420
  });
1603
-
1604
- //#endregion
1605
- //#region src/commands/daily.ts
1606
3421
  var import_picocolors$2 = __toESM(require_picocolors(), 1);
1607
3422
  const dailyCommand = define({
1608
3423
  name: "daily",
@@ -1707,9 +3522,6 @@ const dailyCommand = define({
1707
3522
  }
1708
3523
  }
1709
3524
  });
1710
-
1711
- //#endregion
1712
- //#region src/commands/mcp.ts
1713
3525
  const mcpCommand = define({
1714
3526
  name: "mcp",
1715
3527
  description: "Show usage report for MCP",
@@ -1741,9 +3553,6 @@ const mcpCommand = define({
1741
3553
  } : { transportType: "stdio" });
1742
3554
  }
1743
3555
  });
1744
-
1745
- //#endregion
1746
- //#region src/commands/monthly.ts
1747
3556
  var import_picocolors$1 = __toESM(require_picocolors(), 1);
1748
3557
  const monthlyCommand = define({
1749
3558
  name: "monthly",
@@ -1860,9 +3669,6 @@ const monthlyCommand = define({
1860
3669
  }
1861
3670
  }
1862
3671
  });
1863
-
1864
- //#endregion
1865
- //#region src/commands/session.ts
1866
3672
  var import_picocolors = __toESM(require_picocolors(), 1);
1867
3673
  const sessionCommand = define({
1868
3674
  name: "session",
@@ -1976,15 +3782,18 @@ const sessionCommand = define({
1976
3782
  }
1977
3783
  }
1978
3784
  });
1979
-
1980
- //#endregion
1981
- //#region src/commands/index.ts
3785
+ /**
3786
+ * Map of available CLI subcommands
3787
+ */
1982
3788
  const subCommands = /* @__PURE__ */ new Map();
1983
3789
  subCommands.set("daily", dailyCommand);
1984
3790
  subCommands.set("monthly", monthlyCommand);
1985
3791
  subCommands.set("session", sessionCommand);
1986
3792
  subCommands.set("blocks", blocksCommand);
1987
3793
  subCommands.set("mcp", mcpCommand);
3794
+ /**
3795
+ * Default command when no subcommand is specified (defaults to daily)
3796
+ */
1988
3797
  const mainCommand = dailyCommand;
1989
3798
  await cli(process$1.argv.slice(2), mainCommand, {
1990
3799
  name,
@@ -1993,5 +3802,3 @@ await cli(process$1.argv.slice(2), mainCommand, {
1993
3802
  subCommands,
1994
3803
  renderHeader: null
1995
3804
  });
1996
-
1997
- //#endregion