storybook 9.0.0-alpha.6 → 9.0.0-alpha.8

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.
@@ -4,48 +4,48 @@ import { dirname as ESM_COMPAT_dirname } from 'node:path';
4
4
  const __filename = ESM_COMPAT_fileURLToPath(import.meta.url);
5
5
  const __dirname = ESM_COMPAT_dirname(__filename);
6
6
  const require = ESM_COMPAT_Module.createRequire(import.meta.url);
7
- var $i = Object.create;
8
- var et = Object.defineProperty;
9
- var qi = Object.getOwnPropertyDescriptor;
10
- var Wi = Object.getOwnPropertyNames;
11
- var Hi = Object.getPrototypeOf, Vi = Object.prototype.hasOwnProperty;
12
- var o = (e, t) => et(e, "name", { value: t, configurable: !0 }), b = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy <
7
+ var ao = Object.create;
8
+ var ke = Object.defineProperty;
9
+ var co = Object.getOwnPropertyDescriptor;
10
+ var uo = Object.getOwnPropertyNames;
11
+ var fo = Object.getPrototypeOf, lo = Object.prototype.hasOwnProperty;
12
+ var o = (e, t) => ke(e, "name", { value: t, configurable: !0 }), S = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy <
13
13
  "u" ? new Proxy(e, {
14
14
  get: (t, r) => (typeof require < "u" ? require : t)[r]
15
15
  }) : e)(function(e) {
16
16
  if (typeof require < "u") return require.apply(this, arguments);
17
17
  throw Error('Dynamic require of "' + e + '" is not supported');
18
18
  });
19
- var p = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports);
20
- var zi = (e, t, r, n) => {
19
+ var x = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports);
20
+ var po = (e, t, r, n) => {
21
21
  if (t && typeof t == "object" || typeof t == "function")
22
- for (let i of Wi(t))
23
- !Vi.call(e, i) && i !== r && et(e, i, { get: () => t[i], enumerable: !(n = qi(t, i)) || n.enumerable });
22
+ for (let i of uo(t))
23
+ !lo.call(e, i) && i !== r && ke(e, i, { get: () => t[i], enumerable: !(n = co(t, i)) || n.enumerable });
24
24
  return e;
25
25
  };
26
- var R = (e, t, r) => (r = e != null ? $i(Hi(e)) : {}, zi(
26
+ var A = (e, t, r) => (r = e != null ? ao(fo(e)) : {}, po(
27
27
  // If the importer is in node compatibility mode or this is not an ESM
28
28
  // file that has been converted to a CommonJS file using a Babel-
29
29
  // compatible transform (i.e. "__esModule" has not been set), then set
30
30
  // "default" to the CommonJS "module.exports" for node compatibility.
31
- t || !e || !e.__esModule ? et(r, "default", { value: e, enumerable: !0 }) : r,
31
+ t || !e || !e.__esModule ? ke(r, "default", { value: e, enumerable: !0 }) : r,
32
32
  e
33
33
  ));
34
34
 
35
35
  // ../node_modules/picocolors/picocolors.js
36
- var dr = p((Dl, tt) => {
37
- var ue = process || {}, fr = ue.argv || [], ce = ue.env || {}, Ji = !(ce.NO_COLOR || fr.includes("--no-color")) && (!!ce.FORCE_COLOR || fr.
38
- includes("--color") || ue.platform === "win32" || (ue.stdout || {}).isTTY && ce.TERM !== "dumb" || !!ce.CI), Ki = /* @__PURE__ */ o((e, t, r = e) => (n) => {
36
+ var vt = x((ja, Ee) => {
37
+ var q = process || {}, Et = q.argv || [], V = q.env || {}, mo = !(V.NO_COLOR || Et.includes("--no-color")) && (!!V.FORCE_COLOR || Et.includes(
38
+ "--color") || q.platform === "win32" || (q.stdout || {}).isTTY && V.TERM !== "dumb" || !!V.CI), yo = /* @__PURE__ */ o((e, t, r = e) => (n) => {
39
39
  let i = "" + n, s = i.indexOf(t, e.length);
40
- return ~s ? e + Yi(i, t, r, s) + t : e + i + t;
41
- }, "formatter"), Yi = /* @__PURE__ */ o((e, t, r, n) => {
40
+ return ~s ? e + ho(i, t, r, s) + t : e + i + t;
41
+ }, "formatter"), ho = /* @__PURE__ */ o((e, t, r, n) => {
42
42
  let i = "", s = 0;
43
43
  do
44
44
  i += e.substring(s, n) + r, s = n + t.length, n = e.indexOf(t, s);
45
45
  while (~n);
46
46
  return i + e.substring(s);
47
- }, "replaceClose"), pr = /* @__PURE__ */ o((e = Ji) => {
48
- let t = e ? Ki : () => String;
47
+ }, "replaceClose"), Pt = /* @__PURE__ */ o((e = mo) => {
48
+ let t = e ? yo : () => String;
49
49
  return {
50
50
  isColorSupported: e,
51
51
  reset: t("\x1B[0m", "\x1B[0m"),
@@ -91,16 +91,33 @@ var dr = p((Dl, tt) => {
91
91
  bgWhiteBright: t("\x1B[107m", "\x1B[49m")
92
92
  };
93
93
  }, "createColors");
94
- tt.exports = pr();
95
- tt.exports.createColors = pr;
94
+ Ee.exports = Pt();
95
+ Ee.exports.createColors = Pt;
96
+ });
97
+
98
+ // ../node_modules/walk-up-path/dist/cjs/index.js
99
+ var Nt = x((K) => {
100
+ "use strict";
101
+ Object.defineProperty(K, "__esModule", { value: !0 });
102
+ K.walkUp = void 0;
103
+ var Rt = S("path"), go = /* @__PURE__ */ o(function* (e) {
104
+ for (e = (0, Rt.resolve)(e); e; ) {
105
+ yield e;
106
+ let t = (0, Rt.dirname)(e);
107
+ if (t === e)
108
+ break;
109
+ e = t;
110
+ }
111
+ }, "walkUp");
112
+ K.walkUp = go;
96
113
  });
97
114
 
98
115
  // ../node_modules/isexe/windows.js
99
- var Er = p((Hl, Pr) => {
100
- Pr.exports = vr;
101
- vr.sync = Qi;
102
- var Sr = b("fs");
103
- function Xi(e, t) {
116
+ var Wt = x((ac, $t) => {
117
+ $t.exports = Ut;
118
+ Ut.sync = Io;
119
+ var Bt = S("fs");
120
+ function Co(e, t) {
104
121
  var r = t.pathExt !== void 0 ? t.pathExt : process.env.PATHEXT;
105
122
  if (!r || (r = r.split(";"), r.indexOf("") !== -1))
106
123
  return !0;
@@ -111,134 +128,134 @@ var Er = p((Hl, Pr) => {
111
128
  }
112
129
  return !1;
113
130
  }
114
- o(Xi, "checkPathExt");
115
- function wr(e, t, r) {
116
- return !e.isSymbolicLink() && !e.isFile() ? !1 : Xi(t, r);
131
+ o(Co, "checkPathExt");
132
+ function Gt(e, t, r) {
133
+ return !e.isSymbolicLink() && !e.isFile() ? !1 : Co(t, r);
117
134
  }
118
- o(wr, "checkStat");
119
- function vr(e, t, r) {
120
- Sr.stat(e, function(n, i) {
121
- r(n, n ? !1 : wr(i, e, t));
135
+ o(Gt, "checkStat");
136
+ function Ut(e, t, r) {
137
+ Bt.stat(e, function(n, i) {
138
+ r(n, n ? !1 : Gt(i, e, t));
122
139
  });
123
140
  }
124
- o(vr, "isexe");
125
- function Qi(e, t) {
126
- return wr(Sr.statSync(e), e, t);
141
+ o(Ut, "isexe");
142
+ function Io(e, t) {
143
+ return Gt(Bt.statSync(e), e, t);
127
144
  }
128
- o(Qi, "sync");
145
+ o(Io, "sync");
129
146
  });
130
147
 
131
148
  // ../node_modules/isexe/mode.js
132
- var Or = p((zl, Cr) => {
133
- Cr.exports = kr;
134
- kr.sync = Zi;
135
- var Tr = b("fs");
136
- function kr(e, t, r) {
137
- Tr.stat(e, function(n, i) {
138
- r(n, n ? !1 : Ir(i, t));
149
+ var zt = x((uc, qt) => {
150
+ qt.exports = Jt;
151
+ Jt.sync = Ao;
152
+ var Ht = S("fs");
153
+ function Jt(e, t, r) {
154
+ Ht.stat(e, function(n, i) {
155
+ r(n, n ? !1 : Vt(i, t));
139
156
  });
140
157
  }
141
- o(kr, "isexe");
142
- function Zi(e, t) {
143
- return Ir(Tr.statSync(e), t);
158
+ o(Jt, "isexe");
159
+ function Ao(e, t) {
160
+ return Vt(Ht.statSync(e), t);
144
161
  }
145
- o(Zi, "sync");
146
- function Ir(e, t) {
147
- return e.isFile() && es(e, t);
162
+ o(Ao, "sync");
163
+ function Vt(e, t) {
164
+ return e.isFile() && Oo(e, t);
148
165
  }
149
- o(Ir, "checkStat");
150
- function es(e, t) {
166
+ o(Vt, "checkStat");
167
+ function Oo(e, t) {
151
168
  var r = e.mode, n = e.uid, i = e.gid, s = t.uid !== void 0 ? t.uid : process.getuid && process.getuid(), a = t.gid !== void 0 ? t.gid : process.
152
- getgid && process.getgid(), c = parseInt("100", 8), u = parseInt("010", 8), l = parseInt("001", 8), f = c | u, x = r & l || r & u && i ===
153
- a || r & c && n === s || r & f && s === 0;
154
- return x;
169
+ getgid && process.getgid(), c = parseInt("100", 8), u = parseInt("010", 8), f = parseInt("001", 8), l = c | u, d = r & f || r & u && i ===
170
+ a || r & c && n === s || r & l && s === 0;
171
+ return d;
155
172
  }
156
- o(es, "checkMode");
173
+ o(Oo, "checkMode");
157
174
  });
158
175
 
159
176
  // ../node_modules/isexe/index.js
160
- var Rr = p((Yl, Ar) => {
161
- var Kl = b("fs"), pe;
162
- process.platform === "win32" || global.TESTING_WINDOWS ? pe = Er() : pe = Or();
163
- Ar.exports = rt;
164
- rt.sync = ts;
165
- function rt(e, t, r) {
177
+ var Kt = x((pc, Yt) => {
178
+ var lc = S("fs"), X;
179
+ process.platform === "win32" || global.TESTING_WINDOWS ? X = Wt() : X = zt();
180
+ Yt.exports = Ae;
181
+ Ae.sync = jo;
182
+ function Ae(e, t, r) {
166
183
  if (typeof t == "function" && (r = t, t = {}), !r) {
167
184
  if (typeof Promise != "function")
168
185
  throw new TypeError("callback not provided");
169
186
  return new Promise(function(n, i) {
170
- rt(e, t || {}, function(s, a) {
187
+ Ae(e, t || {}, function(s, a) {
171
188
  s ? i(s) : n(a);
172
189
  });
173
190
  });
174
191
  }
175
- pe(e, t || {}, function(n, i) {
192
+ X(e, t || {}, function(n, i) {
176
193
  n && (n.code === "EACCES" || t && t.ignoreErrors) && (n = null, i = !1), r(n, i);
177
194
  });
178
195
  }
179
- o(rt, "isexe");
180
- function ts(e, t) {
196
+ o(Ae, "isexe");
197
+ function jo(e, t) {
181
198
  try {
182
- return pe.sync(e, t || {});
199
+ return X.sync(e, t || {});
183
200
  } catch (r) {
184
201
  if (t && t.ignoreErrors || r.code === "EACCES")
185
202
  return !1;
186
203
  throw r;
187
204
  }
188
205
  }
189
- o(ts, "sync");
206
+ o(jo, "sync");
190
207
  });
191
208
 
192
209
  // ../node_modules/cross-spawn/node_modules/which/which.js
193
- var Mr = p((Ql, Dr) => {
194
- var M = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", _r = b("path"), rs = M ? ";" : "\
195
- :", Gr = Rr(), jr = /* @__PURE__ */ o((e) => Object.assign(new Error(`not found: ${e}`), { code: "ENOENT" }), "getNotFoundError"), Nr = /* @__PURE__ */ o(
210
+ var nr = x((dc, rr) => {
211
+ var j = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", Xt = S("path"), Ro = j ? ";" : "\
212
+ :", Qt = Kt(), Zt = /* @__PURE__ */ o((e) => Object.assign(new Error(`not found: ${e}`), { code: "ENOENT" }), "getNotFoundError"), er = /* @__PURE__ */ o(
196
213
  (e, t) => {
197
- let r = t.colon || rs, n = e.match(/\//) || M && e.match(/\\/) ? [""] : [
214
+ let r = t.colon || Ro, n = e.match(/\//) || j && e.match(/\\/) ? [""] : [
198
215
  // windows always checks the cwd first
199
- ...M ? [process.cwd()] : [],
216
+ ...j ? [process.cwd()] : [],
200
217
  ...(t.path || process.env.PATH || /* istanbul ignore next: very unusual */
201
218
  "").split(r)
202
- ], i = M ? t.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", s = M ? i.split(r) : [""];
203
- return M && e.indexOf(".") !== -1 && s[0] !== "" && s.unshift(""), {
219
+ ], i = j ? t.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", s = j ? i.split(r) : [""];
220
+ return j && e.indexOf(".") !== -1 && s[0] !== "" && s.unshift(""), {
204
221
  pathEnv: n,
205
222
  pathExt: s,
206
223
  pathExtExe: i
207
224
  };
208
- }, "getPathInfo"), Br = /* @__PURE__ */ o((e, t, r) => {
225
+ }, "getPathInfo"), tr = /* @__PURE__ */ o((e, t, r) => {
209
226
  typeof t == "function" && (r = t, t = {}), t || (t = {});
210
- let { pathEnv: n, pathExt: i, pathExtExe: s } = Nr(e, t), a = [], c = /* @__PURE__ */ o((l) => new Promise((f, x) => {
211
- if (l === n.length)
212
- return t.all && a.length ? f(a) : x(jr(e));
213
- let g = n[l], m = /^".*"$/.test(g) ? g.slice(1, -1) : g, y = _r.join(m, e), h = !m && /^\.[\\\/]/.test(e) ? e.slice(0, 2) + y : y;
214
- f(u(h, l, 0));
215
- }), "step"), u = /* @__PURE__ */ o((l, f, x) => new Promise((g, m) => {
216
- if (x === i.length)
217
- return g(c(f + 1));
218
- let y = i[x];
219
- Gr(l + y, { pathExt: s }, (h, S) => {
220
- if (!h && S)
227
+ let { pathEnv: n, pathExt: i, pathExtExe: s } = er(e, t), a = [], c = /* @__PURE__ */ o((f) => new Promise((l, d) => {
228
+ if (f === n.length)
229
+ return t.all && a.length ? l(a) : d(Zt(e));
230
+ let h = n[f], y = /^".*"$/.test(h) ? h.slice(1, -1) : h, g = Xt.join(y, e), m = !y && /^\.[\\\/]/.test(e) ? e.slice(0, 2) + g : g;
231
+ l(u(m, f, 0));
232
+ }), "step"), u = /* @__PURE__ */ o((f, l, d) => new Promise((h, y) => {
233
+ if (d === i.length)
234
+ return h(c(l + 1));
235
+ let g = i[d];
236
+ Qt(f + g, { pathExt: s }, (m, b) => {
237
+ if (!m && b)
221
238
  if (t.all)
222
- a.push(l + y);
239
+ a.push(f + g);
223
240
  else
224
- return g(l + y);
225
- return g(u(l, f, x + 1));
241
+ return h(f + g);
242
+ return h(u(f, l, d + 1));
226
243
  });
227
244
  }), "subStep");
228
- return r ? c(0).then((l) => r(null, l), r) : c(0);
229
- }, "which"), ns = /* @__PURE__ */ o((e, t) => {
245
+ return r ? c(0).then((f) => r(null, f), r) : c(0);
246
+ }, "which"), No = /* @__PURE__ */ o((e, t) => {
230
247
  t = t || {};
231
- let { pathEnv: r, pathExt: n, pathExtExe: i } = Nr(e, t), s = [];
248
+ let { pathEnv: r, pathExt: n, pathExtExe: i } = er(e, t), s = [];
232
249
  for (let a = 0; a < r.length; a++) {
233
- let c = r[a], u = /^".*"$/.test(c) ? c.slice(1, -1) : c, l = _r.join(u, e), f = !u && /^\.[\\\/]/.test(e) ? e.slice(0, 2) + l : l;
234
- for (let x = 0; x < n.length; x++) {
235
- let g = f + n[x];
250
+ let c = r[a], u = /^".*"$/.test(c) ? c.slice(1, -1) : c, f = Xt.join(u, e), l = !u && /^\.[\\\/]/.test(e) ? e.slice(0, 2) + f : f;
251
+ for (let d = 0; d < n.length; d++) {
252
+ let h = l + n[d];
236
253
  try {
237
- if (Gr.sync(g, { pathExt: i }))
254
+ if (Qt.sync(h, { pathExt: i }))
238
255
  if (t.all)
239
- s.push(g);
256
+ s.push(h);
240
257
  else
241
- return g;
258
+ return h;
242
259
  } catch {
243
260
  }
244
261
  }
@@ -247,28 +264,28 @@ var Mr = p((Ql, Dr) => {
247
264
  return s;
248
265
  if (t.nothrow)
249
266
  return null;
250
- throw jr(e);
267
+ throw Zt(e);
251
268
  }, "whichSync");
252
- Dr.exports = Br;
253
- Br.sync = ns;
269
+ rr.exports = tr;
270
+ tr.sync = No;
254
271
  });
255
272
 
256
273
  // ../node_modules/path-key/index.js
257
- var ot = p((ef, nt) => {
274
+ var ir = x((hc, Oe) => {
258
275
  "use strict";
259
- var Lr = /* @__PURE__ */ o((e = {}) => {
276
+ var or = /* @__PURE__ */ o((e = {}) => {
260
277
  let t = e.env || process.env;
261
278
  return (e.platform || process.platform) !== "win32" ? "PATH" : Object.keys(t).reverse().find((n) => n.toUpperCase() === "PATH") || "Path";
262
279
  }, "pathKey");
263
- nt.exports = Lr;
264
- nt.exports.default = Lr;
280
+ Oe.exports = or;
281
+ Oe.exports.default = or;
265
282
  });
266
283
 
267
284
  // ../node_modules/cross-spawn/lib/util/resolveCommand.js
268
- var qr = p((rf, $r) => {
285
+ var ur = x((bc, cr) => {
269
286
  "use strict";
270
- var Fr = b("path"), os = Mr(), is = ot();
271
- function Ur(e, t) {
287
+ var sr = S("path"), Do = nr(), _o = ir();
288
+ function ar(e, t) {
272
289
  let r = e.options.env || process.env, n = process.cwd(), i = e.options.cwd != null, s = i && process.chdir !== void 0 && !process.chdir.
273
290
  disabled;
274
291
  if (s)
@@ -278,53 +295,53 @@ var qr = p((rf, $r) => {
278
295
  }
279
296
  let a;
280
297
  try {
281
- a = os.sync(e.command, {
282
- path: r[is({ env: r })],
283
- pathExt: t ? Fr.delimiter : void 0
298
+ a = Do.sync(e.command, {
299
+ path: r[_o({ env: r })],
300
+ pathExt: t ? sr.delimiter : void 0
284
301
  });
285
302
  } catch {
286
303
  } finally {
287
304
  s && process.chdir(n);
288
305
  }
289
- return a && (a = Fr.resolve(i ? e.options.cwd : "", a)), a;
306
+ return a && (a = sr.resolve(i ? e.options.cwd : "", a)), a;
290
307
  }
291
- o(Ur, "resolveCommandAttempt");
292
- function ss(e) {
293
- return Ur(e) || Ur(e, !0);
308
+ o(ar, "resolveCommandAttempt");
309
+ function Mo(e) {
310
+ return ar(e) || ar(e, !0);
294
311
  }
295
- o(ss, "resolveCommand");
296
- $r.exports = ss;
312
+ o(Mo, "resolveCommand");
313
+ cr.exports = Mo;
297
314
  });
298
315
 
299
316
  // ../node_modules/cross-spawn/lib/util/escape.js
300
- var Wr = p((of, st) => {
317
+ var fr = x((wc, Re) => {
301
318
  "use strict";
302
- var it = /([()\][%!^"`<>&|;, *?])/g;
303
- function as(e) {
304
- return e = e.replace(it, "^$1"), e;
305
- }
306
- o(as, "escapeCommand");
307
- function cs(e, t) {
308
- return e = `${e}`, e = e.replace(/(\\*)"/g, '$1$1\\"'), e = e.replace(/(\\*)$/, "$1$1"), e = `"${e}"`, e = e.replace(it, "^$1"), t && (e =
309
- e.replace(it, "^$1")), e;
310
- }
311
- o(cs, "escapeArgument");
312
- st.exports.command = as;
313
- st.exports.argument = cs;
319
+ var je = /([()\][%!^"`<>&|;, *?])/g;
320
+ function Lo(e) {
321
+ return e = e.replace(je, "^$1"), e;
322
+ }
323
+ o(Lo, "escapeCommand");
324
+ function Fo(e, t) {
325
+ return e = `${e}`, e = e.replace(/(\\*)"/g, '$1$1\\"'), e = e.replace(/(\\*)$/, "$1$1"), e = `"${e}"`, e = e.replace(je, "^$1"), t && (e =
326
+ e.replace(je, "^$1")), e;
327
+ }
328
+ o(Fo, "escapeArgument");
329
+ Re.exports.command = Lo;
330
+ Re.exports.argument = Fo;
314
331
  });
315
332
 
316
333
  // ../node_modules/shebang-regex/index.js
317
- var Vr = p((af, Hr) => {
334
+ var pr = x((kc, lr) => {
318
335
  "use strict";
319
- Hr.exports = /^#!(.*)/;
336
+ lr.exports = /^#!(.*)/;
320
337
  });
321
338
 
322
339
  // ../node_modules/shebang-command/index.js
323
- var Jr = p((cf, zr) => {
340
+ var dr = x((Ec, mr) => {
324
341
  "use strict";
325
- var us = Vr();
326
- zr.exports = (e = "") => {
327
- let t = e.match(us);
342
+ var Bo = pr();
343
+ mr.exports = (e = "") => {
344
+ let t = e.match(Bo);
328
345
  if (!t)
329
346
  return null;
330
347
  let [r, n] = t[0].replace(/#! ?/, "").split(" "), i = r.split("/").pop();
@@ -333,45 +350,45 @@ var Jr = p((cf, zr) => {
333
350
  });
334
351
 
335
352
  // ../node_modules/cross-spawn/lib/util/readShebang.js
336
- var Yr = p((uf, Kr) => {
353
+ var hr = x((Pc, yr) => {
337
354
  "use strict";
338
- var at = b("fs"), ls = Jr();
339
- function fs(e) {
355
+ var Ne = S("fs"), Go = dr();
356
+ function Uo(e) {
340
357
  let r = Buffer.alloc(150), n;
341
358
  try {
342
- n = at.openSync(e, "r"), at.readSync(n, r, 0, 150, 0), at.closeSync(n);
359
+ n = Ne.openSync(e, "r"), Ne.readSync(n, r, 0, 150, 0), Ne.closeSync(n);
343
360
  } catch {
344
361
  }
345
- return ls(r.toString());
362
+ return Go(r.toString());
346
363
  }
347
- o(fs, "readShebang");
348
- Kr.exports = fs;
364
+ o(Uo, "readShebang");
365
+ yr.exports = Uo;
349
366
  });
350
367
 
351
368
  // ../node_modules/cross-spawn/lib/parse.js
352
- var en = p((ff, Zr) => {
369
+ var wr = x((Tc, xr) => {
353
370
  "use strict";
354
- var ps = b("path"), Xr = qr(), Qr = Wr(), ds = Yr(), ms = process.platform === "win32", hs = /\.(?:com|exe)$/i, ys = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
355
- function gs(e) {
356
- e.file = Xr(e);
357
- let t = e.file && ds(e.file);
358
- return t ? (e.args.unshift(e.file), e.command = t, Xr(e)) : e.file;
359
- }
360
- o(gs, "detectShebang");
361
- function bs(e) {
362
- if (!ms)
371
+ var $o = S("path"), gr = ur(), br = fr(), Wo = hr(), Ho = process.platform === "win32", Jo = /\.(?:com|exe)$/i, Vo = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
372
+ function qo(e) {
373
+ e.file = gr(e);
374
+ let t = e.file && Wo(e.file);
375
+ return t ? (e.args.unshift(e.file), e.command = t, gr(e)) : e.file;
376
+ }
377
+ o(qo, "detectShebang");
378
+ function zo(e) {
379
+ if (!Ho)
363
380
  return e;
364
- let t = gs(e), r = !hs.test(t);
381
+ let t = qo(e), r = !Jo.test(t);
365
382
  if (e.options.forceShell || r) {
366
- let n = ys.test(t);
367
- e.command = ps.normalize(e.command), e.command = Qr.command(e.command), e.args = e.args.map((s) => Qr.argument(s, n));
383
+ let n = Vo.test(t);
384
+ e.command = $o.normalize(e.command), e.command = br.command(e.command), e.args = e.args.map((s) => br.argument(s, n));
368
385
  let i = [e.command].concat(e.args).join(" ");
369
386
  e.args = ["/d", "/s", "/c", `"${i}"`], e.command = process.env.comspec || "cmd.exe", e.options.windowsVerbatimArguments = !0;
370
387
  }
371
388
  return e;
372
389
  }
373
- o(bs, "parseNonShell");
374
- function xs(e, t, r) {
390
+ o(zo, "parseNonShell");
391
+ function Yo(e, t, r) {
375
392
  t && !Array.isArray(t) && (r = t, t = null), t = t ? t.slice(0) : [], r = Object.assign({}, r);
376
393
  let n = {
377
394
  command: e,
@@ -383,17 +400,17 @@ var en = p((ff, Zr) => {
383
400
  args: t
384
401
  }
385
402
  };
386
- return r.shell ? n : bs(n);
403
+ return r.shell ? n : zo(n);
387
404
  }
388
- o(xs, "parse");
389
- Zr.exports = xs;
405
+ o(Yo, "parse");
406
+ xr.exports = Yo;
390
407
  });
391
408
 
392
409
  // ../node_modules/cross-spawn/lib/enoent.js
393
- var nn = p((df, rn) => {
410
+ var Er = x((Ic, kr) => {
394
411
  "use strict";
395
- var ct = process.platform === "win32";
396
- function ut(e, t) {
412
+ var De = process.platform === "win32";
413
+ function _e(e, t) {
397
414
  return Object.assign(new Error(`${t} ${e.command} ENOENT`), {
398
415
  code: "ENOENT",
399
416
  errno: "ENOENT",
@@ -402,781 +419,64 @@ var nn = p((df, rn) => {
402
419
  spawnargs: e.args
403
420
  });
404
421
  }
405
- o(ut, "notFoundError");
406
- function Ss(e, t) {
407
- if (!ct)
422
+ o(_e, "notFoundError");
423
+ function Ko(e, t) {
424
+ if (!De)
408
425
  return;
409
426
  let r = e.emit;
410
427
  e.emit = function(n, i) {
411
428
  if (n === "exit") {
412
- let s = tn(i, t, "spawn");
429
+ let s = Sr(i, t, "spawn");
413
430
  if (s)
414
431
  return r.call(e, "error", s);
415
432
  }
416
433
  return r.apply(e, arguments);
417
434
  };
418
435
  }
419
- o(Ss, "hookChildProcess");
420
- function tn(e, t) {
421
- return ct && e === 1 && !t.file ? ut(t.original, "spawn") : null;
436
+ o(Ko, "hookChildProcess");
437
+ function Sr(e, t) {
438
+ return De && e === 1 && !t.file ? _e(t.original, "spawn") : null;
422
439
  }
423
- o(tn, "verifyENOENT");
424
- function ws(e, t) {
425
- return ct && e === 1 && !t.file ? ut(t.original, "spawnSync") : null;
440
+ o(Sr, "verifyENOENT");
441
+ function Xo(e, t) {
442
+ return De && e === 1 && !t.file ? _e(t.original, "spawnSync") : null;
426
443
  }
427
- o(ws, "verifyENOENTSync");
428
- rn.exports = {
429
- hookChildProcess: Ss,
430
- verifyENOENT: tn,
431
- verifyENOENTSync: ws,
432
- notFoundError: ut
444
+ o(Xo, "verifyENOENTSync");
445
+ kr.exports = {
446
+ hookChildProcess: Ko,
447
+ verifyENOENT: Sr,
448
+ verifyENOENTSync: Xo,
449
+ notFoundError: _e
433
450
  };
434
451
  });
435
452
 
436
453
  // ../node_modules/cross-spawn/index.js
437
- var pt = p((hf, L) => {
438
- "use strict";
439
- var on = b("child_process"), lt = en(), ft = nn();
440
- function sn(e, t, r) {
441
- let n = lt(e, t, r), i = on.spawn(n.command, n.args, n.options);
442
- return ft.hookChildProcess(i, n), i;
443
- }
444
- o(sn, "spawn");
445
- function vs(e, t, r) {
446
- let n = lt(e, t, r), i = on.spawnSync(n.command, n.args, n.options);
447
- return i.error = i.error || ft.verifyENOENTSync(i.status, n), i;
448
- }
449
- o(vs, "spawnSync");
450
- L.exports = sn;
451
- L.exports.spawn = sn;
452
- L.exports.sync = vs;
453
- L.exports._parse = lt;
454
- L.exports._enoent = ft;
455
- });
456
-
457
- // ../node_modules/execa/node_modules/strip-final-newline/index.js
458
- var cn = p((gf, an) => {
459
- "use strict";
460
- an.exports = (e) => {
461
- let t = typeof e == "string" ? `
462
- ` : 10, r = typeof e == "string" ? "\r" : 13;
463
- return e[e.length - 1] === t && (e = e.slice(0, e.length - 1)), e[e.length - 1] === r && (e = e.slice(0, e.length - 1)), e;
464
- };
465
- });
466
-
467
- // ../node_modules/npm-run-path/index.js
468
- var fn = p((bf, K) => {
454
+ var Tr = x((Oc, R) => {
469
455
  "use strict";
470
- var J = b("path"), un = ot(), ln = /* @__PURE__ */ o((e) => {
471
- e = {
472
- cwd: process.cwd(),
473
- path: process.env[un()],
474
- execPath: process.execPath,
475
- ...e
476
- };
477
- let t, r = J.resolve(e.cwd), n = [];
478
- for (; t !== r; )
479
- n.push(J.join(r, "node_modules/.bin")), t = r, r = J.resolve(r, "..");
480
- let i = J.resolve(e.cwd, e.execPath, "..");
481
- return n.push(i), n.concat(e.path).join(J.delimiter);
482
- }, "npmRunPath");
483
- K.exports = ln;
484
- K.exports.default = ln;
485
- K.exports.env = (e) => {
486
- e = {
487
- env: process.env,
488
- ...e
489
- };
490
- let t = { ...e.env }, r = un({ env: t });
491
- return e.path = t[r], t[r] = K.exports(e), t;
492
- };
493
- });
494
-
495
- // ../node_modules/mimic-fn/index.js
496
- var dn = p((Sf, dt) => {
497
- "use strict";
498
- var pn = /* @__PURE__ */ o((e, t) => {
499
- for (let r of Reflect.ownKeys(t))
500
- Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
501
- return e;
502
- }, "mimicFn");
503
- dt.exports = pn;
504
- dt.exports.default = pn;
505
- });
506
-
507
- // ../node_modules/onetime/index.js
508
- var hn = p((vf, me) => {
509
- "use strict";
510
- var Ps = dn(), de = /* @__PURE__ */ new WeakMap(), mn = /* @__PURE__ */ o((e, t = {}) => {
511
- if (typeof e != "function")
512
- throw new TypeError("Expected a function");
513
- let r, n = 0, i = e.displayName || e.name || "<anonymous>", s = /* @__PURE__ */ o(function(...a) {
514
- if (de.set(s, ++n), n === 1)
515
- r = e.apply(this, a), e = null;
516
- else if (t.throw === !0)
517
- throw new Error(`Function \`${i}\` can only be called once`);
518
- return r;
519
- }, "onetime");
520
- return Ps(s, e), de.set(s, n), s;
521
- }, "onetime");
522
- me.exports = mn;
523
- me.exports.default = mn;
524
- me.exports.callCount = (e) => {
525
- if (!de.has(e))
526
- throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);
527
- return de.get(e);
528
- };
529
- });
530
-
531
- // ../node_modules/execa/node_modules/human-signals/build/src/core.js
532
- var yn = p((he) => {
533
- "use strict";
534
- Object.defineProperty(he, "__esModule", { value: !0 });
535
- he.SIGNALS = void 0;
536
- var Es = [
537
- {
538
- name: "SIGHUP",
539
- number: 1,
540
- action: "terminate",
541
- description: "Terminal closed",
542
- standard: "posix"
543
- },
544
- {
545
- name: "SIGINT",
546
- number: 2,
547
- action: "terminate",
548
- description: "User interruption with CTRL-C",
549
- standard: "ansi"
550
- },
551
- {
552
- name: "SIGQUIT",
553
- number: 3,
554
- action: "core",
555
- description: "User interruption with CTRL-\\",
556
- standard: "posix"
557
- },
558
- {
559
- name: "SIGILL",
560
- number: 4,
561
- action: "core",
562
- description: "Invalid machine instruction",
563
- standard: "ansi"
564
- },
565
- {
566
- name: "SIGTRAP",
567
- number: 5,
568
- action: "core",
569
- description: "Debugger breakpoint",
570
- standard: "posix"
571
- },
572
- {
573
- name: "SIGABRT",
574
- number: 6,
575
- action: "core",
576
- description: "Aborted",
577
- standard: "ansi"
578
- },
579
- {
580
- name: "SIGIOT",
581
- number: 6,
582
- action: "core",
583
- description: "Aborted",
584
- standard: "bsd"
585
- },
586
- {
587
- name: "SIGBUS",
588
- number: 7,
589
- action: "core",
590
- description: "Bus error due to misaligned, non-existing address or paging error",
591
- standard: "bsd"
592
- },
593
- {
594
- name: "SIGEMT",
595
- number: 7,
596
- action: "terminate",
597
- description: "Command should be emulated but is not implemented",
598
- standard: "other"
599
- },
600
- {
601
- name: "SIGFPE",
602
- number: 8,
603
- action: "core",
604
- description: "Floating point arithmetic error",
605
- standard: "ansi"
606
- },
607
- {
608
- name: "SIGKILL",
609
- number: 9,
610
- action: "terminate",
611
- description: "Forced termination",
612
- standard: "posix",
613
- forced: !0
614
- },
615
- {
616
- name: "SIGUSR1",
617
- number: 10,
618
- action: "terminate",
619
- description: "Application-specific signal",
620
- standard: "posix"
621
- },
622
- {
623
- name: "SIGSEGV",
624
- number: 11,
625
- action: "core",
626
- description: "Segmentation fault",
627
- standard: "ansi"
628
- },
629
- {
630
- name: "SIGUSR2",
631
- number: 12,
632
- action: "terminate",
633
- description: "Application-specific signal",
634
- standard: "posix"
635
- },
636
- {
637
- name: "SIGPIPE",
638
- number: 13,
639
- action: "terminate",
640
- description: "Broken pipe or socket",
641
- standard: "posix"
642
- },
643
- {
644
- name: "SIGALRM",
645
- number: 14,
646
- action: "terminate",
647
- description: "Timeout or timer",
648
- standard: "posix"
649
- },
650
- {
651
- name: "SIGTERM",
652
- number: 15,
653
- action: "terminate",
654
- description: "Termination",
655
- standard: "ansi"
656
- },
657
- {
658
- name: "SIGSTKFLT",
659
- number: 16,
660
- action: "terminate",
661
- description: "Stack is empty or overflowed",
662
- standard: "other"
663
- },
664
- {
665
- name: "SIGCHLD",
666
- number: 17,
667
- action: "ignore",
668
- description: "Child process terminated, paused or unpaused",
669
- standard: "posix"
670
- },
671
- {
672
- name: "SIGCLD",
673
- number: 17,
674
- action: "ignore",
675
- description: "Child process terminated, paused or unpaused",
676
- standard: "other"
677
- },
678
- {
679
- name: "SIGCONT",
680
- number: 18,
681
- action: "unpause",
682
- description: "Unpaused",
683
- standard: "posix",
684
- forced: !0
685
- },
686
- {
687
- name: "SIGSTOP",
688
- number: 19,
689
- action: "pause",
690
- description: "Paused",
691
- standard: "posix",
692
- forced: !0
693
- },
694
- {
695
- name: "SIGTSTP",
696
- number: 20,
697
- action: "pause",
698
- description: 'Paused using CTRL-Z or "suspend"',
699
- standard: "posix"
700
- },
701
- {
702
- name: "SIGTTIN",
703
- number: 21,
704
- action: "pause",
705
- description: "Background process cannot read terminal input",
706
- standard: "posix"
707
- },
708
- {
709
- name: "SIGBREAK",
710
- number: 21,
711
- action: "terminate",
712
- description: "User interruption with CTRL-BREAK",
713
- standard: "other"
714
- },
715
- {
716
- name: "SIGTTOU",
717
- number: 22,
718
- action: "pause",
719
- description: "Background process cannot write to terminal output",
720
- standard: "posix"
721
- },
722
- {
723
- name: "SIGURG",
724
- number: 23,
725
- action: "ignore",
726
- description: "Socket received out-of-band data",
727
- standard: "bsd"
728
- },
729
- {
730
- name: "SIGXCPU",
731
- number: 24,
732
- action: "core",
733
- description: "Process timed out",
734
- standard: "bsd"
735
- },
736
- {
737
- name: "SIGXFSZ",
738
- number: 25,
739
- action: "core",
740
- description: "File too big",
741
- standard: "bsd"
742
- },
743
- {
744
- name: "SIGVTALRM",
745
- number: 26,
746
- action: "terminate",
747
- description: "Timeout or timer",
748
- standard: "bsd"
749
- },
750
- {
751
- name: "SIGPROF",
752
- number: 27,
753
- action: "terminate",
754
- description: "Timeout or timer",
755
- standard: "bsd"
756
- },
757
- {
758
- name: "SIGWINCH",
759
- number: 28,
760
- action: "ignore",
761
- description: "Terminal window size changed",
762
- standard: "bsd"
763
- },
764
- {
765
- name: "SIGIO",
766
- number: 29,
767
- action: "terminate",
768
- description: "I/O is available",
769
- standard: "other"
770
- },
771
- {
772
- name: "SIGPOLL",
773
- number: 29,
774
- action: "terminate",
775
- description: "Watched event",
776
- standard: "other"
777
- },
778
- {
779
- name: "SIGINFO",
780
- number: 29,
781
- action: "ignore",
782
- description: "Request for process information",
783
- standard: "other"
784
- },
785
- {
786
- name: "SIGPWR",
787
- number: 30,
788
- action: "terminate",
789
- description: "Device running out of power",
790
- standard: "systemv"
791
- },
792
- {
793
- name: "SIGSYS",
794
- number: 31,
795
- action: "core",
796
- description: "Invalid system call",
797
- standard: "other"
798
- },
799
- {
800
- name: "SIGUNUSED",
801
- number: 31,
802
- action: "terminate",
803
- description: "Invalid system call",
804
- standard: "other"
805
- }
806
- ];
807
- he.SIGNALS = Es;
808
- });
809
-
810
- // ../node_modules/execa/node_modules/human-signals/build/src/realtime.js
811
- var mt = p((F) => {
812
- "use strict";
813
- Object.defineProperty(F, "__esModule", { value: !0 });
814
- F.SIGRTMAX = F.getRealtimeSignals = void 0;
815
- var Ts = /* @__PURE__ */ o(function() {
816
- let e = bn - gn + 1;
817
- return Array.from({ length: e }, ks);
818
- }, "getRealtimeSignals");
819
- F.getRealtimeSignals = Ts;
820
- var ks = /* @__PURE__ */ o(function(e, t) {
821
- return {
822
- name: `SIGRT${t + 1}`,
823
- number: gn + t,
824
- action: "terminate",
825
- description: "Application-specific signal (realtime)",
826
- standard: "posix"
827
- };
828
- }, "getRealtimeSignal"), gn = 34, bn = 64;
829
- F.SIGRTMAX = bn;
830
- });
831
-
832
- // ../node_modules/execa/node_modules/human-signals/build/src/signals.js
833
- var xn = p((ye) => {
834
- "use strict";
835
- Object.defineProperty(ye, "__esModule", { value: !0 });
836
- ye.getSignals = void 0;
837
- var Is = b("os"), Cs = yn(), Os = mt(), As = /* @__PURE__ */ o(function() {
838
- let e = (0, Os.getRealtimeSignals)();
839
- return [...Cs.SIGNALS, ...e].map(Rs);
840
- }, "getSignals");
841
- ye.getSignals = As;
842
- var Rs = /* @__PURE__ */ o(function({
843
- name: e,
844
- number: t,
845
- description: r,
846
- action: n,
847
- forced: i = !1,
848
- standard: s
849
- }) {
850
- let {
851
- signals: { [e]: a }
852
- } = Is.constants, c = a !== void 0;
853
- return { name: e, number: c ? a : t, description: r, supported: c, action: n, forced: i, standard: s };
854
- }, "normalizeSignal");
855
- });
856
-
857
- // ../node_modules/execa/node_modules/human-signals/build/src/main.js
858
- var wn = p((U) => {
859
- "use strict";
860
- Object.defineProperty(U, "__esModule", { value: !0 });
861
- U.signalsByNumber = U.signalsByName = void 0;
862
- var _s = b("os"), Sn = xn(), Gs = mt(), js = /* @__PURE__ */ o(function() {
863
- return (0, Sn.getSignals)().reduce(Ns, {});
864
- }, "getSignalsByName"), Ns = /* @__PURE__ */ o(function(e, { name: t, number: r, description: n, supported: i, action: s, forced: a, standard: c }) {
865
- return {
866
- ...e,
867
- [t]: { name: t, number: r, description: n, supported: i, action: s, forced: a, standard: c }
868
- };
869
- }, "getSignalByName"), Bs = js();
870
- U.signalsByName = Bs;
871
- var Ds = /* @__PURE__ */ o(function() {
872
- let e = (0, Sn.getSignals)(), t = Gs.SIGRTMAX + 1, r = Array.from({ length: t }, (n, i) => Ms(i, e));
873
- return Object.assign({}, ...r);
874
- }, "getSignalsByNumber"), Ms = /* @__PURE__ */ o(function(e, t) {
875
- let r = Ls(e, t);
876
- if (r === void 0)
877
- return {};
878
- let { name: n, description: i, supported: s, action: a, forced: c, standard: u } = r;
879
- return {
880
- [e]: {
881
- name: n,
882
- number: e,
883
- description: i,
884
- supported: s,
885
- action: a,
886
- forced: c,
887
- standard: u
888
- }
889
- };
890
- }, "getSignalByNumber"), Ls = /* @__PURE__ */ o(function(e, t) {
891
- let r = t.find(({ name: n }) => _s.constants.signals[n] === e);
892
- return r !== void 0 ? r : t.find((n) => n.number === e);
893
- }, "findSignalByNumber"), Fs = Ds();
894
- U.signalsByNumber = Fs;
895
- });
896
-
897
- // ../node_modules/execa/lib/error.js
898
- var Pn = p((Rf, vn) => {
899
- "use strict";
900
- var { signalsByName: Us } = wn(), $s = /* @__PURE__ */ o(({ timedOut: e, timeout: t, errorCode: r, signal: n, signalDescription: i, exitCode: s,
901
- isCanceled: a }) => e ? `timed out after ${t} milliseconds` : a ? "was canceled" : r !== void 0 ? `failed with ${r}` : n !== void 0 ? `was\
902
- killed with ${n} (${i})` : s !== void 0 ? `failed with exit code ${s}` : "failed", "getErrorPrefix"), qs = /* @__PURE__ */ o(({
903
- stdout: e,
904
- stderr: t,
905
- all: r,
906
- error: n,
907
- signal: i,
908
- exitCode: s,
909
- command: a,
910
- escapedCommand: c,
911
- timedOut: u,
912
- isCanceled: l,
913
- killed: f,
914
- parsed: { options: { timeout: x } }
915
- }) => {
916
- s = s === null ? void 0 : s, i = i === null ? void 0 : i;
917
- let g = i === void 0 ? void 0 : Us[i].description, m = n && n.code, h = `Command ${$s({ timedOut: u, timeout: x, errorCode: m, signal: i,
918
- signalDescription: g, exitCode: s, isCanceled: l })}: ${a}`, S = Object.prototype.toString.call(n) === "[object Error]", T = S ? `${h}
919
- ${n.message}` : h, E = [T, t, e].filter(Boolean).join(`
920
- `);
921
- return S ? (n.originalMessage = n.message, n.message = E) : n = new Error(E), n.shortMessage = T, n.command = a, n.escapedCommand = c, n.
922
- exitCode = s, n.signal = i, n.signalDescription = g, n.stdout = e, n.stderr = t, r !== void 0 && (n.all = r), "bufferedData" in n && delete n.
923
- bufferedData, n.failed = !0, n.timedOut = !!u, n.isCanceled = l, n.killed = f && !u, n;
924
- }, "makeError");
925
- vn.exports = qs;
926
- });
927
-
928
- // ../node_modules/execa/lib/stdio.js
929
- var Tn = p((Gf, ht) => {
930
- "use strict";
931
- var ge = ["stdin", "stdout", "stderr"], Ws = /* @__PURE__ */ o((e) => ge.some((t) => e[t] !== void 0), "hasAlias"), En = /* @__PURE__ */ o(
932
- (e) => {
933
- if (!e)
934
- return;
935
- let { stdio: t } = e;
936
- if (t === void 0)
937
- return ge.map((n) => e[n]);
938
- if (Ws(e))
939
- throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${ge.map((n) => `\`${n}\``).join(", ")}`);
940
- if (typeof t == "string")
941
- return t;
942
- if (!Array.isArray(t))
943
- throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);
944
- let r = Math.max(t.length, ge.length);
945
- return Array.from({ length: r }, (n, i) => t[i]);
946
- }, "normalizeStdio");
947
- ht.exports = En;
948
- ht.exports.node = (e) => {
949
- let t = En(e);
950
- return t === "ipc" ? "ipc" : t === void 0 || typeof t == "string" ? [t, t, t, "ipc"] : t.includes("ipc") ? t : [...t, "ipc"];
951
- };
952
- });
953
-
954
- // ../node_modules/signal-exit/signals.js
955
- var kn = p((Nf, be) => {
956
- be.exports = [
957
- "SIGABRT",
958
- "SIGALRM",
959
- "SIGHUP",
960
- "SIGINT",
961
- "SIGTERM"
962
- ];
963
- process.platform !== "win32" && be.exports.push(
964
- "SIGVTALRM",
965
- "SIGXCPU",
966
- "SIGXFSZ",
967
- "SIGUSR2",
968
- "SIGTRAP",
969
- "SIGSYS",
970
- "SIGQUIT",
971
- "SIGIOT"
972
- // should detect profiler and enable/disable accordingly.
973
- // see #21
974
- // 'SIGPROF'
975
- );
976
- process.platform === "linux" && be.exports.push(
977
- "SIGIO",
978
- "SIGPOLL",
979
- "SIGPWR",
980
- "SIGSTKFLT",
981
- "SIGUNUSED"
982
- );
983
- });
984
-
985
- // ../node_modules/signal-exit/index.js
986
- var Rn = p((Bf, W) => {
987
- var w = global.process, _ = /* @__PURE__ */ o(function(e) {
988
- return e && typeof e == "object" && typeof e.removeListener == "function" && typeof e.emit == "function" && typeof e.reallyExit == "func\
989
- tion" && typeof e.listeners == "function" && typeof e.kill == "function" && typeof e.pid == "number" && typeof e.on == "function";
990
- }, "processOk");
991
- _(w) ? (In = b("assert"), $ = kn(), Cn = /^win/i.test(w.platform), Y = b("events"), typeof Y != "function" && (Y = Y.EventEmitter), w.__signal_exit_emitter__ ?
992
- P = w.__signal_exit_emitter__ : (P = w.__signal_exit_emitter__ = new Y(), P.count = 0, P.emitted = {}), P.infinite || (P.setMaxListeners(1 / 0),
993
- P.infinite = !0), W.exports = function(e, t) {
994
- if (!_(global.process))
995
- return function() {
996
- };
997
- In.equal(typeof e, "function", "a callback must be provided for exit handler"), q === !1 && yt();
998
- var r = "exit";
999
- t && t.alwaysLast && (r = "afterexit");
1000
- var n = /* @__PURE__ */ o(function() {
1001
- P.removeListener(r, e), P.listeners("exit").length === 0 && P.listeners("afterexit").length === 0 && xe();
1002
- }, "remove");
1003
- return P.on(r, e), n;
1004
- }, xe = /* @__PURE__ */ o(function() {
1005
- !q || !_(global.process) || (q = !1, $.forEach(function(t) {
1006
- try {
1007
- w.removeListener(t, Se[t]);
1008
- } catch {
1009
- }
1010
- }), w.emit = we, w.reallyExit = gt, P.count -= 1);
1011
- }, "unload"), W.exports.unload = xe, G = /* @__PURE__ */ o(function(t, r, n) {
1012
- P.emitted[t] || (P.emitted[t] = !0, P.emit(t, r, n));
1013
- }, "emit"), Se = {}, $.forEach(function(e) {
1014
- Se[e] = /* @__PURE__ */ o(function() {
1015
- if (_(global.process)) {
1016
- var r = w.listeners(e);
1017
- r.length === P.count && (xe(), G("exit", null, e), G("afterexit", null, e), Cn && e === "SIGHUP" && (e = "SIGINT"), w.kill(w.pid, e));
1018
- }
1019
- }, "listener");
1020
- }), W.exports.signals = function() {
1021
- return $;
1022
- }, q = !1, yt = /* @__PURE__ */ o(function() {
1023
- q || !_(global.process) || (q = !0, P.count += 1, $ = $.filter(function(t) {
1024
- try {
1025
- return w.on(t, Se[t]), !0;
1026
- } catch {
1027
- return !1;
1028
- }
1029
- }), w.emit = An, w.reallyExit = On);
1030
- }, "load"), W.exports.load = yt, gt = w.reallyExit, On = /* @__PURE__ */ o(function(t) {
1031
- _(global.process) && (w.exitCode = t || /* istanbul ignore next */
1032
- 0, G("exit", w.exitCode, null), G("afterexit", w.exitCode, null), gt.call(w, w.exitCode));
1033
- }, "processReallyExit"), we = w.emit, An = /* @__PURE__ */ o(function(t, r) {
1034
- if (t === "exit" && _(global.process)) {
1035
- r !== void 0 && (w.exitCode = r);
1036
- var n = we.apply(this, arguments);
1037
- return G("exit", w.exitCode, null), G("afterexit", w.exitCode, null), n;
1038
- } else
1039
- return we.apply(this, arguments);
1040
- }, "processEmit")) : W.exports = function() {
1041
- return function() {
1042
- };
1043
- };
1044
- var In, $, Cn, Y, P, xe, G, Se, q, yt, gt, On, we, An;
1045
- });
1046
-
1047
- // ../node_modules/execa/lib/kill.js
1048
- var Gn = p((Mf, _n) => {
1049
- "use strict";
1050
- var Hs = b("os"), Vs = Rn(), zs = 1e3 * 5, Js = /* @__PURE__ */ o((e, t = "SIGTERM", r = {}) => {
1051
- let n = e(t);
1052
- return Ks(e, t, r, n), n;
1053
- }, "spawnedKill"), Ks = /* @__PURE__ */ o((e, t, r, n) => {
1054
- if (!Ys(t, r, n))
1055
- return;
1056
- let i = Qs(r), s = setTimeout(() => {
1057
- e("SIGKILL");
1058
- }, i);
1059
- s.unref && s.unref();
1060
- }, "setKillTimeout"), Ys = /* @__PURE__ */ o((e, { forceKillAfterTimeout: t }, r) => Xs(e) && t !== !1 && r, "shouldForceKill"), Xs = /* @__PURE__ */ o(
1061
- (e) => e === Hs.constants.signals.SIGTERM || typeof e == "string" && e.toUpperCase() === "SIGTERM", "isSigterm"), Qs = /* @__PURE__ */ o(({
1062
- forceKillAfterTimeout: e = !0 }) => {
1063
- if (e === !0)
1064
- return zs;
1065
- if (!Number.isFinite(e) || e < 0)
1066
- throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);
1067
- return e;
1068
- }, "getForceKillAfterTimeout"), Zs = /* @__PURE__ */ o((e, t) => {
1069
- e.kill() && (t.isCanceled = !0);
1070
- }, "spawnedCancel"), ea = /* @__PURE__ */ o((e, t, r) => {
1071
- e.kill(t), r(Object.assign(new Error("Timed out"), { timedOut: !0, signal: t }));
1072
- }, "timeoutKill"), ta = /* @__PURE__ */ o((e, { timeout: t, killSignal: r = "SIGTERM" }, n) => {
1073
- if (t === 0 || t === void 0)
1074
- return n;
1075
- let i, s = new Promise((c, u) => {
1076
- i = setTimeout(() => {
1077
- ea(e, r, u);
1078
- }, t);
1079
- }), a = n.finally(() => {
1080
- clearTimeout(i);
1081
- });
1082
- return Promise.race([s, a]);
1083
- }, "setupTimeout"), ra = /* @__PURE__ */ o(({ timeout: e }) => {
1084
- if (e !== void 0 && (!Number.isFinite(e) || e < 0))
1085
- throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);
1086
- }, "validateTimeout"), na = /* @__PURE__ */ o(async (e, { cleanup: t, detached: r }, n) => {
1087
- if (!t || r)
1088
- return n;
1089
- let i = Vs(() => {
1090
- e.kill();
1091
- });
1092
- return n.finally(() => {
1093
- i();
1094
- });
1095
- }, "setExitHandler");
1096
- _n.exports = {
1097
- spawnedKill: Js,
1098
- spawnedCancel: Zs,
1099
- setupTimeout: ta,
1100
- validateTimeout: ra,
1101
- setExitHandler: na
1102
- };
1103
- });
1104
-
1105
- // ../node_modules/is-stream/index.js
1106
- var Nn = p((Ff, jn) => {
1107
- "use strict";
1108
- var k = /* @__PURE__ */ o((e) => e !== null && typeof e == "object" && typeof e.pipe == "function", "isStream");
1109
- k.writable = (e) => k(e) && e.writable !== !1 && typeof e._write == "function" && typeof e._writableState == "object";
1110
- k.readable = (e) => k(e) && e.readable !== !1 && typeof e._read == "function" && typeof e._readableState == "object";
1111
- k.duplex = (e) => k.writable(e) && k.readable(e);
1112
- k.transform = (e) => k.duplex(e) && typeof e._transform == "function";
1113
- jn.exports = k;
1114
- });
1115
-
1116
- // ../node_modules/get-stream/buffer-stream.js
1117
- var Dn = p(($f, Bn) => {
1118
- "use strict";
1119
- var { PassThrough: oa } = b("stream");
1120
- Bn.exports = (e) => {
1121
- e = { ...e };
1122
- let { array: t } = e, { encoding: r } = e, n = r === "buffer", i = !1;
1123
- t ? i = !(r || n) : r = r || "utf8", n && (r = null);
1124
- let s = new oa({ objectMode: i });
1125
- r && s.setEncoding(r);
1126
- let a = 0, c = [];
1127
- return s.on("data", (u) => {
1128
- c.push(u), i ? a = c.length : a += u.length;
1129
- }), s.getBufferedValue = () => t ? c : n ? Buffer.concat(c, a) : c.join(""), s.getBufferedLength = () => a, s;
1130
- };
1131
- });
1132
-
1133
- // ../node_modules/get-stream/index.js
1134
- var Mn = p((qf, X) => {
1135
- "use strict";
1136
- var { constants: ia } = b("buffer"), sa = b("stream"), { promisify: aa } = b("util"), ca = Dn(), ua = aa(sa.pipeline), ve = class extends Error {
1137
- static {
1138
- o(this, "MaxBufferError");
1139
- }
1140
- constructor() {
1141
- super("maxBuffer exceeded"), this.name = "MaxBufferError";
1142
- }
1143
- };
1144
- async function bt(e, t) {
1145
- if (!e)
1146
- throw new Error("Expected a stream");
1147
- t = {
1148
- maxBuffer: 1 / 0,
1149
- ...t
1150
- };
1151
- let { maxBuffer: r } = t, n = ca(t);
1152
- return await new Promise((i, s) => {
1153
- let a = /* @__PURE__ */ o((c) => {
1154
- c && n.getBufferedLength() <= ia.MAX_LENGTH && (c.bufferedData = n.getBufferedValue()), s(c);
1155
- }, "rejectPromise");
1156
- (async () => {
1157
- try {
1158
- await ua(e, n), i();
1159
- } catch (c) {
1160
- a(c);
1161
- }
1162
- })(), n.on("data", () => {
1163
- n.getBufferedLength() > r && a(new ve());
1164
- });
1165
- }), n.getBufferedValue();
1166
- }
1167
- o(bt, "getStream");
1168
- X.exports = bt;
1169
- X.exports.buffer = (e, t) => bt(e, { ...t, encoding: "buffer" });
1170
- X.exports.array = (e, t) => bt(e, { ...t, array: !0 });
1171
- X.exports.MaxBufferError = ve;
456
+ var Pr = S("child_process"), Me = wr(), Le = Er();
457
+ function vr(e, t, r) {
458
+ let n = Me(e, t, r), i = Pr.spawn(n.command, n.args, n.options);
459
+ return Le.hookChildProcess(i, n), i;
460
+ }
461
+ o(vr, "spawn");
462
+ function Qo(e, t, r) {
463
+ let n = Me(e, t, r), i = Pr.spawnSync(n.command, n.args, n.options);
464
+ return i.error = i.error || Le.verifyENOENTSync(i.status, n), i;
465
+ }
466
+ o(Qo, "spawnSync");
467
+ R.exports = vr;
468
+ R.exports.spawn = vr;
469
+ R.exports.sync = Qo;
470
+ R.exports._parse = Me;
471
+ R.exports._enoent = Le;
1172
472
  });
1173
473
 
1174
474
  // ../node_modules/merge-stream/index.js
1175
- var xt = p((Hf, Ln) => {
475
+ var Qr = x((rf, Xr) => {
1176
476
  "use strict";
1177
- var { PassThrough: la } = b("stream");
1178
- Ln.exports = function() {
1179
- var e = [], t = new la({ objectMode: !0 });
477
+ var { PassThrough: Yi } = S("stream");
478
+ Xr.exports = function() {
479
+ var e = [], t = new Yi({ objectMode: !0 });
1180
480
  return t.setMaxListeners(0), t.add = r, t.isEmpty = n, t.on("unpipe", i), Array.prototype.slice.call(arguments).forEach(r), t;
1181
481
  function r(s) {
1182
482
  return Array.isArray(s) ? (s.forEach(r), this) : (e.push(s), s.once("end", i.bind(null, s)), s.once("error", t.emit.bind(t, "error")),
@@ -1196,383 +496,24 @@ var xt = p((Hf, Ln) => {
1196
496
  };
1197
497
  });
1198
498
 
1199
- // ../node_modules/execa/lib/stream.js
1200
- var qn = p((zf, $n) => {
1201
- "use strict";
1202
- var Un = Nn(), Fn = Mn(), fa = xt(), pa = /* @__PURE__ */ o((e, t) => {
1203
- t === void 0 || e.stdin === void 0 || (Un(t) ? t.pipe(e.stdin) : e.stdin.end(t));
1204
- }, "handleInput"), da = /* @__PURE__ */ o((e, { all: t }) => {
1205
- if (!t || !e.stdout && !e.stderr)
1206
- return;
1207
- let r = fa();
1208
- return e.stdout && r.add(e.stdout), e.stderr && r.add(e.stderr), r;
1209
- }, "makeAllStream"), St = /* @__PURE__ */ o(async (e, t) => {
1210
- if (e) {
1211
- e.destroy();
1212
- try {
1213
- return await t;
1214
- } catch (r) {
1215
- return r.bufferedData;
1216
- }
1217
- }
1218
- }, "getBufferedData"), wt = /* @__PURE__ */ o((e, { encoding: t, buffer: r, maxBuffer: n }) => {
1219
- if (!(!e || !r))
1220
- return t ? Fn(e, { encoding: t, maxBuffer: n }) : Fn.buffer(e, { maxBuffer: n });
1221
- }, "getStreamPromise"), ma = /* @__PURE__ */ o(async ({ stdout: e, stderr: t, all: r }, { encoding: n, buffer: i, maxBuffer: s }, a) => {
1222
- let c = wt(e, { encoding: n, buffer: i, maxBuffer: s }), u = wt(t, { encoding: n, buffer: i, maxBuffer: s }), l = wt(r, { encoding: n, buffer: i,
1223
- maxBuffer: s * 2 });
1224
- try {
1225
- return await Promise.all([a, c, u, l]);
1226
- } catch (f) {
1227
- return Promise.all([
1228
- { error: f, signal: f.signal, timedOut: f.timedOut },
1229
- St(e, c),
1230
- St(t, u),
1231
- St(r, l)
1232
- ]);
1233
- }
1234
- }, "getSpawnedResult"), ha = /* @__PURE__ */ o(({ input: e }) => {
1235
- if (Un(e))
1236
- throw new TypeError("The `input` option cannot be a stream in sync mode");
1237
- }, "validateInputSync");
1238
- $n.exports = {
1239
- handleInput: pa,
1240
- makeAllStream: da,
1241
- getSpawnedResult: ma,
1242
- validateInputSync: ha
1243
- };
1244
- });
1245
-
1246
- // ../node_modules/execa/lib/promise.js
1247
- var Hn = p((Kf, Wn) => {
1248
- "use strict";
1249
- var ya = (async () => {
1250
- })().constructor.prototype, ga = ["then", "catch", "finally"].map((e) => [
1251
- e,
1252
- Reflect.getOwnPropertyDescriptor(ya, e)
1253
- ]), ba = /* @__PURE__ */ o((e, t) => {
1254
- for (let [r, n] of ga) {
1255
- let i = typeof t == "function" ? (...s) => Reflect.apply(n.value, t(), s) : n.value.bind(t);
1256
- Reflect.defineProperty(e, r, { ...n, value: i });
1257
- }
1258
- return e;
1259
- }, "mergePromise"), xa = /* @__PURE__ */ o((e) => new Promise((t, r) => {
1260
- e.on("exit", (n, i) => {
1261
- t({ exitCode: n, signal: i });
1262
- }), e.on("error", (n) => {
1263
- r(n);
1264
- }), e.stdin && e.stdin.on("error", (n) => {
1265
- r(n);
1266
- });
1267
- }), "getSpawnedPromise");
1268
- Wn.exports = {
1269
- mergePromise: ba,
1270
- getSpawnedPromise: xa
1271
- };
1272
- });
1273
-
1274
- // ../node_modules/execa/lib/command.js
1275
- var Jn = p((Xf, zn) => {
1276
- "use strict";
1277
- var Vn = /* @__PURE__ */ o((e, t = []) => Array.isArray(t) ? [e, ...t] : [e], "normalizeArgs"), Sa = /^[\w.-]+$/, wa = /"/g, va = /* @__PURE__ */ o(
1278
- (e) => typeof e != "string" || Sa.test(e) ? e : `"${e.replace(wa, '\\"')}"`, "escapeArg"), Pa = /* @__PURE__ */ o((e, t) => Vn(e, t).join(
1279
- " "), "joinCommand"), Ea = /* @__PURE__ */ o((e, t) => Vn(e, t).map((r) => va(r)).join(" "), "getEscapedCommand"), Ta = / +/g, ka = /* @__PURE__ */ o(
1280
- (e) => {
1281
- let t = [];
1282
- for (let r of e.trim().split(Ta)) {
1283
- let n = t[t.length - 1];
1284
- n && n.endsWith("\\") ? t[t.length - 1] = `${n.slice(0, -1)} ${r}` : t.push(r);
1285
- }
1286
- return t;
1287
- }, "parseCommand");
1288
- zn.exports = {
1289
- joinCommand: Pa,
1290
- getEscapedCommand: Ea,
1291
- parseCommand: ka
1292
- };
1293
- });
1294
-
1295
- // ../node_modules/execa/index.js
1296
- var to = p((Zf, H) => {
1297
- "use strict";
1298
- var Ia = b("path"), vt = b("child_process"), Ca = pt(), Oa = cn(), Aa = fn(), Ra = hn(), Pe = Pn(), Yn = Tn(), { spawnedKill: _a, spawnedCancel: Ga,
1299
- setupTimeout: ja, validateTimeout: Na, setExitHandler: Ba } = Gn(), { handleInput: Da, getSpawnedResult: Ma, makeAllStream: La, validateInputSync: Fa } = qn(),
1300
- { mergePromise: Kn, getSpawnedPromise: Ua } = Hn(), { joinCommand: Xn, parseCommand: Qn, getEscapedCommand: Zn } = Jn(), $a = 1e3 * 1e3 * 100,
1301
- qa = /* @__PURE__ */ o(({ env: e, extendEnv: t, preferLocal: r, localDir: n, execPath: i }) => {
1302
- let s = t ? { ...process.env, ...e } : e;
1303
- return r ? Aa.env({ env: s, cwd: n, execPath: i }) : s;
1304
- }, "getEnv"), eo = /* @__PURE__ */ o((e, t, r = {}) => {
1305
- let n = Ca._parse(e, t, r);
1306
- return e = n.command, t = n.args, r = n.options, r = {
1307
- maxBuffer: $a,
1308
- buffer: !0,
1309
- stripFinalNewline: !0,
1310
- extendEnv: !0,
1311
- preferLocal: !1,
1312
- localDir: r.cwd || process.cwd(),
1313
- execPath: process.execPath,
1314
- encoding: "utf8",
1315
- reject: !0,
1316
- cleanup: !0,
1317
- all: !1,
1318
- windowsHide: !0,
1319
- ...r
1320
- }, r.env = qa(r), r.stdio = Yn(r), process.platform === "win32" && Ia.basename(e, ".exe") === "cmd" && t.unshift("/q"), { file: e, args: t,
1321
- options: r, parsed: n };
1322
- }, "handleArguments"), Q = /* @__PURE__ */ o((e, t, r) => typeof t != "string" && !Buffer.isBuffer(t) ? r === void 0 ? void 0 : "" : e.stripFinalNewline ?
1323
- Oa(t) : t, "handleOutput"), Ee = /* @__PURE__ */ o((e, t, r) => {
1324
- let n = eo(e, t, r), i = Xn(e, t), s = Zn(e, t);
1325
- Na(n.options);
1326
- let a;
1327
- try {
1328
- a = vt.spawn(n.file, n.args, n.options);
1329
- } catch (m) {
1330
- let y = new vt.ChildProcess(), h = Promise.reject(Pe({
1331
- error: m,
1332
- stdout: "",
1333
- stderr: "",
1334
- all: "",
1335
- command: i,
1336
- escapedCommand: s,
1337
- parsed: n,
1338
- timedOut: !1,
1339
- isCanceled: !1,
1340
- killed: !1
1341
- }));
1342
- return Kn(y, h);
1343
- }
1344
- let c = Ua(a), u = ja(a, n.options, c), l = Ba(a, n.options, u), f = { isCanceled: !1 };
1345
- a.kill = _a.bind(null, a.kill.bind(a)), a.cancel = Ga.bind(null, a, f);
1346
- let g = Ra(/* @__PURE__ */ o(async () => {
1347
- let [{ error: m, exitCode: y, signal: h, timedOut: S }, T, E, I] = await Ma(a, n.options, l), O = Q(n.options, T), A = Q(n.options, E),
1348
- d = Q(n.options, I);
1349
- if (m || y !== 0 || h !== null) {
1350
- let v = Pe({
1351
- error: m,
1352
- exitCode: y,
1353
- signal: h,
1354
- stdout: O,
1355
- stderr: A,
1356
- all: d,
1357
- command: i,
1358
- escapedCommand: s,
1359
- parsed: n,
1360
- timedOut: S,
1361
- isCanceled: f.isCanceled,
1362
- killed: a.killed
1363
- });
1364
- if (!n.options.reject)
1365
- return v;
1366
- throw v;
1367
- }
1368
- return {
1369
- command: i,
1370
- escapedCommand: s,
1371
- exitCode: 0,
1372
- stdout: O,
1373
- stderr: A,
1374
- all: d,
1375
- failed: !1,
1376
- timedOut: !1,
1377
- isCanceled: !1,
1378
- killed: !1
1379
- };
1380
- }, "handlePromise"));
1381
- return Da(a, n.options.input), a.all = La(a, n.options), Kn(a, g);
1382
- }, "execa");
1383
- H.exports = Ee;
1384
- H.exports.sync = (e, t, r) => {
1385
- let n = eo(e, t, r), i = Xn(e, t), s = Zn(e, t);
1386
- Fa(n.options);
1387
- let a;
1388
- try {
1389
- a = vt.spawnSync(n.file, n.args, n.options);
1390
- } catch (l) {
1391
- throw Pe({
1392
- error: l,
1393
- stdout: "",
1394
- stderr: "",
1395
- all: "",
1396
- command: i,
1397
- escapedCommand: s,
1398
- parsed: n,
1399
- timedOut: !1,
1400
- isCanceled: !1,
1401
- killed: !1
1402
- });
1403
- }
1404
- let c = Q(n.options, a.stdout, a.error), u = Q(n.options, a.stderr, a.error);
1405
- if (a.error || a.status !== 0 || a.signal !== null) {
1406
- let l = Pe({
1407
- stdout: c,
1408
- stderr: u,
1409
- error: a.error,
1410
- signal: a.signal,
1411
- exitCode: a.status,
1412
- command: i,
1413
- escapedCommand: s,
1414
- parsed: n,
1415
- timedOut: a.error && a.error.code === "ETIMEDOUT",
1416
- isCanceled: !1,
1417
- killed: a.signal !== null
1418
- });
1419
- if (!n.options.reject)
1420
- return l;
1421
- throw l;
1422
- }
1423
- return {
1424
- command: i,
1425
- escapedCommand: s,
1426
- exitCode: 0,
1427
- stdout: c,
1428
- stderr: u,
1429
- failed: !1,
1430
- timedOut: !1,
1431
- isCanceled: !1,
1432
- killed: !1
1433
- };
1434
- };
1435
- H.exports.command = (e, t) => {
1436
- let [r, ...n] = Qn(e);
1437
- return Ee(r, n, t);
1438
- };
1439
- H.exports.commandSync = (e, t) => {
1440
- let [r, ...n] = Qn(e);
1441
- return Ee.sync(r, n, t);
1442
- };
1443
- H.exports.node = (e, t, r = {}) => {
1444
- t && !Array.isArray(t) && typeof t == "object" && (r = t, t = []);
1445
- let n = Yn.node(r), i = process.execArgv.filter((c) => !c.startsWith("--inspect")), {
1446
- nodePath: s = process.execPath,
1447
- nodeOptions: a = i
1448
- } = r;
1449
- return Ee(
1450
- s,
1451
- [
1452
- ...a,
1453
- e,
1454
- ...Array.isArray(t) ? t : []
1455
- ],
1456
- {
1457
- ...r,
1458
- stdin: void 0,
1459
- stdout: void 0,
1460
- stderr: void 0,
1461
- stdio: n,
1462
- shell: !1
1463
- }
1464
- );
1465
- };
1466
- });
1467
-
1468
- // ../node_modules/detect-package-manager/dist/index.js
1469
- var io = p((oo) => {
1470
- var Wa = Object.create, Ie = Object.defineProperty, Ha = Object.getOwnPropertyDescriptor, Va = Object.getOwnPropertyNames, za = Object.getPrototypeOf,
1471
- Ja = Object.prototype.hasOwnProperty, ro = /* @__PURE__ */ o((e) => Ie(e, "__esModule", { value: !0 }), "__markAsModule"), Ka = /* @__PURE__ */ o(
1472
- (e, t) => {
1473
- ro(e);
1474
- for (var r in t)
1475
- Ie(e, r, { get: t[r], enumerable: !0 });
1476
- }, "__export"), Ya = /* @__PURE__ */ o((e, t, r) => {
1477
- if (t && typeof t == "object" || typeof t == "function")
1478
- for (let n of Va(t))
1479
- !Ja.call(e, n) && n !== "default" && Ie(e, n, { get: /* @__PURE__ */ o(() => t[n], "get"), enumerable: !(r = Ha(t, n)) || r.enumerable });
1480
- return e;
1481
- }, "__reExport"), Et = /* @__PURE__ */ o((e) => Ya(ro(Ie(e != null ? Wa(za(e)) : {}, "default", e && e.__esModule && "default" in e ? { get: /* @__PURE__ */ o(
1482
- () => e.default, "get"), enumerable: !0 } : { value: e, enumerable: !0 })), e), "__toModule");
1483
- Ka(oo, {
1484
- clearCache: /* @__PURE__ */ o(() => tc, "clearCache"),
1485
- detect: /* @__PURE__ */ o(() => Za, "detect"),
1486
- getNpmVersion: /* @__PURE__ */ o(() => ec, "getNpmVersion")
1487
- });
1488
- var Xa = Et(b("fs")), Te = Et(b("path")), no = Et(to());
1489
- async function ke(e) {
1490
- try {
1491
- return await Xa.promises.access(e), !0;
1492
- } catch {
1493
- return !1;
1494
- }
1495
- }
1496
- o(ke, "pathExists");
1497
- var j = /* @__PURE__ */ new Map();
1498
- function Pt(e) {
1499
- let t = `has_global_${e}`;
1500
- return j.has(t) ? Promise.resolve(j.get(t)) : (0, no.default)(e, ["--version"]).then((r) => /^\d+.\d+.\d+$/.test(r.stdout)).then((r) => (j.
1501
- set(t, r), r)).catch(() => !1);
1502
- }
1503
- o(Pt, "hasGlobalInstallation");
1504
- function Qa(e = ".") {
1505
- let t = `lockfile_${e}`;
1506
- return j.has(t) ? Promise.resolve(j.get(t)) : Promise.all([
1507
- ke((0, Te.resolve)(e, "yarn.lock")),
1508
- ke((0, Te.resolve)(e, "package-lock.json")),
1509
- ke((0, Te.resolve)(e, "pnpm-lock.yaml")),
1510
- ke((0, Te.resolve)(e, "bun.lockb"))
1511
- ]).then(([r, n, i, s]) => {
1512
- let a = null;
1513
- return r ? a = "yarn" : i ? a = "pnpm" : s ? a = "bun" : n && (a = "npm"), j.set(t, a), a;
1514
- });
1515
- }
1516
- o(Qa, "getTypeofLockFile");
1517
- var Za = /* @__PURE__ */ o(async ({
1518
- cwd: e,
1519
- includeGlobalBun: t
1520
- } = {}) => {
1521
- let r = await Qa(e);
1522
- if (r)
1523
- return r;
1524
- let [n, i, s] = await Promise.all([
1525
- Pt("yarn"),
1526
- Pt("pnpm"),
1527
- t && Pt("bun")
1528
- ]);
1529
- return n ? "yarn" : i ? "pnpm" : s ? "bun" : "npm";
1530
- }, "detect");
1531
- function ec(e) {
1532
- return (0, no.default)(e || "npm", ["--version"]).then((t) => t.stdout);
1533
- }
1534
- o(ec, "getNpmVersion");
1535
- function tc() {
1536
- return j.clear();
1537
- }
1538
- o(tc, "clearCache");
1539
- });
1540
-
1541
- // ../node_modules/walk-up-path/dist/cjs/index.js
1542
- var ao = p((Ce) => {
1543
- "use strict";
1544
- Object.defineProperty(Ce, "__esModule", { value: !0 });
1545
- Ce.walkUp = void 0;
1546
- var so = b("path"), rc = /* @__PURE__ */ o(function* (e) {
1547
- for (e = (0, so.resolve)(e); e; ) {
1548
- yield e;
1549
- let t = (0, so.dirname)(e);
1550
- if (t === e)
1551
- break;
1552
- e = t;
1553
- }
1554
- }, "walkUp");
1555
- Ce.walkUp = rc;
1556
- });
1557
-
1558
499
  // ../node_modules/common-path-prefix/index.js
1559
- var si = p((Am, ii) => {
500
+ var vn = x((Zf, Pn) => {
1560
501
  "use strict";
1561
- var { sep: _u } = b("path"), Gu = /* @__PURE__ */ o((e) => {
502
+ var { sep: vs } = S("path"), Ts = /* @__PURE__ */ o((e) => {
1562
503
  for (let t of e) {
1563
504
  let r = /(\/|\\)/.exec(t);
1564
505
  if (r !== null) return r[0];
1565
506
  }
1566
- return _u;
507
+ return vs;
1567
508
  }, "determineSeparator");
1568
- ii.exports = /* @__PURE__ */ o(function(t, r = Gu(t)) {
509
+ Pn.exports = /* @__PURE__ */ o(function(t, r = Ts(t)) {
1569
510
  let [n = "", ...i] = t;
1570
511
  if (n === "" || i.length === 0) return "";
1571
512
  let s = n.split(r), a = s.length;
1572
513
  for (let u of i) {
1573
- let l = u.split(r);
1574
- for (let f = 0; f < a; f++)
1575
- l[f] !== s[f] && (a = f);
514
+ let f = u.split(r);
515
+ for (let l = 0; l < a; l++)
516
+ f[l] !== s[l] && (a = l);
1576
517
  if (a === 0) return "";
1577
518
  }
1578
519
  let c = s.slice(0, a).join(r);
@@ -1581,19 +522,19 @@ var si = p((Am, ii) => {
1581
522
  });
1582
523
 
1583
524
  // ../node_modules/fetch-retry/index.js
1584
- var Ai = p((rg, Oi) => {
525
+ var Yn = x((Tm, zn) => {
1585
526
  "use strict";
1586
- Oi.exports = function(e, t) {
527
+ zn.exports = function(e, t) {
1587
528
  if (t = t || {}, typeof e != "function")
1588
- throw new C("fetch must be a function");
529
+ throw new E("fetch must be a function");
1589
530
  if (typeof t != "object")
1590
- throw new C("defaults must be an object");
1591
- if (t.retries !== void 0 && !Xe(t.retries))
1592
- throw new C("retries must be a positive integer");
1593
- if (t.retryDelay !== void 0 && !Xe(t.retryDelay) && typeof t.retryDelay != "function")
1594
- throw new C("retryDelay must be a positive integer or a function returning a positive integer");
531
+ throw new E("defaults must be an object");
532
+ if (t.retries !== void 0 && !xe(t.retries))
533
+ throw new E("retries must be a positive integer");
534
+ if (t.retryDelay !== void 0 && !xe(t.retryDelay) && typeof t.retryDelay != "function")
535
+ throw new E("retryDelay must be a positive integer or a function returning a positive integer");
1595
536
  if (t.retryOn !== void 0 && !Array.isArray(t.retryOn) && typeof t.retryOn != "function")
1596
- throw new C("retryOn property expects an array or function");
537
+ throw new E("retryOn property expects an array or function");
1597
538
  var r = {
1598
539
  retries: 3,
1599
540
  retryDelay: 1e3,
@@ -1602,296 +543,423 @@ var Ai = p((rg, Oi) => {
1602
543
  return t = Object.assign(r, t), /* @__PURE__ */ o(function(i, s) {
1603
544
  var a = t.retries, c = t.retryDelay, u = t.retryOn;
1604
545
  if (s && s.retries !== void 0)
1605
- if (Xe(s.retries))
546
+ if (xe(s.retries))
1606
547
  a = s.retries;
1607
548
  else
1608
- throw new C("retries must be a positive integer");
549
+ throw new E("retries must be a positive integer");
1609
550
  if (s && s.retryDelay !== void 0)
1610
- if (Xe(s.retryDelay) || typeof s.retryDelay == "function")
551
+ if (xe(s.retryDelay) || typeof s.retryDelay == "function")
1611
552
  c = s.retryDelay;
1612
553
  else
1613
- throw new C("retryDelay must be a positive integer or a function returning a positive integer");
554
+ throw new E("retryDelay must be a positive integer or a function returning a positive integer");
1614
555
  if (s && s.retryOn)
1615
556
  if (Array.isArray(s.retryOn) || typeof s.retryOn == "function")
1616
557
  u = s.retryOn;
1617
558
  else
1618
- throw new C("retryOn property expects an array or function");
1619
- return new Promise(function(l, f) {
1620
- var x = /* @__PURE__ */ o(function(m) {
1621
- var y = typeof Request < "u" && i instanceof Request ? i.clone() : i;
1622
- e(y, s).then(function(h) {
1623
- if (Array.isArray(u) && u.indexOf(h.status) === -1)
1624
- l(h);
559
+ throw new E("retryOn property expects an array or function");
560
+ return new Promise(function(f, l) {
561
+ var d = /* @__PURE__ */ o(function(y) {
562
+ var g = typeof Request < "u" && i instanceof Request ? i.clone() : i;
563
+ e(g, s).then(function(m) {
564
+ if (Array.isArray(u) && u.indexOf(m.status) === -1)
565
+ f(m);
1625
566
  else if (typeof u == "function")
1626
567
  try {
1627
- return Promise.resolve(u(m, null, h)).then(function(S) {
1628
- S ? g(m, null, h) : l(h);
1629
- }).catch(f);
1630
- } catch (S) {
1631
- f(S);
568
+ return Promise.resolve(u(y, null, m)).then(function(b) {
569
+ b ? h(y, null, m) : f(m);
570
+ }).catch(l);
571
+ } catch (b) {
572
+ l(b);
1632
573
  }
1633
574
  else
1634
- m < a ? g(m, null, h) : l(h);
1635
- }).catch(function(h) {
575
+ y < a ? h(y, null, m) : f(m);
576
+ }).catch(function(m) {
1636
577
  if (typeof u == "function")
1637
578
  try {
1638
- Promise.resolve(u(m, h, null)).then(function(S) {
1639
- S ? g(m, h, null) : f(h);
1640
- }).catch(function(S) {
1641
- f(S);
579
+ Promise.resolve(u(y, m, null)).then(function(b) {
580
+ b ? h(y, m, null) : l(m);
581
+ }).catch(function(b) {
582
+ l(b);
1642
583
  });
1643
- } catch (S) {
1644
- f(S);
584
+ } catch (b) {
585
+ l(b);
1645
586
  }
1646
- else m < a ? g(m, h, null) : f(h);
587
+ else y < a ? h(y, m, null) : l(m);
1647
588
  });
1648
589
  }, "wrappedFetch");
1649
- function g(m, y, h) {
1650
- var S = typeof c == "function" ? c(m, y, h) : c;
590
+ function h(y, g, m) {
591
+ var b = typeof c == "function" ? c(y, g, m) : c;
1651
592
  setTimeout(function() {
1652
- x(++m);
1653
- }, S);
593
+ d(++y);
594
+ }, b);
1654
595
  }
1655
- o(g, "retry"), x(0);
596
+ o(h, "retry"), d(0);
1656
597
  });
1657
598
  }, "fetchRetry");
1658
599
  };
1659
- function Xe(e) {
600
+ function xe(e) {
1660
601
  return Number.isInteger(e) && e >= 0;
1661
602
  }
1662
- o(Xe, "isPositiveInteger");
1663
- function C(e) {
603
+ o(xe, "isPositiveInteger");
604
+ function E(e) {
1664
605
  this.name = "ArgumentError", this.message = e;
1665
606
  }
1666
- o(C, "ArgumentError");
607
+ o(E, "ArgumentError");
1667
608
  });
1668
609
 
1669
610
  // src/telemetry/index.ts
1670
- import { logger as Ui } from "storybook/internal/node-logger";
611
+ import { logger as so } from "storybook/internal/node-logger";
1671
612
 
1672
613
  // src/telemetry/notify.ts
1673
- var le = R(dr(), 1);
1674
- import { cache as mr } from "storybook/internal/common";
1675
- var hr = "telemetry-notification-date", D = console, yr = /* @__PURE__ */ o(async () => {
1676
- await mr.get(hr, null) || (mr.set(hr, Date.now()), D.log(), D.log(
1677
- `${le.default.magenta(
1678
- le.default.bold("attention")
614
+ var z = A(vt(), 1);
615
+ import { cache as Tt } from "storybook/internal/common";
616
+ var Ct = "telemetry-notification-date", O = console, It = /* @__PURE__ */ o(async () => {
617
+ await Tt.get(Ct, null) || (Tt.set(Ct, Date.now()), O.log(), O.log(
618
+ `${z.default.magenta(
619
+ z.default.bold("attention")
1679
620
  )} => Storybook now collects completely anonymous telemetry regarding usage.`
1680
- ), D.log("This information is used to shape Storybook's roadmap and prioritize features."), D.log(
621
+ ), O.log("This information is used to shape Storybook's roadmap and prioritize features."), O.log(
1681
622
  "You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:"
1682
- ), D.log(le.default.cyan("https://storybook.js.org/telemetry")), D.log());
623
+ ), O.log(z.default.cyan("https://storybook.js.org/telemetry")), O.log());
1683
624
  }, "notify");
1684
625
 
1685
626
  // src/telemetry/sanitize.ts
1686
- import xr from "node:path";
1687
- function gr(e) {
627
+ import jt from "node:path";
628
+ function At(e) {
1688
629
  return e.replace(/[-[/{}()*+?.\\^$|]/g, "\\$&");
1689
630
  }
1690
- o(gr, "regexpEscape");
1691
- function br(e = "") {
631
+ o(At, "regexpEscape");
632
+ function Ot(e = "") {
1692
633
  return e.replace(/\u001B\[[0-9;]*m/g, "");
1693
634
  }
1694
- o(br, "removeAnsiEscapeCodes");
1695
- function z(e, t = xr.sep) {
635
+ o(Ot, "removeAnsiEscapeCodes");
636
+ function D(e, t = jt.sep) {
1696
637
  if (!e)
1697
638
  return e;
1698
639
  let r = process.cwd().split(t);
1699
640
  for (; r.length > 1; ) {
1700
- let n = r.join(t), i = new RegExp(gr(n), "gi");
641
+ let n = r.join(t), i = new RegExp(At(n), "gi");
1701
642
  e = e.replace(i, "$SNIP");
1702
- let s = r.join(t + t), a = new RegExp(gr(s), "gi");
643
+ let s = r.join(t + t), a = new RegExp(At(s), "gi");
1703
644
  e = e.replace(a, "$SNIP"), r.pop();
1704
645
  }
1705
646
  return e;
1706
647
  }
1707
- o(z, "cleanPaths");
1708
- function fe(e, t = xr.sep) {
648
+ o(D, "cleanPaths");
649
+ function Y(e, t = jt.sep) {
1709
650
  try {
1710
651
  e = {
1711
652
  ...JSON.parse(JSON.stringify(e)),
1712
- message: br(e.message),
1713
- stack: br(e.stack),
653
+ message: Ot(e.message),
654
+ stack: Ot(e.stack),
1714
655
  cause: e.cause,
1715
656
  name: e.name
1716
657
  };
1717
- let r = z(JSON.stringify(e), t);
658
+ let r = D(JSON.stringify(e), t);
1718
659
  return JSON.parse(r);
1719
660
  } catch (r) {
1720
661
  return `Sanitization error: ${r?.message}`;
1721
662
  }
1722
663
  }
1723
- o(fe, "sanitizeError");
664
+ o(Y, "sanitizeError");
1724
665
 
1725
666
  // src/telemetry/storybook-metadata.ts
1726
- var Ye = R(io(), 1);
1727
- import { dirname as ul } from "node:path";
667
+ import { dirname as ra } from "node:path";
1728
668
  import {
1729
- getProjectRoot as ll,
1730
- getStorybookConfiguration as fl,
1731
- getStorybookInfo as pl,
1732
- loadMainConfig as dl
669
+ getProjectRoot as na,
670
+ getStorybookConfiguration as oa,
671
+ getStorybookInfo as ia,
672
+ loadMainConfig as sa,
673
+ versions as aa
1733
674
  } from "storybook/internal/common";
1734
- import { readConfig as ml } from "storybook/internal/csf-tools";
675
+ import { readConfig as ca } from "storybook/internal/csf-tools";
1735
676
 
1736
677
  // ../node_modules/fd-package-json/dist/esm/main.js
1737
- var co = R(ao(), 1);
1738
- import { resolve as nc } from "node:path";
1739
- import { stat as oc, readFile as ic } from "node:fs/promises";
1740
- import { statSync as cp, readFileSync as up } from "node:fs";
1741
- async function sc(e) {
678
+ var Dt = A(Nt(), 1);
679
+ import { resolve as bo } from "node:path";
680
+ import { stat as xo, readFile as wo } from "node:fs/promises";
681
+ import { statSync as Ha, readFileSync as Ja } from "node:fs";
682
+ async function So(e) {
1742
683
  try {
1743
- return (await oc(e)).isFile();
684
+ return (await xo(e)).isFile();
1744
685
  } catch {
1745
686
  return !1;
1746
687
  }
1747
688
  }
1748
- o(sc, "fileExists");
1749
- async function Tt(e) {
1750
- for (let t of (0, co.walkUp)(e)) {
1751
- let r = nc(t, "package.json");
1752
- if (await sc(r))
689
+ o(So, "fileExists");
690
+ async function Pe(e) {
691
+ for (let t of (0, Dt.walkUp)(e)) {
692
+ let r = bo(t, "package.json");
693
+ if (await So(r))
1753
694
  return r;
1754
695
  }
1755
696
  return null;
1756
697
  }
1757
- o(Tt, "findPackagePath");
1758
- async function uo(e) {
1759
- let t = await Tt(e);
698
+ o(Pe, "findPackagePath");
699
+ async function _t(e) {
700
+ let t = await Pe(e);
1760
701
  if (!t)
1761
702
  return null;
1762
703
  try {
1763
- let r = await ic(t, { encoding: "utf8" });
704
+ let r = await wo(t, { encoding: "utf8" });
1764
705
  return JSON.parse(r);
1765
706
  } catch {
1766
707
  return null;
1767
708
  }
1768
709
  }
1769
- o(uo, "findPackage");
710
+ o(_t, "findPackage");
711
+
712
+ // ../node_modules/package-manager-detector/dist/constants.mjs
713
+ var Mt = [
714
+ "npm",
715
+ "yarn",
716
+ "yarn@berry",
717
+ "pnpm",
718
+ "pnpm@6",
719
+ "bun",
720
+ "deno"
721
+ ], ve = {
722
+ "bun.lock": "bun",
723
+ "bun.lockb": "bun",
724
+ "deno.lock": "deno",
725
+ "pnpm-lock.yaml": "pnpm",
726
+ "yarn.lock": "yarn",
727
+ "package-lock.json": "npm",
728
+ "npm-shrinkwrap.json": "npm"
729
+ }, Te = {
730
+ "node_modules/.deno/": "deno",
731
+ "node_modules/.pnpm/": "pnpm",
732
+ "node_modules/.yarn-state.yml": "yarn",
733
+ // yarn v2+ (node-modules)
734
+ "node_modules/.yarn_integrity": "yarn",
735
+ // yarn v1
736
+ "node_modules/.package-lock.json": "npm",
737
+ ".pnp.cjs": "yarn",
738
+ // yarn v3+ (pnp)
739
+ ".pnp.js": "yarn",
740
+ // yarn v2 (pnp)
741
+ "bun.lock": "bun",
742
+ "bun.lockb": "bun"
743
+ };
744
+
745
+ // ../node_modules/package-manager-detector/dist/detect.mjs
746
+ import Ft from "node:fs/promises";
747
+ import P from "node:path";
748
+ import ko from "node:process";
749
+ async function Ce(e, t) {
750
+ try {
751
+ let r = await Ft.stat(e);
752
+ return t === "file" ? r.isFile() : r.isDirectory();
753
+ } catch {
754
+ return !1;
755
+ }
756
+ }
757
+ o(Ce, "pathExists");
758
+ function* Eo(e = ko.cwd()) {
759
+ let t = P.resolve(e), { root: r } = P.parse(t);
760
+ for (; t && t !== r; )
761
+ yield t, t = P.dirname(t);
762
+ }
763
+ o(Eo, "lookup");
764
+ async function Lt(e, t) {
765
+ return !e || !Ce(e, "file") ? null : await vo(e, t);
766
+ }
767
+ o(Lt, "parsePackageJson");
768
+ async function Ie(e = {}) {
769
+ let { cwd: t, strategies: r = ["lockfile", "packageManager-field", "devEngines-field"], onUnknown: n } = e;
770
+ for (let i of Eo(t))
771
+ for (let s of r)
772
+ switch (s) {
773
+ case "lockfile": {
774
+ for (let a of Object.keys(ve))
775
+ if (await Ce(P.join(i, a), "file")) {
776
+ let c = ve[a], u = await Lt(P.join(i, "package.json"), n);
777
+ return u || { name: c, agent: c };
778
+ }
779
+ break;
780
+ }
781
+ case "packageManager-field":
782
+ case "devEngines-field": {
783
+ let a = await Lt(P.join(i, "package.json"), n);
784
+ if (a)
785
+ return a;
786
+ break;
787
+ }
788
+ case "install-metadata": {
789
+ for (let a of Object.keys(Te)) {
790
+ let c = a.endsWith("/") ? "dir" : "file";
791
+ if (await Ce(P.join(i, a), c)) {
792
+ let u = Te[a], f = u === "yarn" ? To(a) ? "yarn" : "yarn@berry" : u;
793
+ return { name: u, agent: f };
794
+ }
795
+ }
796
+ break;
797
+ }
798
+ }
799
+ return null;
800
+ }
801
+ o(Ie, "detect");
802
+ function Po(e) {
803
+ let t = /* @__PURE__ */ o((r) => r?.match(/\d+(\.\d+){0,2}/)?.[0] ?? r, "handelVer");
804
+ if (typeof e.packageManager == "string") {
805
+ let [r, n] = e.packageManager.replace(/^\^/, "").split("@");
806
+ return { name: r, ver: t(n) };
807
+ }
808
+ if (typeof e.devEngines?.packageManager?.name == "string")
809
+ return {
810
+ name: e.devEngines.packageManager.name,
811
+ ver: t(e.devEngines.packageManager.version)
812
+ };
813
+ }
814
+ o(Po, "getNameAndVer");
815
+ async function vo(e, t) {
816
+ try {
817
+ let r = JSON.parse(await Ft.readFile(e, "utf8")), n, i = Po(r);
818
+ if (i) {
819
+ let s = i.name, a = i.ver, c = a;
820
+ return s === "yarn" && a && Number.parseInt(a) > 1 ? (n = "yarn@berry", c = "berry", { name: s, agent: n, version: c }) : s === "pnpm" &&
821
+ a && Number.parseInt(a) < 7 ? (n = "pnpm@6", { name: s, agent: n, version: c }) : Mt.includes(s) ? (n = s, { name: s, agent: n, version: c }) :
822
+ t?.(r.packageManager) ?? null;
823
+ }
824
+ } catch {
825
+ }
826
+ return null;
827
+ }
828
+ o(vo, "handlePackageManager");
829
+ function To(e) {
830
+ return e.endsWith(".yarn_integrity");
831
+ }
832
+ o(To, "isMetadataYarnClassic");
833
+
834
+ // ../node_modules/package-manager-detector/dist/index.mjs
835
+ import "node:fs/promises";
836
+ import "node:path";
837
+ import "node:process";
1770
838
 
1771
839
  // src/telemetry/get-application-file-count.ts
1772
- import { sep as Ju } from "node:path";
840
+ import { sep as Us } from "node:path";
1773
841
 
1774
842
  // src/telemetry/exec-command-count-lines.ts
1775
- import { createInterface as Tu } from "node:readline";
843
+ import { createInterface as bs } from "node:readline";
1776
844
 
1777
- // node_modules/execa/index.js
1778
- var Ko = R(pt(), 1);
1779
- import { Buffer as xu } from "node:buffer";
1780
- import Su from "node:path";
1781
- import Yt from "node:child_process";
1782
- import $e from "node:process";
845
+ // ../node_modules/execa/index.js
846
+ var dn = A(Tr(), 1);
847
+ import { Buffer as ps } from "node:buffer";
848
+ import ms from "node:path";
849
+ import ct from "node:child_process";
850
+ import le from "node:process";
1783
851
 
1784
852
  // ../node_modules/strip-final-newline/index.js
1785
- function kt(e) {
853
+ function Fe(e) {
1786
854
  let t = typeof e == "string" ? `
1787
855
  ` : 10, r = typeof e == "string" ? "\r" : 13;
1788
856
  return e[e.length - 1] === t && (e = e.slice(0, -1)), e[e.length - 1] === r && (e = e.slice(0, -1)), e;
1789
857
  }
1790
- o(kt, "stripFinalNewline");
858
+ o(Fe, "stripFinalNewline");
1791
859
 
1792
- // node_modules/npm-run-path/index.js
1793
- import Ae from "node:process";
1794
- import Z from "node:path";
1795
- import ac from "node:url";
860
+ // ../node_modules/execa/node_modules/npm-run-path/index.js
861
+ import Z from "node:process";
862
+ import _ from "node:path";
863
+ import Zo from "node:url";
1796
864
 
1797
- // node_modules/path-key/index.js
1798
- function Oe(e = {}) {
865
+ // ../node_modules/execa/node_modules/path-key/index.js
866
+ function Q(e = {}) {
1799
867
  let {
1800
868
  env: t = process.env,
1801
869
  platform: r = process.platform
1802
870
  } = e;
1803
871
  return r !== "win32" ? "PATH" : Object.keys(t).reverse().find((n) => n.toUpperCase() === "PATH") || "Path";
1804
872
  }
1805
- o(Oe, "pathKey");
873
+ o(Q, "pathKey");
1806
874
 
1807
- // node_modules/npm-run-path/index.js
1808
- function cc(e = {}) {
875
+ // ../node_modules/execa/node_modules/npm-run-path/index.js
876
+ function ei(e = {}) {
1809
877
  let {
1810
- cwd: t = Ae.cwd(),
1811
- path: r = Ae.env[Oe()],
1812
- execPath: n = Ae.execPath
1813
- } = e, i, s = t instanceof URL ? ac.fileURLToPath(t) : t, a = Z.resolve(s), c = [];
878
+ cwd: t = Z.cwd(),
879
+ path: r = Z.env[Q()],
880
+ execPath: n = Z.execPath
881
+ } = e, i, s = t instanceof URL ? Zo.fileURLToPath(t) : t, a = _.resolve(s), c = [];
1814
882
  for (; i !== a; )
1815
- c.push(Z.join(a, "node_modules/.bin")), i = a, a = Z.resolve(a, "..");
1816
- return c.push(Z.resolve(s, n, "..")), [...c, r].join(Z.delimiter);
883
+ c.push(_.join(a, "node_modules/.bin")), i = a, a = _.resolve(a, "..");
884
+ return c.push(_.resolve(s, n, "..")), [...c, r].join(_.delimiter);
1817
885
  }
1818
- o(cc, "npmRunPath");
1819
- function lo({ env: e = Ae.env, ...t } = {}) {
886
+ o(ei, "npmRunPath");
887
+ function Cr({ env: e = Z.env, ...t } = {}) {
1820
888
  e = { ...e };
1821
- let r = Oe({ env: e });
1822
- return t.path = e[r], e[r] = cc(t), e;
889
+ let r = Q({ env: e });
890
+ return t.path = e[r], e[r] = ei(t), e;
1823
891
  }
1824
- o(lo, "npmRunPathEnv");
892
+ o(Cr, "npmRunPathEnv");
1825
893
 
1826
- // node_modules/mimic-fn/index.js
1827
- var uc = /* @__PURE__ */ o((e, t, r, n) => {
894
+ // ../node_modules/execa/node_modules/mimic-fn/index.js
895
+ var ti = /* @__PURE__ */ o((e, t, r, n) => {
1828
896
  if (r === "length" || r === "prototype" || r === "arguments" || r === "caller")
1829
897
  return;
1830
898
  let i = Object.getOwnPropertyDescriptor(e, r), s = Object.getOwnPropertyDescriptor(t, r);
1831
- !lc(i, s) && n || Object.defineProperty(e, r, s);
1832
- }, "copyProperty"), lc = /* @__PURE__ */ o(function(e, t) {
899
+ !ri(i, s) && n || Object.defineProperty(e, r, s);
900
+ }, "copyProperty"), ri = /* @__PURE__ */ o(function(e, t) {
1833
901
  return e === void 0 || e.configurable || e.writable === t.writable && e.enumerable === t.enumerable && e.configurable === t.configurable &&
1834
902
  (e.writable || e.value === t.value);
1835
- }, "canCopyProperty"), fc = /* @__PURE__ */ o((e, t) => {
903
+ }, "canCopyProperty"), ni = /* @__PURE__ */ o((e, t) => {
1836
904
  let r = Object.getPrototypeOf(t);
1837
905
  r !== Object.getPrototypeOf(e) && Object.setPrototypeOf(e, r);
1838
- }, "changePrototype"), pc = /* @__PURE__ */ o((e, t) => `/* Wrapped ${e}*/
1839
- ${t}`, "wrappedToString"), dc = Object.getOwnPropertyDescriptor(Function.prototype, "toString"), mc = Object.getOwnPropertyDescriptor(Function.
1840
- prototype.toString, "name"), hc = /* @__PURE__ */ o((e, t, r) => {
1841
- let n = r === "" ? "" : `with ${r.trim()}() `, i = pc.bind(null, n, t.toString());
1842
- Object.defineProperty(i, "name", mc), Object.defineProperty(e, "toString", { ...dc, value: i });
906
+ }, "changePrototype"), oi = /* @__PURE__ */ o((e, t) => `/* Wrapped ${e}*/
907
+ ${t}`, "wrappedToString"), ii = Object.getOwnPropertyDescriptor(Function.prototype, "toString"), si = Object.getOwnPropertyDescriptor(Function.
908
+ prototype.toString, "name"), ai = /* @__PURE__ */ o((e, t, r) => {
909
+ let n = r === "" ? "" : `with ${r.trim()}() `, i = oi.bind(null, n, t.toString());
910
+ Object.defineProperty(i, "name", si), Object.defineProperty(e, "toString", { ...ii, value: i });
1843
911
  }, "changeToString");
1844
- function It(e, t, { ignoreNonConfigurable: r = !1 } = {}) {
912
+ function Be(e, t, { ignoreNonConfigurable: r = !1 } = {}) {
1845
913
  let { name: n } = e;
1846
914
  for (let i of Reflect.ownKeys(t))
1847
- uc(e, t, i, r);
1848
- return fc(e, t), hc(e, t, n), e;
915
+ ti(e, t, i, r);
916
+ return ni(e, t), ai(e, t, n), e;
1849
917
  }
1850
- o(It, "mimicFunction");
918
+ o(Be, "mimicFunction");
1851
919
 
1852
- // node_modules/onetime/index.js
1853
- var Re = /* @__PURE__ */ new WeakMap(), fo = /* @__PURE__ */ o((e, t = {}) => {
920
+ // ../node_modules/execa/node_modules/onetime/index.js
921
+ var ee = /* @__PURE__ */ new WeakMap(), Ir = /* @__PURE__ */ o((e, t = {}) => {
1854
922
  if (typeof e != "function")
1855
923
  throw new TypeError("Expected a function");
1856
924
  let r, n = 0, i = e.displayName || e.name || "<anonymous>", s = /* @__PURE__ */ o(function(...a) {
1857
- if (Re.set(s, ++n), n === 1)
925
+ if (ee.set(s, ++n), n === 1)
1858
926
  r = e.apply(this, a), e = null;
1859
927
  else if (t.throw === !0)
1860
928
  throw new Error(`Function \`${i}\` can only be called once`);
1861
929
  return r;
1862
930
  }, "onetime");
1863
- return It(s, e), Re.set(s, n), s;
931
+ return Be(s, e), ee.set(s, n), s;
1864
932
  }, "onetime");
1865
- fo.callCount = (e) => {
1866
- if (!Re.has(e))
933
+ Ir.callCount = (e) => {
934
+ if (!ee.has(e))
1867
935
  throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);
1868
- return Re.get(e);
936
+ return ee.get(e);
1869
937
  };
1870
- var po = fo;
938
+ var Ar = Ir;
1871
939
 
1872
- // node_modules/execa/lib/error.js
1873
- import Tc from "node:process";
940
+ // ../node_modules/execa/lib/error.js
941
+ import gi from "node:process";
1874
942
 
1875
- // node_modules/human-signals/build/src/main.js
1876
- import { constants as xc } from "node:os";
943
+ // ../node_modules/execa/node_modules/human-signals/build/src/main.js
944
+ import { constants as li } from "node:os";
1877
945
 
1878
- // node_modules/human-signals/build/src/realtime.js
1879
- var mo = /* @__PURE__ */ o(() => {
1880
- let e = Ct - ho + 1;
1881
- return Array.from({ length: e }, yc);
1882
- }, "getRealtimeSignals"), yc = /* @__PURE__ */ o((e, t) => ({
946
+ // ../node_modules/execa/node_modules/human-signals/build/src/realtime.js
947
+ var Or = /* @__PURE__ */ o(() => {
948
+ let e = Ge - jr + 1;
949
+ return Array.from({ length: e }, ci);
950
+ }, "getRealtimeSignals"), ci = /* @__PURE__ */ o((e, t) => ({
1883
951
  name: `SIGRT${t + 1}`,
1884
- number: ho + t,
952
+ number: jr + t,
1885
953
  action: "terminate",
1886
954
  description: "Application-specific signal (realtime)",
1887
955
  standard: "posix"
1888
- }), "getRealtimeSignal"), ho = 34, Ct = 64;
956
+ }), "getRealtimeSignal"), jr = 34, Ge = 64;
1889
957
 
1890
- // node_modules/human-signals/build/src/signals.js
1891
- import { constants as gc } from "node:os";
958
+ // ../node_modules/execa/node_modules/human-signals/build/src/signals.js
959
+ import { constants as ui } from "node:os";
1892
960
 
1893
- // node_modules/human-signals/build/src/core.js
1894
- var yo = [
961
+ // ../node_modules/execa/node_modules/human-signals/build/src/core.js
962
+ var Rr = [
1895
963
  {
1896
964
  name: "SIGHUP",
1897
965
  number: 1,
@@ -2163,11 +1231,11 @@ var yo = [
2163
1231
  }
2164
1232
  ];
2165
1233
 
2166
- // node_modules/human-signals/build/src/signals.js
2167
- var Ot = /* @__PURE__ */ o(() => {
2168
- let e = mo();
2169
- return [...yo, ...e].map(bc);
2170
- }, "getSignals"), bc = /* @__PURE__ */ o(({
1234
+ // ../node_modules/execa/node_modules/human-signals/build/src/signals.js
1235
+ var Ue = /* @__PURE__ */ o(() => {
1236
+ let e = Or();
1237
+ return [...Rr, ...e].map(fi);
1238
+ }, "getSignals"), fi = /* @__PURE__ */ o(({
2171
1239
  name: e,
2172
1240
  number: t,
2173
1241
  description: r,
@@ -2177,15 +1245,15 @@ var Ot = /* @__PURE__ */ o(() => {
2177
1245
  }) => {
2178
1246
  let {
2179
1247
  signals: { [e]: a }
2180
- } = gc, c = a !== void 0;
1248
+ } = ui, c = a !== void 0;
2181
1249
  return { name: e, number: c ? a : t, description: r, supported: c, action: n, forced: i, standard: s };
2182
1250
  }, "normalizeSignal");
2183
1251
 
2184
- // node_modules/human-signals/build/src/main.js
2185
- var Sc = /* @__PURE__ */ o(() => {
2186
- let e = Ot();
2187
- return Object.fromEntries(e.map(wc));
2188
- }, "getSignalsByName"), wc = /* @__PURE__ */ o(({
1252
+ // ../node_modules/execa/node_modules/human-signals/build/src/main.js
1253
+ var pi = /* @__PURE__ */ o(() => {
1254
+ let e = Ue();
1255
+ return Object.fromEntries(e.map(mi));
1256
+ }, "getSignalsByName"), mi = /* @__PURE__ */ o(({
2189
1257
  name: e,
2190
1258
  number: t,
2191
1259
  description: r,
@@ -2193,15 +1261,15 @@ var Sc = /* @__PURE__ */ o(() => {
2193
1261
  action: i,
2194
1262
  forced: s,
2195
1263
  standard: a
2196
- }) => [e, { name: e, number: t, description: r, supported: n, action: i, forced: s, standard: a }], "getSignalByName"), go = Sc(), vc = /* @__PURE__ */ o(
1264
+ }) => [e, { name: e, number: t, description: r, supported: n, action: i, forced: s, standard: a }], "getSignalByName"), Nr = pi(), di = /* @__PURE__ */ o(
2197
1265
  () => {
2198
- let e = Ot(), t = Ct + 1, r = Array.from(
1266
+ let e = Ue(), t = Ge + 1, r = Array.from(
2199
1267
  { length: t },
2200
- (n, i) => Pc(i, e)
1268
+ (n, i) => yi(i, e)
2201
1269
  );
2202
1270
  return Object.assign({}, ...r);
2203
- }, "getSignalsByNumber"), Pc = /* @__PURE__ */ o((e, t) => {
2204
- let r = Ec(e, t);
1271
+ }, "getSignalsByNumber"), yi = /* @__PURE__ */ o((e, t) => {
1272
+ let r = hi(e, t);
2205
1273
  if (r === void 0)
2206
1274
  return {};
2207
1275
  let { name: n, description: i, supported: s, action: a, forced: c, standard: u } = r;
@@ -2216,15 +1284,15 @@ var Sc = /* @__PURE__ */ o(() => {
2216
1284
  standard: u
2217
1285
  }
2218
1286
  };
2219
- }, "getSignalByNumber"), Ec = /* @__PURE__ */ o((e, t) => {
2220
- let r = t.find(({ name: n }) => xc.signals[n] === e);
1287
+ }, "getSignalByNumber"), hi = /* @__PURE__ */ o((e, t) => {
1288
+ let r = t.find(({ name: n }) => li.signals[n] === e);
2221
1289
  return r !== void 0 ? r : t.find((n) => n.number === e);
2222
- }, "findSignalByNumber"), Mp = vc();
1290
+ }, "findSignalByNumber"), ou = di();
2223
1291
 
2224
- // node_modules/execa/lib/error.js
2225
- var kc = /* @__PURE__ */ o(({ timedOut: e, timeout: t, errorCode: r, signal: n, signalDescription: i, exitCode: s, isCanceled: a }) => e ? `\
1292
+ // ../node_modules/execa/lib/error.js
1293
+ var bi = /* @__PURE__ */ o(({ timedOut: e, timeout: t, errorCode: r, signal: n, signalDescription: i, exitCode: s, isCanceled: a }) => e ? `\
2226
1294
  timed out after ${t} milliseconds` : a ? "was canceled" : r !== void 0 ? `failed with ${r}` : n !== void 0 ? `was killed with ${n} (${i})` :
2227
- s !== void 0 ? `failed with exit code ${s}` : "failed", "getErrorPrefix"), ee = /* @__PURE__ */ o(({
1295
+ s !== void 0 ? `failed with exit code ${s}` : "failed", "getErrorPrefix"), M = /* @__PURE__ */ o(({
2228
1296
  stdout: e,
2229
1297
  stderr: t,
2230
1298
  all: r,
@@ -2234,44 +1302,44 @@ s !== void 0 ? `failed with exit code ${s}` : "failed", "getErrorPrefix"), ee =
2234
1302
  command: a,
2235
1303
  escapedCommand: c,
2236
1304
  timedOut: u,
2237
- isCanceled: l,
2238
- killed: f,
2239
- parsed: { options: { timeout: x, cwd: g = Tc.cwd() } }
1305
+ isCanceled: f,
1306
+ killed: l,
1307
+ parsed: { options: { timeout: d, cwd: h = gi.cwd() } }
2240
1308
  }) => {
2241
1309
  s = s === null ? void 0 : s, i = i === null ? void 0 : i;
2242
- let m = i === void 0 ? void 0 : go[i].description, y = n && n.code, S = `Command ${kc({ timedOut: u, timeout: x, errorCode: y, signal: i, signalDescription: m,
2243
- exitCode: s, isCanceled: l })}: ${a}`, T = Object.prototype.toString.call(n) === "[object Error]", E = T ? `${S}
2244
- ${n.message}` : S, I = [E, t, e].filter(Boolean).join(`
1310
+ let y = i === void 0 ? void 0 : Nr[i].description, g = n && n.code, b = `Command ${bi({ timedOut: u, timeout: d, errorCode: g, signal: i, signalDescription: y,
1311
+ exitCode: s, isCanceled: f })}: ${a}`, C = Object.prototype.toString.call(n) === "[object Error]", k = C ? `${b}
1312
+ ${n.message}` : b, I = [k, t, e].filter(Boolean).join(`
2245
1313
  `);
2246
- return T ? (n.originalMessage = n.message, n.message = I) : n = new Error(I), n.shortMessage = E, n.command = a, n.escapedCommand = c, n.exitCode =
2247
- s, n.signal = i, n.signalDescription = m, n.stdout = e, n.stderr = t, n.cwd = g, r !== void 0 && (n.all = r), "bufferedData" in n && delete n.
2248
- bufferedData, n.failed = !0, n.timedOut = !!u, n.isCanceled = l, n.killed = f && !u, n;
1314
+ return C ? (n.originalMessage = n.message, n.message = I) : n = new Error(I), n.shortMessage = k, n.command = a, n.escapedCommand = c, n.exitCode =
1315
+ s, n.signal = i, n.signalDescription = y, n.stdout = e, n.stderr = t, n.cwd = h, r !== void 0 && (n.all = r), "bufferedData" in n && delete n.
1316
+ bufferedData, n.failed = !0, n.timedOut = !!u, n.isCanceled = f, n.killed = l && !u, n;
2249
1317
  }, "makeError");
2250
1318
 
2251
- // node_modules/execa/lib/stdio.js
2252
- var _e = ["stdin", "stdout", "stderr"], Ic = /* @__PURE__ */ o((e) => _e.some((t) => e[t] !== void 0), "hasAlias"), bo = /* @__PURE__ */ o((e) => {
1319
+ // ../node_modules/execa/lib/stdio.js
1320
+ var te = ["stdin", "stdout", "stderr"], xi = /* @__PURE__ */ o((e) => te.some((t) => e[t] !== void 0), "hasAlias"), Dr = /* @__PURE__ */ o((e) => {
2253
1321
  if (!e)
2254
1322
  return;
2255
1323
  let { stdio: t } = e;
2256
1324
  if (t === void 0)
2257
- return _e.map((n) => e[n]);
2258
- if (Ic(e))
2259
- throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${_e.map((n) => `\`${n}\``).join(", ")}`);
1325
+ return te.map((n) => e[n]);
1326
+ if (xi(e))
1327
+ throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${te.map((n) => `\`${n}\``).join(", ")}`);
2260
1328
  if (typeof t == "string")
2261
1329
  return t;
2262
1330
  if (!Array.isArray(t))
2263
1331
  throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);
2264
- let r = Math.max(t.length, _e.length);
1332
+ let r = Math.max(t.length, te.length);
2265
1333
  return Array.from({ length: r }, (n, i) => t[i]);
2266
1334
  }, "normalizeStdio");
2267
1335
 
2268
- // node_modules/execa/lib/kill.js
2269
- import Ac from "node:os";
1336
+ // ../node_modules/execa/lib/kill.js
1337
+ import ki from "node:os";
2270
1338
 
2271
- // node_modules/signal-exit/dist/mjs/signals.js
2272
- var N = [];
2273
- N.push("SIGHUP", "SIGINT", "SIGTERM");
2274
- process.platform !== "win32" && N.push(
1339
+ // ../node_modules/execa/node_modules/signal-exit/dist/mjs/signals.js
1340
+ var v = [];
1341
+ v.push("SIGHUP", "SIGINT", "SIGTERM");
1342
+ process.platform !== "win32" && v.push(
2275
1343
  "SIGALRM",
2276
1344
  "SIGABRT",
2277
1345
  "SIGVTALRM",
@@ -2286,12 +1354,12 @@ process.platform !== "win32" && N.push(
2286
1354
  // see #21
2287
1355
  // 'SIGPROF'
2288
1356
  );
2289
- process.platform === "linux" && N.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
1357
+ process.platform === "linux" && v.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
2290
1358
 
2291
- // node_modules/signal-exit/dist/mjs/index.js
2292
- var Ge = /* @__PURE__ */ o((e) => !!e && typeof e == "object" && typeof e.removeListener == "function" && typeof e.emit == "function" && typeof e.
1359
+ // ../node_modules/execa/node_modules/signal-exit/dist/mjs/index.js
1360
+ var re = /* @__PURE__ */ o((e) => !!e && typeof e == "object" && typeof e.removeListener == "function" && typeof e.emit == "function" && typeof e.
2293
1361
  reallyExit == "function" && typeof e.listeners == "function" && typeof e.kill == "function" && typeof e.pid == "number" && typeof e.on == "f\
2294
- unction", "processOk"), At = Symbol.for("signal-exit emitter"), Rt = globalThis, Cc = Object.defineProperty.bind(Object), _t = class {
1362
+ unction", "processOk"), $e = Symbol.for("signal-exit emitter"), We = globalThis, wi = Object.defineProperty.bind(Object), He = class {
2295
1363
  static {
2296
1364
  o(this, "Emitter");
2297
1365
  }
@@ -2306,9 +1374,9 @@ unction", "processOk"), At = Symbol.for("signal-exit emitter"), Rt = globalThis,
2306
1374
  count = 0;
2307
1375
  id = Math.random();
2308
1376
  constructor() {
2309
- if (Rt[At])
2310
- return Rt[At];
2311
- Cc(Rt, At, {
1377
+ if (We[$e])
1378
+ return We[$e];
1379
+ wi(We, $e, {
2312
1380
  value: this,
2313
1381
  writable: !1,
2314
1382
  enumerable: !1,
@@ -2331,11 +1399,11 @@ unction", "processOk"), At = Symbol.for("signal-exit emitter"), Rt = globalThis,
2331
1399
  i = s(r, n) === !0 || i;
2332
1400
  return t === "exit" && (i = this.emit("afterExit", r, n) || i), i;
2333
1401
  }
2334
- }, je = class {
1402
+ }, ne = class {
2335
1403
  static {
2336
1404
  o(this, "SignalExitBase");
2337
1405
  }
2338
- }, Oc = /* @__PURE__ */ o((e) => ({
1406
+ }, Si = /* @__PURE__ */ o((e) => ({
2339
1407
  onExit(t, r) {
2340
1408
  return e.onExit(t, r);
2341
1409
  },
@@ -2345,7 +1413,7 @@ unction", "processOk"), At = Symbol.for("signal-exit emitter"), Rt = globalThis,
2345
1413
  unload() {
2346
1414
  return e.unload();
2347
1415
  }
2348
- }), "signalExitWrap"), Gt = class extends je {
1416
+ }), "signalExitWrap"), Je = class extends ne {
2349
1417
  static {
2350
1418
  o(this, "SignalExitFallback");
2351
1419
  }
@@ -2357,16 +1425,16 @@ unction", "processOk"), At = Symbol.for("signal-exit emitter"), Rt = globalThis,
2357
1425
  }
2358
1426
  unload() {
2359
1427
  }
2360
- }, jt = class extends je {
1428
+ }, Ve = class extends ne {
2361
1429
  static {
2362
1430
  o(this, "SignalExit");
2363
1431
  }
2364
1432
  // "SIGHUP" throws an `ENOSYS` error on Windows,
2365
1433
  // so use a supported signal instead
2366
1434
  /* c8 ignore start */
2367
- #s = Nt.platform === "win32" ? "SIGINT" : "SIGHUP";
1435
+ #s = qe.platform === "win32" ? "SIGINT" : "SIGHUP";
2368
1436
  /* c8 ignore stop */
2369
- #t = new _t();
1437
+ #t = new He();
2370
1438
  #e;
2371
1439
  #o;
2372
1440
  #i;
@@ -2374,7 +1442,7 @@ unction", "processOk"), At = Symbol.for("signal-exit emitter"), Rt = globalThis,
2374
1442
  #r = !1;
2375
1443
  constructor(t) {
2376
1444
  super(), this.#e = t, this.#n = {};
2377
- for (let r of N)
1445
+ for (let r of v)
2378
1446
  this.#n[r] = () => {
2379
1447
  let n = this.#e.listeners(r), { count: i } = this.#t, s = t;
2380
1448
  if (typeof s.__signal_exit_emitter__ == "object" && typeof s.__signal_exit_emitter__.count == "number" && (i += s.__signal_exit_emitter__.
@@ -2387,7 +1455,7 @@ unction", "processOk"), At = Symbol.for("signal-exit emitter"), Rt = globalThis,
2387
1455
  this.#i = t.reallyExit, this.#o = t.emit;
2388
1456
  }
2389
1457
  onExit(t, r) {
2390
- if (!Ge(this.#e))
1458
+ if (!re(this.#e))
2391
1459
  return () => {
2392
1460
  };
2393
1461
  this.#r === !1 && this.load();
@@ -2399,7 +1467,7 @@ unction", "processOk"), At = Symbol.for("signal-exit emitter"), Rt = globalThis,
2399
1467
  load() {
2400
1468
  if (!this.#r) {
2401
1469
  this.#r = !0, this.#t.count += 1;
2402
- for (let t of N)
1470
+ for (let t of v)
2403
1471
  try {
2404
1472
  let r = this.#n[t];
2405
1473
  r && this.#e.on(t, r);
@@ -2409,7 +1477,7 @@ unction", "processOk"), At = Symbol.for("signal-exit emitter"), Rt = globalThis,
2409
1477
  }
2410
1478
  }
2411
1479
  unload() {
2412
- this.#r && (this.#r = !1, N.forEach((t) => {
1480
+ this.#r && (this.#r = !1, v.forEach((t) => {
2413
1481
  let r = this.#n[t];
2414
1482
  if (!r)
2415
1483
  throw new Error("Listener not defined for signal: " + t);
@@ -2420,19 +1488,19 @@ unction", "processOk"), At = Symbol.for("signal-exit emitter"), Rt = globalThis,
2420
1488
  }), this.#e.emit = this.#o, this.#e.reallyExit = this.#i, this.#t.count -= 1);
2421
1489
  }
2422
1490
  #a(t) {
2423
- return Ge(this.#e) ? (this.#e.exitCode = t || 0, this.#t.emit("exit", this.#e.exitCode, null), this.#i.call(this.#e, this.#e.exitCode)) :
1491
+ return re(this.#e) ? (this.#e.exitCode = t || 0, this.#t.emit("exit", this.#e.exitCode, null), this.#i.call(this.#e, this.#e.exitCode)) :
2424
1492
  0;
2425
1493
  }
2426
1494
  #c(t, ...r) {
2427
1495
  let n = this.#o;
2428
- if (t === "exit" && Ge(this.#e)) {
1496
+ if (t === "exit" && re(this.#e)) {
2429
1497
  typeof r[0] == "number" && (this.#e.exitCode = r[0]);
2430
1498
  let i = n.call(this.#e, t, ...r);
2431
1499
  return this.#t.emit("exit", this.#e.exitCode, null), i;
2432
1500
  } else
2433
1501
  return n.call(this.#e, t, ...r);
2434
1502
  }
2435
- }, Nt = globalThis.process, {
1503
+ }, qe = globalThis.process, {
2436
1504
  /**
2437
1505
  * Called when the process is exiting, whether via signal, explicit
2438
1506
  * exit, or running out of stuff to do.
@@ -2442,7 +1510,7 @@ unction", "processOk"), At = Symbol.for("signal-exit emitter"), Rt = globalThis,
2442
1510
  *
2443
1511
  * Returns a function that may be used to unload signal-exit.
2444
1512
  */
2445
- onExit: xo,
1513
+ onExit: _r,
2446
1514
  /**
2447
1515
  * Load the listeners. Likely you never need to call this, unless
2448
1516
  * doing a rather deep integration with signal-exit functionality.
@@ -2450,7 +1518,7 @@ unction", "processOk"), At = Symbol.for("signal-exit emitter"), Rt = globalThis,
2450
1518
  *
2451
1519
  * @internal
2452
1520
  */
2453
- load: Kp,
1521
+ load: yu,
2454
1522
  /**
2455
1523
  * Unload the listeners. Likely you never need to call this, unless
2456
1524
  * doing a rather deep integration with signal-exit functionality.
@@ -2458,49 +1526,49 @@ unction", "processOk"), At = Symbol.for("signal-exit emitter"), Rt = globalThis,
2458
1526
  *
2459
1527
  * @internal
2460
1528
  */
2461
- unload: Yp
2462
- } = Oc(Ge(Nt) ? new jt(Nt) : new Gt());
1529
+ unload: hu
1530
+ } = Si(re(qe) ? new Ve(qe) : new Je());
2463
1531
 
2464
- // node_modules/execa/lib/kill.js
2465
- var Rc = 1e3 * 5, So = /* @__PURE__ */ o((e, t = "SIGTERM", r = {}) => {
1532
+ // ../node_modules/execa/lib/kill.js
1533
+ var Ei = 1e3 * 5, Mr = /* @__PURE__ */ o((e, t = "SIGTERM", r = {}) => {
2466
1534
  let n = e(t);
2467
- return _c(e, t, r, n), n;
2468
- }, "spawnedKill"), _c = /* @__PURE__ */ o((e, t, r, n) => {
2469
- if (!Gc(t, r, n))
1535
+ return Pi(e, t, r, n), n;
1536
+ }, "spawnedKill"), Pi = /* @__PURE__ */ o((e, t, r, n) => {
1537
+ if (!vi(t, r, n))
2470
1538
  return;
2471
- let i = Nc(r), s = setTimeout(() => {
1539
+ let i = Ci(r), s = setTimeout(() => {
2472
1540
  e("SIGKILL");
2473
1541
  }, i);
2474
1542
  s.unref && s.unref();
2475
- }, "setKillTimeout"), Gc = /* @__PURE__ */ o((e, { forceKillAfterTimeout: t }, r) => jc(e) && t !== !1 && r, "shouldForceKill"), jc = /* @__PURE__ */ o(
2476
- (e) => e === Ac.constants.signals.SIGTERM || typeof e == "string" && e.toUpperCase() === "SIGTERM", "isSigterm"), Nc = /* @__PURE__ */ o(({ forceKillAfterTimeout: e = !0 }) => {
1543
+ }, "setKillTimeout"), vi = /* @__PURE__ */ o((e, { forceKillAfterTimeout: t }, r) => Ti(e) && t !== !1 && r, "shouldForceKill"), Ti = /* @__PURE__ */ o(
1544
+ (e) => e === ki.constants.signals.SIGTERM || typeof e == "string" && e.toUpperCase() === "SIGTERM", "isSigterm"), Ci = /* @__PURE__ */ o(({ forceKillAfterTimeout: e = !0 }) => {
2477
1545
  if (e === !0)
2478
- return Rc;
1546
+ return Ei;
2479
1547
  if (!Number.isFinite(e) || e < 0)
2480
1548
  throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);
2481
1549
  return e;
2482
- }, "getForceKillAfterTimeout"), wo = /* @__PURE__ */ o((e, t) => {
1550
+ }, "getForceKillAfterTimeout"), Lr = /* @__PURE__ */ o((e, t) => {
2483
1551
  e.kill() && (t.isCanceled = !0);
2484
- }, "spawnedCancel"), Bc = /* @__PURE__ */ o((e, t, r) => {
1552
+ }, "spawnedCancel"), Ii = /* @__PURE__ */ o((e, t, r) => {
2485
1553
  e.kill(t), r(Object.assign(new Error("Timed out"), { timedOut: !0, signal: t }));
2486
- }, "timeoutKill"), vo = /* @__PURE__ */ o((e, { timeout: t, killSignal: r = "SIGTERM" }, n) => {
1554
+ }, "timeoutKill"), Fr = /* @__PURE__ */ o((e, { timeout: t, killSignal: r = "SIGTERM" }, n) => {
2487
1555
  if (t === 0 || t === void 0)
2488
1556
  return n;
2489
1557
  let i, s = new Promise((c, u) => {
2490
1558
  i = setTimeout(() => {
2491
- Bc(e, r, u);
1559
+ Ii(e, r, u);
2492
1560
  }, t);
2493
1561
  }), a = n.finally(() => {
2494
1562
  clearTimeout(i);
2495
1563
  });
2496
1564
  return Promise.race([s, a]);
2497
- }, "setupTimeout"), Po = /* @__PURE__ */ o(({ timeout: e }) => {
1565
+ }, "setupTimeout"), Br = /* @__PURE__ */ o(({ timeout: e }) => {
2498
1566
  if (e !== void 0 && (!Number.isFinite(e) || e < 0))
2499
1567
  throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);
2500
- }, "validateTimeout"), Eo = /* @__PURE__ */ o(async (e, { cleanup: t, detached: r }, n) => {
1568
+ }, "validateTimeout"), Gr = /* @__PURE__ */ o(async (e, { cleanup: t, detached: r }, n) => {
2501
1569
  if (!t || r)
2502
1570
  return n;
2503
- let i = xo(() => {
1571
+ let i = _r(() => {
2504
1572
  e.kill();
2505
1573
  });
2506
1574
  return n.finally(() => {
@@ -2508,71 +1576,71 @@ var Rc = 1e3 * 5, So = /* @__PURE__ */ o((e, t = "SIGTERM", r = {}) => {
2508
1576
  });
2509
1577
  }, "setExitHandler");
2510
1578
 
2511
- // node_modules/execa/lib/pipe.js
2512
- import { createWriteStream as Dc } from "node:fs";
2513
- import { ChildProcess as Mc } from "node:child_process";
1579
+ // ../node_modules/execa/lib/pipe.js
1580
+ import { createWriteStream as Ai } from "node:fs";
1581
+ import { ChildProcess as Oi } from "node:child_process";
2514
1582
 
2515
- // node_modules/is-stream/index.js
2516
- function Ne(e) {
1583
+ // ../node_modules/execa/node_modules/is-stream/index.js
1584
+ function oe(e) {
2517
1585
  return e !== null && typeof e == "object" && typeof e.pipe == "function";
2518
1586
  }
2519
- o(Ne, "isStream");
2520
- function Bt(e) {
2521
- return Ne(e) && e.writable !== !1 && typeof e._write == "function" && typeof e._writableState == "object";
1587
+ o(oe, "isStream");
1588
+ function ze(e) {
1589
+ return oe(e) && e.writable !== !1 && typeof e._write == "function" && typeof e._writableState == "object";
2522
1590
  }
2523
- o(Bt, "isWritableStream");
1591
+ o(ze, "isWritableStream");
2524
1592
 
2525
- // node_modules/execa/lib/pipe.js
2526
- var Lc = /* @__PURE__ */ o((e) => e instanceof Mc && typeof e.then == "function", "isExecaChildProcess"), Dt = /* @__PURE__ */ o((e, t, r) => {
1593
+ // ../node_modules/execa/lib/pipe.js
1594
+ var ji = /* @__PURE__ */ o((e) => e instanceof Oi && typeof e.then == "function", "isExecaChildProcess"), Ye = /* @__PURE__ */ o((e, t, r) => {
2527
1595
  if (typeof r == "string")
2528
- return e[t].pipe(Dc(r)), e;
2529
- if (Bt(r))
1596
+ return e[t].pipe(Ai(r)), e;
1597
+ if (ze(r))
2530
1598
  return e[t].pipe(r), e;
2531
- if (!Lc(r))
1599
+ if (!ji(r))
2532
1600
  throw new TypeError("The second argument must be a string, a stream or an Execa child process.");
2533
- if (!Bt(r.stdin))
1601
+ if (!ze(r.stdin))
2534
1602
  throw new TypeError("The target child process's stdin must be available.");
2535
1603
  return e[t].pipe(r.stdin), r;
2536
- }, "pipeToTarget"), To = /* @__PURE__ */ o((e) => {
2537
- e.stdout !== null && (e.pipeStdout = Dt.bind(void 0, e, "stdout")), e.stderr !== null && (e.pipeStderr = Dt.bind(void 0, e, "stderr")), e.
2538
- all !== void 0 && (e.pipeAll = Dt.bind(void 0, e, "all"));
1604
+ }, "pipeToTarget"), Ur = /* @__PURE__ */ o((e) => {
1605
+ e.stdout !== null && (e.pipeStdout = Ye.bind(void 0, e, "stdout")), e.stderr !== null && (e.pipeStderr = Ye.bind(void 0, e, "stderr")), e.
1606
+ all !== void 0 && (e.pipeAll = Ye.bind(void 0, e, "all"));
2539
1607
  }, "addPipeMethods");
2540
1608
 
2541
- // node_modules/execa/lib/stream.js
2542
- import { createReadStream as nu, readFileSync as ou } from "node:fs";
2543
- import { setTimeout as iu } from "node:timers/promises";
1609
+ // ../node_modules/execa/lib/stream.js
1610
+ import { createReadStream as Ki, readFileSync as Xi } from "node:fs";
1611
+ import { setTimeout as Qi } from "node:timers/promises";
2544
1612
 
2545
- // node_modules/get-stream/source/contents.js
2546
- var te = /* @__PURE__ */ o(async (e, { init: t, convertChunk: r, getSize: n, truncateChunk: i, addChunk: s, getFinalChunk: a, finalize: c }, {
1613
+ // ../node_modules/execa/node_modules/get-stream/source/contents.js
1614
+ var L = /* @__PURE__ */ o(async (e, { init: t, convertChunk: r, getSize: n, truncateChunk: i, addChunk: s, getFinalChunk: a, finalize: c }, {
2547
1615
  maxBuffer: u = Number.POSITIVE_INFINITY } = {}) => {
2548
- if (!Uc(e))
1616
+ if (!Ni(e))
2549
1617
  throw new Error("The first argument must be a Readable, a ReadableStream, or an async iterable.");
2550
- let l = t();
2551
- l.length = 0;
1618
+ let f = t();
1619
+ f.length = 0;
2552
1620
  try {
2553
- for await (let f of e) {
2554
- let x = $c(f), g = r[x](f, l);
2555
- Co({ convertedChunk: g, state: l, getSize: n, truncateChunk: i, addChunk: s, maxBuffer: u });
1621
+ for await (let l of e) {
1622
+ let d = Di(l), h = r[d](l, f);
1623
+ Hr({ convertedChunk: h, state: f, getSize: n, truncateChunk: i, addChunk: s, maxBuffer: u });
2556
1624
  }
2557
- return Fc({ state: l, convertChunk: r, getSize: n, truncateChunk: i, addChunk: s, getFinalChunk: a, maxBuffer: u }), c(l);
2558
- } catch (f) {
2559
- throw f.bufferedData = c(l), f;
1625
+ return Ri({ state: f, convertChunk: r, getSize: n, truncateChunk: i, addChunk: s, getFinalChunk: a, maxBuffer: u }), c(f);
1626
+ } catch (l) {
1627
+ throw l.bufferedData = c(f), l;
2560
1628
  }
2561
- }, "getStreamContents"), Fc = /* @__PURE__ */ o(({ state: e, getSize: t, truncateChunk: r, addChunk: n, getFinalChunk: i, maxBuffer: s }) => {
1629
+ }, "getStreamContents"), Ri = /* @__PURE__ */ o(({ state: e, getSize: t, truncateChunk: r, addChunk: n, getFinalChunk: i, maxBuffer: s }) => {
2562
1630
  let a = i(e);
2563
- a !== void 0 && Co({ convertedChunk: a, state: e, getSize: t, truncateChunk: r, addChunk: n, maxBuffer: s });
2564
- }, "appendFinalChunk"), Co = /* @__PURE__ */ o(({ convertedChunk: e, state: t, getSize: r, truncateChunk: n, addChunk: i, maxBuffer: s }) => {
1631
+ a !== void 0 && Hr({ convertedChunk: a, state: e, getSize: t, truncateChunk: r, addChunk: n, maxBuffer: s });
1632
+ }, "appendFinalChunk"), Hr = /* @__PURE__ */ o(({ convertedChunk: e, state: t, getSize: r, truncateChunk: n, addChunk: i, maxBuffer: s }) => {
2565
1633
  let a = r(e), c = t.length + a;
2566
1634
  if (c <= s) {
2567
- ko(e, t, i, c);
1635
+ $r(e, t, i, c);
2568
1636
  return;
2569
1637
  }
2570
1638
  let u = n(e, s - t.length);
2571
- throw u !== void 0 && ko(u, t, i, s), new Be();
2572
- }, "appendChunk"), ko = /* @__PURE__ */ o((e, t, r, n) => {
1639
+ throw u !== void 0 && $r(u, t, i, s), new ie();
1640
+ }, "appendChunk"), $r = /* @__PURE__ */ o((e, t, r, n) => {
2573
1641
  t.contents = r(e, t, n), t.length = n;
2574
- }, "addNewChunk"), Uc = /* @__PURE__ */ o((e) => typeof e == "object" && e !== null && typeof e[Symbol.asyncIterator] == "function", "isAsyn\
2575
- cIterable"), $c = /* @__PURE__ */ o((e) => {
1642
+ }, "addNewChunk"), Ni = /* @__PURE__ */ o((e) => typeof e == "object" && e !== null && typeof e[Symbol.asyncIterator] == "function", "isAsyn\
1643
+ cIterable"), Di = /* @__PURE__ */ o((e) => {
2576
1644
  let t = typeof e;
2577
1645
  if (t === "string")
2578
1646
  return "string";
@@ -2580,10 +1648,10 @@ cIterable"), $c = /* @__PURE__ */ o((e) => {
2580
1648
  return "others";
2581
1649
  if (globalThis.Buffer?.isBuffer(e))
2582
1650
  return "buffer";
2583
- let r = Io.call(e);
1651
+ let r = Wr.call(e);
2584
1652
  return r === "[object ArrayBuffer]" ? "arrayBuffer" : r === "[object DataView]" ? "dataView" : Number.isInteger(e.byteLength) && Number.isInteger(
2585
- e.byteOffset) && Io.call(e.buffer) === "[object ArrayBuffer]" ? "typedArray" : "others";
2586
- }, "getChunkType"), { toString: Io } = Object.prototype, Be = class extends Error {
1653
+ e.byteOffset) && Wr.call(e.buffer) === "[object ArrayBuffer]" ? "typedArray" : "others";
1654
+ }, "getChunkType"), { toString: Wr } = Object.prototype, ie = class extends Error {
2587
1655
  static {
2588
1656
  o(this, "MaxBufferError");
2589
1657
  }
@@ -2593,151 +1661,151 @@ cIterable"), $c = /* @__PURE__ */ o((e) => {
2593
1661
  }
2594
1662
  };
2595
1663
 
2596
- // node_modules/get-stream/source/utils.js
2597
- var Mt = /* @__PURE__ */ o((e) => e, "identity"), Lt = /* @__PURE__ */ o(() => {
2598
- }, "noop"), Ft = /* @__PURE__ */ o(({ contents: e }) => e, "getContentsProp"), De = /* @__PURE__ */ o((e) => {
1664
+ // ../node_modules/execa/node_modules/get-stream/source/utils.js
1665
+ var Ke = /* @__PURE__ */ o((e) => e, "identity"), Xe = /* @__PURE__ */ o(() => {
1666
+ }, "noop"), Qe = /* @__PURE__ */ o(({ contents: e }) => e, "getContentsProp"), se = /* @__PURE__ */ o((e) => {
2599
1667
  throw new Error(`Streams in object mode are not supported: ${String(e)}`);
2600
- }, "throwObjectStream"), Me = /* @__PURE__ */ o((e) => e.length, "getLengthProp");
1668
+ }, "throwObjectStream"), ae = /* @__PURE__ */ o((e) => e.length, "getLengthProp");
2601
1669
 
2602
- // node_modules/get-stream/source/array-buffer.js
2603
- async function Ut(e, t) {
2604
- return te(e, Xc, t);
1670
+ // ../node_modules/execa/node_modules/get-stream/source/array-buffer.js
1671
+ async function Ze(e, t) {
1672
+ return L(e, Wi, t);
2605
1673
  }
2606
- o(Ut, "getStreamAsArrayBuffer");
2607
- var qc = /* @__PURE__ */ o(() => ({ contents: new ArrayBuffer(0) }), "initArrayBuffer"), Wc = /* @__PURE__ */ o((e) => Hc.encode(e), "useTex\
2608
- tEncoder"), Hc = new TextEncoder(), Oo = /* @__PURE__ */ o((e) => new Uint8Array(e), "useUint8Array"), Ao = /* @__PURE__ */ o((e) => new Uint8Array(
2609
- e.buffer, e.byteOffset, e.byteLength), "useUint8ArrayWithOffset"), Vc = /* @__PURE__ */ o((e, t) => e.slice(0, t), "truncateArrayBufferChunk"),
2610
- zc = /* @__PURE__ */ o((e, { contents: t, length: r }, n) => {
2611
- let i = Go() ? Kc(t, n) : Jc(t, n);
1674
+ o(Ze, "getStreamAsArrayBuffer");
1675
+ var _i = /* @__PURE__ */ o(() => ({ contents: new ArrayBuffer(0) }), "initArrayBuffer"), Mi = /* @__PURE__ */ o((e) => Li.encode(e), "useTex\
1676
+ tEncoder"), Li = new TextEncoder(), Jr = /* @__PURE__ */ o((e) => new Uint8Array(e), "useUint8Array"), Vr = /* @__PURE__ */ o((e) => new Uint8Array(
1677
+ e.buffer, e.byteOffset, e.byteLength), "useUint8ArrayWithOffset"), Fi = /* @__PURE__ */ o((e, t) => e.slice(0, t), "truncateArrayBufferChunk"),
1678
+ Bi = /* @__PURE__ */ o((e, { contents: t, length: r }, n) => {
1679
+ let i = Yr() ? Ui(t, n) : Gi(t, n);
2612
1680
  return new Uint8Array(i).set(e, r), i;
2613
- }, "addArrayBufferChunk"), Jc = /* @__PURE__ */ o((e, t) => {
1681
+ }, "addArrayBufferChunk"), Gi = /* @__PURE__ */ o((e, t) => {
2614
1682
  if (t <= e.byteLength)
2615
1683
  return e;
2616
- let r = new ArrayBuffer(_o(t));
1684
+ let r = new ArrayBuffer(zr(t));
2617
1685
  return new Uint8Array(r).set(new Uint8Array(e), 0), r;
2618
- }, "resizeArrayBufferSlow"), Kc = /* @__PURE__ */ o((e, t) => {
1686
+ }, "resizeArrayBufferSlow"), Ui = /* @__PURE__ */ o((e, t) => {
2619
1687
  if (t <= e.maxByteLength)
2620
1688
  return e.resize(t), e;
2621
- let r = new ArrayBuffer(t, { maxByteLength: _o(t) });
1689
+ let r = new ArrayBuffer(t, { maxByteLength: zr(t) });
2622
1690
  return new Uint8Array(r).set(new Uint8Array(e), 0), r;
2623
- }, "resizeArrayBuffer"), _o = /* @__PURE__ */ o((e) => Ro ** Math.ceil(Math.log(e) / Math.log(Ro)), "getNewContentsLength"), Ro = 2, Yc = /* @__PURE__ */ o(
2624
- ({ contents: e, length: t }) => Go() ? e : e.slice(0, t), "finalizeArrayBuffer"), Go = /* @__PURE__ */ o(() => "resize" in ArrayBuffer.prototype,
2625
- "hasArrayBufferResize"), Xc = {
2626
- init: qc,
1691
+ }, "resizeArrayBuffer"), zr = /* @__PURE__ */ o((e) => qr ** Math.ceil(Math.log(e) / Math.log(qr)), "getNewContentsLength"), qr = 2, $i = /* @__PURE__ */ o(
1692
+ ({ contents: e, length: t }) => Yr() ? e : e.slice(0, t), "finalizeArrayBuffer"), Yr = /* @__PURE__ */ o(() => "resize" in ArrayBuffer.prototype,
1693
+ "hasArrayBufferResize"), Wi = {
1694
+ init: _i,
2627
1695
  convertChunk: {
2628
- string: Wc,
2629
- buffer: Oo,
2630
- arrayBuffer: Oo,
2631
- dataView: Ao,
2632
- typedArray: Ao,
2633
- others: De
1696
+ string: Mi,
1697
+ buffer: Jr,
1698
+ arrayBuffer: Jr,
1699
+ dataView: Vr,
1700
+ typedArray: Vr,
1701
+ others: se
2634
1702
  },
2635
- getSize: Me,
2636
- truncateChunk: Vc,
2637
- addChunk: zc,
2638
- getFinalChunk: Lt,
2639
- finalize: Yc
1703
+ getSize: ae,
1704
+ truncateChunk: Fi,
1705
+ addChunk: Bi,
1706
+ getFinalChunk: Xe,
1707
+ finalize: $i
2640
1708
  };
2641
1709
 
2642
- // node_modules/get-stream/source/buffer.js
2643
- async function Le(e, t) {
1710
+ // ../node_modules/execa/node_modules/get-stream/source/buffer.js
1711
+ async function ce(e, t) {
2644
1712
  if (!("Buffer" in globalThis))
2645
1713
  throw new Error("getStreamAsBuffer() is only supported in Node.js");
2646
1714
  try {
2647
- return jo(await Ut(e, t));
1715
+ return Kr(await Ze(e, t));
2648
1716
  } catch (r) {
2649
- throw r.bufferedData !== void 0 && (r.bufferedData = jo(r.bufferedData)), r;
1717
+ throw r.bufferedData !== void 0 && (r.bufferedData = Kr(r.bufferedData)), r;
2650
1718
  }
2651
1719
  }
2652
- o(Le, "getStreamAsBuffer");
2653
- var jo = /* @__PURE__ */ o((e) => globalThis.Buffer.from(e), "arrayBufferToNodeBuffer");
1720
+ o(ce, "getStreamAsBuffer");
1721
+ var Kr = /* @__PURE__ */ o((e) => globalThis.Buffer.from(e), "arrayBufferToNodeBuffer");
2654
1722
 
2655
- // node_modules/get-stream/source/string.js
2656
- async function $t(e, t) {
2657
- return te(e, ru, t);
1723
+ // ../node_modules/execa/node_modules/get-stream/source/string.js
1724
+ async function et(e, t) {
1725
+ return L(e, zi, t);
2658
1726
  }
2659
- o($t, "getStreamAsString");
2660
- var Qc = /* @__PURE__ */ o(() => ({ contents: "", textDecoder: new TextDecoder() }), "initString"), Fe = /* @__PURE__ */ o((e, { textDecoder: t }) => t.
2661
- decode(e, { stream: !0 }), "useTextDecoder"), Zc = /* @__PURE__ */ o((e, { contents: t }) => t + e, "addStringChunk"), eu = /* @__PURE__ */ o(
2662
- (e, t) => e.slice(0, t), "truncateStringChunk"), tu = /* @__PURE__ */ o(({ textDecoder: e }) => {
1727
+ o(et, "getStreamAsString");
1728
+ var Hi = /* @__PURE__ */ o(() => ({ contents: "", textDecoder: new TextDecoder() }), "initString"), ue = /* @__PURE__ */ o((e, { textDecoder: t }) => t.
1729
+ decode(e, { stream: !0 }), "useTextDecoder"), Ji = /* @__PURE__ */ o((e, { contents: t }) => t + e, "addStringChunk"), Vi = /* @__PURE__ */ o(
1730
+ (e, t) => e.slice(0, t), "truncateStringChunk"), qi = /* @__PURE__ */ o(({ textDecoder: e }) => {
2663
1731
  let t = e.decode();
2664
1732
  return t === "" ? void 0 : t;
2665
- }, "getFinalStringChunk"), ru = {
2666
- init: Qc,
1733
+ }, "getFinalStringChunk"), zi = {
1734
+ init: Hi,
2667
1735
  convertChunk: {
2668
- string: Mt,
2669
- buffer: Fe,
2670
- arrayBuffer: Fe,
2671
- dataView: Fe,
2672
- typedArray: Fe,
2673
- others: De
1736
+ string: Ke,
1737
+ buffer: ue,
1738
+ arrayBuffer: ue,
1739
+ dataView: ue,
1740
+ typedArray: ue,
1741
+ others: se
2674
1742
  },
2675
- getSize: Me,
2676
- truncateChunk: eu,
2677
- addChunk: Zc,
2678
- getFinalChunk: tu,
2679
- finalize: Ft
1743
+ getSize: ae,
1744
+ truncateChunk: Vi,
1745
+ addChunk: Ji,
1746
+ getFinalChunk: qi,
1747
+ finalize: Qe
2680
1748
  };
2681
1749
 
2682
- // node_modules/execa/lib/stream.js
2683
- var No = R(xt(), 1);
2684
- var Bo = /* @__PURE__ */ o((e) => {
1750
+ // ../node_modules/execa/lib/stream.js
1751
+ var Zr = A(Qr(), 1);
1752
+ var en = /* @__PURE__ */ o((e) => {
2685
1753
  if (e !== void 0)
2686
1754
  throw new TypeError("The `input` and `inputFile` options cannot be both set.");
2687
- }, "validateInputOptions"), su = /* @__PURE__ */ o(({ input: e, inputFile: t }) => typeof t != "string" ? e : (Bo(e), ou(t)), "getInputSync"),
2688
- Do = /* @__PURE__ */ o((e) => {
2689
- let t = su(e);
2690
- if (Ne(t))
1755
+ }, "validateInputOptions"), Zi = /* @__PURE__ */ o(({ input: e, inputFile: t }) => typeof t != "string" ? e : (en(e), Xi(t)), "getInputSync"),
1756
+ tn = /* @__PURE__ */ o((e) => {
1757
+ let t = Zi(e);
1758
+ if (oe(t))
2691
1759
  throw new TypeError("The `input` option cannot be a stream in sync mode");
2692
1760
  return t;
2693
- }, "handleInputSync"), au = /* @__PURE__ */ o(({ input: e, inputFile: t }) => typeof t != "string" ? e : (Bo(e), nu(t)), "getInput"), Mo = /* @__PURE__ */ o(
1761
+ }, "handleInputSync"), es = /* @__PURE__ */ o(({ input: e, inputFile: t }) => typeof t != "string" ? e : (en(e), Ki(t)), "getInput"), rn = /* @__PURE__ */ o(
2694
1762
  (e, t) => {
2695
- let r = au(t);
2696
- r !== void 0 && (Ne(r) ? r.pipe(e.stdin) : e.stdin.end(r));
2697
- }, "handleInput"), Lo = /* @__PURE__ */ o((e, { all: t }) => {
1763
+ let r = es(t);
1764
+ r !== void 0 && (oe(r) ? r.pipe(e.stdin) : e.stdin.end(r));
1765
+ }, "handleInput"), nn = /* @__PURE__ */ o((e, { all: t }) => {
2698
1766
  if (!t || !e.stdout && !e.stderr)
2699
1767
  return;
2700
- let r = (0, No.default)();
1768
+ let r = (0, Zr.default)();
2701
1769
  return e.stdout && r.add(e.stdout), e.stderr && r.add(e.stderr), r;
2702
- }, "makeAllStream"), qt = /* @__PURE__ */ o(async (e, t) => {
1770
+ }, "makeAllStream"), tt = /* @__PURE__ */ o(async (e, t) => {
2703
1771
  if (!(!e || t === void 0)) {
2704
- await iu(0), e.destroy();
1772
+ await Qi(0), e.destroy();
2705
1773
  try {
2706
1774
  return await t;
2707
1775
  } catch (r) {
2708
1776
  return r.bufferedData;
2709
1777
  }
2710
1778
  }
2711
- }, "getBufferedData"), Wt = /* @__PURE__ */ o((e, { encoding: t, buffer: r, maxBuffer: n }) => {
1779
+ }, "getBufferedData"), rt = /* @__PURE__ */ o((e, { encoding: t, buffer: r, maxBuffer: n }) => {
2712
1780
  if (!(!e || !r))
2713
- return t === "utf8" || t === "utf-8" ? $t(e, { maxBuffer: n }) : t === null || t === "buffer" ? Le(e, { maxBuffer: n }) : cu(e, n, t);
2714
- }, "getStreamPromise"), cu = /* @__PURE__ */ o(async (e, t, r) => (await Le(e, { maxBuffer: t })).toString(r), "applyEncoding"), Fo = /* @__PURE__ */ o(
1781
+ return t === "utf8" || t === "utf-8" ? et(e, { maxBuffer: n }) : t === null || t === "buffer" ? ce(e, { maxBuffer: n }) : ts(e, n, t);
1782
+ }, "getStreamPromise"), ts = /* @__PURE__ */ o(async (e, t, r) => (await ce(e, { maxBuffer: t })).toString(r), "applyEncoding"), on = /* @__PURE__ */ o(
2715
1783
  async ({ stdout: e, stderr: t, all: r }, { encoding: n, buffer: i, maxBuffer: s }, a) => {
2716
- let c = Wt(e, { encoding: n, buffer: i, maxBuffer: s }), u = Wt(t, { encoding: n, buffer: i, maxBuffer: s }), l = Wt(r, { encoding: n, buffer: i,
1784
+ let c = rt(e, { encoding: n, buffer: i, maxBuffer: s }), u = rt(t, { encoding: n, buffer: i, maxBuffer: s }), f = rt(r, { encoding: n, buffer: i,
2717
1785
  maxBuffer: s * 2 });
2718
1786
  try {
2719
- return await Promise.all([a, c, u, l]);
2720
- } catch (f) {
1787
+ return await Promise.all([a, c, u, f]);
1788
+ } catch (l) {
2721
1789
  return Promise.all([
2722
- { error: f, signal: f.signal, timedOut: f.timedOut },
2723
- qt(e, c),
2724
- qt(t, u),
2725
- qt(r, l)
1790
+ { error: l, signal: l.signal, timedOut: l.timedOut },
1791
+ tt(e, c),
1792
+ tt(t, u),
1793
+ tt(r, f)
2726
1794
  ]);
2727
1795
  }
2728
1796
  }, "getSpawnedResult");
2729
1797
 
2730
- // node_modules/execa/lib/promise.js
2731
- var uu = (async () => {
2732
- })().constructor.prototype, lu = ["then", "catch", "finally"].map((e) => [
1798
+ // ../node_modules/execa/lib/promise.js
1799
+ var rs = (async () => {
1800
+ })().constructor.prototype, ns = ["then", "catch", "finally"].map((e) => [
2733
1801
  e,
2734
- Reflect.getOwnPropertyDescriptor(uu, e)
2735
- ]), Ht = /* @__PURE__ */ o((e, t) => {
2736
- for (let [r, n] of lu) {
1802
+ Reflect.getOwnPropertyDescriptor(rs, e)
1803
+ ]), nt = /* @__PURE__ */ o((e, t) => {
1804
+ for (let [r, n] of ns) {
2737
1805
  let i = typeof t == "function" ? (...s) => Reflect.apply(n.value, t(), s) : n.value.bind(t);
2738
1806
  Reflect.defineProperty(e, r, { ...n, value: i });
2739
1807
  }
2740
- }, "mergePromise"), Uo = /* @__PURE__ */ o((e) => new Promise((t, r) => {
1808
+ }, "mergePromise"), sn = /* @__PURE__ */ o((e) => new Promise((t, r) => {
2741
1809
  e.on("exit", (n, i) => {
2742
1810
  t({ exitCode: n, signal: i });
2743
1811
  }), e.on("error", (n) => {
@@ -2747,103 +1815,103 @@ var uu = (async () => {
2747
1815
  });
2748
1816
  }), "getSpawnedPromise");
2749
1817
 
2750
- // node_modules/execa/lib/command.js
2751
- import { Buffer as fu } from "node:buffer";
2752
- import { ChildProcess as pu } from "node:child_process";
2753
- var Wo = /* @__PURE__ */ o((e, t = []) => Array.isArray(t) ? [e, ...t] : [e], "normalizeArgs"), du = /^[\w.-]+$/, mu = /* @__PURE__ */ o((e) => typeof e !=
2754
- "string" || du.test(e) ? e : `"${e.replaceAll('"', '\\"')}"`, "escapeArg"), Vt = /* @__PURE__ */ o((e, t) => Wo(e, t).join(" "), "joinComman\
2755
- d"), zt = /* @__PURE__ */ o((e, t) => Wo(e, t).map((r) => mu(r)).join(" "), "getEscapedCommand"), Ho = / +/g, Vo = /* @__PURE__ */ o((e) => {
1818
+ // ../node_modules/execa/lib/command.js
1819
+ import { Buffer as os } from "node:buffer";
1820
+ import { ChildProcess as is } from "node:child_process";
1821
+ var un = /* @__PURE__ */ o((e, t = []) => Array.isArray(t) ? [e, ...t] : [e], "normalizeArgs"), ss = /^[\w.-]+$/, as = /* @__PURE__ */ o((e) => typeof e !=
1822
+ "string" || ss.test(e) ? e : `"${e.replaceAll('"', '\\"')}"`, "escapeArg"), ot = /* @__PURE__ */ o((e, t) => un(e, t).join(" "), "joinComman\
1823
+ d"), it = /* @__PURE__ */ o((e, t) => un(e, t).map((r) => as(r)).join(" "), "getEscapedCommand"), fn = / +/g, ln = /* @__PURE__ */ o((e) => {
2756
1824
  let t = [];
2757
- for (let r of e.trim().split(Ho)) {
1825
+ for (let r of e.trim().split(fn)) {
2758
1826
  let n = t.at(-1);
2759
1827
  n && n.endsWith("\\") ? t[t.length - 1] = `${n.slice(0, -1)} ${r}` : t.push(r);
2760
1828
  }
2761
1829
  return t;
2762
- }, "parseCommand"), $o = /* @__PURE__ */ o((e) => {
1830
+ }, "parseCommand"), an = /* @__PURE__ */ o((e) => {
2763
1831
  let t = typeof e;
2764
1832
  if (t === "string")
2765
1833
  return e;
2766
1834
  if (t === "number")
2767
1835
  return String(e);
2768
- if (t === "object" && e !== null && !(e instanceof pu) && "stdout" in e) {
1836
+ if (t === "object" && e !== null && !(e instanceof is) && "stdout" in e) {
2769
1837
  let r = typeof e.stdout;
2770
1838
  if (r === "string")
2771
1839
  return e.stdout;
2772
- if (fu.isBuffer(e.stdout))
1840
+ if (os.isBuffer(e.stdout))
2773
1841
  return e.stdout.toString();
2774
1842
  throw new TypeError(`Unexpected "${r}" stdout in template expression`);
2775
1843
  }
2776
1844
  throw new TypeError(`Unexpected "${t}" in template expression`);
2777
- }, "parseExpression"), qo = /* @__PURE__ */ o((e, t, r) => r || e.length === 0 || t.length === 0 ? [...e, ...t] : [
1845
+ }, "parseExpression"), cn = /* @__PURE__ */ o((e, t, r) => r || e.length === 0 || t.length === 0 ? [...e, ...t] : [
2778
1846
  ...e.slice(0, -1),
2779
1847
  `${e.at(-1)}${t[0]}`,
2780
1848
  ...t.slice(1)
2781
- ], "concatTokens"), hu = /* @__PURE__ */ o(({ templates: e, expressions: t, tokens: r, index: n, template: i }) => {
2782
- let s = i ?? e.raw[n], a = s.split(Ho).filter(Boolean), c = qo(
1849
+ ], "concatTokens"), cs = /* @__PURE__ */ o(({ templates: e, expressions: t, tokens: r, index: n, template: i }) => {
1850
+ let s = i ?? e.raw[n], a = s.split(fn).filter(Boolean), c = cn(
2783
1851
  r,
2784
1852
  a,
2785
1853
  s.startsWith(" ")
2786
1854
  );
2787
1855
  if (n === t.length)
2788
1856
  return c;
2789
- let u = t[n], l = Array.isArray(u) ? u.map((f) => $o(f)) : [$o(u)];
2790
- return qo(
1857
+ let u = t[n], f = Array.isArray(u) ? u.map((l) => an(l)) : [an(u)];
1858
+ return cn(
2791
1859
  c,
2792
- l,
1860
+ f,
2793
1861
  s.endsWith(" ")
2794
1862
  );
2795
- }, "parseTemplate"), Jt = /* @__PURE__ */ o((e, t) => {
1863
+ }, "parseTemplate"), st = /* @__PURE__ */ o((e, t) => {
2796
1864
  let r = [];
2797
1865
  for (let [n, i] of e.entries())
2798
- r = hu({ templates: e, expressions: t, tokens: r, index: n, template: i });
1866
+ r = cs({ templates: e, expressions: t, tokens: r, index: n, template: i });
2799
1867
  return r;
2800
1868
  }, "parseTemplates");
2801
1869
 
2802
- // node_modules/execa/lib/verbose.js
2803
- import { debuglog as yu } from "node:util";
2804
- import gu from "node:process";
2805
- var zo = yu("execa").enabled, Ue = /* @__PURE__ */ o((e, t) => String(e).padStart(t, "0"), "padField"), bu = /* @__PURE__ */ o(() => {
1870
+ // ../node_modules/execa/lib/verbose.js
1871
+ import { debuglog as us } from "node:util";
1872
+ import fs from "node:process";
1873
+ var pn = us("execa").enabled, fe = /* @__PURE__ */ o((e, t) => String(e).padStart(t, "0"), "padField"), ls = /* @__PURE__ */ o(() => {
2806
1874
  let e = /* @__PURE__ */ new Date();
2807
- return `${Ue(e.getHours(), 2)}:${Ue(e.getMinutes(), 2)}:${Ue(e.getSeconds(), 2)}.${Ue(e.getMilliseconds(), 3)}`;
2808
- }, "getTimestamp"), Kt = /* @__PURE__ */ o((e, { verbose: t }) => {
2809
- t && gu.stderr.write(`[${bu()}] ${e}
1875
+ return `${fe(e.getHours(), 2)}:${fe(e.getMinutes(), 2)}:${fe(e.getSeconds(), 2)}.${fe(e.getMilliseconds(), 3)}`;
1876
+ }, "getTimestamp"), at = /* @__PURE__ */ o((e, { verbose: t }) => {
1877
+ t && fs.stderr.write(`[${ls()}] ${e}
2810
1878
  `);
2811
1879
  }, "logCommand");
2812
1880
 
2813
- // node_modules/execa/index.js
2814
- var wu = 1e3 * 1e3 * 100, vu = /* @__PURE__ */ o(({ env: e, extendEnv: t, preferLocal: r, localDir: n, execPath: i }) => {
2815
- let s = t ? { ...$e.env, ...e } : e;
2816
- return r ? lo({ env: s, cwd: n, execPath: i }) : s;
2817
- }, "getEnv"), Yo = /* @__PURE__ */ o((e, t, r = {}) => {
2818
- let n = Ko.default._parse(e, t, r);
1881
+ // ../node_modules/execa/index.js
1882
+ var ds = 1e3 * 1e3 * 100, ys = /* @__PURE__ */ o(({ env: e, extendEnv: t, preferLocal: r, localDir: n, execPath: i }) => {
1883
+ let s = t ? { ...le.env, ...e } : e;
1884
+ return r ? Cr({ env: s, cwd: n, execPath: i }) : s;
1885
+ }, "getEnv"), yn = /* @__PURE__ */ o((e, t, r = {}) => {
1886
+ let n = dn.default._parse(e, t, r);
2819
1887
  return e = n.command, t = n.args, r = n.options, r = {
2820
- maxBuffer: wu,
1888
+ maxBuffer: ds,
2821
1889
  buffer: !0,
2822
1890
  stripFinalNewline: !0,
2823
1891
  extendEnv: !0,
2824
1892
  preferLocal: !1,
2825
- localDir: r.cwd || $e.cwd(),
2826
- execPath: $e.execPath,
1893
+ localDir: r.cwd || le.cwd(),
1894
+ execPath: le.execPath,
2827
1895
  encoding: "utf8",
2828
1896
  reject: !0,
2829
1897
  cleanup: !0,
2830
1898
  all: !1,
2831
1899
  windowsHide: !0,
2832
- verbose: zo,
1900
+ verbose: pn,
2833
1901
  ...r
2834
- }, r.env = vu(r), r.stdio = bo(r), $e.platform === "win32" && Su.basename(e, ".exe") === "cmd" && t.unshift("/q"), { file: e, args: t, options: r,
1902
+ }, r.env = ys(r), r.stdio = Dr(r), le.platform === "win32" && ms.basename(e, ".exe") === "cmd" && t.unshift("/q"), { file: e, args: t, options: r,
2835
1903
  parsed: n };
2836
- }, "handleArguments"), re = /* @__PURE__ */ o((e, t, r) => typeof t != "string" && !xu.isBuffer(t) ? r === void 0 ? void 0 : "" : e.stripFinalNewline ?
2837
- kt(t) : t, "handleOutput");
2838
- function Xo(e, t, r) {
2839
- let n = Yo(e, t, r), i = Vt(e, t), s = zt(e, t);
2840
- Kt(s, n.options), Po(n.options);
1904
+ }, "handleArguments"), F = /* @__PURE__ */ o((e, t, r) => typeof t != "string" && !ps.isBuffer(t) ? r === void 0 ? void 0 : "" : e.stripFinalNewline ?
1905
+ Fe(t) : t, "handleOutput");
1906
+ function hn(e, t, r) {
1907
+ let n = yn(e, t, r), i = ot(e, t), s = it(e, t);
1908
+ at(s, n.options), Br(n.options);
2841
1909
  let a;
2842
1910
  try {
2843
- a = Yt.spawn(n.file, n.args, n.options);
2844
- } catch (m) {
2845
- let y = new Yt.ChildProcess(), h = Promise.reject(ee({
2846
- error: m,
1911
+ a = ct.spawn(n.file, n.args, n.options);
1912
+ } catch (y) {
1913
+ let g = new ct.ChildProcess(), m = Promise.reject(M({
1914
+ error: y,
2847
1915
  stdout: "",
2848
1916
  stderr: "",
2849
1917
  all: "",
@@ -2854,57 +1922,57 @@ function Xo(e, t, r) {
2854
1922
  isCanceled: !1,
2855
1923
  killed: !1
2856
1924
  }));
2857
- return Ht(y, h), y;
2858
- }
2859
- let c = Uo(a), u = vo(a, n.options, c), l = Eo(a, n.options, u), f = { isCanceled: !1 };
2860
- a.kill = So.bind(null, a.kill.bind(a)), a.cancel = wo.bind(null, a, f);
2861
- let g = po(/* @__PURE__ */ o(async () => {
2862
- let [{ error: m, exitCode: y, signal: h, timedOut: S }, T, E, I] = await Fo(a, n.options, l), O = re(n.options, T), A = re(n.options, E),
2863
- d = re(n.options, I);
2864
- if (m || y !== 0 || h !== null) {
2865
- let v = ee({
2866
- error: m,
2867
- exitCode: y,
2868
- signal: h,
2869
- stdout: O,
2870
- stderr: A,
2871
- all: d,
1925
+ return nt(g, m), g;
1926
+ }
1927
+ let c = sn(a), u = Fr(a, n.options, c), f = Gr(a, n.options, u), l = { isCanceled: !1 };
1928
+ a.kill = Mr.bind(null, a.kill.bind(a)), a.cancel = Lr.bind(null, a, l);
1929
+ let h = Ar(/* @__PURE__ */ o(async () => {
1930
+ let [{ error: y, exitCode: g, signal: m, timedOut: b }, C, k, I] = await on(a, n.options, f), W = F(n.options, C), H = F(n.options, k), p = F(
1931
+ n.options, I);
1932
+ if (y || g !== 0 || m !== null) {
1933
+ let w = M({
1934
+ error: y,
1935
+ exitCode: g,
1936
+ signal: m,
1937
+ stdout: W,
1938
+ stderr: H,
1939
+ all: p,
2872
1940
  command: i,
2873
1941
  escapedCommand: s,
2874
1942
  parsed: n,
2875
- timedOut: S,
2876
- isCanceled: f.isCanceled || (n.options.signal ? n.options.signal.aborted : !1),
1943
+ timedOut: b,
1944
+ isCanceled: l.isCanceled || (n.options.signal ? n.options.signal.aborted : !1),
2877
1945
  killed: a.killed
2878
1946
  });
2879
1947
  if (!n.options.reject)
2880
- return v;
2881
- throw v;
1948
+ return w;
1949
+ throw w;
2882
1950
  }
2883
1951
  return {
2884
1952
  command: i,
2885
1953
  escapedCommand: s,
2886
1954
  exitCode: 0,
2887
- stdout: O,
2888
- stderr: A,
2889
- all: d,
1955
+ stdout: W,
1956
+ stderr: H,
1957
+ all: p,
2890
1958
  failed: !1,
2891
1959
  timedOut: !1,
2892
1960
  isCanceled: !1,
2893
1961
  killed: !1
2894
1962
  };
2895
1963
  }, "handlePromise"));
2896
- return Mo(a, n.options), a.all = Lo(a, n.options), To(a), Ht(a, g), a;
1964
+ return rn(a, n.options), a.all = nn(a, n.options), Ur(a), nt(a, h), a;
2897
1965
  }
2898
- o(Xo, "execa");
2899
- function Pu(e, t, r) {
2900
- let n = Yo(e, t, r), i = Vt(e, t), s = zt(e, t);
2901
- Kt(s, n.options);
2902
- let a = Do(n.options), c;
1966
+ o(hn, "execa");
1967
+ function hs(e, t, r) {
1968
+ let n = yn(e, t, r), i = ot(e, t), s = it(e, t);
1969
+ at(s, n.options);
1970
+ let a = tn(n.options), c;
2903
1971
  try {
2904
- c = Yt.spawnSync(n.file, n.args, { ...n.options, input: a });
2905
- } catch (f) {
2906
- throw ee({
2907
- error: f,
1972
+ c = ct.spawnSync(n.file, n.args, { ...n.options, input: a });
1973
+ } catch (l) {
1974
+ throw M({
1975
+ error: l,
2908
1976
  stdout: "",
2909
1977
  stderr: "",
2910
1978
  all: "",
@@ -2916,11 +1984,11 @@ function Pu(e, t, r) {
2916
1984
  killed: !1
2917
1985
  });
2918
1986
  }
2919
- let u = re(n.options, c.stdout, c.error), l = re(n.options, c.stderr, c.error);
1987
+ let u = F(n.options, c.stdout, c.error), f = F(n.options, c.stderr, c.error);
2920
1988
  if (c.error || c.status !== 0 || c.signal !== null) {
2921
- let f = ee({
1989
+ let l = M({
2922
1990
  stdout: u,
2923
- stderr: l,
1991
+ stderr: f,
2924
1992
  error: c.error,
2925
1993
  signal: c.signal,
2926
1994
  exitCode: c.status,
@@ -2932,84 +2000,84 @@ function Pu(e, t, r) {
2932
2000
  killed: c.signal !== null
2933
2001
  });
2934
2002
  if (!n.options.reject)
2935
- return f;
2936
- throw f;
2003
+ return l;
2004
+ throw l;
2937
2005
  }
2938
2006
  return {
2939
2007
  command: i,
2940
2008
  escapedCommand: s,
2941
2009
  exitCode: 0,
2942
2010
  stdout: u,
2943
- stderr: l,
2011
+ stderr: f,
2944
2012
  failed: !1,
2945
2013
  timedOut: !1,
2946
2014
  isCanceled: !1,
2947
2015
  killed: !1
2948
2016
  };
2949
2017
  }
2950
- o(Pu, "execaSync");
2951
- var Eu = /* @__PURE__ */ o(({ input: e, inputFile: t, stdio: r }) => e === void 0 && t === void 0 && r === void 0 ? { stdin: "inherit" } : {},
2952
- "normalizeScriptStdin"), Jo = /* @__PURE__ */ o((e = {}) => ({
2018
+ o(hs, "execaSync");
2019
+ var gs = /* @__PURE__ */ o(({ input: e, inputFile: t, stdio: r }) => e === void 0 && t === void 0 && r === void 0 ? { stdin: "inherit" } : {},
2020
+ "normalizeScriptStdin"), mn = /* @__PURE__ */ o((e = {}) => ({
2953
2021
  preferLocal: !0,
2954
- ...Eu(e),
2022
+ ...gs(e),
2955
2023
  ...e
2956
2024
  }), "normalizeScriptOptions");
2957
- function Qo(e) {
2025
+ function gn(e) {
2958
2026
  function t(r, ...n) {
2959
2027
  if (!Array.isArray(r))
2960
- return Qo({ ...e, ...r });
2961
- let [i, ...s] = Jt(r, n);
2962
- return Xo(i, s, Jo(e));
2028
+ return gn({ ...e, ...r });
2029
+ let [i, ...s] = st(r, n);
2030
+ return hn(i, s, mn(e));
2963
2031
  }
2964
2032
  return o(t, "$"), t.sync = (r, ...n) => {
2965
2033
  if (!Array.isArray(r))
2966
2034
  throw new TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.");
2967
- let [i, ...s] = Jt(r, n);
2968
- return Pu(i, s, Jo(e));
2035
+ let [i, ...s] = st(r, n);
2036
+ return hs(i, s, mn(e));
2969
2037
  }, t;
2970
2038
  }
2971
- o(Qo, "create$");
2972
- var mm = Qo();
2973
- function Zo(e, t) {
2974
- let [r, ...n] = Vo(e);
2975
- return Xo(r, n, t);
2039
+ o(gn, "create$");
2040
+ var Lf = gn();
2041
+ function bn(e, t) {
2042
+ let [r, ...n] = ln(e);
2043
+ return hn(r, n, t);
2976
2044
  }
2977
- o(Zo, "execaCommand");
2045
+ o(bn, "execaCommand");
2978
2046
 
2979
2047
  // src/telemetry/exec-command-count-lines.ts
2980
- async function qe(e, t) {
2981
- let r = Zo(e, { shell: !0, buffer: !1, ...t });
2048
+ async function pe(e, t) {
2049
+ let r = bn(e, { shell: !0, buffer: !1, ...t });
2982
2050
  if (!r.stdout)
2983
2051
  throw new Error("Unexpected missing stdout");
2984
- let n = 0, i = Tu(r.stdout);
2052
+ let n = 0, i = bs(r.stdout);
2985
2053
  return i.on("line", () => {
2986
2054
  n += 1;
2987
2055
  }), await r, i.close(), n;
2988
2056
  }
2989
- o(qe, "execCommandCountLines");
2057
+ o(pe, "execCommandCountLines");
2990
2058
 
2991
2059
  // ../node_modules/slash/index.js
2992
- function Xt(e) {
2060
+ function ut(e) {
2993
2061
  return e.startsWith("\\\\?\\") ? e : e.replace(/\\/g, "/");
2994
2062
  }
2995
- o(Xt, "slash");
2063
+ o(ut, "slash");
2996
2064
 
2997
2065
  // src/common/utils/file-cache.ts
2998
- import { createHash as ei, randomBytes as ku } from "node:crypto";
2999
- import { mkdirSync as Qt, readFileSync as Iu, readdirSync as Cu, rmSync as ti, writeFileSync as Ou } from "node:fs";
3000
- import { readFile as ri, readdir as ni, rm as oi, writeFile as Au } from "node:fs/promises";
3001
- import { tmpdir as Ru } from "node:os";
3002
- import { join as ne } from "node:path";
3003
- var We = class {
2066
+ import { createHash as xn, randomBytes as xs } from "node:crypto";
2067
+ import { mkdirSync as ft, readFileSync as ws, readdirSync as Ss, rmSync as wn, writeFileSync as ks } from "node:fs";
2068
+ import { readFile as Sn, readdir as kn, rm as En, writeFile as Es } from "node:fs/promises";
2069
+ import { tmpdir as Ps } from "node:os";
2070
+ import { join as B } from "node:path";
2071
+ var me = class {
3004
2072
  static {
3005
2073
  o(this, "FileSystemCache");
3006
2074
  }
3007
2075
  constructor(t = {}) {
3008
- this.prefix = (t.ns || t.prefix || "") + "-", this.hash_alg = t.hash_alg || "md5", this.cache_dir = t.basePath || ne(Ru(), ku(15).toString(
3009
- "base64").replace(/\//g, "-")), this.ttl = t.ttl || 0, ei(this.hash_alg), Qt(this.cache_dir, { recursive: !0 });
2076
+ this.prefix = (t.ns || t.prefix || "") + "-", this.hash_alg = t.hash_alg || "md5", this.cache_dir = t.basePath || B(Ps(), xs(15).toString(
2077
+ "base64").replace(/\//g, "-")), this.ttl = t.ttl || 0, xn(this.hash_alg), ft(this.cache_dir, { recursive: !0 });
3010
2078
  }
3011
2079
  generateHash(t) {
3012
- return ne(this.cache_dir, this.prefix + ei(this.hash_alg).update(t).digest("hex"));
2080
+ return B(this.cache_dir, this.prefix + xn(this.hash_alg).update(t).digest("hex"));
3013
2081
  }
3014
2082
  isExpired(t, r) {
3015
2083
  return t.ttl != null && r > t.ttl;
@@ -3024,7 +2092,7 @@ var We = class {
3024
2092
  }
3025
2093
  async get(t, r) {
3026
2094
  try {
3027
- let n = await ri(this.generateHash(t), "utf8");
2095
+ let n = await Sn(this.generateHash(t), "utf8");
3028
2096
  return this.parseCacheData(n, r);
3029
2097
  } catch {
3030
2098
  return r;
@@ -3032,7 +2100,7 @@ var We = class {
3032
2100
  }
3033
2101
  getSync(t, r) {
3034
2102
  try {
3035
- let n = Iu(this.generateHash(t), "utf8");
2103
+ let n = ws(this.generateHash(t), "utf8");
3036
2104
  return this.parseCacheData(n, r);
3037
2105
  } catch {
3038
2106
  return r;
@@ -3040,13 +2108,13 @@ var We = class {
3040
2108
  }
3041
2109
  async set(t, r, n = {}) {
3042
2110
  let i = typeof n == "number" ? { ttl: n } : n;
3043
- Qt(this.cache_dir, { recursive: !0 }), await Au(this.generateHash(t), this.parseSetData(t, r, i), {
2111
+ ft(this.cache_dir, { recursive: !0 }), await Es(this.generateHash(t), this.parseSetData(t, r, i), {
3044
2112
  encoding: i.encoding || "utf8"
3045
2113
  });
3046
2114
  }
3047
2115
  setSync(t, r, n = {}) {
3048
2116
  let i = typeof n == "number" ? { ttl: n } : n;
3049
- Qt(this.cache_dir, { recursive: !0 }), Ou(this.generateHash(t), this.parseSetData(t, r, i), {
2117
+ ft(this.cache_dir, { recursive: !0 }), ks(this.generateHash(t), this.parseSetData(t, r, i), {
3050
2118
  encoding: i.encoding || "utf8"
3051
2119
  });
3052
2120
  }
@@ -3057,24 +2125,24 @@ var We = class {
3057
2125
  t.forEach((n) => this.setSync(n.key, n.content ?? n.value, r));
3058
2126
  }
3059
2127
  async remove(t) {
3060
- await oi(this.generateHash(t), { force: !0 });
2128
+ await En(this.generateHash(t), { force: !0 });
3061
2129
  }
3062
2130
  removeSync(t) {
3063
- ti(this.generateHash(t), { force: !0 });
2131
+ wn(this.generateHash(t), { force: !0 });
3064
2132
  }
3065
2133
  async clear() {
3066
- let t = await ni(this.cache_dir);
2134
+ let t = await kn(this.cache_dir);
3067
2135
  await Promise.all(
3068
- t.filter((r) => r.startsWith(this.prefix)).map((r) => oi(ne(this.cache_dir, r), { force: !0 }))
2136
+ t.filter((r) => r.startsWith(this.prefix)).map((r) => En(B(this.cache_dir, r), { force: !0 }))
3069
2137
  );
3070
2138
  }
3071
2139
  clearSync() {
3072
- Cu(this.cache_dir).filter((t) => t.startsWith(this.prefix)).forEach((t) => ti(ne(this.cache_dir, t), { force: !0 }));
2140
+ Ss(this.cache_dir).filter((t) => t.startsWith(this.prefix)).forEach((t) => wn(B(this.cache_dir, t), { force: !0 }));
3073
2141
  }
3074
2142
  async getAll() {
3075
- let t = Date.now(), r = await ni(this.cache_dir);
2143
+ let t = Date.now(), r = await kn(this.cache_dir);
3076
2144
  return (await Promise.all(
3077
- r.filter((i) => i.startsWith(this.prefix)).map((i) => ri(ne(this.cache_dir, i), "utf8"))
2145
+ r.filter((i) => i.startsWith(this.prefix)).map((i) => Sn(B(this.cache_dir, i), "utf8"))
3078
2146
  )).map((i) => JSON.parse(i)).filter((i) => i.content && !this.isExpired(i, t));
3079
2147
  }
3080
2148
  async load() {
@@ -3087,186 +2155,186 @@ var We = class {
3087
2155
  };
3088
2156
  }
3089
2157
  };
3090
- function Zt(e) {
3091
- return new We(e);
2158
+ function lt(e) {
2159
+ return new me(e);
3092
2160
  }
3093
- o(Zt, "createFileSystemCache");
2161
+ o(lt, "createFileSystemCache");
3094
2162
 
3095
2163
  // src/common/utils/resolve-path-in-sb-cache.ts
3096
- import { join as mi } from "node:path";
2164
+ import { join as Nn } from "node:path";
3097
2165
 
3098
2166
  // ../node_modules/find-cache-dir/index.js
3099
- var di = R(si(), 1);
3100
- import Hu from "node:process";
3101
- import oe from "node:path";
3102
- import Ve from "node:fs";
2167
+ var Rn = A(vn(), 1);
2168
+ import Fs from "node:process";
2169
+ import G from "node:path";
2170
+ import ye from "node:fs";
3103
2171
 
3104
2172
  // ../node_modules/pkg-dir/index.js
3105
- import Wu from "node:path";
2173
+ import Ls from "node:path";
3106
2174
 
3107
2175
  // ../node_modules/pkg-dir/node_modules/find-up/index.js
3108
- import He from "node:path";
3109
- import { fileURLToPath as Fu } from "node:url";
2176
+ import de from "node:path";
2177
+ import { fileURLToPath as Ns } from "node:url";
3110
2178
 
3111
2179
  // ../node_modules/locate-path/index.js
3112
- import ju from "node:process";
3113
- import Nu from "node:path";
3114
- import ai, { promises as $m } from "node:fs";
3115
- import { fileURLToPath as Bu } from "node:url";
3116
- var ci = {
2180
+ import Cs from "node:process";
2181
+ import Is from "node:path";
2182
+ import Tn, { promises as ll } from "node:fs";
2183
+ import { fileURLToPath as As } from "node:url";
2184
+ var Cn = {
3117
2185
  directory: "isDirectory",
3118
2186
  file: "isFile"
3119
2187
  };
3120
- function Du(e) {
3121
- if (!Object.hasOwnProperty.call(ci, e))
2188
+ function Os(e) {
2189
+ if (!Object.hasOwnProperty.call(Cn, e))
3122
2190
  throw new Error(`Invalid type specified: ${e}`);
3123
2191
  }
3124
- o(Du, "checkType");
3125
- var Mu = /* @__PURE__ */ o((e, t) => t[ci[e]](), "matchType"), Lu = /* @__PURE__ */ o((e) => e instanceof URL ? Bu(e) : e, "toPath");
3126
- function er(e, {
3127
- cwd: t = ju.cwd(),
2192
+ o(Os, "checkType");
2193
+ var js = /* @__PURE__ */ o((e, t) => t[Cn[e]](), "matchType"), Rs = /* @__PURE__ */ o((e) => e instanceof URL ? As(e) : e, "toPath");
2194
+ function pt(e, {
2195
+ cwd: t = Cs.cwd(),
3128
2196
  type: r = "file",
3129
2197
  allowSymlinks: n = !0
3130
2198
  } = {}) {
3131
- Du(r), t = Lu(t);
3132
- let i = n ? ai.statSync : ai.lstatSync;
2199
+ Os(r), t = Rs(t);
2200
+ let i = n ? Tn.statSync : Tn.lstatSync;
3133
2201
  for (let s of e)
3134
2202
  try {
3135
- let a = i(Nu.resolve(t, s), {
2203
+ let a = i(Is.resolve(t, s), {
3136
2204
  throwIfNoEntry: !1
3137
2205
  });
3138
2206
  if (!a)
3139
2207
  continue;
3140
- if (Mu(r, a))
2208
+ if (js(r, a))
3141
2209
  return s;
3142
2210
  } catch {
3143
2211
  }
3144
2212
  }
3145
- o(er, "locatePathSync");
2213
+ o(pt, "locatePathSync");
3146
2214
 
3147
2215
  // ../node_modules/pkg-dir/node_modules/path-exists/index.js
3148
- import Jm, { promises as Km } from "node:fs";
2216
+ import gl, { promises as bl } from "node:fs";
3149
2217
 
3150
2218
  // ../node_modules/pkg-dir/node_modules/find-up/index.js
3151
- var Uu = /* @__PURE__ */ o((e) => e instanceof URL ? Fu(e) : e, "toPath"), $u = Symbol("findUpStop");
3152
- function qu(e, t = {}) {
3153
- let r = He.resolve(Uu(t.cwd) || ""), { root: n } = He.parse(r), i = t.stopAt || n, s = t.limit || Number.POSITIVE_INFINITY, a = [e].flat(),
3154
- c = /* @__PURE__ */ o((l) => {
2219
+ var Ds = /* @__PURE__ */ o((e) => e instanceof URL ? Ns(e) : e, "toPath"), _s = Symbol("findUpStop");
2220
+ function Ms(e, t = {}) {
2221
+ let r = de.resolve(Ds(t.cwd) || ""), { root: n } = de.parse(r), i = t.stopAt || n, s = t.limit || Number.POSITIVE_INFINITY, a = [e].flat(),
2222
+ c = /* @__PURE__ */ o((f) => {
3155
2223
  if (typeof e != "function")
3156
- return er(a, l);
3157
- let f = e(l.cwd);
3158
- return typeof f == "string" ? er([f], l) : f;
2224
+ return pt(a, f);
2225
+ let l = e(f.cwd);
2226
+ return typeof l == "string" ? pt([l], f) : l;
3159
2227
  }, "runMatcher"), u = [];
3160
2228
  for (; ; ) {
3161
- let l = c({ ...t, cwd: r });
3162
- if (l === $u || (l && u.push(He.resolve(r, l)), r === i || u.length >= s))
2229
+ let f = c({ ...t, cwd: r });
2230
+ if (f === _s || (f && u.push(de.resolve(r, f)), r === i || u.length >= s))
3163
2231
  break;
3164
- r = He.dirname(r);
2232
+ r = de.dirname(r);
3165
2233
  }
3166
2234
  return u;
3167
2235
  }
3168
- o(qu, "findUpMultipleSync");
3169
- function ui(e, t = {}) {
3170
- return qu(e, { ...t, limit: 1 })[0];
2236
+ o(Ms, "findUpMultipleSync");
2237
+ function In(e, t = {}) {
2238
+ return Ms(e, { ...t, limit: 1 })[0];
3171
2239
  }
3172
- o(ui, "findUpSync");
2240
+ o(In, "findUpSync");
3173
2241
 
3174
2242
  // ../node_modules/pkg-dir/index.js
3175
- function li({ cwd: e } = {}) {
3176
- let t = ui("package.json", { cwd: e });
3177
- return t && Wu.dirname(t);
2243
+ function An({ cwd: e } = {}) {
2244
+ let t = In("package.json", { cwd: e });
2245
+ return t && Ls.dirname(t);
3178
2246
  }
3179
- o(li, "packageDirectorySync");
2247
+ o(An, "packageDirectorySync");
3180
2248
 
3181
2249
  // ../node_modules/find-cache-dir/index.js
3182
- var { env: tr, cwd: Vu } = Hu, fi = /* @__PURE__ */ o((e) => {
2250
+ var { env: mt, cwd: Bs } = Fs, On = /* @__PURE__ */ o((e) => {
3183
2251
  try {
3184
- return Ve.accessSync(e, Ve.constants.W_OK), !0;
2252
+ return ye.accessSync(e, ye.constants.W_OK), !0;
3185
2253
  } catch {
3186
2254
  return !1;
3187
2255
  }
3188
2256
  }, "isWritable");
3189
- function pi(e, t) {
3190
- return t.create && Ve.mkdirSync(e, { recursive: !0 }), e;
2257
+ function jn(e, t) {
2258
+ return t.create && ye.mkdirSync(e, { recursive: !0 }), e;
3191
2259
  }
3192
- o(pi, "useDirectory");
3193
- function zu(e) {
3194
- let t = oe.join(e, "node_modules");
3195
- if (!(!fi(t) && (Ve.existsSync(t) || !fi(oe.join(e)))))
2260
+ o(jn, "useDirectory");
2261
+ function Gs(e) {
2262
+ let t = G.join(e, "node_modules");
2263
+ if (!(!On(t) && (ye.existsSync(t) || !On(G.join(e)))))
3196
2264
  return t;
3197
2265
  }
3198
- o(zu, "getNodeModuleDirectory");
3199
- function rr(e = {}) {
3200
- if (tr.CACHE_DIR && !["true", "false", "1", "0"].includes(tr.CACHE_DIR))
3201
- return pi(oe.join(tr.CACHE_DIR, e.name), e);
3202
- let { cwd: t = Vu(), files: r } = e;
2266
+ o(Gs, "getNodeModuleDirectory");
2267
+ function dt(e = {}) {
2268
+ if (mt.CACHE_DIR && !["true", "false", "1", "0"].includes(mt.CACHE_DIR))
2269
+ return jn(G.join(mt.CACHE_DIR, e.name), e);
2270
+ let { cwd: t = Bs(), files: r } = e;
3203
2271
  if (r) {
3204
2272
  if (!Array.isArray(r))
3205
2273
  throw new TypeError(`Expected \`files\` option to be an array, got \`${typeof r}\`.`);
3206
- t = (0, di.default)(r.map((i) => oe.resolve(t, i)));
2274
+ t = (0, Rn.default)(r.map((i) => G.resolve(t, i)));
3207
2275
  }
3208
- if (t = li({ cwd: t }), !(!t || !zu(t)))
3209
- return pi(oe.join(t, "node_modules", ".cache", e.name), e);
2276
+ if (t = An({ cwd: t }), !(!t || !Gs(t)))
2277
+ return jn(G.join(t, "node_modules", ".cache", e.name), e);
3210
2278
  }
3211
- o(rr, "findCacheDirectory");
2279
+ o(dt, "findCacheDirectory");
3212
2280
 
3213
2281
  // src/common/utils/resolve-path-in-sb-cache.ts
3214
- function hi(e, t = "default") {
3215
- let r = rr({ name: "storybook" });
3216
- return r ||= mi(process.cwd(), "node_modules", ".cache", "storybook"), mi(r, t, e);
2282
+ function Dn(e, t = "default") {
2283
+ let r = dt({ name: "storybook" });
2284
+ return r ||= Nn(process.cwd(), "node_modules", ".cache", "storybook"), Nn(r, t, e);
3217
2285
  }
3218
- o(hi, "resolvePathInStorybookCache");
2286
+ o(Dn, "resolvePathInStorybookCache");
3219
2287
 
3220
2288
  // src/telemetry/run-telemetry-operation.ts
3221
- var yi = Zt({
3222
- basePath: hi("telemetry"),
2289
+ var _n = lt({
2290
+ basePath: Dn("telemetry"),
3223
2291
  ns: "storybook",
3224
2292
  ttl: 24 * 60 * 60 * 1e3
3225
2293
  // 24h
3226
- }), ze = /* @__PURE__ */ o(async (e, t) => {
3227
- let r = await yi.get(e);
3228
- return r === void 0 && (r = await t(), r !== void 0 && await yi.set(e, r)), r;
2294
+ }), he = /* @__PURE__ */ o(async (e, t) => {
2295
+ let r = await _n.get(e);
2296
+ return r === void 0 && (r = await t(), r !== void 0 && await _n.set(e, r)), r;
3229
2297
  }, "runTelemetryOperation");
3230
2298
 
3231
2299
  // src/telemetry/get-application-file-count.ts
3232
- var Ku = ["page", "screen"], Yu = ["js", "jsx", "ts", "tsx"], Xu = /* @__PURE__ */ o(async (e) => {
3233
- let r = Ku.flatMap((n) => [
2300
+ var $s = ["page", "screen"], Ws = ["js", "jsx", "ts", "tsx"], Hs = /* @__PURE__ */ o(async (e) => {
2301
+ let r = $s.flatMap((n) => [
3234
2302
  n,
3235
2303
  [n[0].toUpperCase(), ...n.slice(1)].join("")
3236
2304
  ]).flatMap(
3237
- (n) => Yu.map((i) => `"${e}${Ju}*${n}*.${i}"`)
2305
+ (n) => Ws.map((i) => `"${e}${Us}*${n}*.${i}"`)
3238
2306
  );
3239
2307
  try {
3240
2308
  let n = `git ls-files -- ${r.join(" ")}`;
3241
- return await qe(n);
2309
+ return await pe(n);
3242
2310
  } catch {
3243
2311
  return;
3244
2312
  }
3245
- }, "getApplicationFilesCountUncached"), gi = /* @__PURE__ */ o(async (e) => ze(
2313
+ }, "getApplicationFilesCountUncached"), Mn = /* @__PURE__ */ o(async (e) => he(
3246
2314
  "applicationFiles",
3247
- async () => Xu(e)
2315
+ async () => Hs(e)
3248
2316
  ), "getApplicationFileCount");
3249
2317
 
3250
2318
  // src/telemetry/get-chromatic-version.ts
3251
- function bi(e) {
2319
+ function Ln(e) {
3252
2320
  let t = e.dependencies?.chromatic || e.devDependencies?.chromatic || e.peerDependencies?.chromatic;
3253
2321
  return t || (e.scripts && Object.values(e.scripts).find((r) => r?.match(/chromatic/)) ? "latest" : void 0);
3254
2322
  }
3255
- o(bi, "getChromaticVersionSpecifier");
2323
+ o(Ln, "getChromaticVersionSpecifier");
3256
2324
 
3257
2325
  // src/telemetry/get-framework-info.ts
3258
- import { normalize as el } from "node:path";
3259
- import { frameworkPackages as tl } from "storybook/internal/common";
2326
+ import { normalize as qs } from "node:path";
2327
+ import { frameworkPackages as zs } from "storybook/internal/common";
3260
2328
 
3261
2329
  // src/telemetry/package-json.ts
3262
- import { readFile as Qu } from "node:fs/promises";
3263
- import { join as Zu } from "node:path";
3264
- var nr = /* @__PURE__ */ o(async (e) => {
2330
+ import { readFile as Js } from "node:fs/promises";
2331
+ import { join as Vs } from "node:path";
2332
+ var yt = /* @__PURE__ */ o(async (e) => {
3265
2333
  let t = Object.keys(e);
3266
- return Promise.all(t.map(Je));
3267
- }, "getActualPackageVersions"), Je = /* @__PURE__ */ o(async (e) => {
2334
+ return Promise.all(t.map(ge));
2335
+ }, "getActualPackageVersions"), ge = /* @__PURE__ */ o(async (e) => {
3268
2336
  try {
3269
- let t = await or(e);
2337
+ let t = await ht(e);
3270
2338
  return {
3271
2339
  name: e,
3272
2340
  version: t.version
@@ -3274,15 +2342,15 @@ var nr = /* @__PURE__ */ o(async (e) => {
3274
2342
  } catch {
3275
2343
  return { name: e, version: null };
3276
2344
  }
3277
- }, "getActualPackageVersion"), or = /* @__PURE__ */ o(async (e) => {
3278
- let t = b.resolve(Zu(e, "package.json"), {
2345
+ }, "getActualPackageVersion"), ht = /* @__PURE__ */ o(async (e) => {
2346
+ let t = S.resolve(Vs(e, "package.json"), {
3279
2347
  paths: [process.cwd()]
3280
2348
  });
3281
- return JSON.parse(await Qu(t, { encoding: "utf8" }));
2349
+ return JSON.parse(await Js(t, { encoding: "utf8" }));
3282
2350
  }, "getActualPackageJson");
3283
2351
 
3284
2352
  // src/telemetry/get-framework-info.ts
3285
- var rl = [
2353
+ var Ys = [
3286
2354
  "html",
3287
2355
  "react",
3288
2356
  "svelte",
@@ -3293,8 +2361,8 @@ var rl = [
3293
2361
  "web-components",
3294
2362
  "angular",
3295
2363
  "ember"
3296
- ], nl = ["builder-webpack5", "builder-vite"];
3297
- function xi(e, t) {
2364
+ ], Ks = ["builder-webpack5", "builder-vite"];
2365
+ function Fn(e, t) {
3298
2366
  let { name: r = "", version: n, dependencies: i, devDependencies: s, peerDependencies: a } = e, c = {
3299
2367
  // We include the framework itself because it may be a renderer too (e.g. angular)
3300
2368
  [r]: n,
@@ -3304,21 +2372,21 @@ function xi(e, t) {
3304
2372
  };
3305
2373
  return t.map((u) => `@storybook/${u}`).find((u) => c[u]);
3306
2374
  }
3307
- o(xi, "findMatchingPackage");
3308
- var ol = /* @__PURE__ */ o((e) => {
3309
- let t = el(e).replace(new RegExp(/\\/, "g"), "/");
3310
- return Object.keys(tl).find((n) => t.endsWith(n)) || z(e).replace(/.*node_modules[\\/]/, "");
2375
+ o(Fn, "findMatchingPackage");
2376
+ var Xs = /* @__PURE__ */ o((e) => {
2377
+ let t = qs(e).replace(new RegExp(/\\/, "g"), "/");
2378
+ return Object.keys(zs).find((n) => t.endsWith(n)) || D(e).replace(/.*node_modules[\\/]/, "");
3311
2379
  }, "getFrameworkPackageName");
3312
- async function Si(e) {
2380
+ async function Bn(e) {
3313
2381
  if (!e?.framework)
3314
2382
  return {};
3315
2383
  let t = typeof e.framework == "string" ? e.framework : e.framework?.name;
3316
2384
  if (!t)
3317
2385
  return {};
3318
- let r = await or(t);
2386
+ let r = await ht(t);
3319
2387
  if (!r)
3320
2388
  return {};
3321
- let n = xi(r, nl), i = xi(r, rl), s = ol(t), a = typeof e.framework == "object" ? e.framework.options : {};
2389
+ let n = Fn(r, Ks), i = Fn(r, Ys), s = Xs(t), a = typeof e.framework == "object" ? e.framework.options : {};
3322
2390
  return {
3323
2391
  framework: {
3324
2392
  name: s,
@@ -3328,10 +2396,10 @@ async function Si(e) {
3328
2396
  renderer: i
3329
2397
  };
3330
2398
  }
3331
- o(Si, "getFrameworkInfo");
2399
+ o(Bn, "getFrameworkInfo");
3332
2400
 
3333
2401
  // src/telemetry/get-has-router-package.ts
3334
- var il = /* @__PURE__ */ new Set([
2402
+ var Qs = /* @__PURE__ */ new Set([
3335
2403
  "react-router",
3336
2404
  "react-router-dom",
3337
2405
  "remix",
@@ -3354,56 +2422,56 @@ var il = /* @__PURE__ */ new Set([
3354
2422
  "nuxt",
3355
2423
  "@sveltejs/kit"
3356
2424
  ]);
3357
- function wi(e) {
2425
+ function Gn(e) {
3358
2426
  return Object.keys(e?.dependencies ?? {}).some(
3359
- (t) => il.has(t)
2427
+ (t) => Qs.has(t)
3360
2428
  );
3361
2429
  }
3362
- o(wi, "getHasRouterPackage");
2430
+ o(Gn, "getHasRouterPackage");
3363
2431
 
3364
2432
  // src/telemetry/get-monorepo-type.ts
3365
- import { existsSync as vi, readFileSync as sl } from "node:fs";
3366
- import { join as ir } from "node:path";
3367
- import { getProjectRoot as al } from "storybook/internal/common";
3368
- var Pi = {
2433
+ import { existsSync as Un, readFileSync as Zs } from "node:fs";
2434
+ import { join as gt } from "node:path";
2435
+ import { getProjectRoot as ea } from "storybook/internal/common";
2436
+ var $n = {
3369
2437
  Nx: "nx.json",
3370
2438
  Turborepo: "turbo.json",
3371
2439
  Lerna: "lerna.json",
3372
2440
  Rush: "rush.json",
3373
2441
  Lage: "lage.config.json"
3374
- }, Ei = /* @__PURE__ */ o(() => {
3375
- let e = al();
2442
+ }, Wn = /* @__PURE__ */ o(() => {
2443
+ let e = ea();
3376
2444
  if (!e)
3377
2445
  return;
3378
- let r = Object.keys(Pi).find((i) => {
3379
- let s = ir(e, Pi[i]);
3380
- return vi(s);
2446
+ let r = Object.keys($n).find((i) => {
2447
+ let s = gt(e, $n[i]);
2448
+ return Un(s);
3381
2449
  });
3382
2450
  if (r)
3383
2451
  return r;
3384
- if (!vi(ir(e, "package.json")))
2452
+ if (!Un(gt(e, "package.json")))
3385
2453
  return;
3386
2454
  if (JSON.parse(
3387
- sl(ir(e, "package.json"), { encoding: "utf8" })
2455
+ Zs(gt(e, "package.json"), { encoding: "utf8" })
3388
2456
  )?.workspaces)
3389
2457
  return "Workspaces";
3390
2458
  }, "getMonorepoType");
3391
2459
 
3392
2460
  // src/telemetry/get-portable-stories-usage.ts
3393
- var cl = /* @__PURE__ */ o(async (e) => {
2461
+ var ta = /* @__PURE__ */ o(async (e) => {
3394
2462
  try {
3395
2463
  let t = "git grep -l composeStor" + (e ? ` -- ${e}` : "");
3396
- return await qe(t);
2464
+ return await pe(t);
3397
2465
  } catch (t) {
3398
2466
  return t.exitCode === 1 ? 0 : void 0;
3399
2467
  }
3400
- }, "getPortableStoriesFileCountUncached"), Ti = /* @__PURE__ */ o(async (e) => ze(
2468
+ }, "getPortableStoriesFileCountUncached"), Hn = /* @__PURE__ */ o(async (e) => he(
3401
2469
  "portableStories",
3402
- async () => cl(e)
2470
+ async () => ta(e)
3403
2471
  ), "getPortableStoriesFileCount");
3404
2472
 
3405
2473
  // src/telemetry/storybook-metadata.ts
3406
- var ki = {
2474
+ var Jn = {
3407
2475
  next: "Next",
3408
2476
  "react-scripts": "CRA",
3409
2477
  gatsby: "Gatsby",
@@ -3411,8 +2479,8 @@ var ki = {
3411
2479
  "@nrwl/storybook": "nx",
3412
2480
  "@vue/cli-service": "vue-cli",
3413
2481
  "@sveltejs/kit": "sveltekit"
3414
- }, Ii = /* @__PURE__ */ o((e) => z(e).replace(/\/dist\/.*/, "").replace(/\.[mc]?[tj]?s[x]?$/, "").replace(/\/register$/, "").replace(/\/manager$/,
3415
- "").replace(/\/preset$/, ""), "sanitizeAddonName"), hl = /* @__PURE__ */ o(async ({
2482
+ }, Vn = /* @__PURE__ */ o((e) => D(e).replace(/\/dist\/.*/, "").replace(/\.[mc]?[tj]?s[x]?$/, "").replace(/\/register$/, "").replace(/\/manager$/,
2483
+ "").replace(/\/preset$/, ""), "sanitizeAddonName"), ua = /* @__PURE__ */ o(async ({
3416
2484
  packageJsonPath: e,
3417
2485
  packageJson: t,
3418
2486
  mainConfig: r
@@ -3428,13 +2496,13 @@ var ki = {
3428
2496
  ...t?.dependencies,
3429
2497
  ...t?.devDependencies,
3430
2498
  ...t?.peerDependencies
3431
- }, s = Object.keys(i).find((d) => !!ki[d]);
2499
+ }, s = Object.keys(i).find((p) => !!Jn[p]);
3432
2500
  if (s) {
3433
- let { version: d } = await Je(s);
2501
+ let { version: p } = await ge(s);
3434
2502
  n.metaFramework = {
3435
- name: ki[s],
2503
+ name: Jn[s],
3436
2504
  packageName: s,
3437
- version: d
2505
+ version: p
3438
2506
  };
3439
2507
  }
3440
2508
  let a = [
@@ -3456,160 +2524,169 @@ var ki = {
3456
2524
  "miragejs",
3457
2525
  "sinon"
3458
2526
  ], c = Object.keys(i).filter(
3459
- (d) => a.find((v) => d.includes(v))
2527
+ (p) => a.find((w) => p.includes(w))
3460
2528
  );
3461
2529
  n.testPackages = Object.fromEntries(
3462
2530
  await Promise.all(
3463
- c.map(async (d) => [d, (await Je(d))?.version])
2531
+ c.map(async (p) => [p, (await ge(p))?.version])
3464
2532
  )
3465
- ), n.hasRouterPackage = wi(t);
3466
- let u = Ei();
2533
+ ), n.hasRouterPackage = Gn(t);
2534
+ let u = Wn();
3467
2535
  u && (n.monorepo = u);
3468
2536
  try {
3469
- let d = await (0, Ye.detect)({ cwd: ll() }), v = await (0, Ye.getNpmVersion)(d);
3470
- n.packageManager = {
3471
- type: d,
3472
- version: v
3473
- };
2537
+ let p = await Ie({ cwd: na() });
2538
+ p && (n.packageManager = {
2539
+ type: p.name,
2540
+ version: p.version,
2541
+ agent: p.agent
2542
+ });
3474
2543
  } catch {
3475
2544
  }
2545
+ let f = i.typescript ? "typescript" : "javascript";
2546
+ if (!r)
2547
+ return {
2548
+ ...n,
2549
+ storybookVersionSpecifier: aa.storybook,
2550
+ language: f
2551
+ };
3476
2552
  n.hasCustomBabel = !!r.babel, n.hasCustomWebpack = !!r.webpackFinal, n.hasStaticDirs = !!r.staticDirs, typeof r.typescript == "object" && (n.
3477
2553
  typescriptOptions = r.typescript);
3478
- let l = await Si(r);
2554
+ let l = await Bn(r);
3479
2555
  typeof r.refs == "object" && (n.refCount = Object.keys(r.refs).length), typeof r.features == "object" && (n.features = r.features);
3480
- let f = {};
3481
- r.addons && r.addons.forEach((d) => {
3482
- let v, ae;
3483
- typeof d == "string" ? v = Ii(d) : (d.name.includes("addon-essentials") && (ae = d.options), v = Ii(d.name)), f[v] = {
3484
- options: ae,
2556
+ let d = {};
2557
+ r.addons && r.addons.forEach((p) => {
2558
+ let w, J;
2559
+ typeof p == "string" ? w = Vn(p) : (p.name.includes("addon-essentials") && (J = p.options), w = Vn(p.name)), d[w] = {
2560
+ options: J,
3485
2561
  version: void 0
3486
2562
  };
3487
2563
  });
3488
- let x = bi(t);
3489
- x && (f.chromatic = {
2564
+ let h = Ln(t);
2565
+ h && (d.chromatic = {
3490
2566
  version: void 0,
3491
- versionSpecifier: x,
2567
+ versionSpecifier: h,
3492
2568
  options: void 0
3493
- }), (await nr(f)).forEach(({ name: d, version: v }) => {
3494
- f[d].version = v;
2569
+ }), (await yt(d)).forEach(({ name: p, version: w }) => {
2570
+ d[p].version = w;
3495
2571
  });
3496
- let m = Object.keys(f), y = Object.keys(i).filter((d) => d.includes("storybook") && !m.includes(d)).reduce((d, v) => ({
3497
- ...d,
3498
- [v]: { version: void 0 }
2572
+ let g = Object.keys(d), m = Object.keys(i).filter((p) => p.includes("storybook") && !g.includes(p)).reduce((p, w) => ({
2573
+ ...p,
2574
+ [w]: { version: void 0 }
3499
2575
  }), {});
3500
- (await nr(y)).forEach(({ name: d, version: v }) => {
3501
- y[d].version = v;
2576
+ (await yt(m)).forEach(({ name: p, version: w }) => {
2577
+ m[p].version = w;
3502
2578
  });
3503
- let S = i.typescript ? "typescript" : "javascript", T = !!i["eslint-plugin-storybook"], E = pl(t);
2579
+ let C = !!i["eslint-plugin-storybook"], k = ia(t);
3504
2580
  try {
3505
- let { previewConfig: d } = E;
3506
- if (d) {
3507
- let v = await ml(d), ae = !!(v.getFieldNode(["globals"]) || v.getFieldNode(["globalTypes"]));
3508
- n.preview = { ...n.preview, usesGlobals: ae };
2581
+ let { previewConfig: p } = k;
2582
+ if (p) {
2583
+ let w = await ca(p), J = !!(w.getFieldNode(["globals"]) || w.getFieldNode(["globalTypes"]));
2584
+ n.preview = { ...n.preview, usesGlobals: J };
3509
2585
  }
3510
2586
  } catch {
3511
2587
  }
3512
- let I = y[E.frameworkPackage]?.version, O = await Ti(), A = await gi(ul(e));
2588
+ let I = m[k.frameworkPackage]?.version, W = await Hn(), H = await Mn(ra(e));
3513
2589
  return {
3514
2590
  ...n,
3515
2591
  ...l,
3516
- portableStoriesFileCount: O,
3517
- applicationFileCount: A,
2592
+ portableStoriesFileCount: W,
2593
+ applicationFileCount: H,
3518
2594
  storybookVersion: I,
3519
- storybookVersionSpecifier: E.version,
3520
- language: S,
3521
- storybookPackages: y,
3522
- addons: f,
3523
- hasStorybookEslint: T
2595
+ storybookVersionSpecifier: k.version,
2596
+ language: f,
2597
+ storybookPackages: m,
2598
+ addons: d,
2599
+ hasStorybookEslint: C
3524
2600
  };
3525
2601
  }, "computeStorybookMetadata");
3526
- async function yl() {
3527
- let e = await Tt(process.cwd());
2602
+ async function fa() {
2603
+ let e = await Pe(process.cwd());
3528
2604
  return e ? {
3529
2605
  packageJsonPath: e,
3530
- packageJson: await uo(e) || {}
2606
+ packageJson: await _t(e) || {}
3531
2607
  } : {
3532
2608
  packageJsonPath: process.cwd(),
3533
2609
  packageJson: {}
3534
2610
  };
3535
2611
  }
3536
- o(yl, "getPackageJsonDetails");
3537
- var Ke, Ci = /* @__PURE__ */ o(async (e) => {
3538
- if (Ke)
3539
- return Ke;
3540
- let { packageJson: t, packageJsonPath: r } = await yl(), n = (e || fl(
2612
+ o(fa, "getPackageJsonDetails");
2613
+ var be, qn = /* @__PURE__ */ o(async (e) => {
2614
+ if (be)
2615
+ return be;
2616
+ let { packageJson: t, packageJsonPath: r } = await fa(), n = (e || oa(
3541
2617
  String(t?.scripts?.storybook || ""),
3542
2618
  "-c",
3543
2619
  "--config-dir"
3544
- )) ?? ".storybook", i = await dl({ configDir: n });
3545
- return Ke = await hl({ mainConfig: i, packageJson: t, packageJsonPath: r }), Ke;
2620
+ )) ?? ".storybook", i = await sa({ configDir: n }).catch(() => {
2621
+ });
2622
+ return be = await ua({ mainConfig: i, packageJson: t, packageJsonPath: r }), be;
3546
2623
  }, "getStorybookMetadata");
3547
2624
 
3548
2625
  // src/telemetry/telemetry.ts
3549
- var Li = R(Ai(), 1);
3550
- import * as Mi from "node:os";
2626
+ var oo = A(Yn(), 1);
2627
+ import * as no from "node:os";
3551
2628
 
3552
2629
  // ../node_modules/nanoid/index.js
3553
- import { randomFillSync as _i } from "crypto";
2630
+ import { randomFillSync as Xn } from "crypto";
3554
2631
 
3555
2632
  // ../node_modules/nanoid/url-alphabet/index.js
3556
- var Ri = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
2633
+ var Kn = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
3557
2634
 
3558
2635
  // ../node_modules/nanoid/index.js
3559
- var gl = 128, B, V, bl = /* @__PURE__ */ o((e) => {
3560
- !B || B.length < e ? (B = Buffer.allocUnsafe(e * gl), _i(B), V = 0) : V + e > B.length && (_i(B), V = 0), V += e;
2636
+ var la = 128, T, N, pa = /* @__PURE__ */ o((e) => {
2637
+ !T || T.length < e ? (T = Buffer.allocUnsafe(e * la), Xn(T), N = 0) : N + e > T.length && (Xn(T), N = 0), N += e;
3561
2638
  }, "fillPool");
3562
- var ie = /* @__PURE__ */ o((e = 21) => {
3563
- bl(e -= 0);
2639
+ var U = /* @__PURE__ */ o((e = 21) => {
2640
+ pa(e -= 0);
3564
2641
  let t = "";
3565
- for (let r = V - e; r < V; r++)
3566
- t += Ri[B[r] & 63];
2642
+ for (let r = N - e; r < N; r++)
2643
+ t += Kn[T[r] & 63];
3567
2644
  return t;
3568
2645
  }, "nanoid");
3569
2646
 
3570
2647
  // src/telemetry/anonymous-id.ts
3571
- import { relative as Sl } from "node:path";
3572
- import { getProjectRoot as wl } from "storybook/internal/common";
3573
- import { execSync as vl } from "child_process";
2648
+ import { relative as da } from "node:path";
2649
+ import { getProjectRoot as ya } from "storybook/internal/common";
2650
+ import { execSync as ha } from "child_process";
3574
2651
 
3575
2652
  // src/telemetry/one-way-hash.ts
3576
- import { createHash as xl } from "crypto";
3577
- var sr = /* @__PURE__ */ o((e) => {
3578
- let t = xl("sha256");
2653
+ import { createHash as ma } from "crypto";
2654
+ var bt = /* @__PURE__ */ o((e) => {
2655
+ let t = ma("sha256");
3579
2656
  return t.update("storybook-telemetry-salt"), t.update(e), t.digest("hex");
3580
2657
  }, "oneWayHash");
3581
2658
 
3582
2659
  // src/telemetry/anonymous-id.ts
3583
- function Pl(e) {
2660
+ function ga(e) {
3584
2661
  let n = e.trim().replace(/#.*$/, "").replace(/^.*@/, "").replace(/^.*\/\//, "");
3585
2662
  return (n.endsWith(".git") ? n : `${n}.git`).replace(":", "/");
3586
2663
  }
3587
- o(Pl, "normalizeGitUrl");
3588
- function El(e, t) {
3589
- return `${Pl(e)}${Xt(t)}`;
2664
+ o(ga, "normalizeGitUrl");
2665
+ function ba(e, t) {
2666
+ return `${ga(e)}${ut(t)}`;
3590
2667
  }
3591
- o(El, "unhashedProjectId");
3592
- var Qe, Gi = /* @__PURE__ */ o(() => {
3593
- if (Qe)
3594
- return Qe;
2668
+ o(ba, "unhashedProjectId");
2669
+ var we, Qn = /* @__PURE__ */ o(() => {
2670
+ if (we)
2671
+ return we;
3595
2672
  try {
3596
- let e = wl(), t = Sl(e, process.cwd()), r = vl("git config --local --get remote.origin.url", {
2673
+ let e = ya(), t = da(e, process.cwd()), r = ha("git config --local --get remote.origin.url", {
3597
2674
  timeout: 1e3,
3598
2675
  stdio: "pipe"
3599
2676
  });
3600
- Qe = sr(El(String(r), t));
2677
+ we = bt(ba(String(r), t));
3601
2678
  } catch {
3602
2679
  }
3603
- return Qe;
2680
+ return we;
3604
2681
  }, "getAnonymousProjectId");
3605
2682
 
3606
2683
  // src/telemetry/event-cache.ts
3607
- import { cache as cr } from "storybook/internal/common";
3608
- var ar = Promise.resolve(), Tl = /* @__PURE__ */ o(async (e, t) => {
3609
- let r = await cr.get("lastEvents") || {};
3610
- r[e] = { body: t, timestamp: Date.now() }, await cr.set("lastEvents", r);
3611
- }, "setHelper"), Ni = /* @__PURE__ */ o(async (e, t) => (await ar, ar = Tl(e, t), ar), "set");
3612
- var kl = /* @__PURE__ */ o((e) => {
2684
+ import { cache as wt } from "storybook/internal/common";
2685
+ var xt = Promise.resolve(), xa = /* @__PURE__ */ o(async (e, t) => {
2686
+ let r = await wt.get("lastEvents") || {};
2687
+ r[e] = { body: t, timestamp: Date.now() }, await wt.set("lastEvents", r);
2688
+ }, "setHelper"), eo = /* @__PURE__ */ o(async (e, t) => (await xt, xt = xa(e, t), xt), "set");
2689
+ var wa = /* @__PURE__ */ o((e) => {
3613
2690
  let { body: t, timestamp: r } = e;
3614
2691
  return {
3615
2692
  timestamp: r,
@@ -3617,104 +2694,104 @@ var kl = /* @__PURE__ */ o((e) => {
3617
2694
  eventId: t?.eventId,
3618
2695
  sessionId: t?.sessionId
3619
2696
  };
3620
- }, "upgradeFields"), Il = ["init", "upgrade"], Cl = ["build", "dev", "error"], ji = /* @__PURE__ */ o((e, t) => {
2697
+ }, "upgradeFields"), Sa = ["init", "upgrade"], ka = ["build", "dev", "error"], Zn = /* @__PURE__ */ o((e, t) => {
3621
2698
  let r = t.map((n) => e?.[n]).filter(Boolean).sort((n, i) => i.timestamp - n.timestamp);
3622
2699
  return r.length > 0 ? r[0] : void 0;
3623
- }, "lastEvent"), Ol = /* @__PURE__ */ o(async (e = void 0) => {
3624
- let t = e || await cr.get("lastEvents") || {}, r = ji(t, Il), n = ji(t, Cl);
2700
+ }, "lastEvent"), Ea = /* @__PURE__ */ o(async (e = void 0) => {
2701
+ let t = e || await wt.get("lastEvents") || {}, r = Zn(t, Sa), n = Zn(t, ka);
3625
2702
  if (r)
3626
- return !n?.timestamp || r.timestamp > n.timestamp ? kl(r) : void 0;
2703
+ return !n?.timestamp || r.timestamp > n.timestamp ? wa(r) : void 0;
3627
2704
  }, "getPrecedingUpgrade");
3628
2705
 
3629
2706
  // src/telemetry/fetch.ts
3630
- var Bi = global.fetch;
2707
+ var to = global.fetch;
3631
2708
 
3632
2709
  // src/telemetry/session-id.ts
3633
- import { cache as Di } from "storybook/internal/common";
3634
- var Al = 1e3 * 60 * 60 * 2, se;
3635
- var ur = /* @__PURE__ */ o(async () => {
2710
+ import { cache as ro } from "storybook/internal/common";
2711
+ var Pa = 1e3 * 60 * 60 * 2, $;
2712
+ var St = /* @__PURE__ */ o(async () => {
3636
2713
  let e = Date.now();
3637
- if (!se) {
3638
- let t = await Di.get("session");
3639
- t && t.lastUsed >= e - Al ? se = t.id : se = ie();
2714
+ if (!$) {
2715
+ let t = await ro.get("session");
2716
+ t && t.lastUsed >= e - Pa ? $ = t.id : $ = U();
3640
2717
  }
3641
- return await Di.set("session", { id: se, lastUsed: e }), se;
2718
+ return await ro.set("session", { id: $, lastUsed: e }), $;
3642
2719
  }, "getSessionId");
3643
2720
 
3644
2721
  // src/telemetry/telemetry.ts
3645
- var Rl = (0, Li.default)(Bi), _l = process.env.STORYBOOK_TELEMETRY_URL || "https://storybook.js.org/event-log", Ze = [], Gl = /* @__PURE__ */ o(
2722
+ var va = (0, oo.default)(to), Ta = process.env.STORYBOOK_TELEMETRY_URL || "https://storybook.js.org/event-log", Se = [], Ca = /* @__PURE__ */ o(
3646
2723
  (e, t) => {
3647
- lr[e] = t;
3648
- }, "addToGlobalContext"), jl = /* @__PURE__ */ o(() => {
2724
+ kt[e] = t;
2725
+ }, "addToGlobalContext"), Ia = /* @__PURE__ */ o(() => {
3649
2726
  try {
3650
- let e = Mi.platform();
2727
+ let e = no.platform();
3651
2728
  return e === "win32" ? "Windows" : e === "darwin" ? "macOS" : e === "linux" ? "Linux" : `Other: ${e}`;
3652
2729
  } catch {
3653
2730
  return "Unknown";
3654
2731
  }
3655
- }, "getOperatingSystem"), lr = {
2732
+ }, "getOperatingSystem"), kt = {
3656
2733
  inCI: !!process.env.CI,
3657
2734
  isTTY: process.stdout.isTTY,
3658
- platform: jl(),
2735
+ platform: Ia(),
3659
2736
  nodeVersion: process.versions.node
3660
- }, Nl = /* @__PURE__ */ o(async (e, t, r) => {
3661
- let { eventType: n, payload: i, metadata: s, ...a } = e, c = await ur(), u = ie(), l = { ...a, eventType: n, eventId: u, sessionId: c, metadata: s,
2737
+ }, Aa = /* @__PURE__ */ o(async (e, t, r) => {
2738
+ let { eventType: n, payload: i, metadata: s, ...a } = e, c = await St(), u = U(), f = { ...a, eventType: n, eventId: u, sessionId: c, metadata: s,
3662
2739
  payload: i, context: t };
3663
- return Rl(_l, {
2740
+ return va(Ta, {
3664
2741
  method: "post",
3665
- body: JSON.stringify(l),
2742
+ body: JSON.stringify(f),
3666
2743
  headers: { "Content-Type": "application/json" },
3667
2744
  retries: 3,
3668
2745
  retryOn: [503, 504],
3669
- retryDelay: /* @__PURE__ */ o((f) => 2 ** f * (typeof r?.retryDelay == "number" && !Number.isNaN(r?.retryDelay) ? r.retryDelay : 1e3), "\
2746
+ retryDelay: /* @__PURE__ */ o((l) => 2 ** l * (typeof r?.retryDelay == "number" && !Number.isNaN(r?.retryDelay) ? r.retryDelay : 1e3), "\
3670
2747
  retryDelay")
3671
2748
  });
3672
2749
  }, "prepareRequest");
3673
- async function Fi(e, t = { retryDelay: 1e3, immediate: !1 }) {
3674
- let { eventType: r, payload: n, metadata: i, ...s } = e, a = t.stripMetadata ? lr : {
3675
- ...lr,
3676
- anonymousId: Gi()
2750
+ async function io(e, t = { retryDelay: 1e3, immediate: !1 }) {
2751
+ let { eventType: r, payload: n, metadata: i, ...s } = e, a = t.stripMetadata ? kt : {
2752
+ ...kt,
2753
+ anonymousId: Qn()
3677
2754
  }, c;
3678
2755
  try {
3679
- c = Nl(e, a, t), Ze.push(c), t.immediate ? await Promise.all(Ze) : await c;
3680
- let u = await ur(), l = ie(), f = { ...s, eventType: r, eventId: l, sessionId: u, metadata: i, payload: n, context: a };
3681
- await Ni(r, f);
2756
+ c = Aa(e, a, t), Se.push(c), t.immediate ? await Promise.all(Se) : await c;
2757
+ let u = await St(), f = U(), l = { ...s, eventType: r, eventId: f, sessionId: u, metadata: i, payload: n, context: a };
2758
+ await eo(r, l);
3682
2759
  } catch {
3683
2760
  } finally {
3684
- Ze = Ze.filter((u) => u !== c);
2761
+ Se = Se.filter((u) => u !== c);
3685
2762
  }
3686
2763
  }
3687
- o(Fi, "sendTelemetry");
2764
+ o(io, "sendTelemetry");
3688
2765
 
3689
2766
  // src/telemetry/index.ts
3690
- var Lg = /* @__PURE__ */ o((e) => e.startsWith("example-button--") || e.startsWith("example-header--") || e.startsWith("example-page--"), "i\
3691
- sExampleStoryId"), Fg = /* @__PURE__ */ o(async (e, t = {}, r = {}) => {
3692
- e !== "boot" && r.notify !== !1 && await yr();
2767
+ var ud = /* @__PURE__ */ o((e) => e.startsWith("example-button--") || e.startsWith("example-header--") || e.startsWith("example-page--"), "i\
2768
+ sExampleStoryId"), fd = /* @__PURE__ */ o(async (e, t = {}, r = {}) => {
2769
+ e !== "boot" && r.notify !== !1 && await It();
3693
2770
  let n = {
3694
2771
  eventType: e,
3695
2772
  payload: t
3696
2773
  };
3697
2774
  try {
3698
- r?.stripMetadata || (n.metadata = await Ci(r?.configDir));
2775
+ r?.stripMetadata || (n.metadata = await qn(r?.configDir));
3699
2776
  } catch (i) {
3700
- n.payload.metadataErrorMessage = fe(i).message, r?.enableCrashReports && (n.payload.metadataError = fe(i));
2777
+ n.payload.metadataErrorMessage = Y(i).message, r?.enableCrashReports && (n.payload.metadataError = Y(i));
3701
2778
  } finally {
3702
2779
  let { error: i } = n.payload;
3703
- i && (n.payload.error = fe(i)), (!n.payload.error || r?.enableCrashReports) && (process.env?.STORYBOOK_TELEMETRY_DEBUG && (Ui.info(`
3704
- [telemetry]`), Ui.info(JSON.stringify(n, null, 2))), await Fi(n, r));
2780
+ i && (n.payload.error = Y(i)), (!n.payload.error || r?.enableCrashReports) && (process.env?.STORYBOOK_TELEMETRY_DEBUG && (so.info(`
2781
+ [telemetry]`), so.info(JSON.stringify(n, null, 2))), await io(n, r));
3705
2782
  }
3706
2783
  }, "telemetry");
3707
2784
  export {
3708
- Gl as addToGlobalContext,
3709
- z as cleanPaths,
3710
- hl as computeStorybookMetadata,
3711
- Ol as getPrecedingUpgrade,
3712
- Ci as getStorybookMetadata,
3713
- Lg as isExampleStoryId,
3714
- ki as metaFrameworks,
3715
- sr as oneWayHash,
3716
- br as removeAnsiEscapeCodes,
3717
- Ii as sanitizeAddonName,
3718
- fe as sanitizeError,
3719
- Fg as telemetry
2785
+ Ca as addToGlobalContext,
2786
+ D as cleanPaths,
2787
+ ua as computeStorybookMetadata,
2788
+ Ea as getPrecedingUpgrade,
2789
+ qn as getStorybookMetadata,
2790
+ ud as isExampleStoryId,
2791
+ Jn as metaFrameworks,
2792
+ bt as oneWayHash,
2793
+ Ot as removeAnsiEscapeCodes,
2794
+ Vn as sanitizeAddonName,
2795
+ Y as sanitizeError,
2796
+ fd as telemetry
3720
2797
  };