@swmansion/argent 0.7.1 → 0.8.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.
@@ -6,7 +6,7 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
8
  var __require = /* @__PURE__ */ ((x3) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x3, {
9
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9
+ get: (a, b2) => (typeof require !== "undefined" ? require : a)[b2]
10
10
  }) : x3)(function(x3) {
11
11
  if (typeof require !== "undefined") return require.apply(this, arguments);
12
12
  throw Error('Dynamic require of "' + x3 + '" is not supported');
@@ -35,45 +35,45 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
35
35
  var require_src = __commonJS({
36
36
  "../../node_modules/sisteransi/src/index.js"(exports, module) {
37
37
  "use strict";
38
- var ESC = "\x1B";
39
- var CSI = `${ESC}[`;
38
+ var ESC2 = "\x1B";
39
+ var CSI2 = `${ESC2}[`;
40
40
  var beep = "\x07";
41
41
  var cursor = {
42
- to(x3, y2) {
43
- if (!y2) return `${CSI}${x3 + 1}G`;
44
- return `${CSI}${y2 + 1};${x3 + 1}H`;
42
+ to(x3, y) {
43
+ if (!y) return `${CSI2}${x3 + 1}G`;
44
+ return `${CSI2}${y + 1};${x3 + 1}H`;
45
45
  },
46
- move(x3, y2) {
46
+ move(x3, y) {
47
47
  let ret = "";
48
- if (x3 < 0) ret += `${CSI}${-x3}D`;
49
- else if (x3 > 0) ret += `${CSI}${x3}C`;
50
- if (y2 < 0) ret += `${CSI}${-y2}A`;
51
- else if (y2 > 0) ret += `${CSI}${y2}B`;
48
+ if (x3 < 0) ret += `${CSI2}${-x3}D`;
49
+ else if (x3 > 0) ret += `${CSI2}${x3}C`;
50
+ if (y < 0) ret += `${CSI2}${-y}A`;
51
+ else if (y > 0) ret += `${CSI2}${y}B`;
52
52
  return ret;
53
53
  },
54
- up: (count = 1) => `${CSI}${count}A`,
55
- down: (count = 1) => `${CSI}${count}B`,
56
- forward: (count = 1) => `${CSI}${count}C`,
57
- backward: (count = 1) => `${CSI}${count}D`,
58
- nextLine: (count = 1) => `${CSI}E`.repeat(count),
59
- prevLine: (count = 1) => `${CSI}F`.repeat(count),
60
- left: `${CSI}G`,
61
- hide: `${CSI}?25l`,
62
- show: `${CSI}?25h`,
63
- save: `${ESC}7`,
64
- restore: `${ESC}8`
54
+ up: (count = 1) => `${CSI2}${count}A`,
55
+ down: (count = 1) => `${CSI2}${count}B`,
56
+ forward: (count = 1) => `${CSI2}${count}C`,
57
+ backward: (count = 1) => `${CSI2}${count}D`,
58
+ nextLine: (count = 1) => `${CSI2}E`.repeat(count),
59
+ prevLine: (count = 1) => `${CSI2}F`.repeat(count),
60
+ left: `${CSI2}G`,
61
+ hide: `${CSI2}?25l`,
62
+ show: `${CSI2}?25h`,
63
+ save: `${ESC2}7`,
64
+ restore: `${ESC2}8`
65
65
  };
66
66
  var scroll = {
67
- up: (count = 1) => `${CSI}S`.repeat(count),
68
- down: (count = 1) => `${CSI}T`.repeat(count)
67
+ up: (count = 1) => `${CSI2}S`.repeat(count),
68
+ down: (count = 1) => `${CSI2}T`.repeat(count)
69
69
  };
70
70
  var erase = {
71
- screen: `${CSI}2J`,
72
- up: (count = 1) => `${CSI}1J`.repeat(count),
73
- down: (count = 1) => `${CSI}J`.repeat(count),
74
- line: `${CSI}2K`,
75
- lineEnd: `${CSI}K`,
76
- lineStart: `${CSI}1K`,
71
+ screen: `${CSI2}2J`,
72
+ up: (count = 1) => `${CSI2}1J`.repeat(count),
73
+ down: (count = 1) => `${CSI2}J`.repeat(count),
74
+ line: `${CSI2}2K`,
75
+ lineEnd: `${CSI2}K`,
76
+ lineStart: `${CSI2}1K`,
77
77
  lines(count) {
78
78
  let clear = "";
79
79
  for (let i = 0; i < count; i++)
@@ -90,10 +90,10 @@ var require_src = __commonJS({
90
90
  // ../../node_modules/picocolors/picocolors.js
91
91
  var require_picocolors = __commonJS({
92
92
  "../../node_modules/picocolors/picocolors.js"(exports, module) {
93
- var p = process || {};
94
- var argv = p.argv || [];
95
- var env = p.env || {};
96
- var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
93
+ var p2 = process || {};
94
+ var argv = p2.argv || [];
95
+ var env = p2.env || {};
96
+ var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p2.platform === "win32" || (p2.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
97
97
  var formatter = (open, close, replace = open) => (input) => {
98
98
  let string = "" + input, index = string.indexOf(close, open.length);
99
99
  return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
@@ -108,50 +108,50 @@ var require_picocolors = __commonJS({
108
108
  return result + string.substring(cursor);
109
109
  };
110
110
  var createColors = (enabled = isColorSupported) => {
111
- let f = enabled ? formatter : () => String;
111
+ let f2 = enabled ? formatter : () => String;
112
112
  return {
113
113
  isColorSupported: enabled,
114
- reset: f("\x1B[0m", "\x1B[0m"),
115
- bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
116
- dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
117
- italic: f("\x1B[3m", "\x1B[23m"),
118
- underline: f("\x1B[4m", "\x1B[24m"),
119
- inverse: f("\x1B[7m", "\x1B[27m"),
120
- hidden: f("\x1B[8m", "\x1B[28m"),
121
- strikethrough: f("\x1B[9m", "\x1B[29m"),
122
- black: f("\x1B[30m", "\x1B[39m"),
123
- red: f("\x1B[31m", "\x1B[39m"),
124
- green: f("\x1B[32m", "\x1B[39m"),
125
- yellow: f("\x1B[33m", "\x1B[39m"),
126
- blue: f("\x1B[34m", "\x1B[39m"),
127
- magenta: f("\x1B[35m", "\x1B[39m"),
128
- cyan: f("\x1B[36m", "\x1B[39m"),
129
- white: f("\x1B[37m", "\x1B[39m"),
130
- gray: f("\x1B[90m", "\x1B[39m"),
131
- bgBlack: f("\x1B[40m", "\x1B[49m"),
132
- bgRed: f("\x1B[41m", "\x1B[49m"),
133
- bgGreen: f("\x1B[42m", "\x1B[49m"),
134
- bgYellow: f("\x1B[43m", "\x1B[49m"),
135
- bgBlue: f("\x1B[44m", "\x1B[49m"),
136
- bgMagenta: f("\x1B[45m", "\x1B[49m"),
137
- bgCyan: f("\x1B[46m", "\x1B[49m"),
138
- bgWhite: f("\x1B[47m", "\x1B[49m"),
139
- blackBright: f("\x1B[90m", "\x1B[39m"),
140
- redBright: f("\x1B[91m", "\x1B[39m"),
141
- greenBright: f("\x1B[92m", "\x1B[39m"),
142
- yellowBright: f("\x1B[93m", "\x1B[39m"),
143
- blueBright: f("\x1B[94m", "\x1B[39m"),
144
- magentaBright: f("\x1B[95m", "\x1B[39m"),
145
- cyanBright: f("\x1B[96m", "\x1B[39m"),
146
- whiteBright: f("\x1B[97m", "\x1B[39m"),
147
- bgBlackBright: f("\x1B[100m", "\x1B[49m"),
148
- bgRedBright: f("\x1B[101m", "\x1B[49m"),
149
- bgGreenBright: f("\x1B[102m", "\x1B[49m"),
150
- bgYellowBright: f("\x1B[103m", "\x1B[49m"),
151
- bgBlueBright: f("\x1B[104m", "\x1B[49m"),
152
- bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
153
- bgCyanBright: f("\x1B[106m", "\x1B[49m"),
154
- bgWhiteBright: f("\x1B[107m", "\x1B[49m")
114
+ reset: f2("\x1B[0m", "\x1B[0m"),
115
+ bold: f2("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
116
+ dim: f2("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
117
+ italic: f2("\x1B[3m", "\x1B[23m"),
118
+ underline: f2("\x1B[4m", "\x1B[24m"),
119
+ inverse: f2("\x1B[7m", "\x1B[27m"),
120
+ hidden: f2("\x1B[8m", "\x1B[28m"),
121
+ strikethrough: f2("\x1B[9m", "\x1B[29m"),
122
+ black: f2("\x1B[30m", "\x1B[39m"),
123
+ red: f2("\x1B[31m", "\x1B[39m"),
124
+ green: f2("\x1B[32m", "\x1B[39m"),
125
+ yellow: f2("\x1B[33m", "\x1B[39m"),
126
+ blue: f2("\x1B[34m", "\x1B[39m"),
127
+ magenta: f2("\x1B[35m", "\x1B[39m"),
128
+ cyan: f2("\x1B[36m", "\x1B[39m"),
129
+ white: f2("\x1B[37m", "\x1B[39m"),
130
+ gray: f2("\x1B[90m", "\x1B[39m"),
131
+ bgBlack: f2("\x1B[40m", "\x1B[49m"),
132
+ bgRed: f2("\x1B[41m", "\x1B[49m"),
133
+ bgGreen: f2("\x1B[42m", "\x1B[49m"),
134
+ bgYellow: f2("\x1B[43m", "\x1B[49m"),
135
+ bgBlue: f2("\x1B[44m", "\x1B[49m"),
136
+ bgMagenta: f2("\x1B[45m", "\x1B[49m"),
137
+ bgCyan: f2("\x1B[46m", "\x1B[49m"),
138
+ bgWhite: f2("\x1B[47m", "\x1B[49m"),
139
+ blackBright: f2("\x1B[90m", "\x1B[39m"),
140
+ redBright: f2("\x1B[91m", "\x1B[39m"),
141
+ greenBright: f2("\x1B[92m", "\x1B[39m"),
142
+ yellowBright: f2("\x1B[93m", "\x1B[39m"),
143
+ blueBright: f2("\x1B[94m", "\x1B[39m"),
144
+ magentaBright: f2("\x1B[95m", "\x1B[39m"),
145
+ cyanBright: f2("\x1B[96m", "\x1B[39m"),
146
+ whiteBright: f2("\x1B[97m", "\x1B[39m"),
147
+ bgBlackBright: f2("\x1B[100m", "\x1B[49m"),
148
+ bgRedBright: f2("\x1B[101m", "\x1B[49m"),
149
+ bgGreenBright: f2("\x1B[102m", "\x1B[49m"),
150
+ bgYellowBright: f2("\x1B[103m", "\x1B[49m"),
151
+ bgBlueBright: f2("\x1B[104m", "\x1B[49m"),
152
+ bgMagentaBright: f2("\x1B[105m", "\x1B[49m"),
153
+ bgCyanBright: f2("\x1B[106m", "\x1B[49m"),
154
+ bgWhiteBright: f2("\x1B[107m", "\x1B[49m")
155
155
  };
156
156
  };
157
157
  module.exports = createColors();
@@ -212,11 +212,11 @@ var require_re = __commonJS({
212
212
  } = require_constants();
213
213
  var debug = require_debug();
214
214
  exports = module.exports = {};
215
- var re2 = exports.re = [];
215
+ var re = exports.re = [];
216
216
  var safeRe = exports.safeRe = [];
217
217
  var src = exports.src = [];
218
218
  var safeSrc = exports.safeSrc = [];
219
- var t2 = exports.t = {};
219
+ var t = exports.t = {};
220
220
  var R3 = 0;
221
221
  var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
222
222
  var safeRegexReplacements = [
@@ -234,55 +234,55 @@ var require_re = __commonJS({
234
234
  const safe = makeSafeRegex(value);
235
235
  const index = R3++;
236
236
  debug(name, index, value);
237
- t2[name] = index;
237
+ t[name] = index;
238
238
  src[index] = value;
239
239
  safeSrc[index] = safe;
240
- re2[index] = new RegExp(value, isGlobal ? "g" : void 0);
240
+ re[index] = new RegExp(value, isGlobal ? "g" : void 0);
241
241
  safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
242
242
  };
243
243
  createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
244
244
  createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
245
245
  createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
246
- createToken("MAINVERSION", `(${src[t2.NUMERICIDENTIFIER]})\\.(${src[t2.NUMERICIDENTIFIER]})\\.(${src[t2.NUMERICIDENTIFIER]})`);
247
- createToken("MAINVERSIONLOOSE", `(${src[t2.NUMERICIDENTIFIERLOOSE]})\\.(${src[t2.NUMERICIDENTIFIERLOOSE]})\\.(${src[t2.NUMERICIDENTIFIERLOOSE]})`);
248
- createToken("PRERELEASEIDENTIFIER", `(?:${src[t2.NONNUMERICIDENTIFIER]}|${src[t2.NUMERICIDENTIFIER]})`);
249
- createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t2.NONNUMERICIDENTIFIER]}|${src[t2.NUMERICIDENTIFIERLOOSE]})`);
250
- createToken("PRERELEASE", `(?:-(${src[t2.PRERELEASEIDENTIFIER]}(?:\\.${src[t2.PRERELEASEIDENTIFIER]})*))`);
251
- createToken("PRERELEASELOOSE", `(?:-?(${src[t2.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t2.PRERELEASEIDENTIFIERLOOSE]})*))`);
246
+ createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
247
+ createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
248
+ createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);
249
+ createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);
250
+ createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
251
+ createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
252
252
  createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
253
- createToken("BUILD", `(?:\\+(${src[t2.BUILDIDENTIFIER]}(?:\\.${src[t2.BUILDIDENTIFIER]})*))`);
254
- createToken("FULLPLAIN", `v?${src[t2.MAINVERSION]}${src[t2.PRERELEASE]}?${src[t2.BUILD]}?`);
255
- createToken("FULL", `^${src[t2.FULLPLAIN]}$`);
256
- createToken("LOOSEPLAIN", `[v=\\s]*${src[t2.MAINVERSIONLOOSE]}${src[t2.PRERELEASELOOSE]}?${src[t2.BUILD]}?`);
257
- createToken("LOOSE", `^${src[t2.LOOSEPLAIN]}$`);
253
+ createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
254
+ createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
255
+ createToken("FULL", `^${src[t.FULLPLAIN]}$`);
256
+ createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
257
+ createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
258
258
  createToken("GTLT", "((?:<|>)?=?)");
259
- createToken("XRANGEIDENTIFIERLOOSE", `${src[t2.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
260
- createToken("XRANGEIDENTIFIER", `${src[t2.NUMERICIDENTIFIER]}|x|X|\\*`);
261
- createToken("XRANGEPLAIN", `[v=\\s]*(${src[t2.XRANGEIDENTIFIER]})(?:\\.(${src[t2.XRANGEIDENTIFIER]})(?:\\.(${src[t2.XRANGEIDENTIFIER]})(?:${src[t2.PRERELEASE]})?${src[t2.BUILD]}?)?)?`);
262
- createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t2.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t2.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t2.XRANGEIDENTIFIERLOOSE]})(?:${src[t2.PRERELEASELOOSE]})?${src[t2.BUILD]}?)?)?`);
263
- createToken("XRANGE", `^${src[t2.GTLT]}\\s*${src[t2.XRANGEPLAIN]}$`);
264
- createToken("XRANGELOOSE", `^${src[t2.GTLT]}\\s*${src[t2.XRANGEPLAINLOOSE]}$`);
259
+ createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
260
+ createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
261
+ createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
262
+ createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
263
+ createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
264
+ createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
265
265
  createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
266
- createToken("COERCE", `${src[t2.COERCEPLAIN]}(?:$|[^\\d])`);
267
- createToken("COERCEFULL", src[t2.COERCEPLAIN] + `(?:${src[t2.PRERELEASE]})?(?:${src[t2.BUILD]})?(?:$|[^\\d])`);
268
- createToken("COERCERTL", src[t2.COERCE], true);
269
- createToken("COERCERTLFULL", src[t2.COERCEFULL], true);
266
+ createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
267
+ createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
268
+ createToken("COERCERTL", src[t.COERCE], true);
269
+ createToken("COERCERTLFULL", src[t.COERCEFULL], true);
270
270
  createToken("LONETILDE", "(?:~>?)");
271
- createToken("TILDETRIM", `(\\s*)${src[t2.LONETILDE]}\\s+`, true);
271
+ createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
272
272
  exports.tildeTrimReplace = "$1~";
273
- createToken("TILDE", `^${src[t2.LONETILDE]}${src[t2.XRANGEPLAIN]}$`);
274
- createToken("TILDELOOSE", `^${src[t2.LONETILDE]}${src[t2.XRANGEPLAINLOOSE]}$`);
273
+ createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
274
+ createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
275
275
  createToken("LONECARET", "(?:\\^)");
276
- createToken("CARETTRIM", `(\\s*)${src[t2.LONECARET]}\\s+`, true);
276
+ createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
277
277
  exports.caretTrimReplace = "$1^";
278
- createToken("CARET", `^${src[t2.LONECARET]}${src[t2.XRANGEPLAIN]}$`);
279
- createToken("CARETLOOSE", `^${src[t2.LONECARET]}${src[t2.XRANGEPLAINLOOSE]}$`);
280
- createToken("COMPARATORLOOSE", `^${src[t2.GTLT]}\\s*(${src[t2.LOOSEPLAIN]})$|^$`);
281
- createToken("COMPARATOR", `^${src[t2.GTLT]}\\s*(${src[t2.FULLPLAIN]})$|^$`);
282
- createToken("COMPARATORTRIM", `(\\s*)${src[t2.GTLT]}\\s*(${src[t2.LOOSEPLAIN]}|${src[t2.XRANGEPLAIN]})`, true);
278
+ createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
279
+ createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
280
+ createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
281
+ createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
282
+ createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
283
283
  exports.comparatorTrimReplace = "$1$2$3";
284
- createToken("HYPHENRANGE", `^\\s*(${src[t2.XRANGEPLAIN]})\\s+-\\s+(${src[t2.XRANGEPLAIN]})\\s*$`);
285
- createToken("HYPHENRANGELOOSE", `^\\s*(${src[t2.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t2.XRANGEPLAINLOOSE]})\\s*$`);
284
+ createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
285
+ createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
286
286
  createToken("STAR", "(<|>)?=?\\s*\\*");
287
287
  createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
288
288
  createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
@@ -313,19 +313,19 @@ var require_identifiers = __commonJS({
313
313
  "../../node_modules/semver/internal/identifiers.js"(exports, module) {
314
314
  "use strict";
315
315
  var numeric = /^[0-9]+$/;
316
- var compareIdentifiers = (a, b) => {
317
- if (typeof a === "number" && typeof b === "number") {
318
- return a === b ? 0 : a < b ? -1 : 1;
316
+ var compareIdentifiers = (a, b2) => {
317
+ if (typeof a === "number" && typeof b2 === "number") {
318
+ return a === b2 ? 0 : a < b2 ? -1 : 1;
319
319
  }
320
320
  const anum = numeric.test(a);
321
- const bnum = numeric.test(b);
321
+ const bnum = numeric.test(b2);
322
322
  if (anum && bnum) {
323
323
  a = +a;
324
- b = +b;
324
+ b2 = +b2;
325
325
  }
326
- return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
326
+ return a === b2 ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b2 ? -1 : 1;
327
327
  };
328
- var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
328
+ var rcompareIdentifiers = (a, b2) => compareIdentifiers(b2, a);
329
329
  module.exports = {
330
330
  compareIdentifiers,
331
331
  rcompareIdentifiers
@@ -339,7 +339,7 @@ var require_semver = __commonJS({
339
339
  "use strict";
340
340
  var debug = require_debug();
341
341
  var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
342
- var { safeRe: re2, t: t2 } = require_re();
342
+ var { safeRe: re, t } = require_re();
343
343
  var parseOptions = require_parse_options();
344
344
  var { compareIdentifiers } = require_identifiers();
345
345
  var SemVer = class _SemVer {
@@ -363,14 +363,14 @@ var require_semver = __commonJS({
363
363
  this.options = options;
364
364
  this.loose = !!options.loose;
365
365
  this.includePrerelease = !!options.includePrerelease;
366
- const m = version.trim().match(options.loose ? re2[t2.LOOSE] : re2[t2.FULL]);
367
- if (!m) {
366
+ const m2 = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
367
+ if (!m2) {
368
368
  throw new TypeError(`Invalid Version: ${version}`);
369
369
  }
370
370
  this.raw = version;
371
- this.major = +m[1];
372
- this.minor = +m[2];
373
- this.patch = +m[3];
371
+ this.major = +m2[1];
372
+ this.minor = +m2[2];
373
+ this.patch = +m2[3];
374
374
  if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
375
375
  throw new TypeError("Invalid major version");
376
376
  }
@@ -380,10 +380,10 @@ var require_semver = __commonJS({
380
380
  if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
381
381
  throw new TypeError("Invalid patch version");
382
382
  }
383
- if (!m[4]) {
383
+ if (!m2[4]) {
384
384
  this.prerelease = [];
385
385
  } else {
386
- this.prerelease = m[4].split(".").map((id) => {
386
+ this.prerelease = m2[4].split(".").map((id) => {
387
387
  if (/^[0-9]+$/.test(id)) {
388
388
  const num = +id;
389
389
  if (num >= 0 && num < MAX_SAFE_INTEGER) {
@@ -393,7 +393,7 @@ var require_semver = __commonJS({
393
393
  return id;
394
394
  });
395
395
  }
396
- this.build = m[5] ? m[5].split(".") : [];
396
+ this.build = m2[5] ? m2[5].split(".") : [];
397
397
  this.format();
398
398
  }
399
399
  format() {
@@ -457,18 +457,18 @@ var require_semver = __commonJS({
457
457
  let i = 0;
458
458
  do {
459
459
  const a = this.prerelease[i];
460
- const b = other.prerelease[i];
461
- debug("prerelease compare", i, a, b);
462
- if (a === void 0 && b === void 0) {
460
+ const b2 = other.prerelease[i];
461
+ debug("prerelease compare", i, a, b2);
462
+ if (a === void 0 && b2 === void 0) {
463
463
  return 0;
464
- } else if (b === void 0) {
464
+ } else if (b2 === void 0) {
465
465
  return 1;
466
466
  } else if (a === void 0) {
467
467
  return -1;
468
- } else if (a === b) {
468
+ } else if (a === b2) {
469
469
  continue;
470
470
  } else {
471
- return compareIdentifiers(a, b);
471
+ return compareIdentifiers(a, b2);
472
472
  }
473
473
  } while (++i);
474
474
  }
@@ -479,18 +479,18 @@ var require_semver = __commonJS({
479
479
  let i = 0;
480
480
  do {
481
481
  const a = this.build[i];
482
- const b = other.build[i];
483
- debug("build compare", i, a, b);
484
- if (a === void 0 && b === void 0) {
482
+ const b2 = other.build[i];
483
+ debug("build compare", i, a, b2);
484
+ if (a === void 0 && b2 === void 0) {
485
485
  return 0;
486
- } else if (b === void 0) {
486
+ } else if (b2 === void 0) {
487
487
  return 1;
488
488
  } else if (a === void 0) {
489
489
  return -1;
490
- } else if (a === b) {
490
+ } else if (a === b2) {
491
491
  continue;
492
492
  } else {
493
- return compareIdentifiers(a, b);
493
+ return compareIdentifiers(a, b2);
494
494
  }
495
495
  } while (++i);
496
496
  }
@@ -502,7 +502,7 @@ var require_semver = __commonJS({
502
502
  throw new Error("invalid increment argument: identifier is empty");
503
503
  }
504
504
  if (identifier) {
505
- const match = `-${identifier}`.match(this.options.loose ? re2[t2.PRERELEASELOOSE] : re2[t2.PRERELEASE]);
505
+ const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
506
506
  if (!match || match[1] !== identifier) {
507
507
  throw new Error(`invalid identifier: ${identifier}`);
508
508
  }
@@ -640,8 +640,8 @@ var require_valid = __commonJS({
640
640
  "use strict";
641
641
  var parse4 = require_parse();
642
642
  var valid = (version, options) => {
643
- const v = parse4(version, options);
644
- return v ? v.version : null;
643
+ const v2 = parse4(version, options);
644
+ return v2 ? v2.version : null;
645
645
  };
646
646
  module.exports = valid;
647
647
  }
@@ -776,7 +776,7 @@ var require_compare = __commonJS({
776
776
  "../../node_modules/semver/functions/compare.js"(exports, module) {
777
777
  "use strict";
778
778
  var SemVer = require_semver();
779
- var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
779
+ var compare = (a, b2, loose) => new SemVer(a, loose).compare(new SemVer(b2, loose));
780
780
  module.exports = compare;
781
781
  }
782
782
  });
@@ -786,7 +786,7 @@ var require_rcompare = __commonJS({
786
786
  "../../node_modules/semver/functions/rcompare.js"(exports, module) {
787
787
  "use strict";
788
788
  var compare = require_compare();
789
- var rcompare = (a, b, loose) => compare(b, a, loose);
789
+ var rcompare = (a, b2, loose) => compare(b2, a, loose);
790
790
  module.exports = rcompare;
791
791
  }
792
792
  });
@@ -796,7 +796,7 @@ var require_compare_loose = __commonJS({
796
796
  "../../node_modules/semver/functions/compare-loose.js"(exports, module) {
797
797
  "use strict";
798
798
  var compare = require_compare();
799
- var compareLoose = (a, b) => compare(a, b, true);
799
+ var compareLoose = (a, b2) => compare(a, b2, true);
800
800
  module.exports = compareLoose;
801
801
  }
802
802
  });
@@ -806,9 +806,9 @@ var require_compare_build = __commonJS({
806
806
  "../../node_modules/semver/functions/compare-build.js"(exports, module) {
807
807
  "use strict";
808
808
  var SemVer = require_semver();
809
- var compareBuild = (a, b, loose) => {
809
+ var compareBuild = (a, b2, loose) => {
810
810
  const versionA = new SemVer(a, loose);
811
- const versionB = new SemVer(b, loose);
811
+ const versionB = new SemVer(b2, loose);
812
812
  return versionA.compare(versionB) || versionA.compareBuild(versionB);
813
813
  };
814
814
  module.exports = compareBuild;
@@ -820,7 +820,7 @@ var require_sort = __commonJS({
820
820
  "../../node_modules/semver/functions/sort.js"(exports, module) {
821
821
  "use strict";
822
822
  var compareBuild = require_compare_build();
823
- var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
823
+ var sort = (list, loose) => list.sort((a, b2) => compareBuild(a, b2, loose));
824
824
  module.exports = sort;
825
825
  }
826
826
  });
@@ -830,7 +830,7 @@ var require_rsort = __commonJS({
830
830
  "../../node_modules/semver/functions/rsort.js"(exports, module) {
831
831
  "use strict";
832
832
  var compareBuild = require_compare_build();
833
- var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
833
+ var rsort = (list, loose) => list.sort((a, b2) => compareBuild(b2, a, loose));
834
834
  module.exports = rsort;
835
835
  }
836
836
  });
@@ -840,8 +840,8 @@ var require_gt = __commonJS({
840
840
  "../../node_modules/semver/functions/gt.js"(exports, module) {
841
841
  "use strict";
842
842
  var compare = require_compare();
843
- var gt3 = (a, b, loose) => compare(a, b, loose) > 0;
844
- module.exports = gt3;
843
+ var gt2 = (a, b2, loose) => compare(a, b2, loose) > 0;
844
+ module.exports = gt2;
845
845
  }
846
846
  });
847
847
 
@@ -850,7 +850,7 @@ var require_lt = __commonJS({
850
850
  "../../node_modules/semver/functions/lt.js"(exports, module) {
851
851
  "use strict";
852
852
  var compare = require_compare();
853
- var lt2 = (a, b, loose) => compare(a, b, loose) < 0;
853
+ var lt2 = (a, b2, loose) => compare(a, b2, loose) < 0;
854
854
  module.exports = lt2;
855
855
  }
856
856
  });
@@ -860,7 +860,7 @@ var require_eq = __commonJS({
860
860
  "../../node_modules/semver/functions/eq.js"(exports, module) {
861
861
  "use strict";
862
862
  var compare = require_compare();
863
- var eq = (a, b, loose) => compare(a, b, loose) === 0;
863
+ var eq = (a, b2, loose) => compare(a, b2, loose) === 0;
864
864
  module.exports = eq;
865
865
  }
866
866
  });
@@ -870,7 +870,7 @@ var require_neq = __commonJS({
870
870
  "../../node_modules/semver/functions/neq.js"(exports, module) {
871
871
  "use strict";
872
872
  var compare = require_compare();
873
- var neq = (a, b, loose) => compare(a, b, loose) !== 0;
873
+ var neq = (a, b2, loose) => compare(a, b2, loose) !== 0;
874
874
  module.exports = neq;
875
875
  }
876
876
  });
@@ -880,7 +880,7 @@ var require_gte = __commonJS({
880
880
  "../../node_modules/semver/functions/gte.js"(exports, module) {
881
881
  "use strict";
882
882
  var compare = require_compare();
883
- var gte = (a, b, loose) => compare(a, b, loose) >= 0;
883
+ var gte = (a, b2, loose) => compare(a, b2, loose) >= 0;
884
884
  module.exports = gte;
885
885
  }
886
886
  });
@@ -890,7 +890,7 @@ var require_lte = __commonJS({
890
890
  "../../node_modules/semver/functions/lte.js"(exports, module) {
891
891
  "use strict";
892
892
  var compare = require_compare();
893
- var lte = (a, b, loose) => compare(a, b, loose) <= 0;
893
+ var lte = (a, b2, loose) => compare(a, b2, loose) <= 0;
894
894
  module.exports = lte;
895
895
  }
896
896
  });
@@ -901,42 +901,42 @@ var require_cmp = __commonJS({
901
901
  "use strict";
902
902
  var eq = require_eq();
903
903
  var neq = require_neq();
904
- var gt3 = require_gt();
904
+ var gt2 = require_gt();
905
905
  var gte = require_gte();
906
906
  var lt2 = require_lt();
907
907
  var lte = require_lte();
908
- var cmp = (a, op, b, loose) => {
908
+ var cmp = (a, op, b2, loose) => {
909
909
  switch (op) {
910
910
  case "===":
911
911
  if (typeof a === "object") {
912
912
  a = a.version;
913
913
  }
914
- if (typeof b === "object") {
915
- b = b.version;
914
+ if (typeof b2 === "object") {
915
+ b2 = b2.version;
916
916
  }
917
- return a === b;
917
+ return a === b2;
918
918
  case "!==":
919
919
  if (typeof a === "object") {
920
920
  a = a.version;
921
921
  }
922
- if (typeof b === "object") {
923
- b = b.version;
922
+ if (typeof b2 === "object") {
923
+ b2 = b2.version;
924
924
  }
925
- return a !== b;
925
+ return a !== b2;
926
926
  case "":
927
927
  case "=":
928
928
  case "==":
929
- return eq(a, b, loose);
929
+ return eq(a, b2, loose);
930
930
  case "!=":
931
- return neq(a, b, loose);
931
+ return neq(a, b2, loose);
932
932
  case ">":
933
- return gt3(a, b, loose);
933
+ return gt2(a, b2, loose);
934
934
  case ">=":
935
- return gte(a, b, loose);
935
+ return gte(a, b2, loose);
936
936
  case "<":
937
- return lt2(a, b, loose);
937
+ return lt2(a, b2, loose);
938
938
  case "<=":
939
- return lte(a, b, loose);
939
+ return lte(a, b2, loose);
940
940
  default:
941
941
  throw new TypeError(`Invalid operator: ${op}`);
942
942
  }
@@ -951,7 +951,7 @@ var require_coerce = __commonJS({
951
951
  "use strict";
952
952
  var SemVer = require_semver();
953
953
  var parse4 = require_parse();
954
- var { safeRe: re2, t: t2 } = require_re();
954
+ var { safeRe: re, t } = require_re();
955
955
  var coerce = (version, options) => {
956
956
  if (version instanceof SemVer) {
957
957
  return version;
@@ -965,9 +965,9 @@ var require_coerce = __commonJS({
965
965
  options = options || {};
966
966
  let match = null;
967
967
  if (!options.rtl) {
968
- match = version.match(options.includePrerelease ? re2[t2.COERCEFULL] : re2[t2.COERCE]);
968
+ match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
969
969
  } else {
970
- const coerceRtlRegex = options.includePrerelease ? re2[t2.COERCERTLFULL] : re2[t2.COERCERTL];
970
+ const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
971
971
  let next;
972
972
  while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
973
973
  if (!match || next.index + next[0].length !== match.index + match[0].length) {
@@ -991,6 +991,47 @@ var require_coerce = __commonJS({
991
991
  }
992
992
  });
993
993
 
994
+ // ../../node_modules/semver/functions/truncate.js
995
+ var require_truncate = __commonJS({
996
+ "../../node_modules/semver/functions/truncate.js"(exports, module) {
997
+ "use strict";
998
+ var parse4 = require_parse();
999
+ var constants = require_constants();
1000
+ var SemVer = require_semver();
1001
+ var truncate = (version, truncation, options) => {
1002
+ if (!constants.RELEASE_TYPES.includes(truncation)) {
1003
+ return null;
1004
+ }
1005
+ const clonedVersion = cloneInputVersion(version, options);
1006
+ return clonedVersion && doTruncation(clonedVersion, truncation);
1007
+ };
1008
+ var cloneInputVersion = (version, options) => {
1009
+ const versionStringToParse = version instanceof SemVer ? version.version : version;
1010
+ return parse4(versionStringToParse, options);
1011
+ };
1012
+ var doTruncation = (version, truncation) => {
1013
+ if (isPrerelease(truncation)) {
1014
+ return version.version;
1015
+ }
1016
+ version.prerelease = [];
1017
+ switch (truncation) {
1018
+ case "major":
1019
+ version.minor = 0;
1020
+ version.patch = 0;
1021
+ break;
1022
+ case "minor":
1023
+ version.patch = 0;
1024
+ break;
1025
+ }
1026
+ return version.format();
1027
+ };
1028
+ var isPrerelease = (type) => {
1029
+ return type.startsWith("pre");
1030
+ };
1031
+ module.exports = truncate;
1032
+ }
1033
+ });
1034
+
994
1035
  // ../../node_modules/semver/internal/lrucache.js
995
1036
  var require_lrucache = __commonJS({
996
1037
  "../../node_modules/semver/internal/lrucache.js"(exports, module) {
@@ -1106,20 +1147,20 @@ var require_range = __commonJS({
1106
1147
  return cached;
1107
1148
  }
1108
1149
  const loose = this.options.loose;
1109
- const hr = loose ? re2[t2.HYPHENRANGELOOSE] : re2[t2.HYPHENRANGE];
1150
+ const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
1110
1151
  range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
1111
1152
  debug("hyphen replace", range);
1112
- range = range.replace(re2[t2.COMPARATORTRIM], comparatorTrimReplace);
1153
+ range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
1113
1154
  debug("comparator trim", range);
1114
- range = range.replace(re2[t2.TILDETRIM], tildeTrimReplace);
1155
+ range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
1115
1156
  debug("tilde trim", range);
1116
- range = range.replace(re2[t2.CARETTRIM], caretTrimReplace);
1157
+ range = range.replace(re[t.CARETTRIM], caretTrimReplace);
1117
1158
  debug("caret trim", range);
1118
1159
  let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
1119
1160
  if (loose) {
1120
1161
  rangeList = rangeList.filter((comp) => {
1121
1162
  debug("loose invalid filter", comp, this.options);
1122
- return !!comp.match(re2[t2.COMPARATORLOOSE]);
1163
+ return !!comp.match(re[t.COMPARATORLOOSE]);
1123
1164
  });
1124
1165
  }
1125
1166
  debug("range list", rangeList);
@@ -1180,8 +1221,8 @@ var require_range = __commonJS({
1180
1221
  var debug = require_debug();
1181
1222
  var SemVer = require_semver();
1182
1223
  var {
1183
- safeRe: re2,
1184
- t: t2,
1224
+ safeRe: re,
1225
+ t,
1185
1226
  comparatorTrimReplace,
1186
1227
  tildeTrimReplace,
1187
1228
  caretTrimReplace
@@ -1202,7 +1243,7 @@ var require_range = __commonJS({
1202
1243
  return result;
1203
1244
  };
1204
1245
  var parseComparator = (comp, options) => {
1205
- comp = comp.replace(re2[t2.BUILD], "");
1246
+ comp = comp.replace(re[t.BUILD], "");
1206
1247
  debug("comp", comp, options);
1207
1248
  comp = replaceCarets(comp, options);
1208
1249
  debug("caret", comp);
@@ -1219,21 +1260,21 @@ var require_range = __commonJS({
1219
1260
  return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
1220
1261
  };
1221
1262
  var replaceTilde = (comp, options) => {
1222
- const r = options.loose ? re2[t2.TILDELOOSE] : re2[t2.TILDE];
1223
- return comp.replace(r, (_2, M2, m, p, pr) => {
1224
- debug("tilde", comp, _2, M2, m, p, pr);
1263
+ const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
1264
+ return comp.replace(r, (_, M, m2, p2, pr) => {
1265
+ debug("tilde", comp, _, M, m2, p2, pr);
1225
1266
  let ret;
1226
- if (isX(M2)) {
1267
+ if (isX(M)) {
1227
1268
  ret = "";
1228
- } else if (isX(m)) {
1229
- ret = `>=${M2}.0.0 <${+M2 + 1}.0.0-0`;
1230
- } else if (isX(p)) {
1231
- ret = `>=${M2}.${m}.0 <${M2}.${+m + 1}.0-0`;
1269
+ } else if (isX(m2)) {
1270
+ ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
1271
+ } else if (isX(p2)) {
1272
+ ret = `>=${M}.${m2}.0 <${M}.${+m2 + 1}.0-0`;
1232
1273
  } else if (pr) {
1233
1274
  debug("replaceTilde pr", pr);
1234
- ret = `>=${M2}.${m}.${p}-${pr} <${M2}.${+m + 1}.0-0`;
1275
+ ret = `>=${M}.${m2}.${p2}-${pr} <${M}.${+m2 + 1}.0-0`;
1235
1276
  } else {
1236
- ret = `>=${M2}.${m}.${p} <${M2}.${+m + 1}.0-0`;
1277
+ ret = `>=${M}.${m2}.${p2} <${M}.${+m2 + 1}.0-0`;
1237
1278
  }
1238
1279
  debug("tilde return", ret);
1239
1280
  return ret;
@@ -1244,42 +1285,42 @@ var require_range = __commonJS({
1244
1285
  };
1245
1286
  var replaceCaret = (comp, options) => {
1246
1287
  debug("caret", comp, options);
1247
- const r = options.loose ? re2[t2.CARETLOOSE] : re2[t2.CARET];
1288
+ const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
1248
1289
  const z3 = options.includePrerelease ? "-0" : "";
1249
- return comp.replace(r, (_2, M2, m, p, pr) => {
1250
- debug("caret", comp, _2, M2, m, p, pr);
1290
+ return comp.replace(r, (_, M, m2, p2, pr) => {
1291
+ debug("caret", comp, _, M, m2, p2, pr);
1251
1292
  let ret;
1252
- if (isX(M2)) {
1293
+ if (isX(M)) {
1253
1294
  ret = "";
1254
- } else if (isX(m)) {
1255
- ret = `>=${M2}.0.0${z3} <${+M2 + 1}.0.0-0`;
1256
- } else if (isX(p)) {
1257
- if (M2 === "0") {
1258
- ret = `>=${M2}.${m}.0${z3} <${M2}.${+m + 1}.0-0`;
1295
+ } else if (isX(m2)) {
1296
+ ret = `>=${M}.0.0${z3} <${+M + 1}.0.0-0`;
1297
+ } else if (isX(p2)) {
1298
+ if (M === "0") {
1299
+ ret = `>=${M}.${m2}.0${z3} <${M}.${+m2 + 1}.0-0`;
1259
1300
  } else {
1260
- ret = `>=${M2}.${m}.0${z3} <${+M2 + 1}.0.0-0`;
1301
+ ret = `>=${M}.${m2}.0${z3} <${+M + 1}.0.0-0`;
1261
1302
  }
1262
1303
  } else if (pr) {
1263
1304
  debug("replaceCaret pr", pr);
1264
- if (M2 === "0") {
1265
- if (m === "0") {
1266
- ret = `>=${M2}.${m}.${p}-${pr} <${M2}.${m}.${+p + 1}-0`;
1305
+ if (M === "0") {
1306
+ if (m2 === "0") {
1307
+ ret = `>=${M}.${m2}.${p2}-${pr} <${M}.${m2}.${+p2 + 1}-0`;
1267
1308
  } else {
1268
- ret = `>=${M2}.${m}.${p}-${pr} <${M2}.${+m + 1}.0-0`;
1309
+ ret = `>=${M}.${m2}.${p2}-${pr} <${M}.${+m2 + 1}.0-0`;
1269
1310
  }
1270
1311
  } else {
1271
- ret = `>=${M2}.${m}.${p}-${pr} <${+M2 + 1}.0.0-0`;
1312
+ ret = `>=${M}.${m2}.${p2}-${pr} <${+M + 1}.0.0-0`;
1272
1313
  }
1273
1314
  } else {
1274
1315
  debug("no pr");
1275
- if (M2 === "0") {
1276
- if (m === "0") {
1277
- ret = `>=${M2}.${m}.${p}${z3} <${M2}.${m}.${+p + 1}-0`;
1316
+ if (M === "0") {
1317
+ if (m2 === "0") {
1318
+ ret = `>=${M}.${m2}.${p2}${z3} <${M}.${m2}.${+p2 + 1}-0`;
1278
1319
  } else {
1279
- ret = `>=${M2}.${m}.${p}${z3} <${M2}.${+m + 1}.0-0`;
1320
+ ret = `>=${M}.${m2}.${p2}${z3} <${M}.${+m2 + 1}.0-0`;
1280
1321
  }
1281
1322
  } else {
1282
- ret = `>=${M2}.${m}.${p} <${+M2 + 1}.0.0-0`;
1323
+ ret = `>=${M}.${m2}.${p2} <${+M + 1}.0.0-0`;
1283
1324
  }
1284
1325
  }
1285
1326
  debug("caret return", ret);
@@ -1292,12 +1333,12 @@ var require_range = __commonJS({
1292
1333
  };
1293
1334
  var replaceXRange = (comp, options) => {
1294
1335
  comp = comp.trim();
1295
- const r = options.loose ? re2[t2.XRANGELOOSE] : re2[t2.XRANGE];
1296
- return comp.replace(r, (ret, gtlt, M2, m, p, pr) => {
1297
- debug("xRange", comp, ret, gtlt, M2, m, p, pr);
1298
- const xM = isX(M2);
1299
- const xm = xM || isX(m);
1300
- const xp = xm || isX(p);
1336
+ const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
1337
+ return comp.replace(r, (ret, gtlt, M, m2, p2, pr) => {
1338
+ debug("xRange", comp, ret, gtlt, M, m2, p2, pr);
1339
+ const xM = isX(M);
1340
+ const xm = xM || isX(m2);
1341
+ const xp = xm || isX(p2);
1301
1342
  const anyX = xp;
1302
1343
  if (gtlt === "=" && anyX) {
1303
1344
  gtlt = "";
@@ -1311,35 +1352,35 @@ var require_range = __commonJS({
1311
1352
  }
1312
1353
  } else if (gtlt && anyX) {
1313
1354
  if (xm) {
1314
- m = 0;
1355
+ m2 = 0;
1315
1356
  }
1316
- p = 0;
1357
+ p2 = 0;
1317
1358
  if (gtlt === ">") {
1318
1359
  gtlt = ">=";
1319
1360
  if (xm) {
1320
- M2 = +M2 + 1;
1321
- m = 0;
1322
- p = 0;
1361
+ M = +M + 1;
1362
+ m2 = 0;
1363
+ p2 = 0;
1323
1364
  } else {
1324
- m = +m + 1;
1325
- p = 0;
1365
+ m2 = +m2 + 1;
1366
+ p2 = 0;
1326
1367
  }
1327
1368
  } else if (gtlt === "<=") {
1328
1369
  gtlt = "<";
1329
1370
  if (xm) {
1330
- M2 = +M2 + 1;
1371
+ M = +M + 1;
1331
1372
  } else {
1332
- m = +m + 1;
1373
+ m2 = +m2 + 1;
1333
1374
  }
1334
1375
  }
1335
1376
  if (gtlt === "<") {
1336
1377
  pr = "-0";
1337
1378
  }
1338
- ret = `${gtlt + M2}.${m}.${p}${pr}`;
1379
+ ret = `${gtlt + M}.${m2}.${p2}${pr}`;
1339
1380
  } else if (xm) {
1340
- ret = `>=${M2}.0.0${pr} <${+M2 + 1}.0.0-0`;
1381
+ ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
1341
1382
  } else if (xp) {
1342
- ret = `>=${M2}.${m}.0${pr} <${M2}.${+m + 1}.0-0`;
1383
+ ret = `>=${M}.${m2}.0${pr} <${M}.${+m2 + 1}.0-0`;
1343
1384
  }
1344
1385
  debug("xRange return", ret);
1345
1386
  return ret;
@@ -1347,11 +1388,11 @@ var require_range = __commonJS({
1347
1388
  };
1348
1389
  var replaceStars = (comp, options) => {
1349
1390
  debug("replaceStars", comp, options);
1350
- return comp.trim().replace(re2[t2.STAR], "");
1391
+ return comp.trim().replace(re[t.STAR], "");
1351
1392
  };
1352
1393
  var replaceGTE0 = (comp, options) => {
1353
1394
  debug("replaceGTE0", comp, options);
1354
- return comp.trim().replace(re2[options.includePrerelease ? t2.GTE0PRE : t2.GTE0], "");
1395
+ return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
1355
1396
  };
1356
1397
  var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
1357
1398
  if (isX(fM)) {
@@ -1437,19 +1478,19 @@ var require_comparator = __commonJS({
1437
1478
  debug("comp", this);
1438
1479
  }
1439
1480
  parse(comp) {
1440
- const r = this.options.loose ? re2[t2.COMPARATORLOOSE] : re2[t2.COMPARATOR];
1441
- const m = comp.match(r);
1442
- if (!m) {
1481
+ const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
1482
+ const m2 = comp.match(r);
1483
+ if (!m2) {
1443
1484
  throw new TypeError(`Invalid comparator: ${comp}`);
1444
1485
  }
1445
- this.operator = m[1] !== void 0 ? m[1] : "";
1486
+ this.operator = m2[1] !== void 0 ? m2[1] : "";
1446
1487
  if (this.operator === "=") {
1447
1488
  this.operator = "";
1448
1489
  }
1449
- if (!m[2]) {
1490
+ if (!m2[2]) {
1450
1491
  this.semver = ANY;
1451
1492
  } else {
1452
- this.semver = new SemVer(m[2], this.options.loose);
1493
+ this.semver = new SemVer(m2[2], this.options.loose);
1453
1494
  }
1454
1495
  }
1455
1496
  toString() {
@@ -1511,7 +1552,7 @@ var require_comparator = __commonJS({
1511
1552
  };
1512
1553
  module.exports = Comparator;
1513
1554
  var parseOptions = require_parse_options();
1514
- var { safeRe: re2, t: t2 } = require_re();
1555
+ var { safeRe: re, t } = require_re();
1515
1556
  var cmp = require_cmp();
1516
1557
  var debug = require_debug();
1517
1558
  var SemVer = require_semver();
@@ -1561,10 +1602,10 @@ var require_max_satisfying = __commonJS({
1561
1602
  } catch (er) {
1562
1603
  return null;
1563
1604
  }
1564
- versions.forEach((v) => {
1565
- if (rangeObj.test(v)) {
1566
- if (!max || maxSV.compare(v) === -1) {
1567
- max = v;
1605
+ versions.forEach((v2) => {
1606
+ if (rangeObj.test(v2)) {
1607
+ if (!max || maxSV.compare(v2) === -1) {
1608
+ max = v2;
1568
1609
  maxSV = new SemVer(max, options);
1569
1610
  }
1570
1611
  }
@@ -1590,10 +1631,10 @@ var require_min_satisfying = __commonJS({
1590
1631
  } catch (er) {
1591
1632
  return null;
1592
1633
  }
1593
- versions.forEach((v) => {
1594
- if (rangeObj.test(v)) {
1595
- if (!min || minSV.compare(v) === 1) {
1596
- min = v;
1634
+ versions.forEach((v2) => {
1635
+ if (rangeObj.test(v2)) {
1636
+ if (!min || minSV.compare(v2) === 1) {
1637
+ min = v2;
1597
1638
  minSV = new SemVer(min, options);
1598
1639
  }
1599
1640
  }
@@ -1610,7 +1651,7 @@ var require_min_version = __commonJS({
1610
1651
  "use strict";
1611
1652
  var SemVer = require_semver();
1612
1653
  var Range = require_range();
1613
- var gt3 = require_gt();
1654
+ var gt2 = require_gt();
1614
1655
  var minVersion = (range, loose) => {
1615
1656
  range = new Range(range, loose);
1616
1657
  let minver = new SemVer("0.0.0");
@@ -1638,7 +1679,7 @@ var require_min_version = __commonJS({
1638
1679
  /* fallthrough */
1639
1680
  case "":
1640
1681
  case ">=":
1641
- if (!setMin || gt3(compver, setMin)) {
1682
+ if (!setMin || gt2(compver, setMin)) {
1642
1683
  setMin = compver;
1643
1684
  }
1644
1685
  break;
@@ -1650,7 +1691,7 @@ var require_min_version = __commonJS({
1650
1691
  throw new Error(`Unexpected operation: ${comparator.operator}`);
1651
1692
  }
1652
1693
  });
1653
- if (setMin && (!minver || gt3(minver, setMin))) {
1694
+ if (setMin && (!minver || gt2(minver, setMin))) {
1654
1695
  minver = setMin;
1655
1696
  }
1656
1697
  }
@@ -1688,7 +1729,7 @@ var require_outside = __commonJS({
1688
1729
  var { ANY } = Comparator;
1689
1730
  var Range = require_range();
1690
1731
  var satisfies = require_satisfies();
1691
- var gt3 = require_gt();
1732
+ var gt2 = require_gt();
1692
1733
  var lt2 = require_lt();
1693
1734
  var lte = require_lte();
1694
1735
  var gte = require_gte();
@@ -1698,7 +1739,7 @@ var require_outside = __commonJS({
1698
1739
  let gtfn, ltefn, ltfn, comp, ecomp;
1699
1740
  switch (hilo) {
1700
1741
  case ">":
1701
- gtfn = gt3;
1742
+ gtfn = gt2;
1702
1743
  ltefn = lte;
1703
1744
  ltfn = lt2;
1704
1745
  comp = ">";
@@ -1707,7 +1748,7 @@ var require_outside = __commonJS({
1707
1748
  case "<":
1708
1749
  gtfn = lt2;
1709
1750
  ltefn = gte;
1710
- ltfn = gt3;
1751
+ ltfn = gt2;
1711
1752
  comp = "<";
1712
1753
  ecomp = "<=";
1713
1754
  break;
@@ -1792,8 +1833,8 @@ var require_simplify = __commonJS({
1792
1833
  const set = [];
1793
1834
  let first = null;
1794
1835
  let prev = null;
1795
- const v = versions.sort((a, b) => compare(a, b, options));
1796
- for (const version of v) {
1836
+ const v2 = versions.sort((a, b2) => compare(a, b2, options));
1837
+ for (const version of v2) {
1797
1838
  const included = satisfies(version, range, options);
1798
1839
  if (included) {
1799
1840
  prev = version;
@@ -1815,11 +1856,11 @@ var require_simplify = __commonJS({
1815
1856
  for (const [min, max] of set) {
1816
1857
  if (min === max) {
1817
1858
  ranges.push(min);
1818
- } else if (!max && min === v[0]) {
1859
+ } else if (!max && min === v2[0]) {
1819
1860
  ranges.push("*");
1820
1861
  } else if (!max) {
1821
1862
  ranges.push(`>=${min}`);
1822
- } else if (min === v[0]) {
1863
+ } else if (min === v2[0]) {
1823
1864
  ranges.push(`<=${max}`);
1824
1865
  } else {
1825
1866
  ranges.push(`${min} - ${max}`);
@@ -1885,10 +1926,10 @@ var require_subset = __commonJS({
1885
1926
  }
1886
1927
  }
1887
1928
  const eqSet = /* @__PURE__ */ new Set();
1888
- let gt3, lt2;
1929
+ let gt2, lt2;
1889
1930
  for (const c of sub) {
1890
1931
  if (c.operator === ">" || c.operator === ">=") {
1891
- gt3 = higherGT(gt3, c, options);
1932
+ gt2 = higherGT(gt2, c, options);
1892
1933
  } else if (c.operator === "<" || c.operator === "<=") {
1893
1934
  lt2 = lowerLT(lt2, c, options);
1894
1935
  } else {
@@ -1899,16 +1940,16 @@ var require_subset = __commonJS({
1899
1940
  return null;
1900
1941
  }
1901
1942
  let gtltComp;
1902
- if (gt3 && lt2) {
1903
- gtltComp = compare(gt3.semver, lt2.semver, options);
1943
+ if (gt2 && lt2) {
1944
+ gtltComp = compare(gt2.semver, lt2.semver, options);
1904
1945
  if (gtltComp > 0) {
1905
1946
  return null;
1906
- } else if (gtltComp === 0 && (gt3.operator !== ">=" || lt2.operator !== "<=")) {
1947
+ } else if (gtltComp === 0 && (gt2.operator !== ">=" || lt2.operator !== "<=")) {
1907
1948
  return null;
1908
1949
  }
1909
1950
  }
1910
1951
  for (const eq of eqSet) {
1911
- if (gt3 && !satisfies(eq, String(gt3), options)) {
1952
+ if (gt2 && !satisfies(eq, String(gt2), options)) {
1912
1953
  return null;
1913
1954
  }
1914
1955
  if (lt2 && !satisfies(eq, String(lt2), options)) {
@@ -1924,25 +1965,25 @@ var require_subset = __commonJS({
1924
1965
  let higher, lower;
1925
1966
  let hasDomLT, hasDomGT;
1926
1967
  let needDomLTPre = lt2 && !options.includePrerelease && lt2.semver.prerelease.length ? lt2.semver : false;
1927
- let needDomGTPre = gt3 && !options.includePrerelease && gt3.semver.prerelease.length ? gt3.semver : false;
1968
+ let needDomGTPre = gt2 && !options.includePrerelease && gt2.semver.prerelease.length ? gt2.semver : false;
1928
1969
  if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt2.operator === "<" && needDomLTPre.prerelease[0] === 0) {
1929
1970
  needDomLTPre = false;
1930
1971
  }
1931
1972
  for (const c of dom) {
1932
1973
  hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
1933
1974
  hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
1934
- if (gt3) {
1975
+ if (gt2) {
1935
1976
  if (needDomGTPre) {
1936
1977
  if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) {
1937
1978
  needDomGTPre = false;
1938
1979
  }
1939
1980
  }
1940
1981
  if (c.operator === ">" || c.operator === ">=") {
1941
- higher = higherGT(gt3, c, options);
1942
- if (higher === c && higher !== gt3) {
1982
+ higher = higherGT(gt2, c, options);
1983
+ if (higher === c && higher !== gt2) {
1943
1984
  return false;
1944
1985
  }
1945
- } else if (gt3.operator === ">=" && !satisfies(gt3.semver, String(c), options)) {
1986
+ } else if (gt2.operator === ">=" && !satisfies(gt2.semver, String(c), options)) {
1946
1987
  return false;
1947
1988
  }
1948
1989
  }
@@ -1961,14 +2002,14 @@ var require_subset = __commonJS({
1961
2002
  return false;
1962
2003
  }
1963
2004
  }
1964
- if (!c.operator && (lt2 || gt3) && gtltComp !== 0) {
2005
+ if (!c.operator && (lt2 || gt2) && gtltComp !== 0) {
1965
2006
  return false;
1966
2007
  }
1967
2008
  }
1968
- if (gt3 && hasDomLT && !lt2 && gtltComp !== 0) {
2009
+ if (gt2 && hasDomLT && !lt2 && gtltComp !== 0) {
1969
2010
  return false;
1970
2011
  }
1971
- if (lt2 && hasDomGT && !gt3 && gtltComp !== 0) {
2012
+ if (lt2 && hasDomGT && !gt2 && gtltComp !== 0) {
1972
2013
  return false;
1973
2014
  }
1974
2015
  if (needDomGTPre || needDomLTPre) {
@@ -1976,19 +2017,19 @@ var require_subset = __commonJS({
1976
2017
  }
1977
2018
  return true;
1978
2019
  };
1979
- var higherGT = (a, b, options) => {
2020
+ var higherGT = (a, b2, options) => {
1980
2021
  if (!a) {
1981
- return b;
2022
+ return b2;
1982
2023
  }
1983
- const comp = compare(a.semver, b.semver, options);
1984
- return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
2024
+ const comp = compare(a.semver, b2.semver, options);
2025
+ return comp > 0 ? a : comp < 0 ? b2 : b2.operator === ">" && a.operator === ">=" ? b2 : a;
1985
2026
  };
1986
- var lowerLT = (a, b, options) => {
2027
+ var lowerLT = (a, b2, options) => {
1987
2028
  if (!a) {
1988
- return b;
2029
+ return b2;
1989
2030
  }
1990
- const comp = compare(a.semver, b.semver, options);
1991
- return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
2031
+ const comp = compare(a.semver, b2.semver, options);
2032
+ return comp < 0 ? a : comp > 0 ? b2 : b2.operator === "<" && a.operator === "<=" ? b2 : a;
1992
2033
  };
1993
2034
  module.exports = subset;
1994
2035
  }
@@ -2017,7 +2058,7 @@ var require_semver2 = __commonJS({
2017
2058
  var compareBuild = require_compare_build();
2018
2059
  var sort = require_sort();
2019
2060
  var rsort = require_rsort();
2020
- var gt3 = require_gt();
2061
+ var gt2 = require_gt();
2021
2062
  var lt2 = require_lt();
2022
2063
  var eq = require_eq();
2023
2064
  var neq = require_neq();
@@ -2025,6 +2066,7 @@ var require_semver2 = __commonJS({
2025
2066
  var lte = require_lte();
2026
2067
  var cmp = require_cmp();
2027
2068
  var coerce = require_coerce();
2069
+ var truncate = require_truncate();
2028
2070
  var Comparator = require_comparator();
2029
2071
  var Range = require_range();
2030
2072
  var satisfies = require_satisfies();
@@ -2055,7 +2097,7 @@ var require_semver2 = __commonJS({
2055
2097
  compareBuild,
2056
2098
  sort,
2057
2099
  rsort,
2058
- gt: gt3,
2100
+ gt: gt2,
2059
2101
  lt: lt2,
2060
2102
  eq,
2061
2103
  neq,
@@ -2063,6 +2105,7 @@ var require_semver2 = __commonJS({
2063
2105
  lte,
2064
2106
  cmp,
2065
2107
  coerce,
2108
+ truncate,
2066
2109
  Comparator,
2067
2110
  Range,
2068
2111
  satisfies,
@@ -2295,8 +2338,8 @@ var require_visit = __commonJS({
2295
2338
  } else if (identity.isDocument(parent)) {
2296
2339
  parent.contents = node;
2297
2340
  } else {
2298
- const pt3 = identity.isAlias(parent) ? "alias" : "scalar";
2299
- throw new Error(`Cannot replace node with ${pt3} parent`);
2341
+ const pt2 = identity.isAlias(parent) ? "alias" : "scalar";
2342
+ throw new Error(`Cannot replace node with ${pt2} parent`);
2300
2343
  }
2301
2344
  }
2302
2345
  exports.visit = visit2;
@@ -2602,7 +2645,7 @@ var require_toJS = __commonJS({
2602
2645
  var identity = require_identity();
2603
2646
  function toJS(value, arg, ctx) {
2604
2647
  if (Array.isArray(value))
2605
- return value.map((v, i) => toJS(v, String(i), ctx));
2648
+ return value.map((v2, i) => toJS(v2, String(i), ctx));
2606
2649
  if (value && typeof value.toJSON === "function") {
2607
2650
  if (!ctx || !identity.hasAnchor(value))
2608
2651
  return value.toJSON(arg, ctx);
@@ -2690,6 +2733,8 @@ var require_Alias = __commonJS({
2690
2733
  * instance of the `source` anchor before this node.
2691
2734
  */
2692
2735
  resolve(doc, ctx) {
2736
+ if (ctx?.maxAliasCount === 0)
2737
+ throw new ReferenceError("Alias resolution is disabled");
2693
2738
  let nodes;
2694
2739
  if (ctx?.aliasResolveCache) {
2695
2740
  nodes = ctx.aliasResolveCache;
@@ -2820,13 +2865,13 @@ var require_createNode = __commonJS({
2820
2865
  var defaultTagPrefix = "tag:yaml.org,2002:";
2821
2866
  function findTagObject(value, tagName, tags) {
2822
2867
  if (tagName) {
2823
- const match = tags.filter((t2) => t2.tag === tagName);
2824
- const tagObj = match.find((t2) => !t2.format) ?? match[0];
2868
+ const match = tags.filter((t) => t.tag === tagName);
2869
+ const tagObj = match.find((t) => !t.format) ?? match[0];
2825
2870
  if (!tagObj)
2826
2871
  throw new Error(`Tag ${tagName} not found`);
2827
2872
  return tagObj;
2828
2873
  }
2829
- return tags.find((t2) => t2.identify?.(value) && !t2.format);
2874
+ return tags.find((t) => t.identify?.(value) && !t.format);
2830
2875
  }
2831
2876
  function createNode(value, tagName, ctx) {
2832
2877
  if (identity.isDocument(value))
@@ -2893,18 +2938,18 @@ var require_Collection = __commonJS({
2893
2938
  var identity = require_identity();
2894
2939
  var Node = require_Node();
2895
2940
  function collectionFromPath(schema, path5, value) {
2896
- let v = value;
2941
+ let v2 = value;
2897
2942
  for (let i = path5.length - 1; i >= 0; --i) {
2898
2943
  const k2 = path5[i];
2899
2944
  if (typeof k2 === "number" && Number.isInteger(k2) && k2 >= 0) {
2900
2945
  const a = [];
2901
- a[k2] = v;
2902
- v = a;
2946
+ a[k2] = v2;
2947
+ v2 = a;
2903
2948
  } else {
2904
- v = /* @__PURE__ */ new Map([[k2, v]]);
2949
+ v2 = /* @__PURE__ */ new Map([[k2, v2]]);
2905
2950
  }
2906
2951
  }
2907
- return createNode.createNode(v, void 0, {
2952
+ return createNode.createNode(v2, void 0, {
2908
2953
  aliasDuplicateObjects: false,
2909
2954
  keepUndefined: false,
2910
2955
  onAnchor: () => {
@@ -2934,7 +2979,7 @@ var require_Collection = __commonJS({
2934
2979
  const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
2935
2980
  if (schema)
2936
2981
  copy.schema = schema;
2937
- copy.items = copy.items.map((it2) => identity.isNode(it2) || identity.isPair(it2) ? it2.clone(schema) : it2);
2982
+ copy.items = copy.items.map((it3) => identity.isNode(it3) || identity.isPair(it3) ? it3.clone(schema) : it3);
2938
2983
  if (this.range)
2939
2984
  copy.range = this.range.slice();
2940
2985
  return copy;
@@ -3453,10 +3498,10 @@ ${indent}`);
3453
3498
  let res = _stringify(type);
3454
3499
  if (res === null) {
3455
3500
  const { defaultKeyType, defaultStringType } = ctx.options;
3456
- const t2 = implicitKey && defaultKeyType || defaultStringType;
3457
- res = _stringify(t2);
3501
+ const t = implicitKey && defaultKeyType || defaultStringType;
3502
+ res = _stringify(t);
3458
3503
  if (res === null)
3459
- throw new Error(`Unsupported default string type ${t2}`);
3504
+ throw new Error(`Unsupported default string type ${t}`);
3460
3505
  }
3461
3506
  return res;
3462
3507
  }
@@ -3516,24 +3561,24 @@ var require_stringify = __commonJS({
3516
3561
  }
3517
3562
  function getTagObject(tags, item) {
3518
3563
  if (item.tag) {
3519
- const match = tags.filter((t2) => t2.tag === item.tag);
3564
+ const match = tags.filter((t) => t.tag === item.tag);
3520
3565
  if (match.length > 0)
3521
- return match.find((t2) => t2.format === item.format) ?? match[0];
3566
+ return match.find((t) => t.format === item.format) ?? match[0];
3522
3567
  }
3523
3568
  let tagObj = void 0;
3524
3569
  let obj;
3525
3570
  if (identity.isScalar(item)) {
3526
3571
  obj = item.value;
3527
- let match = tags.filter((t2) => t2.identify?.(obj));
3572
+ let match = tags.filter((t) => t.identify?.(obj));
3528
3573
  if (match.length > 1) {
3529
- const testMatch = match.filter((t2) => t2.test);
3574
+ const testMatch = match.filter((t) => t.test);
3530
3575
  if (testMatch.length > 0)
3531
3576
  match = testMatch;
3532
3577
  }
3533
- tagObj = match.find((t2) => t2.format === item.format) ?? match.find((t2) => !t2.format);
3578
+ tagObj = match.find((t) => t.format === item.format) ?? match.find((t) => !t.format);
3534
3579
  } else {
3535
3580
  obj = item;
3536
- tagObj = tags.find((t2) => t2.nodeClass && obj instanceof t2.nodeClass);
3581
+ tagObj = tags.find((t) => t.nodeClass && obj instanceof t.nodeClass);
3537
3582
  }
3538
3583
  if (!tagObj) {
3539
3584
  const name = obj?.constructor?.name ?? (obj === null ? "null" : typeof obj);
@@ -3762,18 +3807,18 @@ var require_merge = __commonJS({
3762
3807
  };
3763
3808
  var isMergeKey = (ctx, key) => (merge.identify(key) || identity.isScalar(key) && (!key.type || key.type === Scalar.Scalar.PLAIN) && merge.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge.tag && tag.default);
3764
3809
  function addMergeToJSMap(ctx, map, value) {
3765
- value = ctx && identity.isAlias(value) ? value.resolve(ctx.doc) : value;
3766
- if (identity.isSeq(value))
3767
- for (const it2 of value.items)
3768
- mergeValue(ctx, map, it2);
3769
- else if (Array.isArray(value))
3770
- for (const it2 of value)
3771
- mergeValue(ctx, map, it2);
3810
+ const source = resolveAliasValue(ctx, value);
3811
+ if (identity.isSeq(source))
3812
+ for (const it3 of source.items)
3813
+ mergeValue(ctx, map, it3);
3814
+ else if (Array.isArray(source))
3815
+ for (const it3 of source)
3816
+ mergeValue(ctx, map, it3);
3772
3817
  else
3773
- mergeValue(ctx, map, value);
3818
+ mergeValue(ctx, map, source);
3774
3819
  }
3775
3820
  function mergeValue(ctx, map, value) {
3776
- const source = ctx && identity.isAlias(value) ? value.resolve(ctx.doc) : value;
3821
+ const source = resolveAliasValue(ctx, value);
3777
3822
  if (!identity.isMap(source))
3778
3823
  throw new Error("Merge sources must be maps or map aliases");
3779
3824
  const srcMap = source.toJSON(null, ctx, Map);
@@ -3794,6 +3839,9 @@ var require_merge = __commonJS({
3794
3839
  }
3795
3840
  return map;
3796
3841
  }
3842
+ function resolveAliasValue(ctx, value) {
3843
+ return ctx && identity.isAlias(value) ? value.resolve(ctx.doc, ctx) : value;
3844
+ }
3797
3845
  exports.addMergeToJSMap = addMergeToJSMap;
3798
3846
  exports.isMergeKey = isMergeKey;
3799
3847
  exports.merge = merge;
@@ -3874,8 +3922,8 @@ var require_Pair = __commonJS({
3874
3922
  var identity = require_identity();
3875
3923
  function createPair(key, value, ctx) {
3876
3924
  const k2 = createNode.createNode(key, void 0, ctx);
3877
- const v = createNode.createNode(value, void 0, ctx);
3878
- return new Pair(k2, v);
3925
+ const v2 = createNode.createNode(value, void 0, ctx);
3926
+ return new Pair(k2, v2);
3879
3927
  }
3880
3928
  var Pair = class _Pair {
3881
3929
  constructor(key, value = null) {
@@ -3891,7 +3939,7 @@ var require_Pair = __commonJS({
3891
3939
  value = value.clone(schema);
3892
3940
  return new _Pair(key, value);
3893
3941
  }
3894
- toJSON(_2, ctx) {
3942
+ toJSON(_, ctx) {
3895
3943
  const pair = ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {};
3896
3944
  return addPairToJSMap.addPairToJSMap(ctx, pair, this);
3897
3945
  }
@@ -4067,12 +4115,12 @@ var require_YAMLMap = __commonJS({
4067
4115
  var Scalar = require_Scalar();
4068
4116
  function findPair(items, key) {
4069
4117
  const k2 = identity.isScalar(key) ? key.value : key;
4070
- for (const it2 of items) {
4071
- if (identity.isPair(it2)) {
4072
- if (it2.key === key || it2.key === k2)
4073
- return it2;
4074
- if (identity.isScalar(it2.key) && it2.key.value === k2)
4075
- return it2;
4118
+ for (const it3 of items) {
4119
+ if (identity.isPair(it3)) {
4120
+ if (it3.key === key || it3.key === k2)
4121
+ return it3;
4122
+ if (identity.isScalar(it3.key) && it3.key.value === k2)
4123
+ return it3;
4076
4124
  }
4077
4125
  }
4078
4126
  return void 0;
@@ -4146,15 +4194,15 @@ var require_YAMLMap = __commonJS({
4146
4194
  }
4147
4195
  }
4148
4196
  delete(key) {
4149
- const it2 = findPair(this.items, key);
4150
- if (!it2)
4197
+ const it3 = findPair(this.items, key);
4198
+ if (!it3)
4151
4199
  return false;
4152
- const del = this.items.splice(this.items.indexOf(it2), 1);
4200
+ const del = this.items.splice(this.items.indexOf(it3), 1);
4153
4201
  return del.length > 0;
4154
4202
  }
4155
4203
  get(key, keepScalar) {
4156
- const it2 = findPair(this.items, key);
4157
- const node = it2?.value;
4204
+ const it3 = findPair(this.items, key);
4205
+ const node = it3?.value;
4158
4206
  return (!keepScalar && identity.isScalar(node) ? node.value : node) ?? void 0;
4159
4207
  }
4160
4208
  has(key) {
@@ -4168,7 +4216,7 @@ var require_YAMLMap = __commonJS({
4168
4216
  * @param {Class} Type - If set, forces the returned collection type
4169
4217
  * @returns Instance of Type, Map, or Object
4170
4218
  */
4171
- toJSON(_2, ctx, Type) {
4219
+ toJSON(_, ctx, Type) {
4172
4220
  const map = Type ? new Type() : ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {};
4173
4221
  if (ctx?.onCreate)
4174
4222
  ctx.onCreate(map);
@@ -4261,8 +4309,8 @@ var require_YAMLSeq = __commonJS({
4261
4309
  const idx = asItemIndex(key);
4262
4310
  if (typeof idx !== "number")
4263
4311
  return void 0;
4264
- const it2 = this.items[idx];
4265
- return !keepScalar && identity.isScalar(it2) ? it2.value : it2;
4312
+ const it3 = this.items[idx];
4313
+ return !keepScalar && identity.isScalar(it3) ? it3.value : it3;
4266
4314
  }
4267
4315
  /**
4268
4316
  * Checks if the collection includes a value with the key `key`.
@@ -4291,7 +4339,7 @@ var require_YAMLSeq = __commonJS({
4291
4339
  else
4292
4340
  this.items[idx] = value;
4293
4341
  }
4294
- toJSON(_2, ctx) {
4342
+ toJSON(_, ctx) {
4295
4343
  const seq = [];
4296
4344
  if (ctx?.onCreate)
4297
4345
  ctx.onCreate(seq);
@@ -4316,12 +4364,12 @@ var require_YAMLSeq = __commonJS({
4316
4364
  const seq = new this(schema);
4317
4365
  if (obj && Symbol.iterator in Object(obj)) {
4318
4366
  let i = 0;
4319
- for (let it2 of obj) {
4367
+ for (let it3 of obj) {
4320
4368
  if (typeof replacer === "function") {
4321
- const key = obj instanceof Set ? it2 : String(i++);
4322
- it2 = replacer.call(obj, key, it2);
4369
+ const key = obj instanceof Set ? it3 : String(i++);
4370
+ it3 = replacer.call(obj, key, it3);
4323
4371
  }
4324
- seq.items.push(createNode.createNode(it2, void 0, ctx));
4372
+ seq.items.push(createNode.createNode(it3, void 0, ctx));
4325
4373
  }
4326
4374
  }
4327
4375
  return seq;
@@ -4431,7 +4479,7 @@ var require_stringifyNumber = __commonJS({
4431
4479
  if (!isFinite(num))
4432
4480
  return isNaN(num) ? ".nan" : num < 0 ? "-.inf" : ".inf";
4433
4481
  let n = Object.is(value, -0) ? "-0" : JSON.stringify(value);
4434
- if (!format2 && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") && /^\d/.test(n)) {
4482
+ if (!format2 && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") && /^-?\d/.test(n) && !n.includes("e")) {
4435
4483
  let i = n.indexOf(".");
4436
4484
  if (i < 0) {
4437
4485
  i = n.length;
@@ -4739,26 +4787,26 @@ ${cn.comment}` : item.comment;
4739
4787
  pairs2.tag = "tag:yaml.org,2002:pairs";
4740
4788
  let i = 0;
4741
4789
  if (iterable && Symbol.iterator in Object(iterable))
4742
- for (let it2 of iterable) {
4790
+ for (let it3 of iterable) {
4743
4791
  if (typeof replacer === "function")
4744
- it2 = replacer.call(iterable, String(i++), it2);
4792
+ it3 = replacer.call(iterable, String(i++), it3);
4745
4793
  let key, value;
4746
- if (Array.isArray(it2)) {
4747
- if (it2.length === 2) {
4748
- key = it2[0];
4749
- value = it2[1];
4794
+ if (Array.isArray(it3)) {
4795
+ if (it3.length === 2) {
4796
+ key = it3[0];
4797
+ value = it3[1];
4750
4798
  } else
4751
- throw new TypeError(`Expected [key, value] tuple: ${it2}`);
4752
- } else if (it2 && it2 instanceof Object) {
4753
- const keys = Object.keys(it2);
4799
+ throw new TypeError(`Expected [key, value] tuple: ${it3}`);
4800
+ } else if (it3 && it3 instanceof Object) {
4801
+ const keys = Object.keys(it3);
4754
4802
  if (keys.length === 1) {
4755
4803
  key = keys[0];
4756
- value = it2[key];
4804
+ value = it3[key];
4757
4805
  } else {
4758
4806
  throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
4759
4807
  }
4760
4808
  } else {
4761
- key = it2;
4809
+ key = it3;
4762
4810
  }
4763
4811
  pairs2.items.push(Pair.createPair(key, value, ctx));
4764
4812
  }
@@ -4800,9 +4848,9 @@ var require_omap = __commonJS({
4800
4848
  * If `ctx` is given, the return type is actually `Map<unknown, unknown>`,
4801
4849
  * but TypeScript won't allow widening the signature of a child method.
4802
4850
  */
4803
- toJSON(_2, ctx) {
4851
+ toJSON(_, ctx) {
4804
4852
  if (!ctx)
4805
- return super.toJSON(_2);
4853
+ return super.toJSON(_);
4806
4854
  const map = /* @__PURE__ */ new Map();
4807
4855
  if (ctx?.onCreate)
4808
4856
  ctx.onCreate(map);
@@ -4922,9 +4970,9 @@ var require_float2 = __commonJS({
4922
4970
  const node = new Scalar.Scalar(parseFloat(str.replace(/_/g, "")));
4923
4971
  const dot = str.indexOf(".");
4924
4972
  if (dot !== -1) {
4925
- const f = str.substring(dot + 1).replace(/_/g, "");
4926
- if (f[f.length - 1] === "0")
4927
- node.minFractionDigits = f.length;
4973
+ const f2 = str.substring(dot + 1).replace(/_/g, "");
4974
+ if (f2[f2.length - 1] === "0")
4975
+ node.minFractionDigits = f2.length;
4928
4976
  }
4929
4977
  return node;
4930
4978
  },
@@ -5057,8 +5105,8 @@ var require_set = __commonJS({
5057
5105
  this.items.push(new Pair.Pair(key));
5058
5106
  }
5059
5107
  }
5060
- toJSON(_2, ctx) {
5061
- return super.toJSON(_2, ctx, Set);
5108
+ toJSON(_, ctx) {
5109
+ return super.toJSON(_, ctx, Set);
5062
5110
  }
5063
5111
  toString(ctx, onComment, onChompKeep) {
5064
5112
  if (!ctx)
@@ -5113,7 +5161,7 @@ var require_timestamp = __commonJS({
5113
5161
  const sign = str[0];
5114
5162
  const parts = sign === "-" || sign === "+" ? str.substring(1) : str;
5115
5163
  const num = (n) => asBigInt ? BigInt(n) : Number(n);
5116
- const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 * num(60) + num(p), num(0));
5164
+ const res = parts.replace(/_/g, "").split(":").reduce((res2, p2) => res2 * num(60) + num(p2), num(0));
5117
5165
  return sign === "-" ? num(-1) * res : res;
5118
5166
  }
5119
5167
  function stringifySexagesimal(node) {
@@ -5339,7 +5387,7 @@ var require_Schema = __commonJS({
5339
5387
  var seq = require_seq();
5340
5388
  var string = require_string();
5341
5389
  var tags = require_tags();
5342
- var sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
5390
+ var sortMapEntriesByKey = (a, b2) => a.key < b2.key ? -1 : a.key > b2.key ? 1 : 0;
5343
5391
  var Schema = class _Schema {
5344
5392
  constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
5345
5393
  this.compat = Array.isArray(compat) ? tags.getTags(compat, "compat") : compat ? tags.getTags(null, compat) : null;
@@ -5547,7 +5595,7 @@ var require_Document = __commonJS({
5547
5595
  value = replacer.call({ "": value }, "", value);
5548
5596
  _replacer = replacer;
5549
5597
  } else if (Array.isArray(replacer)) {
5550
- const keyToStr = (v) => typeof v === "number" || v instanceof String || v instanceof Number;
5598
+ const keyToStr = (v2) => typeof v2 === "number" || v2 instanceof String || v2 instanceof Number;
5551
5599
  const asStr = replacer.filter(keyToStr).map(String);
5552
5600
  if (asStr.length > 0)
5553
5601
  replacer = replacer.concat(asStr);
@@ -5583,8 +5631,8 @@ var require_Document = __commonJS({
5583
5631
  */
5584
5632
  createPair(key, value, options = {}) {
5585
5633
  const k2 = this.createNode(key, null, options);
5586
- const v = this.createNode(value, null, options);
5587
- return new Pair.Pair(k2, v);
5634
+ const v2 = this.createNode(value, null, options);
5635
+ return new Pair.Pair(k2, v2);
5588
5636
  }
5589
5637
  /**
5590
5638
  * Removes a value from the document.
@@ -5971,16 +6019,16 @@ var require_util_contains_newline = __commonJS({
5971
6019
  }
5972
6020
  return false;
5973
6021
  case "flow-collection":
5974
- for (const it2 of key.items) {
5975
- for (const st2 of it2.start)
6022
+ for (const it3 of key.items) {
6023
+ for (const st2 of it3.start)
5976
6024
  if (st2.type === "newline")
5977
6025
  return true;
5978
- if (it2.sep) {
5979
- for (const st2 of it2.sep)
6026
+ if (it3.sep) {
6027
+ for (const st2 of it3.sep)
5980
6028
  if (st2.type === "newline")
5981
6029
  return true;
5982
6030
  }
5983
- if (containsNewline(it2.key) || containsNewline(it2.value))
6031
+ if (containsNewline(it3.key) || containsNewline(it3.value))
5984
6032
  return true;
5985
6033
  }
5986
6034
  return false;
@@ -6019,7 +6067,7 @@ var require_util_map_includes = __commonJS({
6019
6067
  const { uniqueKeys } = ctx.options;
6020
6068
  if (uniqueKeys === false)
6021
6069
  return false;
6022
- const isEqual = typeof uniqueKeys === "function" ? uniqueKeys : (a, b) => a === b || identity.isScalar(a) && identity.isScalar(b) && a.value === b.value;
6070
+ const isEqual = typeof uniqueKeys === "function" ? uniqueKeys : (a, b2) => a === b2 || identity.isScalar(a) && identity.isScalar(b2) && a.value === b2.value;
6023
6071
  return items.some((pair) => isEqual(pair.key, search));
6024
6072
  }
6025
6073
  exports.mapIncludes = mapIncludes;
@@ -6393,16 +6441,16 @@ var require_resolve_flow_collection = __commonJS({
6393
6441
  }
6394
6442
  }
6395
6443
  const expectedEnd = isMap2 ? "}" : "]";
6396
- const [ce2, ...ee2] = fc.end;
6444
+ const [ce, ...ee2] = fc.end;
6397
6445
  let cePos = offset;
6398
- if (ce2?.source === expectedEnd)
6399
- cePos = ce2.offset + ce2.source.length;
6446
+ if (ce?.source === expectedEnd)
6447
+ cePos = ce.offset + ce.source.length;
6400
6448
  else {
6401
6449
  const name = fcName[0].toUpperCase() + fcName.substring(1);
6402
6450
  const msg = atRoot ? `${name} must end with a ${expectedEnd}` : `${name} in block collection must be sufficiently indented and end with a ${expectedEnd}`;
6403
6451
  onError(offset, atRoot ? "MISSING_CHAR" : "BAD_INDENT", msg);
6404
- if (ce2 && ce2.source.length !== 1)
6405
- ee2.unshift(ce2);
6452
+ if (ce && ce.source.length !== 1)
6453
+ ee2.unshift(ce);
6406
6454
  }
6407
6455
  if (ee2.length > 0) {
6408
6456
  const end = resolveEnd.resolveEnd(ee2, cePos, ctx.options.strict, onError);
@@ -6459,15 +6507,15 @@ var require_compose_collection = __commonJS({
6459
6507
  if (!tagToken || !tagName || tagName === "!" || tagName === YAMLMap.YAMLMap.tagName && expType === "map" || tagName === YAMLSeq.YAMLSeq.tagName && expType === "seq") {
6460
6508
  return resolveCollection(CN, ctx, token, onError, tagName);
6461
6509
  }
6462
- let tag = ctx.schema.tags.find((t2) => t2.tag === tagName && t2.collection === expType);
6510
+ let tag = ctx.schema.tags.find((t) => t.tag === tagName && t.collection === expType);
6463
6511
  if (!tag) {
6464
- const kt3 = ctx.schema.knownTags[tagName];
6465
- if (kt3?.collection === expType) {
6466
- ctx.schema.tags.push(Object.assign({}, kt3, { default: false }));
6467
- tag = kt3;
6512
+ const kt = ctx.schema.knownTags[tagName];
6513
+ if (kt?.collection === expType) {
6514
+ ctx.schema.tags.push(Object.assign({}, kt, { default: false }));
6515
+ tag = kt;
6468
6516
  } else {
6469
- if (kt3) {
6470
- onError(tagToken, "BAD_COLLECTION_TYPE", `${kt3.tag} used for ${expType} collection, but expects ${kt3.collection ?? "scalar"}`, true);
6517
+ if (kt) {
6518
+ onError(tagToken, "BAD_COLLECTION_TYPE", `${kt.tag} used for ${expType} collection, but expects ${kt.collection ?? "scalar"}`, true);
6471
6519
  } else {
6472
6520
  onError(tagToken, "TAG_RESOLVE_FAILED", `Unresolved tag: ${tagName}`, true);
6473
6521
  }
@@ -6659,8 +6707,8 @@ var require_resolve_block_scalar = __commonJS({
6659
6707
  function splitLines(source) {
6660
6708
  const split = source.split(/\n( *)/);
6661
6709
  const first = split[0];
6662
- const m = first.match(/^( *)/);
6663
- const line0 = m?.[1] ? [m[1], first.slice(m[1].length)] : ["", first];
6710
+ const m2 = first.match(/^( *)/);
6711
+ const line0 = m2?.[1] ? [m2[1], first.slice(m2[1].length)] : ["", first];
6664
6712
  const lines = [line0];
6665
6713
  for (let i = 1; i < split.length; i += 2)
6666
6714
  lines.push([split[i], split[i + 1]]);
@@ -6705,12 +6753,12 @@ var require_resolve_flow_scalar = __commonJS({
6705
6753
  };
6706
6754
  }
6707
6755
  const valueEnd = offset + source.length;
6708
- const re2 = resolveEnd.resolveEnd(end, valueEnd, strict, onError);
6756
+ const re = resolveEnd.resolveEnd(end, valueEnd, strict, onError);
6709
6757
  return {
6710
6758
  value,
6711
6759
  type: _type,
6712
- comment: re2.comment,
6713
- range: [offset, valueEnd, re2.offset]
6760
+ comment: re.comment,
6761
+ range: [offset, valueEnd, re.offset]
6714
6762
  };
6715
6763
  }
6716
6764
  function plainValue(source, onError) {
@@ -6803,7 +6851,7 @@ var require_resolve_flow_scalar = __commonJS({
6803
6851
  while (next === " " || next === " ")
6804
6852
  next = source[++i + 1];
6805
6853
  } else if (next === "x" || next === "u" || next === "U") {
6806
- const length = { x: 2, u: 4, U: 8 }[next];
6854
+ const length = next === "x" ? 2 : next === "u" ? 4 : 8;
6807
6855
  res += parseCharCode(source, i + 1, length, onError);
6808
6856
  i += length;
6809
6857
  } else {
@@ -6878,12 +6926,13 @@ var require_resolve_flow_scalar = __commonJS({
6878
6926
  const cc = source.substr(offset, length);
6879
6927
  const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);
6880
6928
  const code = ok ? parseInt(cc, 16) : NaN;
6881
- if (isNaN(code)) {
6929
+ try {
6930
+ return String.fromCodePoint(code);
6931
+ } catch {
6882
6932
  const raw = source.substr(offset - 2, length + 2);
6883
6933
  onError(offset - 2, "BAD_DQ_ESCAPE", `Invalid escape sequence ${raw}`);
6884
6934
  return raw;
6885
6935
  }
6886
- return String.fromCodePoint(code);
6887
6936
  }
6888
6937
  exports.resolveFlowScalar = resolveFlowScalar;
6889
6938
  }
@@ -6945,10 +6994,10 @@ var require_compose_scalar = __commonJS({
6945
6994
  for (const tag of matchWithTest)
6946
6995
  if (tag.test?.test(value))
6947
6996
  return tag;
6948
- const kt3 = schema.knownTags[tagName];
6949
- if (kt3 && !kt3.collection) {
6950
- schema.tags.push(Object.assign({}, kt3, { default: false, test: void 0 }));
6951
- return kt3;
6997
+ const kt = schema.knownTags[tagName];
6998
+ if (kt && !kt.collection) {
6999
+ schema.tags.push(Object.assign({}, kt, { default: false, test: void 0 }));
7000
+ return kt;
6952
7001
  }
6953
7002
  onError(tagToken, "TAG_RESOLVE_FAILED", `Unresolved tag: ${tagName}`, tagName !== "tag:yaml.org,2002:str");
6954
7003
  return schema[identity.SCALAR];
@@ -7095,10 +7144,10 @@ var require_compose_node = __commonJS({
7095
7144
  if (alias.source.endsWith(":"))
7096
7145
  onError(offset + source.length - 1, "BAD_ALIAS", "Alias ending in : is ambiguous", true);
7097
7146
  const valueEnd = offset + source.length;
7098
- const re2 = resolveEnd.resolveEnd(end, valueEnd, options.strict, onError);
7099
- alias.range = [offset, valueEnd, re2.offset];
7100
- if (re2.comment)
7101
- alias.comment = re2.comment;
7147
+ const re = resolveEnd.resolveEnd(end, valueEnd, options.strict, onError);
7148
+ alias.range = [offset, valueEnd, re.offset];
7149
+ if (re.comment)
7150
+ alias.comment = re.comment;
7102
7151
  return alias;
7103
7152
  }
7104
7153
  exports.composeEmptyNode = composeEmptyNode;
@@ -7139,10 +7188,10 @@ var require_compose_doc = __commonJS({
7139
7188
  }
7140
7189
  doc.contents = value ? composeNode.composeNode(ctx, value, props, onError) : composeNode.composeEmptyNode(ctx, props.end, start, null, props, onError);
7141
7190
  const contentEnd = doc.contents.range[2];
7142
- const re2 = resolveEnd.resolveEnd(end, contentEnd, false, onError);
7143
- if (re2.comment)
7144
- doc.comment = re2.comment;
7145
- doc.range = [offset, contentEnd, re2.offset];
7191
+ const re = resolveEnd.resolveEnd(end, contentEnd, false, onError);
7192
+ if (re.comment)
7193
+ doc.comment = re.comment;
7194
+ doc.range = [offset, contentEnd, re.offset];
7146
7195
  return doc;
7147
7196
  }
7148
7197
  exports.composeDoc = composeDoc;
@@ -7220,11 +7269,11 @@ ${comment}` : comment;
7220
7269
  } else if (afterEmptyLine || doc.directives.docStart || !dc) {
7221
7270
  doc.commentBefore = comment;
7222
7271
  } else if (identity.isCollection(dc) && !dc.flow && dc.items.length > 0) {
7223
- let it2 = dc.items[0];
7224
- if (identity.isPair(it2))
7225
- it2 = it2.key;
7226
- const cb = it2.commentBefore;
7227
- it2.commentBefore = cb ? `${comment}
7272
+ let it3 = dc.items[0];
7273
+ if (identity.isPair(it3))
7274
+ it3 = it3.key;
7275
+ const cb = it3.commentBefore;
7276
+ it3.commentBefore = cb ? `${comment}
7228
7277
  ${cb}` : comment;
7229
7278
  } else {
7230
7279
  const cb = dc.commentBefore;
@@ -7233,8 +7282,10 @@ ${cb}` : comment;
7233
7282
  }
7234
7283
  }
7235
7284
  if (afterDoc) {
7236
- Array.prototype.push.apply(doc.errors, this.errors);
7237
- Array.prototype.push.apply(doc.warnings, this.warnings);
7285
+ for (let i = 0; i < this.errors.length; ++i)
7286
+ doc.errors.push(this.errors[i]);
7287
+ for (let i = 0; i < this.warnings.length; ++i)
7288
+ doc.warnings.push(this.warnings[i]);
7238
7289
  } else {
7239
7290
  doc.errors = this.errors;
7240
7291
  doc.warnings = this.warnings;
@@ -7397,9 +7448,9 @@ var require_cst_scalar = __commonJS({
7397
7448
  switch (source[0]) {
7398
7449
  case "|":
7399
7450
  case ">": {
7400
- const he2 = source.indexOf("\n");
7401
- const head = source.substring(0, he2);
7402
- const body = source.substring(he2 + 1) + "\n";
7451
+ const he = source.indexOf("\n");
7452
+ const head = source.substring(0, he);
7453
+ const body = source.substring(he + 1) + "\n";
7403
7454
  const props = [
7404
7455
  { type: "block-scalar-header", offset, indent, source: head }
7405
7456
  ];
@@ -7460,9 +7511,9 @@ var require_cst_scalar = __commonJS({
7460
7511
  }
7461
7512
  }
7462
7513
  function setBlockScalarValue(token, source) {
7463
- const he2 = source.indexOf("\n");
7464
- const head = source.substring(0, he2);
7465
- const body = source.substring(he2 + 1) + "\n";
7514
+ const he = source.indexOf("\n");
7515
+ const head = source.substring(0, he);
7516
+ const body = source.substring(he + 1) + "\n";
7466
7517
  if (token.type === "block-scalar") {
7467
7518
  const header = token.props[0];
7468
7519
  if (header.type !== "block-scalar-header")
@@ -7847,8 +7898,8 @@ var require_lexer = __commonJS({
7847
7898
  return ch === "\n" || indent >= this.indentNext || !ch && !this.atEnd ? offset + indent : -1;
7848
7899
  }
7849
7900
  if (ch === "-" || ch === ".") {
7850
- const dt3 = this.buffer.substr(offset, 3);
7851
- if ((dt3 === "---" || dt3 === "...") && isEmpty(this.buffer[offset + 3]))
7901
+ const dt2 = this.buffer.substr(offset, 3);
7902
+ if ((dt2 === "---" || dt2 === "...") && isEmpty(this.buffer[offset + 3]))
7852
7903
  return -1;
7853
7904
  }
7854
7905
  return offset;
@@ -7967,7 +8018,7 @@ var require_lexer = __commonJS({
7967
8018
  const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true));
7968
8019
  this.indentNext = this.indentValue + 1;
7969
8020
  this.indentValue += n;
7970
- return yield* this.parseBlockStart();
8021
+ return "block-start";
7971
8022
  }
7972
8023
  return "doc";
7973
8024
  }
@@ -8266,28 +8317,38 @@ var require_lexer = __commonJS({
8266
8317
  return 0;
8267
8318
  }
8268
8319
  *pushIndicators() {
8269
- switch (this.charAt(0)) {
8270
- case "!":
8271
- return (yield* this.pushTag()) + (yield* this.pushSpaces(true)) + (yield* this.pushIndicators());
8272
- case "&":
8273
- return (yield* this.pushUntil(isNotAnchorChar)) + (yield* this.pushSpaces(true)) + (yield* this.pushIndicators());
8274
- case "-":
8275
- // this is an error
8276
- case "?":
8277
- // this is an error outside flow collections
8278
- case ":": {
8279
- const inFlow = this.flowLevel > 0;
8280
- const ch1 = this.charAt(1);
8281
- if (isEmpty(ch1) || inFlow && flowIndicatorChars.has(ch1)) {
8282
- if (!inFlow)
8283
- this.indentNext = this.indentValue + 1;
8284
- else if (this.flowKey)
8285
- this.flowKey = false;
8286
- return (yield* this.pushCount(1)) + (yield* this.pushSpaces(true)) + (yield* this.pushIndicators());
8320
+ let n = 0;
8321
+ loop: while (true) {
8322
+ switch (this.charAt(0)) {
8323
+ case "!":
8324
+ n += yield* this.pushTag();
8325
+ n += yield* this.pushSpaces(true);
8326
+ continue loop;
8327
+ case "&":
8328
+ n += yield* this.pushUntil(isNotAnchorChar);
8329
+ n += yield* this.pushSpaces(true);
8330
+ continue loop;
8331
+ case "-":
8332
+ // this is an error
8333
+ case "?":
8334
+ // this is an error outside flow collections
8335
+ case ":": {
8336
+ const inFlow = this.flowLevel > 0;
8337
+ const ch1 = this.charAt(1);
8338
+ if (isEmpty(ch1) || inFlow && flowIndicatorChars.has(ch1)) {
8339
+ if (!inFlow)
8340
+ this.indentNext = this.indentValue + 1;
8341
+ else if (this.flowKey)
8342
+ this.flowKey = false;
8343
+ n += yield* this.pushCount(1);
8344
+ n += yield* this.pushSpaces(true);
8345
+ continue loop;
8346
+ }
8287
8347
  }
8288
8348
  }
8349
+ break loop;
8289
8350
  }
8290
- return 0;
8351
+ return n;
8291
8352
  }
8292
8353
  *pushTag() {
8293
8354
  if (this.charAt(1) === "<") {
@@ -8418,8 +8479,8 @@ var require_parser = __commonJS({
8418
8479
  case "document":
8419
8480
  return parent.start;
8420
8481
  case "block-map": {
8421
- const it2 = parent.items[parent.items.length - 1];
8422
- return it2.sep ?? it2.start;
8482
+ const it3 = parent.items[parent.items.length - 1];
8483
+ return it3.sep ?? it3.start;
8423
8484
  }
8424
8485
  case "block-seq":
8425
8486
  return parent.items[parent.items.length - 1].start;
@@ -8446,21 +8507,28 @@ var require_parser = __commonJS({
8446
8507
  }
8447
8508
  return prev.splice(i, prev.length);
8448
8509
  }
8510
+ function arrayPushArray(target, source) {
8511
+ if (source.length < 1e5)
8512
+ Array.prototype.push.apply(target, source);
8513
+ else
8514
+ for (let i = 0; i < source.length; ++i)
8515
+ target.push(source[i]);
8516
+ }
8449
8517
  function fixFlowSeqItems(fc) {
8450
8518
  if (fc.start.type === "flow-seq-start") {
8451
- for (const it2 of fc.items) {
8452
- if (it2.sep && !it2.value && !includesToken(it2.start, "explicit-key-ind") && !includesToken(it2.sep, "map-value-ind")) {
8453
- if (it2.key)
8454
- it2.value = it2.key;
8455
- delete it2.key;
8456
- if (isFlowToken(it2.value)) {
8457
- if (it2.value.end)
8458
- Array.prototype.push.apply(it2.value.end, it2.sep);
8519
+ for (const it3 of fc.items) {
8520
+ if (it3.sep && !it3.value && !includesToken(it3.start, "explicit-key-ind") && !includesToken(it3.sep, "map-value-ind")) {
8521
+ if (it3.key)
8522
+ it3.value = it3.key;
8523
+ delete it3.key;
8524
+ if (isFlowToken(it3.value)) {
8525
+ if (it3.value.end)
8526
+ arrayPushArray(it3.value.end, it3.sep);
8459
8527
  else
8460
- it2.value.end = it2.sep;
8528
+ it3.value.end = it3.sep;
8461
8529
  } else
8462
- Array.prototype.push.apply(it2.start, it2.sep);
8463
- delete it2.sep;
8530
+ arrayPushArray(it3.start, it3.sep);
8531
+ delete it3.sep;
8464
8532
  }
8465
8533
  }
8466
8534
  }
@@ -8625,36 +8693,36 @@ var require_parser = __commonJS({
8625
8693
  top.props.push(token);
8626
8694
  break;
8627
8695
  case "block-map": {
8628
- const it2 = top.items[top.items.length - 1];
8629
- if (it2.value) {
8696
+ const it3 = top.items[top.items.length - 1];
8697
+ if (it3.value) {
8630
8698
  top.items.push({ start: [], key: token, sep: [] });
8631
8699
  this.onKeyLine = true;
8632
8700
  return;
8633
- } else if (it2.sep) {
8634
- it2.value = token;
8701
+ } else if (it3.sep) {
8702
+ it3.value = token;
8635
8703
  } else {
8636
- Object.assign(it2, { key: token, sep: [] });
8637
- this.onKeyLine = !it2.explicitKey;
8704
+ Object.assign(it3, { key: token, sep: [] });
8705
+ this.onKeyLine = !it3.explicitKey;
8638
8706
  return;
8639
8707
  }
8640
8708
  break;
8641
8709
  }
8642
8710
  case "block-seq": {
8643
- const it2 = top.items[top.items.length - 1];
8644
- if (it2.value)
8711
+ const it3 = top.items[top.items.length - 1];
8712
+ if (it3.value)
8645
8713
  top.items.push({ start: [], value: token });
8646
8714
  else
8647
- it2.value = token;
8715
+ it3.value = token;
8648
8716
  break;
8649
8717
  }
8650
8718
  case "flow-collection": {
8651
- const it2 = top.items[top.items.length - 1];
8652
- if (!it2 || it2.value)
8719
+ const it3 = top.items[top.items.length - 1];
8720
+ if (!it3 || it3.value)
8653
8721
  top.items.push({ start: [], key: token, sep: [] });
8654
- else if (it2.sep)
8655
- it2.value = token;
8722
+ else if (it3.sep)
8723
+ it3.value = token;
8656
8724
  else
8657
- Object.assign(it2, { key: token, sep: [] });
8725
+ Object.assign(it3, { key: token, sep: [] });
8658
8726
  return;
8659
8727
  }
8660
8728
  /* istanbul ignore next should not happen */
@@ -8786,52 +8854,52 @@ var require_parser = __commonJS({
8786
8854
  }
8787
8855
  }
8788
8856
  *blockMap(map) {
8789
- const it2 = map.items[map.items.length - 1];
8857
+ const it3 = map.items[map.items.length - 1];
8790
8858
  switch (this.type) {
8791
8859
  case "newline":
8792
8860
  this.onKeyLine = false;
8793
- if (it2.value) {
8794
- const end = "end" in it2.value ? it2.value.end : void 0;
8861
+ if (it3.value) {
8862
+ const end = "end" in it3.value ? it3.value.end : void 0;
8795
8863
  const last = Array.isArray(end) ? end[end.length - 1] : void 0;
8796
8864
  if (last?.type === "comment")
8797
8865
  end?.push(this.sourceToken);
8798
8866
  else
8799
8867
  map.items.push({ start: [this.sourceToken] });
8800
- } else if (it2.sep) {
8801
- it2.sep.push(this.sourceToken);
8868
+ } else if (it3.sep) {
8869
+ it3.sep.push(this.sourceToken);
8802
8870
  } else {
8803
- it2.start.push(this.sourceToken);
8871
+ it3.start.push(this.sourceToken);
8804
8872
  }
8805
8873
  return;
8806
8874
  case "space":
8807
8875
  case "comment":
8808
- if (it2.value) {
8876
+ if (it3.value) {
8809
8877
  map.items.push({ start: [this.sourceToken] });
8810
- } else if (it2.sep) {
8811
- it2.sep.push(this.sourceToken);
8878
+ } else if (it3.sep) {
8879
+ it3.sep.push(this.sourceToken);
8812
8880
  } else {
8813
- if (this.atIndentedComment(it2.start, map.indent)) {
8881
+ if (this.atIndentedComment(it3.start, map.indent)) {
8814
8882
  const prev = map.items[map.items.length - 2];
8815
8883
  const end = prev?.value?.end;
8816
8884
  if (Array.isArray(end)) {
8817
- Array.prototype.push.apply(end, it2.start);
8885
+ arrayPushArray(end, it3.start);
8818
8886
  end.push(this.sourceToken);
8819
8887
  map.items.pop();
8820
8888
  return;
8821
8889
  }
8822
8890
  }
8823
- it2.start.push(this.sourceToken);
8891
+ it3.start.push(this.sourceToken);
8824
8892
  }
8825
8893
  return;
8826
8894
  }
8827
8895
  if (this.indent >= map.indent) {
8828
8896
  const atMapIndent = !this.onKeyLine && this.indent === map.indent;
8829
- const atNextItem = atMapIndent && (it2.sep || it2.explicitKey) && this.type !== "seq-item-ind";
8897
+ const atNextItem = atMapIndent && (it3.sep || it3.explicitKey) && this.type !== "seq-item-ind";
8830
8898
  let start = [];
8831
- if (atNextItem && it2.sep && !it2.value) {
8899
+ if (atNextItem && it3.sep && !it3.value) {
8832
8900
  const nl = [];
8833
- for (let i = 0; i < it2.sep.length; ++i) {
8834
- const st2 = it2.sep[i];
8901
+ for (let i = 0; i < it3.sep.length; ++i) {
8902
+ const st2 = it3.sep[i];
8835
8903
  switch (st2.type) {
8836
8904
  case "newline":
8837
8905
  nl.push(i);
@@ -8847,26 +8915,26 @@ var require_parser = __commonJS({
8847
8915
  }
8848
8916
  }
8849
8917
  if (nl.length >= 2)
8850
- start = it2.sep.splice(nl[1]);
8918
+ start = it3.sep.splice(nl[1]);
8851
8919
  }
8852
8920
  switch (this.type) {
8853
8921
  case "anchor":
8854
8922
  case "tag":
8855
- if (atNextItem || it2.value) {
8923
+ if (atNextItem || it3.value) {
8856
8924
  start.push(this.sourceToken);
8857
8925
  map.items.push({ start });
8858
8926
  this.onKeyLine = true;
8859
- } else if (it2.sep) {
8860
- it2.sep.push(this.sourceToken);
8927
+ } else if (it3.sep) {
8928
+ it3.sep.push(this.sourceToken);
8861
8929
  } else {
8862
- it2.start.push(this.sourceToken);
8930
+ it3.start.push(this.sourceToken);
8863
8931
  }
8864
8932
  return;
8865
8933
  case "explicit-key-ind":
8866
- if (!it2.sep && !it2.explicitKey) {
8867
- it2.start.push(this.sourceToken);
8868
- it2.explicitKey = true;
8869
- } else if (atNextItem || it2.value) {
8934
+ if (!it3.sep && !it3.explicitKey) {
8935
+ it3.start.push(this.sourceToken);
8936
+ it3.explicitKey = true;
8937
+ } else if (atNextItem || it3.value) {
8870
8938
  start.push(this.sourceToken);
8871
8939
  map.items.push({ start, explicitKey: true });
8872
8940
  } else {
@@ -8880,12 +8948,12 @@ var require_parser = __commonJS({
8880
8948
  this.onKeyLine = true;
8881
8949
  return;
8882
8950
  case "map-value-ind":
8883
- if (it2.explicitKey) {
8884
- if (!it2.sep) {
8885
- if (includesToken(it2.start, "newline")) {
8886
- Object.assign(it2, { key: null, sep: [this.sourceToken] });
8951
+ if (it3.explicitKey) {
8952
+ if (!it3.sep) {
8953
+ if (includesToken(it3.start, "newline")) {
8954
+ Object.assign(it3, { key: null, sep: [this.sourceToken] });
8887
8955
  } else {
8888
- const start2 = getFirstKeyStartProps(it2.start);
8956
+ const start2 = getFirstKeyStartProps(it3.start);
8889
8957
  this.stack.push({
8890
8958
  type: "block-map",
8891
8959
  offset: this.offset,
@@ -8893,22 +8961,22 @@ var require_parser = __commonJS({
8893
8961
  items: [{ start: start2, key: null, sep: [this.sourceToken] }]
8894
8962
  });
8895
8963
  }
8896
- } else if (it2.value) {
8964
+ } else if (it3.value) {
8897
8965
  map.items.push({ start: [], key: null, sep: [this.sourceToken] });
8898
- } else if (includesToken(it2.sep, "map-value-ind")) {
8966
+ } else if (includesToken(it3.sep, "map-value-ind")) {
8899
8967
  this.stack.push({
8900
8968
  type: "block-map",
8901
8969
  offset: this.offset,
8902
8970
  indent: this.indent,
8903
8971
  items: [{ start, key: null, sep: [this.sourceToken] }]
8904
8972
  });
8905
- } else if (isFlowToken(it2.key) && !includesToken(it2.sep, "newline")) {
8906
- const start2 = getFirstKeyStartProps(it2.start);
8907
- const key = it2.key;
8908
- const sep3 = it2.sep;
8973
+ } else if (isFlowToken(it3.key) && !includesToken(it3.sep, "newline")) {
8974
+ const start2 = getFirstKeyStartProps(it3.start);
8975
+ const key = it3.key;
8976
+ const sep3 = it3.sep;
8909
8977
  sep3.push(this.sourceToken);
8910
- delete it2.key;
8911
- delete it2.sep;
8978
+ delete it3.key;
8979
+ delete it3.sep;
8912
8980
  this.stack.push({
8913
8981
  type: "block-map",
8914
8982
  offset: this.offset,
@@ -8916,16 +8984,16 @@ var require_parser = __commonJS({
8916
8984
  items: [{ start: start2, key, sep: sep3 }]
8917
8985
  });
8918
8986
  } else if (start.length > 0) {
8919
- it2.sep = it2.sep.concat(start, this.sourceToken);
8987
+ it3.sep = it3.sep.concat(start, this.sourceToken);
8920
8988
  } else {
8921
- it2.sep.push(this.sourceToken);
8989
+ it3.sep.push(this.sourceToken);
8922
8990
  }
8923
8991
  } else {
8924
- if (!it2.sep) {
8925
- Object.assign(it2, { key: null, sep: [this.sourceToken] });
8926
- } else if (it2.value || atNextItem) {
8992
+ if (!it3.sep) {
8993
+ Object.assign(it3, { key: null, sep: [this.sourceToken] });
8994
+ } else if (it3.value || atNextItem) {
8927
8995
  map.items.push({ start, key: null, sep: [this.sourceToken] });
8928
- } else if (includesToken(it2.sep, "map-value-ind")) {
8996
+ } else if (includesToken(it3.sep, "map-value-ind")) {
8929
8997
  this.stack.push({
8930
8998
  type: "block-map",
8931
8999
  offset: this.offset,
@@ -8933,7 +9001,7 @@ var require_parser = __commonJS({
8933
9001
  items: [{ start: [], key: null, sep: [this.sourceToken] }]
8934
9002
  });
8935
9003
  } else {
8936
- it2.sep.push(this.sourceToken);
9004
+ it3.sep.push(this.sourceToken);
8937
9005
  }
8938
9006
  }
8939
9007
  this.onKeyLine = true;
@@ -8943,13 +9011,13 @@ var require_parser = __commonJS({
8943
9011
  case "single-quoted-scalar":
8944
9012
  case "double-quoted-scalar": {
8945
9013
  const fs5 = this.flowScalar(this.type);
8946
- if (atNextItem || it2.value) {
9014
+ if (atNextItem || it3.value) {
8947
9015
  map.items.push({ start, key: fs5, sep: [] });
8948
9016
  this.onKeyLine = true;
8949
- } else if (it2.sep) {
9017
+ } else if (it3.sep) {
8950
9018
  this.stack.push(fs5);
8951
9019
  } else {
8952
- Object.assign(it2, { key: fs5, sep: [] });
9020
+ Object.assign(it3, { key: fs5, sep: [] });
8953
9021
  this.onKeyLine = true;
8954
9022
  }
8955
9023
  return;
@@ -8958,7 +9026,7 @@ var require_parser = __commonJS({
8958
9026
  const bv = this.startBlockValue(map);
8959
9027
  if (bv) {
8960
9028
  if (bv.type === "block-seq") {
8961
- if (!it2.explicitKey && it2.sep && !includesToken(it2.sep, "newline")) {
9029
+ if (!it3.explicitKey && it3.sep && !includesToken(it3.sep, "newline")) {
8962
9030
  yield* this.pop({
8963
9031
  type: "error",
8964
9032
  offset: this.offset,
@@ -8980,50 +9048,50 @@ var require_parser = __commonJS({
8980
9048
  yield* this.step();
8981
9049
  }
8982
9050
  *blockSequence(seq) {
8983
- const it2 = seq.items[seq.items.length - 1];
9051
+ const it3 = seq.items[seq.items.length - 1];
8984
9052
  switch (this.type) {
8985
9053
  case "newline":
8986
- if (it2.value) {
8987
- const end = "end" in it2.value ? it2.value.end : void 0;
9054
+ if (it3.value) {
9055
+ const end = "end" in it3.value ? it3.value.end : void 0;
8988
9056
  const last = Array.isArray(end) ? end[end.length - 1] : void 0;
8989
9057
  if (last?.type === "comment")
8990
9058
  end?.push(this.sourceToken);
8991
9059
  else
8992
9060
  seq.items.push({ start: [this.sourceToken] });
8993
9061
  } else
8994
- it2.start.push(this.sourceToken);
9062
+ it3.start.push(this.sourceToken);
8995
9063
  return;
8996
9064
  case "space":
8997
9065
  case "comment":
8998
- if (it2.value)
9066
+ if (it3.value)
8999
9067
  seq.items.push({ start: [this.sourceToken] });
9000
9068
  else {
9001
- if (this.atIndentedComment(it2.start, seq.indent)) {
9069
+ if (this.atIndentedComment(it3.start, seq.indent)) {
9002
9070
  const prev = seq.items[seq.items.length - 2];
9003
9071
  const end = prev?.value?.end;
9004
9072
  if (Array.isArray(end)) {
9005
- Array.prototype.push.apply(end, it2.start);
9073
+ arrayPushArray(end, it3.start);
9006
9074
  end.push(this.sourceToken);
9007
9075
  seq.items.pop();
9008
9076
  return;
9009
9077
  }
9010
9078
  }
9011
- it2.start.push(this.sourceToken);
9079
+ it3.start.push(this.sourceToken);
9012
9080
  }
9013
9081
  return;
9014
9082
  case "anchor":
9015
9083
  case "tag":
9016
- if (it2.value || this.indent <= seq.indent)
9084
+ if (it3.value || this.indent <= seq.indent)
9017
9085
  break;
9018
- it2.start.push(this.sourceToken);
9086
+ it3.start.push(this.sourceToken);
9019
9087
  return;
9020
9088
  case "seq-item-ind":
9021
9089
  if (this.indent !== seq.indent)
9022
9090
  break;
9023
- if (it2.value || includesToken(it2.start, "seq-item-ind"))
9091
+ if (it3.value || includesToken(it3.start, "seq-item-ind"))
9024
9092
  seq.items.push({ start: [this.sourceToken] });
9025
9093
  else
9026
- it2.start.push(this.sourceToken);
9094
+ it3.start.push(this.sourceToken);
9027
9095
  return;
9028
9096
  }
9029
9097
  if (this.indent > seq.indent) {
@@ -9037,7 +9105,7 @@ var require_parser = __commonJS({
9037
9105
  yield* this.step();
9038
9106
  }
9039
9107
  *flowCollection(fc) {
9040
- const it2 = fc.items[fc.items.length - 1];
9108
+ const it3 = fc.items[fc.items.length - 1];
9041
9109
  if (this.type === "flow-error-end") {
9042
9110
  let top;
9043
9111
  do {
@@ -9048,42 +9116,42 @@ var require_parser = __commonJS({
9048
9116
  switch (this.type) {
9049
9117
  case "comma":
9050
9118
  case "explicit-key-ind":
9051
- if (!it2 || it2.sep)
9119
+ if (!it3 || it3.sep)
9052
9120
  fc.items.push({ start: [this.sourceToken] });
9053
9121
  else
9054
- it2.start.push(this.sourceToken);
9122
+ it3.start.push(this.sourceToken);
9055
9123
  return;
9056
9124
  case "map-value-ind":
9057
- if (!it2 || it2.value)
9125
+ if (!it3 || it3.value)
9058
9126
  fc.items.push({ start: [], key: null, sep: [this.sourceToken] });
9059
- else if (it2.sep)
9060
- it2.sep.push(this.sourceToken);
9127
+ else if (it3.sep)
9128
+ it3.sep.push(this.sourceToken);
9061
9129
  else
9062
- Object.assign(it2, { key: null, sep: [this.sourceToken] });
9130
+ Object.assign(it3, { key: null, sep: [this.sourceToken] });
9063
9131
  return;
9064
9132
  case "space":
9065
9133
  case "comment":
9066
9134
  case "newline":
9067
9135
  case "anchor":
9068
9136
  case "tag":
9069
- if (!it2 || it2.value)
9137
+ if (!it3 || it3.value)
9070
9138
  fc.items.push({ start: [this.sourceToken] });
9071
- else if (it2.sep)
9072
- it2.sep.push(this.sourceToken);
9139
+ else if (it3.sep)
9140
+ it3.sep.push(this.sourceToken);
9073
9141
  else
9074
- it2.start.push(this.sourceToken);
9142
+ it3.start.push(this.sourceToken);
9075
9143
  return;
9076
9144
  case "alias":
9077
9145
  case "scalar":
9078
9146
  case "single-quoted-scalar":
9079
9147
  case "double-quoted-scalar": {
9080
9148
  const fs5 = this.flowScalar(this.type);
9081
- if (!it2 || it2.value)
9149
+ if (!it3 || it3.value)
9082
9150
  fc.items.push({ start: [], key: fs5, sep: [] });
9083
- else if (it2.sep)
9151
+ else if (it3.sep)
9084
9152
  this.stack.push(fs5);
9085
9153
  else
9086
- Object.assign(it2, { key: fs5, sep: [] });
9154
+ Object.assign(it3, { key: fs5, sep: [] });
9087
9155
  return;
9088
9156
  }
9089
9157
  case "flow-map-end":
@@ -9392,237 +9460,413 @@ var require_dist = __commonJS({
9392
9460
  });
9393
9461
 
9394
9462
  // ../../node_modules/@clack/core/dist/index.mjs
9395
- var import_sisteransi = __toESM(require_src(), 1);
9396
- import { styleText as D } from "node:util";
9397
- import { stdout as R, stdin as q } from "node:process";
9398
- import * as k from "node:readline";
9399
- import ot from "node:readline";
9400
- import { ReadStream as J } from "node:tty";
9401
- function x(t2, e, s) {
9402
- if (!s.some((u) => !u.disabled)) return t2;
9403
- const i = t2 + e, r = Math.max(s.length - 1, 0), n = i < 0 ? r : i > r ? 0 : i;
9404
- return s[n].disabled ? x(n, e < 0 ? -1 : 1, s) : n;
9405
- }
9406
- 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;
9407
- var lt = (t2) => t2 === 12288 || t2 >= 65281 && t2 <= 65376 || t2 >= 65504 && t2 <= 65510;
9408
- 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;
9409
- var O = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
9410
- var y = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
9411
- var L = /\t{1,1000}/y;
9412
- 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");
9413
- var M = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
9414
- var ct = new RegExp("\\p{M}+", "gu");
9415
- var ft = { limit: 1 / 0, ellipsis: "" };
9416
- var X = (t2, e = {}, s = {}) => {
9417
- 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;
9418
- 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;
9419
- t: for (; ; ) {
9420
- if (w > C || o >= p && o > h2) {
9421
- const ut = t2.slice(C, w) || t2.slice(h2, o);
9422
- v = 0;
9423
- for (const Y of ut.replaceAll(ct, "")) {
9424
- const $ = Y.codePointAt(0) || 0;
9425
- 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) {
9426
- F = true;
9427
- break t;
9428
- }
9429
- v += Y.length, c += f;
9430
- }
9431
- C = w = 0;
9432
- }
9433
- if (o >= p) break;
9434
- if (M.lastIndex = o, M.test(t2)) {
9435
- if (v = M.lastIndex - o, f = v * A, c + f > b && (d = Math.min(d, o + Math.floor((b - c) / A))), c + f > i) {
9436
- F = true;
9437
- break;
9463
+ import { styleText as v } from "node:util";
9464
+ import { stdout as x, stdin as D } from "node:process";
9465
+ import * as b from "node:readline";
9466
+ import E from "node:readline";
9467
+
9468
+ // ../../node_modules/fast-string-truncated-width/dist/utils.js
9469
+ var getCodePointsLength = /* @__PURE__ */ (() => {
9470
+ const SURROGATE_PAIR_RE = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
9471
+ return (input) => {
9472
+ let surrogatePairsNr = 0;
9473
+ SURROGATE_PAIR_RE.lastIndex = 0;
9474
+ while (SURROGATE_PAIR_RE.test(input)) {
9475
+ surrogatePairsNr += 1;
9476
+ }
9477
+ return input.length - surrogatePairsNr;
9478
+ };
9479
+ })();
9480
+ var isFullWidth = (x3) => {
9481
+ return x3 === 12288 || x3 >= 65281 && x3 <= 65376 || x3 >= 65504 && x3 <= 65510;
9482
+ };
9483
+ var isWideNotCJKTNotEmoji = (x3) => {
9484
+ return x3 === 8987 || x3 === 9001 || x3 >= 12272 && x3 <= 12287 || x3 >= 12289 && x3 <= 12350 || x3 >= 12441 && x3 <= 12543 || x3 >= 12549 && x3 <= 12591 || x3 >= 12593 && x3 <= 12686 || x3 >= 12688 && x3 <= 12771 || x3 >= 12783 && x3 <= 12830 || x3 >= 12832 && x3 <= 12871 || x3 >= 12880 && x3 <= 19903 || x3 >= 65040 && x3 <= 65049 || x3 >= 65072 && x3 <= 65106 || x3 >= 65108 && x3 <= 65126 || x3 >= 65128 && x3 <= 65131 || x3 >= 127488 && x3 <= 127490 || x3 >= 127504 && x3 <= 127547 || x3 >= 127552 && x3 <= 127560 || x3 >= 131072 && x3 <= 196605 || x3 >= 196608 && x3 <= 262141;
9485
+ };
9486
+
9487
+ // ../../node_modules/fast-string-truncated-width/dist/index.js
9488
+ var ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y;
9489
+ var CONTROL_RE = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
9490
+ var CJKT_WIDE_RE = /(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu;
9491
+ var TAB_RE = /\t{1,1000}/y;
9492
+ var EMOJI_RE = 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");
9493
+ var LATIN_RE = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
9494
+ var MODIFIER_RE = new RegExp("\\p{M}+", "gu");
9495
+ var NO_TRUNCATION = { limit: Infinity, ellipsis: "" };
9496
+ var getStringTruncatedWidth = (input, truncationOptions = {}, widthOptions = {}) => {
9497
+ const LIMIT = truncationOptions.limit ?? Infinity;
9498
+ const ELLIPSIS = truncationOptions.ellipsis ?? "";
9499
+ const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth(ELLIPSIS, NO_TRUNCATION, widthOptions).width : 0);
9500
+ const ANSI_WIDTH = 0;
9501
+ const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;
9502
+ const TAB_WIDTH = widthOptions.tabWidth ?? 8;
9503
+ const EMOJI_WIDTH = widthOptions.emojiWidth ?? 2;
9504
+ const FULL_WIDTH_WIDTH = 2;
9505
+ const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;
9506
+ const WIDE_WIDTH = widthOptions.wideWidth ?? FULL_WIDTH_WIDTH;
9507
+ const PARSE_BLOCKS = [
9508
+ [LATIN_RE, REGULAR_WIDTH],
9509
+ [ANSI_RE, ANSI_WIDTH],
9510
+ [CONTROL_RE, CONTROL_WIDTH],
9511
+ [TAB_RE, TAB_WIDTH],
9512
+ [EMOJI_RE, EMOJI_WIDTH],
9513
+ [CJKT_WIDE_RE, WIDE_WIDTH]
9514
+ ];
9515
+ let indexPrev = 0;
9516
+ let index = 0;
9517
+ let length = input.length;
9518
+ let lengthExtra = 0;
9519
+ let truncationEnabled = false;
9520
+ let truncationIndex = length;
9521
+ let truncationLimit = Math.max(0, LIMIT - ELLIPSIS_WIDTH);
9522
+ let unmatchedStart = 0;
9523
+ let unmatchedEnd = 0;
9524
+ let width = 0;
9525
+ let widthExtra = 0;
9526
+ outer: while (true) {
9527
+ if (unmatchedEnd > unmatchedStart || index >= length && index > indexPrev) {
9528
+ const unmatched = input.slice(unmatchedStart, unmatchedEnd) || input.slice(indexPrev, index);
9529
+ lengthExtra = 0;
9530
+ for (const char of unmatched.replaceAll(MODIFIER_RE, "")) {
9531
+ const codePoint = char.codePointAt(0) || 0;
9532
+ if (isFullWidth(codePoint)) {
9533
+ widthExtra = FULL_WIDTH_WIDTH;
9534
+ } else if (isWideNotCJKTNotEmoji(codePoint)) {
9535
+ widthExtra = WIDE_WIDTH;
9536
+ } else {
9537
+ widthExtra = REGULAR_WIDTH;
9538
+ }
9539
+ if (width + widthExtra > truncationLimit) {
9540
+ truncationIndex = Math.min(truncationIndex, Math.max(unmatchedStart, indexPrev) + lengthExtra);
9541
+ }
9542
+ if (width + widthExtra > LIMIT) {
9543
+ truncationEnabled = true;
9544
+ break outer;
9545
+ }
9546
+ lengthExtra += char.length;
9547
+ width += widthExtra;
9438
9548
  }
9439
- c += f, C = h2, w = o, o = h2 = M.lastIndex;
9440
- continue;
9549
+ unmatchedStart = unmatchedEnd = 0;
9441
9550
  }
9442
- if (O.lastIndex = o, O.test(t2)) {
9443
- if (c + u > b && (d = Math.min(d, o)), c + u > i) {
9444
- F = true;
9445
- break;
9446
- }
9447
- c += u, C = h2, w = o, o = h2 = O.lastIndex;
9448
- continue;
9551
+ if (index >= length) {
9552
+ break outer;
9449
9553
  }
9450
- if (y.lastIndex = o, y.test(t2)) {
9451
- if (v = y.lastIndex - o, f = v * a, c + f > b && (d = Math.min(d, o + Math.floor((b - c) / a))), c + f > i) {
9452
- F = true;
9453
- break;
9554
+ for (let i = 0, l = PARSE_BLOCKS.length; i < l; i++) {
9555
+ const [BLOCK_RE, BLOCK_WIDTH] = PARSE_BLOCKS[i];
9556
+ BLOCK_RE.lastIndex = index;
9557
+ if (BLOCK_RE.test(input)) {
9558
+ lengthExtra = BLOCK_RE === CJKT_WIDE_RE ? getCodePointsLength(input.slice(index, BLOCK_RE.lastIndex)) : BLOCK_RE === EMOJI_RE ? 1 : BLOCK_RE.lastIndex - index;
9559
+ widthExtra = lengthExtra * BLOCK_WIDTH;
9560
+ if (width + widthExtra > truncationLimit) {
9561
+ truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / BLOCK_WIDTH));
9562
+ }
9563
+ if (width + widthExtra > LIMIT) {
9564
+ truncationEnabled = true;
9565
+ break outer;
9566
+ }
9567
+ width += widthExtra;
9568
+ unmatchedStart = indexPrev;
9569
+ unmatchedEnd = index;
9570
+ index = indexPrev = BLOCK_RE.lastIndex;
9571
+ continue outer;
9454
9572
  }
9455
- c += f, C = h2, w = o, o = h2 = y.lastIndex;
9456
- continue;
9457
9573
  }
9458
- if (L.lastIndex = o, L.test(t2)) {
9459
- if (v = L.lastIndex - o, f = v * l, c + f > b && (d = Math.min(d, o + Math.floor((b - c) / l))), c + f > i) {
9460
- F = true;
9461
- break;
9462
- }
9463
- c += f, C = h2, w = o, o = h2 = L.lastIndex;
9464
- continue;
9574
+ index += 1;
9575
+ }
9576
+ return {
9577
+ width: truncationEnabled ? truncationLimit : width,
9578
+ index: truncationEnabled ? truncationIndex : length,
9579
+ truncated: truncationEnabled,
9580
+ ellipsed: truncationEnabled && LIMIT >= ELLIPSIS_WIDTH
9581
+ };
9582
+ };
9583
+ var dist_default = getStringTruncatedWidth;
9584
+
9585
+ // ../../node_modules/fast-string-width/dist/index.js
9586
+ var NO_TRUNCATION2 = {
9587
+ limit: Infinity,
9588
+ ellipsis: "",
9589
+ ellipsisWidth: 0
9590
+ };
9591
+ var fastStringWidth = (input, options = {}) => {
9592
+ return dist_default(input, NO_TRUNCATION2, options).width;
9593
+ };
9594
+ var dist_default2 = fastStringWidth;
9595
+
9596
+ // ../../node_modules/fast-wrap-ansi/lib/main.js
9597
+ var ESC = "\x1B";
9598
+ var CSI = "\x9B";
9599
+ var END_CODE = 39;
9600
+ var ANSI_ESCAPE_BELL = "\x07";
9601
+ var ANSI_CSI = "[";
9602
+ var ANSI_OSC = "]";
9603
+ var ANSI_SGR_TERMINATOR = "m";
9604
+ var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
9605
+ var GROUP_REGEX = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`, "y");
9606
+ var getClosingCode = (openingCode) => {
9607
+ if (openingCode >= 30 && openingCode <= 37)
9608
+ return 39;
9609
+ if (openingCode >= 90 && openingCode <= 97)
9610
+ return 39;
9611
+ if (openingCode >= 40 && openingCode <= 47)
9612
+ return 49;
9613
+ if (openingCode >= 100 && openingCode <= 107)
9614
+ return 49;
9615
+ if (openingCode === 1 || openingCode === 2)
9616
+ return 22;
9617
+ if (openingCode === 3)
9618
+ return 23;
9619
+ if (openingCode === 4)
9620
+ return 24;
9621
+ if (openingCode === 7)
9622
+ return 27;
9623
+ if (openingCode === 8)
9624
+ return 28;
9625
+ if (openingCode === 9)
9626
+ return 29;
9627
+ if (openingCode === 0)
9628
+ return 0;
9629
+ return void 0;
9630
+ };
9631
+ var wrapAnsiCode = (code) => `${ESC}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
9632
+ var wrapAnsiHyperlink = (url) => `${ESC}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`;
9633
+ var wrapWord = (rows, word, columns) => {
9634
+ const characters = word[Symbol.iterator]();
9635
+ let isInsideEscape = false;
9636
+ let isInsideLinkEscape = false;
9637
+ let lastRow = rows.at(-1);
9638
+ let visible = lastRow === void 0 ? 0 : dist_default2(lastRow);
9639
+ let currentCharacter = characters.next();
9640
+ let nextCharacter = characters.next();
9641
+ let rawCharacterIndex = 0;
9642
+ while (!currentCharacter.done) {
9643
+ const character = currentCharacter.value;
9644
+ const characterLength = dist_default2(character);
9645
+ if (visible + characterLength <= columns) {
9646
+ rows[rows.length - 1] += character;
9647
+ } else {
9648
+ rows.push(character);
9649
+ visible = 0;
9465
9650
  }
9466
- if (P.lastIndex = o, P.test(t2)) {
9467
- if (c + g > b && (d = Math.min(d, o)), c + g > i) {
9468
- F = true;
9469
- break;
9651
+ if (character === ESC || character === CSI) {
9652
+ isInsideEscape = true;
9653
+ isInsideLinkEscape = word.startsWith(ANSI_ESCAPE_LINK, rawCharacterIndex + 1);
9654
+ }
9655
+ if (isInsideEscape) {
9656
+ if (isInsideLinkEscape) {
9657
+ if (character === ANSI_ESCAPE_BELL) {
9658
+ isInsideEscape = false;
9659
+ isInsideLinkEscape = false;
9660
+ }
9661
+ } else if (character === ANSI_SGR_TERMINATOR) {
9662
+ isInsideEscape = false;
9663
+ }
9664
+ } else {
9665
+ visible += characterLength;
9666
+ if (visible === columns && !nextCharacter.done) {
9667
+ rows.push("");
9668
+ visible = 0;
9470
9669
  }
9471
- c += g, C = h2, w = o, o = h2 = P.lastIndex;
9472
- continue;
9473
9670
  }
9474
- o += 1;
9671
+ currentCharacter = nextCharacter;
9672
+ nextCharacter = characters.next();
9673
+ rawCharacterIndex += character.length;
9674
+ }
9675
+ lastRow = rows.at(-1);
9676
+ if (!visible && lastRow !== void 0 && lastRow.length && rows.length > 1) {
9677
+ rows[rows.length - 2] += rows.pop();
9475
9678
  }
9476
- return { width: F ? b : c, index: F ? d : p, truncated: F, ellipsed: F && i >= n };
9477
- };
9478
- var pt = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 };
9479
- var S = (t2, e = {}) => X(t2, pt, e).width;
9480
- var T = "\x1B";
9481
- var Z = "\x9B";
9482
- var Ft = 39;
9483
- var j = "\x07";
9484
- var Q = "[";
9485
- var dt = "]";
9486
- var tt = "m";
9487
- var U = `${dt}8;;`;
9488
- var et = new RegExp(`(?:\\${Q}(?<code>\\d+)m|\\${U}(?<uri>.*)${j})`, "y");
9489
- var mt = (t2) => {
9490
- if (t2 >= 30 && t2 <= 37 || t2 >= 90 && t2 <= 97) return 39;
9491
- if (t2 >= 40 && t2 <= 47 || t2 >= 100 && t2 <= 107) return 49;
9492
- if (t2 === 1 || t2 === 2) return 22;
9493
- if (t2 === 3) return 23;
9494
- if (t2 === 4) return 24;
9495
- if (t2 === 7) return 27;
9496
- if (t2 === 8) return 28;
9497
- if (t2 === 9) return 29;
9498
- if (t2 === 0) return 0;
9499
- };
9500
- var st = (t2) => `${T}${Q}${t2}${tt}`;
9501
- var it = (t2) => `${T}${U}${t2}${j}`;
9502
- var gt = (t2) => t2.map((e) => S(e));
9503
- var G = (t2, e, s) => {
9504
- const i = e[Symbol.iterator]();
9505
- let r = false, n = false, u = t2.at(-1), a = u === void 0 ? 0 : S(u), l = i.next(), E = i.next(), g = 0;
9506
- for (; !l.done; ) {
9507
- const m = l.value, A = S(m);
9508
- 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;
9509
- }
9510
- u = t2.at(-1), !a && u !== void 0 && u.length > 0 && t2.length > 1 && (t2[t2.length - 2] += t2.pop());
9511
9679
  };
9512
- var vt = (t2) => {
9513
- const e = t2.split(" ");
9514
- let s = e.length;
9515
- for (; s > 0 && !(S(e[s - 1]) > 0); ) s--;
9516
- return s === e.length ? t2 : e.slice(0, s).join(" ") + e.slice(s).join("");
9680
+ var stringVisibleTrimSpacesRight = (string) => {
9681
+ const words = string.split(" ");
9682
+ let last = words.length;
9683
+ while (last) {
9684
+ if (dist_default2(words[last - 1])) {
9685
+ break;
9686
+ }
9687
+ last--;
9688
+ }
9689
+ if (last === words.length) {
9690
+ return string;
9691
+ }
9692
+ return words.slice(0, last).join(" ") + words.slice(last).join("");
9517
9693
  };
9518
- var Et = (t2, e, s = {}) => {
9519
- if (s.trim !== false && t2.trim() === "") return "";
9520
- let i = "", r, n;
9521
- const u = t2.split(" "), a = gt(u);
9522
- let l = [""];
9523
- for (const [h2, o] of u.entries()) {
9524
- s.trim !== false && (l[l.length - 1] = (l.at(-1) ?? "").trimStart());
9525
- let p = S(l.at(-1) ?? "");
9526
- 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) {
9527
- const v = e - p, F = 1 + Math.floor((a[h2] - v - 1) / e);
9528
- Math.floor((a[h2] - 1) / e) < F && l.push(""), G(l, o, e);
9694
+ var exec = (string, columns, options = {}) => {
9695
+ if (options.trim !== false && string.trim() === "") {
9696
+ return "";
9697
+ }
9698
+ let returnValue = "";
9699
+ let escapeCode;
9700
+ let escapeUrl;
9701
+ const words = string.split(" ");
9702
+ let rows = [""];
9703
+ let rowLength = 0;
9704
+ for (let index = 0; index < words.length; index++) {
9705
+ const word = words[index];
9706
+ if (options.trim !== false) {
9707
+ const row = rows.at(-1) ?? "";
9708
+ const trimmed = row.trimStart();
9709
+ if (row.length !== trimmed.length) {
9710
+ rows[rows.length - 1] = trimmed;
9711
+ rowLength = dist_default2(trimmed);
9712
+ }
9713
+ }
9714
+ if (index !== 0) {
9715
+ if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
9716
+ rows.push("");
9717
+ rowLength = 0;
9718
+ }
9719
+ if (rowLength || options.trim === false) {
9720
+ rows[rows.length - 1] += " ";
9721
+ rowLength++;
9722
+ }
9723
+ }
9724
+ const wordLength = dist_default2(word);
9725
+ if (options.hard && wordLength > columns) {
9726
+ const remainingColumns = columns - rowLength;
9727
+ const breaksStartingThisLine = 1 + Math.floor((wordLength - remainingColumns - 1) / columns);
9728
+ const breaksStartingNextLine = Math.floor((wordLength - 1) / columns);
9729
+ if (breaksStartingNextLine < breaksStartingThisLine) {
9730
+ rows.push("");
9731
+ }
9732
+ wrapWord(rows, word, columns);
9733
+ rowLength = dist_default2(rows.at(-1) ?? "");
9529
9734
  continue;
9530
9735
  }
9531
- if (p + a[h2] > e && p > 0 && a[h2] > 0) {
9532
- if (s.wordWrap === false && p < e) {
9533
- G(l, o, e);
9736
+ if (rowLength + wordLength > columns && rowLength && wordLength) {
9737
+ if (options.wordWrap === false && rowLength < columns) {
9738
+ wrapWord(rows, word, columns);
9739
+ rowLength = dist_default2(rows.at(-1) ?? "");
9534
9740
  continue;
9535
9741
  }
9536
- l.push("");
9742
+ rows.push("");
9743
+ rowLength = 0;
9537
9744
  }
9538
- if (p + a[h2] > e && s.wordWrap === false) {
9539
- G(l, o, e);
9745
+ if (rowLength + wordLength > columns && options.wordWrap === false) {
9746
+ wrapWord(rows, word, columns);
9747
+ rowLength = dist_default2(rows.at(-1) ?? "");
9540
9748
  continue;
9541
9749
  }
9542
- l[l.length - 1] += o;
9543
- }
9544
- s.trim !== false && (l = l.map((h2) => vt(h2)));
9545
- const E = l.join(`
9546
- `), g = E[Symbol.iterator]();
9547
- let m = g.next(), A = g.next(), V2 = 0;
9548
- for (; !m.done; ) {
9549
- const h2 = m.value, o = A.value;
9550
- if (i += h2, h2 === T || h2 === Z) {
9551
- et.lastIndex = V2 + 1;
9552
- const F = et.exec(E)?.groups;
9553
- if (F?.code !== void 0) {
9554
- const d = Number.parseFloat(F.code);
9555
- r = d === Ft ? void 0 : d;
9556
- } else F?.uri !== void 0 && (n = F.uri.length === 0 ? void 0 : F.uri);
9557
- }
9558
- const p = r ? mt(r) : void 0;
9559
- o === `
9560
- ` ? (n && (i += it("")), r && p && (i += st(p))) : h2 === `
9561
- ` && (r && p && (i += st(r)), n && (i += it(n))), V2 += h2.length, m = A, A = g.next();
9562
- }
9563
- return i;
9750
+ rows[rows.length - 1] += word;
9751
+ rowLength += wordLength;
9752
+ }
9753
+ if (options.trim !== false) {
9754
+ rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
9755
+ }
9756
+ const preString = rows.join("\n");
9757
+ let inSurrogate = false;
9758
+ for (let i = 0; i < preString.length; i++) {
9759
+ const character = preString[i];
9760
+ returnValue += character;
9761
+ if (!inSurrogate) {
9762
+ inSurrogate = character >= "\uD800" && character <= "\uDBFF";
9763
+ if (inSurrogate) {
9764
+ continue;
9765
+ }
9766
+ } else {
9767
+ inSurrogate = false;
9768
+ }
9769
+ if (character === ESC || character === CSI) {
9770
+ GROUP_REGEX.lastIndex = i + 1;
9771
+ const groupsResult = GROUP_REGEX.exec(preString);
9772
+ const groups = groupsResult?.groups;
9773
+ if (groups?.code !== void 0) {
9774
+ const code = Number.parseFloat(groups.code);
9775
+ escapeCode = code === END_CODE ? void 0 : code;
9776
+ } else if (groups?.uri !== void 0) {
9777
+ escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
9778
+ }
9779
+ }
9780
+ if (preString[i + 1] === "\n") {
9781
+ if (escapeUrl) {
9782
+ returnValue += wrapAnsiHyperlink("");
9783
+ }
9784
+ const closingCode = escapeCode ? getClosingCode(escapeCode) : void 0;
9785
+ if (escapeCode && closingCode) {
9786
+ returnValue += wrapAnsiCode(closingCode);
9787
+ }
9788
+ } else if (character === "\n") {
9789
+ if (escapeCode && getClosingCode(escapeCode)) {
9790
+ returnValue += wrapAnsiCode(escapeCode);
9791
+ }
9792
+ if (escapeUrl) {
9793
+ returnValue += wrapAnsiHyperlink(escapeUrl);
9794
+ }
9795
+ }
9796
+ }
9797
+ return returnValue;
9564
9798
  };
9565
- function K(t2, e, s) {
9566
- return String(t2).normalize().replaceAll(`\r
9567
- `, `
9568
- `).split(`
9569
- `).map((i) => Et(i, e, s)).join(`
9570
- `);
9799
+ var CRLF_OR_LF = /\r?\n/;
9800
+ function wrapAnsi(string, columns, options) {
9801
+ return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join("\n");
9571
9802
  }
9572
- var At = ["up", "down", "left", "right", "space", "enter", "cancel"];
9573
- 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 };
9574
- function H(t2, e) {
9575
- if (typeof t2 == "string") return _.aliases.get(t2) === e;
9576
- for (const s of t2) if (s !== void 0 && H(s, e)) return true;
9803
+
9804
+ // ../../node_modules/@clack/core/dist/index.mjs
9805
+ var import_sisteransi = __toESM(require_src(), 1);
9806
+ import { ReadStream as O } from "node:tty";
9807
+ function f(r, t, s) {
9808
+ if (!s.some((o) => !o.disabled)) return r;
9809
+ const e2 = r + t, i = Math.max(s.length - 1, 0), n = e2 < 0 ? i : e2 > i ? 0 : e2;
9810
+ return s[n].disabled ? f(n, t < 0 ? -1 : 1, s) : n;
9811
+ }
9812
+ var G = ["up", "down", "left", "right", "space", "enter", "cancel"];
9813
+ var K = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
9814
+ var h = { actions: new Set(G), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]), messages: { cancel: "Canceled", error: "Something went wrong" }, withGuide: true, date: { monthNames: [...K], messages: { required: "Please enter a valid date", invalidMonth: "There are only 12 months in a year", invalidDay: (r, t) => `There are only ${r} days in ${t}`, afterMin: (r) => `Date must be on or after ${r.toISOString().slice(0, 10)}`, beforeMax: (r) => `Date must be on or before ${r.toISOString().slice(0, 10)}` } } };
9815
+ function C(r, t) {
9816
+ if (typeof r == "string") return h.aliases.get(r) === t;
9817
+ for (const s of r) if (s !== void 0 && C(s, t)) return true;
9577
9818
  return false;
9578
9819
  }
9579
- function _t(t2, e) {
9580
- if (t2 === e) return;
9581
- const s = t2.split(`
9582
- `), i = e.split(`
9583
- `), r = Math.max(s.length, i.length), n = [];
9584
- for (let u = 0; u < r; u++) s[u] !== i[u] && n.push(u);
9585
- return { lines: n, numLinesBefore: s.length, numLinesAfter: i.length, numLines: r };
9586
- }
9587
- var bt = globalThis.process.platform.startsWith("win");
9588
- var z = /* @__PURE__ */ Symbol("clack:cancel");
9589
- function Ct(t2) {
9590
- return t2 === z;
9591
- }
9592
- function W(t2, e) {
9593
- const s = t2;
9594
- s.isTTY && s.setRawMode(e);
9595
- }
9596
- function xt({ input: t2 = q, output: e = R, overwrite: s = true, hideCursor: i = true } = {}) {
9597
- const r = k.createInterface({ input: t2, output: e, prompt: "", tabSize: 1 });
9598
- k.emitKeypressEvents(t2, r), t2 instanceof J && t2.isTTY && t2.setRawMode(true);
9599
- const n = (u, { name: a, sequence: l }) => {
9600
- const E = String(u);
9601
- if (H([E, a, l], "cancel")) {
9602
- i && e.write(import_sisteransi.cursor.show), process.exit(0);
9820
+ function z(r, t) {
9821
+ if (r === t) return;
9822
+ const s = r.split(`
9823
+ `), e2 = t.split(`
9824
+ `), i = Math.max(s.length, e2.length), n = [];
9825
+ for (let o = 0; o < i; o++) s[o] !== e2[o] && n.push(o);
9826
+ return { lines: n, numLinesBefore: s.length, numLinesAfter: e2.length, numLines: i };
9827
+ }
9828
+ var Y = globalThis.process.platform.startsWith("win");
9829
+ var k = /* @__PURE__ */ Symbol("clack:cancel");
9830
+ function q(r) {
9831
+ return r === k;
9832
+ }
9833
+ function w(r, t) {
9834
+ const s = r;
9835
+ s.isTTY && s.setRawMode(t);
9836
+ }
9837
+ function R({ input: r = D, output: t = x, overwrite: s = true, hideCursor: e2 = true } = {}) {
9838
+ const i = b.createInterface({ input: r, output: t, prompt: "", tabSize: 1 });
9839
+ b.emitKeypressEvents(r, i), r instanceof O && r.isTTY && r.setRawMode(true);
9840
+ const n = (o, { name: u, sequence: a }) => {
9841
+ const l = String(o);
9842
+ if (C([l, u, a], "cancel")) {
9843
+ e2 && t.write(import_sisteransi.cursor.show), process.exit(0);
9603
9844
  return;
9604
9845
  }
9605
9846
  if (!s) return;
9606
- const g = a === "return" ? 0 : -1, m = a === "return" ? -1 : 0;
9607
- k.moveCursor(e, g, m, () => {
9608
- k.clearLine(e, 1, () => {
9609
- t2.once("keypress", n);
9847
+ const c = u === "return" ? 0 : -1, y = u === "return" ? -1 : 0;
9848
+ b.moveCursor(t, c, y, () => {
9849
+ b.clearLine(t, 1, () => {
9850
+ r.once("keypress", n);
9610
9851
  });
9611
9852
  });
9612
9853
  };
9613
- return i && e.write(import_sisteransi.cursor.hide), t2.once("keypress", n), () => {
9614
- 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();
9854
+ return e2 && t.write(import_sisteransi.cursor.hide), r.once("keypress", n), () => {
9855
+ r.off("keypress", n), e2 && t.write(import_sisteransi.cursor.show), r instanceof O && r.isTTY && !Y && r.setRawMode(false), i.terminal = false, i.close();
9615
9856
  };
9616
9857
  }
9617
- var rt = (t2) => "columns" in t2 && typeof t2.columns == "number" ? t2.columns : 80;
9618
- var nt = (t2) => "rows" in t2 && typeof t2.rows == "number" ? t2.rows : 20;
9619
- function Bt(t2, e, s, i = s) {
9620
- const r = rt(t2 ?? R);
9621
- return K(e, r - s.length, { hard: true, trim: false }).split(`
9622
- `).map((n, u) => `${u === 0 ? i : s}${n}`).join(`
9858
+ var A = (r) => "columns" in r && typeof r.columns == "number" ? r.columns : 80;
9859
+ var L = (r) => "rows" in r && typeof r.rows == "number" ? r.rows : 20;
9860
+ function W(r, t, s, e2 = s, i = s, n) {
9861
+ const o = A(r ?? x);
9862
+ return wrapAnsi(t, o - s.length, { hard: true, trim: false }).split(`
9863
+ `).map((u, a, l) => {
9864
+ const c = n ? n(u, a) : u;
9865
+ return a === 0 ? `${e2}${c}` : a === l.length - 1 ? `${i}${c}` : `${s}${c}`;
9866
+ }).join(`
9623
9867
  `);
9624
9868
  }
9625
- var B = class {
9869
+ var m = class {
9626
9870
  input;
9627
9871
  output;
9628
9872
  _abortSignal;
@@ -9637,122 +9881,125 @@ var B = class {
9637
9881
  error = "";
9638
9882
  value;
9639
9883
  userInput = "";
9640
- constructor(e, s = true) {
9641
- const { input: i = q, output: r = R, render: n, signal: u, ...a } = e;
9642
- 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;
9884
+ constructor(t, s = true) {
9885
+ const { input: e2 = D, output: i = x, render: n, signal: o, ...u } = t;
9886
+ this.opts = u, 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 = o, this.input = e2, this.output = i;
9643
9887
  }
9644
9888
  unsubscribe() {
9645
9889
  this._subscribers.clear();
9646
9890
  }
9647
- setSubscriber(e, s) {
9648
- const i = this._subscribers.get(e) ?? [];
9649
- i.push(s), this._subscribers.set(e, i);
9891
+ setSubscriber(t, s) {
9892
+ const e2 = this._subscribers.get(t) ?? [];
9893
+ e2.push(s), this._subscribers.set(t, e2);
9650
9894
  }
9651
- on(e, s) {
9652
- this.setSubscriber(e, { cb: s });
9895
+ on(t, s) {
9896
+ this.setSubscriber(t, { cb: s });
9653
9897
  }
9654
- once(e, s) {
9655
- this.setSubscriber(e, { cb: s, once: true });
9898
+ once(t, s) {
9899
+ this.setSubscriber(t, { cb: s, once: true });
9656
9900
  }
9657
- emit(e, ...s) {
9658
- const i = this._subscribers.get(e) ?? [], r = [];
9659
- for (const n of i) n.cb(...s), n.once && r.push(() => i.splice(i.indexOf(n), 1));
9660
- for (const n of r) n();
9901
+ emit(t, ...s) {
9902
+ const e2 = this._subscribers.get(t) ?? [], i = [];
9903
+ for (const n of e2) n.cb(...s), n.once && i.push(() => e2.splice(e2.indexOf(n), 1));
9904
+ for (const n of i) n();
9661
9905
  }
9662
9906
  prompt() {
9663
- return new Promise((e) => {
9907
+ return new Promise((t) => {
9664
9908
  if (this._abortSignal) {
9665
- if (this._abortSignal.aborted) return this.state = "cancel", this.close(), e(z);
9909
+ if (this._abortSignal.aborted) return this.state = "cancel", this.close(), t(k);
9666
9910
  this._abortSignal.addEventListener("abort", () => {
9667
9911
  this.state = "cancel", this.close();
9668
9912
  }, { once: true });
9669
9913
  }
9670
- 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", () => {
9671
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), W(this.input, false), e(this.value);
9914
+ this.rl = E.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", () => {
9915
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t(this.value);
9672
9916
  }), this.once("cancel", () => {
9673
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), W(this.input, false), e(z);
9917
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t(k);
9674
9918
  });
9675
9919
  });
9676
9920
  }
9677
- _isActionKey(e, s) {
9678
- return e === " ";
9921
+ _isActionKey(t, s) {
9922
+ return t === " ";
9923
+ }
9924
+ _shouldSubmit(t, s) {
9925
+ return true;
9679
9926
  }
9680
- _setValue(e) {
9681
- this.value = e, this.emit("value", this.value);
9927
+ _setValue(t) {
9928
+ this.value = t, this.emit("value", this.value);
9682
9929
  }
9683
- _setUserInput(e, s) {
9684
- this.userInput = e ?? "", this.emit("userInput", this.userInput), s && this._track && this.rl && (this.rl.write(this.userInput), this._cursor = this.rl.cursor);
9930
+ _setUserInput(t, s) {
9931
+ this.userInput = t ?? "", this.emit("userInput", this.userInput), s && this._track && this.rl && (this.rl.write(this.userInput), this._cursor = this.rl.cursor);
9685
9932
  }
9686
9933
  _clearUserInput() {
9687
9934
  this.rl?.write(null, { ctrl: true, name: "u" }), this._setUserInput("");
9688
9935
  }
9689
- onKeypress(e, s) {
9690
- 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") {
9936
+ onKeypress(t, s) {
9937
+ if (this._track && s.name !== "return" && (s.name && this._isActionKey(t, 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 && h.aliases.has(s.name) && this.emit("cursor", h.aliases.get(s.name)), h.actions.has(s.name) && this.emit("cursor", s.name)), t && (t.toLowerCase() === "y" || t.toLowerCase() === "n") && this.emit("confirm", t.toLowerCase() === "y"), this.emit("key", t?.toLowerCase(), s), s?.name === "return" && this._shouldSubmit(t, s)) {
9691
9938
  if (this.opts.validate) {
9692
- const i = this.opts.validate(this.value);
9693
- i && (this.error = i instanceof Error ? i.message : i, this.state = "error", this.rl?.write(this.userInput));
9939
+ const e2 = this.opts.validate(this.value);
9940
+ e2 && (this.error = e2 instanceof Error ? e2.message : e2, this.state = "error", this.rl?.write(this.userInput));
9694
9941
  }
9695
9942
  this.state !== "error" && (this.state = "submit");
9696
9943
  }
9697
- 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();
9944
+ C([t, 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();
9698
9945
  }
9699
9946
  close() {
9700
9947
  this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
9701
- `), W(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
9948
+ `), w(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
9702
9949
  }
9703
9950
  restoreCursor() {
9704
- const e = K(this._prevFrame, process.stdout.columns, { hard: true, trim: false }).split(`
9951
+ const t = wrapAnsi(this._prevFrame, process.stdout.columns, { hard: true, trim: false }).split(`
9705
9952
  `).length - 1;
9706
- this.output.write(import_sisteransi.cursor.move(-999, e * -1));
9953
+ this.output.write(import_sisteransi.cursor.move(-999, t * -1));
9707
9954
  }
9708
9955
  render() {
9709
- const e = K(this._render(this) ?? "", process.stdout.columns, { hard: true, trim: false });
9710
- if (e !== this._prevFrame) {
9956
+ const t = wrapAnsi(this._render(this) ?? "", process.stdout.columns, { hard: true, trim: false });
9957
+ if (t !== this._prevFrame) {
9711
9958
  if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
9712
9959
  else {
9713
- const s = _t(this._prevFrame, e), i = nt(this.output);
9960
+ const s = z(this._prevFrame, t), e2 = L(this.output);
9714
9961
  if (this.restoreCursor(), s) {
9715
- const r = Math.max(0, s.numLinesAfter - i), n = Math.max(0, s.numLinesBefore - i);
9716
- let u = s.lines.find((a) => a >= r);
9717
- if (u === void 0) {
9718
- this._prevFrame = e;
9962
+ const i = Math.max(0, s.numLinesAfter - e2), n = Math.max(0, s.numLinesBefore - e2);
9963
+ let o = s.lines.find((u) => u >= i);
9964
+ if (o === void 0) {
9965
+ this._prevFrame = t;
9719
9966
  return;
9720
9967
  }
9721
9968
  if (s.lines.length === 1) {
9722
- this.output.write(import_sisteransi.cursor.move(0, u - n)), this.output.write(import_sisteransi.erase.lines(1));
9723
- const a = e.split(`
9969
+ this.output.write(import_sisteransi.cursor.move(0, o - n)), this.output.write(import_sisteransi.erase.lines(1));
9970
+ const u = t.split(`
9724
9971
  `);
9725
- this.output.write(a[u]), this._prevFrame = e, this.output.write(import_sisteransi.cursor.move(0, a.length - u - 1));
9972
+ this.output.write(u[o]), this._prevFrame = t, this.output.write(import_sisteransi.cursor.move(0, u.length - o - 1));
9726
9973
  return;
9727
9974
  } else if (s.lines.length > 1) {
9728
- if (r < n) u = r;
9975
+ if (i < n) o = i;
9729
9976
  else {
9730
- const l = u - n;
9731
- l > 0 && this.output.write(import_sisteransi.cursor.move(0, l));
9977
+ const a = o - n;
9978
+ a > 0 && this.output.write(import_sisteransi.cursor.move(0, a));
9732
9979
  }
9733
9980
  this.output.write(import_sisteransi.erase.down());
9734
- const a = e.split(`
9735
- `).slice(u);
9736
- this.output.write(a.join(`
9737
- `)), this._prevFrame = e;
9981
+ const u = t.split(`
9982
+ `).slice(o);
9983
+ this.output.write(u.join(`
9984
+ `)), this._prevFrame = t;
9738
9985
  return;
9739
9986
  }
9740
9987
  }
9741
9988
  this.output.write(import_sisteransi.erase.down());
9742
9989
  }
9743
- this.output.write(e), this.state === "initial" && (this.state = "active"), this._prevFrame = e;
9990
+ this.output.write(t), this.state === "initial" && (this.state = "active"), this._prevFrame = t;
9744
9991
  }
9745
9992
  }
9746
9993
  };
9747
- var kt = class extends B {
9994
+ var X = class extends m {
9748
9995
  get cursor() {
9749
9996
  return this.value ? 0 : 1;
9750
9997
  }
9751
9998
  get _value() {
9752
9999
  return this.cursor === 0;
9753
10000
  }
9754
- constructor(e) {
9755
- super(e, false), this.value = !!e.initialValue, this.on("userInput", () => {
10001
+ constructor(t) {
10002
+ super(t, false), this.value = !!t.initialValue, this.on("userInput", () => {
9756
10003
  this.value = this._value;
9757
10004
  }), this.on("confirm", (s) => {
9758
10005
  this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = s, this.state = "submit", this.close();
@@ -9761,44 +10008,44 @@ var kt = class extends B {
9761
10008
  });
9762
10009
  }
9763
10010
  };
9764
- var Lt = class extends B {
10011
+ var nt = class extends m {
9765
10012
  options;
9766
10013
  cursor = 0;
9767
10014
  get _value() {
9768
10015
  return this.options[this.cursor].value;
9769
10016
  }
9770
10017
  get _enabledOptions() {
9771
- return this.options.filter((e) => e.disabled !== true);
10018
+ return this.options.filter((t) => t.disabled !== true);
9772
10019
  }
9773
10020
  toggleAll() {
9774
- const e = this._enabledOptions, s = this.value !== void 0 && this.value.length === e.length;
9775
- this.value = s ? [] : e.map((i) => i.value);
10021
+ const t = this._enabledOptions, s = this.value !== void 0 && this.value.length === t.length;
10022
+ this.value = s ? [] : t.map((e2) => e2.value);
9776
10023
  }
9777
10024
  toggleInvert() {
9778
- const e = this.value;
9779
- if (!e) return;
9780
- const s = this._enabledOptions.filter((i) => !e.includes(i.value));
9781
- this.value = s.map((i) => i.value);
10025
+ const t = this.value;
10026
+ if (!t) return;
10027
+ const s = this._enabledOptions.filter((e2) => !t.includes(e2.value));
10028
+ this.value = s.map((e2) => e2.value);
9782
10029
  }
9783
10030
  toggleValue() {
9784
10031
  this.value === void 0 && (this.value = []);
9785
- const e = this.value.includes(this._value);
9786
- this.value = e ? this.value.filter((s) => s !== this._value) : [...this.value, this._value];
9787
- }
9788
- constructor(e) {
9789
- super(e, false), this.options = e.options, this.value = [...e.initialValues ?? []];
9790
- const s = Math.max(this.options.findIndex(({ value: i }) => i === e.cursorAt), 0);
9791
- this.cursor = this.options[s].disabled ? x(s, 1, this.options) : s, this.on("key", (i) => {
9792
- i === "a" && this.toggleAll(), i === "i" && this.toggleInvert();
9793
- }), this.on("cursor", (i) => {
9794
- switch (i) {
10032
+ const t = this.value.includes(this._value);
10033
+ this.value = t ? this.value.filter((s) => s !== this._value) : [...this.value, this._value];
10034
+ }
10035
+ constructor(t) {
10036
+ super(t, false), this.options = t.options, this.value = [...t.initialValues ?? []];
10037
+ const s = Math.max(this.options.findIndex(({ value: e2 }) => e2 === t.cursorAt), 0);
10038
+ this.cursor = this.options[s].disabled ? f(s, 1, this.options) : s, this.on("key", (e2) => {
10039
+ e2 === "a" && this.toggleAll(), e2 === "i" && this.toggleInvert();
10040
+ }), this.on("cursor", (e2) => {
10041
+ switch (e2) {
9795
10042
  case "left":
9796
10043
  case "up":
9797
- this.cursor = x(this.cursor, -1, this.options);
10044
+ this.cursor = f(this.cursor, -1, this.options);
9798
10045
  break;
9799
10046
  case "down":
9800
10047
  case "right":
9801
- this.cursor = x(this.cursor, 1, this.options);
10048
+ this.cursor = f(this.cursor, 1, this.options);
9802
10049
  break;
9803
10050
  case "space":
9804
10051
  this.toggleValue();
@@ -9807,7 +10054,7 @@ var Lt = class extends B {
9807
10054
  });
9808
10055
  }
9809
10056
  };
9810
- var Tt = class extends B {
10057
+ var ut = class extends m {
9811
10058
  options;
9812
10059
  cursor = 0;
9813
10060
  get _selectedValue() {
@@ -9816,573 +10063,407 @@ var Tt = class extends B {
9816
10063
  changeValue() {
9817
10064
  this.value = this._selectedValue.value;
9818
10065
  }
9819
- constructor(e) {
9820
- super(e, false), this.options = e.options;
9821
- const s = this.options.findIndex(({ value: r }) => r === e.initialValue), i = s === -1 ? 0 : s;
9822
- this.cursor = this.options[i].disabled ? x(i, 1, this.options) : i, this.changeValue(), this.on("cursor", (r) => {
9823
- switch (r) {
10066
+ constructor(t) {
10067
+ super(t, false), this.options = t.options;
10068
+ const s = this.options.findIndex(({ value: i }) => i === t.initialValue), e2 = s === -1 ? 0 : s;
10069
+ this.cursor = this.options[e2].disabled ? f(e2, 1, this.options) : e2, this.changeValue(), this.on("cursor", (i) => {
10070
+ switch (i) {
9824
10071
  case "left":
9825
10072
  case "up":
9826
- this.cursor = x(this.cursor, -1, this.options);
10073
+ this.cursor = f(this.cursor, -1, this.options);
9827
10074
  break;
9828
10075
  case "down":
9829
10076
  case "right":
9830
- this.cursor = x(this.cursor, 1, this.options);
10077
+ this.cursor = f(this.cursor, 1, this.options);
9831
10078
  break;
9832
10079
  }
9833
10080
  this.changeValue();
9834
10081
  });
9835
10082
  }
9836
10083
  };
9837
- var $t = class extends B {
10084
+ var ht = class extends m {
9838
10085
  get userInputWithCursor() {
9839
10086
  if (this.state === "submit") return this.userInput;
9840
- const e = this.userInput;
9841
- if (this.cursor >= e.length) return `${this.userInput}\u2588`;
9842
- const s = e.slice(0, this.cursor), [i, ...r] = e.slice(this.cursor);
9843
- return `${s}${D("inverse", i)}${r.join("")}`;
10087
+ const t = this.userInput;
10088
+ if (this.cursor >= t.length) return `${this.userInput}\u2588`;
10089
+ const s = t.slice(0, this.cursor), [e2, ...i] = t.slice(this.cursor);
10090
+ return `${s}${v("inverse", e2)}${i.join("")}`;
9844
10091
  }
9845
10092
  get cursor() {
9846
10093
  return this._cursor;
9847
10094
  }
9848
- constructor(e) {
9849
- super({ ...e, initialUserInput: e.initialUserInput ?? e.initialValue }), this.on("userInput", (s) => {
10095
+ constructor(t) {
10096
+ super({ ...t, initialUserInput: t.initialUserInput ?? t.initialValue }), this.on("userInput", (s) => {
9850
10097
  this._setValue(s);
9851
10098
  }), this.on("finalize", () => {
9852
- this.value || (this.value = e.defaultValue), this.value === void 0 && (this.value = "");
10099
+ this.value || (this.value = t.defaultValue), this.value === void 0 && (this.value = "");
9853
10100
  });
9854
10101
  }
9855
10102
  };
9856
10103
 
9857
10104
  // ../../node_modules/@clack/prompts/dist/index.mjs
10105
+ import { styleText as e, stripVTControlCharacters as nt2 } from "node:util";
10106
+ import V2 from "node:process";
9858
10107
  var import_sisteransi2 = __toESM(require_src(), 1);
9859
- import { styleText as t, stripVTControlCharacters as ue } from "node:util";
9860
- import N2 from "node:process";
9861
- import { readdirSync as $t2, existsSync as dt2, lstatSync as xe } from "node:fs";
9862
- import { dirname as _e, join as ht2 } from "node:path";
9863
- function pt2() {
9864
- 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";
9865
- }
9866
- var ee = pt2();
9867
- var ce = () => process.env.CI === "true";
9868
- var I2 = (e, r) => ee ? e : r;
9869
- var Re = I2("\u25C6", "*");
9870
- var $e = I2("\u25A0", "x");
9871
- var de = I2("\u25B2", "x");
9872
- var V = I2("\u25C7", "o");
9873
- var he = I2("\u250C", "T");
9874
- var h = I2("\u2502", "|");
9875
- var x2 = I2("\u2514", "\u2014");
9876
- var Oe = I2("\u2510", "T");
9877
- var Pe = I2("\u2518", "\u2014");
9878
- var z2 = I2("\u25CF", ">");
9879
- var H2 = I2("\u25CB", " ");
9880
- var te = I2("\u25FB", "[\u2022]");
9881
- var U2 = I2("\u25FC", "[+]");
9882
- var q2 = I2("\u25FB", "[ ]");
9883
- var Ne = I2("\u25AA", "\u2022");
9884
- var se = I2("\u2500", "-");
9885
- var pe = I2("\u256E", "+");
9886
- var We = I2("\u251C", "+");
9887
- var me = I2("\u256F", "+");
9888
- var ge = I2("\u2570", "+");
9889
- var Ge = I2("\u256D", "+");
9890
- var fe = I2("\u25CF", "\u2022");
9891
- var Fe = I2("\u25C6", "*");
9892
- var ye = I2("\u25B2", "!");
9893
- var Ee = I2("\u25A0", "x");
9894
- var W2 = (e) => {
9895
- switch (e) {
10108
+ import { existsSync as Qt, lstatSync as wt, readdirSync as Zt } from "node:fs";
10109
+ import { dirname as bt, join as te } from "node:path";
10110
+ function ee() {
10111
+ return V2.platform !== "win32" ? V2.env.TERM !== "linux" : !!V2.env.CI || !!V2.env.WT_SESSION || !!V2.env.TERMINUS_SUBLIME || V2.env.ConEmuTask === "{cmd::Cmder}" || V2.env.TERM_PROGRAM === "Terminus-Sublime" || V2.env.TERM_PROGRAM === "vscode" || V2.env.TERM === "xterm-256color" || V2.env.TERM === "alacritty" || V2.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
10112
+ }
10113
+ var tt = ee();
10114
+ var ot2 = () => process.env.CI === "true";
10115
+ var w2 = (t, i) => tt ? t : i;
10116
+ var Tt = w2("\u25C6", "*");
10117
+ var at2 = w2("\u25A0", "x");
10118
+ var ut2 = w2("\u25B2", "x");
10119
+ var H = w2("\u25C7", "o");
10120
+ var lt = w2("\u250C", "T");
10121
+ var $ = w2("\u2502", "|");
10122
+ var x2 = w2("\u2514", "\u2014");
10123
+ var _t = w2("\u2510", "T");
10124
+ var xt = w2("\u2518", "\u2014");
10125
+ var z2 = w2("\u25CF", ">");
10126
+ var U = w2("\u25CB", " ");
10127
+ var et2 = w2("\u25FB", "[\u2022]");
10128
+ var K2 = w2("\u25FC", "[+]");
10129
+ var Y2 = w2("\u25FB", "[ ]");
10130
+ var Et = w2("\u25AA", "\u2022");
10131
+ var st = w2("\u2500", "-");
10132
+ var ct = w2("\u256E", "+");
10133
+ var Gt = w2("\u251C", "+");
10134
+ var $t = w2("\u256F", "+");
10135
+ var dt = w2("\u2570", "+");
10136
+ var Mt = w2("\u256D", "+");
10137
+ var ht2 = w2("\u25CF", "\u2022");
10138
+ var pt = w2("\u25C6", "*");
10139
+ var mt = w2("\u25B2", "!");
10140
+ var gt = w2("\u25A0", "x");
10141
+ var P = (t) => {
10142
+ switch (t) {
9896
10143
  case "initial":
9897
10144
  case "active":
9898
- return t("cyan", Re);
10145
+ return e("cyan", Tt);
9899
10146
  case "cancel":
9900
- return t("red", $e);
10147
+ return e("red", at2);
9901
10148
  case "error":
9902
- return t("yellow", de);
10149
+ return e("yellow", ut2);
9903
10150
  case "submit":
9904
- return t("green", V);
10151
+ return e("green", H);
9905
10152
  }
9906
10153
  };
9907
- var ve = (e) => {
9908
- switch (e) {
10154
+ var yt = (t) => {
10155
+ switch (t) {
9909
10156
  case "initial":
9910
10157
  case "active":
9911
- return t("cyan", h);
10158
+ return e("cyan", $);
9912
10159
  case "cancel":
9913
- return t("red", h);
10160
+ return e("red", $);
9914
10161
  case "error":
9915
- return t("yellow", h);
10162
+ return e("yellow", $);
9916
10163
  case "submit":
9917
- return t("green", h);
9918
- }
9919
- };
9920
- 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;
9921
- var gt2 = (e) => e === 12288 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510;
9922
- 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;
9923
- var we = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
9924
- var re = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
9925
- var ie = /\t{1,1000}/y;
9926
- 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");
9927
- var ne = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
9928
- var Ft2 = new RegExp("\\p{M}+", "gu");
9929
- var yt2 = { limit: 1 / 0, ellipsis: "" };
9930
- var Le = (e, r = {}, s = {}) => {
9931
- 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;
9932
- 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;
9933
- e: for (; ; ) {
9934
- if (b > A || m >= d && m > $) {
9935
- const T2 = e.slice(A, b) || e.slice($, m);
9936
- F = 0;
9937
- for (const M2 of T2.replaceAll(Ft2, "")) {
9938
- const O2 = M2.codePointAt(0) || 0;
9939
- 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) {
9940
- y2 = true;
9941
- break e;
9942
- }
9943
- F += M2.length, w += S2;
9944
- }
9945
- A = b = 0;
9946
- }
9947
- if (m >= d) break;
9948
- if (ne.lastIndex = m, ne.test(e)) {
9949
- if (F = ne.lastIndex - m, S2 = F * g, w + S2 > C && (v = Math.min(v, m + Math.floor((C - w) / g))), w + S2 > i) {
9950
- y2 = true;
9951
- break;
9952
- }
9953
- w += S2, A = $, b = m, m = $ = ne.lastIndex;
9954
- continue;
9955
- }
9956
- if (we.lastIndex = m, we.test(e)) {
9957
- if (w + u > C && (v = Math.min(v, m)), w + u > i) {
9958
- y2 = true;
9959
- break;
9960
- }
9961
- w += u, A = $, b = m, m = $ = we.lastIndex;
9962
- continue;
9963
- }
9964
- if (re.lastIndex = m, re.test(e)) {
9965
- if (F = re.lastIndex - m, S2 = F * l, w + S2 > C && (v = Math.min(v, m + Math.floor((C - w) / l))), w + S2 > i) {
9966
- y2 = true;
9967
- break;
9968
- }
9969
- w += S2, A = $, b = m, m = $ = re.lastIndex;
9970
- continue;
9971
- }
9972
- if (ie.lastIndex = m, ie.test(e)) {
9973
- if (F = ie.lastIndex - m, S2 = F * n, w + S2 > C && (v = Math.min(v, m + Math.floor((C - w) / n))), w + S2 > i) {
9974
- y2 = true;
9975
- break;
9976
- }
9977
- w += S2, A = $, b = m, m = $ = ie.lastIndex;
9978
- continue;
9979
- }
9980
- if (Ae.lastIndex = m, Ae.test(e)) {
9981
- if (w + p > C && (v = Math.min(v, m)), w + p > i) {
9982
- y2 = true;
9983
- break;
9984
- }
9985
- w += p, A = $, b = m, m = $ = Ae.lastIndex;
9986
- continue;
9987
- }
9988
- m += 1;
10164
+ return e("green", $);
9989
10165
  }
9990
- return { width: y2 ? C : w, index: y2 ? v : d, truncated: y2, ellipsed: y2 && i >= o };
9991
- };
9992
- var Et2 = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 };
9993
- var D2 = (e, r = {}) => Le(e, Et2, r).width;
9994
- var ae = "\x1B";
9995
- var je = "\x9B";
9996
- var vt2 = 39;
9997
- var Ce = "\x07";
9998
- var ke = "[";
9999
- var wt = "]";
10000
- var Ve = "m";
10001
- var Se = `${wt}8;;`;
10002
- var He = new RegExp(`(?:\\${ke}(?<code>\\d+)m|\\${Se}(?<uri>.*)${Ce})`, "y");
10003
- var At2 = (e) => {
10004
- if (e >= 30 && e <= 37 || e >= 90 && e <= 97) return 39;
10005
- if (e >= 40 && e <= 47 || e >= 100 && e <= 107) return 49;
10006
- if (e === 1 || e === 2) return 22;
10007
- if (e === 3) return 23;
10008
- if (e === 4) return 24;
10009
- if (e === 7) return 27;
10010
- if (e === 8) return 28;
10011
- if (e === 9) return 29;
10012
- if (e === 0) return 0;
10013
- };
10014
- var Ue = (e) => `${ae}${ke}${e}${Ve}`;
10015
- var Ke = (e) => `${ae}${Se}${e}${Ce}`;
10016
- var Ct2 = (e) => e.map((r) => D2(r));
10017
- var Ie = (e, r, s) => {
10018
- const i = r[Symbol.iterator]();
10019
- let a = false, o = false, u = e.at(-1), l = u === void 0 ? 0 : D2(u), n = i.next(), c = i.next(), p = 0;
10020
- for (; !n.done; ) {
10021
- const f = n.value, g = D2(f);
10022
- 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;
10023
- }
10024
- u = e.at(-1), !l && u !== void 0 && u.length > 0 && e.length > 1 && (e[e.length - 2] += e.pop());
10025
- };
10026
- var St = (e) => {
10027
- const r = e.split(" ");
10028
- let s = r.length;
10029
- for (; s > 0 && !(D2(r[s - 1]) > 0); ) s--;
10030
- return s === r.length ? e : r.slice(0, s).join(" ") + r.slice(s).join("");
10031
- };
10032
- var It2 = (e, r, s = {}) => {
10033
- if (s.trim !== false && e.trim() === "") return "";
10034
- let i = "", a, o;
10035
- const u = e.split(" "), l = Ct2(u);
10036
- let n = [""];
10037
- for (const [$, m] of u.entries()) {
10038
- s.trim !== false && (n[n.length - 1] = (n.at(-1) ?? "").trimStart());
10039
- let d = D2(n.at(-1) ?? "");
10040
- 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) {
10041
- const F = r - d, y2 = 1 + Math.floor((l[$] - F - 1) / r);
10042
- Math.floor((l[$] - 1) / r) < y2 && n.push(""), Ie(n, m, r);
10043
- continue;
10044
- }
10045
- if (d + l[$] > r && d > 0 && l[$] > 0) {
10046
- if (s.wordWrap === false && d < r) {
10047
- Ie(n, m, r);
10048
- continue;
10049
- }
10050
- n.push("");
10051
- }
10052
- if (d + l[$] > r && s.wordWrap === false) {
10053
- Ie(n, m, r);
10054
- continue;
10055
- }
10056
- n[n.length - 1] += m;
10057
- }
10058
- s.trim !== false && (n = n.map(($) => St($)));
10059
- const c = n.join(`
10060
- `), p = c[Symbol.iterator]();
10061
- let f = p.next(), g = p.next(), E = 0;
10062
- for (; !f.done; ) {
10063
- const $ = f.value, m = g.value;
10064
- if (i += $, $ === ae || $ === je) {
10065
- He.lastIndex = E + 1;
10066
- const y2 = He.exec(c)?.groups;
10067
- if (y2?.code !== void 0) {
10068
- const v = Number.parseFloat(y2.code);
10069
- a = v === vt2 ? void 0 : v;
10070
- } else y2?.uri !== void 0 && (o = y2.uri.length === 0 ? void 0 : y2.uri);
10071
- }
10072
- const d = a ? At2(a) : void 0;
10073
- m === `
10074
- ` ? (o && (i += Ke("")), a && d && (i += Ue(d))) : $ === `
10075
- ` && (a && d && (i += Ue(a)), o && (i += Ke(o))), E += $.length, f = g, g = p.next();
10076
- }
10077
- return i;
10078
10166
  };
10079
- function J2(e, r, s) {
10080
- return String(e).normalize().replaceAll(`\r
10081
- `, `
10082
- `).split(`
10083
- `).map((i) => It2(i, r, s)).join(`
10084
- `);
10085
- }
10086
- var bt2 = (e, r, s, i, a) => {
10087
- let o = r, u = 0;
10088
- for (let l = s; l < i; l++) {
10089
- const n = e[l];
10090
- if (o = o - n.length, u++, o <= a) break;
10091
- }
10092
- return { lineCount: o, removals: u };
10167
+ var Ot = (t, i, s, r, u, n = false) => {
10168
+ let a = i, c = 0;
10169
+ if (n) for (let o = r - 1; o >= s && (a -= t[o].length, c++, !(a <= u)); o--) ;
10170
+ else for (let o = s; o < r && (a -= t[o].length, c++, !(a <= u)); o++) ;
10171
+ return { lineCount: a, removals: c };
10093
10172
  };
10094
- var X2 = ({ cursor: e, options: r, style: s, output: i = process.stdout, maxItems: a = Number.POSITIVE_INFINITY, columnPadding: o = 0, rowPadding: u = 4 }) => {
10095
- 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);
10096
- let g = 0;
10097
- e >= f - 3 && (g = Math.max(Math.min(e - f + 3, r.length - f), 0));
10098
- let E = f < r.length && g > 0, $ = f < r.length && g + f < r.length;
10099
- const m = Math.min(g + f, r.length), d = [];
10100
- let F = 0;
10101
- E && F++, $ && F++;
10102
- const y2 = g + (E ? 1 : 0), v = m - ($ ? 1 : 0);
10103
- for (let A = y2; A < v; A++) {
10104
- const b = J2(s(r[A], A === e), l, { hard: true, trim: false }).split(`
10173
+ var F = ({ cursor: t, options: i, style: s, output: r = process.stdout, maxItems: u = Number.POSITIVE_INFINITY, columnPadding: n = 0, rowPadding: a = 4 }) => {
10174
+ const c = A(r) - n, o = L(r), l = e("dim", "..."), d = Math.max(o - a, 0), g = Math.max(Math.min(u, d), 5);
10175
+ let p2 = 0;
10176
+ t >= g - 3 && (p2 = Math.max(Math.min(t - g + 3, i.length - g), 0));
10177
+ let f2 = g < i.length && p2 > 0, h2 = g < i.length && p2 + g < i.length;
10178
+ const I = Math.min(p2 + g, i.length), m2 = [];
10179
+ let y = 0;
10180
+ f2 && y++, h2 && y++;
10181
+ const v2 = p2 + (f2 ? 1 : 0), C2 = I - (h2 ? 1 : 0);
10182
+ for (let b2 = v2; b2 < C2; b2++) {
10183
+ const G2 = wrapAnsi(s(i[b2], b2 === t), c, { hard: true, trim: false }).split(`
10105
10184
  `);
10106
- d.push(b), F += b.length;
10107
- }
10108
- if (F > p) {
10109
- let A = 0, b = 0, w = F;
10110
- const S2 = e - y2, T2 = (M2, O2) => bt2(d, w, M2, O2, p);
10111
- 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));
10112
- }
10113
- const C = [];
10114
- E && C.push(c);
10115
- for (const A of d) for (const b of A) C.push(b);
10116
- return $ && C.push(c), C;
10185
+ m2.push(G2), y += G2.length;
10186
+ }
10187
+ if (y > d) {
10188
+ let b2 = 0, G2 = 0, M = y;
10189
+ const N = t - v2;
10190
+ let O2 = d;
10191
+ const j2 = () => Ot(m2, M, 0, N, O2), k2 = () => Ot(m2, M, N + 1, m2.length, O2, true);
10192
+ f2 ? ({ lineCount: M, removals: b2 } = j2(), M > O2 && (h2 || (O2 -= 1), { lineCount: M, removals: G2 } = k2())) : (h2 || (O2 -= 1), { lineCount: M, removals: G2 } = k2(), M > O2 && (O2 -= 1, { lineCount: M, removals: b2 } = j2())), b2 > 0 && (f2 = true, m2.splice(0, b2)), G2 > 0 && (h2 = true, m2.splice(m2.length - G2, G2));
10193
+ }
10194
+ const S = [];
10195
+ f2 && S.push(l);
10196
+ for (const b2 of m2) for (const G2 of b2) S.push(G2);
10197
+ return h2 && S.push(l), S;
10117
10198
  };
10118
- var Rt = (e) => {
10119
- const r = e.active ?? "Yes", s = e.inactive ?? "No";
10120
- return new kt({ active: r, inactive: s, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue ?? true, render() {
10121
- const i = e.withGuide ?? _.withGuide, a = `${i ? `${t("gray", h)}
10122
- ` : ""}${W2(this.state)} ${e.message}
10123
- `, o = this.value ? r : s;
10199
+ var ue = (t) => {
10200
+ const i = t.active ?? "Yes", s = t.inactive ?? "No";
10201
+ return new X({ active: i, inactive: s, signal: t.signal, input: t.input, output: t.output, initialValue: t.initialValue ?? true, render() {
10202
+ const r = t.withGuide ?? h.withGuide, u = `${P(this.state)} `, n = r ? `${e("gray", $)} ` : "", a = W(t.output, t.message, n, u), c = `${r ? `${e("gray", $)}
10203
+ ` : ""}${a}
10204
+ `, o = this.value ? i : s;
10124
10205
  switch (this.state) {
10125
10206
  case "submit": {
10126
- const u = i ? `${t("gray", h)} ` : "";
10127
- return `${a}${u}${t("dim", o)}`;
10207
+ const l = r ? `${e("gray", $)} ` : "";
10208
+ return `${c}${l}${e("dim", o)}`;
10128
10209
  }
10129
10210
  case "cancel": {
10130
- const u = i ? `${t("gray", h)} ` : "";
10131
- return `${a}${u}${t(["strikethrough", "dim"], o)}${i ? `
10132
- ${t("gray", h)}` : ""}`;
10211
+ const l = r ? `${e("gray", $)} ` : "";
10212
+ return `${c}${l}${e(["strikethrough", "dim"], o)}${r ? `
10213
+ ${e("gray", $)}` : ""}`;
10133
10214
  }
10134
10215
  default: {
10135
- const u = i ? `${t("cyan", h)} ` : "", l = i ? t("cyan", x2) : "";
10136
- return `${a}${u}${this.value ? `${t("green", z2)} ${r}` : `${t("dim", H2)} ${t("dim", r)}`}${e.vertical ? i ? `
10137
- ${t("cyan", h)} ` : `
10138
- ` : ` ${t("dim", "/")} `}${this.value ? `${t("dim", H2)} ${t("dim", s)}` : `${t("green", z2)} ${s}`}
10139
- ${l}
10216
+ const l = r ? `${e("cyan", $)} ` : "", d = r ? e("cyan", x2) : "";
10217
+ return `${c}${l}${this.value ? `${e("green", z2)} ${i}` : `${e("dim", U)} ${e("dim", i)}`}${t.vertical ? r ? `
10218
+ ${e("cyan", $)} ` : `
10219
+ ` : ` ${e("dim", "/")} `}${this.value ? `${e("dim", U)} ${e("dim", s)}` : `${e("green", z2)} ${s}`}
10220
+ ${d}
10140
10221
  `;
10141
10222
  }
10142
10223
  }
10143
10224
  } }).prompt();
10144
10225
  };
10145
- var R2 = { message: (e = [], { symbol: r = t("gray", h), secondarySymbol: s = t("gray", h), output: i = process.stdout, spacing: a = 1, withGuide: o } = {}) => {
10146
- const u = [], l = o ?? _.withGuide, n = l ? s : "", c = l ? `${r} ` : "", p = l ? `${s} ` : "";
10147
- for (let g = 0; g < a; g++) u.push(n);
10148
- const f = Array.isArray(e) ? e : e.split(`
10226
+ var R2 = { message: (t = [], { symbol: i = e("gray", $), secondarySymbol: s = e("gray", $), output: r = process.stdout, spacing: u = 1, withGuide: n } = {}) => {
10227
+ const a = [], c = n ?? h.withGuide, o = c ? s : "", l = c ? `${i} ` : "", d = c ? `${s} ` : "";
10228
+ for (let p2 = 0; p2 < u; p2++) a.push(o);
10229
+ const g = Array.isArray(t) ? t : t.split(`
10149
10230
  `);
10150
- if (f.length > 0) {
10151
- const [g, ...E] = f;
10152
- g.length > 0 ? u.push(`${c}${g}`) : u.push(l ? r : "");
10153
- for (const $ of E) $.length > 0 ? u.push(`${p}${$}`) : u.push(l ? s : "");
10231
+ if (g.length > 0) {
10232
+ const [p2, ...f2] = g;
10233
+ p2.length > 0 ? a.push(`${l}${p2}`) : a.push(c ? i : "");
10234
+ for (const h2 of f2) h2.length > 0 ? a.push(`${d}${h2}`) : a.push(c ? s : "");
10154
10235
  }
10155
- i.write(`${u.join(`
10236
+ r.write(`${a.join(`
10156
10237
  `)}
10157
10238
  `);
10158
- }, info: (e, r) => {
10159
- R2.message(e, { ...r, symbol: t("blue", fe) });
10160
- }, success: (e, r) => {
10161
- R2.message(e, { ...r, symbol: t("green", Fe) });
10162
- }, step: (e, r) => {
10163
- R2.message(e, { ...r, symbol: t("green", V) });
10164
- }, warn: (e, r) => {
10165
- R2.message(e, { ...r, symbol: t("yellow", ye) });
10166
- }, warning: (e, r) => {
10167
- R2.warn(e, r);
10168
- }, error: (e, r) => {
10169
- R2.message(e, { ...r, symbol: t("red", Ee) });
10239
+ }, info: (t, i) => {
10240
+ R2.message(t, { ...i, symbol: e("blue", ht2) });
10241
+ }, success: (t, i) => {
10242
+ R2.message(t, { ...i, symbol: e("green", pt) });
10243
+ }, step: (t, i) => {
10244
+ R2.message(t, { ...i, symbol: e("green", H) });
10245
+ }, warn: (t, i) => {
10246
+ R2.message(t, { ...i, symbol: e("yellow", mt) });
10247
+ }, warning: (t, i) => {
10248
+ R2.warn(t, i);
10249
+ }, error: (t, i) => {
10250
+ R2.message(t, { ...i, symbol: e("red", gt) });
10170
10251
  } };
10171
- var Nt = (e = "", r) => {
10172
- const s = r?.output ?? process.stdout, i = r?.withGuide ?? _.withGuide ? `${t("gray", x2)} ` : "";
10173
- s.write(`${i}${t("red", e)}
10252
+ var me = (t = "", i) => {
10253
+ const s = i?.output ?? process.stdout, r = i?.withGuide ?? h.withGuide ? `${e("gray", x2)} ` : "";
10254
+ s.write(`${r}${e("red", t)}
10174
10255
 
10175
10256
  `);
10176
10257
  };
10177
- var Wt2 = (e = "", r) => {
10178
- const s = r?.output ?? process.stdout, i = r?.withGuide ?? _.withGuide ? `${t("gray", he)} ` : "";
10179
- s.write(`${i}${e}
10258
+ var ge = (t = "", i) => {
10259
+ const s = i?.output ?? process.stdout, r = i?.withGuide ?? h.withGuide ? `${e("gray", lt)} ` : "";
10260
+ s.write(`${r}${t}
10180
10261
  `);
10181
10262
  };
10182
- var Gt = (e = "", r) => {
10183
- const s = r?.output ?? process.stdout, i = r?.withGuide ?? _.withGuide ? `${t("gray", h)}
10184
- ${t("gray", x2)} ` : "";
10185
- s.write(`${i}${e}
10263
+ var ye = (t = "", i) => {
10264
+ const s = i?.output ?? process.stdout, r = i?.withGuide ?? h.withGuide ? `${e("gray", $)}
10265
+ ${e("gray", x2)} ` : "";
10266
+ s.write(`${r}${t}
10186
10267
 
10187
10268
  `);
10188
10269
  };
10189
- var Q2 = (e, r) => e.split(`
10190
- `).map((s) => r(s)).join(`
10270
+ var Q2 = (t, i) => t.split(`
10271
+ `).map((s) => i(s)).join(`
10191
10272
  `);
10192
- var Lt2 = (e) => {
10193
- const r = (i, a) => {
10194
- const o = i.label ?? String(i.value);
10195
- 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))}`;
10196
- }, s = e.required ?? true;
10197
- 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) {
10198
- if (s && (i === void 0 || i.length === 0)) return `Please select at least one option.
10199
- ${t("reset", t("dim", `Press ${t(["gray", "bgWhite", "inverse"], " space ")} to select, ${t("gray", t("bgWhite", t("inverse", " enter ")))} to submit`))}`;
10273
+ var ve = (t) => {
10274
+ const i = (r, u) => {
10275
+ const n = r.label ?? String(r.value);
10276
+ return u === "disabled" ? `${e("gray", Y2)} ${Q2(n, (a) => e(["strikethrough", "gray"], a))}${r.hint ? ` ${e("dim", `(${r.hint ?? "disabled"})`)}` : ""}` : u === "active" ? `${e("cyan", et2)} ${n}${r.hint ? ` ${e("dim", `(${r.hint})`)}` : ""}` : u === "selected" ? `${e("green", K2)} ${Q2(n, (a) => e("dim", a))}${r.hint ? ` ${e("dim", `(${r.hint})`)}` : ""}` : u === "cancelled" ? `${Q2(n, (a) => e(["strikethrough", "dim"], a))}` : u === "active-selected" ? `${e("green", K2)} ${n}${r.hint ? ` ${e("dim", `(${r.hint})`)}` : ""}` : u === "submitted" ? `${Q2(n, (a) => e("dim", a))}` : `${e("dim", Y2)} ${Q2(n, (a) => e("dim", a))}`;
10277
+ }, s = t.required ?? true;
10278
+ return new nt({ options: t.options, signal: t.signal, input: t.input, output: t.output, initialValues: t.initialValues, required: s, cursorAt: t.cursorAt, validate(r) {
10279
+ if (s && (r === void 0 || r.length === 0)) return `Please select at least one option.
10280
+ ${e("reset", e("dim", `Press ${e(["gray", "bgWhite", "inverse"], " space ")} to select, ${e("gray", e("bgWhite", e("inverse", " enter ")))} to submit`))}`;
10200
10281
  }, render() {
10201
- const i = Bt(e.output, e.message, `${ve(this.state)} `, `${W2(this.state)} `), a = `${t("gray", h)}
10202
- ${i}
10203
- `, o = this.value ?? [], u = (l, n) => {
10204
- if (l.disabled) return r(l, "disabled");
10205
- const c = o.includes(l.value);
10206
- return n && c ? r(l, "active-selected") : c ? r(l, "selected") : r(l, n ? "active" : "inactive");
10282
+ const r = t.withGuide ?? h.withGuide, u = W(t.output, t.message, r ? `${yt(this.state)} ` : "", `${P(this.state)} `), n = `${r ? `${e("gray", $)}
10283
+ ` : ""}${u}
10284
+ `, a = this.value ?? [], c = (o, l) => {
10285
+ if (o.disabled) return i(o, "disabled");
10286
+ const d = a.includes(o.value);
10287
+ return l && d ? i(o, "active-selected") : d ? i(o, "selected") : i(o, l ? "active" : "inactive");
10207
10288
  };
10208
10289
  switch (this.state) {
10209
10290
  case "submit": {
10210
- 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)} `);
10211
- return `${a}${n}`;
10291
+ const o = this.options.filter(({ value: d }) => a.includes(d)).map((d) => i(d, "submitted")).join(e("dim", ", ")) || e("dim", "none"), l = W(t.output, o, r ? `${e("gray", $)} ` : "");
10292
+ return `${n}${l}`;
10212
10293
  }
10213
10294
  case "cancel": {
10214
- const l = this.options.filter(({ value: c }) => o.includes(c)).map((c) => r(c, "cancelled")).join(t("dim", ", "));
10215
- if (l.trim() === "") return `${a}${t("gray", h)}`;
10216
- const n = Bt(e.output, l, `${t("gray", h)} `);
10217
- return `${a}${n}
10218
- ${t("gray", h)}`;
10295
+ const o = this.options.filter(({ value: d }) => a.includes(d)).map((d) => i(d, "cancelled")).join(e("dim", ", "));
10296
+ if (o.trim() === "") return `${n}${e("gray", $)}`;
10297
+ const l = W(t.output, o, r ? `${e("gray", $)} ` : "");
10298
+ return `${n}${l}${r ? `
10299
+ ${e("gray", $)}` : ""}`;
10219
10300
  }
10220
10301
  case "error": {
10221
- const l = `${t("yellow", h)} `, n = this.error.split(`
10222
- `).map((f, g) => g === 0 ? `${t("yellow", x2)} ${t("yellow", f)}` : ` ${f}`).join(`
10223
- `), c = a.split(`
10224
- `).length, p = n.split(`
10302
+ const o = r ? `${e("yellow", $)} ` : "", l = this.error.split(`
10303
+ `).map((p2, f2) => f2 === 0 ? `${r ? `${e("yellow", x2)} ` : ""}${e("yellow", p2)}` : ` ${p2}`).join(`
10304
+ `), d = n.split(`
10305
+ `).length, g = l.split(`
10225
10306
  `).length + 1;
10226
- 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(`
10227
- ${l}`)}
10228
- ${n}
10307
+ return `${n}${o}${F({ output: t.output, options: this.options, cursor: this.cursor, maxItems: t.maxItems, columnPadding: o.length, rowPadding: d + g, style: c }).join(`
10308
+ ${o}`)}
10309
+ ${l}
10229
10310
  `;
10230
10311
  }
10231
10312
  default: {
10232
- const l = `${t("cyan", h)} `, n = a.split(`
10233
- `).length;
10234
- 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(`
10235
- ${l}`)}
10236
- ${t("cyan", x2)}
10313
+ const o = r ? `${e("cyan", $)} ` : "", l = n.split(`
10314
+ `).length, d = r ? 2 : 1;
10315
+ return `${n}${o}${F({ output: t.output, options: this.options, cursor: this.cursor, maxItems: t.maxItems, columnPadding: o.length, rowPadding: l + d, style: c }).join(`
10316
+ ${o}`)}
10317
+ ${r ? e("cyan", x2) : ""}
10237
10318
  `;
10238
10319
  }
10239
10320
  }
10240
10321
  } }).prompt();
10241
10322
  };
10242
- var jt = (e) => t("dim", e);
10243
- var kt2 = (e, r, s) => {
10244
- const i = { hard: true, trim: false }, a = J2(e, r, i).split(`
10245
- `), o = a.reduce((n, c) => Math.max(D2(c), n), 0), u = a.map(s).reduce((n, c) => Math.max(D2(c), n), 0), l = r - (u - o);
10246
- return J2(e, l, i);
10323
+ var we = (t) => e("dim", t);
10324
+ var be = (t, i, s) => {
10325
+ const r = { hard: true, trim: false }, u = wrapAnsi(t, i, r).split(`
10326
+ `), n = u.reduce((o, l) => Math.max(dist_default2(l), o), 0), a = u.map(s).reduce((o, l) => Math.max(dist_default2(l), o), 0), c = i - (a - n);
10327
+ return wrapAnsi(t, c, r);
10247
10328
  };
10248
- var Vt2 = (e = "", r = "", s) => {
10249
- const i = s?.output ?? N2.stdout, a = s?.withGuide ?? _.withGuide, o = s?.format ?? jt, u = ["", ...kt2(e, rt(i) - 6, o).split(`
10250
- `).map(o), ""], l = D2(r), n = Math.max(u.reduce((g, E) => {
10251
- const $ = D2(E);
10252
- return $ > g ? $ : g;
10253
- }, 0), l) + 2, c = u.map((g) => `${t("gray", h)} ${g}${" ".repeat(n - D2(g))}${t("gray", h)}`).join(`
10254
- `), p = a ? `${t("gray", h)}
10255
- ` : "", f = a ? We : ge;
10256
- i.write(`${p}${t("green", V)} ${t("reset", r)} ${t("gray", se.repeat(Math.max(n - l - 1, 1)) + pe)}
10257
- ${c}
10258
- ${t("gray", f + se.repeat(n + 2) + me)}
10329
+ var Se = (t = "", i = "", s) => {
10330
+ const r = s?.output ?? V2.stdout, u = s?.withGuide ?? h.withGuide, n = s?.format ?? we, a = ["", ...be(t, A(r) - 6, n).split(`
10331
+ `).map(n), ""], c = dist_default2(i), o = Math.max(a.reduce((p2, f2) => {
10332
+ const h2 = dist_default2(f2);
10333
+ return h2 > p2 ? h2 : p2;
10334
+ }, 0), c) + 2, l = a.map((p2) => `${e("gray", $)} ${p2}${" ".repeat(o - dist_default2(p2))}${e("gray", $)}`).join(`
10335
+ `), d = u ? `${e("gray", $)}
10336
+ ` : "", g = u ? Gt : dt;
10337
+ r.write(`${d}${e("green", H)} ${e("reset", i)} ${e("gray", st.repeat(Math.max(o - c - 1, 1)) + ct)}
10338
+ ${l}
10339
+ ${e("gray", g + st.repeat(o + 2) + $t)}
10259
10340
  `);
10260
10341
  };
10261
- var Kt = (e) => t("magenta", e);
10262
- 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 } = {}) => {
10263
- const c = ce();
10264
- let p, f, g = false, E = false, $ = "", m, d = performance.now();
10265
- const F = rt(s), y2 = n?.styleFrame ?? Kt, v = (B2) => {
10266
- const P2 = B2 > 1 ? a ?? _.messages.error : i ?? _.messages.cancel;
10267
- E = B2 === 1, g && (k2(P2, B2), E && typeof r == "function" && r());
10268
- }, C = () => v(2), A = () => v(1), b = () => {
10269
- 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);
10270
- }, w = () => {
10271
- 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);
10272
- }, S2 = () => {
10273
- if (m === void 0) return;
10274
- c && s.write(`
10342
+ var Te = (t) => e("magenta", t);
10343
+ var ft = ({ indicator: t = "dots", onCancel: i, output: s = process.stdout, cancelMessage: r, errorMessage: u, frames: n = tt ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], delay: a = tt ? 80 : 120, signal: c, ...o } = {}) => {
10344
+ const l = ot2();
10345
+ let d, g, p2 = false, f2 = false, h2 = "", I, m2 = performance.now();
10346
+ const y = A(s), v2 = o?.styleFrame ?? Te, C2 = (_) => {
10347
+ const A2 = _ > 1 ? u ?? h.messages.error : r ?? h.messages.cancel;
10348
+ f2 = _ === 1, p2 && (W2(A2, _), f2 && typeof i == "function" && i());
10349
+ }, S = () => C2(2), b2 = () => C2(1), G2 = () => {
10350
+ process.on("uncaughtExceptionMonitor", S), process.on("unhandledRejection", S), process.on("SIGINT", b2), process.on("SIGTERM", b2), process.on("exit", C2), c && c.addEventListener("abort", b2);
10351
+ }, M = () => {
10352
+ process.removeListener("uncaughtExceptionMonitor", S), process.removeListener("unhandledRejection", S), process.removeListener("SIGINT", b2), process.removeListener("SIGTERM", b2), process.removeListener("exit", C2), c && c.removeEventListener("abort", b2);
10353
+ }, N = () => {
10354
+ if (I === void 0) return;
10355
+ l && s.write(`
10275
10356
  `);
10276
- const B2 = J2(m, F, { hard: true, trim: false }).split(`
10357
+ const _ = wrapAnsi(I, y, { hard: true, trim: false }).split(`
10277
10358
  `);
10278
- 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());
10279
- }, T2 = (B2) => B2.replace(/\.+$/, ""), M2 = (B2) => {
10280
- const P2 = (performance.now() - B2) / 1e3, G2 = Math.floor(P2 / 60), L2 = Math.floor(P2 % 60);
10281
- return G2 > 0 ? `[${G2}m ${L2}s]` : `[${L2}s]`;
10282
- }, O2 = n.withGuide ?? _.withGuide, le = (B2 = "") => {
10283
- g = true, p = xt({ output: s }), $ = T2(B2), d = performance.now(), O2 && s.write(`${t("gray", h)}
10359
+ _.length > 1 && s.write(import_sisteransi2.cursor.up(_.length - 1)), s.write(import_sisteransi2.cursor.to(0)), s.write(import_sisteransi2.erase.down());
10360
+ }, O2 = (_) => _.replace(/\.+$/, ""), j2 = (_) => {
10361
+ const A2 = (performance.now() - _) / 1e3, L2 = Math.floor(A2 / 60), D2 = Math.floor(A2 % 60);
10362
+ return L2 > 0 ? `[${L2}m ${D2}s]` : `[${D2}s]`;
10363
+ }, k2 = o.withGuide ?? h.withGuide, rt2 = (_ = "") => {
10364
+ p2 = true, d = R({ output: s }), h2 = O2(_), m2 = performance.now(), k2 && s.write(`${e("gray", $)}
10284
10365
  `);
10285
- let P2 = 0, G2 = 0;
10286
- b(), f = setInterval(() => {
10287
- if (c && $ === m) return;
10288
- S2(), m = $;
10289
- const L2 = y2(o[P2]);
10290
- let Z2;
10291
- if (c) Z2 = `${L2} ${$}...`;
10292
- else if (e === "timer") Z2 = `${L2} ${$} ${M2(d)}`;
10366
+ let A2 = 0, L2 = 0;
10367
+ G2(), g = setInterval(() => {
10368
+ if (l && h2 === I) return;
10369
+ N(), I = h2;
10370
+ const D2 = v2(n[A2]);
10371
+ let Z;
10372
+ if (l) Z = `${D2} ${h2}...`;
10373
+ else if (t === "timer") Z = `${D2} ${h2} ${j2(m2)}`;
10293
10374
  else {
10294
- const et2 = ".".repeat(Math.floor(G2)).slice(0, 3);
10295
- Z2 = `${L2} ${$}${et2}`;
10296
- }
10297
- const Ze = J2(Z2, F, { hard: true, trim: false });
10298
- s.write(Ze), P2 = P2 + 1 < o.length ? P2 + 1 : 0, G2 = G2 < 4 ? G2 + 0.125 : 0;
10299
- }, u);
10300
- }, k2 = (B2 = "", P2 = 0, G2 = false) => {
10301
- if (!g) return;
10302
- g = false, clearInterval(f), S2();
10303
- const L2 = P2 === 0 ? t("green", V) : P2 === 1 ? t("red", $e) : t("red", de);
10304
- $ = B2 ?? $, G2 || (e === "timer" ? s.write(`${L2} ${$} ${M2(d)}
10305
- `) : s.write(`${L2} ${$}
10306
- `)), w(), p();
10375
+ const kt = ".".repeat(Math.floor(L2)).slice(0, 3);
10376
+ Z = `${D2} ${h2}${kt}`;
10377
+ }
10378
+ const Bt = wrapAnsi(Z, y, { hard: true, trim: false });
10379
+ s.write(Bt), A2 = A2 + 1 < n.length ? A2 + 1 : 0, L2 = L2 < 4 ? L2 + 0.125 : 0;
10380
+ }, a);
10381
+ }, W2 = (_ = "", A2 = 0, L2 = false) => {
10382
+ if (!p2) return;
10383
+ p2 = false, clearInterval(g), N();
10384
+ const D2 = A2 === 0 ? e("green", H) : A2 === 1 ? e("red", at2) : e("red", ut2);
10385
+ h2 = _ ?? h2, L2 || (t === "timer" ? s.write(`${D2} ${h2} ${j2(m2)}
10386
+ `) : s.write(`${D2} ${h2}
10387
+ `)), M(), d();
10307
10388
  };
10308
- return { start: le, stop: (B2 = "") => k2(B2, 0), message: (B2 = "") => {
10309
- $ = T2(B2 ?? $);
10310
- }, cancel: (B2 = "") => k2(B2, 1), error: (B2 = "") => k2(B2, 2), clear: () => k2("", 0, true), get isCancelled() {
10311
- return E;
10389
+ return { start: rt2, stop: (_ = "") => W2(_, 0), message: (_ = "") => {
10390
+ h2 = O2(_ ?? h2);
10391
+ }, cancel: (_ = "") => W2(_, 1), error: (_ = "") => W2(_, 2), clear: () => W2("", 0, true), get isCancelled() {
10392
+ return f2;
10312
10393
  } };
10313
10394
  };
10314
- var ze = { light: I2("\u2500", "-"), heavy: I2("\u2501", "="), block: I2("\u2588", "#") };
10315
- var oe = (e, r) => e.includes(`
10316
- `) ? e.split(`
10317
- `).map((s) => r(s)).join(`
10318
- `) : r(e);
10319
- var Jt = (e) => {
10320
- const r = (s, i) => {
10321
- const a = s.label ?? String(s.value);
10322
- switch (i) {
10395
+ var jt = { light: w2("\u2500", "-"), heavy: w2("\u2501", "="), block: w2("\u2588", "#") };
10396
+ var it2 = (t, i) => t.includes(`
10397
+ `) ? t.split(`
10398
+ `).map((s) => i(s)).join(`
10399
+ `) : i(t);
10400
+ var xe = (t) => {
10401
+ const i = (s, r) => {
10402
+ const u = s.label ?? String(s.value);
10403
+ switch (r) {
10323
10404
  case "disabled":
10324
- return `${t("gray", H2)} ${oe(a, (o) => t("gray", o))}${s.hint ? ` ${t("dim", `(${s.hint ?? "disabled"})`)}` : ""}`;
10405
+ return `${e("gray", U)} ${it2(u, (n) => e("gray", n))}${s.hint ? ` ${e("dim", `(${s.hint ?? "disabled"})`)}` : ""}`;
10325
10406
  case "selected":
10326
- return `${oe(a, (o) => t("dim", o))}`;
10407
+ return `${it2(u, (n) => e("dim", n))}`;
10327
10408
  case "active":
10328
- return `${t("green", z2)} ${a}${s.hint ? ` ${t("dim", `(${s.hint})`)}` : ""}`;
10409
+ return `${e("green", z2)} ${u}${s.hint ? ` ${e("dim", `(${s.hint})`)}` : ""}`;
10329
10410
  case "cancelled":
10330
- return `${oe(a, (o) => t(["strikethrough", "dim"], o))}`;
10411
+ return `${it2(u, (n) => e(["strikethrough", "dim"], n))}`;
10331
10412
  default:
10332
- return `${t("dim", H2)} ${oe(a, (o) => t("dim", o))}`;
10413
+ return `${e("dim", U)} ${it2(u, (n) => e("dim", n))}`;
10333
10414
  }
10334
10415
  };
10335
- return new Tt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue, render() {
10336
- 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)}
10337
- ` : ""}${o}
10416
+ return new ut({ options: t.options, signal: t.signal, input: t.input, output: t.output, initialValue: t.initialValue, render() {
10417
+ const s = t.withGuide ?? h.withGuide, r = `${P(this.state)} `, u = `${yt(this.state)} `, n = W(t.output, t.message, u, r), a = `${s ? `${e("gray", $)}
10418
+ ` : ""}${n}
10338
10419
  `;
10339
10420
  switch (this.state) {
10340
10421
  case "submit": {
10341
- const l = s ? `${t("gray", h)} ` : "", n = Bt(e.output, r(this.options[this.cursor], "selected"), l);
10342
- return `${u}${n}`;
10422
+ const c = s ? `${e("gray", $)} ` : "", o = W(t.output, i(this.options[this.cursor], "selected"), c);
10423
+ return `${a}${o}`;
10343
10424
  }
10344
10425
  case "cancel": {
10345
- const l = s ? `${t("gray", h)} ` : "", n = Bt(e.output, r(this.options[this.cursor], "cancelled"), l);
10346
- return `${u}${n}${s ? `
10347
- ${t("gray", h)}` : ""}`;
10426
+ const c = s ? `${e("gray", $)} ` : "", o = W(t.output, i(this.options[this.cursor], "cancelled"), c);
10427
+ return `${a}${o}${s ? `
10428
+ ${e("gray", $)}` : ""}`;
10348
10429
  }
10349
10430
  default: {
10350
- const l = s ? `${t("cyan", h)} ` : "", n = s ? t("cyan", x2) : "", c = u.split(`
10351
- `).length, p = s ? 2 : 1;
10352
- 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(`
10353
- ${l}`)}
10354
- ${n}
10431
+ const c = s ? `${e("cyan", $)} ` : "", o = s ? e("cyan", x2) : "", l = a.split(`
10432
+ `).length, d = s ? 2 : 1;
10433
+ return `${a}${c}${F({ output: t.output, cursor: this.cursor, options: this.options, maxItems: t.maxItems, columnPadding: c.length, rowPadding: l + d, style: (g, p2) => i(g, g.disabled ? "disabled" : p2 ? "active" : "inactive") }).join(`
10434
+ ${c}`)}
10435
+ ${o}
10355
10436
  `;
10356
10437
  }
10357
10438
  }
10358
10439
  } }).prompt();
10359
10440
  };
10360
- var Qe = `${t("gray", h)} `;
10361
- var Zt = (e) => new $t({ validate: e.validate, placeholder: e.placeholder, defaultValue: e.defaultValue, initialValue: e.initialValue, output: e.output, signal: e.signal, input: e.input, render() {
10362
- const r = e?.withGuide ?? _.withGuide, s = `${`${r ? `${t("gray", h)}
10363
- ` : ""}${W2(this.state)} `}${e.message}
10364
- `, i = e.placeholder ? t("inverse", e.placeholder[0]) + t("dim", e.placeholder.slice(1)) : t(["inverse", "hidden"], "_"), a = this.userInput ? this.userInputWithCursor : i, o = this.value ?? "";
10441
+ var Nt = `${e("gray", $)} `;
10442
+ var Pe = (t) => new ht({ validate: t.validate, placeholder: t.placeholder, defaultValue: t.defaultValue, initialValue: t.initialValue, output: t.output, signal: t.signal, input: t.input, render() {
10443
+ const i = t?.withGuide ?? h.withGuide, s = `${`${i ? `${e("gray", $)}
10444
+ ` : ""}${P(this.state)} `}${t.message}
10445
+ `, r = t.placeholder ? e("inverse", t.placeholder[0]) + e("dim", t.placeholder.slice(1)) : e(["inverse", "hidden"], "_"), u = this.userInput ? this.userInputWithCursor : r, n = this.value ?? "";
10365
10446
  switch (this.state) {
10366
10447
  case "error": {
10367
- const u = this.error ? ` ${t("yellow", this.error)}` : "", l = r ? `${t("yellow", h)} ` : "", n = r ? t("yellow", x2) : "";
10448
+ const a = this.error ? ` ${e("yellow", this.error)}` : "", c = i ? `${e("yellow", $)} ` : "", o = i ? e("yellow", x2) : "";
10368
10449
  return `${s.trim()}
10369
- ${l}${a}
10370
- ${n}${u}
10450
+ ${c}${u}
10451
+ ${o}${a}
10371
10452
  `;
10372
10453
  }
10373
10454
  case "submit": {
10374
- const u = o ? ` ${t("dim", o)}` : "", l = r ? t("gray", h) : "";
10375
- return `${s}${l}${u}`;
10455
+ const a = n ? ` ${e("dim", n)}` : "", c = i ? e("gray", $) : "";
10456
+ return `${s}${c}${a}`;
10376
10457
  }
10377
10458
  case "cancel": {
10378
- const u = o ? ` ${t(["strikethrough", "dim"], o)}` : "", l = r ? t("gray", h) : "";
10379
- return `${s}${l}${u}${o.trim() ? `
10380
- ${l}` : ""}`;
10459
+ const a = n ? ` ${e(["strikethrough", "dim"], n)}` : "", c = i ? e("gray", $) : "";
10460
+ return `${s}${c}${a}${n.trim() ? `
10461
+ ${c}` : ""}`;
10381
10462
  }
10382
10463
  default: {
10383
- const u = r ? `${t("cyan", h)} ` : "", l = r ? t("cyan", x2) : "";
10384
- return `${s}${u}${a}
10385
- ${l}
10464
+ const a = i ? `${e("cyan", $)} ` : "", c = i ? e("cyan", x2) : "";
10465
+ return `${s}${a}${u}
10466
+ ${c}
10386
10467
  `;
10387
10468
  }
10388
10469
  }
@@ -10917,21 +10998,21 @@ function parseInlineTable(str, ptr, depth, integersAsBigInt) {
10917
10998
  ptr = skipComment(str, ptr);
10918
10999
  else if (c !== " " && c !== " " && c !== "\n" && c !== "\r") {
10919
11000
  let k2;
10920
- let t2 = res;
11001
+ let t = res;
10921
11002
  let hasOwn = false;
10922
11003
  let [key, keyEndPtr] = parseKey(str, ptr - 1);
10923
11004
  for (let i = 0; i < key.length; i++) {
10924
11005
  if (i)
10925
- t2 = hasOwn ? t2[k2] : t2[k2] = {};
11006
+ t = hasOwn ? t[k2] : t[k2] = {};
10926
11007
  k2 = key[i];
10927
- if ((hasOwn = Object.hasOwn(t2, k2)) && (typeof t2[k2] !== "object" || seen.has(t2[k2]))) {
11008
+ if ((hasOwn = Object.hasOwn(t, k2)) && (typeof t[k2] !== "object" || seen.has(t[k2]))) {
10928
11009
  throw new TomlError("trying to redefine an already defined value", {
10929
11010
  toml: str,
10930
11011
  ptr
10931
11012
  });
10932
11013
  }
10933
11014
  if (!hasOwn && k2 === "__proto__") {
10934
- Object.defineProperty(t2, k2, { enumerable: true, configurable: true, writable: true });
11015
+ Object.defineProperty(t, k2, { enumerable: true, configurable: true, writable: true });
10935
11016
  }
10936
11017
  }
10937
11018
  if (hasOwn) {
@@ -10942,7 +11023,7 @@ function parseInlineTable(str, ptr, depth, integersAsBigInt) {
10942
11023
  }
10943
11024
  let [value, valueEndPtr] = extractValue(str, keyEndPtr, "}", depth - 1, integersAsBigInt);
10944
11025
  seen.add(value);
10945
- t2[k2] = value;
11026
+ t[k2] = value;
10946
11027
  ptr = valueEndPtr;
10947
11028
  }
10948
11029
  }
@@ -10967,9 +11048,9 @@ function parseArray(str, ptr, depth, integersAsBigInt) {
10967
11048
  } else if (c === "#")
10968
11049
  ptr = skipComment(str, ptr);
10969
11050
  else if (c !== " " && c !== " " && c !== "\n" && c !== "\r") {
10970
- let e = extractValue(str, ptr - 1, "]", depth - 1, integersAsBigInt);
10971
- res.push(e[0]);
10972
- ptr = e[1];
11051
+ let e2 = extractValue(str, ptr - 1, "]", depth - 1, integersAsBigInt);
11052
+ res.push(e2[0]);
11053
+ ptr = e2[1];
10973
11054
  }
10974
11055
  }
10975
11056
  if (!c) {
@@ -10983,34 +11064,34 @@ function parseArray(str, ptr, depth, integersAsBigInt) {
10983
11064
 
10984
11065
  // ../../node_modules/smol-toml/dist/parse.js
10985
11066
  function peekTable(key, table, meta, type) {
10986
- let t2 = table;
10987
- let m = meta;
11067
+ let t = table;
11068
+ let m2 = meta;
10988
11069
  let k2;
10989
11070
  let hasOwn = false;
10990
11071
  let state;
10991
11072
  for (let i = 0; i < key.length; i++) {
10992
11073
  if (i) {
10993
- t2 = hasOwn ? t2[k2] : t2[k2] = {};
10994
- m = (state = m[k2]).c;
11074
+ t = hasOwn ? t[k2] : t[k2] = {};
11075
+ m2 = (state = m2[k2]).c;
10995
11076
  if (type === 0 && (state.t === 1 || state.t === 2)) {
10996
11077
  return null;
10997
11078
  }
10998
11079
  if (state.t === 2) {
10999
- let l = t2.length - 1;
11000
- t2 = t2[l];
11001
- m = m[l].c;
11080
+ let l = t.length - 1;
11081
+ t = t[l];
11082
+ m2 = m2[l].c;
11002
11083
  }
11003
11084
  }
11004
11085
  k2 = key[i];
11005
- if ((hasOwn = Object.hasOwn(t2, k2)) && m[k2]?.t === 0 && m[k2]?.d) {
11086
+ if ((hasOwn = Object.hasOwn(t, k2)) && m2[k2]?.t === 0 && m2[k2]?.d) {
11006
11087
  return null;
11007
11088
  }
11008
11089
  if (!hasOwn) {
11009
11090
  if (k2 === "__proto__") {
11010
- Object.defineProperty(t2, k2, { enumerable: true, configurable: true, writable: true });
11011
- Object.defineProperty(m, k2, { enumerable: true, configurable: true, writable: true });
11091
+ Object.defineProperty(t, k2, { enumerable: true, configurable: true, writable: true });
11092
+ Object.defineProperty(m2, k2, { enumerable: true, configurable: true, writable: true });
11012
11093
  }
11013
- m[k2] = {
11094
+ m2[k2] = {
11014
11095
  t: i < key.length - 1 && type === 2 ? 3 : type,
11015
11096
  d: false,
11016
11097
  i: 0,
@@ -11018,16 +11099,16 @@ function peekTable(key, table, meta, type) {
11018
11099
  };
11019
11100
  }
11020
11101
  }
11021
- state = m[k2];
11102
+ state = m2[k2];
11022
11103
  if (state.t !== type && !(type === 1 && state.t === 3)) {
11023
11104
  return null;
11024
11105
  }
11025
11106
  if (type === 2) {
11026
11107
  if (!state.d) {
11027
11108
  state.d = true;
11028
- t2[k2] = [];
11109
+ t[k2] = [];
11029
11110
  }
11030
- t2[k2].push(t2 = {});
11111
+ t[k2].push(t = {});
11031
11112
  state.c[state.i++] = state = { t: 1, d: false, i: 0, c: {} };
11032
11113
  }
11033
11114
  if (state.d) {
@@ -11035,17 +11116,17 @@ function peekTable(key, table, meta, type) {
11035
11116
  }
11036
11117
  state.d = true;
11037
11118
  if (type === 1) {
11038
- t2 = hasOwn ? t2[k2] : t2[k2] = {};
11119
+ t = hasOwn ? t[k2] : t[k2] = {};
11039
11120
  } else if (type === 0 && hasOwn) {
11040
11121
  return null;
11041
11122
  }
11042
- return [k2, t2, state.c];
11123
+ return [k2, t, state.c];
11043
11124
  }
11044
11125
  function parse(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
11045
11126
  let res = {};
11046
11127
  let meta = {};
11047
11128
  let tbl = res;
11048
- let m = meta;
11129
+ let m2 = meta;
11049
11130
  for (let ptr = skipVoid(toml, 0); ptr < toml.length; ) {
11050
11131
  if (toml[ptr] === "[") {
11051
11132
  let isTableArray = toml[++ptr] === "[";
@@ -11059,40 +11140,40 @@ function parse(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
11059
11140
  }
11060
11141
  k2[1]++;
11061
11142
  }
11062
- let p = peekTable(
11143
+ let p2 = peekTable(
11063
11144
  k2[0],
11064
11145
  res,
11065
11146
  meta,
11066
11147
  isTableArray ? 2 : 1
11067
11148
  /* Type.EXPLICIT */
11068
11149
  );
11069
- if (!p) {
11150
+ if (!p2) {
11070
11151
  throw new TomlError("trying to redefine an already defined table or value", {
11071
11152
  toml,
11072
11153
  ptr
11073
11154
  });
11074
11155
  }
11075
- m = p[2];
11076
- tbl = p[1];
11156
+ m2 = p2[2];
11157
+ tbl = p2[1];
11077
11158
  ptr = k2[1];
11078
11159
  } else {
11079
11160
  let k2 = parseKey(toml, ptr);
11080
- let p = peekTable(
11161
+ let p2 = peekTable(
11081
11162
  k2[0],
11082
11163
  tbl,
11083
- m,
11164
+ m2,
11084
11165
  0
11085
11166
  /* Type.DOTTED */
11086
11167
  );
11087
- if (!p) {
11168
+ if (!p2) {
11088
11169
  throw new TomlError("trying to redefine an already defined table or value", {
11089
11170
  toml,
11090
11171
  ptr
11091
11172
  });
11092
11173
  }
11093
- let v = extractValue(toml, k2[1], void 0, maxDepth, integersAsBigInt);
11094
- p[1][p[0]] = v[0];
11095
- ptr = v[1];
11174
+ let v2 = extractValue(toml, k2[1], void 0, maxDepth, integersAsBigInt);
11175
+ p2[1][p2[0]] = v2[0];
11176
+ ptr = v2[1];
11096
11177
  }
11097
11178
  ptr = skipVoid(toml, ptr, true);
11098
11179
  if (toml[ptr] && toml[ptr] !== "\n" && toml[ptr] !== "\r") {
@@ -11672,30 +11753,30 @@ var CharacterCodes;
11672
11753
  })(CharacterCodes || (CharacterCodes = {}));
11673
11754
 
11674
11755
  // ../../node_modules/jsonc-parser/lib/esm/impl/string-intern.js
11675
- var cachedSpaces = new Array(20).fill(0).map((_2, index) => {
11756
+ var cachedSpaces = new Array(20).fill(0).map((_, index) => {
11676
11757
  return " ".repeat(index);
11677
11758
  });
11678
11759
  var maxCachedValues = 200;
11679
11760
  var cachedBreakLinesWithSpaces = {
11680
11761
  " ": {
11681
- "\n": new Array(maxCachedValues).fill(0).map((_2, index) => {
11762
+ "\n": new Array(maxCachedValues).fill(0).map((_, index) => {
11682
11763
  return "\n" + " ".repeat(index);
11683
11764
  }),
11684
- "\r": new Array(maxCachedValues).fill(0).map((_2, index) => {
11765
+ "\r": new Array(maxCachedValues).fill(0).map((_, index) => {
11685
11766
  return "\r" + " ".repeat(index);
11686
11767
  }),
11687
- "\r\n": new Array(maxCachedValues).fill(0).map((_2, index) => {
11768
+ "\r\n": new Array(maxCachedValues).fill(0).map((_, index) => {
11688
11769
  return "\r\n" + " ".repeat(index);
11689
11770
  })
11690
11771
  },
11691
11772
  " ": {
11692
- "\n": new Array(maxCachedValues).fill(0).map((_2, index) => {
11773
+ "\n": new Array(maxCachedValues).fill(0).map((_, index) => {
11693
11774
  return "\n" + " ".repeat(index);
11694
11775
  }),
11695
- "\r": new Array(maxCachedValues).fill(0).map((_2, index) => {
11776
+ "\r": new Array(maxCachedValues).fill(0).map((_, index) => {
11696
11777
  return "\r" + " ".repeat(index);
11697
11778
  }),
11698
- "\r\n": new Array(maxCachedValues).fill(0).map((_2, index) => {
11779
+ "\r\n": new Array(maxCachedValues).fill(0).map((_, index) => {
11699
11780
  return "\r\n" + " ".repeat(index);
11700
11781
  })
11701
11782
  }
@@ -12457,7 +12538,7 @@ function setProperty(text, originalPath, value, options) {
12457
12538
  return [];
12458
12539
  }
12459
12540
  const newProperty = `${JSON.stringify(lastSegment)}: ${JSON.stringify(value)}`;
12460
- const index = options.getInsertionIndex ? options.getInsertionIndex(parent.children.map((p) => p.children[0].value)) : parent.children.length;
12541
+ const index = options.getInsertionIndex ? options.getInsertionIndex(parent.children.map((p2) => p2.children[0].value)) : parent.children.length;
12461
12542
  let edit;
12462
12543
  if (index > 0) {
12463
12544
  let previous = parent.children[index - 1];
@@ -12602,22 +12683,22 @@ function modify(text, path5, value, options) {
12602
12683
  return setProperty(text, path5, value, options);
12603
12684
  }
12604
12685
  function applyEdits(text, edits) {
12605
- let sortedEdits = edits.slice(0).sort((a, b) => {
12606
- const diff = a.offset - b.offset;
12686
+ let sortedEdits = edits.slice(0).sort((a, b2) => {
12687
+ const diff = a.offset - b2.offset;
12607
12688
  if (diff === 0) {
12608
- return a.length - b.length;
12689
+ return a.length - b2.length;
12609
12690
  }
12610
12691
  return diff;
12611
12692
  });
12612
12693
  let lastModifiedOffset = text.length;
12613
12694
  for (let i = sortedEdits.length - 1; i >= 0; i--) {
12614
- let e = sortedEdits[i];
12615
- if (e.offset + e.length <= lastModifiedOffset) {
12616
- text = applyEdit(text, e);
12695
+ let e2 = sortedEdits[i];
12696
+ if (e2.offset + e2.length <= lastModifiedOffset) {
12697
+ text = applyEdit(text, e2);
12617
12698
  } else {
12618
12699
  throw new Error("Overlapping edit");
12619
12700
  }
12620
- lastModifiedOffset = e.offset;
12701
+ lastModifiedOffset = e2.offset;
12621
12702
  }
12622
12703
  return text;
12623
12704
  }
@@ -12641,6 +12722,11 @@ function resolveBundledDir(dirName) {
12641
12722
  var SKILLS_DIR = resolveBundledDir("skills");
12642
12723
  var RULES_DIR = resolveBundledDir("rules");
12643
12724
  var AGENTS_DIR = resolveBundledDir("agents");
12725
+ var ARGENT_SKILLS_REPO = "software-mansion/argent/packages/skills/skills";
12726
+ function buildArgentSkillsSource(version) {
12727
+ if (!version || version === "unknown") return SKILLS_DIR;
12728
+ return `${ARGENT_SKILLS_REPO}#v${version}`;
12729
+ }
12644
12730
  function listBundledSkills(skillsDir = SKILLS_DIR) {
12645
12731
  try {
12646
12732
  return fs.readdirSync(skillsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => entry.name).filter((name) => fs.existsSync(path.join(skillsDir, name, "SKILL.md"))).sort();
@@ -12715,7 +12801,7 @@ function readYaml(filePath) {
12715
12801
  const text = fs.readFileSync(filePath, "utf8");
12716
12802
  const doc = (0, import_yaml.parseDocument)(text);
12717
12803
  if (doc.errors.length > 0) {
12718
- const messages = doc.errors.map((e) => e.message).join("; ");
12804
+ const messages = doc.errors.map((e2) => e2.message).join("; ");
12719
12805
  throw new Error(`Failed to parse YAML at ${filePath}: ${messages}`);
12720
12806
  }
12721
12807
  return doc;
@@ -12797,9 +12883,9 @@ function editJsoncFile(filePath, jsonPath, value) {
12797
12883
  fs.mkdirSync(path.dirname(filePath), { recursive: true });
12798
12884
  fs.writeFileSync(filePath, (hadBom ? "\uFEFF" : "") + text);
12799
12885
  }
12800
- function dirExists(p) {
12886
+ function dirExists(p2) {
12801
12887
  try {
12802
- return fs.statSync(p).isDirectory();
12888
+ return fs.statSync(p2).isDirectory();
12803
12889
  } catch {
12804
12890
  return false;
12805
12891
  }
@@ -12931,7 +13017,7 @@ var TOOL_SERVER_BUNDLE = path2.join(import.meta.dirname, "tool-server.cjs");
12931
13017
  function getAvailableToolIds() {
12932
13018
  const out = execFileSync("node", [TOOL_SERVER_BUNDLE, "-t"], { encoding: "utf8" });
12933
13019
  const tools = JSON.parse(out);
12934
- return tools.map((t2) => t2.id);
13020
+ return tools.map((t) => t.id);
12935
13021
  }
12936
13022
  function buildMcpEntry() {
12937
13023
  const logFile = path2.join(homedir2(), ".argent", "mcp-calls.log");
@@ -13567,7 +13653,7 @@ function stripFrontmatter(content) {
13567
13653
  }
13568
13654
  function readAndConcatRules(rulesDir) {
13569
13655
  if (!fs2.existsSync(rulesDir)) return null;
13570
- const files = fs2.readdirSync(rulesDir).filter((f) => f.endsWith(".md")).sort();
13656
+ const files = fs2.readdirSync(rulesDir).filter((f2) => f2.endsWith(".md")).sort();
13571
13657
  if (files.length === 0) return null;
13572
13658
  const parts = [];
13573
13659
  for (const file of files) {
@@ -13582,19 +13668,19 @@ function injectArgentSection(existing, rules) {
13582
13668
  ${rules}
13583
13669
  ${ARGENT_RULES_END}`;
13584
13670
  if (!existing) return section;
13585
- const re2 = new RegExp(
13671
+ const re = new RegExp(
13586
13672
  `${escapeRegExp(ARGENT_RULES_START)}[\\s\\S]*?${escapeRegExp(ARGENT_RULES_END)}`
13587
13673
  );
13588
- if (re2.test(existing)) return existing.replace(re2, section);
13674
+ if (re.test(existing)) return existing.replace(re, section);
13589
13675
  return `${existing}
13590
13676
 
13591
13677
  ${section}`;
13592
13678
  }
13593
13679
  function removeArgentSection(existing) {
13594
- const re2 = new RegExp(
13680
+ const re = new RegExp(
13595
13681
  `\\n*${escapeRegExp(ARGENT_RULES_START)}[\\s\\S]*?${escapeRegExp(ARGENT_RULES_END)}\\n*`
13596
13682
  );
13597
- return existing.replace(re2, "").trim();
13683
+ return existing.replace(re, "").trim();
13598
13684
  }
13599
13685
  function escapeRegExp(s) {
13600
13686
  return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
@@ -13668,13 +13754,13 @@ function getScopeSpecs(projectRoot) {
13668
13754
  {
13669
13755
  scope: "project",
13670
13756
  lockPath: getProjectSkillLockPath(projectRoot),
13671
- addArgs: ["skills", "add", SKILLS_DIR, "--skill", "*", "-y"],
13757
+ buildAddArgs: (source) => ["skills", "add", source, "--skill", "*", "-y"],
13672
13758
  removeArgs: ["skills", "remove", "-y"]
13673
13759
  },
13674
13760
  {
13675
13761
  scope: "global",
13676
13762
  lockPath: getGlobalSkillLockPath(),
13677
- addArgs: ["skills", "add", SKILLS_DIR, "--skill", "*", "-y", "-g"],
13763
+ buildAddArgs: (source) => ["skills", "add", source, "--skill", "*", "-y", "-g"],
13678
13764
  removeArgs: ["skills", "remove", "-y", "-g"]
13679
13765
  }
13680
13766
  ];
@@ -13682,6 +13768,7 @@ function getScopeSpecs(projectRoot) {
13682
13768
  function refreshArgentSkills(projectRoot) {
13683
13769
  const bundled = new Set(listBundledSkills());
13684
13770
  const results = [];
13771
+ const primarySource = buildArgentSkillsSource(getInstalledVersion());
13685
13772
  for (const spec of getScopeSpecs(projectRoot)) {
13686
13773
  const tracked = listArgentSkillsInLock(spec.lockPath);
13687
13774
  if (tracked.length === 0) continue;
@@ -13695,10 +13782,23 @@ function refreshArgentSkills(projectRoot) {
13695
13782
  };
13696
13783
  if (bundled.size > 0) {
13697
13784
  try {
13698
- execFileSync2("npx", spec.addArgs, { stdio: ["ignore", "pipe", "pipe"] });
13785
+ execFileSync2("npx", spec.buildAddArgs(primarySource), {
13786
+ stdio: ["ignore", "pipe", "pipe"]
13787
+ });
13699
13788
  result.synced = bundled.size;
13700
- } catch (err) {
13701
- result.syncError = err instanceof Error ? err.message.split("\n")[0] : String(err);
13789
+ } catch (primaryErr) {
13790
+ if (primarySource === SKILLS_DIR) {
13791
+ result.syncError = primaryErr instanceof Error ? primaryErr.message.split("\n")[0] : String(primaryErr);
13792
+ } else {
13793
+ try {
13794
+ execFileSync2("npx", spec.buildAddArgs(SKILLS_DIR), {
13795
+ stdio: ["ignore", "pipe", "pipe"]
13796
+ });
13797
+ result.synced = bundled.size;
13798
+ } catch (fallbackErr) {
13799
+ result.syncError = fallbackErr instanceof Error ? fallbackErr.message.split("\n")[0] : String(fallbackErr);
13800
+ }
13801
+ }
13702
13802
  }
13703
13803
  }
13704
13804
  if (orphaned.length > 0) {
@@ -13764,13 +13864,13 @@ async function init(args) {
13764
13864
  const nonInteractive = args.includes("--yes") || args.includes("-y");
13765
13865
  const fromTar = extractFlag(args, "--from");
13766
13866
  printBanner();
13767
- Wt2(import_picocolors2.default.bgCyan(import_picocolors2.default.black(" argent init ")));
13867
+ ge(import_picocolors2.default.bgCyan(import_picocolors2.default.black(" argent init ")));
13768
13868
  let version = getInstalledVersion() ?? "unknown";
13769
13869
  R2.info(`${import_picocolors2.default.dim("Package:")} ${PACKAGE_NAME}@${version}`);
13770
13870
  const globallyInstalled = isGloballyInstalled();
13771
13871
  if (!globallyInstalled) {
13772
13872
  if (!nonInteractive) {
13773
- const installChoice = await Jt({
13873
+ const installChoice = await xe({
13774
13874
  message: "Argent is not installed globally. Would you like to install it?",
13775
13875
  options: [
13776
13876
  {
@@ -13784,8 +13884,8 @@ async function init(args) {
13784
13884
  }
13785
13885
  ]
13786
13886
  });
13787
- if (Ct(installChoice) || installChoice === "cancel") {
13788
- Nt("Installation cancelled.");
13887
+ if (q(installChoice) || installChoice === "cancel") {
13888
+ me("Installation cancelled.");
13789
13889
  process.exit(0);
13790
13890
  }
13791
13891
  }
@@ -13793,7 +13893,7 @@ async function init(args) {
13793
13893
  const installTarget = fromTar ?? PACKAGE_NAME;
13794
13894
  const cmd = globalInstallCommand(pm, installTarget);
13795
13895
  const cmdStr = formatShellCommand(cmd);
13796
- const spinner = be();
13896
+ const spinner = ft();
13797
13897
  spinner.start(`Installing ${PACKAGE_NAME} globally...`);
13798
13898
  try {
13799
13899
  await runShellCommand(cmd);
@@ -13809,7 +13909,7 @@ async function init(args) {
13809
13909
  const pm = detectPackageManager();
13810
13910
  const cmd = globalInstallCommand(pm, fromTar);
13811
13911
  const cmdStr = formatShellCommand(cmd);
13812
- const spinner = be();
13912
+ const spinner = ft();
13813
13913
  spinner.start(`Installing from ${fromTar}...`);
13814
13914
  try {
13815
13915
  await runShellCommand(cmd);
@@ -13823,7 +13923,7 @@ async function init(args) {
13823
13923
  }
13824
13924
  } else {
13825
13925
  let latest = null;
13826
- const spinner = be();
13926
+ const spinner = ft();
13827
13927
  spinner.start("Checking for updates...");
13828
13928
  try {
13829
13929
  latest = getLatestVersion();
@@ -13832,7 +13932,7 @@ async function init(args) {
13832
13932
  spinner.stop(import_picocolors2.default.dim("Version check complete."));
13833
13933
  if (latest && isNewerVersion(latest, version)) {
13834
13934
  if (!nonInteractive) {
13835
- const updateChoice = await Jt({
13935
+ const updateChoice = await xe({
13836
13936
  message: `Update available: ${import_picocolors2.default.yellow(`v${version}`)} \u2192 ${import_picocolors2.default.green(`v${latest}`)}`,
13837
13937
  options: [
13838
13938
  {
@@ -13846,11 +13946,11 @@ async function init(args) {
13846
13946
  }
13847
13947
  ]
13848
13948
  });
13849
- if (!Ct(updateChoice) && updateChoice === "update") {
13949
+ if (!q(updateChoice) && updateChoice === "update") {
13850
13950
  const pm = detectPackageManager();
13851
13951
  const cmd = globalInstallCommand(pm, `${PACKAGE_NAME}@${latest}`);
13852
13952
  const cmdStr = formatShellCommand(cmd);
13853
- const updateSpinner = be();
13953
+ const updateSpinner = ft();
13854
13954
  updateSpinner.start(`Updating to v${latest}...`);
13855
13955
  try {
13856
13956
  await runShellCommand(cmd);
@@ -13860,7 +13960,7 @@ async function init(args) {
13860
13960
  refreshArgentSkills(resolveProjectRoot(process.cwd()))
13861
13961
  );
13862
13962
  if (skillSummary) {
13863
- Vt2(skillSummary, "Skills Updated");
13963
+ Se(skillSummary, "Skills Updated");
13864
13964
  }
13865
13965
  } catch (err) {
13866
13966
  updateSpinner.stop(import_picocolors2.default.red("Update failed."));
@@ -13895,14 +13995,14 @@ async function init(args) {
13895
13995
  };
13896
13996
  });
13897
13997
  R2.message(import_picocolors2.default.dim(" Use arrow keys to move, space to toggle, enter to confirm."));
13898
- const selected = await Lt2({
13998
+ const selected = await ve({
13899
13999
  message: "Which editors should Argent be configured for?",
13900
14000
  options: choices,
13901
14001
  initialValues: detected,
13902
14002
  required: true
13903
14003
  });
13904
- if (Ct(selected)) {
13905
- Nt("Initialization cancelled.");
14004
+ if (q(selected)) {
14005
+ me("Initialization cancelled.");
13906
14006
  process.exit(0);
13907
14007
  }
13908
14008
  selectedAdapters = selected;
@@ -13914,7 +14014,7 @@ async function init(args) {
13914
14014
  scope = "local";
13915
14015
  } else {
13916
14016
  R2.message(import_picocolors2.default.dim(" Use arrow keys to move, enter to confirm."));
13917
- const scopeChoice = await Jt({
14017
+ const scopeChoice = await xe({
13918
14018
  message: "Install MCP server globally or locally?",
13919
14019
  options: [
13920
14020
  {
@@ -13934,13 +14034,13 @@ async function init(args) {
13934
14034
  }
13935
14035
  ]
13936
14036
  });
13937
- if (Ct(scopeChoice)) {
13938
- Nt("Initialization cancelled.");
14037
+ if (q(scopeChoice)) {
14038
+ me("Initialization cancelled.");
13939
14039
  process.exit(0);
13940
14040
  }
13941
14041
  scope = scopeChoice;
13942
14042
  if (scope === "custom") {
13943
- const customPathInput = await Zt({
14043
+ const customPathInput = await Pe({
13944
14044
  message: "Enter the path to use as the project root for MCP config:",
13945
14045
  placeholder: process.cwd(),
13946
14046
  validate(value) {
@@ -13950,8 +14050,8 @@ async function init(args) {
13950
14050
  return `Path does not exist: ${resolved}. Please verify and enter a valid path.`;
13951
14051
  }
13952
14052
  });
13953
- if (Ct(customPathInput)) {
13954
- Nt("Initialization cancelled.");
14053
+ if (q(customPathInput)) {
14054
+ me("Initialization cancelled.");
13955
14055
  process.exit(0);
13956
14056
  }
13957
14057
  customRoot = resolve2(customPathInput.trim());
@@ -13999,7 +14099,7 @@ async function init(args) {
13999
14099
  mcpResults.push(`${import_picocolors2.default.red("x")} ${adapter.name}: ${import_picocolors2.default.dim(String(err))}`);
14000
14100
  }
14001
14101
  }
14002
- Vt2(mcpResults.join("\n"), "MCP Configuration");
14102
+ Se(mcpResults.join("\n"), "MCP Configuration");
14003
14103
  const adaptersWithAllowlist = selectedAdapters.filter((a) => a.addAllowlist);
14004
14104
  const adaptersWithoutAllowlist = selectedAdapters.filter((a) => !a.addAllowlist);
14005
14105
  let allowlistEnabled = false;
@@ -14013,12 +14113,12 @@ async function init(args) {
14013
14113
  allowlistEnabled = true;
14014
14114
  } else {
14015
14115
  R2.message(import_picocolors2.default.dim(" Press y for yes, n for no, enter to confirm."));
14016
- const allowlistChoice = await Rt({
14116
+ const allowlistChoice = await ue({
14017
14117
  message: "Add Argent tools to editor auto-approve lists? - recommended",
14018
14118
  initialValue: true
14019
14119
  });
14020
- if (Ct(allowlistChoice)) {
14021
- Nt("Initialization cancelled.");
14120
+ if (q(allowlistChoice)) {
14121
+ me("Initialization cancelled.");
14022
14122
  process.exit(0);
14023
14123
  }
14024
14124
  allowlistEnabled = allowlistChoice;
@@ -14046,7 +14146,7 @@ async function init(args) {
14046
14146
  `${import_picocolors2.default.yellow("-")} ${adapter.name} ${import_picocolors2.default.dim("(no auto-approve API - configure manually)")}`
14047
14147
  );
14048
14148
  }
14049
- Vt2(allowlistResults.join("\n"), "Tool Auto-Approval");
14149
+ Se(allowlistResults.join("\n"), "Tool Auto-Approval");
14050
14150
  }
14051
14151
  R2.step(import_picocolors2.default.bold("Step 2: Skills Installation"));
14052
14152
  R2.warn(import_picocolors2.default.yellow("Skills installation is required for Argent to function properly."));
@@ -14065,7 +14165,7 @@ async function init(args) {
14065
14165
  skillsMethod = "default";
14066
14166
  } else {
14067
14167
  R2.message(import_picocolors2.default.dim(" Use arrow keys to move, enter to confirm."));
14068
- const choice = await Jt({
14168
+ const choice = await xe({
14069
14169
  message: "How would you like to install skills?",
14070
14170
  options: [
14071
14171
  {
@@ -14085,14 +14185,16 @@ async function init(args) {
14085
14185
  }
14086
14186
  ]
14087
14187
  });
14088
- if (Ct(choice)) {
14089
- Nt("Initialization cancelled.");
14188
+ if (q(choice)) {
14189
+ me("Initialization cancelled.");
14090
14190
  process.exit(0);
14091
14191
  }
14092
14192
  skillsMethod = choice;
14093
14193
  }
14194
+ const useGitHubSource = online && !fromTar && version !== "unknown";
14195
+ const skillsSource = useGitHubSource ? buildArgentSkillsSource(version) : SKILLS_DIR;
14094
14196
  if (skillsMethod === "manual") {
14095
- Vt2(
14197
+ Se(
14096
14198
  [
14097
14199
  `Skills are bundled at:`,
14098
14200
  ` ${import_picocolors2.default.cyan(SKILLS_DIR)}`,
@@ -14106,12 +14208,12 @@ async function init(args) {
14106
14208
  ` cp -r ${SKILLS_DIR}/* ${scope === "global" ? "~/.cursor/skills/" : `${scope === "custom" ? customRoot : "."}/.cursor/skills/`}`,
14107
14209
  ``,
14108
14210
  ` ${import_picocolors2.default.dim("# Or use npx skills directly:")}`,
14109
- ` npx skills add ${SKILLS_DIR}`
14211
+ ` npx skills add ${skillsSource}`
14110
14212
  ].join("\n"),
14111
14213
  "Manual Skills Installation"
14112
14214
  );
14113
14215
  } else {
14114
- const skillsArgs = ["skills", "add", SKILLS_DIR];
14216
+ const skillsArgs = ["skills", "add", skillsSource];
14115
14217
  if (scope === "global") {
14116
14218
  skillsArgs.push("-g");
14117
14219
  }
@@ -14120,7 +14222,7 @@ async function init(args) {
14120
14222
  }
14121
14223
  const npxArgs = offlineWithCache ? ["--no-install", ...skillsArgs] : skillsArgs;
14122
14224
  R2.info(`Running: ${import_picocolors2.default.dim("npx")} ${import_picocolors2.default.cyan(npxArgs.join(" "))}`);
14123
- const spinner = be();
14225
+ const spinner = ft();
14124
14226
  if (skillsMethod === "default") {
14125
14227
  spinner.start("Installing skills...");
14126
14228
  }
@@ -14148,7 +14250,7 @@ async function init(args) {
14148
14250
  AGENTS_DIR
14149
14251
  );
14150
14252
  if (copyResults.length > 0) {
14151
- Vt2(copyResults.join("\n"), "Rules & Agents");
14253
+ Se(copyResults.join("\n"), "Rules & Agents");
14152
14254
  } else {
14153
14255
  R2.info(import_picocolors2.default.dim("No rules or agents to copy for selected editors."));
14154
14256
  }
@@ -14158,8 +14260,8 @@ async function init(args) {
14158
14260
  `${import_picocolors2.default.green("Skills")} ${skillsMethod === "manual" ? "instructions printed" : "installed"}`,
14159
14261
  `${import_picocolors2.default.green("Rules & agents")} ${copyResults.length > 0 ? "copied" : "n/a"}`
14160
14262
  ];
14161
- Vt2(summaryLines.join("\n"), "Summary");
14162
- Vt2(
14263
+ Se(summaryLines.join("\n"), "Summary");
14264
+ Se(
14163
14265
  [
14164
14266
  import_picocolors2.default.bold(import_picocolors2.default.green("Argent is ready!")),
14165
14267
  "",
@@ -14171,7 +14273,7 @@ async function init(args) {
14171
14273
  ].join("\n"),
14172
14274
  import_picocolors2.default.bgGreen(import_picocolors2.default.black(" Get Started "))
14173
14275
  );
14174
- Gt("Done.");
14276
+ ye("Done.");
14175
14277
  }
14176
14278
  function printBanner() {
14177
14279
  const lines = [
@@ -14263,14 +14365,14 @@ async function killToolServer() {
14263
14365
  // ../argent-installer/src/update.ts
14264
14366
  async function update(args) {
14265
14367
  const nonInteractive = args.includes("--yes") || args.includes("-y");
14266
- Wt2(import_picocolors3.default.bgCyan(import_picocolors3.default.black(" argent update ")));
14368
+ ge(import_picocolors3.default.bgCyan(import_picocolors3.default.black(" argent update ")));
14267
14369
  const globallyInstalled = isGloballyInstalled();
14268
14370
  const installed = globallyInstalled ? getGloballyInstalledVersion() : null;
14269
14371
  if (globallyInstalled && !installed) {
14270
14372
  R2.error("Could not determine installed version.");
14271
14373
  process.exit(1);
14272
14374
  }
14273
- const spinner = be();
14375
+ const spinner = ft();
14274
14376
  spinner.start("Checking for updates...");
14275
14377
  let latest;
14276
14378
  try {
@@ -14297,12 +14399,12 @@ async function update(args) {
14297
14399
  const cmdStr = formatShellCommand(cmd);
14298
14400
  if (!nonInteractive) {
14299
14401
  R2.message(import_picocolors3.default.dim(" Press y for yes, n for no, enter to confirm."));
14300
- const proceed = await Rt({
14402
+ const proceed = await ue({
14301
14403
  message: installed ? `Update to v${latest}?` : `Install ${PACKAGE_NAME}@${latest} globally?`,
14302
14404
  initialValue: true
14303
14405
  });
14304
- if (Ct(proceed) || !proceed) {
14305
- Nt(installed ? "Update cancelled." : "Install cancelled.");
14406
+ if (q(proceed) || !proceed) {
14407
+ me(installed ? "Update cancelled." : "Install cancelled.");
14306
14408
  process.exit(0);
14307
14409
  }
14308
14410
  }
@@ -14351,16 +14453,16 @@ async function update(args) {
14351
14453
  ];
14352
14454
  spinner.stop("Configuration refreshed.");
14353
14455
  if (results.length > 0) {
14354
- Vt2(results.join("\n"), "MCP Configs Updated");
14456
+ Se(results.join("\n"), "MCP Configs Updated");
14355
14457
  }
14356
14458
  if (ruleResults.length > 0) {
14357
- Vt2(ruleResults.join("\n"), "Rules & Agents Updated");
14459
+ Se(ruleResults.join("\n"), "Rules & Agents Updated");
14358
14460
  }
14359
14461
  const skillSummary = formatSkillRefreshSummary(refreshArgentSkills(projectRoot));
14360
14462
  if (skillSummary) {
14361
- Vt2(skillSummary, "Skills Updated");
14463
+ Se(skillSummary, "Skills Updated");
14362
14464
  }
14363
- Gt(import_picocolors3.default.green("Update complete."));
14465
+ ye(import_picocolors3.default.green("Update complete."));
14364
14466
  }
14365
14467
 
14366
14468
  // ../argent-installer/src/uninstall.ts
@@ -14414,7 +14516,7 @@ function removeBundledContent(sourceDir, targetDir) {
14414
14516
  }
14415
14517
  }
14416
14518
  directories.sort(
14417
- (a, b) => b.split(path4.sep).length - a.split(path4.sep).length || b.length - a.length
14519
+ (a, b2) => b2.split(path4.sep).length - a.split(path4.sep).length || b2.length - a.length
14418
14520
  );
14419
14521
  for (const relativePath of directories) {
14420
14522
  const targetPath = path4.join(targetDir, relativePath);
@@ -14562,15 +14664,15 @@ function cleanupBundledTargets(sourceDir, targets, contentLabel) {
14562
14664
  }
14563
14665
  async function uninstall(args) {
14564
14666
  const nonInteractive = args.includes("--yes") || args.includes("-y");
14565
- Wt2(import_picocolors4.default.bgRed(import_picocolors4.default.white(" argent uninstall ")));
14667
+ ge(import_picocolors4.default.bgRed(import_picocolors4.default.white(" argent uninstall ")));
14566
14668
  if (!nonInteractive) {
14567
14669
  R2.message(import_picocolors4.default.dim(" Press y for yes, n for no, enter to confirm."));
14568
- const proceed = await Rt({
14670
+ const proceed = await ue({
14569
14671
  message: "Remove argent configuration from this workspace?",
14570
14672
  initialValue: true
14571
14673
  });
14572
- if (Ct(proceed) || !proceed) {
14573
- Nt("Uninstall cancelled.");
14674
+ if (q(proceed) || !proceed) {
14675
+ me("Uninstall cancelled.");
14574
14676
  process.exit(0);
14575
14677
  }
14576
14678
  }
@@ -14601,18 +14703,18 @@ async function uninstall(args) {
14601
14703
  }
14602
14704
  }
14603
14705
  if (results.length > 0) {
14604
- Vt2(results.join("\n"), "MCP Entries Removed");
14706
+ Se(results.join("\n"), "MCP Entries Removed");
14605
14707
  } else {
14606
14708
  R2.info(import_picocolors4.default.dim("No MCP entries found to remove."));
14607
14709
  }
14608
14710
  let shouldPrune = nonInteractive;
14609
14711
  if (!nonInteractive) {
14610
14712
  R2.message(import_picocolors4.default.dim(" Press y for yes, n for no, enter to confirm."));
14611
- const pruneChoice = await Rt({
14713
+ const pruneChoice = await ue({
14612
14714
  message: "Also remove Argent-owned skills, rules, and agents?",
14613
14715
  initialValue: true
14614
14716
  });
14615
- if (!Ct(pruneChoice)) {
14717
+ if (!q(pruneChoice)) {
14616
14718
  shouldPrune = pruneChoice;
14617
14719
  }
14618
14720
  }
@@ -14674,7 +14776,7 @@ async function uninstall(args) {
14674
14776
  }
14675
14777
  }
14676
14778
  if (pruneResults.length > 0) {
14677
- Vt2(pruneResults.join("\n"), "Pruned Argent Content");
14779
+ Se(pruneResults.join("\n"), "Pruned Argent Content");
14678
14780
  } else {
14679
14781
  R2.info(import_picocolors4.default.dim("No Argent-owned skills, rules, or agents found to remove."));
14680
14782
  }
@@ -14684,11 +14786,11 @@ async function uninstall(args) {
14684
14786
  let shouldUninstallPackage = nonInteractive;
14685
14787
  if (!nonInteractive) {
14686
14788
  R2.message(import_picocolors4.default.dim(" Press y for yes, n for no, enter to confirm."));
14687
- const uninstallPkg = await Rt({
14789
+ const uninstallPkg = await ue({
14688
14790
  message: `Uninstall the global ${PACKAGE_NAME} package?`,
14689
14791
  initialValue: false
14690
14792
  });
14691
- if (!Ct(uninstallPkg)) {
14793
+ if (!q(uninstallPkg)) {
14692
14794
  shouldUninstallPackage = uninstallPkg;
14693
14795
  }
14694
14796
  }
@@ -14704,7 +14806,7 @@ async function uninstall(args) {
14704
14806
  R2.error(`Uninstall failed: ${err}`);
14705
14807
  }
14706
14808
  }
14707
- Gt(import_picocolors4.default.green("argent has been removed."));
14809
+ ye(import_picocolors4.default.green("argent has been removed."));
14708
14810
  }
14709
14811
  export {
14710
14812
  MCP_BINARY_NAME,