@flitsmeister/design-system 3.0.2 → 3.1.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 (172) hide show
  1. package/README.md +93 -1
  2. package/dist/ce/dom.d.ts +2 -0
  3. package/dist/ce/dom.d.ts.map +1 -0
  4. package/dist/ce/dom.js +11 -0
  5. package/dist/ce/dom.js.map +1 -0
  6. package/dist/ce/implicit-form-submit.d.ts +2 -0
  7. package/dist/ce/implicit-form-submit.d.ts.map +1 -0
  8. package/dist/ce/implicit-form-submit.js +27 -0
  9. package/dist/ce/implicit-form-submit.js.map +1 -0
  10. package/dist/fm-button/fm-button.d.ts +4 -1
  11. package/dist/fm-button/fm-button.d.ts.map +1 -1
  12. package/dist/fm-button/fm-button.js +4 -1
  13. package/dist/fm-button/fm-button.js.map +1 -1
  14. package/dist/fm-button/fm-button.style.js +7 -7
  15. package/dist/fm-dropdown/fm-dropdown.style.js +6 -6
  16. package/dist/fm-icon/fm-icon.style.js +4 -4
  17. package/dist/fm-input/fm-input.d.ts +21 -3
  18. package/dist/fm-input/fm-input.d.ts.map +1 -1
  19. package/dist/fm-input/fm-input.js +25 -6
  20. package/dist/fm-input/fm-input.js.map +1 -1
  21. package/dist/fm-input/fm-input.style.js +7 -7
  22. package/dist/fm-radio-input/fm-radio-input.style.js +4 -4
  23. package/dist/fm-segmented-controller/fm-segmented-controller.style.d.ts.map +1 -1
  24. package/dist/fm-segmented-controller/fm-segmented-controller.style.js +7 -8
  25. package/dist/fm-segmented-controller/fm-segmented-controller.style.js.map +1 -1
  26. package/dist/fm-wizard/fm-wizard.style.js +5 -5
  27. package/dist/react/ce.d.ts +14 -0
  28. package/dist/react/ce.d.ts.map +1 -0
  29. package/dist/react/ce.js +43 -0
  30. package/dist/react/ce.js.map +1 -0
  31. package/dist/react/fm-button.d.ts +27 -0
  32. package/dist/react/fm-button.d.ts.map +1 -0
  33. package/dist/react/fm-button.js +26 -0
  34. package/dist/react/fm-button.js.map +1 -0
  35. package/dist/react/fm-dropdown.d.ts +13 -0
  36. package/dist/react/fm-dropdown.d.ts.map +1 -0
  37. package/dist/react/fm-dropdown.js +19 -0
  38. package/dist/react/fm-dropdown.js.map +1 -0
  39. package/dist/react/fm-icon.d.ts +11 -0
  40. package/dist/react/fm-icon.d.ts.map +1 -0
  41. package/dist/react/fm-icon.js +13 -0
  42. package/dist/react/fm-icon.js.map +1 -0
  43. package/dist/react/fm-input.d.ts +30 -0
  44. package/dist/react/fm-input.d.ts.map +1 -0
  45. package/dist/react/fm-input.js +52 -0
  46. package/dist/react/fm-input.js.map +1 -0
  47. package/dist/react/fm-radio-input.d.ts +15 -0
  48. package/dist/react/fm-radio-input.d.ts.map +1 -0
  49. package/dist/react/fm-radio-input.js +15 -0
  50. package/dist/react/fm-radio-input.js.map +1 -0
  51. package/dist/react/fm-segmented-controller.d.ts +13 -0
  52. package/dist/react/fm-segmented-controller.d.ts.map +1 -0
  53. package/dist/react/fm-segmented-controller.js +16 -0
  54. package/dist/react/fm-segmented-controller.js.map +1 -0
  55. package/dist/react/index.d.ts +14 -0
  56. package/dist/react/index.d.ts.map +1 -0
  57. package/dist/react/index.js +8 -0
  58. package/dist/react/index.js.map +1 -0
  59. package/dist/vue/ce.d.ts +3 -0
  60. package/dist/vue/ce.d.ts.map +1 -0
  61. package/dist/vue/ce.js +16 -0
  62. package/dist/vue/ce.js.map +1 -0
  63. package/dist/vue/fm-button.d.ts +164 -0
  64. package/dist/vue/fm-button.d.ts.map +1 -0
  65. package/dist/vue/fm-button.js +67 -0
  66. package/dist/vue/fm-button.js.map +1 -0
  67. package/dist/vue/fm-dropdown.d.ts +65 -0
  68. package/dist/vue/fm-dropdown.d.ts.map +1 -0
  69. package/dist/vue/fm-dropdown.js +40 -0
  70. package/dist/vue/fm-dropdown.js.map +1 -0
  71. package/dist/vue/fm-input.d.ts +150 -0
  72. package/dist/vue/fm-input.d.ts.map +1 -0
  73. package/dist/vue/fm-input.js +93 -0
  74. package/dist/vue/fm-input.js.map +1 -0
  75. package/dist/vue/index.d.ts +6 -0
  76. package/dist/vue/index.d.ts.map +1 -0
  77. package/dist/vue/index.js +4 -0
  78. package/dist/vue/index.js.map +1 -0
  79. package/icons/bold/add.svg +3 -0
  80. package/icons/bold/check.svg +3 -0
  81. package/icons/bold/checkbox-checked.svg +4 -0
  82. package/icons/bold/checkbox-unchecked.svg +3 -0
  83. package/icons/bold/chevron-backward.svg +3 -0
  84. package/icons/bold/chevron-down.svg +3 -0
  85. package/icons/bold/chevron-forward.svg +3 -0
  86. package/icons/bold/chevron-up.svg +3 -0
  87. package/icons/bold/close-1.svg +3 -0
  88. package/icons/bold/close.svg +4 -0
  89. package/icons/bold/dot.svg +3 -0
  90. package/icons/bold/open-external.svg +3 -0
  91. package/icons/bold/prominent-1.svg +3 -0
  92. package/icons/bold/prominent.svg +3 -0
  93. package/icons/bold/question.svg +4 -0
  94. package/icons/bold/remove.svg +3 -0
  95. package/icons/bold/search.svg +3 -0
  96. package/icons/bold/spinner.svg +3 -0
  97. package/icons/bold/warning.svg +3 -0
  98. package/icons/duotone/check.svg +4 -0
  99. package/icons/filled/achievements.svg +3 -0
  100. package/icons/filled/add.svg +3 -0
  101. package/icons/filled/app-settings.svg +3 -0
  102. package/icons/filled/calendar.svg +7 -0
  103. package/icons/filled/car-simplified.svg +3 -0
  104. package/icons/filled/check.svg +3 -0
  105. package/icons/filled/clock.svg +3 -0
  106. package/icons/filled/close.svg +3 -0
  107. package/icons/filled/control.svg +7 -0
  108. package/icons/filled/danger.svg +3 -0
  109. package/icons/filled/delete.svg +3 -0
  110. package/icons/filled/deviceOne.svg +3 -0
  111. package/icons/filled/deviceTwo.svg +3 -0
  112. package/icons/filled/disputeFine.svg +3 -0
  113. package/icons/filled/email.svg +3 -0
  114. package/icons/filled/gasPrices.svg +3 -0
  115. package/icons/filled/hazard.svg +3 -0
  116. package/icons/filled/highway.svg +3 -0
  117. package/icons/filled/info.svg +3 -0
  118. package/icons/filled/lock-close.svg +3 -0
  119. package/icons/filled/lock-open.svg +3 -0
  120. package/icons/filled/lock.svg +3 -0
  121. package/icons/filled/microphone.svg +4 -0
  122. package/icons/filled/notificaiton-unread.svg +4 -0
  123. package/icons/filled/notificaiton.svg +3 -0
  124. package/icons/filled/parking.svg +3 -0
  125. package/icons/filled/play.svg +8 -0
  126. package/icons/filled/question.svg +3 -0
  127. package/icons/filled/rating-empty.svg +3 -0
  128. package/icons/filled/rating-full.svg +3 -0
  129. package/icons/filled/rating-half.svg +4 -0
  130. package/icons/filled/remove.svg +3 -0
  131. package/icons/filled/return-location.svg +3 -0
  132. package/icons/filled/support.svg +3 -0
  133. package/icons/filled/toll.svg +3 -0
  134. package/icons/filled/tripHistory.svg +3 -0
  135. package/icons/filled/truck.svg +3 -0
  136. package/icons/filled/user-pin.svg +3 -0
  137. package/icons/filled/user-profile.svg +3 -0
  138. package/icons/filled/warning.svg +3 -0
  139. package/icons/filled/zone-default.svg +3 -0
  140. package/icons/filled/zone-indoor.svg +3 -0
  141. package/icons/filled/zone-street.svg +3 -0
  142. package/icons/stroke/arrow-Down.svg +3 -0
  143. package/icons/stroke/arrow-Up.svg +3 -0
  144. package/icons/stroke/arrow-left.svg +3 -0
  145. package/icons/stroke/arrow-right.svg +3 -0
  146. package/icons/stroke/check.svg +3 -0
  147. package/icons/stroke/checkbox-checked.svg +4 -0
  148. package/icons/stroke/checkbox-unchecked.svg +3 -0
  149. package/icons/stroke/chevron-backward.svg +3 -0
  150. package/icons/stroke/chevron-down.svg +3 -0
  151. package/icons/stroke/chevron-forward.svg +3 -0
  152. package/icons/stroke/chevron-up.svg +3 -0
  153. package/icons/stroke/clock.svg +3 -0
  154. package/icons/stroke/close-1.svg +3 -0
  155. package/icons/stroke/close.svg +4 -0
  156. package/icons/stroke/download.svg +4 -0
  157. package/icons/stroke/email.svg +4 -0
  158. package/icons/stroke/hamburger.svg +3 -0
  159. package/icons/stroke/login.svg +4 -0
  160. package/icons/stroke/logout.svg +3 -0
  161. package/icons/stroke/more.svg +5 -0
  162. package/icons/stroke/open-external.svg +3 -0
  163. package/icons/stroke/question.svg +4 -0
  164. package/icons/stroke/search.svg +3 -0
  165. package/icons/stroke/spinner.svg +3 -0
  166. package/icons/stroke/warning.svg +3 -0
  167. package/package.json +78 -14
  168. package/scripts/bundle-cli.mjs +16 -0
  169. package/scripts/copy-package-assets.mjs +19 -0
  170. package/scripts/install-cli.bundled.mjs +1637 -0
  171. package/styles/fm-design-system/fm-design-system.css +921 -0
  172. package/styles/fm-design-system/fm-design-system.tailwind.css +323 -0
@@ -0,0 +1,1637 @@
1
+ #!/usr/bin/env node
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __commonJS = (cb, mod) => function __require() {
9
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+
28
+ // node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
29
+ var require_src = __commonJS({
30
+ "node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports, module) {
31
+ "use strict";
32
+ var ESC = "\x1B";
33
+ var CSI = `${ESC}[`;
34
+ var beep = "\x07";
35
+ var cursor = {
36
+ to(x3, y2) {
37
+ if (!y2) return `${CSI}${x3 + 1}G`;
38
+ return `${CSI}${y2 + 1};${x3 + 1}H`;
39
+ },
40
+ move(x3, y2) {
41
+ let ret = "";
42
+ if (x3 < 0) ret += `${CSI}${-x3}D`;
43
+ else if (x3 > 0) ret += `${CSI}${x3}C`;
44
+ if (y2 < 0) ret += `${CSI}${-y2}A`;
45
+ else if (y2 > 0) ret += `${CSI}${y2}B`;
46
+ return ret;
47
+ },
48
+ up: (count = 1) => `${CSI}${count}A`,
49
+ down: (count = 1) => `${CSI}${count}B`,
50
+ forward: (count = 1) => `${CSI}${count}C`,
51
+ backward: (count = 1) => `${CSI}${count}D`,
52
+ nextLine: (count = 1) => `${CSI}E`.repeat(count),
53
+ prevLine: (count = 1) => `${CSI}F`.repeat(count),
54
+ left: `${CSI}G`,
55
+ hide: `${CSI}?25l`,
56
+ show: `${CSI}?25h`,
57
+ save: `${ESC}7`,
58
+ restore: `${ESC}8`
59
+ };
60
+ var scroll = {
61
+ up: (count = 1) => `${CSI}S`.repeat(count),
62
+ down: (count = 1) => `${CSI}T`.repeat(count)
63
+ };
64
+ var erase = {
65
+ screen: `${CSI}2J`,
66
+ up: (count = 1) => `${CSI}1J`.repeat(count),
67
+ down: (count = 1) => `${CSI}J`.repeat(count),
68
+ line: `${CSI}2K`,
69
+ lineEnd: `${CSI}K`,
70
+ lineStart: `${CSI}1K`,
71
+ lines(count) {
72
+ let clear = "";
73
+ for (let i = 0; i < count; i++)
74
+ clear += this.line + (i < count - 1 ? cursor.up() : "");
75
+ if (count)
76
+ clear += cursor.left;
77
+ return clear;
78
+ }
79
+ };
80
+ module.exports = { cursor, scroll, erase, beep };
81
+ }
82
+ });
83
+
84
+ // scripts/install-cli.mjs
85
+ import { spawn } from "node:child_process";
86
+
87
+ // node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js
88
+ var ANSI_BACKGROUND_OFFSET = 10;
89
+ var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
90
+ var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
91
+ var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
92
+ var styles = {
93
+ modifier: {
94
+ reset: [0, 0],
95
+ // 21 isn't widely supported and 22 does the same thing
96
+ bold: [1, 22],
97
+ dim: [2, 22],
98
+ italic: [3, 23],
99
+ underline: [4, 24],
100
+ overline: [53, 55],
101
+ inverse: [7, 27],
102
+ hidden: [8, 28],
103
+ strikethrough: [9, 29]
104
+ },
105
+ color: {
106
+ black: [30, 39],
107
+ red: [31, 39],
108
+ green: [32, 39],
109
+ yellow: [33, 39],
110
+ blue: [34, 39],
111
+ magenta: [35, 39],
112
+ cyan: [36, 39],
113
+ white: [37, 39],
114
+ // Bright color
115
+ blackBright: [90, 39],
116
+ gray: [90, 39],
117
+ // Alias of `blackBright`
118
+ grey: [90, 39],
119
+ // Alias of `blackBright`
120
+ redBright: [91, 39],
121
+ greenBright: [92, 39],
122
+ yellowBright: [93, 39],
123
+ blueBright: [94, 39],
124
+ magentaBright: [95, 39],
125
+ cyanBright: [96, 39],
126
+ whiteBright: [97, 39]
127
+ },
128
+ bgColor: {
129
+ bgBlack: [40, 49],
130
+ bgRed: [41, 49],
131
+ bgGreen: [42, 49],
132
+ bgYellow: [43, 49],
133
+ bgBlue: [44, 49],
134
+ bgMagenta: [45, 49],
135
+ bgCyan: [46, 49],
136
+ bgWhite: [47, 49],
137
+ // Bright color
138
+ bgBlackBright: [100, 49],
139
+ bgGray: [100, 49],
140
+ // Alias of `bgBlackBright`
141
+ bgGrey: [100, 49],
142
+ // Alias of `bgBlackBright`
143
+ bgRedBright: [101, 49],
144
+ bgGreenBright: [102, 49],
145
+ bgYellowBright: [103, 49],
146
+ bgBlueBright: [104, 49],
147
+ bgMagentaBright: [105, 49],
148
+ bgCyanBright: [106, 49],
149
+ bgWhiteBright: [107, 49]
150
+ }
151
+ };
152
+ var modifierNames = Object.keys(styles.modifier);
153
+ var foregroundColorNames = Object.keys(styles.color);
154
+ var backgroundColorNames = Object.keys(styles.bgColor);
155
+ var colorNames = [...foregroundColorNames, ...backgroundColorNames];
156
+ function assembleStyles() {
157
+ const codes = /* @__PURE__ */ new Map();
158
+ for (const [groupName, group] of Object.entries(styles)) {
159
+ for (const [styleName, style] of Object.entries(group)) {
160
+ styles[styleName] = {
161
+ open: `\x1B[${style[0]}m`,
162
+ close: `\x1B[${style[1]}m`
163
+ };
164
+ group[styleName] = styles[styleName];
165
+ codes.set(style[0], style[1]);
166
+ }
167
+ Object.defineProperty(styles, groupName, {
168
+ value: group,
169
+ enumerable: false
170
+ });
171
+ }
172
+ Object.defineProperty(styles, "codes", {
173
+ value: codes,
174
+ enumerable: false
175
+ });
176
+ styles.color.close = "\x1B[39m";
177
+ styles.bgColor.close = "\x1B[49m";
178
+ styles.color.ansi = wrapAnsi16();
179
+ styles.color.ansi256 = wrapAnsi256();
180
+ styles.color.ansi16m = wrapAnsi16m();
181
+ styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
182
+ styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
183
+ styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
184
+ Object.defineProperties(styles, {
185
+ rgbToAnsi256: {
186
+ value(red, green, blue) {
187
+ if (red === green && green === blue) {
188
+ if (red < 8) {
189
+ return 16;
190
+ }
191
+ if (red > 248) {
192
+ return 231;
193
+ }
194
+ return Math.round((red - 8) / 247 * 24) + 232;
195
+ }
196
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
197
+ },
198
+ enumerable: false
199
+ },
200
+ hexToRgb: {
201
+ value(hex) {
202
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
203
+ if (!matches) {
204
+ return [0, 0, 0];
205
+ }
206
+ let [colorString] = matches;
207
+ if (colorString.length === 3) {
208
+ colorString = [...colorString].map((character) => character + character).join("");
209
+ }
210
+ const integer = Number.parseInt(colorString, 16);
211
+ return [
212
+ /* eslint-disable no-bitwise */
213
+ integer >> 16 & 255,
214
+ integer >> 8 & 255,
215
+ integer & 255
216
+ /* eslint-enable no-bitwise */
217
+ ];
218
+ },
219
+ enumerable: false
220
+ },
221
+ hexToAnsi256: {
222
+ value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
223
+ enumerable: false
224
+ },
225
+ ansi256ToAnsi: {
226
+ value(code) {
227
+ if (code < 8) {
228
+ return 30 + code;
229
+ }
230
+ if (code < 16) {
231
+ return 90 + (code - 8);
232
+ }
233
+ let red;
234
+ let green;
235
+ let blue;
236
+ if (code >= 232) {
237
+ red = ((code - 232) * 10 + 8) / 255;
238
+ green = red;
239
+ blue = red;
240
+ } else {
241
+ code -= 16;
242
+ const remainder = code % 36;
243
+ red = Math.floor(code / 36) / 5;
244
+ green = Math.floor(remainder / 6) / 5;
245
+ blue = remainder % 6 / 5;
246
+ }
247
+ const value = Math.max(red, green, blue) * 2;
248
+ if (value === 0) {
249
+ return 30;
250
+ }
251
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
252
+ if (value === 2) {
253
+ result += 60;
254
+ }
255
+ return result;
256
+ },
257
+ enumerable: false
258
+ },
259
+ rgbToAnsi: {
260
+ value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
261
+ enumerable: false
262
+ },
263
+ hexToAnsi: {
264
+ value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
265
+ enumerable: false
266
+ }
267
+ });
268
+ return styles;
269
+ }
270
+ var ansiStyles = assembleStyles();
271
+ var ansi_styles_default = ansiStyles;
272
+
273
+ // node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.js
274
+ import process2 from "node:process";
275
+ import os from "node:os";
276
+ import tty from "node:tty";
277
+ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process2.argv) {
278
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
279
+ const position = argv.indexOf(prefix + flag);
280
+ const terminatorPosition = argv.indexOf("--");
281
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
282
+ }
283
+ var { env } = process2;
284
+ var flagForceColor;
285
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
286
+ flagForceColor = 0;
287
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
288
+ flagForceColor = 1;
289
+ }
290
+ function envForceColor() {
291
+ if ("FORCE_COLOR" in env) {
292
+ if (env.FORCE_COLOR === "true") {
293
+ return 1;
294
+ }
295
+ if (env.FORCE_COLOR === "false") {
296
+ return 0;
297
+ }
298
+ return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
299
+ }
300
+ }
301
+ function translateLevel(level) {
302
+ if (level === 0) {
303
+ return false;
304
+ }
305
+ return {
306
+ level,
307
+ hasBasic: true,
308
+ has256: level >= 2,
309
+ has16m: level >= 3
310
+ };
311
+ }
312
+ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
313
+ const noFlagForceColor = envForceColor();
314
+ if (noFlagForceColor !== void 0) {
315
+ flagForceColor = noFlagForceColor;
316
+ }
317
+ const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
318
+ if (forceColor === 0) {
319
+ return 0;
320
+ }
321
+ if (sniffFlags) {
322
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
323
+ return 3;
324
+ }
325
+ if (hasFlag("color=256")) {
326
+ return 2;
327
+ }
328
+ }
329
+ if ("TF_BUILD" in env && "AGENT_NAME" in env) {
330
+ return 1;
331
+ }
332
+ if (haveStream && !streamIsTTY && forceColor === void 0) {
333
+ return 0;
334
+ }
335
+ const min = forceColor || 0;
336
+ if (env.TERM === "dumb") {
337
+ return min;
338
+ }
339
+ if (process2.platform === "win32") {
340
+ const osRelease = os.release().split(".");
341
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
342
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
343
+ }
344
+ return 1;
345
+ }
346
+ if ("CI" in env) {
347
+ if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env)) {
348
+ return 3;
349
+ }
350
+ if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
351
+ return 1;
352
+ }
353
+ return min;
354
+ }
355
+ if ("TEAMCITY_VERSION" in env) {
356
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
357
+ }
358
+ if (env.COLORTERM === "truecolor") {
359
+ return 3;
360
+ }
361
+ if (env.TERM === "xterm-kitty") {
362
+ return 3;
363
+ }
364
+ if (env.TERM === "xterm-ghostty") {
365
+ return 3;
366
+ }
367
+ if (env.TERM === "wezterm") {
368
+ return 3;
369
+ }
370
+ if ("TERM_PROGRAM" in env) {
371
+ const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
372
+ switch (env.TERM_PROGRAM) {
373
+ case "iTerm.app": {
374
+ return version >= 3 ? 3 : 2;
375
+ }
376
+ case "Apple_Terminal": {
377
+ return 2;
378
+ }
379
+ }
380
+ }
381
+ if (/-256(color)?$/i.test(env.TERM)) {
382
+ return 2;
383
+ }
384
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
385
+ return 1;
386
+ }
387
+ if ("COLORTERM" in env) {
388
+ return 1;
389
+ }
390
+ return min;
391
+ }
392
+ function createSupportsColor(stream, options = {}) {
393
+ const level = _supportsColor(stream, {
394
+ streamIsTTY: stream && stream.isTTY,
395
+ ...options
396
+ });
397
+ return translateLevel(level);
398
+ }
399
+ var supportsColor = {
400
+ stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
401
+ stderr: createSupportsColor({ isTTY: tty.isatty(2) })
402
+ };
403
+ var supports_color_default = supportsColor;
404
+
405
+ // node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/utilities.js
406
+ function stringReplaceAll(string, substring, replacer) {
407
+ let index = string.indexOf(substring);
408
+ if (index === -1) {
409
+ return string;
410
+ }
411
+ const substringLength = substring.length;
412
+ let endIndex = 0;
413
+ let returnValue = "";
414
+ do {
415
+ returnValue += string.slice(endIndex, index) + substring + replacer;
416
+ endIndex = index + substringLength;
417
+ index = string.indexOf(substring, endIndex);
418
+ } while (index !== -1);
419
+ returnValue += string.slice(endIndex);
420
+ return returnValue;
421
+ }
422
+ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
423
+ let endIndex = 0;
424
+ let returnValue = "";
425
+ do {
426
+ const gotCR = string[index - 1] === "\r";
427
+ returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
428
+ endIndex = index + 1;
429
+ index = string.indexOf("\n", endIndex);
430
+ } while (index !== -1);
431
+ returnValue += string.slice(endIndex);
432
+ return returnValue;
433
+ }
434
+
435
+ // node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/index.js
436
+ var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
437
+ var GENERATOR = Symbol("GENERATOR");
438
+ var STYLER = Symbol("STYLER");
439
+ var IS_EMPTY = Symbol("IS_EMPTY");
440
+ var levelMapping = [
441
+ "ansi",
442
+ "ansi",
443
+ "ansi256",
444
+ "ansi16m"
445
+ ];
446
+ var styles2 = /* @__PURE__ */ Object.create(null);
447
+ var applyOptions = (object, options = {}) => {
448
+ if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
449
+ throw new Error("The `level` option should be an integer from 0 to 3");
450
+ }
451
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
452
+ object.level = options.level === void 0 ? colorLevel : options.level;
453
+ };
454
+ var chalkFactory = (options) => {
455
+ const chalk2 = (...strings) => strings.join(" ");
456
+ applyOptions(chalk2, options);
457
+ Object.setPrototypeOf(chalk2, createChalk.prototype);
458
+ return chalk2;
459
+ };
460
+ function createChalk(options) {
461
+ return chalkFactory(options);
462
+ }
463
+ Object.setPrototypeOf(createChalk.prototype, Function.prototype);
464
+ for (const [styleName, style] of Object.entries(ansi_styles_default)) {
465
+ styles2[styleName] = {
466
+ get() {
467
+ const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
468
+ Object.defineProperty(this, styleName, { value: builder });
469
+ return builder;
470
+ }
471
+ };
472
+ }
473
+ styles2.visible = {
474
+ get() {
475
+ const builder = createBuilder(this, this[STYLER], true);
476
+ Object.defineProperty(this, "visible", { value: builder });
477
+ return builder;
478
+ }
479
+ };
480
+ var getModelAnsi = (model, level, type, ...arguments_) => {
481
+ if (model === "rgb") {
482
+ if (level === "ansi16m") {
483
+ return ansi_styles_default[type].ansi16m(...arguments_);
484
+ }
485
+ if (level === "ansi256") {
486
+ return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
487
+ }
488
+ return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
489
+ }
490
+ if (model === "hex") {
491
+ return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
492
+ }
493
+ return ansi_styles_default[type][model](...arguments_);
494
+ };
495
+ var usedModels = ["rgb", "hex", "ansi256"];
496
+ for (const model of usedModels) {
497
+ styles2[model] = {
498
+ get() {
499
+ const { level } = this;
500
+ return function(...arguments_) {
501
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
502
+ return createBuilder(this, styler, this[IS_EMPTY]);
503
+ };
504
+ }
505
+ };
506
+ const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
507
+ styles2[bgModel] = {
508
+ get() {
509
+ const { level } = this;
510
+ return function(...arguments_) {
511
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
512
+ return createBuilder(this, styler, this[IS_EMPTY]);
513
+ };
514
+ }
515
+ };
516
+ }
517
+ var proto = Object.defineProperties(() => {
518
+ }, {
519
+ ...styles2,
520
+ level: {
521
+ enumerable: true,
522
+ get() {
523
+ return this[GENERATOR].level;
524
+ },
525
+ set(level) {
526
+ this[GENERATOR].level = level;
527
+ }
528
+ }
529
+ });
530
+ var createStyler = (open, close, parent) => {
531
+ let openAll;
532
+ let closeAll;
533
+ if (parent === void 0) {
534
+ openAll = open;
535
+ closeAll = close;
536
+ } else {
537
+ openAll = parent.openAll + open;
538
+ closeAll = close + parent.closeAll;
539
+ }
540
+ return {
541
+ open,
542
+ close,
543
+ openAll,
544
+ closeAll,
545
+ parent
546
+ };
547
+ };
548
+ var createBuilder = (self, _styler, _isEmpty) => {
549
+ const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
550
+ Object.setPrototypeOf(builder, proto);
551
+ builder[GENERATOR] = self;
552
+ builder[STYLER] = _styler;
553
+ builder[IS_EMPTY] = _isEmpty;
554
+ return builder;
555
+ };
556
+ var applyStyle = (self, string) => {
557
+ if (self.level <= 0 || !string) {
558
+ return self[IS_EMPTY] ? "" : string;
559
+ }
560
+ let styler = self[STYLER];
561
+ if (styler === void 0) {
562
+ return string;
563
+ }
564
+ const { openAll, closeAll } = styler;
565
+ if (string.includes("\x1B")) {
566
+ while (styler !== void 0) {
567
+ string = stringReplaceAll(string, styler.close, styler.open);
568
+ styler = styler.parent;
569
+ }
570
+ }
571
+ const lfIndex = string.indexOf("\n");
572
+ if (lfIndex !== -1) {
573
+ string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
574
+ }
575
+ return openAll + string + closeAll;
576
+ };
577
+ Object.defineProperties(createChalk.prototype, styles2);
578
+ var chalk = createChalk();
579
+ var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
580
+ var source_default = chalk;
581
+
582
+ // node_modules/.pnpm/@clack+core@1.1.0/node_modules/@clack/core/dist/index.mjs
583
+ var import_sisteransi = __toESM(require_src(), 1);
584
+ import { stdout as R, stdin as q } from "node:process";
585
+ import * as k from "node:readline";
586
+ import ot from "node:readline";
587
+ import { ReadStream as J } from "node:tty";
588
+ function x(t2, e, s) {
589
+ if (!s.some((u) => !u.disabled)) return t2;
590
+ const i = t2 + e, r = Math.max(s.length - 1, 0), n = i < 0 ? r : i > r ? 0 : i;
591
+ return s[n].disabled ? x(n, e < 0 ? -1 : 1, s) : n;
592
+ }
593
+ var at = (t2) => t2 === 161 || t2 === 164 || t2 === 167 || t2 === 168 || t2 === 170 || t2 === 173 || t2 === 174 || t2 >= 176 && t2 <= 180 || t2 >= 182 && t2 <= 186 || t2 >= 188 && t2 <= 191 || t2 === 198 || t2 === 208 || t2 === 215 || t2 === 216 || t2 >= 222 && t2 <= 225 || t2 === 230 || t2 >= 232 && t2 <= 234 || t2 === 236 || t2 === 237 || t2 === 240 || t2 === 242 || t2 === 243 || t2 >= 247 && t2 <= 250 || t2 === 252 || t2 === 254 || t2 === 257 || t2 === 273 || t2 === 275 || t2 === 283 || t2 === 294 || t2 === 295 || t2 === 299 || t2 >= 305 && t2 <= 307 || t2 === 312 || t2 >= 319 && t2 <= 322 || t2 === 324 || t2 >= 328 && t2 <= 331 || t2 === 333 || t2 === 338 || t2 === 339 || t2 === 358 || t2 === 359 || t2 === 363 || t2 === 462 || t2 === 464 || t2 === 466 || t2 === 468 || t2 === 470 || t2 === 472 || t2 === 474 || t2 === 476 || t2 === 593 || t2 === 609 || t2 === 708 || t2 === 711 || t2 >= 713 && t2 <= 715 || t2 === 717 || t2 === 720 || t2 >= 728 && t2 <= 731 || t2 === 733 || t2 === 735 || t2 >= 768 && t2 <= 879 || t2 >= 913 && t2 <= 929 || t2 >= 931 && t2 <= 937 || t2 >= 945 && t2 <= 961 || t2 >= 963 && t2 <= 969 || t2 === 1025 || t2 >= 1040 && t2 <= 1103 || t2 === 1105 || t2 === 8208 || t2 >= 8211 && t2 <= 8214 || t2 === 8216 || t2 === 8217 || t2 === 8220 || t2 === 8221 || t2 >= 8224 && t2 <= 8226 || t2 >= 8228 && t2 <= 8231 || t2 === 8240 || t2 === 8242 || t2 === 8243 || t2 === 8245 || t2 === 8251 || t2 === 8254 || t2 === 8308 || t2 === 8319 || t2 >= 8321 && t2 <= 8324 || t2 === 8364 || t2 === 8451 || t2 === 8453 || t2 === 8457 || t2 === 8467 || t2 === 8470 || t2 === 8481 || t2 === 8482 || t2 === 8486 || t2 === 8491 || t2 === 8531 || t2 === 8532 || t2 >= 8539 && t2 <= 8542 || t2 >= 8544 && t2 <= 8555 || t2 >= 8560 && t2 <= 8569 || t2 === 8585 || t2 >= 8592 && t2 <= 8601 || t2 === 8632 || t2 === 8633 || t2 === 8658 || t2 === 8660 || t2 === 8679 || t2 === 8704 || t2 === 8706 || t2 === 8707 || t2 === 8711 || t2 === 8712 || t2 === 8715 || t2 === 8719 || t2 === 8721 || t2 === 8725 || t2 === 8730 || t2 >= 8733 && t2 <= 8736 || t2 === 8739 || t2 === 8741 || t2 >= 8743 && t2 <= 8748 || t2 === 8750 || t2 >= 8756 && t2 <= 8759 || t2 === 8764 || t2 === 8765 || t2 === 8776 || t2 === 8780 || t2 === 8786 || t2 === 8800 || t2 === 8801 || t2 >= 8804 && t2 <= 8807 || t2 === 8810 || t2 === 8811 || t2 === 8814 || t2 === 8815 || t2 === 8834 || t2 === 8835 || t2 === 8838 || t2 === 8839 || t2 === 8853 || t2 === 8857 || t2 === 8869 || t2 === 8895 || t2 === 8978 || t2 >= 9312 && t2 <= 9449 || t2 >= 9451 && t2 <= 9547 || t2 >= 9552 && t2 <= 9587 || t2 >= 9600 && t2 <= 9615 || t2 >= 9618 && t2 <= 9621 || t2 === 9632 || t2 === 9633 || t2 >= 9635 && t2 <= 9641 || t2 === 9650 || t2 === 9651 || t2 === 9654 || t2 === 9655 || t2 === 9660 || t2 === 9661 || t2 === 9664 || t2 === 9665 || t2 >= 9670 && t2 <= 9672 || t2 === 9675 || t2 >= 9678 && t2 <= 9681 || t2 >= 9698 && t2 <= 9701 || t2 === 9711 || t2 === 9733 || t2 === 9734 || t2 === 9737 || t2 === 9742 || t2 === 9743 || t2 === 9756 || t2 === 9758 || t2 === 9792 || t2 === 9794 || t2 === 9824 || t2 === 9825 || t2 >= 9827 && t2 <= 9829 || t2 >= 9831 && t2 <= 9834 || t2 === 9836 || t2 === 9837 || t2 === 9839 || t2 === 9886 || t2 === 9887 || t2 === 9919 || t2 >= 9926 && t2 <= 9933 || t2 >= 9935 && t2 <= 9939 || t2 >= 9941 && t2 <= 9953 || t2 === 9955 || t2 === 9960 || t2 === 9961 || t2 >= 9963 && t2 <= 9969 || t2 === 9972 || t2 >= 9974 && t2 <= 9977 || t2 === 9979 || t2 === 9980 || t2 === 9982 || t2 === 9983 || t2 === 10045 || t2 >= 10102 && t2 <= 10111 || t2 >= 11094 && t2 <= 11097 || t2 >= 12872 && t2 <= 12879 || t2 >= 57344 && t2 <= 63743 || t2 >= 65024 && t2 <= 65039 || t2 === 65533 || t2 >= 127232 && t2 <= 127242 || t2 >= 127248 && t2 <= 127277 || t2 >= 127280 && t2 <= 127337 || t2 >= 127344 && t2 <= 127373 || t2 === 127375 || t2 === 127376 || t2 >= 127387 && t2 <= 127404 || t2 >= 917760 && t2 <= 917999 || t2 >= 983040 && t2 <= 1048573 || t2 >= 1048576 && t2 <= 1114109;
594
+ var lt = (t2) => t2 === 12288 || t2 >= 65281 && t2 <= 65376 || t2 >= 65504 && t2 <= 65510;
595
+ var ht = (t2) => t2 >= 4352 && t2 <= 4447 || t2 === 8986 || t2 === 8987 || t2 === 9001 || t2 === 9002 || t2 >= 9193 && t2 <= 9196 || t2 === 9200 || t2 === 9203 || t2 === 9725 || t2 === 9726 || t2 === 9748 || t2 === 9749 || t2 >= 9800 && t2 <= 9811 || t2 === 9855 || t2 === 9875 || t2 === 9889 || t2 === 9898 || t2 === 9899 || t2 === 9917 || t2 === 9918 || t2 === 9924 || t2 === 9925 || t2 === 9934 || t2 === 9940 || t2 === 9962 || t2 === 9970 || t2 === 9971 || t2 === 9973 || t2 === 9978 || t2 === 9981 || t2 === 9989 || t2 === 9994 || t2 === 9995 || t2 === 10024 || t2 === 10060 || t2 === 10062 || t2 >= 10067 && t2 <= 10069 || t2 === 10071 || t2 >= 10133 && t2 <= 10135 || t2 === 10160 || t2 === 10175 || t2 === 11035 || t2 === 11036 || t2 === 11088 || t2 === 11093 || t2 >= 11904 && t2 <= 11929 || t2 >= 11931 && t2 <= 12019 || t2 >= 12032 && t2 <= 12245 || t2 >= 12272 && t2 <= 12287 || t2 >= 12289 && t2 <= 12350 || t2 >= 12353 && t2 <= 12438 || t2 >= 12441 && t2 <= 12543 || t2 >= 12549 && t2 <= 12591 || t2 >= 12593 && t2 <= 12686 || t2 >= 12688 && t2 <= 12771 || t2 >= 12783 && t2 <= 12830 || t2 >= 12832 && t2 <= 12871 || t2 >= 12880 && t2 <= 19903 || t2 >= 19968 && t2 <= 42124 || t2 >= 42128 && t2 <= 42182 || t2 >= 43360 && t2 <= 43388 || t2 >= 44032 && t2 <= 55203 || t2 >= 63744 && t2 <= 64255 || t2 >= 65040 && t2 <= 65049 || t2 >= 65072 && t2 <= 65106 || t2 >= 65108 && t2 <= 65126 || t2 >= 65128 && t2 <= 65131 || t2 >= 94176 && t2 <= 94180 || t2 === 94192 || t2 === 94193 || t2 >= 94208 && t2 <= 100343 || t2 >= 100352 && t2 <= 101589 || t2 >= 101632 && t2 <= 101640 || t2 >= 110576 && t2 <= 110579 || t2 >= 110581 && t2 <= 110587 || t2 === 110589 || t2 === 110590 || t2 >= 110592 && t2 <= 110882 || t2 === 110898 || t2 >= 110928 && t2 <= 110930 || t2 === 110933 || t2 >= 110948 && t2 <= 110951 || t2 >= 110960 && t2 <= 111355 || t2 === 126980 || t2 === 127183 || t2 === 127374 || t2 >= 127377 && t2 <= 127386 || t2 >= 127488 && t2 <= 127490 || t2 >= 127504 && t2 <= 127547 || t2 >= 127552 && t2 <= 127560 || t2 === 127568 || t2 === 127569 || t2 >= 127584 && t2 <= 127589 || t2 >= 127744 && t2 <= 127776 || t2 >= 127789 && t2 <= 127797 || t2 >= 127799 && t2 <= 127868 || t2 >= 127870 && t2 <= 127891 || t2 >= 127904 && t2 <= 127946 || t2 >= 127951 && t2 <= 127955 || t2 >= 127968 && t2 <= 127984 || t2 === 127988 || t2 >= 127992 && t2 <= 128062 || t2 === 128064 || t2 >= 128066 && t2 <= 128252 || t2 >= 128255 && t2 <= 128317 || t2 >= 128331 && t2 <= 128334 || t2 >= 128336 && t2 <= 128359 || t2 === 128378 || t2 === 128405 || t2 === 128406 || t2 === 128420 || t2 >= 128507 && t2 <= 128591 || t2 >= 128640 && t2 <= 128709 || t2 === 128716 || t2 >= 128720 && t2 <= 128722 || t2 >= 128725 && t2 <= 128727 || t2 >= 128732 && t2 <= 128735 || t2 === 128747 || t2 === 128748 || t2 >= 128756 && t2 <= 128764 || t2 >= 128992 && t2 <= 129003 || t2 === 129008 || t2 >= 129292 && t2 <= 129338 || t2 >= 129340 && t2 <= 129349 || t2 >= 129351 && t2 <= 129535 || t2 >= 129648 && t2 <= 129660 || t2 >= 129664 && t2 <= 129672 || t2 >= 129680 && t2 <= 129725 || t2 >= 129727 && t2 <= 129733 || t2 >= 129742 && t2 <= 129755 || t2 >= 129760 && t2 <= 129768 || t2 >= 129776 && t2 <= 129784 || t2 >= 131072 && t2 <= 196605 || t2 >= 196608 && t2 <= 262141;
596
+ var O = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
597
+ var y = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
598
+ var L = /\t{1,1000}/y;
599
+ var P = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "yu");
600
+ var M = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
601
+ var ct = new RegExp("\\p{M}+", "gu");
602
+ var ft = { limit: 1 / 0, ellipsis: "" };
603
+ var X = (t2, e = {}, s = {}) => {
604
+ const i = e.limit ?? 1 / 0, r = e.ellipsis ?? "", n = e?.ellipsisWidth ?? (r ? X(r, ft, s).width : 0), u = s.ansiWidth ?? 0, a = s.controlWidth ?? 0, l = s.tabWidth ?? 8, E = s.ambiguousWidth ?? 1, g = s.emojiWidth ?? 2, m = s.fullWidthWidth ?? 2, A = s.regularWidth ?? 1, V2 = s.wideWidth ?? 2;
605
+ let h2 = 0, o = 0, p = t2.length, v = 0, F = false, d = p, b = Math.max(0, i - n), C = 0, w = 0, c = 0, f = 0;
606
+ t: for (; ; ) {
607
+ if (w > C || o >= p && o > h2) {
608
+ const ut = t2.slice(C, w) || t2.slice(h2, o);
609
+ v = 0;
610
+ for (const Y of ut.replaceAll(ct, "")) {
611
+ const $ = Y.codePointAt(0) || 0;
612
+ if (lt($) ? f = m : ht($) ? f = V2 : E !== A && at($) ? f = E : f = A, c + f > b && (d = Math.min(d, Math.max(C, h2) + v)), c + f > i) {
613
+ F = true;
614
+ break t;
615
+ }
616
+ v += Y.length, c += f;
617
+ }
618
+ C = w = 0;
619
+ }
620
+ if (o >= p) break;
621
+ if (M.lastIndex = o, M.test(t2)) {
622
+ if (v = M.lastIndex - o, f = v * A, c + f > b && (d = Math.min(d, o + Math.floor((b - c) / A))), c + f > i) {
623
+ F = true;
624
+ break;
625
+ }
626
+ c += f, C = h2, w = o, o = h2 = M.lastIndex;
627
+ continue;
628
+ }
629
+ if (O.lastIndex = o, O.test(t2)) {
630
+ if (c + u > b && (d = Math.min(d, o)), c + u > i) {
631
+ F = true;
632
+ break;
633
+ }
634
+ c += u, C = h2, w = o, o = h2 = O.lastIndex;
635
+ continue;
636
+ }
637
+ if (y.lastIndex = o, y.test(t2)) {
638
+ if (v = y.lastIndex - o, f = v * a, c + f > b && (d = Math.min(d, o + Math.floor((b - c) / a))), c + f > i) {
639
+ F = true;
640
+ break;
641
+ }
642
+ c += f, C = h2, w = o, o = h2 = y.lastIndex;
643
+ continue;
644
+ }
645
+ if (L.lastIndex = o, L.test(t2)) {
646
+ if (v = L.lastIndex - o, f = v * l, c + f > b && (d = Math.min(d, o + Math.floor((b - c) / l))), c + f > i) {
647
+ F = true;
648
+ break;
649
+ }
650
+ c += f, C = h2, w = o, o = h2 = L.lastIndex;
651
+ continue;
652
+ }
653
+ if (P.lastIndex = o, P.test(t2)) {
654
+ if (c + g > b && (d = Math.min(d, o)), c + g > i) {
655
+ F = true;
656
+ break;
657
+ }
658
+ c += g, C = h2, w = o, o = h2 = P.lastIndex;
659
+ continue;
660
+ }
661
+ o += 1;
662
+ }
663
+ return { width: F ? b : c, index: F ? d : p, truncated: F, ellipsed: F && i >= n };
664
+ };
665
+ var pt = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 };
666
+ var S = (t2, e = {}) => X(t2, pt, e).width;
667
+ var T = "\x1B";
668
+ var Z = "\x9B";
669
+ var Ft = 39;
670
+ var j = "\x07";
671
+ var Q = "[";
672
+ var dt = "]";
673
+ var tt = "m";
674
+ var U = `${dt}8;;`;
675
+ var et = new RegExp(`(?:\\${Q}(?<code>\\d+)m|\\${U}(?<uri>.*)${j})`, "y");
676
+ var mt = (t2) => {
677
+ if (t2 >= 30 && t2 <= 37 || t2 >= 90 && t2 <= 97) return 39;
678
+ if (t2 >= 40 && t2 <= 47 || t2 >= 100 && t2 <= 107) return 49;
679
+ if (t2 === 1 || t2 === 2) return 22;
680
+ if (t2 === 3) return 23;
681
+ if (t2 === 4) return 24;
682
+ if (t2 === 7) return 27;
683
+ if (t2 === 8) return 28;
684
+ if (t2 === 9) return 29;
685
+ if (t2 === 0) return 0;
686
+ };
687
+ var st = (t2) => `${T}${Q}${t2}${tt}`;
688
+ var it = (t2) => `${T}${U}${t2}${j}`;
689
+ var gt = (t2) => t2.map((e) => S(e));
690
+ var G = (t2, e, s) => {
691
+ const i = e[Symbol.iterator]();
692
+ let r = false, n = false, u = t2.at(-1), a = u === void 0 ? 0 : S(u), l = i.next(), E = i.next(), g = 0;
693
+ for (; !l.done; ) {
694
+ const m = l.value, A = S(m);
695
+ a + A <= s ? t2[t2.length - 1] += m : (t2.push(m), a = 0), (m === T || m === Z) && (r = true, n = e.startsWith(U, g + 1)), r ? n ? m === j && (r = false, n = false) : m === tt && (r = false) : (a += A, a === s && !E.done && (t2.push(""), a = 0)), l = E, E = i.next(), g += m.length;
696
+ }
697
+ u = t2.at(-1), !a && u !== void 0 && u.length > 0 && t2.length > 1 && (t2[t2.length - 2] += t2.pop());
698
+ };
699
+ var vt = (t2) => {
700
+ const e = t2.split(" ");
701
+ let s = e.length;
702
+ for (; s > 0 && !(S(e[s - 1]) > 0); ) s--;
703
+ return s === e.length ? t2 : e.slice(0, s).join(" ") + e.slice(s).join("");
704
+ };
705
+ var Et = (t2, e, s = {}) => {
706
+ if (s.trim !== false && t2.trim() === "") return "";
707
+ let i = "", r, n;
708
+ const u = t2.split(" "), a = gt(u);
709
+ let l = [""];
710
+ for (const [h2, o] of u.entries()) {
711
+ s.trim !== false && (l[l.length - 1] = (l.at(-1) ?? "").trimStart());
712
+ let p = S(l.at(-1) ?? "");
713
+ if (h2 !== 0 && (p >= e && (s.wordWrap === false || s.trim === false) && (l.push(""), p = 0), (p > 0 || s.trim === false) && (l[l.length - 1] += " ", p++)), s.hard && a[h2] > e) {
714
+ const v = e - p, F = 1 + Math.floor((a[h2] - v - 1) / e);
715
+ Math.floor((a[h2] - 1) / e) < F && l.push(""), G(l, o, e);
716
+ continue;
717
+ }
718
+ if (p + a[h2] > e && p > 0 && a[h2] > 0) {
719
+ if (s.wordWrap === false && p < e) {
720
+ G(l, o, e);
721
+ continue;
722
+ }
723
+ l.push("");
724
+ }
725
+ if (p + a[h2] > e && s.wordWrap === false) {
726
+ G(l, o, e);
727
+ continue;
728
+ }
729
+ l[l.length - 1] += o;
730
+ }
731
+ s.trim !== false && (l = l.map((h2) => vt(h2)));
732
+ const E = l.join(`
733
+ `), g = E[Symbol.iterator]();
734
+ let m = g.next(), A = g.next(), V2 = 0;
735
+ for (; !m.done; ) {
736
+ const h2 = m.value, o = A.value;
737
+ if (i += h2, h2 === T || h2 === Z) {
738
+ et.lastIndex = V2 + 1;
739
+ const F = et.exec(E)?.groups;
740
+ if (F?.code !== void 0) {
741
+ const d = Number.parseFloat(F.code);
742
+ r = d === Ft ? void 0 : d;
743
+ } else F?.uri !== void 0 && (n = F.uri.length === 0 ? void 0 : F.uri);
744
+ }
745
+ const p = r ? mt(r) : void 0;
746
+ o === `
747
+ ` ? (n && (i += it("")), r && p && (i += st(p))) : h2 === `
748
+ ` && (r && p && (i += st(r)), n && (i += it(n))), V2 += h2.length, m = A, A = g.next();
749
+ }
750
+ return i;
751
+ };
752
+ function K(t2, e, s) {
753
+ return String(t2).normalize().replaceAll(`\r
754
+ `, `
755
+ `).split(`
756
+ `).map((i) => Et(i, e, s)).join(`
757
+ `);
758
+ }
759
+ var At = ["up", "down", "left", "right", "space", "enter", "cancel"];
760
+ var _ = { actions: new Set(At), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]), messages: { cancel: "Canceled", error: "Something went wrong" }, withGuide: true };
761
+ function H(t2, e) {
762
+ if (typeof t2 == "string") return _.aliases.get(t2) === e;
763
+ for (const s of t2) if (s !== void 0 && H(s, e)) return true;
764
+ return false;
765
+ }
766
+ function _t(t2, e) {
767
+ if (t2 === e) return;
768
+ const s = t2.split(`
769
+ `), i = e.split(`
770
+ `), r = Math.max(s.length, i.length), n = [];
771
+ for (let u = 0; u < r; u++) s[u] !== i[u] && n.push(u);
772
+ return { lines: n, numLinesBefore: s.length, numLinesAfter: i.length, numLines: r };
773
+ }
774
+ var bt = globalThis.process.platform.startsWith("win");
775
+ var z = Symbol("clack:cancel");
776
+ function Ct(t2) {
777
+ return t2 === z;
778
+ }
779
+ function W(t2, e) {
780
+ const s = t2;
781
+ s.isTTY && s.setRawMode(e);
782
+ }
783
+ function xt({ input: t2 = q, output: e = R, overwrite: s = true, hideCursor: i = true } = {}) {
784
+ const r = k.createInterface({ input: t2, output: e, prompt: "", tabSize: 1 });
785
+ k.emitKeypressEvents(t2, r), t2 instanceof J && t2.isTTY && t2.setRawMode(true);
786
+ const n = (u, { name: a, sequence: l }) => {
787
+ const E = String(u);
788
+ if (H([E, a, l], "cancel")) {
789
+ i && e.write(import_sisteransi.cursor.show), process.exit(0);
790
+ return;
791
+ }
792
+ if (!s) return;
793
+ const g = a === "return" ? 0 : -1, m = a === "return" ? -1 : 0;
794
+ k.moveCursor(e, g, m, () => {
795
+ k.clearLine(e, 1, () => {
796
+ t2.once("keypress", n);
797
+ });
798
+ });
799
+ };
800
+ return i && e.write(import_sisteransi.cursor.hide), t2.once("keypress", n), () => {
801
+ t2.off("keypress", n), i && e.write(import_sisteransi.cursor.show), t2 instanceof J && t2.isTTY && !bt && t2.setRawMode(false), r.terminal = false, r.close();
802
+ };
803
+ }
804
+ var rt = (t2) => "columns" in t2 && typeof t2.columns == "number" ? t2.columns : 80;
805
+ var nt = (t2) => "rows" in t2 && typeof t2.rows == "number" ? t2.rows : 20;
806
+ function Bt(t2, e, s, i = s) {
807
+ const r = rt(t2 ?? R);
808
+ return K(e, r - s.length, { hard: true, trim: false }).split(`
809
+ `).map((n, u) => `${u === 0 ? i : s}${n}`).join(`
810
+ `);
811
+ }
812
+ var B = class {
813
+ input;
814
+ output;
815
+ _abortSignal;
816
+ rl;
817
+ opts;
818
+ _render;
819
+ _track = false;
820
+ _prevFrame = "";
821
+ _subscribers = /* @__PURE__ */ new Map();
822
+ _cursor = 0;
823
+ state = "initial";
824
+ error = "";
825
+ value;
826
+ userInput = "";
827
+ constructor(e, s = true) {
828
+ const { input: i = q, output: r = R, render: n, signal: u, ...a } = e;
829
+ this.opts = a, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = n.bind(this), this._track = s, this._abortSignal = u, this.input = i, this.output = r;
830
+ }
831
+ unsubscribe() {
832
+ this._subscribers.clear();
833
+ }
834
+ setSubscriber(e, s) {
835
+ const i = this._subscribers.get(e) ?? [];
836
+ i.push(s), this._subscribers.set(e, i);
837
+ }
838
+ on(e, s) {
839
+ this.setSubscriber(e, { cb: s });
840
+ }
841
+ once(e, s) {
842
+ this.setSubscriber(e, { cb: s, once: true });
843
+ }
844
+ emit(e, ...s) {
845
+ const i = this._subscribers.get(e) ?? [], r = [];
846
+ for (const n of i) n.cb(...s), n.once && r.push(() => i.splice(i.indexOf(n), 1));
847
+ for (const n of r) n();
848
+ }
849
+ prompt() {
850
+ return new Promise((e) => {
851
+ if (this._abortSignal) {
852
+ if (this._abortSignal.aborted) return this.state = "cancel", this.close(), e(z);
853
+ this._abortSignal.addEventListener("abort", () => {
854
+ this.state = "cancel", this.close();
855
+ }, { once: true });
856
+ }
857
+ this.rl = ot.createInterface({ input: this.input, tabSize: 2, prompt: "", escapeCodeTimeout: 50, terminal: true }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, true), this.input.on("keypress", this.onKeypress), W(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
858
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), W(this.input, false), e(this.value);
859
+ }), this.once("cancel", () => {
860
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), W(this.input, false), e(z);
861
+ });
862
+ });
863
+ }
864
+ _isActionKey(e, s) {
865
+ return e === " ";
866
+ }
867
+ _setValue(e) {
868
+ this.value = e, this.emit("value", this.value);
869
+ }
870
+ _setUserInput(e, s) {
871
+ this.userInput = e ?? "", this.emit("userInput", this.userInput), s && this._track && this.rl && (this.rl.write(this.userInput), this._cursor = this.rl.cursor);
872
+ }
873
+ _clearUserInput() {
874
+ this.rl?.write(null, { ctrl: true, name: "u" }), this._setUserInput("");
875
+ }
876
+ onKeypress(e, s) {
877
+ if (this._track && s.name !== "return" && (s.name && this._isActionKey(e, s) && this.rl?.write(null, { ctrl: true, name: "h" }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), s?.name && (!this._track && _.aliases.has(s.name) && this.emit("cursor", _.aliases.get(s.name)), _.actions.has(s.name) && this.emit("cursor", s.name)), e && (e.toLowerCase() === "y" || e.toLowerCase() === "n") && this.emit("confirm", e.toLowerCase() === "y"), this.emit("key", e?.toLowerCase(), s), s?.name === "return") {
878
+ if (this.opts.validate) {
879
+ const i = this.opts.validate(this.value);
880
+ i && (this.error = i instanceof Error ? i.message : i, this.state = "error", this.rl?.write(this.userInput));
881
+ }
882
+ this.state !== "error" && (this.state = "submit");
883
+ }
884
+ H([e, s?.name, s?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
885
+ }
886
+ close() {
887
+ this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
888
+ `), W(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
889
+ }
890
+ restoreCursor() {
891
+ const e = K(this._prevFrame, process.stdout.columns, { hard: true, trim: false }).split(`
892
+ `).length - 1;
893
+ this.output.write(import_sisteransi.cursor.move(-999, e * -1));
894
+ }
895
+ render() {
896
+ const e = K(this._render(this) ?? "", process.stdout.columns, { hard: true, trim: false });
897
+ if (e !== this._prevFrame) {
898
+ if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
899
+ else {
900
+ const s = _t(this._prevFrame, e), i = nt(this.output);
901
+ if (this.restoreCursor(), s) {
902
+ const r = Math.max(0, s.numLinesAfter - i), n = Math.max(0, s.numLinesBefore - i);
903
+ let u = s.lines.find((a) => a >= r);
904
+ if (u === void 0) {
905
+ this._prevFrame = e;
906
+ return;
907
+ }
908
+ if (s.lines.length === 1) {
909
+ this.output.write(import_sisteransi.cursor.move(0, u - n)), this.output.write(import_sisteransi.erase.lines(1));
910
+ const a = e.split(`
911
+ `);
912
+ this.output.write(a[u]), this._prevFrame = e, this.output.write(import_sisteransi.cursor.move(0, a.length - u - 1));
913
+ return;
914
+ } else if (s.lines.length > 1) {
915
+ if (r < n) u = r;
916
+ else {
917
+ const l = u - n;
918
+ l > 0 && this.output.write(import_sisteransi.cursor.move(0, l));
919
+ }
920
+ this.output.write(import_sisteransi.erase.down());
921
+ const a = e.split(`
922
+ `).slice(u);
923
+ this.output.write(a.join(`
924
+ `)), this._prevFrame = e;
925
+ return;
926
+ }
927
+ }
928
+ this.output.write(import_sisteransi.erase.down());
929
+ }
930
+ this.output.write(e), this.state === "initial" && (this.state = "active"), this._prevFrame = e;
931
+ }
932
+ }
933
+ };
934
+ var kt = class extends B {
935
+ get cursor() {
936
+ return this.value ? 0 : 1;
937
+ }
938
+ get _value() {
939
+ return this.cursor === 0;
940
+ }
941
+ constructor(e) {
942
+ super(e, false), this.value = !!e.initialValue, this.on("userInput", () => {
943
+ this.value = this._value;
944
+ }), this.on("confirm", (s) => {
945
+ this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = s, this.state = "submit", this.close();
946
+ }), this.on("cursor", () => {
947
+ this.value = !this.value;
948
+ });
949
+ }
950
+ };
951
+ var Lt = class extends B {
952
+ options;
953
+ cursor = 0;
954
+ get _value() {
955
+ return this.options[this.cursor].value;
956
+ }
957
+ get _enabledOptions() {
958
+ return this.options.filter((e) => e.disabled !== true);
959
+ }
960
+ toggleAll() {
961
+ const e = this._enabledOptions, s = this.value !== void 0 && this.value.length === e.length;
962
+ this.value = s ? [] : e.map((i) => i.value);
963
+ }
964
+ toggleInvert() {
965
+ const e = this.value;
966
+ if (!e) return;
967
+ const s = this._enabledOptions.filter((i) => !e.includes(i.value));
968
+ this.value = s.map((i) => i.value);
969
+ }
970
+ toggleValue() {
971
+ this.value === void 0 && (this.value = []);
972
+ const e = this.value.includes(this._value);
973
+ this.value = e ? this.value.filter((s) => s !== this._value) : [...this.value, this._value];
974
+ }
975
+ constructor(e) {
976
+ super(e, false), this.options = e.options, this.value = [...e.initialValues ?? []];
977
+ const s = Math.max(this.options.findIndex(({ value: i }) => i === e.cursorAt), 0);
978
+ this.cursor = this.options[s].disabled ? x(s, 1, this.options) : s, this.on("key", (i) => {
979
+ i === "a" && this.toggleAll(), i === "i" && this.toggleInvert();
980
+ }), this.on("cursor", (i) => {
981
+ switch (i) {
982
+ case "left":
983
+ case "up":
984
+ this.cursor = x(this.cursor, -1, this.options);
985
+ break;
986
+ case "down":
987
+ case "right":
988
+ this.cursor = x(this.cursor, 1, this.options);
989
+ break;
990
+ case "space":
991
+ this.toggleValue();
992
+ break;
993
+ }
994
+ });
995
+ }
996
+ };
997
+ var Tt = class extends B {
998
+ options;
999
+ cursor = 0;
1000
+ get _selectedValue() {
1001
+ return this.options[this.cursor];
1002
+ }
1003
+ changeValue() {
1004
+ this.value = this._selectedValue.value;
1005
+ }
1006
+ constructor(e) {
1007
+ super(e, false), this.options = e.options;
1008
+ const s = this.options.findIndex(({ value: r }) => r === e.initialValue), i = s === -1 ? 0 : s;
1009
+ this.cursor = this.options[i].disabled ? x(i, 1, this.options) : i, this.changeValue(), this.on("cursor", (r) => {
1010
+ switch (r) {
1011
+ case "left":
1012
+ case "up":
1013
+ this.cursor = x(this.cursor, -1, this.options);
1014
+ break;
1015
+ case "down":
1016
+ case "right":
1017
+ this.cursor = x(this.cursor, 1, this.options);
1018
+ break;
1019
+ }
1020
+ this.changeValue();
1021
+ });
1022
+ }
1023
+ };
1024
+
1025
+ // node_modules/.pnpm/@clack+prompts@1.1.0/node_modules/@clack/prompts/dist/index.mjs
1026
+ import { styleText as t, stripVTControlCharacters as ue } from "node:util";
1027
+ import N2 from "node:process";
1028
+ var import_sisteransi2 = __toESM(require_src(), 1);
1029
+ function pt2() {
1030
+ return N2.platform !== "win32" ? N2.env.TERM !== "linux" : !!N2.env.CI || !!N2.env.WT_SESSION || !!N2.env.TERMINUS_SUBLIME || N2.env.ConEmuTask === "{cmd::Cmder}" || N2.env.TERM_PROGRAM === "Terminus-Sublime" || N2.env.TERM_PROGRAM === "vscode" || N2.env.TERM === "xterm-256color" || N2.env.TERM === "alacritty" || N2.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
1031
+ }
1032
+ var ee = pt2();
1033
+ var ce = () => process.env.CI === "true";
1034
+ var I2 = (e, r) => ee ? e : r;
1035
+ var Re = I2("\u25C6", "*");
1036
+ var $e = I2("\u25A0", "x");
1037
+ var de = I2("\u25B2", "x");
1038
+ var V = I2("\u25C7", "o");
1039
+ var he = I2("\u250C", "T");
1040
+ var h = I2("\u2502", "|");
1041
+ var x2 = I2("\u2514", "\u2014");
1042
+ var Oe = I2("\u2510", "T");
1043
+ var Pe = I2("\u2518", "\u2014");
1044
+ var z2 = I2("\u25CF", ">");
1045
+ var H2 = I2("\u25CB", " ");
1046
+ var te = I2("\u25FB", "[\u2022]");
1047
+ var U2 = I2("\u25FC", "[+]");
1048
+ var q2 = I2("\u25FB", "[ ]");
1049
+ var Ne = I2("\u25AA", "\u2022");
1050
+ var se = I2("\u2500", "-");
1051
+ var pe = I2("\u256E", "+");
1052
+ var We = I2("\u251C", "+");
1053
+ var me = I2("\u256F", "+");
1054
+ var ge = I2("\u2570", "+");
1055
+ var Ge = I2("\u256D", "+");
1056
+ var fe = I2("\u25CF", "\u2022");
1057
+ var Fe = I2("\u25C6", "*");
1058
+ var ye = I2("\u25B2", "!");
1059
+ var Ee = I2("\u25A0", "x");
1060
+ var W2 = (e) => {
1061
+ switch (e) {
1062
+ case "initial":
1063
+ case "active":
1064
+ return t("cyan", Re);
1065
+ case "cancel":
1066
+ return t("red", $e);
1067
+ case "error":
1068
+ return t("yellow", de);
1069
+ case "submit":
1070
+ return t("green", V);
1071
+ }
1072
+ };
1073
+ var ve = (e) => {
1074
+ switch (e) {
1075
+ case "initial":
1076
+ case "active":
1077
+ return t("cyan", h);
1078
+ case "cancel":
1079
+ return t("red", h);
1080
+ case "error":
1081
+ return t("yellow", h);
1082
+ case "submit":
1083
+ return t("green", h);
1084
+ }
1085
+ };
1086
+ var mt2 = (e) => e === 161 || e === 164 || e === 167 || e === 168 || e === 170 || e === 173 || e === 174 || e >= 176 && e <= 180 || e >= 182 && e <= 186 || e >= 188 && e <= 191 || e === 198 || e === 208 || e === 215 || e === 216 || e >= 222 && e <= 225 || e === 230 || e >= 232 && e <= 234 || e === 236 || e === 237 || e === 240 || e === 242 || e === 243 || e >= 247 && e <= 250 || e === 252 || e === 254 || e === 257 || e === 273 || e === 275 || e === 283 || e === 294 || e === 295 || e === 299 || e >= 305 && e <= 307 || e === 312 || e >= 319 && e <= 322 || e === 324 || e >= 328 && e <= 331 || e === 333 || e === 338 || e === 339 || e === 358 || e === 359 || e === 363 || e === 462 || e === 464 || e === 466 || e === 468 || e === 470 || e === 472 || e === 474 || e === 476 || e === 593 || e === 609 || e === 708 || e === 711 || e >= 713 && e <= 715 || e === 717 || e === 720 || e >= 728 && e <= 731 || e === 733 || e === 735 || e >= 768 && e <= 879 || e >= 913 && e <= 929 || e >= 931 && e <= 937 || e >= 945 && e <= 961 || e >= 963 && e <= 969 || e === 1025 || e >= 1040 && e <= 1103 || e === 1105 || e === 8208 || e >= 8211 && e <= 8214 || e === 8216 || e === 8217 || e === 8220 || e === 8221 || e >= 8224 && e <= 8226 || e >= 8228 && e <= 8231 || e === 8240 || e === 8242 || e === 8243 || e === 8245 || e === 8251 || e === 8254 || e === 8308 || e === 8319 || e >= 8321 && e <= 8324 || e === 8364 || e === 8451 || e === 8453 || e === 8457 || e === 8467 || e === 8470 || e === 8481 || e === 8482 || e === 8486 || e === 8491 || e === 8531 || e === 8532 || e >= 8539 && e <= 8542 || e >= 8544 && e <= 8555 || e >= 8560 && e <= 8569 || e === 8585 || e >= 8592 && e <= 8601 || e === 8632 || e === 8633 || e === 8658 || e === 8660 || e === 8679 || e === 8704 || e === 8706 || e === 8707 || e === 8711 || e === 8712 || e === 8715 || e === 8719 || e === 8721 || e === 8725 || e === 8730 || e >= 8733 && e <= 8736 || e === 8739 || e === 8741 || e >= 8743 && e <= 8748 || e === 8750 || e >= 8756 && e <= 8759 || e === 8764 || e === 8765 || e === 8776 || e === 8780 || e === 8786 || e === 8800 || e === 8801 || e >= 8804 && e <= 8807 || e === 8810 || e === 8811 || e === 8814 || e === 8815 || e === 8834 || e === 8835 || e === 8838 || e === 8839 || e === 8853 || e === 8857 || e === 8869 || e === 8895 || e === 8978 || e >= 9312 && e <= 9449 || e >= 9451 && e <= 9547 || e >= 9552 && e <= 9587 || e >= 9600 && e <= 9615 || e >= 9618 && e <= 9621 || e === 9632 || e === 9633 || e >= 9635 && e <= 9641 || e === 9650 || e === 9651 || e === 9654 || e === 9655 || e === 9660 || e === 9661 || e === 9664 || e === 9665 || e >= 9670 && e <= 9672 || e === 9675 || e >= 9678 && e <= 9681 || e >= 9698 && e <= 9701 || e === 9711 || e === 9733 || e === 9734 || e === 9737 || e === 9742 || e === 9743 || e === 9756 || e === 9758 || e === 9792 || e === 9794 || e === 9824 || e === 9825 || e >= 9827 && e <= 9829 || e >= 9831 && e <= 9834 || e === 9836 || e === 9837 || e === 9839 || e === 9886 || e === 9887 || e === 9919 || e >= 9926 && e <= 9933 || e >= 9935 && e <= 9939 || e >= 9941 && e <= 9953 || e === 9955 || e === 9960 || e === 9961 || e >= 9963 && e <= 9969 || e === 9972 || e >= 9974 && e <= 9977 || e === 9979 || e === 9980 || e === 9982 || e === 9983 || e === 10045 || e >= 10102 && e <= 10111 || e >= 11094 && e <= 11097 || e >= 12872 && e <= 12879 || e >= 57344 && e <= 63743 || e >= 65024 && e <= 65039 || e === 65533 || e >= 127232 && e <= 127242 || e >= 127248 && e <= 127277 || e >= 127280 && e <= 127337 || e >= 127344 && e <= 127373 || e === 127375 || e === 127376 || e >= 127387 && e <= 127404 || e >= 917760 && e <= 917999 || e >= 983040 && e <= 1048573 || e >= 1048576 && e <= 1114109;
1087
+ var gt2 = (e) => e === 12288 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510;
1088
+ var ft2 = (e) => e >= 4352 && e <= 4447 || e === 8986 || e === 8987 || e === 9001 || e === 9002 || e >= 9193 && e <= 9196 || e === 9200 || e === 9203 || e === 9725 || e === 9726 || e === 9748 || e === 9749 || e >= 9800 && e <= 9811 || e === 9855 || e === 9875 || e === 9889 || e === 9898 || e === 9899 || e === 9917 || e === 9918 || e === 9924 || e === 9925 || e === 9934 || e === 9940 || e === 9962 || e === 9970 || e === 9971 || e === 9973 || e === 9978 || e === 9981 || e === 9989 || e === 9994 || e === 9995 || e === 10024 || e === 10060 || e === 10062 || e >= 10067 && e <= 10069 || e === 10071 || e >= 10133 && e <= 10135 || e === 10160 || e === 10175 || e === 11035 || e === 11036 || e === 11088 || e === 11093 || e >= 11904 && e <= 11929 || e >= 11931 && e <= 12019 || e >= 12032 && e <= 12245 || e >= 12272 && e <= 12287 || e >= 12289 && e <= 12350 || e >= 12353 && e <= 12438 || e >= 12441 && e <= 12543 || e >= 12549 && e <= 12591 || e >= 12593 && e <= 12686 || e >= 12688 && e <= 12771 || e >= 12783 && e <= 12830 || e >= 12832 && e <= 12871 || e >= 12880 && e <= 19903 || e >= 19968 && e <= 42124 || e >= 42128 && e <= 42182 || e >= 43360 && e <= 43388 || e >= 44032 && e <= 55203 || e >= 63744 && e <= 64255 || e >= 65040 && e <= 65049 || e >= 65072 && e <= 65106 || e >= 65108 && e <= 65126 || e >= 65128 && e <= 65131 || e >= 94176 && e <= 94180 || e === 94192 || e === 94193 || e >= 94208 && e <= 100343 || e >= 100352 && e <= 101589 || e >= 101632 && e <= 101640 || e >= 110576 && e <= 110579 || e >= 110581 && e <= 110587 || e === 110589 || e === 110590 || e >= 110592 && e <= 110882 || e === 110898 || e >= 110928 && e <= 110930 || e === 110933 || e >= 110948 && e <= 110951 || e >= 110960 && e <= 111355 || e === 126980 || e === 127183 || e === 127374 || e >= 127377 && e <= 127386 || e >= 127488 && e <= 127490 || e >= 127504 && e <= 127547 || e >= 127552 && e <= 127560 || e === 127568 || e === 127569 || e >= 127584 && e <= 127589 || e >= 127744 && e <= 127776 || e >= 127789 && e <= 127797 || e >= 127799 && e <= 127868 || e >= 127870 && e <= 127891 || e >= 127904 && e <= 127946 || e >= 127951 && e <= 127955 || e >= 127968 && e <= 127984 || e === 127988 || e >= 127992 && e <= 128062 || e === 128064 || e >= 128066 && e <= 128252 || e >= 128255 && e <= 128317 || e >= 128331 && e <= 128334 || e >= 128336 && e <= 128359 || e === 128378 || e === 128405 || e === 128406 || e === 128420 || e >= 128507 && e <= 128591 || e >= 128640 && e <= 128709 || e === 128716 || e >= 128720 && e <= 128722 || e >= 128725 && e <= 128727 || e >= 128732 && e <= 128735 || e === 128747 || e === 128748 || e >= 128756 && e <= 128764 || e >= 128992 && e <= 129003 || e === 129008 || e >= 129292 && e <= 129338 || e >= 129340 && e <= 129349 || e >= 129351 && e <= 129535 || e >= 129648 && e <= 129660 || e >= 129664 && e <= 129672 || e >= 129680 && e <= 129725 || e >= 129727 && e <= 129733 || e >= 129742 && e <= 129755 || e >= 129760 && e <= 129768 || e >= 129776 && e <= 129784 || e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141;
1089
+ var we = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
1090
+ var re = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
1091
+ var ie = /\t{1,1000}/y;
1092
+ var Ae = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "yu");
1093
+ var ne = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
1094
+ var Ft2 = new RegExp("\\p{M}+", "gu");
1095
+ var yt2 = { limit: 1 / 0, ellipsis: "" };
1096
+ var Le = (e, r = {}, s = {}) => {
1097
+ const i = r.limit ?? 1 / 0, a = r.ellipsis ?? "", o = r?.ellipsisWidth ?? (a ? Le(a, yt2, s).width : 0), u = s.ansiWidth ?? 0, l = s.controlWidth ?? 0, n = s.tabWidth ?? 8, c = s.ambiguousWidth ?? 1, p = s.emojiWidth ?? 2, f = s.fullWidthWidth ?? 2, g = s.regularWidth ?? 1, E = s.wideWidth ?? 2;
1098
+ let $ = 0, m = 0, d = e.length, F = 0, y2 = false, v = d, C = Math.max(0, i - o), A = 0, b = 0, w = 0, S2 = 0;
1099
+ e: for (; ; ) {
1100
+ if (b > A || m >= d && m > $) {
1101
+ const T2 = e.slice(A, b) || e.slice($, m);
1102
+ F = 0;
1103
+ for (const M2 of T2.replaceAll(Ft2, "")) {
1104
+ const O2 = M2.codePointAt(0) || 0;
1105
+ if (gt2(O2) ? S2 = f : ft2(O2) ? S2 = E : c !== g && mt2(O2) ? S2 = c : S2 = g, w + S2 > C && (v = Math.min(v, Math.max(A, $) + F)), w + S2 > i) {
1106
+ y2 = true;
1107
+ break e;
1108
+ }
1109
+ F += M2.length, w += S2;
1110
+ }
1111
+ A = b = 0;
1112
+ }
1113
+ if (m >= d) break;
1114
+ if (ne.lastIndex = m, ne.test(e)) {
1115
+ if (F = ne.lastIndex - m, S2 = F * g, w + S2 > C && (v = Math.min(v, m + Math.floor((C - w) / g))), w + S2 > i) {
1116
+ y2 = true;
1117
+ break;
1118
+ }
1119
+ w += S2, A = $, b = m, m = $ = ne.lastIndex;
1120
+ continue;
1121
+ }
1122
+ if (we.lastIndex = m, we.test(e)) {
1123
+ if (w + u > C && (v = Math.min(v, m)), w + u > i) {
1124
+ y2 = true;
1125
+ break;
1126
+ }
1127
+ w += u, A = $, b = m, m = $ = we.lastIndex;
1128
+ continue;
1129
+ }
1130
+ if (re.lastIndex = m, re.test(e)) {
1131
+ if (F = re.lastIndex - m, S2 = F * l, w + S2 > C && (v = Math.min(v, m + Math.floor((C - w) / l))), w + S2 > i) {
1132
+ y2 = true;
1133
+ break;
1134
+ }
1135
+ w += S2, A = $, b = m, m = $ = re.lastIndex;
1136
+ continue;
1137
+ }
1138
+ if (ie.lastIndex = m, ie.test(e)) {
1139
+ if (F = ie.lastIndex - m, S2 = F * n, w + S2 > C && (v = Math.min(v, m + Math.floor((C - w) / n))), w + S2 > i) {
1140
+ y2 = true;
1141
+ break;
1142
+ }
1143
+ w += S2, A = $, b = m, m = $ = ie.lastIndex;
1144
+ continue;
1145
+ }
1146
+ if (Ae.lastIndex = m, Ae.test(e)) {
1147
+ if (w + p > C && (v = Math.min(v, m)), w + p > i) {
1148
+ y2 = true;
1149
+ break;
1150
+ }
1151
+ w += p, A = $, b = m, m = $ = Ae.lastIndex;
1152
+ continue;
1153
+ }
1154
+ m += 1;
1155
+ }
1156
+ return { width: y2 ? C : w, index: y2 ? v : d, truncated: y2, ellipsed: y2 && i >= o };
1157
+ };
1158
+ var Et2 = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 };
1159
+ var D = (e, r = {}) => Le(e, Et2, r).width;
1160
+ var ae = "\x1B";
1161
+ var je = "\x9B";
1162
+ var vt2 = 39;
1163
+ var Ce = "\x07";
1164
+ var ke = "[";
1165
+ var wt = "]";
1166
+ var Ve = "m";
1167
+ var Se = `${wt}8;;`;
1168
+ var He = new RegExp(`(?:\\${ke}(?<code>\\d+)m|\\${Se}(?<uri>.*)${Ce})`, "y");
1169
+ var At2 = (e) => {
1170
+ if (e >= 30 && e <= 37 || e >= 90 && e <= 97) return 39;
1171
+ if (e >= 40 && e <= 47 || e >= 100 && e <= 107) return 49;
1172
+ if (e === 1 || e === 2) return 22;
1173
+ if (e === 3) return 23;
1174
+ if (e === 4) return 24;
1175
+ if (e === 7) return 27;
1176
+ if (e === 8) return 28;
1177
+ if (e === 9) return 29;
1178
+ if (e === 0) return 0;
1179
+ };
1180
+ var Ue = (e) => `${ae}${ke}${e}${Ve}`;
1181
+ var Ke = (e) => `${ae}${Se}${e}${Ce}`;
1182
+ var Ct2 = (e) => e.map((r) => D(r));
1183
+ var Ie = (e, r, s) => {
1184
+ const i = r[Symbol.iterator]();
1185
+ let a = false, o = false, u = e.at(-1), l = u === void 0 ? 0 : D(u), n = i.next(), c = i.next(), p = 0;
1186
+ for (; !n.done; ) {
1187
+ const f = n.value, g = D(f);
1188
+ l + g <= s ? e[e.length - 1] += f : (e.push(f), l = 0), (f === ae || f === je) && (a = true, o = r.startsWith(Se, p + 1)), a ? o ? f === Ce && (a = false, o = false) : f === Ve && (a = false) : (l += g, l === s && !c.done && (e.push(""), l = 0)), n = c, c = i.next(), p += f.length;
1189
+ }
1190
+ u = e.at(-1), !l && u !== void 0 && u.length > 0 && e.length > 1 && (e[e.length - 2] += e.pop());
1191
+ };
1192
+ var St = (e) => {
1193
+ const r = e.split(" ");
1194
+ let s = r.length;
1195
+ for (; s > 0 && !(D(r[s - 1]) > 0); ) s--;
1196
+ return s === r.length ? e : r.slice(0, s).join(" ") + r.slice(s).join("");
1197
+ };
1198
+ var It2 = (e, r, s = {}) => {
1199
+ if (s.trim !== false && e.trim() === "") return "";
1200
+ let i = "", a, o;
1201
+ const u = e.split(" "), l = Ct2(u);
1202
+ let n = [""];
1203
+ for (const [$, m] of u.entries()) {
1204
+ s.trim !== false && (n[n.length - 1] = (n.at(-1) ?? "").trimStart());
1205
+ let d = D(n.at(-1) ?? "");
1206
+ if ($ !== 0 && (d >= r && (s.wordWrap === false || s.trim === false) && (n.push(""), d = 0), (d > 0 || s.trim === false) && (n[n.length - 1] += " ", d++)), s.hard && l[$] > r) {
1207
+ const F = r - d, y2 = 1 + Math.floor((l[$] - F - 1) / r);
1208
+ Math.floor((l[$] - 1) / r) < y2 && n.push(""), Ie(n, m, r);
1209
+ continue;
1210
+ }
1211
+ if (d + l[$] > r && d > 0 && l[$] > 0) {
1212
+ if (s.wordWrap === false && d < r) {
1213
+ Ie(n, m, r);
1214
+ continue;
1215
+ }
1216
+ n.push("");
1217
+ }
1218
+ if (d + l[$] > r && s.wordWrap === false) {
1219
+ Ie(n, m, r);
1220
+ continue;
1221
+ }
1222
+ n[n.length - 1] += m;
1223
+ }
1224
+ s.trim !== false && (n = n.map(($) => St($)));
1225
+ const c = n.join(`
1226
+ `), p = c[Symbol.iterator]();
1227
+ let f = p.next(), g = p.next(), E = 0;
1228
+ for (; !f.done; ) {
1229
+ const $ = f.value, m = g.value;
1230
+ if (i += $, $ === ae || $ === je) {
1231
+ He.lastIndex = E + 1;
1232
+ const y2 = He.exec(c)?.groups;
1233
+ if (y2?.code !== void 0) {
1234
+ const v = Number.parseFloat(y2.code);
1235
+ a = v === vt2 ? void 0 : v;
1236
+ } else y2?.uri !== void 0 && (o = y2.uri.length === 0 ? void 0 : y2.uri);
1237
+ }
1238
+ const d = a ? At2(a) : void 0;
1239
+ m === `
1240
+ ` ? (o && (i += Ke("")), a && d && (i += Ue(d))) : $ === `
1241
+ ` && (a && d && (i += Ue(a)), o && (i += Ke(o))), E += $.length, f = g, g = p.next();
1242
+ }
1243
+ return i;
1244
+ };
1245
+ function J2(e, r, s) {
1246
+ return String(e).normalize().replaceAll(`\r
1247
+ `, `
1248
+ `).split(`
1249
+ `).map((i) => It2(i, r, s)).join(`
1250
+ `);
1251
+ }
1252
+ var bt2 = (e, r, s, i, a) => {
1253
+ let o = r, u = 0;
1254
+ for (let l = s; l < i; l++) {
1255
+ const n = e[l];
1256
+ if (o = o - n.length, u++, o <= a) break;
1257
+ }
1258
+ return { lineCount: o, removals: u };
1259
+ };
1260
+ var X2 = ({ cursor: e, options: r, style: s, output: i = process.stdout, maxItems: a = Number.POSITIVE_INFINITY, columnPadding: o = 0, rowPadding: u = 4 }) => {
1261
+ const l = rt(i) - o, n = nt(i), c = t("dim", "..."), p = Math.max(n - u, 0), f = Math.max(Math.min(a, p), 5);
1262
+ let g = 0;
1263
+ e >= f - 3 && (g = Math.max(Math.min(e - f + 3, r.length - f), 0));
1264
+ let E = f < r.length && g > 0, $ = f < r.length && g + f < r.length;
1265
+ const m = Math.min(g + f, r.length), d = [];
1266
+ let F = 0;
1267
+ E && F++, $ && F++;
1268
+ const y2 = g + (E ? 1 : 0), v = m - ($ ? 1 : 0);
1269
+ for (let A = y2; A < v; A++) {
1270
+ const b = J2(s(r[A], A === e), l, { hard: true, trim: false }).split(`
1271
+ `);
1272
+ d.push(b), F += b.length;
1273
+ }
1274
+ if (F > p) {
1275
+ let A = 0, b = 0, w = F;
1276
+ const S2 = e - y2, T2 = (M2, O2) => bt2(d, w, M2, O2, p);
1277
+ E ? ({ lineCount: w, removals: A } = T2(0, S2), w > p && ({ lineCount: w, removals: b } = T2(S2 + 1, d.length))) : ({ lineCount: w, removals: b } = T2(S2 + 1, d.length), w > p && ({ lineCount: w, removals: A } = T2(0, S2))), A > 0 && (E = true, d.splice(0, A)), b > 0 && ($ = true, d.splice(d.length - b, b));
1278
+ }
1279
+ const C = [];
1280
+ E && C.push(c);
1281
+ for (const A of d) for (const b of A) C.push(b);
1282
+ return $ && C.push(c), C;
1283
+ };
1284
+ var Rt = (e) => {
1285
+ const r = e.active ?? "Yes", s = e.inactive ?? "No";
1286
+ return new kt({ active: r, inactive: s, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue ?? true, render() {
1287
+ const i = e.withGuide ?? _.withGuide, a = `${i ? `${t("gray", h)}
1288
+ ` : ""}${W2(this.state)} ${e.message}
1289
+ `, o = this.value ? r : s;
1290
+ switch (this.state) {
1291
+ case "submit": {
1292
+ const u = i ? `${t("gray", h)} ` : "";
1293
+ return `${a}${u}${t("dim", o)}`;
1294
+ }
1295
+ case "cancel": {
1296
+ const u = i ? `${t("gray", h)} ` : "";
1297
+ return `${a}${u}${t(["strikethrough", "dim"], o)}${i ? `
1298
+ ${t("gray", h)}` : ""}`;
1299
+ }
1300
+ default: {
1301
+ const u = i ? `${t("cyan", h)} ` : "", l = i ? t("cyan", x2) : "";
1302
+ return `${a}${u}${this.value ? `${t("green", z2)} ${r}` : `${t("dim", H2)} ${t("dim", r)}`}${e.vertical ? i ? `
1303
+ ${t("cyan", h)} ` : `
1304
+ ` : ` ${t("dim", "/")} `}${this.value ? `${t("dim", H2)} ${t("dim", s)}` : `${t("green", z2)} ${s}`}
1305
+ ${l}
1306
+ `;
1307
+ }
1308
+ }
1309
+ } }).prompt();
1310
+ };
1311
+ var R2 = { message: (e = [], { symbol: r = t("gray", h), secondarySymbol: s = t("gray", h), output: i = process.stdout, spacing: a = 1, withGuide: o } = {}) => {
1312
+ const u = [], l = o ?? _.withGuide, n = l ? s : "", c = l ? `${r} ` : "", p = l ? `${s} ` : "";
1313
+ for (let g = 0; g < a; g++) u.push(n);
1314
+ const f = Array.isArray(e) ? e : e.split(`
1315
+ `);
1316
+ if (f.length > 0) {
1317
+ const [g, ...E] = f;
1318
+ g.length > 0 ? u.push(`${c}${g}`) : u.push(l ? r : "");
1319
+ for (const $ of E) $.length > 0 ? u.push(`${p}${$}`) : u.push(l ? s : "");
1320
+ }
1321
+ i.write(`${u.join(`
1322
+ `)}
1323
+ `);
1324
+ }, info: (e, r) => {
1325
+ R2.message(e, { ...r, symbol: t("blue", fe) });
1326
+ }, success: (e, r) => {
1327
+ R2.message(e, { ...r, symbol: t("green", Fe) });
1328
+ }, step: (e, r) => {
1329
+ R2.message(e, { ...r, symbol: t("green", V) });
1330
+ }, warn: (e, r) => {
1331
+ R2.message(e, { ...r, symbol: t("yellow", ye) });
1332
+ }, warning: (e, r) => {
1333
+ R2.warn(e, r);
1334
+ }, error: (e, r) => {
1335
+ R2.message(e, { ...r, symbol: t("red", Ee) });
1336
+ } };
1337
+ var Nt = (e = "", r) => {
1338
+ const s = r?.output ?? process.stdout, i = r?.withGuide ?? _.withGuide ? `${t("gray", x2)} ` : "";
1339
+ s.write(`${i}${t("red", e)}
1340
+
1341
+ `);
1342
+ };
1343
+ var Wt2 = (e = "", r) => {
1344
+ const s = r?.output ?? process.stdout, i = r?.withGuide ?? _.withGuide ? `${t("gray", he)} ` : "";
1345
+ s.write(`${i}${e}
1346
+ `);
1347
+ };
1348
+ var Gt = (e = "", r) => {
1349
+ const s = r?.output ?? process.stdout, i = r?.withGuide ?? _.withGuide ? `${t("gray", h)}
1350
+ ${t("gray", x2)} ` : "";
1351
+ s.write(`${i}${e}
1352
+
1353
+ `);
1354
+ };
1355
+ var Q2 = (e, r) => e.split(`
1356
+ `).map((s) => r(s)).join(`
1357
+ `);
1358
+ var Lt2 = (e) => {
1359
+ const r = (i, a) => {
1360
+ const o = i.label ?? String(i.value);
1361
+ return a === "disabled" ? `${t("gray", q2)} ${Q2(o, (u) => t(["strikethrough", "gray"], u))}${i.hint ? ` ${t("dim", `(${i.hint ?? "disabled"})`)}` : ""}` : a === "active" ? `${t("cyan", te)} ${o}${i.hint ? ` ${t("dim", `(${i.hint})`)}` : ""}` : a === "selected" ? `${t("green", U2)} ${Q2(o, (u) => t("dim", u))}${i.hint ? ` ${t("dim", `(${i.hint})`)}` : ""}` : a === "cancelled" ? `${Q2(o, (u) => t(["strikethrough", "dim"], u))}` : a === "active-selected" ? `${t("green", U2)} ${o}${i.hint ? ` ${t("dim", `(${i.hint})`)}` : ""}` : a === "submitted" ? `${Q2(o, (u) => t("dim", u))}` : `${t("dim", q2)} ${Q2(o, (u) => t("dim", u))}`;
1362
+ }, s = e.required ?? true;
1363
+ return new Lt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValues: e.initialValues, required: s, cursorAt: e.cursorAt, validate(i) {
1364
+ if (s && (i === void 0 || i.length === 0)) return `Please select at least one option.
1365
+ ${t("reset", t("dim", `Press ${t(["gray", "bgWhite", "inverse"], " space ")} to select, ${t("gray", t("bgWhite", t("inverse", " enter ")))} to submit`))}`;
1366
+ }, render() {
1367
+ const i = Bt(e.output, e.message, `${ve(this.state)} `, `${W2(this.state)} `), a = `${t("gray", h)}
1368
+ ${i}
1369
+ `, o = this.value ?? [], u = (l, n) => {
1370
+ if (l.disabled) return r(l, "disabled");
1371
+ const c = o.includes(l.value);
1372
+ return n && c ? r(l, "active-selected") : c ? r(l, "selected") : r(l, n ? "active" : "inactive");
1373
+ };
1374
+ switch (this.state) {
1375
+ case "submit": {
1376
+ const l = this.options.filter(({ value: c }) => o.includes(c)).map((c) => r(c, "submitted")).join(t("dim", ", ")) || t("dim", "none"), n = Bt(e.output, l, `${t("gray", h)} `);
1377
+ return `${a}${n}`;
1378
+ }
1379
+ case "cancel": {
1380
+ const l = this.options.filter(({ value: c }) => o.includes(c)).map((c) => r(c, "cancelled")).join(t("dim", ", "));
1381
+ if (l.trim() === "") return `${a}${t("gray", h)}`;
1382
+ const n = Bt(e.output, l, `${t("gray", h)} `);
1383
+ return `${a}${n}
1384
+ ${t("gray", h)}`;
1385
+ }
1386
+ case "error": {
1387
+ const l = `${t("yellow", h)} `, n = this.error.split(`
1388
+ `).map((f, g) => g === 0 ? `${t("yellow", x2)} ${t("yellow", f)}` : ` ${f}`).join(`
1389
+ `), c = a.split(`
1390
+ `).length, p = n.split(`
1391
+ `).length + 1;
1392
+ return `${a}${l}${X2({ output: e.output, options: this.options, cursor: this.cursor, maxItems: e.maxItems, columnPadding: l.length, rowPadding: c + p, style: u }).join(`
1393
+ ${l}`)}
1394
+ ${n}
1395
+ `;
1396
+ }
1397
+ default: {
1398
+ const l = `${t("cyan", h)} `, n = a.split(`
1399
+ `).length;
1400
+ return `${a}${l}${X2({ output: e.output, options: this.options, cursor: this.cursor, maxItems: e.maxItems, columnPadding: l.length, rowPadding: n + 2, style: u }).join(`
1401
+ ${l}`)}
1402
+ ${t("cyan", x2)}
1403
+ `;
1404
+ }
1405
+ }
1406
+ } }).prompt();
1407
+ };
1408
+ var Kt = (e) => t("magenta", e);
1409
+ var be = ({ indicator: e = "dots", onCancel: r, output: s = process.stdout, cancelMessage: i, errorMessage: a, frames: o = ee ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], delay: u = ee ? 80 : 120, signal: l, ...n } = {}) => {
1410
+ const c = ce();
1411
+ let p, f, g = false, E = false, $ = "", m, d = performance.now();
1412
+ const F = rt(s), y2 = n?.styleFrame ?? Kt, v = (B2) => {
1413
+ const P2 = B2 > 1 ? a ?? _.messages.error : i ?? _.messages.cancel;
1414
+ E = B2 === 1, g && (k2(P2, B2), E && typeof r == "function" && r());
1415
+ }, C = () => v(2), A = () => v(1), b = () => {
1416
+ process.on("uncaughtExceptionMonitor", C), process.on("unhandledRejection", C), process.on("SIGINT", A), process.on("SIGTERM", A), process.on("exit", v), l && l.addEventListener("abort", A);
1417
+ }, w = () => {
1418
+ process.removeListener("uncaughtExceptionMonitor", C), process.removeListener("unhandledRejection", C), process.removeListener("SIGINT", A), process.removeListener("SIGTERM", A), process.removeListener("exit", v), l && l.removeEventListener("abort", A);
1419
+ }, S2 = () => {
1420
+ if (m === void 0) return;
1421
+ c && s.write(`
1422
+ `);
1423
+ const B2 = J2(m, F, { hard: true, trim: false }).split(`
1424
+ `);
1425
+ B2.length > 1 && s.write(import_sisteransi2.cursor.up(B2.length - 1)), s.write(import_sisteransi2.cursor.to(0)), s.write(import_sisteransi2.erase.down());
1426
+ }, T2 = (B2) => B2.replace(/\.+$/, ""), M2 = (B2) => {
1427
+ const P2 = (performance.now() - B2) / 1e3, G2 = Math.floor(P2 / 60), L2 = Math.floor(P2 % 60);
1428
+ return G2 > 0 ? `[${G2}m ${L2}s]` : `[${L2}s]`;
1429
+ }, O2 = n.withGuide ?? _.withGuide, le = (B2 = "") => {
1430
+ g = true, p = xt({ output: s }), $ = T2(B2), d = performance.now(), O2 && s.write(`${t("gray", h)}
1431
+ `);
1432
+ let P2 = 0, G2 = 0;
1433
+ b(), f = setInterval(() => {
1434
+ if (c && $ === m) return;
1435
+ S2(), m = $;
1436
+ const L2 = y2(o[P2]);
1437
+ let Z2;
1438
+ if (c) Z2 = `${L2} ${$}...`;
1439
+ else if (e === "timer") Z2 = `${L2} ${$} ${M2(d)}`;
1440
+ else {
1441
+ const et2 = ".".repeat(Math.floor(G2)).slice(0, 3);
1442
+ Z2 = `${L2} ${$}${et2}`;
1443
+ }
1444
+ const Ze = J2(Z2, F, { hard: true, trim: false });
1445
+ s.write(Ze), P2 = P2 + 1 < o.length ? P2 + 1 : 0, G2 = G2 < 4 ? G2 + 0.125 : 0;
1446
+ }, u);
1447
+ }, k2 = (B2 = "", P2 = 0, G2 = false) => {
1448
+ if (!g) return;
1449
+ g = false, clearInterval(f), S2();
1450
+ const L2 = P2 === 0 ? t("green", V) : P2 === 1 ? t("red", $e) : t("red", de);
1451
+ $ = B2 ?? $, G2 || (e === "timer" ? s.write(`${L2} ${$} ${M2(d)}
1452
+ `) : s.write(`${L2} ${$}
1453
+ `)), w(), p();
1454
+ };
1455
+ return { start: le, stop: (B2 = "") => k2(B2, 0), message: (B2 = "") => {
1456
+ $ = T2(B2 ?? $);
1457
+ }, cancel: (B2 = "") => k2(B2, 1), error: (B2 = "") => k2(B2, 2), clear: () => k2("", 0, true), get isCancelled() {
1458
+ return E;
1459
+ } };
1460
+ };
1461
+ var ze = { light: I2("\u2500", "-"), heavy: I2("\u2501", "="), block: I2("\u2588", "#") };
1462
+ var oe = (e, r) => e.includes(`
1463
+ `) ? e.split(`
1464
+ `).map((s) => r(s)).join(`
1465
+ `) : r(e);
1466
+ var Jt = (e) => {
1467
+ const r = (s, i) => {
1468
+ const a = s.label ?? String(s.value);
1469
+ switch (i) {
1470
+ case "disabled":
1471
+ return `${t("gray", H2)} ${oe(a, (o) => t("gray", o))}${s.hint ? ` ${t("dim", `(${s.hint ?? "disabled"})`)}` : ""}`;
1472
+ case "selected":
1473
+ return `${oe(a, (o) => t("dim", o))}`;
1474
+ case "active":
1475
+ return `${t("green", z2)} ${a}${s.hint ? ` ${t("dim", `(${s.hint})`)}` : ""}`;
1476
+ case "cancelled":
1477
+ return `${oe(a, (o) => t(["strikethrough", "dim"], o))}`;
1478
+ default:
1479
+ return `${t("dim", H2)} ${oe(a, (o) => t("dim", o))}`;
1480
+ }
1481
+ };
1482
+ return new Tt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue, render() {
1483
+ const s = e.withGuide ?? _.withGuide, i = `${W2(this.state)} `, a = `${ve(this.state)} `, o = Bt(e.output, e.message, a, i), u = `${s ? `${t("gray", h)}
1484
+ ` : ""}${o}
1485
+ `;
1486
+ switch (this.state) {
1487
+ case "submit": {
1488
+ const l = s ? `${t("gray", h)} ` : "", n = Bt(e.output, r(this.options[this.cursor], "selected"), l);
1489
+ return `${u}${n}`;
1490
+ }
1491
+ case "cancel": {
1492
+ const l = s ? `${t("gray", h)} ` : "", n = Bt(e.output, r(this.options[this.cursor], "cancelled"), l);
1493
+ return `${u}${n}${s ? `
1494
+ ${t("gray", h)}` : ""}`;
1495
+ }
1496
+ default: {
1497
+ const l = s ? `${t("cyan", h)} ` : "", n = s ? t("cyan", x2) : "", c = u.split(`
1498
+ `).length, p = s ? 2 : 1;
1499
+ return `${u}${l}${X2({ output: e.output, cursor: this.cursor, options: this.options, maxItems: e.maxItems, columnPadding: l.length, rowPadding: c + p, style: (f, g) => r(f, f.disabled ? "disabled" : g ? "active" : "inactive") }).join(`
1500
+ ${l}`)}
1501
+ ${n}
1502
+ `;
1503
+ }
1504
+ }
1505
+ } }).prompt();
1506
+ };
1507
+ var Qe = `${t("gray", h)} `;
1508
+
1509
+ // scripts/install-cli.mjs
1510
+ var COMPONENTS = [
1511
+ { value: "fm-button", label: "fm-button", exportName: "FmButton" },
1512
+ { value: "fm-input", label: "fm-input", exportName: "FmInput" },
1513
+ {
1514
+ value: "fm-radio-input",
1515
+ label: "fm-radio-input",
1516
+ exportName: "FmRadioInput"
1517
+ },
1518
+ {
1519
+ value: "fm-dropdown",
1520
+ label: "fm-dropdown",
1521
+ exportName: "FmDropdown"
1522
+ },
1523
+ {
1524
+ value: "fm-segmented-controller",
1525
+ label: "fm-segmented-controller",
1526
+ exportName: "FmSegmentedController"
1527
+ },
1528
+ {
1529
+ value: "fm-wizard",
1530
+ label: "fm-wizard",
1531
+ exportName: "FmWizard"
1532
+ },
1533
+ {
1534
+ value: "fm-icon",
1535
+ label: "fm-icon",
1536
+ exportName: "FmIcon"
1537
+ }
1538
+ ];
1539
+ var title = source_default.hex("#0086F5").bold(`
1540
+ \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557
1541
+ \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2551 \u2588\u2588\u2551\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551
1542
+ \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2554\u2588\u2588\u2588\u2588\u2554\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551
1543
+ \u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u255A\u2550\u2550\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2551\u255A\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551\u255A\u2550\u2550\u2550\u2550\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551
1544
+ \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551 \u255A\u2550\u255D \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551
1545
+ \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D
1546
+ `);
1547
+ async function main() {
1548
+ console.log(title);
1549
+ Wt2("Welkom Flitsmeister UI");
1550
+ console.log(source_default.gray(" \u2191 \u2193 Navigeren \xB7 Spatie Selecteren (bij meerdere) \xB7 Enter Bevestigen\n"));
1551
+ const choice = await Jt({
1552
+ message: "Wat wilt u installeren?",
1553
+ options: [
1554
+ { value: "all", label: "Alle componenten" },
1555
+ { value: "selection", label: "Selectie maken" }
1556
+ ]
1557
+ });
1558
+ if (Ct(choice)) {
1559
+ Nt("Installatie geannuleerd.");
1560
+ process.exit(0);
1561
+ }
1562
+ let selected;
1563
+ if (choice === "all") {
1564
+ selected = COMPONENTS.map((c) => c.value);
1565
+ } else {
1566
+ const multiselectResult = await Lt2({
1567
+ message: "Kies componenten (space = selecteren, enter = doorgaan)",
1568
+ options: COMPONENTS.map((c) => ({ value: c.value, label: c.label })),
1569
+ required: false
1570
+ });
1571
+ if (Ct(multiselectResult)) {
1572
+ Nt("Installatie geannuleerd.");
1573
+ process.exit(0);
1574
+ }
1575
+ selected = multiselectResult;
1576
+ }
1577
+ const chosen = COMPONENTS.filter((c) => selected.includes(c.value));
1578
+ const includeIconsResult = await Rt({
1579
+ message: "Wil je ook de icons meenemen?"
1580
+ });
1581
+ if (Ct(includeIconsResult)) {
1582
+ Nt("Installatie geannuleerd.");
1583
+ process.exit(0);
1584
+ }
1585
+ const includeIcons = includeIconsResult === true;
1586
+ if (chosen.length === 0 && !includeIcons) {
1587
+ R2.message("Geen componenten of icons gekozen. Geen actie uitgevoerd.");
1588
+ Gt("Klaar!");
1589
+ process.exit(0);
1590
+ }
1591
+ let exportNames = chosen.map((c) => c.exportName);
1592
+ if (includeIcons && !exportNames.includes("FmIcon")) {
1593
+ exportNames.push("FmIcon");
1594
+ }
1595
+ exportNames = [...exportNames].sort();
1596
+ const s = be();
1597
+ s.start("Package installeren\u2026");
1598
+ const installed = await new Promise((resolve) => {
1599
+ const child = spawn("pnpm", ["add", "@flitsmeister/design-system"], {
1600
+ stdio: "ignore",
1601
+ cwd: process.cwd()
1602
+ });
1603
+ child.on("close", (code) => resolve(code === 0));
1604
+ child.on("error", () => resolve(false));
1605
+ });
1606
+ if (installed) {
1607
+ s.stop("Package ge\xEFnstalleerd");
1608
+ R2.message("\nImports (root API):");
1609
+ if (exportNames.length > 0) {
1610
+ console.log(source_default.gray(` import { ${exportNames.join(", ")} } from '@flitsmeister/design-system'`));
1611
+ }
1612
+ if (includeIcons) {
1613
+ R2.message("Icon-set (alle icons):");
1614
+ console.log(source_default.gray(" import '@flitsmeister/design-system/fm-icon/all'"));
1615
+ }
1616
+ Gt("Klaar! Voeg de imports hierboven toe aan je project.");
1617
+ } else {
1618
+ s.error("Installatie mislukt of pnpm niet gevonden");
1619
+ R2.message("Voer handmatig uit:");
1620
+ console.log(source_default.cyan(" pnpm add @flitsmeister/design-system"));
1621
+ console.log(source_default.gray(" of: npm i @flitsmeister/design-system"));
1622
+ R2.message("\nImports (root API):");
1623
+ if (exportNames.length > 0) {
1624
+ console.log(source_default.gray(` import { ${exportNames.join(", ")} } from '@flitsmeister/design-system'`));
1625
+ }
1626
+ if (includeIcons) {
1627
+ R2.message("Icon-set (alle icons):");
1628
+ console.log(source_default.gray(" import '@flitsmeister/design-system/fm-icon/all'"));
1629
+ }
1630
+ Gt("Voer het install-commando uit en voeg daarna de imports toe.");
1631
+ process.exit(1);
1632
+ }
1633
+ }
1634
+ main().catch((err) => {
1635
+ console.error(err);
1636
+ process.exit(1);
1637
+ });