@shopify/create-app 4.9.4 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/{analytics-7RLRFLCQ.js → analytics-NVXLO3J4.js} +19 -18
  2. package/dist/analytics-WSNO62UE.js +41 -0
  3. package/dist/{chunk-75IKCZVA.js → chunk-3S4LYDKB.js} +7 -7
  4. package/dist/{chunk-L6MEGCFP.js → chunk-77MCGVDL.js} +2 -2
  5. package/dist/{chunk-C3P3BBJI.js → chunk-C7SNAAK3.js} +3 -2
  6. package/dist/{chunk-NN45GPHA.js → chunk-CXCQOKSC.js} +5 -5
  7. package/dist/{chunk-7EY7VZVX.js → chunk-D7A5DYKK.js} +10 -4
  8. package/dist/{chunk-RRQPXOTA.js → chunk-DIOGWWS3.js} +2 -2
  9. package/dist/{json-error-XFVCG7UX.js → chunk-DIYGDUU2.js} +9 -39
  10. package/dist/{chunk-PUN2NAT5.js → chunk-DKAJC4S3.js} +104 -1407
  11. package/dist/{chunk-A33KVF5C.js → chunk-E4XG6SVI.js} +1 -1
  12. package/dist/{chunk-TLGD6UXP.js → chunk-F5VM2BG4.js} +202 -79
  13. package/dist/chunk-GLO2DI4E.js +3036 -0
  14. package/dist/{chunk-ATS65VTD.js → chunk-J53FSF5Q.js} +3 -3
  15. package/dist/{chunk-IIDLK3B2.js → chunk-J6OB5R2E.js} +2 -2
  16. package/dist/{chunk-57VCTLOQ.js → chunk-JZFZ3JYG.js} +7 -2
  17. package/dist/{chunk-6BEAY6DV.js → chunk-L6U3W2XC.js} +8 -9
  18. package/dist/{chunk-52LPDF46.js → chunk-LQDG3VBX.js} +15 -12
  19. package/dist/{chunk-IG7O7GU7.js → chunk-MRUYZVYJ.js} +5 -3
  20. package/dist/{chunk-TJDRI2KO.js → chunk-S3XZMGTD.js} +13 -13
  21. package/dist/{chunk-IYZRNCTE.js → chunk-TES7JZAA.js} +13 -11
  22. package/dist/chunk-UJ5OJF5L.js +47 -0
  23. package/dist/{chunk-DXHBESFY.js → chunk-VHVI7YNQ.js} +43 -4
  24. package/dist/{chunk-QLLL4VIM.js → chunk-VKOB4EDC.js} +17 -3040
  25. package/dist/{chunk-VDSENONW.js → chunk-XP6ZAZM3.js} +7 -7
  26. package/dist/{chunk-53A2QBFH.js → chunk-YCTA633Q.js} +16 -16
  27. package/dist/{chunk-EJEHENXO.js → chunk-YYP4UTTA.js} +1 -2
  28. package/dist/{chunk-MNUDC2IF.js → chunk-ZNGF52JY.js} +2 -2
  29. package/dist/command-event-context-I6WEUQYW.js +12 -0
  30. package/dist/{command-json-schema-LA7ZVL4O.js → command-json-schema-NFKBCUYJ.js} +15 -12
  31. package/dist/{conf-store-NRFTTQPX.js → conf-store-F5RVQXAB.js} +9 -8
  32. package/dist/{custom-oclif-loader-WGQ253VO.js → custom-oclif-loader-JCV5BKJY.js} +10 -9
  33. package/dist/{deprecations-WHQU454D.js → deprecations-D6NF6OMP.js} +15 -14
  34. package/dist/{environment-5XBFWY2A.js → environment-3MKMYTQQ.js} +4 -4
  35. package/dist/environments-RFS64LOU.js +33 -0
  36. package/dist/{error-handler-MENPWWOI.js → error-handler-JY4HXOW5.js} +19 -18
  37. package/dist/{fs-SDWO6JOY.js → fs-7KG7OY2Z.js} +7 -6
  38. package/dist/hooks/postrun.js +8 -7
  39. package/dist/hooks/prerun.js +6 -6
  40. package/dist/index.js +11718 -8172
  41. package/dist/{is-global-JQIYTGBN.js → is-global-3E5IDVMO.js} +7 -6
  42. package/dist/json-error-NQH2L57S.js +48 -0
  43. package/dist/{lib-NYDMHWZM.js → lib-7M7VJIRB.js} +2 -2
  44. package/dist/{local-G2BSQFFH.js → local-ZKE22RLD.js} +5 -5
  45. package/dist/{metadata-XWHS3SDJ.js → metadata-EACJ44OR.js} +6 -6
  46. package/dist/{node-package-manager-QET5FYFY.js → node-package-manager-NFYSJBUI.js} +17 -16
  47. package/dist/{notifications-system-TAHUXXGQ.js → notifications-system-ZDDGD7AS.js} +20 -19
  48. package/dist/{os-JHHBXO2N.js → os-VAWLBHBF.js} +8 -7
  49. package/dist/{output-2B3LJAUM.js → output-MFN7MN4X.js} +7 -6
  50. package/dist/{path-RDYZ7Q5T.js → path-NBWFOGJ4.js} +2 -2
  51. package/dist/{prettier-BNZDRHR4.js → prettier-XM547TFN.js} +2 -2
  52. package/dist/{system-EHWOZQCE.js → system-SDCJN2UD.js} +15 -14
  53. package/dist/tsconfig.tsbuildinfo +1 -1
  54. package/dist/{ui-ZXHKYLCS.js → ui-HZTN2YF4.js} +15 -14
  55. package/dist/upgrade-NSRTWSK6.js +295 -0
  56. package/dist/version-5LTDAJ3Z.js +37 -0
  57. package/dist/{version-IJ2X574N.js → version-XXTHXVKK.js} +2 -2
  58. package/oclif.manifest.json +11 -1
  59. package/package.json +3 -3
  60. package/dist/analytics-WZ4U5RJZ.js +0 -40
  61. package/dist/environments-II3QYMU3.js +0 -32
  62. package/dist/upgrade-H2IEKPCC.js +0 -218
  63. package/dist/version-QY5L7H5O.js +0 -36
@@ -2,29 +2,27 @@ import {
2
2
  execa,
3
3
  platformAndArch,
4
4
  require_signal_exit
5
- } from "./chunk-RRQPXOTA.js";
5
+ } from "./chunk-DIOGWWS3.js";
6
6
  import {
7
7
  runWithTimer
8
- } from "./chunk-ATS65VTD.js";
8
+ } from "./chunk-J53FSF5Q.js";
9
9
  import {
10
10
  randomUUID
11
- } from "./chunk-DXHBESFY.js";
11
+ } from "./chunk-VHVI7YNQ.js";
12
12
  import {
13
13
  AbortError,
14
14
  AbortSilentError,
15
15
  BugError,
16
16
  ExternalError,
17
17
  cleanSingleStackTracePath
18
- } from "./chunk-6BEAY6DV.js";
18
+ } from "./chunk-L6U3W2XC.js";
19
19
  import {
20
20
  treeKill
21
- } from "./chunk-7EY7VZVX.js";
21
+ } from "./chunk-D7A5DYKK.js";
22
22
  import {
23
23
  ansi_escapes_default,
24
24
  appendToTokenItem,
25
25
  capitalize,
26
- commandEventOutputMode,
27
- emitCommandEvent,
28
26
  output,
29
27
  outputContent,
30
28
  outputDebug,
@@ -47,7 +45,6 @@ import {
47
45
  require_keys,
48
46
  require_memoize,
49
47
  require_root,
50
- require_supports_color,
51
48
  require_supports_hyperlinks,
52
49
  shouldDisplayColors,
53
50
  source_default,
@@ -55,25 +52,26 @@ import {
55
52
  tokenItemToJsonString,
56
53
  tokenItemToString,
57
54
  unstyled
58
- } from "./chunk-QLLL4VIM.js";
55
+ } from "./chunk-VKOB4EDC.js";
59
56
  import {
60
57
  isCloudEnvironment,
61
58
  isInputDisabled,
62
59
  isUnitTest
63
- } from "./chunk-NN45GPHA.js";
60
+ } from "./chunk-CXCQOKSC.js";
61
+ import {
62
+ commandEventOutputMode,
63
+ emitCommandEvent
64
+ } from "./chunk-GLO2DI4E.js";
64
65
  import {
65
66
  isTruthy
66
67
  } from "./chunk-HNIAZN6U.js";
67
- import {
68
- require_ansi_styles
69
- } from "./chunk-EJEHENXO.js";
70
68
  import {
71
69
  require_source_map
72
70
  } from "./chunk-D6NYWNY2.js";
73
71
  import {
74
72
  cwd,
75
73
  resolvePath
76
- } from "./chunk-57VCTLOQ.js";
74
+ } from "./chunk-JZFZ3JYG.js";
77
75
  import {
78
76
  __commonJS,
79
77
  __export,
@@ -21132,7 +21130,7 @@ var require_stacktracey = __commonJS({
21132
21130
  mergeRepeatedLines() {
21133
21131
  return new _StackTracey(
21134
21132
  partition(this.items, (e) => e.file + e.line).map(
21135
- (group) => group.items.slice(1).reduce((memo2, entry) => (memo2.callee = (memo2.callee || "<anonymous>") + " \u2192 " + (entry.callee || "<anonymous>"), memo2.calleeShort = (memo2.calleeShort || "<anonymous>") + " \u2192 " + (entry.calleeShort || "<anonymous>"), memo2), O.assign({}, group.items[0]))
21133
+ (group) => group.items.slice(1).reduce((memo, entry) => (memo.callee = (memo.callee || "<anonymous>") + " \u2192 " + (entry.callee || "<anonymous>"), memo.calleeShort = (memo.calleeShort || "<anonymous>") + " \u2192 " + (entry.calleeShort || "<anonymous>"), memo), O.assign({}, group.items[0]))
21136
21134
  )
21137
21135
  );
21138
21136
  }
@@ -21383,1254 +21381,6 @@ var require_sortBy = __commonJS({
21383
21381
  }
21384
21382
  });
21385
21383
 
21386
- // ../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js
21387
- var require_util = __commonJS({
21388
- "../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js"(exports, module) {
21389
- "use strict";
21390
- init_cjs_shims();
21391
- var stringReplaceAll = (string, substring, replacer) => {
21392
- let index = string.indexOf(substring);
21393
- if (index === -1)
21394
- return string;
21395
- let substringLength = substring.length, endIndex = 0, returnValue = "";
21396
- do
21397
- returnValue += string.substr(endIndex, index - endIndex) + substring + replacer, endIndex = index + substringLength, index = string.indexOf(substring, endIndex);
21398
- while (index !== -1);
21399
- return returnValue += string.substr(endIndex), returnValue;
21400
- }, stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
21401
- let endIndex = 0, returnValue = "";
21402
- do {
21403
- let gotCR = string[index - 1] === "\r";
21404
- returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? `\r
21405
- ` : `
21406
- `) + postfix, endIndex = index + 1, index = string.indexOf(`
21407
- `, endIndex);
21408
- } while (index !== -1);
21409
- return returnValue += string.substr(endIndex), returnValue;
21410
- };
21411
- module.exports = {
21412
- stringReplaceAll,
21413
- stringEncaseCRLFWithFirstIndex
21414
- };
21415
- }
21416
- });
21417
-
21418
- // ../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js
21419
- var require_templates = __commonJS({
21420
- "../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js"(exports, module) {
21421
- "use strict";
21422
- init_cjs_shims();
21423
- var TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi, STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g, STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/, ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi, ESCAPES5 = /* @__PURE__ */ new Map([
21424
- ["n", `
21425
- `],
21426
- ["r", "\r"],
21427
- ["t", " "],
21428
- ["b", "\b"],
21429
- ["f", "\f"],
21430
- ["v", "\v"],
21431
- ["0", "\0"],
21432
- ["\\", "\\"],
21433
- ["e", "\x1B"],
21434
- ["a", "\x07"]
21435
- ]);
21436
- function unescape2(c) {
21437
- let u = c[0] === "u", bracket = c[1] === "{";
21438
- return u && !bracket && c.length === 5 || c[0] === "x" && c.length === 3 ? String.fromCharCode(parseInt(c.slice(1), 16)) : u && bracket ? String.fromCodePoint(parseInt(c.slice(2, -1), 16)) : ESCAPES5.get(c) || c;
21439
- }
21440
- function parseArguments(name, arguments_) {
21441
- let results = [], chunks = arguments_.trim().split(/\s*,\s*/g), matches;
21442
- for (let chunk of chunks) {
21443
- let number = Number(chunk);
21444
- if (!Number.isNaN(number))
21445
- results.push(number);
21446
- else if (matches = chunk.match(STRING_REGEX))
21447
- results.push(matches[2].replace(ESCAPE_REGEX, (m, escape2, character) => escape2 ? unescape2(escape2) : character));
21448
- else
21449
- throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
21450
- }
21451
- return results;
21452
- }
21453
- function parseStyle(style) {
21454
- STYLE_REGEX.lastIndex = 0;
21455
- let results = [], matches;
21456
- for (; (matches = STYLE_REGEX.exec(style)) !== null; ) {
21457
- let name = matches[1];
21458
- if (matches[2]) {
21459
- let args = parseArguments(name, matches[2]);
21460
- results.push([name].concat(args));
21461
- } else
21462
- results.push([name]);
21463
- }
21464
- return results;
21465
- }
21466
- function buildStyle(chalk, styles3) {
21467
- let enabled = {};
21468
- for (let layer of styles3)
21469
- for (let style of layer.styles)
21470
- enabled[style[0]] = layer.inverse ? null : style.slice(1);
21471
- let current = chalk;
21472
- for (let [styleName, styles4] of Object.entries(enabled))
21473
- if (Array.isArray(styles4)) {
21474
- if (!(styleName in current))
21475
- throw new Error(`Unknown Chalk style: ${styleName}`);
21476
- current = styles4.length > 0 ? current[styleName](...styles4) : current[styleName];
21477
- }
21478
- return current;
21479
- }
21480
- module.exports = (chalk, temporary) => {
21481
- let styles3 = [], chunks = [], chunk = [];
21482
- if (temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
21483
- if (escapeCharacter)
21484
- chunk.push(unescape2(escapeCharacter));
21485
- else if (style) {
21486
- let string = chunk.join("");
21487
- chunk = [], chunks.push(styles3.length === 0 ? string : buildStyle(chalk, styles3)(string)), styles3.push({ inverse, styles: parseStyle(style) });
21488
- } else if (close) {
21489
- if (styles3.length === 0)
21490
- throw new Error("Found extraneous } in Chalk template literal");
21491
- chunks.push(buildStyle(chalk, styles3)(chunk.join(""))), chunk = [], styles3.pop();
21492
- } else
21493
- chunk.push(character);
21494
- }), chunks.push(chunk.join("")), styles3.length > 0) {
21495
- let errMessage = `Chalk template literal is missing ${styles3.length} closing bracket${styles3.length === 1 ? "" : "s"} (\`}\`)`;
21496
- throw new Error(errMessage);
21497
- }
21498
- return chunks.join("");
21499
- };
21500
- }
21501
- });
21502
-
21503
- // ../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js
21504
- var require_source = __commonJS({
21505
- "../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js"(exports, module) {
21506
- "use strict";
21507
- init_cjs_shims();
21508
- var ansiStyles2 = require_ansi_styles(), { stdout: stdoutColor, stderr: stderrColor } = require_supports_color(), {
21509
- stringReplaceAll,
21510
- stringEncaseCRLFWithFirstIndex
21511
- } = require_util(), { isArray } = Array, levelMapping = [
21512
- "ansi",
21513
- "ansi",
21514
- "ansi256",
21515
- "ansi16m"
21516
- ], styles3 = /* @__PURE__ */ Object.create(null), applyOptions = (object, options = {}) => {
21517
- if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3))
21518
- throw new Error("The `level` option should be an integer from 0 to 3");
21519
- let colorLevel = stdoutColor ? stdoutColor.level : 0;
21520
- object.level = options.level === void 0 ? colorLevel : options.level;
21521
- }, ChalkClass = class {
21522
- constructor(options) {
21523
- return chalkFactory(options);
21524
- }
21525
- }, chalkFactory = (options) => {
21526
- let chalk2 = {};
21527
- return applyOptions(chalk2, options), chalk2.template = (...arguments_) => chalkTag(chalk2.template, ...arguments_), Object.setPrototypeOf(chalk2, Chalk.prototype), Object.setPrototypeOf(chalk2.template, chalk2), chalk2.template.constructor = () => {
21528
- throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
21529
- }, chalk2.template.Instance = ChalkClass, chalk2.template;
21530
- };
21531
- function Chalk(options) {
21532
- return chalkFactory(options);
21533
- }
21534
- for (let [styleName, style] of Object.entries(ansiStyles2))
21535
- styles3[styleName] = {
21536
- get() {
21537
- let builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
21538
- return Object.defineProperty(this, styleName, { value: builder }), builder;
21539
- }
21540
- };
21541
- styles3.visible = {
21542
- get() {
21543
- let builder = createBuilder(this, this._styler, !0);
21544
- return Object.defineProperty(this, "visible", { value: builder }), builder;
21545
- }
21546
- };
21547
- var usedModels = ["rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256"];
21548
- for (let model of usedModels)
21549
- styles3[model] = {
21550
- get() {
21551
- let { level } = this;
21552
- return function(...arguments_) {
21553
- let styler = createStyler(ansiStyles2.color[levelMapping[level]][model](...arguments_), ansiStyles2.color.close, this._styler);
21554
- return createBuilder(this, styler, this._isEmpty);
21555
- };
21556
- }
21557
- };
21558
- for (let model of usedModels) {
21559
- let bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
21560
- styles3[bgModel] = {
21561
- get() {
21562
- let { level } = this;
21563
- return function(...arguments_) {
21564
- let styler = createStyler(ansiStyles2.bgColor[levelMapping[level]][model](...arguments_), ansiStyles2.bgColor.close, this._styler);
21565
- return createBuilder(this, styler, this._isEmpty);
21566
- };
21567
- }
21568
- };
21569
- }
21570
- var proto = Object.defineProperties(() => {
21571
- }, {
21572
- ...styles3,
21573
- level: {
21574
- enumerable: !0,
21575
- get() {
21576
- return this._generator.level;
21577
- },
21578
- set(level) {
21579
- this._generator.level = level;
21580
- }
21581
- }
21582
- }), createStyler = (open, close, parent) => {
21583
- let openAll, closeAll;
21584
- return parent === void 0 ? (openAll = open, closeAll = close) : (openAll = parent.openAll + open, closeAll = close + parent.closeAll), {
21585
- open,
21586
- close,
21587
- openAll,
21588
- closeAll,
21589
- parent
21590
- };
21591
- }, createBuilder = (self2, _styler, _isEmpty) => {
21592
- let builder = (...arguments_) => isArray(arguments_[0]) && isArray(arguments_[0].raw) ? applyStyle(builder, chalkTag(builder, ...arguments_)) : applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
21593
- return Object.setPrototypeOf(builder, proto), builder._generator = self2, builder._styler = _styler, builder._isEmpty = _isEmpty, builder;
21594
- }, applyStyle = (self2, string) => {
21595
- if (self2.level <= 0 || !string)
21596
- return self2._isEmpty ? "" : string;
21597
- let styler = self2._styler;
21598
- if (styler === void 0)
21599
- return string;
21600
- let { openAll, closeAll } = styler;
21601
- if (string.indexOf("\x1B") !== -1)
21602
- for (; styler !== void 0; )
21603
- string = stringReplaceAll(string, styler.close, styler.open), styler = styler.parent;
21604
- let lfIndex = string.indexOf(`
21605
- `);
21606
- return lfIndex !== -1 && (string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex)), openAll + string + closeAll;
21607
- }, template, chalkTag = (chalk2, ...strings) => {
21608
- let [firstString] = strings;
21609
- if (!isArray(firstString) || !isArray(firstString.raw))
21610
- return strings.join(" ");
21611
- let arguments_ = strings.slice(1), parts = [firstString.raw[0]];
21612
- for (let i = 1; i < firstString.length; i++)
21613
- parts.push(
21614
- String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"),
21615
- String(firstString.raw[i])
21616
- );
21617
- return template === void 0 && (template = require_templates()), template(chalk2, parts.join(""));
21618
- };
21619
- Object.defineProperties(Chalk.prototype, styles3);
21620
- var chalk = Chalk();
21621
- chalk.supportsColor = stdoutColor;
21622
- chalk.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
21623
- chalk.stderr.supportsColor = stderrColor;
21624
- module.exports = chalk;
21625
- }
21626
- });
21627
-
21628
- // ../../node_modules/.pnpm/tinycolor2@1.6.0/node_modules/tinycolor2/cjs/tinycolor.js
21629
- var require_tinycolor = __commonJS({
21630
- "../../node_modules/.pnpm/tinycolor2@1.6.0/node_modules/tinycolor2/cjs/tinycolor.js"(exports, module) {
21631
- init_cjs_shims();
21632
- (function(global, factory) {
21633
- typeof exports == "object" && typeof module < "u" ? module.exports = factory() : typeof define == "function" && define.amd ? define(factory) : (global = typeof globalThis < "u" ? globalThis : global || self, global.tinycolor = factory());
21634
- })(exports, (function() {
21635
- "use strict";
21636
- function _typeof(obj) {
21637
- "@babel/helpers - typeof";
21638
- return _typeof = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(obj2) {
21639
- return typeof obj2;
21640
- } : function(obj2) {
21641
- return obj2 && typeof Symbol == "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
21642
- }, _typeof(obj);
21643
- }
21644
- var trimLeft = /^\s+/, trimRight = /\s+$/;
21645
- function tinycolor(color, opts) {
21646
- if (color = color || "", opts = opts || {}, color instanceof tinycolor)
21647
- return color;
21648
- if (!(this instanceof tinycolor))
21649
- return new tinycolor(color, opts);
21650
- var rgb = inputToRGB(color);
21651
- this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, this._a = rgb.a, this._roundA = Math.round(100 * this._a) / 100, this._format = opts.format || rgb.format, this._gradientType = opts.gradientType, this._r < 1 && (this._r = Math.round(this._r)), this._g < 1 && (this._g = Math.round(this._g)), this._b < 1 && (this._b = Math.round(this._b)), this._ok = rgb.ok;
21652
- }
21653
- tinycolor.prototype = {
21654
- isDark: function() {
21655
- return this.getBrightness() < 128;
21656
- },
21657
- isLight: function() {
21658
- return !this.isDark();
21659
- },
21660
- isValid: function() {
21661
- return this._ok;
21662
- },
21663
- getOriginalInput: function() {
21664
- return this._originalInput;
21665
- },
21666
- getFormat: function() {
21667
- return this._format;
21668
- },
21669
- getAlpha: function() {
21670
- return this._a;
21671
- },
21672
- getBrightness: function() {
21673
- var rgb = this.toRgb();
21674
- return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1e3;
21675
- },
21676
- getLuminance: function() {
21677
- var rgb = this.toRgb(), RsRGB, GsRGB, BsRGB, R, G, B;
21678
- return RsRGB = rgb.r / 255, GsRGB = rgb.g / 255, BsRGB = rgb.b / 255, RsRGB <= 0.03928 ? R = RsRGB / 12.92 : R = Math.pow((RsRGB + 0.055) / 1.055, 2.4), GsRGB <= 0.03928 ? G = GsRGB / 12.92 : G = Math.pow((GsRGB + 0.055) / 1.055, 2.4), BsRGB <= 0.03928 ? B = BsRGB / 12.92 : B = Math.pow((BsRGB + 0.055) / 1.055, 2.4), 0.2126 * R + 0.7152 * G + 0.0722 * B;
21679
- },
21680
- setAlpha: function(value) {
21681
- return this._a = boundAlpha(value), this._roundA = Math.round(100 * this._a) / 100, this;
21682
- },
21683
- toHsv: function() {
21684
- var hsv = rgbToHsv(this._r, this._g, this._b);
21685
- return {
21686
- h: hsv.h * 360,
21687
- s: hsv.s,
21688
- v: hsv.v,
21689
- a: this._a
21690
- };
21691
- },
21692
- toHsvString: function() {
21693
- var hsv = rgbToHsv(this._r, this._g, this._b), h = Math.round(hsv.h * 360), s = Math.round(hsv.s * 100), v = Math.round(hsv.v * 100);
21694
- return this._a == 1 ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")";
21695
- },
21696
- toHsl: function() {
21697
- var hsl = rgbToHsl(this._r, this._g, this._b);
21698
- return {
21699
- h: hsl.h * 360,
21700
- s: hsl.s,
21701
- l: hsl.l,
21702
- a: this._a
21703
- };
21704
- },
21705
- toHslString: function() {
21706
- var hsl = rgbToHsl(this._r, this._g, this._b), h = Math.round(hsl.h * 360), s = Math.round(hsl.s * 100), l = Math.round(hsl.l * 100);
21707
- return this._a == 1 ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")";
21708
- },
21709
- toHex: function(allow3Char) {
21710
- return rgbToHex(this._r, this._g, this._b, allow3Char);
21711
- },
21712
- toHexString: function(allow3Char) {
21713
- return "#" + this.toHex(allow3Char);
21714
- },
21715
- toHex8: function(allow4Char) {
21716
- return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
21717
- },
21718
- toHex8String: function(allow4Char) {
21719
- return "#" + this.toHex8(allow4Char);
21720
- },
21721
- toRgb: function() {
21722
- return {
21723
- r: Math.round(this._r),
21724
- g: Math.round(this._g),
21725
- b: Math.round(this._b),
21726
- a: this._a
21727
- };
21728
- },
21729
- toRgbString: function() {
21730
- return this._a == 1 ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")";
21731
- },
21732
- toPercentageRgb: function() {
21733
- return {
21734
- r: Math.round(bound01(this._r, 255) * 100) + "%",
21735
- g: Math.round(bound01(this._g, 255) * 100) + "%",
21736
- b: Math.round(bound01(this._b, 255) * 100) + "%",
21737
- a: this._a
21738
- };
21739
- },
21740
- toPercentageRgbString: function() {
21741
- return this._a == 1 ? "rgb(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
21742
- },
21743
- toName: function() {
21744
- return this._a === 0 ? "transparent" : this._a < 1 ? !1 : hexNames[rgbToHex(this._r, this._g, this._b, !0)] || !1;
21745
- },
21746
- toFilter: function(secondColor) {
21747
- var hex8String = "#" + rgbaToArgbHex(this._r, this._g, this._b, this._a), secondHex8String = hex8String, gradientType = this._gradientType ? "GradientType = 1, " : "";
21748
- if (secondColor) {
21749
- var s = tinycolor(secondColor);
21750
- secondHex8String = "#" + rgbaToArgbHex(s._r, s._g, s._b, s._a);
21751
- }
21752
- return "progid:DXImageTransform.Microsoft.gradient(" + gradientType + "startColorstr=" + hex8String + ",endColorstr=" + secondHex8String + ")";
21753
- },
21754
- toString: function(format) {
21755
- var formatSet = !!format;
21756
- format = format || this._format;
21757
- var formattedString = !1, hasAlpha = this._a < 1 && this._a >= 0, needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name");
21758
- return needsAlphaFormat ? format === "name" && this._a === 0 ? this.toName() : this.toRgbString() : (format === "rgb" && (formattedString = this.toRgbString()), format === "prgb" && (formattedString = this.toPercentageRgbString()), (format === "hex" || format === "hex6") && (formattedString = this.toHexString()), format === "hex3" && (formattedString = this.toHexString(!0)), format === "hex4" && (formattedString = this.toHex8String(!0)), format === "hex8" && (formattedString = this.toHex8String()), format === "name" && (formattedString = this.toName()), format === "hsl" && (formattedString = this.toHslString()), format === "hsv" && (formattedString = this.toHsvString()), formattedString || this.toHexString());
21759
- },
21760
- clone: function() {
21761
- return tinycolor(this.toString());
21762
- },
21763
- _applyModification: function(fn, args) {
21764
- var color = fn.apply(null, [this].concat([].slice.call(args)));
21765
- return this._r = color._r, this._g = color._g, this._b = color._b, this.setAlpha(color._a), this;
21766
- },
21767
- lighten: function() {
21768
- return this._applyModification(_lighten, arguments);
21769
- },
21770
- brighten: function() {
21771
- return this._applyModification(_brighten, arguments);
21772
- },
21773
- darken: function() {
21774
- return this._applyModification(_darken, arguments);
21775
- },
21776
- desaturate: function() {
21777
- return this._applyModification(_desaturate, arguments);
21778
- },
21779
- saturate: function() {
21780
- return this._applyModification(_saturate, arguments);
21781
- },
21782
- greyscale: function() {
21783
- return this._applyModification(_greyscale, arguments);
21784
- },
21785
- spin: function() {
21786
- return this._applyModification(_spin, arguments);
21787
- },
21788
- _applyCombination: function(fn, args) {
21789
- return fn.apply(null, [this].concat([].slice.call(args)));
21790
- },
21791
- analogous: function() {
21792
- return this._applyCombination(_analogous, arguments);
21793
- },
21794
- complement: function() {
21795
- return this._applyCombination(_complement, arguments);
21796
- },
21797
- monochromatic: function() {
21798
- return this._applyCombination(_monochromatic, arguments);
21799
- },
21800
- splitcomplement: function() {
21801
- return this._applyCombination(_splitcomplement, arguments);
21802
- },
21803
- // Disabled until https://github.com/bgrins/TinyColor/issues/254
21804
- // polyad: function (number) {
21805
- // return this._applyCombination(polyad, [number]);
21806
- // },
21807
- triad: function() {
21808
- return this._applyCombination(polyad, [3]);
21809
- },
21810
- tetrad: function() {
21811
- return this._applyCombination(polyad, [4]);
21812
- }
21813
- }, tinycolor.fromRatio = function(color, opts) {
21814
- if (_typeof(color) == "object") {
21815
- var newColor = {};
21816
- for (var i in color)
21817
- color.hasOwnProperty(i) && (i === "a" ? newColor[i] = color[i] : newColor[i] = convertToPercentage(color[i]));
21818
- color = newColor;
21819
- }
21820
- return tinycolor(color, opts);
21821
- };
21822
- function inputToRGB(color) {
21823
- var rgb = {
21824
- r: 0,
21825
- g: 0,
21826
- b: 0
21827
- }, a = 1, s = null, v = null, l = null, ok = !1, format = !1;
21828
- return typeof color == "string" && (color = stringInputToObject(color)), _typeof(color) == "object" && (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b) ? (rgb = rgbToRgb(color.r, color.g, color.b), ok = !0, format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb") : isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v) ? (s = convertToPercentage(color.s), v = convertToPercentage(color.v), rgb = hsvToRgb(color.h, s, v), ok = !0, format = "hsv") : isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l) && (s = convertToPercentage(color.s), l = convertToPercentage(color.l), rgb = hslToRgb(color.h, s, l), ok = !0, format = "hsl"), color.hasOwnProperty("a") && (a = color.a)), a = boundAlpha(a), {
21829
- ok,
21830
- format: color.format || format,
21831
- r: Math.min(255, Math.max(rgb.r, 0)),
21832
- g: Math.min(255, Math.max(rgb.g, 0)),
21833
- b: Math.min(255, Math.max(rgb.b, 0)),
21834
- a
21835
- };
21836
- }
21837
- function rgbToRgb(r, g, b) {
21838
- return {
21839
- r: bound01(r, 255) * 255,
21840
- g: bound01(g, 255) * 255,
21841
- b: bound01(b, 255) * 255
21842
- };
21843
- }
21844
- function rgbToHsl(r, g, b) {
21845
- r = bound01(r, 255), g = bound01(g, 255), b = bound01(b, 255);
21846
- var max = Math.max(r, g, b), min = Math.min(r, g, b), h, s, l = (max + min) / 2;
21847
- if (max == min)
21848
- h = s = 0;
21849
- else {
21850
- var d = max - min;
21851
- switch (s = l > 0.5 ? d / (2 - max - min) : d / (max + min), max) {
21852
- case r:
21853
- h = (g - b) / d + (g < b ? 6 : 0);
21854
- break;
21855
- case g:
21856
- h = (b - r) / d + 2;
21857
- break;
21858
- case b:
21859
- h = (r - g) / d + 4;
21860
- break;
21861
- }
21862
- h /= 6;
21863
- }
21864
- return {
21865
- h,
21866
- s,
21867
- l
21868
- };
21869
- }
21870
- function hslToRgb(h, s, l) {
21871
- var r, g, b;
21872
- h = bound01(h, 360), s = bound01(s, 100), l = bound01(l, 100);
21873
- function hue2rgb(p2, q2, t) {
21874
- return t < 0 && (t += 1), t > 1 && (t -= 1), t < 1 / 6 ? p2 + (q2 - p2) * 6 * t : t < 1 / 2 ? q2 : t < 2 / 3 ? p2 + (q2 - p2) * (2 / 3 - t) * 6 : p2;
21875
- }
21876
- if (s === 0)
21877
- r = g = b = l;
21878
- else {
21879
- var q = l < 0.5 ? l * (1 + s) : l + s - l * s, p = 2 * l - q;
21880
- r = hue2rgb(p, q, h + 1 / 3), g = hue2rgb(p, q, h), b = hue2rgb(p, q, h - 1 / 3);
21881
- }
21882
- return {
21883
- r: r * 255,
21884
- g: g * 255,
21885
- b: b * 255
21886
- };
21887
- }
21888
- function rgbToHsv(r, g, b) {
21889
- r = bound01(r, 255), g = bound01(g, 255), b = bound01(b, 255);
21890
- var max = Math.max(r, g, b), min = Math.min(r, g, b), h, s, v = max, d = max - min;
21891
- if (s = max === 0 ? 0 : d / max, max == min)
21892
- h = 0;
21893
- else {
21894
- switch (max) {
21895
- case r:
21896
- h = (g - b) / d + (g < b ? 6 : 0);
21897
- break;
21898
- case g:
21899
- h = (b - r) / d + 2;
21900
- break;
21901
- case b:
21902
- h = (r - g) / d + 4;
21903
- break;
21904
- }
21905
- h /= 6;
21906
- }
21907
- return {
21908
- h,
21909
- s,
21910
- v
21911
- };
21912
- }
21913
- function hsvToRgb(h, s, v) {
21914
- h = bound01(h, 360) * 6, s = bound01(s, 100), v = bound01(v, 100);
21915
- var i = Math.floor(h), f = h - i, p = v * (1 - s), q = v * (1 - f * s), t = v * (1 - (1 - f) * s), mod = i % 6, r = [v, q, p, p, t, v][mod], g = [t, v, v, q, p, p][mod], b = [p, p, t, v, v, q][mod];
21916
- return {
21917
- r: r * 255,
21918
- g: g * 255,
21919
- b: b * 255
21920
- };
21921
- }
21922
- function rgbToHex(r, g, b, allow3Char) {
21923
- var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];
21924
- return allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) ? hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) : hex.join("");
21925
- }
21926
- function rgbaToHex(r, g, b, a, allow4Char) {
21927
- var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16)), pad2(convertDecimalToHex(a))];
21928
- return allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1) ? hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0) : hex.join("");
21929
- }
21930
- function rgbaToArgbHex(r, g, b, a) {
21931
- var hex = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];
21932
- return hex.join("");
21933
- }
21934
- tinycolor.equals = function(color1, color2) {
21935
- return !color1 || !color2 ? !1 : tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
21936
- }, tinycolor.random = function() {
21937
- return tinycolor.fromRatio({
21938
- r: Math.random(),
21939
- g: Math.random(),
21940
- b: Math.random()
21941
- });
21942
- };
21943
- function _desaturate(color, amount) {
21944
- amount = amount === 0 ? 0 : amount || 10;
21945
- var hsl = tinycolor(color).toHsl();
21946
- return hsl.s -= amount / 100, hsl.s = clamp01(hsl.s), tinycolor(hsl);
21947
- }
21948
- function _saturate(color, amount) {
21949
- amount = amount === 0 ? 0 : amount || 10;
21950
- var hsl = tinycolor(color).toHsl();
21951
- return hsl.s += amount / 100, hsl.s = clamp01(hsl.s), tinycolor(hsl);
21952
- }
21953
- function _greyscale(color) {
21954
- return tinycolor(color).desaturate(100);
21955
- }
21956
- function _lighten(color, amount) {
21957
- amount = amount === 0 ? 0 : amount || 10;
21958
- var hsl = tinycolor(color).toHsl();
21959
- return hsl.l += amount / 100, hsl.l = clamp01(hsl.l), tinycolor(hsl);
21960
- }
21961
- function _brighten(color, amount) {
21962
- amount = amount === 0 ? 0 : amount || 10;
21963
- var rgb = tinycolor(color).toRgb();
21964
- return rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100)))), rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100)))), rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100)))), tinycolor(rgb);
21965
- }
21966
- function _darken(color, amount) {
21967
- amount = amount === 0 ? 0 : amount || 10;
21968
- var hsl = tinycolor(color).toHsl();
21969
- return hsl.l -= amount / 100, hsl.l = clamp01(hsl.l), tinycolor(hsl);
21970
- }
21971
- function _spin(color, amount) {
21972
- var hsl = tinycolor(color).toHsl(), hue = (hsl.h + amount) % 360;
21973
- return hsl.h = hue < 0 ? 360 + hue : hue, tinycolor(hsl);
21974
- }
21975
- function _complement(color) {
21976
- var hsl = tinycolor(color).toHsl();
21977
- return hsl.h = (hsl.h + 180) % 360, tinycolor(hsl);
21978
- }
21979
- function polyad(color, number) {
21980
- if (isNaN(number) || number <= 0)
21981
- throw new Error("Argument to polyad must be a positive number");
21982
- for (var hsl = tinycolor(color).toHsl(), result = [tinycolor(color)], step = 360 / number, i = 1; i < number; i++)
21983
- result.push(tinycolor({
21984
- h: (hsl.h + i * step) % 360,
21985
- s: hsl.s,
21986
- l: hsl.l
21987
- }));
21988
- return result;
21989
- }
21990
- function _splitcomplement(color) {
21991
- var hsl = tinycolor(color).toHsl(), h = hsl.h;
21992
- return [tinycolor(color), tinycolor({
21993
- h: (h + 72) % 360,
21994
- s: hsl.s,
21995
- l: hsl.l
21996
- }), tinycolor({
21997
- h: (h + 216) % 360,
21998
- s: hsl.s,
21999
- l: hsl.l
22000
- })];
22001
- }
22002
- function _analogous(color, results, slices) {
22003
- results = results || 6, slices = slices || 30;
22004
- var hsl = tinycolor(color).toHsl(), part = 360 / slices, ret = [tinycolor(color)];
22005
- for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results; )
22006
- hsl.h = (hsl.h + part) % 360, ret.push(tinycolor(hsl));
22007
- return ret;
22008
- }
22009
- function _monochromatic(color, results) {
22010
- results = results || 6;
22011
- for (var hsv = tinycolor(color).toHsv(), h = hsv.h, s = hsv.s, v = hsv.v, ret = [], modification = 1 / results; results--; )
22012
- ret.push(tinycolor({
22013
- h,
22014
- s,
22015
- v
22016
- })), v = (v + modification) % 1;
22017
- return ret;
22018
- }
22019
- tinycolor.mix = function(color1, color2, amount) {
22020
- amount = amount === 0 ? 0 : amount || 50;
22021
- var rgb1 = tinycolor(color1).toRgb(), rgb2 = tinycolor(color2).toRgb(), p = amount / 100, rgba = {
22022
- r: (rgb2.r - rgb1.r) * p + rgb1.r,
22023
- g: (rgb2.g - rgb1.g) * p + rgb1.g,
22024
- b: (rgb2.b - rgb1.b) * p + rgb1.b,
22025
- a: (rgb2.a - rgb1.a) * p + rgb1.a
22026
- };
22027
- return tinycolor(rgba);
22028
- }, tinycolor.readability = function(color1, color2) {
22029
- var c1 = tinycolor(color1), c2 = tinycolor(color2);
22030
- return (Math.max(c1.getLuminance(), c2.getLuminance()) + 0.05) / (Math.min(c1.getLuminance(), c2.getLuminance()) + 0.05);
22031
- }, tinycolor.isReadable = function(color1, color2, wcag2) {
22032
- var readability = tinycolor.readability(color1, color2), wcag2Parms, out;
22033
- switch (out = !1, wcag2Parms = validateWCAG2Parms(wcag2), wcag2Parms.level + wcag2Parms.size) {
22034
- case "AAsmall":
22035
- case "AAAlarge":
22036
- out = readability >= 4.5;
22037
- break;
22038
- case "AAlarge":
22039
- out = readability >= 3;
22040
- break;
22041
- case "AAAsmall":
22042
- out = readability >= 7;
22043
- break;
22044
- }
22045
- return out;
22046
- }, tinycolor.mostReadable = function(baseColor, colorList, args) {
22047
- var bestColor = null, bestScore = 0, readability, includeFallbackColors, level, size;
22048
- args = args || {}, includeFallbackColors = args.includeFallbackColors, level = args.level, size = args.size;
22049
- for (var i = 0; i < colorList.length; i++)
22050
- readability = tinycolor.readability(baseColor, colorList[i]), readability > bestScore && (bestScore = readability, bestColor = tinycolor(colorList[i]));
22051
- return tinycolor.isReadable(baseColor, bestColor, {
22052
- level,
22053
- size
22054
- }) || !includeFallbackColors ? bestColor : (args.includeFallbackColors = !1, tinycolor.mostReadable(baseColor, ["#fff", "#000"], args));
22055
- };
22056
- var names = tinycolor.names = {
22057
- aliceblue: "f0f8ff",
22058
- antiquewhite: "faebd7",
22059
- aqua: "0ff",
22060
- aquamarine: "7fffd4",
22061
- azure: "f0ffff",
22062
- beige: "f5f5dc",
22063
- bisque: "ffe4c4",
22064
- black: "000",
22065
- blanchedalmond: "ffebcd",
22066
- blue: "00f",
22067
- blueviolet: "8a2be2",
22068
- brown: "a52a2a",
22069
- burlywood: "deb887",
22070
- burntsienna: "ea7e5d",
22071
- cadetblue: "5f9ea0",
22072
- chartreuse: "7fff00",
22073
- chocolate: "d2691e",
22074
- coral: "ff7f50",
22075
- cornflowerblue: "6495ed",
22076
- cornsilk: "fff8dc",
22077
- crimson: "dc143c",
22078
- cyan: "0ff",
22079
- darkblue: "00008b",
22080
- darkcyan: "008b8b",
22081
- darkgoldenrod: "b8860b",
22082
- darkgray: "a9a9a9",
22083
- darkgreen: "006400",
22084
- darkgrey: "a9a9a9",
22085
- darkkhaki: "bdb76b",
22086
- darkmagenta: "8b008b",
22087
- darkolivegreen: "556b2f",
22088
- darkorange: "ff8c00",
22089
- darkorchid: "9932cc",
22090
- darkred: "8b0000",
22091
- darksalmon: "e9967a",
22092
- darkseagreen: "8fbc8f",
22093
- darkslateblue: "483d8b",
22094
- darkslategray: "2f4f4f",
22095
- darkslategrey: "2f4f4f",
22096
- darkturquoise: "00ced1",
22097
- darkviolet: "9400d3",
22098
- deeppink: "ff1493",
22099
- deepskyblue: "00bfff",
22100
- dimgray: "696969",
22101
- dimgrey: "696969",
22102
- dodgerblue: "1e90ff",
22103
- firebrick: "b22222",
22104
- floralwhite: "fffaf0",
22105
- forestgreen: "228b22",
22106
- fuchsia: "f0f",
22107
- gainsboro: "dcdcdc",
22108
- ghostwhite: "f8f8ff",
22109
- gold: "ffd700",
22110
- goldenrod: "daa520",
22111
- gray: "808080",
22112
- green: "008000",
22113
- greenyellow: "adff2f",
22114
- grey: "808080",
22115
- honeydew: "f0fff0",
22116
- hotpink: "ff69b4",
22117
- indianred: "cd5c5c",
22118
- indigo: "4b0082",
22119
- ivory: "fffff0",
22120
- khaki: "f0e68c",
22121
- lavender: "e6e6fa",
22122
- lavenderblush: "fff0f5",
22123
- lawngreen: "7cfc00",
22124
- lemonchiffon: "fffacd",
22125
- lightblue: "add8e6",
22126
- lightcoral: "f08080",
22127
- lightcyan: "e0ffff",
22128
- lightgoldenrodyellow: "fafad2",
22129
- lightgray: "d3d3d3",
22130
- lightgreen: "90ee90",
22131
- lightgrey: "d3d3d3",
22132
- lightpink: "ffb6c1",
22133
- lightsalmon: "ffa07a",
22134
- lightseagreen: "20b2aa",
22135
- lightskyblue: "87cefa",
22136
- lightslategray: "789",
22137
- lightslategrey: "789",
22138
- lightsteelblue: "b0c4de",
22139
- lightyellow: "ffffe0",
22140
- lime: "0f0",
22141
- limegreen: "32cd32",
22142
- linen: "faf0e6",
22143
- magenta: "f0f",
22144
- maroon: "800000",
22145
- mediumaquamarine: "66cdaa",
22146
- mediumblue: "0000cd",
22147
- mediumorchid: "ba55d3",
22148
- mediumpurple: "9370db",
22149
- mediumseagreen: "3cb371",
22150
- mediumslateblue: "7b68ee",
22151
- mediumspringgreen: "00fa9a",
22152
- mediumturquoise: "48d1cc",
22153
- mediumvioletred: "c71585",
22154
- midnightblue: "191970",
22155
- mintcream: "f5fffa",
22156
- mistyrose: "ffe4e1",
22157
- moccasin: "ffe4b5",
22158
- navajowhite: "ffdead",
22159
- navy: "000080",
22160
- oldlace: "fdf5e6",
22161
- olive: "808000",
22162
- olivedrab: "6b8e23",
22163
- orange: "ffa500",
22164
- orangered: "ff4500",
22165
- orchid: "da70d6",
22166
- palegoldenrod: "eee8aa",
22167
- palegreen: "98fb98",
22168
- paleturquoise: "afeeee",
22169
- palevioletred: "db7093",
22170
- papayawhip: "ffefd5",
22171
- peachpuff: "ffdab9",
22172
- peru: "cd853f",
22173
- pink: "ffc0cb",
22174
- plum: "dda0dd",
22175
- powderblue: "b0e0e6",
22176
- purple: "800080",
22177
- rebeccapurple: "663399",
22178
- red: "f00",
22179
- rosybrown: "bc8f8f",
22180
- royalblue: "4169e1",
22181
- saddlebrown: "8b4513",
22182
- salmon: "fa8072",
22183
- sandybrown: "f4a460",
22184
- seagreen: "2e8b57",
22185
- seashell: "fff5ee",
22186
- sienna: "a0522d",
22187
- silver: "c0c0c0",
22188
- skyblue: "87ceeb",
22189
- slateblue: "6a5acd",
22190
- slategray: "708090",
22191
- slategrey: "708090",
22192
- snow: "fffafa",
22193
- springgreen: "00ff7f",
22194
- steelblue: "4682b4",
22195
- tan: "d2b48c",
22196
- teal: "008080",
22197
- thistle: "d8bfd8",
22198
- tomato: "ff6347",
22199
- turquoise: "40e0d0",
22200
- violet: "ee82ee",
22201
- wheat: "f5deb3",
22202
- white: "fff",
22203
- whitesmoke: "f5f5f5",
22204
- yellow: "ff0",
22205
- yellowgreen: "9acd32"
22206
- }, hexNames = tinycolor.hexNames = flip(names);
22207
- function flip(o) {
22208
- var flipped = {};
22209
- for (var i in o)
22210
- o.hasOwnProperty(i) && (flipped[o[i]] = i);
22211
- return flipped;
22212
- }
22213
- function boundAlpha(a) {
22214
- return a = parseFloat(a), (isNaN(a) || a < 0 || a > 1) && (a = 1), a;
22215
- }
22216
- function bound01(n, max) {
22217
- isOnePointZero(n) && (n = "100%");
22218
- var processPercent = isPercentage(n);
22219
- return n = Math.min(max, Math.max(0, parseFloat(n))), processPercent && (n = parseInt(n * max, 10) / 100), Math.abs(n - max) < 1e-6 ? 1 : n % max / parseFloat(max);
22220
- }
22221
- function clamp01(val) {
22222
- return Math.min(1, Math.max(0, val));
22223
- }
22224
- function parseIntFromHex(val) {
22225
- return parseInt(val, 16);
22226
- }
22227
- function isOnePointZero(n) {
22228
- return typeof n == "string" && n.indexOf(".") != -1 && parseFloat(n) === 1;
22229
- }
22230
- function isPercentage(n) {
22231
- return typeof n == "string" && n.indexOf("%") != -1;
22232
- }
22233
- function pad2(c) {
22234
- return c.length == 1 ? "0" + c : "" + c;
22235
- }
22236
- function convertToPercentage(n) {
22237
- return n <= 1 && (n = n * 100 + "%"), n;
22238
- }
22239
- function convertDecimalToHex(d) {
22240
- return Math.round(parseFloat(d) * 255).toString(16);
22241
- }
22242
- function convertHexToDecimal(h) {
22243
- return parseIntFromHex(h) / 255;
22244
- }
22245
- var matchers = (function() {
22246
- var CSS_INTEGER = "[-\\+]?\\d+%?", CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?", CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")", PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?", PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
22247
- return {
22248
- CSS_UNIT: new RegExp(CSS_UNIT),
22249
- rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
22250
- rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
22251
- hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
22252
- hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
22253
- hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
22254
- hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
22255
- hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
22256
- hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
22257
- hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
22258
- hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
22259
- };
22260
- })();
22261
- function isValidCSSUnit(color) {
22262
- return !!matchers.CSS_UNIT.exec(color);
22263
- }
22264
- function stringInputToObject(color) {
22265
- color = color.replace(trimLeft, "").replace(trimRight, "").toLowerCase();
22266
- var named = !1;
22267
- if (names[color])
22268
- color = names[color], named = !0;
22269
- else if (color == "transparent")
22270
- return {
22271
- r: 0,
22272
- g: 0,
22273
- b: 0,
22274
- a: 0,
22275
- format: "name"
22276
- };
22277
- var match;
22278
- return (match = matchers.rgb.exec(color)) ? {
22279
- r: match[1],
22280
- g: match[2],
22281
- b: match[3]
22282
- } : (match = matchers.rgba.exec(color)) ? {
22283
- r: match[1],
22284
- g: match[2],
22285
- b: match[3],
22286
- a: match[4]
22287
- } : (match = matchers.hsl.exec(color)) ? {
22288
- h: match[1],
22289
- s: match[2],
22290
- l: match[3]
22291
- } : (match = matchers.hsla.exec(color)) ? {
22292
- h: match[1],
22293
- s: match[2],
22294
- l: match[3],
22295
- a: match[4]
22296
- } : (match = matchers.hsv.exec(color)) ? {
22297
- h: match[1],
22298
- s: match[2],
22299
- v: match[3]
22300
- } : (match = matchers.hsva.exec(color)) ? {
22301
- h: match[1],
22302
- s: match[2],
22303
- v: match[3],
22304
- a: match[4]
22305
- } : (match = matchers.hex8.exec(color)) ? {
22306
- r: parseIntFromHex(match[1]),
22307
- g: parseIntFromHex(match[2]),
22308
- b: parseIntFromHex(match[3]),
22309
- a: convertHexToDecimal(match[4]),
22310
- format: named ? "name" : "hex8"
22311
- } : (match = matchers.hex6.exec(color)) ? {
22312
- r: parseIntFromHex(match[1]),
22313
- g: parseIntFromHex(match[2]),
22314
- b: parseIntFromHex(match[3]),
22315
- format: named ? "name" : "hex"
22316
- } : (match = matchers.hex4.exec(color)) ? {
22317
- r: parseIntFromHex(match[1] + "" + match[1]),
22318
- g: parseIntFromHex(match[2] + "" + match[2]),
22319
- b: parseIntFromHex(match[3] + "" + match[3]),
22320
- a: convertHexToDecimal(match[4] + "" + match[4]),
22321
- format: named ? "name" : "hex8"
22322
- } : (match = matchers.hex3.exec(color)) ? {
22323
- r: parseIntFromHex(match[1] + "" + match[1]),
22324
- g: parseIntFromHex(match[2] + "" + match[2]),
22325
- b: parseIntFromHex(match[3] + "" + match[3]),
22326
- format: named ? "name" : "hex"
22327
- } : !1;
22328
- }
22329
- function validateWCAG2Parms(parms) {
22330
- var level, size;
22331
- return parms = parms || {
22332
- level: "AA",
22333
- size: "small"
22334
- }, level = (parms.level || "AA").toUpperCase(), size = (parms.size || "small").toLowerCase(), level !== "AA" && level !== "AAA" && (level = "AA"), size !== "small" && size !== "large" && (size = "small"), {
22335
- level,
22336
- size
22337
- };
22338
- }
22339
- return tinycolor;
22340
- }));
22341
- }
22342
- });
22343
-
22344
- // ../../node_modules/.pnpm/tinygradient@1.1.5/node_modules/tinygradient/index.js
22345
- var require_tinygradient = __commonJS({
22346
- "../../node_modules/.pnpm/tinygradient@1.1.5/node_modules/tinygradient/index.js"(exports, module) {
22347
- init_cjs_shims();
22348
- var tinycolor = require_tinycolor(), RGBA_MAX = { r: 256, g: 256, b: 256, a: 1 }, HSVA_MAX = { h: 360, s: 1, v: 1, a: 1 };
22349
- function stepize(start, end, steps) {
22350
- let step = {};
22351
- for (let k in start)
22352
- start.hasOwnProperty(k) && (step[k] = steps === 0 ? 0 : (end[k] - start[k]) / steps);
22353
- return step;
22354
- }
22355
- function interpolate(step, start, i, max) {
22356
- let color = {};
22357
- for (let k in start)
22358
- start.hasOwnProperty(k) && (color[k] = step[k] * i + start[k], color[k] = color[k] < 0 ? color[k] + max[k] : max[k] !== 1 ? color[k] % max[k] : color[k]);
22359
- return color;
22360
- }
22361
- function interpolateRgb(stop1, stop2, steps) {
22362
- let start = stop1.color.toRgb(), end = stop2.color.toRgb(), step = stepize(start, end, steps), gradient2 = [stop1.color];
22363
- for (let i = 1; i < steps; i++) {
22364
- let color = interpolate(step, start, i, RGBA_MAX);
22365
- gradient2.push(tinycolor(color));
22366
- }
22367
- return gradient2;
22368
- }
22369
- function interpolateHsv(stop1, stop2, steps, mode) {
22370
- let start = stop1.color.toHsv(), end = stop2.color.toHsv();
22371
- if (start.s === 0 || end.s === 0)
22372
- return interpolateRgb(stop1, stop2, steps);
22373
- let trigonometric;
22374
- if (typeof mode == "boolean")
22375
- trigonometric = mode;
22376
- else {
22377
- let trigShortest = start.h < end.h && end.h - start.h < 180 || start.h > end.h && start.h - end.h > 180;
22378
- trigonometric = mode === "long" && trigShortest || mode === "short" && !trigShortest;
22379
- }
22380
- let step = stepize(start, end, steps), gradient2 = [stop1.color], diff2;
22381
- start.h <= end.h && !trigonometric || start.h >= end.h && trigonometric ? diff2 = end.h - start.h : trigonometric ? diff2 = 360 - end.h + start.h : diff2 = 360 - start.h + end.h, step.h = Math.pow(-1, trigonometric ? 1 : 0) * Math.abs(diff2) / steps;
22382
- for (let i = 1; i < steps; i++) {
22383
- let color = interpolate(step, start, i, HSVA_MAX);
22384
- gradient2.push(tinycolor(color));
22385
- }
22386
- return gradient2;
22387
- }
22388
- function computeSubsteps(stops, steps) {
22389
- let l = stops.length;
22390
- if (steps = parseInt(steps, 10), isNaN(steps) || steps < 2)
22391
- throw new Error("Invalid number of steps (< 2)");
22392
- if (steps < l)
22393
- throw new Error("Number of steps cannot be inferior to number of stops");
22394
- let substeps = [];
22395
- for (let i = 1; i < l; i++) {
22396
- let step = (steps - 1) * (stops[i].pos - stops[i - 1].pos);
22397
- substeps.push(Math.max(1, Math.round(step)));
22398
- }
22399
- let totalSubsteps = 1;
22400
- for (let n = l - 1; n--; ) totalSubsteps += substeps[n];
22401
- for (; totalSubsteps !== steps; )
22402
- if (totalSubsteps < steps) {
22403
- let min = Math.min.apply(null, substeps);
22404
- substeps[substeps.indexOf(min)]++, totalSubsteps++;
22405
- } else {
22406
- let max = Math.max.apply(null, substeps);
22407
- substeps[substeps.indexOf(max)]--, totalSubsteps--;
22408
- }
22409
- return substeps;
22410
- }
22411
- function computeAt(stops, pos, method, max) {
22412
- if (pos < 0 || pos > 1)
22413
- throw new Error("Position must be between 0 and 1");
22414
- let start, end;
22415
- for (let i = 0, l = stops.length; i < l - 1; i++)
22416
- if (pos >= stops[i].pos && pos < stops[i + 1].pos) {
22417
- start = stops[i], end = stops[i + 1];
22418
- break;
22419
- }
22420
- start || (start = end = stops[stops.length - 1]);
22421
- let step = stepize(start.color[method](), end.color[method](), (end.pos - start.pos) * 100), color = interpolate(step, start.color[method](), (pos - start.pos) * 100, max);
22422
- return tinycolor(color);
22423
- }
22424
- var TinyGradient = class _TinyGradient {
22425
- /**
22426
- * @param {StopInput[]|ColorInput[]} stops
22427
- * @returns {TinyGradient}
22428
- */
22429
- constructor(stops) {
22430
- if (stops.length < 2)
22431
- throw new Error("Invalid number of stops (< 2)");
22432
- let havingPositions = stops[0].pos !== void 0, l = stops.length, p = -1, lastColorLess = !1;
22433
- this.stops = stops.map((stop, i) => {
22434
- let hasPosition = stop.pos !== void 0;
22435
- if (havingPositions ^ hasPosition)
22436
- throw new Error("Cannot mix positionned and not posionned color stops");
22437
- if (hasPosition) {
22438
- let hasColor = stop.color !== void 0;
22439
- if (!hasColor && (lastColorLess || i === 0 || i === l - 1))
22440
- throw new Error("Cannot define two consecutive position-only stops");
22441
- if (lastColorLess = !hasColor, stop = {
22442
- color: hasColor ? tinycolor(stop.color) : null,
22443
- colorLess: !hasColor,
22444
- pos: stop.pos
22445
- }, stop.pos < 0 || stop.pos > 1)
22446
- throw new Error("Color stops positions must be between 0 and 1");
22447
- if (stop.pos < p)
22448
- throw new Error("Color stops positions are not ordered");
22449
- p = stop.pos;
22450
- } else
22451
- stop = {
22452
- color: tinycolor(stop.color !== void 0 ? stop.color : stop),
22453
- pos: i / (l - 1)
22454
- };
22455
- return stop;
22456
- }), this.stops[0].pos !== 0 && (this.stops.unshift({
22457
- color: this.stops[0].color,
22458
- pos: 0
22459
- }), l++), this.stops[l - 1].pos !== 1 && this.stops.push({
22460
- color: this.stops[l - 1].color,
22461
- pos: 1
22462
- });
22463
- }
22464
- /**
22465
- * Return new instance with reversed stops
22466
- * @return {TinyGradient}
22467
- */
22468
- reverse() {
22469
- let stops = [];
22470
- return this.stops.forEach(function(stop) {
22471
- stops.push({
22472
- color: stop.color,
22473
- pos: 1 - stop.pos
22474
- });
22475
- }), new _TinyGradient(stops.reverse());
22476
- }
22477
- /**
22478
- * Return new instance with looped stops
22479
- * @return {TinyGradient}
22480
- */
22481
- loop() {
22482
- let stops1 = [], stops2 = [];
22483
- return this.stops.forEach((stop) => {
22484
- stops1.push({
22485
- color: stop.color,
22486
- pos: stop.pos / 2
22487
- });
22488
- }), this.stops.slice(0, -1).forEach((stop) => {
22489
- stops2.push({
22490
- color: stop.color,
22491
- pos: 1 - stop.pos / 2
22492
- });
22493
- }), new _TinyGradient(stops1.concat(stops2.reverse()));
22494
- }
22495
- /**
22496
- * Generate gradient with RGBa interpolation
22497
- * @param {number} steps
22498
- * @return {tinycolor[]}
22499
- */
22500
- rgb(steps) {
22501
- let substeps = computeSubsteps(this.stops, steps), gradient2 = [];
22502
- this.stops.forEach((stop, i) => {
22503
- stop.colorLess && (stop.color = interpolateRgb(this.stops[i - 1], this.stops[i + 1], 2)[1]);
22504
- });
22505
- for (let i = 0, l = this.stops.length; i < l - 1; i++) {
22506
- let rgb = interpolateRgb(this.stops[i], this.stops[i + 1], substeps[i]);
22507
- gradient2.splice(gradient2.length, 0, ...rgb);
22508
- }
22509
- return gradient2.push(this.stops[this.stops.length - 1].color), gradient2;
22510
- }
22511
- /**
22512
- * Generate gradient with HSVa interpolation
22513
- * @param {number} steps
22514
- * @param {boolean|'long'|'short'} [mode=false]
22515
- * - false to step in clockwise
22516
- * - true to step in trigonometric order
22517
- * - 'short' to use the shortest way
22518
- * - 'long' to use the longest way
22519
- * @return {tinycolor[]}
22520
- */
22521
- hsv(steps, mode) {
22522
- let substeps = computeSubsteps(this.stops, steps), gradient2 = [];
22523
- this.stops.forEach((stop, i) => {
22524
- stop.colorLess && (stop.color = interpolateHsv(this.stops[i - 1], this.stops[i + 1], 2, mode)[1]);
22525
- });
22526
- for (let i = 0, l = this.stops.length; i < l - 1; i++) {
22527
- let hsv = interpolateHsv(this.stops[i], this.stops[i + 1], substeps[i], mode);
22528
- gradient2.splice(gradient2.length, 0, ...hsv);
22529
- }
22530
- return gradient2.push(this.stops[this.stops.length - 1].color), gradient2;
22531
- }
22532
- /**
22533
- * Generate CSS3 command (no prefix) for this gradient
22534
- * @param {String} [mode=linear] - 'linear' or 'radial'
22535
- * @param {String} [direction] - default is 'to right' or 'ellipse at center'
22536
- * @return {String}
22537
- */
22538
- css(mode, direction) {
22539
- mode = mode || "linear", direction = direction || (mode === "linear" ? "to right" : "ellipse at center");
22540
- let css = mode + "-gradient(" + direction;
22541
- return this.stops.forEach(function(stop) {
22542
- css += ", " + (stop.colorLess ? "" : stop.color.toRgbString() + " ") + stop.pos * 100 + "%";
22543
- }), css += ")", css;
22544
- }
22545
- /**
22546
- * Returns the color at specific position with RGBa interpolation
22547
- * @param {number} pos, between 0 and 1
22548
- * @return {tinycolor}
22549
- */
22550
- rgbAt(pos) {
22551
- return computeAt(this.stops, pos, "toRgb", RGBA_MAX);
22552
- }
22553
- /**
22554
- * Returns the color at specific position with HSVa interpolation
22555
- * @param {number} pos, between 0 and 1
22556
- * @return {tinycolor}
22557
- */
22558
- hsvAt(pos) {
22559
- return computeAt(this.stops, pos, "toHsv", HSVA_MAX);
22560
- }
22561
- };
22562
- module.exports = function(stops) {
22563
- if (arguments.length === 1) {
22564
- if (!Array.isArray(arguments[0]))
22565
- throw new Error('"stops" is not an array');
22566
- stops = arguments[0];
22567
- } else
22568
- stops = Array.prototype.slice.call(arguments);
22569
- return new TinyGradient(stops);
22570
- };
22571
- }
22572
- });
22573
-
22574
- // ../../node_modules/.pnpm/gradient-string@2.0.2/node_modules/gradient-string/index.js
22575
- var require_gradient_string = __commonJS({
22576
- "../../node_modules/.pnpm/gradient-string@2.0.2/node_modules/gradient-string/index.js"(exports, module) {
22577
- "use strict";
22578
- init_cjs_shims();
22579
- var chalk = require_source(), tinygradient = require_tinygradient(), forbiddenChars = /\s/g;
22580
- function InitGradient(...args) {
22581
- let grad = tinygradient.apply(this, args), ret = (str, opts) => applyGradient(str ? str.toString() : "", grad, opts);
22582
- return ret.multiline = (str, opts) => multilineGradient(str ? str.toString() : "", grad, opts), ret;
22583
- }
22584
- var getColors = (gradient2, options, count) => options.interpolation.toLowerCase() === "hsv" ? gradient2.hsv(count, options.hsvSpin.toLowerCase()) : gradient2.rgb(count);
22585
- function applyGradient(str, gradient2, opts) {
22586
- let options = validateOptions(opts), colorsCount = Math.max(str.replace(forbiddenChars, "").length, gradient2.stops.length), colors = getColors(gradient2, options, colorsCount), result = "";
22587
- for (let s of str)
22588
- result += s.match(forbiddenChars) ? s : chalk.hex(colors.shift().toHex())(s);
22589
- return result;
22590
- }
22591
- function multilineGradient(str, gradient2, opts) {
22592
- let options = validateOptions(opts), lines = str.split(`
22593
- `), maxLength = Math.max.apply(null, lines.map((l) => l.length).concat([gradient2.stops.length])), colors = getColors(gradient2, options, maxLength), results = [];
22594
- for (let line of lines) {
22595
- let lineColors = colors.slice(0), lineResult = "";
22596
- for (let l of line)
22597
- lineResult += chalk.hex(lineColors.shift().toHex())(l);
22598
- results.push(lineResult);
22599
- }
22600
- return results.join(`
22601
- `);
22602
- }
22603
- function validateOptions(opts) {
22604
- let options = { interpolation: "rgb", hsvSpin: "short", ...opts };
22605
- if (opts !== void 0 && typeof opts != "object")
22606
- throw new TypeError(`Expected \`options\` to be an \`object\`, got \`${typeof opts}\``);
22607
- if (typeof options.interpolation != "string")
22608
- throw new TypeError(`Expected \`options.interpolation\` to be a \`string\`, got \`${typeof options.interpolation}\``);
22609
- if (options.interpolation.toLowerCase() === "hsv" && typeof options.hsvSpin != "string")
22610
- throw new TypeError(`Expected \`options.hsvSpin\` to be a \`string\`, got \`${typeof options.hsvSpin}\``);
22611
- return options;
22612
- }
22613
- var aliases = {
22614
- atlas: { colors: ["#feac5e", "#c779d0", "#4bc0c8"], options: {} },
22615
- cristal: { colors: ["#bdfff3", "#4ac29a"], options: {} },
22616
- teen: { colors: ["#77a1d3", "#79cbca", "#e684ae"], options: {} },
22617
- mind: { colors: ["#473b7b", "#3584a7", "#30d2be"], options: {} },
22618
- morning: { colors: ["#ff5f6d", "#ffc371"], options: { interpolation: "hsv" } },
22619
- vice: { colors: ["#5ee7df", "#b490ca"], options: { interpolation: "hsv" } },
22620
- passion: { colors: ["#f43b47", "#453a94"], options: {} },
22621
- fruit: { colors: ["#ff4e50", "#f9d423"], options: {} },
22622
- instagram: { colors: ["#833ab4", "#fd1d1d", "#fcb045"], options: {} },
22623
- retro: { colors: ["#3f51b1", "#5a55ae", "#7b5fac", "#8f6aae", "#a86aa4", "#cc6b8e", "#f18271", "#f3a469", "#f7c978"], options: {} },
22624
- summer: { colors: ["#fdbb2d", "#22c1c3"], options: {} },
22625
- rainbow: { colors: ["#ff0000", "#ff0100"], options: { interpolation: "hsv", hsvSpin: "long" } },
22626
- pastel: { colors: ["#74ebd5", "#74ecd5"], options: { interpolation: "hsv", hsvSpin: "long" } }
22627
- };
22628
- module.exports = InitGradient;
22629
- for (let a in aliases)
22630
- module.exports[a] = (str) => new InitGradient(aliases[a].colors)(str, aliases[a].options), module.exports[a].multiline = (str) => new InitGradient(aliases[a].colors).multiline(str, aliases[a].options);
22631
- }
22632
- });
22633
-
22634
21384
  // ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/now.js
22635
21385
  var require_now = __commonJS({
22636
21386
  "../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/now.js"(exports, module) {
@@ -22784,20 +21534,30 @@ async function openURL(url) {
22784
21534
  return !1;
22785
21535
  let externalOpen = await import("./open-JSCXNUDN.js");
22786
21536
  try {
22787
- return await externalOpen.default(url), !0;
21537
+ let subprocess = await externalOpen.default(url);
21538
+ return await browserLaunchSucceeded(subprocess);
22788
21539
  } catch {
22789
21540
  return !1;
22790
21541
  }
22791
21542
  }
21543
+ async function browserLaunchSucceeded(subprocess) {
21544
+ return !subprocess || typeof subprocess.once != "function" ? !0 : new Promise((resolve) => {
21545
+ subprocess.on("error", (error) => {
21546
+ outputDebug(`Failed to open the browser: ${error.message}`), resolve(!1);
21547
+ }), subprocess.once("spawn", () => resolve(!0));
21548
+ });
21549
+ }
22792
21550
  async function captureOutput(command, args, options) {
22793
21551
  return (await buildExec(command, args, options)).stdout;
22794
21552
  }
22795
21553
  async function captureOutputWithExitCode(command, args, options) {
22796
21554
  let result = await buildExec(command, args, options, { reject: !1 });
21555
+ if (result.exitCode === void 0)
21556
+ throw new ExternalError(result instanceof Error ? result.message : "Command terminated without an exit code.", command, args);
22797
21557
  return {
22798
21558
  stdout: result.stdout,
22799
21559
  stderr: result.stderr,
22800
- exitCode: result.exitCode ?? 0
21560
+ exitCode: result.exitCode
22801
21561
  };
22802
21562
  }
22803
21563
  function parseCommand(command) {
@@ -22822,7 +21582,7 @@ async function exec(command, args, options) {
22822
21582
  options.background = runningOnWindows ? !1 : options.background;
22823
21583
  }
22824
21584
  let commandProcess = buildExec(command, args, options);
22825
- options?.background && commandProcess.unref(), options?.stderr && options.stderr !== "inherit" && commandProcess.stderr?.pipe(options.stderr, { end: !1 }), options?.stdout && options.stdout !== "inherit" && commandProcess.stdout?.pipe(options.stdout, { end: !1 });
21585
+ options?.background && commandProcess.unref();
22826
21586
  let aborted = !1;
22827
21587
  options?.signal?.addEventListener("abort", () => {
22828
21588
  let pid = commandProcess.pid;
@@ -22850,6 +21610,7 @@ function buildExec(command, args, options, execaOptions) {
22850
21610
  env: env2,
22851
21611
  cwd: executionCwd,
22852
21612
  input: options?.input,
21613
+ stripFinalNewline: options?.stripFinalNewline ?? !0,
22853
21614
  stdio: options?.background ? backgroundStdio : options?.stdio,
22854
21615
  stdin: options?.stdin,
22855
21616
  stdout: options?.stdout === "inherit" ? "inherit" : void 0,
@@ -22861,7 +21622,7 @@ function buildExec(command, args, options, execaOptions) {
22861
21622
  cleanup: !options?.background,
22862
21623
  ...execaOptions
22863
21624
  });
22864
- return outputDebug(`Running system process${options?.background ? " in background" : ""}:
21625
+ return options?.stderr && options.stderr !== "inherit" && commandProcess.stderr?.pipe(options.stderr, { end: !1 }), options?.stdout && options.stdout !== "inherit" && commandProcess.stdout?.pipe(options.stdout, { end: !1 }), outputDebug(`Running system process${options?.background ? " in background" : ""}:
22865
21626
  \xB7 Command: ${command} ${args.join(" ")}
22866
21627
  \xB7 Working directory: ${executionCwd}
22867
21628
  `), commandProcess;
@@ -22935,6 +21696,17 @@ var AbortController2 = class extends globalThis.AbortController {
22935
21696
  // ../cli-kit/dist/private/node/ui/components/ConcurrentOutput.js
22936
21697
  init_cjs_shims();
22937
21698
 
21699
+ // ../cli-kit/dist/private/node/output-context.js
21700
+ init_cjs_shims();
21701
+ import { AsyncLocalStorage } from "node:async_hooks";
21702
+ var outputContextStore = new AsyncLocalStorage();
21703
+ function useConcurrentOutputContext(context, callback) {
21704
+ return outputContextStore.run(context, callback);
21705
+ }
21706
+ function getConcurrentOutputContext() {
21707
+ return outputContextStore.getStore();
21708
+ }
21709
+
22938
21710
  // ../cli-kit/dist/private/node/ui.js
22939
21711
  init_cjs_shims();
22940
21712
  var import_react29 = __toESM(require_react(), 1);
@@ -23118,18 +21890,18 @@ var getAllProperties = (object) => {
23118
21890
  while ((object = Reflect.getPrototypeOf(object)) && object !== Object.prototype);
23119
21891
  return properties;
23120
21892
  };
23121
- function autoBind(self2, { include, exclude } = {}) {
21893
+ function autoBind(self, { include, exclude } = {}) {
23122
21894
  let filter = (key) => {
23123
21895
  let match = (pattern) => typeof pattern == "string" ? key === pattern : pattern.test(key);
23124
21896
  return include ? include.some(match) : exclude ? !exclude.some(match) : !0;
23125
21897
  };
23126
- for (let [object, key] of getAllProperties(self2.constructor.prototype)) {
21898
+ for (let [object, key] of getAllProperties(self.constructor.prototype)) {
23127
21899
  if (key === "constructor" || !filter(key))
23128
21900
  continue;
23129
21901
  let descriptor = Reflect.getOwnPropertyDescriptor(object, key);
23130
- descriptor && typeof descriptor.value == "function" && (self2[key] = self2[key].bind(self2));
21902
+ descriptor && typeof descriptor.value == "function" && (self[key] = self[key].bind(self));
23131
21903
  }
23132
- return self2;
21904
+ return self;
23133
21905
  }
23134
21906
 
23135
21907
  // ../../node_modules/.pnpm/ink@6.8.0_@types+react@18.3.12_react@19.2.4/node_modules/ink/build/ink.js
@@ -24346,18 +23118,17 @@ init_cjs_shims();
24346
23118
  // ../../node_modules/.pnpm/string-width@7.2.0/node_modules/string-width/index.js
24347
23119
  init_cjs_shims();
24348
23120
 
24349
- // ../../node_modules/.pnpm/get-east-asian-width@1.6.0/node_modules/get-east-asian-width/index.js
23121
+ // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/index.js
24350
23122
  init_cjs_shims();
24351
23123
 
24352
- // ../../node_modules/.pnpm/get-east-asian-width@1.6.0/node_modules/get-east-asian-width/lookup.js
23124
+ // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup.js
24353
23125
  init_cjs_shims();
24354
23126
 
24355
- // ../../node_modules/.pnpm/get-east-asian-width@1.6.0/node_modules/get-east-asian-width/lookup-data.js
23127
+ // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup-data.js
24356
23128
  init_cjs_shims();
24357
- var ambiguousRanges = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109], fullwidthMinimalCodePoint = 12288, fullwidthMaximumCodePoint = 65510, fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
24358
- var wideMinimalCodePoint = 4352, wideMaximumCodePoint = 262141, wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101589, 101631, 101662, 101760, 101874, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128728, 128732, 128735, 128747, 128748, 128756, 128764, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129674, 129678, 129734, 129736, 129736, 129741, 129756, 129759, 129770, 129775, 129784, 131072, 196605, 196608, 262141];
23129
+ var ambiguousRanges = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109], fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510], halfwidthRanges = [8361, 8361, 65377, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65512, 65518], narrowRanges = [32, 126, 162, 163, 165, 166, 172, 172, 175, 175, 10214, 10221, 10629, 10630], wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101589, 101631, 101662, 101760, 101874, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128728, 128732, 128735, 128747, 128748, 128756, 128764, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129674, 129678, 129734, 129736, 129736, 129741, 129756, 129759, 129770, 129775, 129784, 131072, 196605, 196608, 262141];
24359
23130
 
24360
- // ../../node_modules/.pnpm/get-east-asian-width@1.6.0/node_modules/get-east-asian-width/utilities.js
23131
+ // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/utilities.js
24361
23132
  init_cjs_shims();
24362
23133
  var isInRange = (ranges, codePoint) => {
24363
23134
  let low = 0, high = Math.floor(ranges.length / 2) - 1;
@@ -24373,8 +23144,8 @@ var isInRange = (ranges, codePoint) => {
24373
23144
  return !1;
24374
23145
  };
24375
23146
 
24376
- // ../../node_modules/.pnpm/get-east-asian-width@1.6.0/node_modules/get-east-asian-width/lookup.js
24377
- var commonCjkCodePoint = 19968, [wideFastPathStart, wideFastPathEnd] = /* @__PURE__ */ findWideFastPathRange(wideRanges);
23147
+ // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup.js
23148
+ var minimumAmbiguousCodePoint = ambiguousRanges[0], maximumAmbiguousCodePoint = ambiguousRanges.at(-1), minimumFullWidthCodePoint = fullwidthRanges[0], maximumFullWidthCodePoint = fullwidthRanges.at(-1), minimumHalfWidthCodePoint = halfwidthRanges[0], maximumHalfWidthCodePoint = halfwidthRanges.at(-1), minimumNarrowCodePoint = narrowRanges[0], maximumNarrowCodePoint = narrowRanges.at(-1), minimumWideCodePoint = wideRanges[0], maximumWideCodePoint = wideRanges.at(-1), commonCjkCodePoint = 19968, [wideFastPathStart, wideFastPathEnd] = findWideFastPathRange(wideRanges);
24378
23149
  function findWideFastPathRange(ranges) {
24379
23150
  let fastPathStart = ranges[0], fastPathEnd = ranges[1];
24380
23151
  for (let index = 0; index < ranges.length; index += 2) {
@@ -24385,10 +23156,10 @@ function findWideFastPathRange(ranges) {
24385
23156
  }
24386
23157
  return [fastPathStart, fastPathEnd];
24387
23158
  }
24388
- var isAmbiguous = (codePoint) => codePoint < 161 || codePoint > 1114109 ? !1 : isInRange(ambiguousRanges, codePoint), isFullWidth = (codePoint) => codePoint < fullwidthMinimalCodePoint || codePoint > fullwidthMaximumCodePoint ? !1 : isInRange(fullwidthRanges, codePoint);
24389
- var isWide = (codePoint) => codePoint >= wideFastPathStart && codePoint <= wideFastPathEnd ? !0 : codePoint < wideMinimalCodePoint || codePoint > wideMaximumCodePoint ? !1 : isInRange(wideRanges, codePoint);
23159
+ var isAmbiguous = (codePoint) => codePoint < minimumAmbiguousCodePoint || codePoint > maximumAmbiguousCodePoint ? !1 : isInRange(ambiguousRanges, codePoint), isFullWidth = (codePoint) => codePoint < minimumFullWidthCodePoint || codePoint > maximumFullWidthCodePoint ? !1 : isInRange(fullwidthRanges, codePoint);
23160
+ var isWide = (codePoint) => codePoint >= wideFastPathStart && codePoint <= wideFastPathEnd ? !0 : codePoint < minimumWideCodePoint || codePoint > maximumWideCodePoint ? !1 : isInRange(wideRanges, codePoint);
24390
23161
 
24391
- // ../../node_modules/.pnpm/get-east-asian-width@1.6.0/node_modules/get-east-asian-width/index.js
23162
+ // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/index.js
24392
23163
  function validate(codePoint) {
24393
23164
  if (!Number.isSafeInteger(codePoint))
24394
23165
  throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
@@ -24725,58 +23496,6 @@ init_cjs_shims();
24725
23496
 
24726
23497
  // ../../node_modules/.pnpm/string-width@8.2.0/node_modules/string-width/index.js
24727
23498
  init_cjs_shims();
24728
-
24729
- // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/index.js
24730
- init_cjs_shims();
24731
-
24732
- // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup.js
24733
- init_cjs_shims();
24734
-
24735
- // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup-data.js
24736
- init_cjs_shims();
24737
- var ambiguousRanges2 = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109], fullwidthRanges2 = [12288, 12288, 65281, 65376, 65504, 65510], halfwidthRanges2 = [8361, 8361, 65377, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65512, 65518], narrowRanges2 = [32, 126, 162, 163, 165, 166, 172, 172, 175, 175, 10214, 10221, 10629, 10630], wideRanges2 = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101589, 101631, 101662, 101760, 101874, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128728, 128732, 128735, 128747, 128748, 128756, 128764, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129674, 129678, 129734, 129736, 129736, 129741, 129756, 129759, 129770, 129775, 129784, 131072, 196605, 196608, 262141];
24738
-
24739
- // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/utilities.js
24740
- init_cjs_shims();
24741
- var isInRange2 = (ranges, codePoint) => {
24742
- let low = 0, high = Math.floor(ranges.length / 2) - 1;
24743
- for (; low <= high; ) {
24744
- let mid = Math.floor((low + high) / 2), i = mid * 2;
24745
- if (codePoint < ranges[i])
24746
- high = mid - 1;
24747
- else if (codePoint > ranges[i + 1])
24748
- low = mid + 1;
24749
- else
24750
- return !0;
24751
- }
24752
- return !1;
24753
- };
24754
-
24755
- // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup.js
24756
- var minimumAmbiguousCodePoint = ambiguousRanges2[0], maximumAmbiguousCodePoint = ambiguousRanges2.at(-1), minimumFullWidthCodePoint = fullwidthRanges2[0], maximumFullWidthCodePoint = fullwidthRanges2.at(-1), minimumHalfWidthCodePoint = halfwidthRanges2[0], maximumHalfWidthCodePoint = halfwidthRanges2.at(-1), minimumNarrowCodePoint = narrowRanges2[0], maximumNarrowCodePoint = narrowRanges2.at(-1), minimumWideCodePoint = wideRanges2[0], maximumWideCodePoint = wideRanges2.at(-1), commonCjkCodePoint2 = 19968, [wideFastPathStart2, wideFastPathEnd2] = findWideFastPathRange2(wideRanges2);
24757
- function findWideFastPathRange2(ranges) {
24758
- let fastPathStart = ranges[0], fastPathEnd = ranges[1];
24759
- for (let index = 0; index < ranges.length; index += 2) {
24760
- let start = ranges[index], end = ranges[index + 1];
24761
- if (commonCjkCodePoint2 >= start && commonCjkCodePoint2 <= end)
24762
- return [start, end];
24763
- end - start > fastPathEnd - fastPathStart && (fastPathStart = start, fastPathEnd = end);
24764
- }
24765
- return [fastPathStart, fastPathEnd];
24766
- }
24767
- var isAmbiguous2 = (codePoint) => codePoint < minimumAmbiguousCodePoint || codePoint > maximumAmbiguousCodePoint ? !1 : isInRange2(ambiguousRanges2, codePoint), isFullWidth2 = (codePoint) => codePoint < minimumFullWidthCodePoint || codePoint > maximumFullWidthCodePoint ? !1 : isInRange2(fullwidthRanges2, codePoint);
24768
- var isWide2 = (codePoint) => codePoint >= wideFastPathStart2 && codePoint <= wideFastPathEnd2 ? !0 : codePoint < minimumWideCodePoint || codePoint > maximumWideCodePoint ? !1 : isInRange2(wideRanges2, codePoint);
24769
-
24770
- // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/index.js
24771
- function validate2(codePoint) {
24772
- if (!Number.isSafeInteger(codePoint))
24773
- throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
24774
- }
24775
- function eastAsianWidth2(codePoint, { ambiguousAsWide = !1 } = {}) {
24776
- return validate2(codePoint), isFullWidth2(codePoint) || isWide2(codePoint) || ambiguousAsWide && isAmbiguous2(codePoint) ? 2 : 1;
24777
- }
24778
-
24779
- // ../../node_modules/.pnpm/string-width@8.2.0/node_modules/string-width/index.js
24780
23499
  var segmenter2 = new Intl.Segmenter(), zeroWidthClusterRegex = /^(?:\p{Default_Ignorable_Code_Point}|\p{Control}|\p{Format}|\p{Mark}|\p{Surrogate})+$/v, leadingNonPrintingRegex = /^[\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}\p{Mark}\p{Surrogate}]+/v, rgiEmojiRegex = /^\p{RGI_Emoji}$/v, unqualifiedKeycapRegex = /^[\d#*]\u20E3$/, extendedPictographicRegex = /\p{Extended_Pictographic}/gu;
24781
23500
  function isDoubleWidthNonRgiEmojiSequence(segment) {
24782
23501
  if (segment.length > 50)
@@ -24799,7 +23518,7 @@ function trailingHalfwidthWidth(segment, eastAsianWidthOptions) {
24799
23518
  let extra = 0;
24800
23519
  if (segment.length > 1)
24801
23520
  for (let char of segment.slice(1))
24802
- char >= "\uFF00" && char <= "\uFFEF" && (extra += eastAsianWidth2(char.codePointAt(0), eastAsianWidthOptions));
23521
+ char >= "\uFF00" && char <= "\uFFEF" && (extra += eastAsianWidth(char.codePointAt(0), eastAsianWidthOptions));
24803
23522
  return extra;
24804
23523
  }
24805
23524
  function stringWidth2(input, options = {}) {
@@ -24822,7 +23541,7 @@ function stringWidth2(input, options = {}) {
24822
23541
  continue;
24823
23542
  }
24824
23543
  let codePoint = baseVisible(segment).codePointAt(0);
24825
- width += eastAsianWidth2(codePoint, eastAsianWidthOptions), width += trailingHalfwidthWidth(segment, eastAsianWidthOptions);
23544
+ width += eastAsianWidth(codePoint, eastAsianWidthOptions), width += trailingHalfwidthWidth(segment, eastAsianWidthOptions);
24826
23545
  }
24827
23546
  return width;
24828
23547
  }
@@ -24910,12 +23629,12 @@ function tokenize(string, endCharacter = Number.POSITIVE_INFINITY) {
24910
23629
  continue;
24911
23630
  }
24912
23631
  }
24913
- let isFullWidth3 = isFullwidthCodePoint(codePoint), character = String.fromCodePoint(codePoint);
23632
+ let isFullWidth2 = isFullwidthCodePoint(codePoint), character = String.fromCodePoint(codePoint);
24914
23633
  if (returnValue.push({
24915
23634
  type: "character",
24916
23635
  value: character,
24917
- isFullWidth: isFullWidth3
24918
- }), index += character.length, visibleCount += isFullWidth3 ? 2 : character.length, visibleCount >= endCharacter)
23636
+ isFullWidth: isFullWidth2
23637
+ }), index += character.length, visibleCount += isFullWidth2 ? 2 : character.length, visibleCount >= endCharacter)
24919
23638
  break;
24920
23639
  }
24921
23640
  return returnValue;
@@ -28632,7 +27351,6 @@ var { platform: platform2 } = process14, common = {
28632
27351
 
28633
27352
  // ../cli-kit/dist/private/node/ui/components/ConcurrentOutput.js
28634
27353
  import { Writable } from "stream";
28635
- import { AsyncLocalStorage } from "node:async_hooks";
28636
27354
  import { StringDecoder } from "node:string_decoder";
28637
27355
  function addLeadingZero(number) {
28638
27356
  return number < 10 ? `0${number}` : number.toString();
@@ -28641,10 +27359,6 @@ function currentTime() {
28641
27359
  let currentDateTime = /* @__PURE__ */ new Date(), hours = addLeadingZero(currentDateTime.getHours()), minutes = addLeadingZero(currentDateTime.getMinutes()), seconds = addLeadingZero(currentDateTime.getSeconds());
28642
27360
  return `${hours}:${minutes}:${seconds}`;
28643
27361
  }
28644
- var outputContextStore = new AsyncLocalStorage();
28645
- function useConcurrentOutputContext(context, callback) {
28646
- return outputContextStore.run(context, callback);
28647
- }
28648
27362
  async function runConcurrentProcessesForJson({ processes, abortSignal }) {
28649
27363
  await Promise.all(processes.map(async (process15) => {
28650
27364
  let createStream = () => {
@@ -28659,7 +27373,7 @@ async function runConcurrentProcessesForJson({ processes, abortSignal }) {
28659
27373
  next();
28660
27374
  return;
28661
27375
  }
28662
- let currentPrefix = outputContextStore.getStore()?.outputPrefix ?? process15.prefix;
27376
+ let currentPrefix = getConcurrentOutputContext()?.outputPrefix ?? process15.prefix;
28663
27377
  hasPendingLine || (prefix = currentPrefix);
28664
27378
  let lines = (pending + decoder.write(chunk)).split(/\r?\n/);
28665
27379
  pending = lines.pop() ?? "";
@@ -28692,7 +27406,7 @@ var ConcurrentOutput = ({ processes, prefixColumnSize, abortSignal, showTimestam
28692
27406
  return concurrentColors[colorIndex];
28693
27407
  }, [concurrentColors]), writableStream = (0, import_react30.useCallback)((process15, prefixes) => new Writable({
28694
27408
  write(chunk, _encoding, next) {
28695
- let context = outputContextStore.getStore(), prefix = context?.outputPrefix ?? process15.prefix, shouldStripAnsi = context?.stripAnsi ?? !0, log = chunk.toString("utf8").replace(/(\n)$/, ""), index = addPrefix(prefix, prefixes), lines = shouldStripAnsi ? stripAnsi(log).split(/\n/) : log.split(/\n/);
27409
+ let context = getConcurrentOutputContext(), prefix = context?.outputPrefix ?? process15.prefix, shouldStripAnsi = context?.stripAnsi ?? !0, log = chunk.toString("utf8").replace(/(\n)$/, ""), index = addPrefix(prefix, prefixes), lines = shouldStripAnsi ? stripAnsi(log).split(/\n/) : log.split(/\n/);
28696
27410
  setProcessOutput((previousProcessOutput) => [
28697
27411
  ...previousProcessOutput,
28698
27412
  {
@@ -29061,7 +27775,7 @@ var import_react43 = __toESM(require_react(), 1), typeToLogLevel = {
29061
27775
  };
29062
27776
  function alert(options) {
29063
27777
  let { type, headline, body, nextSteps, reference, link: link3, customSections, orderedNextSteps = !1, renderOptions } = options;
29064
- if ((type === "info" || type === "warning") && commandEventOutputMode() === "json") {
27778
+ if ((type === "info" || type === "warning" || type === "success") && commandEventOutputMode() === "json") {
29065
27779
  let message = alertMessage(options);
29066
27780
  return type === "warning" ? outputWarn(message) : outputInfo(message), message;
29067
27781
  }
@@ -29812,57 +28526,37 @@ init_cjs_shims();
29812
28526
  // ../cli-kit/dist/private/node/ui/components/LoadingBar.js
29813
28527
  init_cjs_shims();
29814
28528
 
29815
- // ../cli-kit/dist/private/node/ui/components/TextAnimation.js
28529
+ // ../cli-kit/dist/private/node/ui/components/LoadingIndicator.js
29816
28530
  init_cjs_shims();
29817
- var import_react58 = __toESM(require_react(), 1), import_gradient_string = __toESM(require_gradient_string(), 1);
29818
- function rainbow(text, frame) {
29819
- let hue = 5 * frame, leftColor = { h: hue % 360, s: 0.8, v: 1 }, rightColor = { h: (hue + 1) % 360, s: 0.8, v: 1 };
29820
- return (0, import_gradient_string.default)(leftColor, rightColor)(text, { interpolation: "hsv", hsvSpin: "long" });
29821
- }
29822
- function rotated(text, steps) {
29823
- let normalizedSteps = steps % text.length, start = text.slice(-normalizedSteps), end = text.slice(0, -normalizedSteps);
29824
- return start + end;
29825
- }
29826
- function truncated(text, maxWidth) {
29827
- return maxWidth ? text.slice(0, maxWidth) : text;
29828
- }
29829
- var TextAnimation = (0, import_react58.memo)(({ text, maxWidth }) => {
29830
- let frame = (0, import_react58.useRef)(0), [renderedFrame, setRenderedFrame] = (0, import_react58.useState)(text), timeout = (0, import_react58.useRef)(), { stdout } = use_stdout_default(), [width, setWidth] = (0, import_react58.useState)(maxWidth ?? Math.floor(stdout.columns * 0.66));
29831
- (0, import_react58.useLayoutEffect)(() => {
29832
- let handleResize = () => {
29833
- setWidth(Math.floor(stdout.columns * 0.66));
29834
- };
29835
- return stdout.on("resize", handleResize), () => {
29836
- stdout.off("resize", handleResize);
28531
+ var import_react58 = __toESM(require_react(), 1);
28532
+ var SHOPIFY_GREEN = "#96BF48", CHEVRON_BLINK_INTERVAL_MS = 350, LoadingIndicator = ({ title, noColor = !shouldDisplayColors() }) => {
28533
+ let [isChevronVisible, setIsChevronVisible] = (0, import_react58.useState)(!0);
28534
+ return (0, import_react58.useLayoutEffect)(() => {
28535
+ let interval = setInterval(() => {
28536
+ setIsChevronVisible((isVisible) => !isVisible);
28537
+ }, CHEVRON_BLINK_INTERVAL_MS);
28538
+ return () => {
28539
+ clearInterval(interval);
29837
28540
  };
29838
- }, [stdout]);
29839
- let renderAnimation = (0, import_react58.useCallback)(() => {
29840
- let newFrame = frame.current + 1;
29841
- frame.current = newFrame, setRenderedFrame(rainbow(truncated(rotated(text, frame.current), width), frame.current)), timeout.current = setTimeout(() => {
29842
- renderAnimation();
29843
- }, 35);
29844
- }, [text, width]);
29845
- return (0, import_react58.useLayoutEffect)(() => (renderAnimation(), () => {
29846
- clearTimeout(timeout.current);
29847
- }), [renderAnimation]), import_react58.default.createElement(Text, null, renderedFrame);
29848
- });
29849
- TextAnimation.displayName = "TextAnimation";
28541
+ }, []), import_react58.default.createElement(
28542
+ Text,
28543
+ null,
28544
+ import_react58.default.createElement(Text, { bold: !0, italic: !0 }, "S"),
28545
+ import_react58.default.createElement(Text, { bold: !0, color: noColor ? void 0 : SHOPIFY_GREEN }, isChevronVisible ? ">" : " "),
28546
+ ` ${title} ...`
28547
+ );
28548
+ };
29850
28549
 
29851
28550
  // ../cli-kit/dist/private/node/ui/components/LoadingBar.js
29852
28551
  var import_react59 = __toESM(require_react(), 1);
29853
- var loadingBarChar = "\u2580", hillString = "\u2581\u2581\u2582\u2582\u2583\u2583\u2584\u2584\u2585\u2585\u2586\u2586\u2587\u2587\u2588\u2588\u2587\u2587\u2586\u2586\u2585\u2585\u2584\u2584\u2583\u2583\u2582\u2582\u2581\u2581", LoadingBar = ({ title, noColor, noProgressBar }) => {
29854
- let { twoThirds } = useLayout(), { stdout } = use_stdout_default(), isTTY2 = !!stdout.isTTY, loadingBar = new Array(twoThirds).fill(loadingBarChar).join("");
29855
- return (noColor ?? !shouldDisplayColors()) && (loadingBar = hillString.repeat(Math.ceil(twoThirds / hillString.length))), import_react59.default.createElement(
29856
- Box_default,
29857
- { flexDirection: "column" },
29858
- isTTY2 && !noProgressBar && import_react59.default.createElement(TextAnimation, { text: loadingBar, maxWidth: twoThirds }),
29859
- import_react59.default.createElement(
29860
- Text,
29861
- null,
29862
- title,
29863
- " ..."
29864
- )
29865
- );
28552
+ var LoadingBar = ({ title, noColor, noProgressBar }) => {
28553
+ let { stdout } = use_stdout_default(), isTTY2 = !!stdout.isTTY, colorsDisabled = noColor ?? !shouldDisplayColors();
28554
+ return !isTTY2 || noProgressBar ? import_react59.default.createElement(
28555
+ Text,
28556
+ null,
28557
+ title,
28558
+ " ..."
28559
+ ) : import_react59.default.createElement(LoadingIndicator, { title, noColor: colorsDisabled });
29866
28560
  };
29867
28561
 
29868
28562
  // ../cli-kit/dist/private/node/ui/hooks/use-async-and-unmount.js
@@ -29962,15 +28656,15 @@ function Tasks({ tasks, silent = isUnitTest(), onComplete = noop3, abortSignal,
29962
28656
  // ../cli-kit/dist/private/node/ui/components/TextPrompt.js
29963
28657
  init_cjs_shims();
29964
28658
  var import_react62 = __toESM(require_react(), 1);
29965
- var TextPrompt = ({ message, onSubmit, validate: validate3, defaultValue = "", password = !1, allowEmpty = !1, emptyDisplayedValue = "(empty)", abortSignal, preview, initialAnswer = "" }) => {
28659
+ var TextPrompt = ({ message, onSubmit, validate: validate2, defaultValue = "", password = !1, allowEmpty = !1, emptyDisplayedValue = "(empty)", abortSignal, preview, initialAnswer = "" }) => {
29966
28660
  if (password && defaultValue)
29967
28661
  throw new Error("Can't use defaultValue with password");
29968
28662
  let validateAnswer = (0, import_react62.useCallback)((value) => {
29969
- if (validate3)
29970
- return validate3(value);
28663
+ if (validate2)
28664
+ return validate2(value);
29971
28665
  if (value.length === 0 && !allowEmpty)
29972
28666
  return "Type an answer to the prompt.";
29973
- }, [allowEmpty, validate3]), { oneThird } = useLayout(), { promptState, setPromptState, answer, setAnswer } = usePrompt({
28667
+ }, [allowEmpty, validate2]), { oneThird } = useLayout(), { promptState, setPromptState, answer, setAnswer } = usePrompt({
29974
28668
  initialAnswer
29975
28669
  }), answerOrDefault = answer.length > 0 ? answer : defaultValue, displayEmptyValue = answerOrDefault === "", displayedAnswer = displayEmptyValue ? emptyDisplayedValue : answerOrDefault, complete = useComplete(), [error, setError] = (0, import_react62.useState)(void 0), color = promptState === PromptState.Error ? "red" : "cyan", { isAborted } = useAbortSignal(abortSignal);
29976
28670
  return use_input_default((input, key) => {
@@ -30049,7 +28743,7 @@ init_cjs_shims();
30049
28743
 
30050
28744
  // ../cli-kit/dist/public/common/function.js
30051
28745
  init_cjs_shims();
30052
- var import_memoize = __toESM(require_memoize()), import_debounce3 = __toESM(require_debounce()), import_throttle2 = __toESM(require_throttle());
28746
+ var import_memoize = __toESM(require_memoize(), 1), import_debounce3 = __toESM(require_debounce(), 1), import_throttle2 = __toESM(require_throttle(), 1);
30053
28747
  function debounce3(func, wait, options) {
30054
28748
  return (0, import_debounce3.default)(func, wait, options);
30055
28749
  }
@@ -30292,14 +28986,15 @@ async function renderDangerousConfirmationPrompt({ renderOptions, ...props }, ui
30292
28986
  }), confirmed;
30293
28987
  });
30294
28988
  }
30295
- var keypress = async (stdin = process.stdin, uiDebugOptions = defaultUIDebugOptions) => (throwInNonTTY({ message: "Press any key" }, uiDebugOptions), runWithTimer("cmd_all_timing_prompts_ms")(() => new Promise((resolve, reject) => {
30296
- let handler = (buffer) => {
30297
- stdin.setRawMode(!1);
30298
- let bytes = Array.from(buffer);
30299
- bytes.length && bytes[0] === 3 && (outputDebug("Canceled keypress, User pressed CTRL+C"), reject(new AbortSilentError())), stdin.unref(), process.nextTick(resolve);
28989
+ var keypress = async (stdin = process.stdin, uiDebugOptions = defaultUIDebugOptions, { keys } = {}) => (throwInNonTTY({ message: "Press any key" }, uiDebugOptions), runWithTimer("cmd_all_timing_prompts_ms")(() => {
28990
+ let { promise, resolve, reject } = Promise.withResolvers(), stdinWasRaw = stdin.isRaw === !0, stopListening = () => {
28991
+ stdin.off("data", handler), stdinWasRaw || stdin.setRawMode(!1), stdin.unref();
28992
+ }, handler = (chunk) => {
28993
+ let text = chunk.toString();
28994
+ text.includes("") ? (stopListening(), outputDebug("Canceled keypress, User pressed CTRL+C"), reject(new AbortSilentError())) : (!keys || [...text].some((character) => keys.includes(character))) && (stopListening(), process.nextTick(resolve));
30300
28995
  };
30301
- stdin.setRawMode(!0), stdin.once("data", handler), stdin.ref();
30302
- })));
28996
+ return stdinWasRaw || stdin.setRawMode(!0), stdin.on("data", handler), stdin.ref(), promise;
28997
+ }));
30303
28998
  function isTTY({ stdin = void 0, uiDebugOptions = defaultUIDebugOptions } = {}) {
30304
28999
  return !!(uiDebugOptions.skipTTYCheck || stdin || terminalSupportsPrompting());
30305
29000
  }
@@ -30319,6 +29014,8 @@ export {
30319
29014
  require_baseForOwn,
30320
29015
  require_lib,
30321
29016
  require_stacktracey,
29017
+ useConcurrentOutputContext,
29018
+ getConcurrentOutputContext,
30322
29019
  require_react,
30323
29020
  Box_default,
30324
29021
  Text,
@@ -30330,13 +29027,13 @@ export {
30330
29027
  render2 as render,
30331
29028
  handleCtrlC,
30332
29029
  figures_default,
30333
- useConcurrentOutputContext,
30334
29030
  ConcurrentOutput,
30335
29031
  Link,
30336
29032
  TabularData,
30337
29033
  Alert,
30338
29034
  useAbortSignal,
30339
29035
  require_baseEach,
29036
+ LoadingIndicator,
30340
29037
  debounce3 as debounce,
30341
29038
  renderConcurrent,
30342
29039
  renderInfo,
@@ -30459,4 +29156,4 @@ react-reconciler/cjs/react-reconciler.development.js:
30459
29156
  * LICENSE file in the root directory of this source tree.
30460
29157
  *)
30461
29158
  */
30462
- //# sourceMappingURL=chunk-PUN2NAT5.js.map
29159
+ //# sourceMappingURL=chunk-DKAJC4S3.js.map