storybook 9.0.0-beta.7 → 9.0.0-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/bin/index.cjs +44 -44
  2. package/dist/bin/index.js +44 -44
  3. package/dist/builder-manager/index.cjs +191 -186
  4. package/dist/builder-manager/index.js +476 -471
  5. package/dist/channels/index.js +919 -941
  6. package/dist/cli/bin/index.cjs +4184 -737
  7. package/dist/cli/bin/index.js +4198 -749
  8. package/dist/cli/index.cjs +25089 -21637
  9. package/dist/cli/index.d.ts +974 -1
  10. package/dist/cli/index.js +25329 -21875
  11. package/dist/common/index.cjs +4545 -4538
  12. package/dist/common/index.d.ts +6 -1
  13. package/dist/common/index.js +4545 -4538
  14. package/dist/components/index.js +2254 -2260
  15. package/dist/core-server/index.cjs +4689 -4659
  16. package/dist/core-server/index.js +3261 -3230
  17. package/dist/core-server/presets/common-manager.js +2279 -2288
  18. package/dist/core-server/presets/common-preset.cjs +1445 -1444
  19. package/dist/core-server/presets/common-preset.js +418 -417
  20. package/dist/docs-tools/index.js +596 -603
  21. package/dist/instrumenter/index.js +1105 -1110
  22. package/dist/manager/globals-runtime.js +19954 -20093
  23. package/dist/manager/runtime.js +1874 -1881
  24. package/dist/manager-api/index.cjs +1 -1
  25. package/dist/manager-api/index.js +1309 -1340
  26. package/dist/manager-errors.js +37 -41
  27. package/dist/preview/runtime.js +13100 -13251
  28. package/dist/preview-api/index.cjs +615 -614
  29. package/dist/preview-api/index.js +1107 -1122
  30. package/dist/preview-errors.js +152 -173
  31. package/dist/server-errors.cjs +186 -171
  32. package/dist/server-errors.d.ts +11 -1
  33. package/dist/server-errors.js +167 -152
  34. package/dist/telemetry/index.cjs +4887 -1403
  35. package/dist/telemetry/index.d.ts +2 -1
  36. package/dist/telemetry/index.js +4923 -1437
  37. package/dist/test/index.js +8269 -8357
  38. package/dist/test/preview.js +3508 -3568
  39. package/package.json +4 -2
@@ -1,9 +1,9 @@
1
- var kn = Object.create;
2
- var mr = Object.defineProperty;
3
- var jn = Object.getOwnPropertyDescriptor;
4
- var Mn = Object.getOwnPropertyNames;
5
- var _n = Object.getPrototypeOf, Ln = Object.prototype.hasOwnProperty;
6
- var n = (r, e) => mr(r, "name", { value: e, configurable: !0 }), Ee = /* @__PURE__ */ ((r) => typeof require < "u" ? require : typeof Proxy <
1
+ var Kn = Object.create;
2
+ var hr = Object.defineProperty;
3
+ var Xn = Object.getOwnPropertyDescriptor;
4
+ var Jn = Object.getOwnPropertyNames;
5
+ var Qn = Object.getPrototypeOf, Zn = Object.prototype.hasOwnProperty;
6
+ var n = (r, e) => hr(r, "name", { value: e, configurable: !0 }), Ee = /* @__PURE__ */ ((r) => typeof require < "u" ? require : typeof Proxy <
7
7
  "u" ? new Proxy(r, {
8
8
  get: (e, t) => (typeof require < "u" ? require : e)[t]
9
9
  }) : r)(function(r) {
@@ -11,26 +11,26 @@ var n = (r, e) => mr(r, "name", { value: e, configurable: !0 }), Ee = /* @__PURE
11
11
  throw Error('Dynamic require of "' + r + '" is not supported');
12
12
  });
13
13
  var O = (r, e) => () => (e || r((e = { exports: {} }).exports, e), e.exports);
14
- var Nn = (r, e, t, o) => {
14
+ var es = (r, e, t, o) => {
15
15
  if (e && typeof e == "object" || typeof e == "function")
16
- for (let s of Mn(e))
17
- !Ln.call(r, s) && s !== t && mr(r, s, { get: () => e[s], enumerable: !(o = jn(e, s)) || o.enumerable });
16
+ for (let s of Jn(e))
17
+ !Zn.call(r, s) && s !== t && hr(r, s, { get: () => e[s], enumerable: !(o = Xn(e, s)) || o.enumerable });
18
18
  return r;
19
19
  };
20
- var ue = (r, e, t) => (t = r != null ? kn(_n(r)) : {}, Nn(
20
+ var ue = (r, e, t) => (t = r != null ? Kn(Qn(r)) : {}, es(
21
21
  // If the importer is in node compatibility mode or this is not an ESM
22
22
  // file that has been converted to a CommonJS file using a Babel-
23
23
  // compatible transform (i.e. "__esModule" has not been set), then set
24
24
  // "default" to the CommonJS "module.exports" for node compatibility.
25
- e || !r || !r.__esModule ? mr(t, "default", { value: r, enumerable: !0 }) : t,
25
+ e || !r || !r.__esModule ? hr(t, "default", { value: r, enumerable: !0 }) : t,
26
26
  r
27
27
  ));
28
28
 
29
29
  // ../node_modules/memoizerific/memoizerific.js
30
- var Ir = O((Bt, Fr) => {
30
+ var kr = O((oo, Dr) => {
31
31
  (function(r) {
32
- if (typeof Bt == "object" && typeof Fr < "u")
33
- Fr.exports = r();
32
+ if (typeof oo == "object" && typeof Dr < "u")
33
+ Dr.exports = r();
34
34
  else if (typeof define == "function" && define.amd)
35
35
  define([], r);
36
36
  else {
@@ -46,14 +46,14 @@ var Ir = O((Bt, Fr) => {
46
46
  var y = typeof Ee == "function" && Ee;
47
47
  if (!u && y) return y(p, !0);
48
48
  if (c) return c(p, !0);
49
- var g = new Error("Cannot find module '" + p + "'");
50
- throw g.code = "MODULE_NOT_FOUND", g;
49
+ var h = new Error("Cannot find module '" + p + "'");
50
+ throw h.code = "MODULE_NOT_FOUND", h;
51
51
  }
52
- var b = i[p] = { exports: {} };
53
- s[p][0].call(b.exports, function(S) {
54
- var h = s[p][1][S];
55
- return l(h || S);
56
- }, b, b.exports, o, s, i, a);
52
+ var g = i[p] = { exports: {} };
53
+ s[p][0].call(g.exports, function(b) {
54
+ var m = s[p][1][b];
55
+ return l(m || b);
56
+ }, g, g.exports, o, s, i, a);
57
57
  }
58
58
  return i[p].exports;
59
59
  }
@@ -107,47 +107,47 @@ var Ir = O((Bt, Fr) => {
107
107
  var a = o("map-or-similar");
108
108
  s.exports = function(p) {
109
109
  var u = new a(!1), y = [];
110
- return function(g) {
111
- var b = /* @__PURE__ */ n(function() {
112
- var S = u, h, T, m = arguments.length - 1, f = Array(m + 1), x = !0, E;
113
- if ((b.numArgs || b.numArgs === 0) && b.numArgs !== m + 1)
110
+ return function(h) {
111
+ var g = /* @__PURE__ */ n(function() {
112
+ var b = u, m, T, x = arguments.length - 1, f = Array(x + 1), S = !0, R;
113
+ if ((g.numArgs || g.numArgs === 0) && g.numArgs !== x + 1)
114
114
  throw new Error("Memoizerific functions should always be called with the same number of arguments");
115
- for (E = 0; E < m; E++) {
116
- if (f[E] = {
117
- cacheItem: S,
118
- arg: arguments[E]
119
- }, S.has(arguments[E])) {
120
- S = S.get(arguments[E]);
115
+ for (R = 0; R < x; R++) {
116
+ if (f[R] = {
117
+ cacheItem: b,
118
+ arg: arguments[R]
119
+ }, b.has(arguments[R])) {
120
+ b = b.get(arguments[R]);
121
121
  continue;
122
122
  }
123
- x = !1, h = new a(!1), S.set(arguments[E], h), S = h;
123
+ S = !1, m = new a(!1), b.set(arguments[R], m), b = m;
124
124
  }
125
- return x && (S.has(arguments[m]) ? T = S.get(arguments[m]) : x = !1), x || (T = g.apply(null, arguments), S.set(arguments[m], T)),
126
- p > 0 && (f[m] = {
127
- cacheItem: S,
128
- arg: arguments[m]
129
- }, x ? l(y, f) : y.push(f), y.length > p && c(y.shift())), b.wasMemoized = x, b.numArgs = m + 1, T;
125
+ return S && (b.has(arguments[x]) ? T = b.get(arguments[x]) : S = !1), S || (T = h.apply(null, arguments), b.set(arguments[x], T)),
126
+ p > 0 && (f[x] = {
127
+ cacheItem: b,
128
+ arg: arguments[x]
129
+ }, S ? l(y, f) : y.push(f), y.length > p && c(y.shift())), g.wasMemoized = S, g.numArgs = x + 1, T;
130
130
  }, "memoizerific");
131
- return b.limit = p, b.wasMemoized = !1, b.cache = u, b.lru = y, b;
131
+ return g.limit = p, g.wasMemoized = !1, g.cache = u, g.lru = y, g;
132
132
  };
133
133
  };
134
134
  function l(p, u) {
135
- var y = p.length, g = u.length, b, S, h;
136
- for (S = 0; S < y; S++) {
137
- for (b = !0, h = 0; h < g; h++)
138
- if (!d(p[S][h].arg, u[h].arg)) {
139
- b = !1;
135
+ var y = p.length, h = u.length, g, b, m;
136
+ for (b = 0; b < y; b++) {
137
+ for (g = !0, m = 0; m < h; m++)
138
+ if (!d(p[b][m].arg, u[m].arg)) {
139
+ g = !1;
140
140
  break;
141
141
  }
142
- if (b)
142
+ if (g)
143
143
  break;
144
144
  }
145
- p.push(p.splice(S, 1)[0]);
145
+ p.push(p.splice(b, 1)[0]);
146
146
  }
147
147
  n(l, "moveToMostRecentLru");
148
148
  function c(p) {
149
- var u = p.length, y = p[u - 1], g, b;
150
- for (y.cacheItem.delete(y.arg), b = u - 2; b >= 0 && (y = p[b], g = y.cacheItem.get(y.arg), !g || !g.size); b--)
149
+ var u = p.length, y = p[u - 1], h, g;
150
+ for (y.cacheItem.delete(y.arg), g = u - 2; g >= 0 && (y = p[g], h = y.cacheItem.get(y.arg), !h || !h.size); g--)
151
151
  y.cacheItem.delete(y.arg);
152
152
  }
153
153
  n(c, "removeCachedResult");
@@ -160,11 +160,11 @@ var Ir = O((Bt, Fr) => {
160
160
  });
161
161
 
162
162
  // ../node_modules/picoquery/lib/string-util.js
163
- var Vr = O((Hr) => {
163
+ var st = O((nt) => {
164
164
  "use strict";
165
- Object.defineProperty(Hr, "__esModule", { value: !0 });
166
- Hr.encodeString = Hi;
167
- var z = Array.from({ length: 256 }, (r, e) => "%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase()), Ui = new Int8Array([
165
+ Object.defineProperty(nt, "__esModule", { value: !0 });
166
+ nt.encodeString = ia;
167
+ var z = Array.from({ length: 256 }, (r, e) => "%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase()), sa = new Int8Array([
168
168
  0,
169
169
  0,
170
170
  0,
@@ -294,7 +294,7 @@ var Vr = O((Hr) => {
294
294
  1,
295
295
  0
296
296
  ]);
297
- function Hi(r) {
297
+ function ia(r) {
298
298
  let e = r.length;
299
299
  if (e === 0)
300
300
  return "";
@@ -302,7 +302,7 @@ var Vr = O((Hr) => {
302
302
  e: for (; s < e; s++) {
303
303
  let i = r.charCodeAt(s);
304
304
  for (; i < 128; ) {
305
- if (Ui[i] !== 1 && (o < s && (t += r.slice(o, s)), o = s + 1, t += z[i]), ++s === e)
305
+ if (sa[i] !== 1 && (o < s && (t += r.slice(o, s)), o = s + 1, t += z[i]), ++s === e)
306
306
  break e;
307
307
  i = r.charCodeAt(s);
308
308
  }
@@ -321,88 +321,88 @@ var Vr = O((Hr) => {
321
321
  }
322
322
  return o === 0 ? r : o < e ? t + r.slice(o) : t;
323
323
  }
324
- n(Hi, "encodeString");
324
+ n(ia, "encodeString");
325
325
  });
326
326
 
327
327
  // ../node_modules/picoquery/lib/shared.js
328
- var rr = O((G) => {
328
+ var tr = O((G) => {
329
329
  "use strict";
330
330
  Object.defineProperty(G, "__esModule", { value: !0 });
331
331
  G.defaultOptions = G.defaultShouldSerializeObject = G.defaultValueSerializer = void 0;
332
- var Wr = Vr(), Vi = /* @__PURE__ */ n((r) => {
332
+ var it = st(), aa = /* @__PURE__ */ n((r) => {
333
333
  switch (typeof r) {
334
334
  case "string":
335
- return (0, Wr.encodeString)(r);
335
+ return (0, it.encodeString)(r);
336
336
  case "bigint":
337
337
  case "boolean":
338
338
  return "" + r;
339
339
  case "number":
340
340
  if (Number.isFinite(r))
341
- return r < 1e21 ? "" + r : (0, Wr.encodeString)("" + r);
341
+ return r < 1e21 ? "" + r : (0, it.encodeString)("" + r);
342
342
  break;
343
343
  }
344
- return r instanceof Date ? (0, Wr.encodeString)(r.toISOString()) : "";
344
+ return r instanceof Date ? (0, it.encodeString)(r.toISOString()) : "";
345
345
  }, "defaultValueSerializer");
346
- G.defaultValueSerializer = Vi;
347
- var Wi = /* @__PURE__ */ n((r) => r instanceof Date, "defaultShouldSerializeObject");
348
- G.defaultShouldSerializeObject = Wi;
349
- var Fo = /* @__PURE__ */ n((r) => r, "identityFunc");
346
+ G.defaultValueSerializer = aa;
347
+ var la = /* @__PURE__ */ n((r) => r instanceof Date, "defaultShouldSerializeObject");
348
+ G.defaultShouldSerializeObject = la;
349
+ var Vo = /* @__PURE__ */ n((r) => r, "identityFunc");
350
350
  G.defaultOptions = {
351
351
  nesting: !0,
352
352
  nestingSyntax: "dot",
353
353
  arrayRepeat: !1,
354
354
  arrayRepeatSyntax: "repeat",
355
355
  delimiter: 38,
356
- valueDeserializer: Fo,
356
+ valueDeserializer: Vo,
357
357
  valueSerializer: G.defaultValueSerializer,
358
- keyDeserializer: Fo,
358
+ keyDeserializer: Vo,
359
359
  shouldSerializeObject: G.defaultShouldSerializeObject
360
360
  };
361
361
  });
362
362
 
363
363
  // ../node_modules/picoquery/lib/object-util.js
364
- var $r = O((tr) => {
364
+ var at = O((or) => {
365
365
  "use strict";
366
- Object.defineProperty(tr, "__esModule", { value: !0 });
367
- tr.getDeepObject = Ki;
368
- tr.stringifyObject = Io;
369
- var ae = rr(), $i = Vr();
370
- function Yi(r) {
366
+ Object.defineProperty(or, "__esModule", { value: !0 });
367
+ or.getDeepObject = pa;
368
+ or.stringifyObject = Wo;
369
+ var ae = tr(), ca = st();
370
+ function da(r) {
371
371
  return r === "__proto__" || r === "constructor" || r === "prototype";
372
372
  }
373
- n(Yi, "isPrototypeKey");
374
- function Ki(r, e, t, o, s) {
375
- if (Yi(e))
373
+ n(da, "isPrototypeKey");
374
+ function pa(r, e, t, o, s) {
375
+ if (da(e))
376
376
  return r;
377
377
  let i = r[e];
378
378
  return typeof i == "object" && i !== null ? i : !o && (s || typeof t == "number" || typeof t == "string" && t * 0 === 0 && t.indexOf(".") ===
379
379
  -1) ? r[e] = [] : r[e] = {};
380
380
  }
381
- n(Ki, "getDeepObject");
382
- var Xi = 20, Ji = "[]", Qi = "[", Zi = "]", ea = ".";
383
- function Io(r, e, t = 0, o, s) {
381
+ n(pa, "getDeepObject");
382
+ var ua = 20, fa = "[]", ya = "[", ma = "]", ha = ".";
383
+ function Wo(r, e, t = 0, o, s) {
384
384
  let { nestingSyntax: i = ae.defaultOptions.nestingSyntax, arrayRepeat: a = ae.defaultOptions.arrayRepeat, arrayRepeatSyntax: l = ae.defaultOptions.
385
385
  arrayRepeatSyntax, nesting: c = ae.defaultOptions.nesting, delimiter: d = ae.defaultOptions.delimiter, valueSerializer: p = ae.defaultOptions.
386
386
  valueSerializer, shouldSerializeObject: u = ae.defaultOptions.shouldSerializeObject } = e, y = typeof d == "number" ? String.fromCharCode(
387
- d) : d, g = s === !0 && a, b = i === "dot" || i === "js" && !s;
388
- if (t > Xi)
387
+ d) : d, h = s === !0 && a, g = i === "dot" || i === "js" && !s;
388
+ if (t > ua)
389
389
  return "";
390
- let S = "", h = !0, T = !1;
391
- for (let m in r) {
392
- let f = r[m], x;
393
- o ? (x = o, g ? l === "bracket" && (x += Ji) : b ? (x += ea, x += m) : (x += Qi, x += m, x += Zi)) : x = m, h || (S += y), typeof f ==
394
- "object" && f !== null && !u(f) ? (T = f.pop !== void 0, (c || a && T) && (S += Io(f, e, t + 1, x, T))) : (S += (0, $i.encodeString)(x),
395
- S += "=", S += p(f, m)), h && (h = !1);
390
+ let b = "", m = !0, T = !1;
391
+ for (let x in r) {
392
+ let f = r[x], S;
393
+ o ? (S = o, h ? l === "bracket" && (S += fa) : g ? (S += ha, S += x) : (S += ya, S += x, S += ma)) : S = x, m || (b += y), typeof f ==
394
+ "object" && f !== null && !u(f) ? (T = f.pop !== void 0, (c || a && T) && (b += Wo(f, e, t + 1, S, T))) : (b += (0, ca.encodeString)(S),
395
+ b += "=", b += p(f, x)), m && (m = !1);
396
396
  }
397
- return S;
397
+ return b;
398
398
  }
399
- n(Io, "stringifyObject");
399
+ n(Wo, "stringifyObject");
400
400
  });
401
401
 
402
402
  // ../node_modules/fast-decode-uri-component/index.js
403
- var jo = O((Ku, ko) => {
403
+ var Xo = O((ff, Ko) => {
404
404
  "use strict";
405
- var Oo = 12, ra = 0, Yr = [
405
+ var $o = 12, ga = 0, lt = [
406
406
  // The first part of the table maps bytes to character to a transition.
407
407
  0,
408
408
  0,
@@ -785,18 +785,18 @@ var jo = O((Ku, ko) => {
785
785
  7,
786
786
  7
787
787
  ];
788
- function ta(r) {
788
+ function ba(r) {
789
789
  var e = r.indexOf("%");
790
790
  if (e === -1) return r;
791
- for (var t = r.length, o = "", s = 0, i = 0, a = e, l = Oo; e > -1 && e < t; ) {
792
- var c = Do(r[e + 1], 4), d = Do(r[e + 2], 0), p = c | d, u = Yr[p];
793
- if (l = Yr[256 + l + u], i = i << 6 | p & Yr[364 + u], l === Oo)
791
+ for (var t = r.length, o = "", s = 0, i = 0, a = e, l = $o; e > -1 && e < t; ) {
792
+ var c = Yo(r[e + 1], 4), d = Yo(r[e + 2], 0), p = c | d, u = lt[p];
793
+ if (l = lt[256 + l + u], i = i << 6 | p & lt[364 + u], l === $o)
794
794
  o += r.slice(s, a), o += i <= 65535 ? String.fromCharCode(i) : String.fromCharCode(
795
795
  55232 + (i >> 10),
796
796
  56320 + (i & 1023)
797
797
  ), i = 0, s = e + 3, e = a = r.indexOf("%", s);
798
798
  else {
799
- if (l === ra)
799
+ if (l === ga)
800
800
  return null;
801
801
  if (e += 3, e < t && r.charCodeAt(e) === 37) continue;
802
802
  return null;
@@ -804,8 +804,8 @@ var jo = O((Ku, ko) => {
804
804
  }
805
805
  return o + r.slice(s);
806
806
  }
807
- n(ta, "decodeURIComponent");
808
- var oa = {
807
+ n(ba, "decodeURIComponent");
808
+ var Sa = {
809
809
  0: 0,
810
810
  1: 1,
811
811
  2: 2,
@@ -829,95 +829,95 @@ var jo = O((Ku, ko) => {
829
829
  f: 15,
830
830
  F: 15
831
831
  };
832
- function Do(r, e) {
833
- var t = oa[r];
832
+ function Yo(r, e) {
833
+ var t = Sa[r];
834
834
  return t === void 0 ? 255 : t << e;
835
835
  }
836
- n(Do, "hexCodeToInt");
837
- ko.exports = ta;
836
+ n(Yo, "hexCodeToInt");
837
+ Ko.exports = ba;
838
838
  });
839
839
 
840
840
  // ../node_modules/picoquery/lib/parse.js
841
- var No = O((W) => {
841
+ var en = O((W) => {
842
842
  "use strict";
843
- var na = W && W.__importDefault || function(r) {
843
+ var Ta = W && W.__importDefault || function(r) {
844
844
  return r && r.__esModule ? r : { default: r };
845
845
  };
846
846
  Object.defineProperty(W, "__esModule", { value: !0 });
847
847
  W.numberValueDeserializer = W.numberKeyDeserializer = void 0;
848
- W.parse = aa;
849
- var or = $r(), le = rr(), Mo = na(jo()), sa = /* @__PURE__ */ n((r) => {
848
+ W.parse = wa;
849
+ var nr = at(), le = tr(), Jo = Ta(Xo()), xa = /* @__PURE__ */ n((r) => {
850
850
  let e = Number(r);
851
851
  return Number.isNaN(e) ? r : e;
852
852
  }, "numberKeyDeserializer");
853
- W.numberKeyDeserializer = sa;
854
- var ia = /* @__PURE__ */ n((r) => {
853
+ W.numberKeyDeserializer = xa;
854
+ var Ra = /* @__PURE__ */ n((r) => {
855
855
  let e = Number(r);
856
856
  return Number.isNaN(e) ? r : e;
857
857
  }, "numberValueDeserializer");
858
- W.numberValueDeserializer = ia;
859
- var _o = /\+/g, Lo = /* @__PURE__ */ n(function() {
858
+ W.numberValueDeserializer = Ra;
859
+ var Qo = /\+/g, Zo = /* @__PURE__ */ n(function() {
860
860
  }, "Empty");
861
- Lo.prototype = /* @__PURE__ */ Object.create(null);
862
- function nr(r, e, t, o, s) {
861
+ Zo.prototype = /* @__PURE__ */ Object.create(null);
862
+ function sr(r, e, t, o, s) {
863
863
  let i = r.substring(e, t);
864
- return o && (i = i.replace(_o, " ")), s && (i = (0, Mo.default)(i) || i), i;
864
+ return o && (i = i.replace(Qo, " ")), s && (i = (0, Jo.default)(i) || i), i;
865
865
  }
866
- n(nr, "computeKeySlice");
867
- function aa(r, e) {
866
+ n(sr, "computeKeySlice");
867
+ function wa(r, e) {
868
868
  let { valueDeserializer: t = le.defaultOptions.valueDeserializer, keyDeserializer: o = le.defaultOptions.keyDeserializer, arrayRepeatSyntax: s = le.
869
869
  defaultOptions.arrayRepeatSyntax, nesting: i = le.defaultOptions.nesting, arrayRepeat: a = le.defaultOptions.arrayRepeat, nestingSyntax: l = le.
870
870
  defaultOptions.nestingSyntax, delimiter: c = le.defaultOptions.delimiter } = e ?? {}, d = typeof c == "string" ? c.charCodeAt(0) : c, p = l ===
871
- "js", u = new Lo();
871
+ "js", u = new Zo();
872
872
  if (typeof r != "string")
873
873
  return u;
874
- let y = r.length, g = "", b = -1, S = -1, h = -1, T = u, m, f = "", x = "", E = !1, R = !1, A = !1, F = !1, j = !1, N = !1, pe = !1, C = 0,
875
- B = -1, Re = -1, it = -1;
874
+ let y = r.length, h = "", g = -1, b = -1, m = -1, T = u, x, f = "", S = "", R = !1, w = !1, A = !1, F = !1, j = !1, N = !1, pe = !1, C = 0,
875
+ B = -1, Re = -1, wt = -1;
876
876
  for (let I = 0; I < y + 1; I++) {
877
877
  if (C = I !== y ? r.charCodeAt(I) : d, C === d) {
878
- if (pe = S > b, pe || (S = I), h !== S - 1 && (x = nr(r, h + 1, B > -1 ? B : S, A, E), f = o(x), m !== void 0 && (T = (0, or.getDeepObject)(
879
- T, m, f, p && j, p && N))), pe || f !== "") {
880
- pe && (g = r.slice(S + 1, I), F && (g = g.replace(_o, " ")), R && (g = (0, Mo.default)(g) || g));
881
- let we = t(g, f);
878
+ if (pe = b > g, pe || (b = I), m !== b - 1 && (S = sr(r, m + 1, B > -1 ? B : b, A, R), f = o(S), x !== void 0 && (T = (0, nr.getDeepObject)(
879
+ T, x, f, p && j, p && N))), pe || f !== "") {
880
+ pe && (h = r.slice(b + 1, I), F && (h = h.replace(Qo, " ")), w && (h = (0, Jo.default)(h) || h));
881
+ let we = t(h, f);
882
882
  if (a) {
883
883
  let Be = T[f];
884
884
  Be === void 0 ? B > -1 ? T[f] = [we] : T[f] = we : Be.pop ? Be.push(we) : T[f] = [Be, we];
885
885
  } else
886
886
  T[f] = we;
887
887
  }
888
- g = "", b = I, S = I, E = !1, R = !1, A = !1, F = !1, j = !1, N = !1, B = -1, h = I, T = u, m = void 0, f = "";
889
- } else C === 93 ? (a && s === "bracket" && it === 91 && (B = Re), i && (l === "index" || p) && S <= b && (h !== Re && (x = nr(r, h + 1,
890
- I, A, E), f = o(x), m !== void 0 && (T = (0, or.getDeepObject)(T, m, f, void 0, p)), m = f, A = !1, E = !1), h = I, N = !0, j = !1)) :
891
- C === 46 ? i && (l === "dot" || p) && S <= b && (h !== Re && (x = nr(r, h + 1, I, A, E), f = o(x), m !== void 0 && (T = (0, or.getDeepObject)(
892
- T, m, f, p)), m = f, A = !1, E = !1), j = !0, N = !1, h = I) : C === 91 ? i && (l === "index" || p) && S <= b && (h !== Re && (x = nr(
893
- r, h + 1, I, A, E), f = o(x), p && m !== void 0 && (T = (0, or.getDeepObject)(T, m, f, p)), m = f, A = !1, E = !1, j = !1, N = !0), h =
894
- I) : C === 61 ? S <= b ? S = I : R = !0 : C === 43 ? S > b ? F = !0 : A = !0 : C === 37 && (S > b ? R = !0 : E = !0);
895
- Re = I, it = C;
888
+ h = "", g = I, b = I, R = !1, w = !1, A = !1, F = !1, j = !1, N = !1, B = -1, m = I, T = u, x = void 0, f = "";
889
+ } else C === 93 ? (a && s === "bracket" && wt === 91 && (B = Re), i && (l === "index" || p) && b <= g && (m !== Re && (S = sr(r, m + 1,
890
+ I, A, R), f = o(S), x !== void 0 && (T = (0, nr.getDeepObject)(T, x, f, void 0, p)), x = f, A = !1, R = !1), m = I, N = !0, j = !1)) :
891
+ C === 46 ? i && (l === "dot" || p) && b <= g && (m !== Re && (S = sr(r, m + 1, I, A, R), f = o(S), x !== void 0 && (T = (0, nr.getDeepObject)(
892
+ T, x, f, p)), x = f, A = !1, R = !1), j = !0, N = !1, m = I) : C === 91 ? i && (l === "index" || p) && b <= g && (m !== Re && (S = sr(
893
+ r, m + 1, I, A, R), f = o(S), p && x !== void 0 && (T = (0, nr.getDeepObject)(T, x, f, p)), x = f, A = !1, R = !1, j = !1, N = !0), m =
894
+ I) : C === 61 ? b <= g ? b = I : w = !0 : C === 43 ? b > g ? F = !0 : A = !0 : C === 37 && (b > g ? w = !0 : R = !0);
895
+ Re = I, wt = C;
896
896
  }
897
897
  return u;
898
898
  }
899
- n(aa, "parse");
899
+ n(wa, "parse");
900
900
  });
901
901
 
902
902
  // ../node_modules/picoquery/lib/stringify.js
903
- var qo = O((Kr) => {
903
+ var rn = O((ct) => {
904
904
  "use strict";
905
- Object.defineProperty(Kr, "__esModule", { value: !0 });
906
- Kr.stringify = ca;
907
- var la = $r();
908
- function ca(r, e) {
905
+ Object.defineProperty(ct, "__esModule", { value: !0 });
906
+ ct.stringify = Aa;
907
+ var Ea = at();
908
+ function Aa(r, e) {
909
909
  if (r === null || typeof r != "object")
910
910
  return "";
911
911
  let t = e ?? {};
912
- return (0, la.stringifyObject)(r, t);
912
+ return (0, Ea.stringifyObject)(r, t);
913
913
  }
914
- n(ca, "stringify");
914
+ n(Aa, "stringify");
915
915
  });
916
916
 
917
917
  // ../node_modules/picoquery/lib/main.js
918
- var sr = O((q) => {
918
+ var ir = O((q) => {
919
919
  "use strict";
920
- var da = q && q.__createBinding || (Object.create ? function(r, e, t, o) {
920
+ var Ca = q && q.__createBinding || (Object.create ? function(r, e, t, o) {
921
921
  o === void 0 && (o = t);
922
922
  var s = Object.getOwnPropertyDescriptor(e, t);
923
923
  (!s || ("get" in s ? !e.__esModule : s.writable || s.configurable)) && (s = { enumerable: !0, get: /* @__PURE__ */ n(function() {
@@ -925,25 +925,25 @@ var sr = O((q) => {
925
925
  }, "get") }), Object.defineProperty(r, o, s);
926
926
  } : function(r, e, t, o) {
927
927
  o === void 0 && (o = t), r[o] = e[t];
928
- }), pa = q && q.__exportStar || function(r, e) {
929
- for (var t in r) t !== "default" && !Object.prototype.hasOwnProperty.call(e, t) && da(e, r, t);
928
+ }), va = q && q.__exportStar || function(r, e) {
929
+ for (var t in r) t !== "default" && !Object.prototype.hasOwnProperty.call(e, t) && Ca(e, r, t);
930
930
  };
931
931
  Object.defineProperty(q, "__esModule", { value: !0 });
932
932
  q.stringify = q.parse = void 0;
933
- var ua = No();
933
+ var Pa = en();
934
934
  Object.defineProperty(q, "parse", { enumerable: !0, get: /* @__PURE__ */ n(function() {
935
- return ua.parse;
935
+ return Pa.parse;
936
936
  }, "get") });
937
- var fa = qo();
937
+ var Fa = rn();
938
938
  Object.defineProperty(q, "stringify", { enumerable: !0, get: /* @__PURE__ */ n(function() {
939
- return fa.stringify;
939
+ return Fa.stringify;
940
940
  }, "get") });
941
- pa(rr(), q);
941
+ va(tr(), q);
942
942
  });
943
943
 
944
944
  // ../node_modules/entities/lib/maps/entities.json
945
- var Qr = O((ff, Ra) => {
946
- Ra.exports = { Aacute: "\xC1", aacute: "\xE1", Abreve: "\u0102", abreve: "\u0103", ac: "\u223E", acd: "\u223F", acE: "\u223E\u0333", Acirc: "\
945
+ var ft = O((If, Na) => {
946
+ Na.exports = { Aacute: "\xC1", aacute: "\xE1", Abreve: "\u0102", abreve: "\u0103", ac: "\u223E", acd: "\u223F", acE: "\u223E\u0333", Acirc: "\
947
947
  \xC2", acirc: "\xE2", acute: "\xB4", Acy: "\u0410", acy: "\u0430", AElig: "\xC6", aelig: "\xE6", af: "\u2061", Afr: "\u{1D504}", afr: "\u{1D51E}",
948
948
  Agrave: "\xC0", agrave: "\xE0", alefsym: "\u2135", aleph: "\u2135", Alpha: "\u0391", alpha: "\u03B1", Amacr: "\u0100", amacr: "\u0101", amalg: "\
949
949
  \u2A3F", amp: "&", AMP: "&", andand: "\u2A55", And: "\u2A53", and: "\u2227", andd: "\u2A5C", andslope: "\u2A58", andv: "\u2A5A", ang: "\u2220",
@@ -1224,8 +1224,8 @@ var Qr = O((ff, Ra) => {
1224
1224
  });
1225
1225
 
1226
1226
  // ../node_modules/entities/lib/maps/legacy.json
1227
- var Wo = O((yf, wa) => {
1228
- wa.exports = { Aacute: "\xC1", aacute: "\xE1", Acirc: "\xC2", acirc: "\xE2", acute: "\xB4", AElig: "\xC6", aelig: "\xE6", Agrave: "\xC0", agrave: "\
1227
+ var cn = O((Of, qa) => {
1228
+ qa.exports = { Aacute: "\xC1", aacute: "\xE1", Acirc: "\xC2", acirc: "\xE2", acute: "\xB4", AElig: "\xC6", aelig: "\xE6", Agrave: "\xC0", agrave: "\
1229
1229
  \xE0", amp: "&", AMP: "&", Aring: "\xC5", aring: "\xE5", Atilde: "\xC3", atilde: "\xE3", Auml: "\xC4", auml: "\xE4", brvbar: "\xA6", Ccedil: "\
1230
1230
  \xC7", ccedil: "\xE7", cedil: "\xB8", cent: "\xA2", copy: "\xA9", COPY: "\xA9", curren: "\xA4", deg: "\xB0", divide: "\xF7", Eacute: "\xC9",
1231
1231
  eacute: "\xE9", Ecirc: "\xCA", ecirc: "\xEA", Egrave: "\xC8", egrave: "\xE8", ETH: "\xD0", eth: "\xF0", Euml: "\xCB", euml: "\xEB", frac12: "\
@@ -1239,25 +1239,25 @@ var Wo = O((yf, wa) => {
1239
1239
  });
1240
1240
 
1241
1241
  // ../node_modules/entities/lib/maps/xml.json
1242
- var Zr = O((mf, Ea) => {
1243
- Ea.exports = { amp: "&", apos: "'", gt: ">", lt: "<", quot: '"' };
1242
+ var yt = O((Df, Ba) => {
1243
+ Ba.exports = { amp: "&", apos: "'", gt: ">", lt: "<", quot: '"' };
1244
1244
  });
1245
1245
 
1246
1246
  // ../node_modules/entities/lib/maps/decode.json
1247
- var $o = O((hf, Aa) => {
1248
- Aa.exports = { "0": 65533, "128": 8364, "130": 8218, "131": 402, "132": 8222, "133": 8230, "134": 8224, "135": 8225, "136": 710, "137": 8240,
1247
+ var dn = O((kf, za) => {
1248
+ za.exports = { "0": 65533, "128": 8364, "130": 8218, "131": 402, "132": 8222, "133": 8230, "134": 8224, "135": 8225, "136": 710, "137": 8240,
1249
1249
  "138": 352, "139": 8249, "140": 338, "142": 381, "145": 8216, "146": 8217, "147": 8220, "148": 8221, "149": 8226, "150": 8211, "151": 8212,
1250
1250
  "152": 732, "153": 8482, "154": 353, "155": 8250, "156": 339, "158": 382, "159": 376 };
1251
1251
  });
1252
1252
 
1253
1253
  // ../node_modules/entities/lib/decode_codepoint.js
1254
- var Ko = O((qe) => {
1254
+ var un = O((qe) => {
1255
1255
  "use strict";
1256
- var Ca = qe && qe.__importDefault || function(r) {
1256
+ var Ga = qe && qe.__importDefault || function(r) {
1257
1257
  return r && r.__esModule ? r : { default: r };
1258
1258
  };
1259
1259
  Object.defineProperty(qe, "__esModule", { value: !0 });
1260
- var Yo = Ca($o()), va = (
1260
+ var pn = Ga(dn()), Ua = (
1261
1261
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
1262
1262
  String.fromCodePoint || function(r) {
1263
1263
  var e = "";
@@ -1265,38 +1265,38 @@ var Ko = O((qe) => {
1265
1265
  e;
1266
1266
  }
1267
1267
  );
1268
- function Pa(r) {
1269
- return r >= 55296 && r <= 57343 || r > 1114111 ? "\uFFFD" : (r in Yo.default && (r = Yo.default[r]), va(r));
1268
+ function Ha(r) {
1269
+ return r >= 55296 && r <= 57343 || r > 1114111 ? "\uFFFD" : (r in pn.default && (r = pn.default[r]), Ua(r));
1270
1270
  }
1271
- n(Pa, "decodeCodePoint");
1272
- qe.default = Pa;
1271
+ n(Ha, "decodeCodePoint");
1272
+ qe.default = Ha;
1273
1273
  });
1274
1274
 
1275
1275
  // ../node_modules/entities/lib/decode.js
1276
- var rt = O((U) => {
1276
+ var ht = O((U) => {
1277
1277
  "use strict";
1278
- var ir = U && U.__importDefault || function(r) {
1278
+ var ar = U && U.__importDefault || function(r) {
1279
1279
  return r && r.__esModule ? r : { default: r };
1280
1280
  };
1281
1281
  Object.defineProperty(U, "__esModule", { value: !0 });
1282
1282
  U.decodeHTML = U.decodeHTMLStrict = U.decodeXML = void 0;
1283
- var et = ir(Qr()), Fa = ir(Wo()), Ia = ir(Zr()), Xo = ir(Ko()), Oa = /&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;
1284
- U.decodeXML = Qo(Ia.default);
1285
- U.decodeHTMLStrict = Qo(et.default);
1286
- function Qo(r) {
1287
- var e = Zo(r);
1283
+ var mt = ar(ft()), Va = ar(cn()), Wa = ar(yt()), fn = ar(un()), $a = /&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;
1284
+ U.decodeXML = mn(Wa.default);
1285
+ U.decodeHTMLStrict = mn(mt.default);
1286
+ function mn(r) {
1287
+ var e = hn(r);
1288
1288
  return function(t) {
1289
- return String(t).replace(Oa, e);
1289
+ return String(t).replace($a, e);
1290
1290
  };
1291
1291
  }
1292
- n(Qo, "getStrictDecoder");
1293
- var Jo = /* @__PURE__ */ n(function(r, e) {
1292
+ n(mn, "getStrictDecoder");
1293
+ var yn = /* @__PURE__ */ n(function(r, e) {
1294
1294
  return r < e ? 1 : -1;
1295
1295
  }, "sorter");
1296
1296
  U.decodeHTML = function() {
1297
- for (var r = Object.keys(Fa.default).sort(Jo), e = Object.keys(et.default).sort(Jo), t = 0, o = 0; t < e.length; t++)
1297
+ for (var r = Object.keys(Va.default).sort(yn), e = Object.keys(mt.default).sort(yn), t = 0, o = 0; t < e.length; t++)
1298
1298
  r[o] === e[t] ? (e[t] += ";?", o++) : e[t] += ";";
1299
- var s = new RegExp("&(?:" + e.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g"), i = Zo(et.default);
1299
+ var s = new RegExp("&(?:" + e.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g"), i = hn(mt.default);
1300
1300
  function a(l) {
1301
1301
  return l.substr(-1) !== ";" && (l += ";"), i(l);
1302
1302
  }
@@ -1304,38 +1304,38 @@ var rt = O((U) => {
1304
1304
  return String(l).replace(s, a);
1305
1305
  };
1306
1306
  }();
1307
- function Zo(r) {
1307
+ function hn(r) {
1308
1308
  return /* @__PURE__ */ n(function(t) {
1309
1309
  if (t.charAt(1) === "#") {
1310
1310
  var o = t.charAt(2);
1311
- return o === "X" || o === "x" ? Xo.default(parseInt(t.substr(3), 16)) : Xo.default(parseInt(t.substr(2), 10));
1311
+ return o === "X" || o === "x" ? fn.default(parseInt(t.substr(3), 16)) : fn.default(parseInt(t.substr(2), 10));
1312
1312
  }
1313
1313
  return r[t.slice(1, -1)] || t;
1314
1314
  }, "replace");
1315
1315
  }
1316
- n(Zo, "getReplacer");
1316
+ n(hn, "getReplacer");
1317
1317
  });
1318
1318
 
1319
1319
  // ../node_modules/entities/lib/encode.js
1320
- var ot = O((M) => {
1320
+ var bt = O((M) => {
1321
1321
  "use strict";
1322
- var en = M && M.__importDefault || function(r) {
1322
+ var gn = M && M.__importDefault || function(r) {
1323
1323
  return r && r.__esModule ? r : { default: r };
1324
1324
  };
1325
1325
  Object.defineProperty(M, "__esModule", { value: !0 });
1326
1326
  M.escapeUTF8 = M.escape = M.encodeNonAsciiHTML = M.encodeHTML = M.encodeXML = void 0;
1327
- var Da = en(Zr()), rn = on(Da.default), tn = nn(rn);
1328
- M.encodeXML = ln(rn);
1329
- var ka = en(Qr()), tt = on(ka.default), ja = nn(tt);
1330
- M.encodeHTML = _a(tt, ja);
1331
- M.encodeNonAsciiHTML = ln(tt);
1332
- function on(r) {
1327
+ var Ya = gn(yt()), bn = Tn(Ya.default), Sn = xn(bn);
1328
+ M.encodeXML = En(bn);
1329
+ var Ka = gn(ft()), gt = Tn(Ka.default), Xa = xn(gt);
1330
+ M.encodeHTML = Qa(gt, Xa);
1331
+ M.encodeNonAsciiHTML = En(gt);
1332
+ function Tn(r) {
1333
1333
  return Object.keys(r).sort().reduce(function(e, t) {
1334
1334
  return e[r[t]] = "&" + t + ";", e;
1335
1335
  }, {});
1336
1336
  }
1337
- n(on, "getInverseObj");
1338
- function nn(r) {
1337
+ n(Tn, "getInverseObj");
1338
+ function xn(r) {
1339
1339
  for (var e = [], t = [], o = 0, s = Object.keys(r); o < s.length; o++) {
1340
1340
  var i = s[o];
1341
1341
  i.length === 1 ? e.push("\\" + i) : t.push(i);
@@ -1349,9 +1349,9 @@ var ot = O((M) => {
1349
1349
  }
1350
1350
  return t.unshift("[" + e.join("") + "]"), new RegExp(t.join("|"), "g");
1351
1351
  }
1352
- n(nn, "getInverseReplacer");
1353
- var sn = /(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,
1354
- Ma = (
1352
+ n(xn, "getInverseReplacer");
1353
+ var Rn = /(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,
1354
+ Ja = (
1355
1355
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
1356
1356
  String.prototype.codePointAt != null ? (
1357
1357
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
@@ -1365,134 +1365,134 @@ var ot = O((M) => {
1365
1365
  }
1366
1366
  )
1367
1367
  );
1368
- function ar(r) {
1369
- return "&#x" + (r.length > 1 ? Ma(r) : r.charCodeAt(0)).toString(16).toUpperCase() + ";";
1368
+ function lr(r) {
1369
+ return "&#x" + (r.length > 1 ? Ja(r) : r.charCodeAt(0)).toString(16).toUpperCase() + ";";
1370
1370
  }
1371
- n(ar, "singleCharReplacer");
1372
- function _a(r, e) {
1371
+ n(lr, "singleCharReplacer");
1372
+ function Qa(r, e) {
1373
1373
  return function(t) {
1374
1374
  return t.replace(e, function(o) {
1375
1375
  return r[o];
1376
- }).replace(sn, ar);
1376
+ }).replace(Rn, lr);
1377
1377
  };
1378
1378
  }
1379
- n(_a, "getInverse");
1380
- var an = new RegExp(tn.source + "|" + sn.source, "g");
1381
- function La(r) {
1382
- return r.replace(an, ar);
1379
+ n(Qa, "getInverse");
1380
+ var wn = new RegExp(Sn.source + "|" + Rn.source, "g");
1381
+ function Za(r) {
1382
+ return r.replace(wn, lr);
1383
1383
  }
1384
- n(La, "escape");
1385
- M.escape = La;
1386
- function Na(r) {
1387
- return r.replace(tn, ar);
1384
+ n(Za, "escape");
1385
+ M.escape = Za;
1386
+ function el(r) {
1387
+ return r.replace(Sn, lr);
1388
1388
  }
1389
- n(Na, "escapeUTF8");
1390
- M.escapeUTF8 = Na;
1391
- function ln(r) {
1389
+ n(el, "escapeUTF8");
1390
+ M.escapeUTF8 = el;
1391
+ function En(r) {
1392
1392
  return function(e) {
1393
- return e.replace(an, function(t) {
1394
- return r[t] || ar(t);
1393
+ return e.replace(wn, function(t) {
1394
+ return r[t] || lr(t);
1395
1395
  });
1396
1396
  };
1397
1397
  }
1398
- n(ln, "getASCIIEncoder");
1398
+ n(En, "getASCIIEncoder");
1399
1399
  });
1400
1400
 
1401
1401
  // ../node_modules/entities/lib/index.js
1402
- var dn = O((w) => {
1402
+ var Cn = O((E) => {
1403
1403
  "use strict";
1404
- Object.defineProperty(w, "__esModule", { value: !0 });
1405
- w.decodeXMLStrict = w.decodeHTML5Strict = w.decodeHTML4Strict = w.decodeHTML5 = w.decodeHTML4 = w.decodeHTMLStrict = w.decodeHTML = w.decodeXML =
1406
- w.encodeHTML5 = w.encodeHTML4 = w.escapeUTF8 = w.escape = w.encodeNonAsciiHTML = w.encodeHTML = w.encodeXML = w.encode = w.decodeStrict = w.
1404
+ Object.defineProperty(E, "__esModule", { value: !0 });
1405
+ E.decodeXMLStrict = E.decodeHTML5Strict = E.decodeHTML4Strict = E.decodeHTML5 = E.decodeHTML4 = E.decodeHTMLStrict = E.decodeHTML = E.decodeXML =
1406
+ E.encodeHTML5 = E.encodeHTML4 = E.escapeUTF8 = E.escape = E.encodeNonAsciiHTML = E.encodeHTML = E.encodeXML = E.encode = E.decodeStrict = E.
1407
1407
  decode = void 0;
1408
- var lr = rt(), cn = ot();
1409
- function qa(r, e) {
1410
- return (!e || e <= 0 ? lr.decodeXML : lr.decodeHTML)(r);
1411
- }
1412
- n(qa, "decode");
1413
- w.decode = qa;
1414
- function Ba(r, e) {
1415
- return (!e || e <= 0 ? lr.decodeXML : lr.decodeHTMLStrict)(r);
1416
- }
1417
- n(Ba, "decodeStrict");
1418
- w.decodeStrict = Ba;
1419
- function za(r, e) {
1420
- return (!e || e <= 0 ? cn.encodeXML : cn.encodeHTML)(r);
1421
- }
1422
- n(za, "encode");
1423
- w.encode = za;
1424
- var ce = ot();
1425
- Object.defineProperty(w, "encodeXML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1408
+ var cr = ht(), An = bt();
1409
+ function rl(r, e) {
1410
+ return (!e || e <= 0 ? cr.decodeXML : cr.decodeHTML)(r);
1411
+ }
1412
+ n(rl, "decode");
1413
+ E.decode = rl;
1414
+ function tl(r, e) {
1415
+ return (!e || e <= 0 ? cr.decodeXML : cr.decodeHTMLStrict)(r);
1416
+ }
1417
+ n(tl, "decodeStrict");
1418
+ E.decodeStrict = tl;
1419
+ function ol(r, e) {
1420
+ return (!e || e <= 0 ? An.encodeXML : An.encodeHTML)(r);
1421
+ }
1422
+ n(ol, "encode");
1423
+ E.encode = ol;
1424
+ var ce = bt();
1425
+ Object.defineProperty(E, "encodeXML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1426
1426
  return ce.encodeXML;
1427
1427
  }, "get") });
1428
- Object.defineProperty(w, "encodeHTML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1428
+ Object.defineProperty(E, "encodeHTML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1429
1429
  return ce.encodeHTML;
1430
1430
  }, "get") });
1431
- Object.defineProperty(w, "encodeNonAsciiHTML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1431
+ Object.defineProperty(E, "encodeNonAsciiHTML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1432
1432
  return ce.encodeNonAsciiHTML;
1433
1433
  }, "get") });
1434
- Object.defineProperty(w, "escape", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1434
+ Object.defineProperty(E, "escape", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1435
1435
  return ce.escape;
1436
1436
  }, "get") });
1437
- Object.defineProperty(w, "escapeUTF8", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1437
+ Object.defineProperty(E, "escapeUTF8", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1438
1438
  return ce.escapeUTF8;
1439
1439
  }, "get") });
1440
- Object.defineProperty(w, "encodeHTML4", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1440
+ Object.defineProperty(E, "encodeHTML4", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1441
1441
  return ce.encodeHTML;
1442
1442
  }, "get") });
1443
- Object.defineProperty(w, "encodeHTML5", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1443
+ Object.defineProperty(E, "encodeHTML5", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1444
1444
  return ce.encodeHTML;
1445
1445
  }, "get") });
1446
- var Z = rt();
1447
- Object.defineProperty(w, "decodeXML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1446
+ var Z = ht();
1447
+ Object.defineProperty(E, "decodeXML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1448
1448
  return Z.decodeXML;
1449
1449
  }, "get") });
1450
- Object.defineProperty(w, "decodeHTML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1450
+ Object.defineProperty(E, "decodeHTML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1451
1451
  return Z.decodeHTML;
1452
1452
  }, "get") });
1453
- Object.defineProperty(w, "decodeHTMLStrict", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1453
+ Object.defineProperty(E, "decodeHTMLStrict", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1454
1454
  return Z.decodeHTMLStrict;
1455
1455
  }, "get") });
1456
- Object.defineProperty(w, "decodeHTML4", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1456
+ Object.defineProperty(E, "decodeHTML4", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1457
1457
  return Z.decodeHTML;
1458
1458
  }, "get") });
1459
- Object.defineProperty(w, "decodeHTML5", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1459
+ Object.defineProperty(E, "decodeHTML5", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1460
1460
  return Z.decodeHTML;
1461
1461
  }, "get") });
1462
- Object.defineProperty(w, "decodeHTML4Strict", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1462
+ Object.defineProperty(E, "decodeHTML4Strict", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1463
1463
  return Z.decodeHTMLStrict;
1464
1464
  }, "get") });
1465
- Object.defineProperty(w, "decodeHTML5Strict", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1465
+ Object.defineProperty(E, "decodeHTML5Strict", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1466
1466
  return Z.decodeHTMLStrict;
1467
1467
  }, "get") });
1468
- Object.defineProperty(w, "decodeXMLStrict", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1468
+ Object.defineProperty(E, "decodeXMLStrict", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1469
1469
  return Z.decodeXML;
1470
1470
  }, "get") });
1471
1471
  });
1472
1472
 
1473
1473
  // ../node_modules/ansi-to-html/lib/ansi_to_html.js
1474
- var xn = O((Af, Tn) => {
1474
+ var _n = O((Gf, Ln) => {
1475
1475
  "use strict";
1476
- function Ga(r, e) {
1476
+ function nl(r, e) {
1477
1477
  if (!(r instanceof e))
1478
1478
  throw new TypeError("Cannot call a class as a function");
1479
1479
  }
1480
- n(Ga, "_classCallCheck");
1481
- function pn(r, e) {
1480
+ n(nl, "_classCallCheck");
1481
+ function vn(r, e) {
1482
1482
  for (var t = 0; t < e.length; t++) {
1483
1483
  var o = e[t];
1484
1484
  o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(r, o.key, o);
1485
1485
  }
1486
1486
  }
1487
- n(pn, "_defineProperties");
1488
- function Ua(r, e, t) {
1489
- return e && pn(r.prototype, e), t && pn(r, t), r;
1487
+ n(vn, "_defineProperties");
1488
+ function sl(r, e, t) {
1489
+ return e && vn(r.prototype, e), t && vn(r, t), r;
1490
1490
  }
1491
- n(Ua, "_createClass");
1492
- function gn(r, e) {
1491
+ n(sl, "_createClass");
1492
+ function kn(r, e) {
1493
1493
  var t = typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
1494
1494
  if (!t) {
1495
- if (Array.isArray(r) || (t = Ha(r)) || e && r && typeof r.length == "number") {
1495
+ if (Array.isArray(r) || (t = il(r)) || e && r && typeof r.length == "number") {
1496
1496
  t && (r = t);
1497
1497
  var o = 0, s = /* @__PURE__ */ n(function() {
1498
1498
  }, "F");
@@ -1521,32 +1521,32 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1521
1521
  }
1522
1522
  }, "f") };
1523
1523
  }
1524
- n(gn, "_createForOfIteratorHelper");
1525
- function Ha(r, e) {
1524
+ n(kn, "_createForOfIteratorHelper");
1525
+ function il(r, e) {
1526
1526
  if (r) {
1527
- if (typeof r == "string") return un(r, e);
1527
+ if (typeof r == "string") return Pn(r, e);
1528
1528
  var t = Object.prototype.toString.call(r).slice(8, -1);
1529
1529
  if (t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set") return Array.from(r);
1530
- if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return un(r, e);
1530
+ if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Pn(r, e);
1531
1531
  }
1532
1532
  }
1533
- n(Ha, "_unsupportedIterableToArray");
1534
- function un(r, e) {
1533
+ n(il, "_unsupportedIterableToArray");
1534
+ function Pn(r, e) {
1535
1535
  (e == null || e > r.length) && (e = r.length);
1536
1536
  for (var t = 0, o = new Array(e); t < e; t++)
1537
1537
  o[t] = r[t];
1538
1538
  return o;
1539
1539
  }
1540
- n(un, "_arrayLikeToArray");
1541
- var Va = dn(), fn = {
1540
+ n(Pn, "_arrayLikeToArray");
1541
+ var al = Cn(), Fn = {
1542
1542
  fg: "#FFF",
1543
1543
  bg: "#000",
1544
1544
  newline: !1,
1545
1545
  escapeXML: !1,
1546
1546
  stream: !1,
1547
- colors: Wa()
1547
+ colors: ll()
1548
1548
  };
1549
- function Wa() {
1549
+ function ll() {
1550
1550
  var r = {
1551
1551
  0: "#000",
1552
1552
  1: "#A00",
@@ -1565,35 +1565,35 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1565
1565
  14: "#5FF",
1566
1566
  15: "#FFF"
1567
1567
  };
1568
- return cr(0, 5).forEach(function(e) {
1569
- cr(0, 5).forEach(function(t) {
1570
- cr(0, 5).forEach(function(o) {
1571
- return $a(e, t, o, r);
1568
+ return dr(0, 5).forEach(function(e) {
1569
+ dr(0, 5).forEach(function(t) {
1570
+ dr(0, 5).forEach(function(o) {
1571
+ return cl(e, t, o, r);
1572
1572
  });
1573
1573
  });
1574
- }), cr(0, 23).forEach(function(e) {
1575
- var t = e + 232, o = bn(e * 10 + 8);
1574
+ }), dr(0, 23).forEach(function(e) {
1575
+ var t = e + 232, o = jn(e * 10 + 8);
1576
1576
  r[t] = "#" + o + o + o;
1577
1577
  }), r;
1578
1578
  }
1579
- n(Wa, "getDefaultColors");
1580
- function $a(r, e, t, o) {
1579
+ n(ll, "getDefaultColors");
1580
+ function cl(r, e, t, o) {
1581
1581
  var s = 16 + r * 36 + e * 6 + t, i = r > 0 ? r * 40 + 55 : 0, a = e > 0 ? e * 40 + 55 : 0, l = t > 0 ? t * 40 + 55 : 0;
1582
- o[s] = Ya([i, a, l]);
1582
+ o[s] = dl([i, a, l]);
1583
1583
  }
1584
- n($a, "setStyleColor");
1585
- function bn(r) {
1584
+ n(cl, "setStyleColor");
1585
+ function jn(r) {
1586
1586
  for (var e = r.toString(16); e.length < 2; )
1587
1587
  e = "0" + e;
1588
1588
  return e;
1589
1589
  }
1590
- n(bn, "toHexString");
1591
- function Ya(r) {
1592
- var e = [], t = gn(r), o;
1590
+ n(jn, "toHexString");
1591
+ function dl(r) {
1592
+ var e = [], t = kn(r), o;
1593
1593
  try {
1594
1594
  for (t.s(); !(o = t.n()).done; ) {
1595
1595
  var s = o.value;
1596
- e.push(bn(s));
1596
+ e.push(jn(s));
1597
1597
  }
1598
1598
  } catch (i) {
1599
1599
  t.e(i);
@@ -1602,29 +1602,29 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1602
1602
  }
1603
1603
  return "#" + e.join("");
1604
1604
  }
1605
- n(Ya, "toColorHexString");
1606
- function yn(r, e, t, o) {
1605
+ n(dl, "toColorHexString");
1606
+ function In(r, e, t, o) {
1607
1607
  var s;
1608
- return e === "text" ? s = Qa(t, o) : e === "display" ? s = Xa(r, t, o) : e === "xterm256Foreground" ? s = pr(r, o.colors[t]) : e === "xt\
1609
- erm256Background" ? s = ur(r, o.colors[t]) : e === "rgb" && (s = Ka(r, t)), s;
1608
+ return e === "text" ? s = yl(t, o) : e === "display" ? s = ul(r, t, o) : e === "xterm256Foreground" ? s = ur(r, o.colors[t]) : e === "xt\
1609
+ erm256Background" ? s = fr(r, o.colors[t]) : e === "rgb" && (s = pl(r, t)), s;
1610
1610
  }
1611
- n(yn, "generateOutput");
1612
- function Ka(r, e) {
1611
+ n(In, "generateOutput");
1612
+ function pl(r, e) {
1613
1613
  e = e.substring(2).slice(0, -1);
1614
1614
  var t = +e.substr(0, 2), o = e.substring(5).split(";"), s = o.map(function(i) {
1615
1615
  return ("0" + Number(i).toString(16)).substr(-2);
1616
1616
  }).join("");
1617
- return dr(r, (t === 38 ? "color:#" : "background-color:#") + s);
1617
+ return pr(r, (t === 38 ? "color:#" : "background-color:#") + s);
1618
1618
  }
1619
- n(Ka, "handleRgb");
1620
- function Xa(r, e, t) {
1619
+ n(pl, "handleRgb");
1620
+ function ul(r, e, t) {
1621
1621
  e = parseInt(e, 10);
1622
1622
  var o = {
1623
1623
  "-1": /* @__PURE__ */ n(function() {
1624
1624
  return "<br/>";
1625
1625
  }, "_"),
1626
1626
  0: /* @__PURE__ */ n(function() {
1627
- return r.length && Sn(r);
1627
+ return r.length && Mn(r);
1628
1628
  }, "_"),
1629
1629
  1: /* @__PURE__ */ n(function() {
1630
1630
  return ee(r, "b");
@@ -1636,109 +1636,109 @@ erm256Background" ? s = ur(r, o.colors[t]) : e === "rgb" && (s = Ka(r, t)), s;
1636
1636
  return ee(r, "u");
1637
1637
  }, "_"),
1638
1638
  8: /* @__PURE__ */ n(function() {
1639
- return dr(r, "display:none");
1639
+ return pr(r, "display:none");
1640
1640
  }, "_"),
1641
1641
  9: /* @__PURE__ */ n(function() {
1642
1642
  return ee(r, "strike");
1643
1643
  }, "_"),
1644
1644
  22: /* @__PURE__ */ n(function() {
1645
- return dr(r, "font-weight:normal;text-decoration:none;font-style:normal");
1645
+ return pr(r, "font-weight:normal;text-decoration:none;font-style:normal");
1646
1646
  }, "_"),
1647
1647
  23: /* @__PURE__ */ n(function() {
1648
- return hn(r, "i");
1648
+ return Dn(r, "i");
1649
1649
  }, "_"),
1650
1650
  24: /* @__PURE__ */ n(function() {
1651
- return hn(r, "u");
1651
+ return Dn(r, "u");
1652
1652
  }, "_"),
1653
1653
  39: /* @__PURE__ */ n(function() {
1654
- return pr(r, t.fg);
1654
+ return ur(r, t.fg);
1655
1655
  }, "_"),
1656
1656
  49: /* @__PURE__ */ n(function() {
1657
- return ur(r, t.bg);
1657
+ return fr(r, t.bg);
1658
1658
  }, "_"),
1659
1659
  53: /* @__PURE__ */ n(function() {
1660
- return dr(r, "text-decoration:overline");
1660
+ return pr(r, "text-decoration:overline");
1661
1661
  }, "_")
1662
1662
  }, s;
1663
- return o[e] ? s = o[e]() : 4 < e && e < 7 ? s = ee(r, "blink") : 29 < e && e < 38 ? s = pr(r, t.colors[e - 30]) : 39 < e && e < 48 ? s =
1664
- ur(r, t.colors[e - 40]) : 89 < e && e < 98 ? s = pr(r, t.colors[8 + (e - 90)]) : 99 < e && e < 108 && (s = ur(r, t.colors[8 + (e - 100)])),
1663
+ return o[e] ? s = o[e]() : 4 < e && e < 7 ? s = ee(r, "blink") : 29 < e && e < 38 ? s = ur(r, t.colors[e - 30]) : 39 < e && e < 48 ? s =
1664
+ fr(r, t.colors[e - 40]) : 89 < e && e < 98 ? s = ur(r, t.colors[8 + (e - 90)]) : 99 < e && e < 108 && (s = fr(r, t.colors[8 + (e - 100)])),
1665
1665
  s;
1666
1666
  }
1667
- n(Xa, "handleDisplay");
1668
- function Sn(r) {
1667
+ n(ul, "handleDisplay");
1668
+ function Mn(r) {
1669
1669
  var e = r.slice(0);
1670
1670
  return r.length = 0, e.reverse().map(function(t) {
1671
1671
  return "</" + t + ">";
1672
1672
  }).join("");
1673
1673
  }
1674
- n(Sn, "resetStyles");
1675
- function cr(r, e) {
1674
+ n(Mn, "resetStyles");
1675
+ function dr(r, e) {
1676
1676
  for (var t = [], o = r; o <= e; o++)
1677
1677
  t.push(o);
1678
1678
  return t;
1679
1679
  }
1680
- n(cr, "range");
1681
- function Ja(r) {
1680
+ n(dr, "range");
1681
+ function fl(r) {
1682
1682
  return function(e) {
1683
1683
  return (r === null || e.category !== r) && r !== "all";
1684
1684
  };
1685
1685
  }
1686
- n(Ja, "notCategory");
1687
- function mn(r) {
1686
+ n(fl, "notCategory");
1687
+ function On(r) {
1688
1688
  r = parseInt(r, 10);
1689
1689
  var e = null;
1690
1690
  return r === 0 ? e = "all" : r === 1 ? e = "bold" : 2 < r && r < 5 ? e = "underline" : 4 < r && r < 7 ? e = "blink" : r === 8 ? e = "hid\
1691
1691
  e" : r === 9 ? e = "strike" : 29 < r && r < 38 || r === 39 || 89 < r && r < 98 ? e = "foreground-color" : (39 < r && r < 48 || r === 49 || 99 <
1692
1692
  r && r < 108) && (e = "background-color"), e;
1693
1693
  }
1694
- n(mn, "categoryForCode");
1695
- function Qa(r, e) {
1696
- return e.escapeXML ? Va.encodeXML(r) : r;
1694
+ n(On, "categoryForCode");
1695
+ function yl(r, e) {
1696
+ return e.escapeXML ? al.encodeXML(r) : r;
1697
1697
  }
1698
- n(Qa, "pushText");
1698
+ n(yl, "pushText");
1699
1699
  function ee(r, e, t) {
1700
1700
  return t || (t = ""), r.push(e), "<".concat(e).concat(t ? ' style="'.concat(t, '"') : "", ">");
1701
1701
  }
1702
1702
  n(ee, "pushTag");
1703
- function dr(r, e) {
1703
+ function pr(r, e) {
1704
1704
  return ee(r, "span", e);
1705
1705
  }
1706
- n(dr, "pushStyle");
1707
- function pr(r, e) {
1706
+ n(pr, "pushStyle");
1707
+ function ur(r, e) {
1708
1708
  return ee(r, "span", "color:" + e);
1709
1709
  }
1710
- n(pr, "pushForegroundColor");
1711
- function ur(r, e) {
1710
+ n(ur, "pushForegroundColor");
1711
+ function fr(r, e) {
1712
1712
  return ee(r, "span", "background-color:" + e);
1713
1713
  }
1714
- n(ur, "pushBackgroundColor");
1715
- function hn(r, e) {
1714
+ n(fr, "pushBackgroundColor");
1715
+ function Dn(r, e) {
1716
1716
  var t;
1717
1717
  if (r.slice(-1)[0] === e && (t = r.pop()), t)
1718
1718
  return "</" + e + ">";
1719
1719
  }
1720
- n(hn, "closeTag");
1721
- function Za(r, e, t) {
1720
+ n(Dn, "closeTag");
1721
+ function ml(r, e, t) {
1722
1722
  var o = !1, s = 3;
1723
1723
  function i() {
1724
1724
  return "";
1725
1725
  }
1726
1726
  n(i, "remove");
1727
- function a(E, R) {
1728
- return t("xterm256Foreground", R), "";
1727
+ function a(R, w) {
1728
+ return t("xterm256Foreground", w), "";
1729
1729
  }
1730
1730
  n(a, "removeXterm256Foreground");
1731
- function l(E, R) {
1732
- return t("xterm256Background", R), "";
1731
+ function l(R, w) {
1732
+ return t("xterm256Background", w), "";
1733
1733
  }
1734
1734
  n(l, "removeXterm256Background");
1735
- function c(E) {
1736
- return e.newline ? t("display", -1) : t("text", E), "";
1735
+ function c(R) {
1736
+ return e.newline ? t("display", -1) : t("text", R), "";
1737
1737
  }
1738
1738
  n(c, "newline");
1739
- function d(E, R) {
1740
- o = !0, R.trim().length === 0 && (R = "0"), R = R.trimRight(";").split(";");
1741
- var A = gn(R), F;
1739
+ function d(R, w) {
1740
+ o = !0, w.trim().length === 0 && (w = "0"), w = w.trimRight(";").split(";");
1741
+ var A = kn(w), F;
1742
1742
  try {
1743
1743
  for (A.s(); !(F = A.n()).done; ) {
1744
1744
  var j = F.value;
@@ -1752,12 +1752,12 @@ e" : r === 9 ? e = "strike" : 29 < r && r < 38 || r === 39 || 89 < r && r < 98 ?
1752
1752
  return "";
1753
1753
  }
1754
1754
  n(d, "ansiMess");
1755
- function p(E) {
1756
- return t("text", E), "";
1755
+ function p(R) {
1756
+ return t("text", R), "";
1757
1757
  }
1758
1758
  n(p, "realText");
1759
- function u(E) {
1760
- return t("rgb", E), "";
1759
+ function u(R) {
1760
+ return t("rgb", R), "";
1761
1761
  }
1762
1762
  n(u, "rgb");
1763
1763
  var y = [{
@@ -1820,80 +1820,80 @@ e" : r === 9 ? e = "strike" : 29 < r && r < 38 || r === 39 || 89 < r && r < 98 ?
1820
1820
  pattern: /^(([^\x1b\x08\r\n])+)/,
1821
1821
  sub: p
1822
1822
  }];
1823
- function g(E, R) {
1824
- R > s && o || (o = !1, r = r.replace(E.pattern, E.sub));
1823
+ function h(R, w) {
1824
+ w > s && o || (o = !1, r = r.replace(R.pattern, R.sub));
1825
1825
  }
1826
- n(g, "process");
1827
- var b = [], S = r, h = S.length;
1828
- e: for (; h > 0; ) {
1829
- for (var T = 0, m = 0, f = y.length; m < f; T = ++m) {
1830
- var x = y[T];
1831
- if (g(x, T), r.length !== h) {
1832
- h = r.length;
1826
+ n(h, "process");
1827
+ var g = [], b = r, m = b.length;
1828
+ e: for (; m > 0; ) {
1829
+ for (var T = 0, x = 0, f = y.length; x < f; T = ++x) {
1830
+ var S = y[T];
1831
+ if (h(S, T), r.length !== m) {
1832
+ m = r.length;
1833
1833
  continue e;
1834
1834
  }
1835
1835
  }
1836
- if (r.length === h)
1836
+ if (r.length === m)
1837
1837
  break;
1838
- b.push(0), h = r.length;
1838
+ g.push(0), m = r.length;
1839
1839
  }
1840
- return b;
1840
+ return g;
1841
1841
  }
1842
- n(Za, "tokenize");
1843
- function el(r, e, t) {
1844
- return e !== "text" && (r = r.filter(Ja(mn(t))), r.push({
1842
+ n(ml, "tokenize");
1843
+ function hl(r, e, t) {
1844
+ return e !== "text" && (r = r.filter(fl(On(t))), r.push({
1845
1845
  token: e,
1846
1846
  data: t,
1847
- category: mn(t)
1847
+ category: On(t)
1848
1848
  })), r;
1849
1849
  }
1850
- n(el, "updateStickyStack");
1851
- var rl = /* @__PURE__ */ function() {
1850
+ n(hl, "updateStickyStack");
1851
+ var gl = /* @__PURE__ */ function() {
1852
1852
  function r(e) {
1853
- Ga(this, r), e = e || {}, e.colors && (e.colors = Object.assign({}, fn.colors, e.colors)), this.options = Object.assign({}, fn, e), this.
1853
+ nl(this, r), e = e || {}, e.colors && (e.colors = Object.assign({}, Fn.colors, e.colors)), this.options = Object.assign({}, Fn, e), this.
1854
1854
  stack = [], this.stickyStack = [];
1855
1855
  }
1856
- return n(r, "Filter"), Ua(r, [{
1856
+ return n(r, "Filter"), sl(r, [{
1857
1857
  key: "toHtml",
1858
1858
  value: /* @__PURE__ */ n(function(t) {
1859
1859
  var o = this;
1860
1860
  t = typeof t == "string" ? [t] : t;
1861
1861
  var s = this.stack, i = this.options, a = [];
1862
1862
  return this.stickyStack.forEach(function(l) {
1863
- var c = yn(s, l.token, l.data, i);
1863
+ var c = In(s, l.token, l.data, i);
1864
1864
  c && a.push(c);
1865
- }), Za(t.join(""), i, function(l, c) {
1866
- var d = yn(s, l, c, i);
1867
- d && a.push(d), i.stream && (o.stickyStack = el(o.stickyStack, l, c));
1868
- }), s.length && a.push(Sn(s)), a.join("");
1865
+ }), ml(t.join(""), i, function(l, c) {
1866
+ var d = In(s, l, c, i);
1867
+ d && a.push(d), i.stream && (o.stickyStack = hl(o.stickyStack, l, c));
1868
+ }), s.length && a.push(Mn(s)), a.join("");
1869
1869
  }, "toHtml")
1870
1870
  }]), r;
1871
1871
  }();
1872
- Tn.exports = rl;
1872
+ Ln.exports = gl;
1873
1873
  });
1874
1874
 
1875
1875
  // src/preview-api/modules/addons/main.ts
1876
- import { global as gr } from "@storybook/global";
1876
+ import { global as br } from "@storybook/global";
1877
1877
 
1878
1878
  // src/preview-api/modules/addons/storybook-channel-mock.ts
1879
- import { Channel as qn } from "storybook/internal/channels";
1880
- function hr() {
1879
+ import { Channel as rs } from "storybook/internal/channels";
1880
+ function gr() {
1881
1881
  let r = {
1882
1882
  setHandler: /* @__PURE__ */ n(() => {
1883
1883
  }, "setHandler"),
1884
1884
  send: /* @__PURE__ */ n(() => {
1885
1885
  }, "send")
1886
1886
  };
1887
- return new qn({ transport: r });
1887
+ return new rs({ transport: r });
1888
1888
  }
1889
- n(hr, "mockChannel");
1889
+ n(gr, "mockChannel");
1890
1890
 
1891
1891
  // src/preview-api/modules/addons/main.ts
1892
- var Sr = class {
1892
+ var xr = class xr {
1893
1893
  constructor() {
1894
1894
  this.getChannel = /* @__PURE__ */ n(() => {
1895
1895
  if (!this.channel) {
1896
- let e = hr();
1896
+ let e = gr();
1897
1897
  return this.setChannel(e), e;
1898
1898
  }
1899
1899
  return this.channel;
@@ -1907,33 +1907,32 @@ var Sr = class {
1907
1907
  this.resolve = () => e(this.getChannel());
1908
1908
  });
1909
1909
  }
1910
- static {
1911
- n(this, "AddonStore");
1912
- }
1913
- }, br = "__STORYBOOK_ADDONS_PREVIEW";
1914
- function Bn() {
1915
- return gr[br] || (gr[br] = new Sr()), gr[br];
1910
+ };
1911
+ n(xr, "AddonStore");
1912
+ var Tr = xr, Sr = "__STORYBOOK_ADDONS_PREVIEW";
1913
+ function ts() {
1914
+ return br[Sr] || (br[Sr] = new Tr()), br[Sr];
1916
1915
  }
1917
- n(Bn, "getAddonsStore");
1918
- var _ = Bn();
1916
+ n(ts, "getAddonsStore");
1917
+ var L = ts();
1919
1918
 
1920
1919
  // src/preview-api/modules/addons/definePreview.ts
1921
- function zn(r) {
1920
+ function os(r) {
1922
1921
  return r;
1923
1922
  }
1924
- n(zn, "definePreview");
1923
+ n(os, "definePreview");
1925
1924
 
1926
1925
  // src/preview-api/modules/addons/hooks.ts
1927
1926
  import { logger as Ae } from "storybook/internal/client-logger";
1928
1927
  import {
1929
- FORCE_RE_RENDER as Gn,
1930
- RESET_STORY_ARGS as Un,
1931
- STORY_RENDERED as at,
1932
- UPDATE_GLOBALS as Hn,
1933
- UPDATE_STORY_ARGS as Vn
1928
+ FORCE_RE_RENDER as ns,
1929
+ RESET_STORY_ARGS as ss,
1930
+ STORY_RENDERED as Et,
1931
+ UPDATE_GLOBALS as is,
1932
+ UPDATE_STORY_ARGS as as
1934
1933
  } from "storybook/internal/core-events";
1935
1934
  import { global as ze } from "@storybook/global";
1936
- var re = class {
1935
+ var Cr = class Cr {
1937
1936
  constructor() {
1938
1937
  this.hookListsMap = void 0;
1939
1938
  this.mountedDecorators = void 0;
@@ -1951,9 +1950,6 @@ var re = class {
1951
1950
  }, "renderListener");
1952
1951
  this.init();
1953
1952
  }
1954
- static {
1955
- n(this, "HooksContext");
1956
- }
1957
1953
  init() {
1958
1954
  this.hookListsMap = /* @__PURE__ */ new WeakMap(), this.mountedDecorators = /* @__PURE__ */ new Set(), this.prevMountedDecorators = /* @__PURE__ */ new Set(),
1959
1955
  this.currentHooks = [], this.nextHookIndex = 0, this.currentPhase = "NONE", this.currentEffects = [], this.prevEffects = [], this.currentDecoratorName =
@@ -1976,13 +1972,15 @@ var re = class {
1976
1972
  }), this.prevEffects = this.currentEffects, this.currentEffects = [];
1977
1973
  }
1978
1974
  addRenderListeners() {
1979
- this.removeRenderListeners(), _.getChannel().on(at, this.renderListener);
1975
+ this.removeRenderListeners(), L.getChannel().on(Et, this.renderListener);
1980
1976
  }
1981
1977
  removeRenderListeners() {
1982
- _.getChannel().removeListener(at, this.renderListener);
1978
+ L.getChannel().removeListener(Et, this.renderListener);
1983
1979
  }
1984
1980
  };
1985
- function lt(r) {
1981
+ n(Cr, "HooksContext");
1982
+ var re = Cr;
1983
+ function At(r) {
1986
1984
  let e = /* @__PURE__ */ n((...t) => {
1987
1985
  let { hooks: o } = typeof t[0] == "function" ? t[1] : t[0], s = o.currentPhase, i = o.currentHooks, a = o.nextHookIndex, l = o.currentDecoratorName;
1988
1986
  o.currentDecoratorName = r.name, o.prevMountedDecorators.has(r) ? (o.currentPhase = "UPDATE", o.currentHooks = o.hookListsMap.get(r) || []) :
@@ -1999,39 +1997,39 @@ function lt(r) {
1999
1997
  }, "hookified");
2000
1998
  return e.originalFn = r, e;
2001
1999
  }
2002
- n(lt, "hookify");
2003
- var Tr = 0, Wn = 25, xr = /* @__PURE__ */ n((r) => (e, t) => {
2000
+ n(At, "hookify");
2001
+ var Rr = 0, ls = 25, wr = /* @__PURE__ */ n((r) => (e, t) => {
2004
2002
  let o = r(
2005
- lt(e),
2006
- t.map((s) => lt(s))
2003
+ At(e),
2004
+ t.map((s) => At(s))
2007
2005
  );
2008
2006
  return (s) => {
2009
2007
  let { hooks: i } = s;
2010
2008
  i.prevMountedDecorators ??= /* @__PURE__ */ new Set(), i.mountedDecorators = /* @__PURE__ */ new Set([e, ...t]), i.currentContext = s, i.
2011
2009
  hasUpdates = !1;
2012
2010
  let a = o(s);
2013
- for (Tr = 1; i.hasUpdates; )
2014
- if (i.hasUpdates = !1, i.currentEffects = [], a = o(s), Tr += 1, Tr > Wn)
2011
+ for (Rr = 1; i.hasUpdates; )
2012
+ if (i.hasUpdates = !1, i.currentEffects = [], a = o(s), Rr += 1, Rr > ls)
2015
2013
  throw new Error(
2016
2014
  "Too many re-renders. Storybook limits the number of renders to prevent an infinite loop."
2017
2015
  );
2018
2016
  return i.addRenderListeners(), a;
2019
2017
  };
2020
- }, "applyHooks"), $n = /* @__PURE__ */ n((r, e) => r.length === e.length && r.every((t, o) => t === e[o]), "areDepsEqual"), Rr = /* @__PURE__ */ n(
2018
+ }, "applyHooks"), cs = /* @__PURE__ */ n((r, e) => r.length === e.length && r.every((t, o) => t === e[o]), "areDepsEqual"), Er = /* @__PURE__ */ n(
2021
2019
  () => new Error("Storybook preview hooks can only be called inside decorators and story functions."), "invalidHooksError");
2022
- function ct() {
2020
+ function Ct() {
2023
2021
  return ze.STORYBOOK_HOOKS_CONTEXT || null;
2024
2022
  }
2025
- n(ct, "getHooksContextOrNull");
2026
- function wr() {
2027
- let r = ct();
2023
+ n(Ct, "getHooksContextOrNull");
2024
+ function Ar() {
2025
+ let r = Ct();
2028
2026
  if (r == null)
2029
- throw Rr();
2027
+ throw Er();
2030
2028
  return r;
2031
2029
  }
2032
- n(wr, "getHooksContextOrThrow");
2033
- function Yn(r, e, t) {
2034
- let o = wr();
2030
+ n(Ar, "getHooksContextOrThrow");
2031
+ function ds(r, e, t) {
2032
+ let o = Ar();
2035
2033
  if (o.currentPhase === "MOUNT") {
2036
2034
  t != null && !Array.isArray(t) && Ae.warn(
2037
2035
  `${r} received a final argument that is not an array (instead, received ${t}). When specified, the final argument must be an array.`
@@ -2052,13 +2050,13 @@ s type cannot change between renders.`
2052
2050
  ), t != null && s.deps != null && t.length !== s.deps.length && Ae.warn(`The final argument passed to ${r} changed size between renders.\
2053
2051
  The order and size of this array must remain constant.
2054
2052
  Previous: ${s.deps}
2055
- Incoming: ${t}`), (t == null || s.deps == null || !$n(t, s.deps)) && (e(s), s.deps = t), s;
2053
+ Incoming: ${t}`), (t == null || s.deps == null || !cs(t, s.deps)) && (e(s), s.deps = t), s;
2056
2054
  }
2057
- throw Rr();
2055
+ throw Er();
2058
2056
  }
2059
- n(Yn, "useHook");
2057
+ n(ds, "useHook");
2060
2058
  function Ge(r, e, t) {
2061
- let { memoizedState: o } = Yn(
2059
+ let { memoizedState: o } = ds(
2062
2060
  r,
2063
2061
  (s) => {
2064
2062
  s.memoizedState = e();
@@ -2068,103 +2066,103 @@ function Ge(r, e, t) {
2068
2066
  return o;
2069
2067
  }
2070
2068
  n(Ge, "useMemoLike");
2071
- function Kn(r, e) {
2069
+ function ps(r, e) {
2072
2070
  return Ge("useMemo", r, e);
2073
2071
  }
2074
- n(Kn, "useMemo");
2072
+ n(ps, "useMemo");
2075
2073
  function Ce(r, e) {
2076
2074
  return Ge("useCallback", () => r, e);
2077
2075
  }
2078
2076
  n(Ce, "useCallback");
2079
- function dt(r, e) {
2077
+ function vt(r, e) {
2080
2078
  return Ge(r, () => ({ current: e }), []);
2081
2079
  }
2082
- n(dt, "useRefLike");
2083
- function Xn(r) {
2084
- return dt("useRef", r);
2080
+ n(vt, "useRefLike");
2081
+ function us(r) {
2082
+ return vt("useRef", r);
2085
2083
  }
2086
- n(Xn, "useRef");
2087
- function Jn() {
2088
- let r = ct();
2084
+ n(us, "useRef");
2085
+ function fs() {
2086
+ let r = Ct();
2089
2087
  if (r != null && r.currentPhase !== "NONE")
2090
2088
  r.hasUpdates = !0;
2091
2089
  else
2092
2090
  try {
2093
- _.getChannel().emit(Gn);
2091
+ L.getChannel().emit(ns);
2094
2092
  } catch {
2095
2093
  Ae.warn("State updates of Storybook preview hooks work only in browser");
2096
2094
  }
2097
2095
  }
2098
- n(Jn, "triggerUpdate");
2099
- function pt(r, e) {
2100
- let t = dt(
2096
+ n(fs, "triggerUpdate");
2097
+ function Pt(r, e) {
2098
+ let t = vt(
2101
2099
  r,
2102
2100
  // @ts-expect-error S type should never be function, but there's no way to tell that to TypeScript
2103
2101
  typeof e == "function" ? e() : e
2104
2102
  ), o = /* @__PURE__ */ n((s) => {
2105
- t.current = typeof s == "function" ? s(t.current) : s, Jn();
2103
+ t.current = typeof s == "function" ? s(t.current) : s, fs();
2106
2104
  }, "setState");
2107
2105
  return [t.current, o];
2108
2106
  }
2109
- n(pt, "useStateLike");
2110
- function Qn(r) {
2111
- return pt("useState", r);
2107
+ n(Pt, "useStateLike");
2108
+ function ys(r) {
2109
+ return Pt("useState", r);
2112
2110
  }
2113
- n(Qn, "useState");
2114
- function Zn(r, e, t) {
2115
- let o = t != null ? () => t(e) : e, [s, i] = pt("useReducer", o);
2111
+ n(ys, "useState");
2112
+ function ms(r, e, t) {
2113
+ let o = t != null ? () => t(e) : e, [s, i] = Pt("useReducer", o);
2116
2114
  return [s, /* @__PURE__ */ n((l) => i((c) => r(c, l)), "dispatch")];
2117
2115
  }
2118
- n(Zn, "useReducer");
2119
- function ut(r, e) {
2120
- let t = wr(), o = Ge("useEffect", () => ({ create: r }), e);
2116
+ n(ms, "useReducer");
2117
+ function Ft(r, e) {
2118
+ let t = Ar(), o = Ge("useEffect", () => ({ create: r }), e);
2121
2119
  t.currentEffects.includes(o) || t.currentEffects.push(o);
2122
2120
  }
2123
- n(ut, "useEffect");
2124
- function es(r, e = []) {
2125
- let t = _.getChannel();
2126
- return ut(() => (Object.entries(r).forEach(([o, s]) => t.on(o, s)), () => {
2121
+ n(Ft, "useEffect");
2122
+ function hs(r, e = []) {
2123
+ let t = L.getChannel();
2124
+ return Ft(() => (Object.entries(r).forEach(([o, s]) => t.on(o, s)), () => {
2127
2125
  Object.entries(r).forEach(
2128
2126
  ([o, s]) => t.removeListener(o, s)
2129
2127
  );
2130
2128
  }), [...Object.keys(r), ...e]), Ce(t.emit.bind(t), [t]);
2131
2129
  }
2132
- n(es, "useChannel");
2130
+ n(hs, "useChannel");
2133
2131
  function Ue() {
2134
- let { currentContext: r } = wr();
2132
+ let { currentContext: r } = Ar();
2135
2133
  if (r == null)
2136
- throw Rr();
2134
+ throw Er();
2137
2135
  return r;
2138
2136
  }
2139
2137
  n(Ue, "useStoryContext");
2140
- function rs(r, e) {
2138
+ function gs(r, e) {
2141
2139
  let { parameters: t } = Ue();
2142
2140
  if (r)
2143
2141
  return t[r] ?? e;
2144
2142
  }
2145
- n(rs, "useParameter");
2146
- function ts() {
2147
- let r = _.getChannel(), { id: e, args: t } = Ue(), o = Ce(
2148
- (i) => r.emit(Vn, { storyId: e, updatedArgs: i }),
2143
+ n(gs, "useParameter");
2144
+ function bs() {
2145
+ let r = L.getChannel(), { id: e, args: t } = Ue(), o = Ce(
2146
+ (i) => r.emit(as, { storyId: e, updatedArgs: i }),
2149
2147
  [r, e]
2150
2148
  ), s = Ce(
2151
- (i) => r.emit(Un, { storyId: e, argNames: i }),
2149
+ (i) => r.emit(ss, { storyId: e, argNames: i }),
2152
2150
  [r, e]
2153
2151
  );
2154
2152
  return [t, o, s];
2155
2153
  }
2156
- n(ts, "useArgs");
2157
- function os() {
2158
- let r = _.getChannel(), { globals: e } = Ue(), t = Ce(
2159
- (o) => r.emit(Hn, { globals: o }),
2154
+ n(bs, "useArgs");
2155
+ function Ss() {
2156
+ let r = L.getChannel(), { globals: e } = Ue(), t = Ce(
2157
+ (o) => r.emit(is, { globals: o }),
2160
2158
  [r]
2161
2159
  );
2162
2160
  return [e, t];
2163
2161
  }
2164
- n(os, "useGlobals");
2162
+ n(Ss, "useGlobals");
2165
2163
 
2166
2164
  // src/preview-api/modules/addons/make-decorator.ts
2167
- var ns = /* @__PURE__ */ n(({
2165
+ var Ts = /* @__PURE__ */ n(({
2168
2166
  name: r,
2169
2167
  parameterName: e,
2170
2168
  wrapper: t,
@@ -2189,33 +2187,33 @@ var ns = /* @__PURE__ */ n(({
2189
2187
 
2190
2188
  // src/preview-api/modules/store/StoryStore.ts
2191
2189
  import {
2192
- CalledExtractOnStoreError as Us,
2193
- MissingStoryFromCsfFileError as Hs
2190
+ CalledExtractOnStoreError as si,
2191
+ MissingStoryFromCsfFileError as ii
2194
2192
  } from "storybook/internal/preview-errors";
2195
2193
 
2196
2194
  // ../node_modules/es-toolkit/dist/function/noop.mjs
2197
- function ft() {
2195
+ function It() {
2198
2196
  }
2199
- n(ft, "noop");
2197
+ n(It, "noop");
2200
2198
 
2201
2199
  // ../node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
2202
- function Er(r) {
2200
+ function vr(r) {
2203
2201
  return Object.getOwnPropertySymbols(r).filter((e) => Object.prototype.propertyIsEnumerable.call(r, e));
2204
2202
  }
2205
- n(Er, "getSymbols");
2203
+ n(vr, "getSymbols");
2206
2204
 
2207
2205
  // ../node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
2208
- function Ar(r) {
2206
+ function Pr(r) {
2209
2207
  return r == null ? r === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(r);
2210
2208
  }
2211
- n(Ar, "getTag");
2209
+ n(Pr, "getTag");
2212
2210
 
2213
2211
  // ../node_modules/es-toolkit/dist/compat/_internal/tags.mjs
2214
- var yt = "[object RegExp]", mt = "[object String]", ht = "[object Number]", gt = "[object Boolean]", Cr = "[object Arguments]", bt = "[objec\
2215
- t Symbol]", St = "[object Date]", Tt = "[object Map]", xt = "[object Set]", Rt = "[object Array]", wt = "[object Function]", Et = "[object A\
2216
- rrayBuffer]", He = "[object Object]", At = "[object Error]", Ct = "[object DataView]", vt = "[object Uint8Array]", Pt = "[object Uint8Clampe\
2217
- dArray]", Ft = "[object Uint16Array]", It = "[object Uint32Array]", Ot = "[object BigUint64Array]", Dt = "[object Int8Array]", kt = "[object\
2218
- Int16Array]", jt = "[object Int32Array]", Mt = "[object BigInt64Array]", _t = "[object Float32Array]", Lt = "[object Float64Array]";
2212
+ var Ot = "[object RegExp]", Dt = "[object String]", kt = "[object Number]", jt = "[object Boolean]", Fr = "[object Arguments]", Mt = "[objec\
2213
+ t Symbol]", Lt = "[object Date]", _t = "[object Map]", Nt = "[object Set]", qt = "[object Array]", Bt = "[object Function]", zt = "[object A\
2214
+ rrayBuffer]", He = "[object Object]", Gt = "[object Error]", Ut = "[object DataView]", Ht = "[object Uint8Array]", Vt = "[object Uint8Clampe\
2215
+ dArray]", Wt = "[object Uint16Array]", $t = "[object Uint32Array]", Yt = "[object BigUint64Array]", Kt = "[object Int8Array]", Xt = "[object\
2216
+ Int16Array]", Jt = "[object Int32Array]", Qt = "[object BigInt64Array]", Zt = "[object Float32Array]", eo = "[object Float64Array]";
2219
2217
 
2220
2218
  // ../node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
2221
2219
  function k(r) {
@@ -2239,7 +2237,7 @@ function H(r, e) {
2239
2237
  n(H, "mapValues");
2240
2238
 
2241
2239
  // ../node_modules/es-toolkit/dist/object/pickBy.mjs
2242
- function vr(r, e) {
2240
+ function Ir(r, e) {
2243
2241
  let t = {}, o = Object.keys(r);
2244
2242
  for (let s = 0; s < o.length; s++) {
2245
2243
  let i = o[s], a = r[i];
@@ -2247,19 +2245,19 @@ function vr(r, e) {
2247
2245
  }
2248
2246
  return t;
2249
2247
  }
2250
- n(vr, "pickBy");
2248
+ n(Ir, "pickBy");
2251
2249
 
2252
2250
  // ../node_modules/es-toolkit/dist/compat/util/eq.mjs
2253
- function Nt(r, e) {
2251
+ function ro(r, e) {
2254
2252
  return r === e || Number.isNaN(r) && Number.isNaN(e);
2255
2253
  }
2256
- n(Nt, "eq");
2254
+ n(ro, "eq");
2257
2255
 
2258
2256
  // ../node_modules/es-toolkit/dist/predicate/isEqualWith.mjs
2259
- function qt(r, e, t) {
2257
+ function to(r, e, t) {
2260
2258
  return ve(r, e, void 0, void 0, void 0, void 0, t);
2261
2259
  }
2262
- n(qt, "isEqualWith");
2260
+ n(to, "isEqualWith");
2263
2261
  function ve(r, e, t, o, s, i, a) {
2264
2262
  let l = a(r, e, t, o, s, i);
2265
2263
  if (l !== void 0)
@@ -2285,23 +2283,23 @@ n(ve, "isEqualWithImpl");
2285
2283
  function Pe(r, e, t, o) {
2286
2284
  if (Object.is(r, e))
2287
2285
  return !0;
2288
- let s = Ar(r), i = Ar(e);
2289
- if (s === Cr && (s = He), i === Cr && (i = He), s !== i)
2286
+ let s = Pr(r), i = Pr(e);
2287
+ if (s === Fr && (s = He), i === Fr && (i = He), s !== i)
2290
2288
  return !1;
2291
2289
  switch (s) {
2292
- case mt:
2290
+ case Dt:
2293
2291
  return r.toString() === e.toString();
2294
- case ht: {
2292
+ case kt: {
2295
2293
  let c = r.valueOf(), d = e.valueOf();
2296
- return Nt(c, d);
2294
+ return ro(c, d);
2297
2295
  }
2298
- case gt:
2299
- case St:
2300
- case bt:
2296
+ case jt:
2297
+ case Lt:
2298
+ case Mt:
2301
2299
  return Object.is(r.valueOf(), e.valueOf());
2302
- case yt:
2300
+ case Ot:
2303
2301
  return r.source === e.source && r.flags === e.flags;
2304
- case wt:
2302
+ case Bt:
2305
2303
  return r === e;
2306
2304
  }
2307
2305
  t = t ?? /* @__PURE__ */ new Map();
@@ -2311,7 +2309,7 @@ function Pe(r, e, t, o) {
2311
2309
  t.set(r, e), t.set(e, r);
2312
2310
  try {
2313
2311
  switch (s) {
2314
- case Tt: {
2312
+ case _t: {
2315
2313
  if (r.size !== e.size)
2316
2314
  return !1;
2317
2315
  for (let [c, d] of r.entries())
@@ -2319,30 +2317,30 @@ function Pe(r, e, t, o) {
2319
2317
  return !1;
2320
2318
  return !0;
2321
2319
  }
2322
- case xt: {
2320
+ case Nt: {
2323
2321
  if (r.size !== e.size)
2324
2322
  return !1;
2325
2323
  let c = Array.from(r.values()), d = Array.from(e.values());
2326
2324
  for (let p = 0; p < c.length; p++) {
2327
- let u = c[p], y = d.findIndex((g) => ve(u, g, void 0, r, e, t, o));
2325
+ let u = c[p], y = d.findIndex((h) => ve(u, h, void 0, r, e, t, o));
2328
2326
  if (y === -1)
2329
2327
  return !1;
2330
2328
  d.splice(y, 1);
2331
2329
  }
2332
2330
  return !0;
2333
2331
  }
2334
- case Rt:
2335
- case vt:
2336
- case Pt:
2337
- case Ft:
2338
- case It:
2339
- case Ot:
2340
- case Dt:
2341
- case kt:
2342
- case jt:
2343
- case Mt:
2344
- case _t:
2345
- case Lt: {
2332
+ case qt:
2333
+ case Ht:
2334
+ case Vt:
2335
+ case Wt:
2336
+ case $t:
2337
+ case Yt:
2338
+ case Kt:
2339
+ case Xt:
2340
+ case Jt:
2341
+ case Qt:
2342
+ case Zt:
2343
+ case eo: {
2346
2344
  if (typeof Buffer < "u" && Buffer.isBuffer(r) !== Buffer.isBuffer(e) || r.length !== e.length)
2347
2345
  return !1;
2348
2346
  for (let c = 0; c < r.length; c++)
@@ -2350,24 +2348,24 @@ function Pe(r, e, t, o) {
2350
2348
  return !1;
2351
2349
  return !0;
2352
2350
  }
2353
- case Et:
2351
+ case zt:
2354
2352
  return r.byteLength !== e.byteLength ? !1 : Pe(new Uint8Array(r), new Uint8Array(e), t, o);
2355
- case Ct:
2353
+ case Ut:
2356
2354
  return r.byteLength !== e.byteLength || r.byteOffset !== e.byteOffset ? !1 : Pe(new Uint8Array(r), new Uint8Array(e), t, o);
2357
- case At:
2355
+ case Gt:
2358
2356
  return r.name === e.name && r.message === e.message;
2359
2357
  case He: {
2360
2358
  if (!(Pe(r.constructor, e.constructor, t, o) || k(r) && k(e)))
2361
2359
  return !1;
2362
- let d = [...Object.keys(r), ...Er(r)], p = [...Object.keys(e), ...Er(e)];
2360
+ let d = [...Object.keys(r), ...vr(r)], p = [...Object.keys(e), ...vr(e)];
2363
2361
  if (d.length !== p.length)
2364
2362
  return !1;
2365
2363
  for (let u = 0; u < d.length; u++) {
2366
- let y = d[u], g = r[y];
2364
+ let y = d[u], h = r[y];
2367
2365
  if (!Object.hasOwn(e, y))
2368
2366
  return !1;
2369
- let b = e[y];
2370
- if (!ve(g, b, y, r, e, t, o))
2367
+ let g = e[y];
2368
+ if (!ve(h, g, y, r, e, t, o))
2371
2369
  return !1;
2372
2370
  }
2373
2371
  return !0;
@@ -2382,47 +2380,47 @@ function Pe(r, e, t, o) {
2382
2380
  n(Pe, "areObjectsEqual");
2383
2381
 
2384
2382
  // ../node_modules/es-toolkit/dist/predicate/isEqual.mjs
2385
- function Pr(r, e) {
2386
- return qt(r, e, ft);
2383
+ function Or(r, e) {
2384
+ return to(r, e, It);
2387
2385
  }
2388
- n(Pr, "isEqual");
2386
+ n(Or, "isEqual");
2389
2387
 
2390
2388
  // src/preview-api/modules/store/StoryStore.ts
2391
- var Qe = ue(Ir(), 1);
2389
+ var Ze = ue(kr(), 1);
2392
2390
 
2393
2391
  // src/preview-api/core-annotations.ts
2394
- import zt from "storybook/internal/component-testing/preview";
2395
- import Gt from "storybook/actions/preview";
2396
- import Ut from "storybook/backgrounds/preview";
2397
- import Ht from "storybook/highlight/preview";
2398
- import Vt from "storybook/measure/preview";
2399
- import Wt from "storybook/outline/preview";
2400
- import $t from "storybook/test/preview";
2401
- import Yt from "storybook/viewport/preview";
2392
+ import no from "storybook/internal/component-testing/preview";
2393
+ import so from "storybook/actions/preview";
2394
+ import io from "storybook/backgrounds/preview";
2395
+ import ao from "storybook/highlight/preview";
2396
+ import lo from "storybook/measure/preview";
2397
+ import co from "storybook/outline/preview";
2398
+ import po from "storybook/test/preview";
2399
+ import uo from "storybook/viewport/preview";
2402
2400
  function te() {
2403
2401
  return [
2404
2402
  // @ts-expect-error CJS fallback
2405
- (Vt.default ?? Vt)(),
2403
+ (lo.default ?? lo)(),
2406
2404
  // @ts-expect-error CJS fallback
2407
- (Ut.default ?? Ut)(),
2405
+ (io.default ?? io)(),
2408
2406
  // @ts-expect-error CJS fallback
2409
- (Ht.default ?? Ht)(),
2407
+ (ao.default ?? ao)(),
2410
2408
  // @ts-expect-error CJS fallback
2411
- (Wt.default ?? Wt)(),
2409
+ (co.default ?? co)(),
2412
2410
  // @ts-expect-error CJS fallback
2413
- (Yt.default ?? Yt)(),
2411
+ (uo.default ?? uo)(),
2414
2412
  // @ts-expect-error CJS fallback
2415
- (Gt.default ?? Gt)(),
2413
+ (so.default ?? so)(),
2416
2414
  // @ts-expect-error CJS fallback
2417
- (zt.default ?? zt)(),
2415
+ (no.default ?? no)(),
2418
2416
  // @ts-expect-error CJS fallback
2419
- ($t.default ?? $t)()
2417
+ (po.default ?? po)()
2420
2418
  ];
2421
2419
  }
2422
2420
  n(te, "getCoreAnnotations");
2423
2421
 
2424
2422
  // src/preview-api/modules/store/args.ts
2425
- import { once as Or } from "storybook/internal/client-logger";
2423
+ import { once as jr } from "storybook/internal/client-logger";
2426
2424
 
2427
2425
  // ../node_modules/ts-dedent/esm/index.js
2428
2426
  function P(r) {
@@ -2451,8 +2449,8 @@ function P(r) {
2451
2449
  var d = a.match(/(?:^|\n)( *)$/), p = d ? d[1] : "", u = l;
2452
2450
  typeof l == "string" && l.includes(`
2453
2451
  `) && (u = String(l).split(`
2454
- `).map(function(y, g) {
2455
- return g === 0 ? y : "" + p + y;
2452
+ `).map(function(y, h) {
2453
+ return h === 0 ? y : "" + p + y;
2456
2454
  }).join(`
2457
2455
  `)), a += u + o[c + 1];
2458
2456
  }), a;
@@ -2460,7 +2458,7 @@ function P(r) {
2460
2458
  n(P, "dedent");
2461
2459
 
2462
2460
  // src/preview-api/modules/store/args.ts
2463
- var fe = Symbol("incompatible"), Dr = /* @__PURE__ */ n((r, e) => {
2461
+ var fe = Symbol("incompatible"), Mr = /* @__PURE__ */ n((r, e) => {
2464
2462
  let t = e.type;
2465
2463
  if (r == null || !t || e.mapping)
2466
2464
  return r;
@@ -2475,21 +2473,21 @@ var fe = Symbol("incompatible"), Dr = /* @__PURE__ */ n((r, e) => {
2475
2473
  return String(r) === "true";
2476
2474
  case "array":
2477
2475
  return !t.value || !Array.isArray(r) ? fe : r.reduce((o, s, i) => {
2478
- let a = Dr(s, { type: t.value });
2476
+ let a = Mr(s, { type: t.value });
2479
2477
  return a !== fe && (o[i] = a), o;
2480
2478
  }, new Array(r.length));
2481
2479
  case "object":
2482
2480
  return typeof r == "string" || typeof r == "number" ? r : !t.value || typeof r != "object" ? fe : Object.entries(r).reduce((o, [s, i]) => {
2483
- let a = Dr(i, { type: t.value[s] });
2481
+ let a = Mr(i, { type: t.value[s] });
2484
2482
  return a === fe ? o : Object.assign(o, { [s]: a });
2485
2483
  }, {});
2486
2484
  default:
2487
2485
  return fe;
2488
2486
  }
2489
- }, "map"), Kt = /* @__PURE__ */ n((r, e) => Object.entries(r).reduce((t, [o, s]) => {
2487
+ }, "map"), fo = /* @__PURE__ */ n((r, e) => Object.entries(r).reduce((t, [o, s]) => {
2490
2488
  if (!e[o])
2491
2489
  return t;
2492
- let i = Dr(s, e[o]);
2490
+ let i = Mr(s, e[o]);
2493
2491
  return i === fe ? t : Object.assign(t, { [o]: i });
2494
2492
  }, {}), "mapArgsToTypes"), Fe = /* @__PURE__ */ n((r, e) => Array.isArray(r) && Array.isArray(e) ? e.reduce(
2495
2493
  (t, o, s) => (t[s] = Fe(r[s], e[s]), t),
@@ -2501,20 +2499,20 @@ var fe = Symbol("incompatible"), Dr = /* @__PURE__ */ n((r, e) => {
2501
2499
  } else
2502
2500
  t[o] = r[o];
2503
2501
  return t;
2504
- }, {}), "combineArgs"), Xt = /* @__PURE__ */ n((r, e) => Object.entries(e).reduce((t, [o, { options: s }]) => {
2502
+ }, {}), "combineArgs"), yo = /* @__PURE__ */ n((r, e) => Object.entries(e).reduce((t, [o, { options: s }]) => {
2505
2503
  function i() {
2506
2504
  return o in r && (t[o] = r[o]), t;
2507
2505
  }
2508
2506
  if (n(i, "allowArg"), !s)
2509
2507
  return i();
2510
2508
  if (!Array.isArray(s))
2511
- return Or.error(P`
2509
+ return jr.error(P`
2512
2510
  Invalid argType: '${o}.options' should be an array.
2513
2511
 
2514
2512
  More info: https://storybook.js.org/docs/api/arg-types
2515
2513
  `), i();
2516
2514
  if (s.some((u) => u && ["object", "function"].includes(typeof u)))
2517
- return Or.error(P`
2515
+ return jr.error(P`
2518
2516
  Invalid argType: '${o}.options' should only contain primitives. Use a 'mapping' for complex values.
2519
2517
 
2520
2518
  More info: https://storybook.js.org/docs/writing-stories/args#mapping-to-complex-arg-values
@@ -2523,11 +2521,11 @@ var fe = Symbol("incompatible"), Dr = /* @__PURE__ */ n((r, e) => {
2523
2521
  if (r[o] === void 0 || s.includes(r[o]) || c)
2524
2522
  return i();
2525
2523
  let d = a ? `${o}[${l}]` : o, p = s.map((u) => typeof u == "string" ? `'${u}'` : String(u)).join(", ");
2526
- return Or.warn(`Received illegal value for '${d}'. Supported options: ${p}`), t;
2524
+ return jr.warn(`Received illegal value for '${d}'. Supported options: ${p}`), t;
2527
2525
  }, {}), "validateOptions"), oe = Symbol("Deeply equal"), ye = /* @__PURE__ */ n((r, e) => {
2528
2526
  if (typeof r != typeof e)
2529
2527
  return e;
2530
- if (Pr(r, e))
2528
+ if (Or(r, e))
2531
2529
  return oe;
2532
2530
  if (Array.isArray(r) && Array.isArray(e)) {
2533
2531
  let t = e.reduce((o, s, i) => {
@@ -2540,32 +2538,29 @@ var fe = Symbol("incompatible"), Dr = /* @__PURE__ */ n((r, e) => {
2540
2538
  let s = ye(r?.[o], e?.[o]);
2541
2539
  return s === oe ? t : Object.assign(t, { [o]: s });
2542
2540
  }, {}) : e;
2543
- }, "deepDiff"), kr = "UNTARGETED";
2544
- function Jt({
2541
+ }, "deepDiff"), Lr = "UNTARGETED";
2542
+ function mo({
2545
2543
  args: r,
2546
2544
  argTypes: e
2547
2545
  }) {
2548
2546
  let t = {};
2549
2547
  return Object.entries(r).forEach(([o, s]) => {
2550
- let { target: i = kr } = e[o] || {};
2548
+ let { target: i = Lr } = e[o] || {};
2551
2549
  t[i] = t[i] || {}, t[i][o] = s;
2552
2550
  }), t;
2553
2551
  }
2554
- n(Jt, "groupArgsByTarget");
2552
+ n(mo, "groupArgsByTarget");
2555
2553
 
2556
2554
  // src/preview-api/modules/store/ArgsStore.ts
2557
- function ss(r) {
2555
+ function xs(r) {
2558
2556
  return Object.keys(r).forEach((e) => r[e] === void 0 && delete r[e]), r;
2559
2557
  }
2560
- n(ss, "deleteUndefined");
2561
- var Ve = class {
2558
+ n(xs, "deleteUndefined");
2559
+ var _r = class _r {
2562
2560
  constructor() {
2563
2561
  this.initialArgsByStoryId = {};
2564
2562
  this.argsByStoryId = {};
2565
2563
  }
2566
- static {
2567
- n(this, "ArgsStore");
2568
- }
2569
2564
  get(e) {
2570
2565
  if (!(e in this.argsByStoryId))
2571
2566
  throw new Error(`No args known for ${e} -- has it been rendered yet?`);
@@ -2580,35 +2575,34 @@ var Ve = class {
2580
2575
  }
2581
2576
  }
2582
2577
  updateFromDelta(e, t) {
2583
- let o = Xt(t, e.argTypes);
2578
+ let o = yo(t, e.argTypes);
2584
2579
  this.argsByStoryId[e.id] = Fe(this.argsByStoryId[e.id], o);
2585
2580
  }
2586
2581
  updateFromPersisted(e, t) {
2587
- let o = Kt(t, e.argTypes);
2582
+ let o = fo(t, e.argTypes);
2588
2583
  return this.updateFromDelta(e, o);
2589
2584
  }
2590
2585
  update(e, t) {
2591
2586
  if (!(e in this.argsByStoryId))
2592
2587
  throw new Error(`No args known for ${e} -- has it been rendered yet?`);
2593
- this.argsByStoryId[e] = ss({
2588
+ this.argsByStoryId[e] = xs({
2594
2589
  ...this.argsByStoryId[e],
2595
2590
  ...t
2596
2591
  });
2597
2592
  }
2598
2593
  };
2594
+ n(_r, "ArgsStore");
2595
+ var Ve = _r;
2599
2596
 
2600
2597
  // src/preview-api/modules/store/GlobalsStore.ts
2601
- import { logger as is } from "storybook/internal/client-logger";
2598
+ import { logger as Rs } from "storybook/internal/client-logger";
2602
2599
 
2603
2600
  // src/preview-api/modules/store/csf/getValuesFromArgTypes.ts
2604
- var Qt = /* @__PURE__ */ n((r = {}) => Object.entries(r).reduce((e, [t, { defaultValue: o }]) => (typeof o < "u" && (e[t] = o), e), {}), "ge\
2601
+ var We = /* @__PURE__ */ n((r = {}) => Object.entries(r).reduce((e, [t, { defaultValue: o }]) => (typeof o < "u" && (e[t] = o), e), {}), "ge\
2605
2602
  tValuesFromArgTypes");
2606
2603
 
2607
2604
  // src/preview-api/modules/store/GlobalsStore.ts
2608
- var We = class {
2609
- static {
2610
- n(this, "GlobalsStore");
2611
- }
2605
+ var Nr = class Nr {
2612
2606
  constructor({
2613
2607
  globals: e = {},
2614
2608
  globalTypes: t = {}
@@ -2618,11 +2612,11 @@ var We = class {
2618
2612
  set({ globals: e = {}, globalTypes: t = {} }) {
2619
2613
  let o = this.initialGlobals && ye(this.initialGlobals, this.globals);
2620
2614
  this.allowedGlobalNames = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)]);
2621
- let s = Qt(t);
2615
+ let s = We(t);
2622
2616
  this.initialGlobals = { ...s, ...e }, this.globals = this.initialGlobals, o && o !== oe && this.updateFromPersisted(o);
2623
2617
  }
2624
2618
  filterAllowedGlobals(e) {
2625
- return Object.entries(e).reduce((t, [o, s]) => (this.allowedGlobalNames.has(o) ? t[o] = s : is.warn(
2619
+ return Object.entries(e).reduce((t, [o, s]) => (this.allowedGlobalNames.has(o) ? t[o] = s : Rs.warn(
2626
2620
  `Attempted to set a global (${o}) that is not defined in initial globals or globalTypes`
2627
2621
  ), t), {});
2628
2622
  }
@@ -2637,19 +2631,18 @@ var We = class {
2637
2631
  this.globals = { ...this.globals, ...this.filterAllowedGlobals(e) };
2638
2632
  }
2639
2633
  };
2634
+ n(Nr, "GlobalsStore");
2635
+ var $e = Nr;
2640
2636
 
2641
2637
  // src/preview-api/modules/store/StoryIndexStore.ts
2642
- var Zt = ue(Ir(), 1);
2643
- import { MissingStoryAfterHmrError as as } from "storybook/internal/preview-errors";
2644
- var ls = (0, Zt.default)(1)(
2638
+ var ho = ue(kr(), 1);
2639
+ import { MissingStoryAfterHmrError as ws } from "storybook/internal/preview-errors";
2640
+ var Es = (0, ho.default)(1)(
2645
2641
  (r) => Object.values(r).reduce(
2646
2642
  (e, t) => (e[t.importPath] = e[t.importPath] || t, e),
2647
2643
  {}
2648
2644
  )
2649
- ), $e = class {
2650
- static {
2651
- n(this, "StoryIndexStore");
2652
- }
2645
+ ), qr = class qr {
2653
2646
  constructor({ entries: e } = { v: 5, entries: {} }) {
2654
2647
  this.entries = e;
2655
2648
  }
@@ -2665,33 +2658,35 @@ var ls = (0, Zt.default)(1)(
2665
2658
  storyIdToEntry(e) {
2666
2659
  let t = this.entries[e];
2667
2660
  if (!t)
2668
- throw new as({ storyId: e });
2661
+ throw new ws({ storyId: e });
2669
2662
  return t;
2670
2663
  }
2671
2664
  importPathToEntry(e) {
2672
- return ls(this.entries)[e];
2665
+ return Es(this.entries)[e];
2673
2666
  }
2674
2667
  };
2668
+ n(qr, "StoryIndexStore");
2669
+ var Ye = qr;
2675
2670
 
2676
2671
  // src/preview-api/modules/store/csf/normalizeInputTypes.ts
2677
- var cs = /* @__PURE__ */ n((r) => typeof r == "string" ? { name: r } : r, "normalizeType"), ds = /* @__PURE__ */ n((r) => typeof r == "strin\
2678
- g" ? { type: r } : r, "normalizeControl"), ps = /* @__PURE__ */ n((r, e) => {
2672
+ var As = /* @__PURE__ */ n((r) => typeof r == "string" ? { name: r } : r, "normalizeType"), Cs = /* @__PURE__ */ n((r) => typeof r == "strin\
2673
+ g" ? { type: r } : r, "normalizeControl"), vs = /* @__PURE__ */ n((r, e) => {
2679
2674
  let { type: t, control: o, ...s } = r, i = {
2680
2675
  name: e,
2681
2676
  ...s
2682
2677
  };
2683
- return t && (i.type = cs(t)), o ? i.control = ds(o) : o === !1 && (i.control = { disable: !0 }), i;
2684
- }, "normalizeInputType"), ne = /* @__PURE__ */ n((r) => H(r, ps), "normalizeInputTypes");
2678
+ return t && (i.type = As(t)), o ? i.control = Cs(o) : o === !1 && (i.control = { disable: !0 }), i;
2679
+ }, "normalizeInputType"), ne = /* @__PURE__ */ n((r) => H(r, vs), "normalizeInputTypes");
2685
2680
 
2686
2681
  // src/preview-api/modules/store/csf/normalizeStory.ts
2687
- import { deprecate as us, logger as fs } from "storybook/internal/client-logger";
2688
- import { storyNameFromExport as ys, toId as ms } from "storybook/internal/csf";
2682
+ import { deprecate as Ps, logger as Fs } from "storybook/internal/client-logger";
2683
+ import { storyNameFromExport as Is, toId as Os } from "storybook/internal/csf";
2689
2684
 
2690
2685
  // src/preview-api/modules/store/csf/normalizeArrays.ts
2691
2686
  var v = /* @__PURE__ */ n((r) => Array.isArray(r) ? r : r ? [r] : [], "normalizeArrays");
2692
2687
 
2693
2688
  // src/preview-api/modules/store/csf/normalizeStory.ts
2694
- var hs = P`
2689
+ var Ds = P`
2695
2690
  CSF .story annotations deprecated; annotate story functions directly:
2696
2691
  - StoryFn.story.name => StoryFn.storyName
2697
2692
  - StoryFn.story.(parameters|decorators) => StoryFn.(parameters|decorators)
@@ -2699,18 +2694,18 @@ See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-
2699
2694
  `;
2700
2695
  function me(r, e, t) {
2701
2696
  let o = e, s = typeof e == "function" ? e : null, { story: i } = o;
2702
- i && (fs.debug("deprecated story", i), us(hs));
2703
- let a = ys(r), l = typeof o != "function" && o.name || o.storyName || i?.name || a, c = [
2697
+ i && (Fs.debug("deprecated story", i), Ps(Ds));
2698
+ let a = Is(r), l = typeof o != "function" && o.name || o.storyName || i?.name || a, c = [
2704
2699
  ...v(o.decorators),
2705
2700
  ...v(i?.decorators)
2706
2701
  ], d = { ...i?.parameters, ...o.parameters }, p = { ...i?.args, ...o.args }, u = { ...i?.argTypes, ...o.argTypes }, y = [...v(o.loaders), ...v(
2707
- i?.loaders)], g = [
2702
+ i?.loaders)], h = [
2708
2703
  ...v(o.beforeEach),
2709
2704
  ...v(i?.beforeEach)
2710
- ], b = [
2705
+ ], g = [
2711
2706
  ...v(o.experimental_afterEach),
2712
2707
  ...v(i?.experimental_afterEach)
2713
- ], { render: S, play: h, tags: T = [], globals: m = {} } = o, f = d.__id || ms(t.id, a);
2708
+ ], { render: b, play: m, tags: T = [], globals: x = {} } = o, f = d.__id || Os(t.id, a);
2714
2709
  return {
2715
2710
  moduleExport: e,
2716
2711
  id: f,
@@ -2721,26 +2716,26 @@ function me(r, e, t) {
2721
2716
  args: p,
2722
2717
  argTypes: ne(u),
2723
2718
  loaders: y,
2724
- beforeEach: g,
2725
- experimental_afterEach: b,
2726
- globals: m,
2727
- ...S && { render: S },
2719
+ beforeEach: h,
2720
+ experimental_afterEach: g,
2721
+ globals: x,
2722
+ ...b && { render: b },
2728
2723
  ...s && { userStoryFn: s },
2729
- ...h && { play: h }
2724
+ ...m && { play: m }
2730
2725
  };
2731
2726
  }
2732
2727
  n(me, "normalizeStory");
2733
2728
 
2734
2729
  // src/preview-api/modules/store/csf/processCSFFile.ts
2735
- import { logger as ro } from "storybook/internal/client-logger";
2736
- import { isExportStory as eo, isStory as bs } from "storybook/internal/csf";
2730
+ import { logger as bo } from "storybook/internal/client-logger";
2731
+ import { isExportStory as go, isStory as js } from "storybook/internal/csf";
2737
2732
 
2738
2733
  // src/preview-api/modules/store/csf/normalizeComponentAnnotations.ts
2739
- import { sanitize as gs } from "storybook/internal/csf";
2734
+ import { sanitize as ks } from "storybook/internal/csf";
2740
2735
  function Ie(r, e = r.title, t) {
2741
2736
  let { id: o, argTypes: s } = r;
2742
2737
  return {
2743
- id: gs(o || e),
2738
+ id: ks(o || e),
2744
2739
  ...r,
2745
2740
  title: e,
2746
2741
  ...s && { argTypes: ne(s) },
@@ -2753,31 +2748,31 @@ function Ie(r, e = r.title, t) {
2753
2748
  n(Ie, "normalizeComponentAnnotations");
2754
2749
 
2755
2750
  // src/preview-api/modules/store/csf/processCSFFile.ts
2756
- var Ss = /* @__PURE__ */ n((r) => {
2751
+ var Ms = /* @__PURE__ */ n((r) => {
2757
2752
  let { globals: e, globalTypes: t } = r;
2758
- (e || t) && ro.error(
2753
+ (e || t) && bo.error(
2759
2754
  "Global args/argTypes can only be set globally",
2760
2755
  JSON.stringify({
2761
2756
  globals: e,
2762
2757
  globalTypes: t
2763
2758
  })
2764
2759
  );
2765
- }, "checkGlobals"), Ts = /* @__PURE__ */ n((r) => {
2760
+ }, "checkGlobals"), Ls = /* @__PURE__ */ n((r) => {
2766
2761
  let { options: e } = r;
2767
- e?.storySort && ro.error("The storySort option parameter can only be set globally");
2768
- }, "checkStorySort"), Ye = /* @__PURE__ */ n((r) => {
2769
- r && (Ss(r), Ts(r));
2762
+ e?.storySort && bo.error("The storySort option parameter can only be set globally");
2763
+ }, "checkStorySort"), Ke = /* @__PURE__ */ n((r) => {
2764
+ r && (Ms(r), Ls(r));
2770
2765
  }, "checkDisallowedParameters");
2771
- function to(r, e, t) {
2766
+ function So(r, e, t) {
2772
2767
  let { default: o, __namedExportsOrder: s, ...i } = r, a = Object.values(i)[0];
2773
- if (bs(a)) {
2768
+ if (js(a)) {
2774
2769
  let d = Ie(a.meta.input, t, e);
2775
- Ye(d.parameters);
2770
+ Ke(d.parameters);
2776
2771
  let p = { meta: d, stories: {}, moduleExports: r };
2777
2772
  return Object.keys(i).forEach((u) => {
2778
- if (eo(u, d)) {
2773
+ if (go(u, d)) {
2779
2774
  let y = me(u, i[u].input, d);
2780
- Ye(y.parameters), p.stories[y.id] = y;
2775
+ Ke(y.parameters), p.stories[y.id] = y;
2781
2776
  }
2782
2777
  }), p.projectAnnotations = a.meta.preview.composed, p;
2783
2778
  }
@@ -2786,40 +2781,40 @@ function to(r, e, t) {
2786
2781
  t,
2787
2782
  e
2788
2783
  );
2789
- Ye(l.parameters);
2784
+ Ke(l.parameters);
2790
2785
  let c = { meta: l, stories: {}, moduleExports: r };
2791
2786
  return Object.keys(i).forEach((d) => {
2792
- if (eo(d, l)) {
2787
+ if (go(d, l)) {
2793
2788
  let p = me(d, i[d], l);
2794
- Ye(p.parameters), c.stories[p.id] = p;
2789
+ Ke(p.parameters), c.stories[p.id] = p;
2795
2790
  }
2796
2791
  }), c;
2797
2792
  }
2798
- n(to, "processCSFFile");
2793
+ n(So, "processCSFFile");
2799
2794
 
2800
2795
  // src/preview-api/modules/store/csf/prepareStory.ts
2801
- import { combineTags as Rs, includeConditionalArg as ws } from "storybook/internal/csf";
2802
- import { NoRenderFunctionError as Es } from "storybook/internal/preview-errors";
2803
- import { global as As } from "@storybook/global";
2804
- import { global as Cs } from "@storybook/global";
2796
+ import { combineTags as Ns, includeConditionalArg as qs } from "storybook/internal/csf";
2797
+ import { NoRenderFunctionError as Bs } from "storybook/internal/preview-errors";
2798
+ import { global as zs } from "@storybook/global";
2799
+ import { global as Gs } from "@storybook/global";
2805
2800
 
2806
2801
  // src/preview-api/modules/preview-web/render/mount-utils.ts
2807
- function no(r) {
2808
- return r != null && xs(r).includes("mount");
2802
+ function xo(r) {
2803
+ return r != null && _s(r).includes("mount");
2809
2804
  }
2810
- n(no, "mountDestructured");
2811
- function xs(r) {
2805
+ n(xo, "mountDestructured");
2806
+ function _s(r) {
2812
2807
  let e = r.toString().match(/[^(]*\(([^)]*)/);
2813
2808
  if (!e)
2814
2809
  return [];
2815
- let t = oo(e[1]);
2810
+ let t = To(e[1]);
2816
2811
  if (!t.length)
2817
2812
  return [];
2818
2813
  let o = t[0];
2819
- return o.startsWith("{") && o.endsWith("}") ? oo(o.slice(1, -1).replace(/\s/g, "")).map((i) => i.replace(/:.*|=.*/g, "")) : [];
2814
+ return o.startsWith("{") && o.endsWith("}") ? To(o.slice(1, -1).replace(/\s/g, "")).map((i) => i.replace(/:.*|=.*/g, "")) : [];
2820
2815
  }
2821
- n(xs, "getUsedProps");
2822
- function oo(r) {
2816
+ n(_s, "getUsedProps");
2817
+ function To(r) {
2823
2818
  let e = [], t = [], o = 0;
2824
2819
  for (let i = 0; i < r.length; i++)
2825
2820
  if (r[i] === "{" || r[i] === "[")
@@ -2833,15 +2828,15 @@ function oo(r) {
2833
2828
  let s = r.substring(o).trim();
2834
2829
  return s && e.push(s), e;
2835
2830
  }
2836
- n(oo, "splitByComma");
2831
+ n(To, "splitByComma");
2837
2832
 
2838
2833
  // src/preview-api/modules/store/decorators.ts
2839
- function so(r, e, t) {
2834
+ function Ro(r, e, t) {
2840
2835
  let o = t(r);
2841
2836
  return (s) => e(o, s);
2842
2837
  }
2843
- n(so, "decorateStory");
2844
- function io({
2838
+ n(Ro, "decorateStory");
2839
+ function wo({
2845
2840
  componentId: r,
2846
2841
  title: e,
2847
2842
  kind: t,
@@ -2855,89 +2850,89 @@ function io({
2855
2850
  } = {}) {
2856
2851
  return d;
2857
2852
  }
2858
- n(io, "sanitizeStoryContextUpdate");
2859
- function jr(r, e) {
2853
+ n(wo, "sanitizeStoryContextUpdate");
2854
+ function Br(r, e) {
2860
2855
  let t = {}, o = /* @__PURE__ */ n((i) => (a) => {
2861
2856
  if (!t.value)
2862
2857
  throw new Error("Decorated function called without init");
2863
2858
  return t.value = {
2864
2859
  ...t.value,
2865
- ...io(a)
2860
+ ...wo(a)
2866
2861
  }, i(t.value);
2867
2862
  }, "bindWithContext"), s = e.reduce(
2868
- (i, a) => so(i, a, o),
2863
+ (i, a) => Ro(i, a, o),
2869
2864
  r
2870
2865
  );
2871
2866
  return (i) => (t.value = i, s(i));
2872
2867
  }
2873
- n(jr, "defaultDecorateStory");
2868
+ n(Br, "defaultDecorateStory");
2874
2869
 
2875
2870
  // src/preview-api/modules/store/parameters.ts
2876
- var L = /* @__PURE__ */ n((...r) => {
2871
+ var _ = /* @__PURE__ */ n((...r) => {
2877
2872
  let e = {}, t = r.filter(Boolean), o = t.reduce((s, i) => (Object.entries(i).forEach(([a, l]) => {
2878
2873
  let c = s[a];
2879
2874
  Array.isArray(l) || typeof c > "u" ? s[a] = l : k(l) && k(c) ? e[a] = !0 : typeof l < "u" && (s[a] = l);
2880
2875
  }), s), {});
2881
2876
  return Object.keys(e).forEach((s) => {
2882
2877
  let i = t.filter(Boolean).map((a) => a[s]).filter((a) => typeof a < "u");
2883
- i.every((a) => k(a)) ? o[s] = L(...i) : o[s] = i[i.length - 1];
2878
+ i.every((a) => k(a)) ? o[s] = _(...i) : o[s] = i[i.length - 1];
2884
2879
  }), o;
2885
2880
  }, "combineParameters");
2886
2881
 
2887
2882
  // src/preview-api/modules/store/csf/prepareStory.ts
2888
2883
  function Oe(r, e, t) {
2889
- let { moduleExport: o, id: s, name: i } = r || {}, a = ao(
2884
+ let { moduleExport: o, id: s, name: i } = r || {}, a = Eo(
2890
2885
  r,
2891
2886
  e,
2892
2887
  t
2893
- ), l = /* @__PURE__ */ n(async (R) => {
2888
+ ), l = /* @__PURE__ */ n(async (w) => {
2894
2889
  let A = {};
2895
2890
  for (let F of [
2896
2891
  v(t.loaders),
2897
2892
  v(e.loaders),
2898
2893
  v(r.loaders)
2899
2894
  ]) {
2900
- if (R.abortSignal.aborted)
2895
+ if (w.abortSignal.aborted)
2901
2896
  return A;
2902
- let j = await Promise.all(F.map((N) => N(R)));
2897
+ let j = await Promise.all(F.map((N) => N(w)));
2903
2898
  Object.assign(A, ...j);
2904
2899
  }
2905
2900
  return A;
2906
- }, "applyLoaders"), c = /* @__PURE__ */ n(async (R) => {
2901
+ }, "applyLoaders"), c = /* @__PURE__ */ n(async (w) => {
2907
2902
  let A = new Array();
2908
2903
  for (let F of [
2909
2904
  ...v(t.beforeEach),
2910
2905
  ...v(e.beforeEach),
2911
2906
  ...v(r.beforeEach)
2912
2907
  ]) {
2913
- if (R.abortSignal.aborted)
2908
+ if (w.abortSignal.aborted)
2914
2909
  return A;
2915
- let j = await F(R);
2910
+ let j = await F(w);
2916
2911
  j && A.push(j);
2917
2912
  }
2918
2913
  return A;
2919
- }, "applyBeforeEach"), d = /* @__PURE__ */ n(async (R) => {
2914
+ }, "applyBeforeEach"), d = /* @__PURE__ */ n(async (w) => {
2920
2915
  let A = [
2921
2916
  ...v(t.experimental_afterEach),
2922
2917
  ...v(e.experimental_afterEach),
2923
2918
  ...v(r.experimental_afterEach)
2924
2919
  ].reverse();
2925
2920
  for (let F of A) {
2926
- if (R.abortSignal.aborted)
2921
+ if (w.abortSignal.aborted)
2927
2922
  return;
2928
- await F(R);
2923
+ await F(w);
2929
2924
  }
2930
- }, "applyAfterEach"), p = /* @__PURE__ */ n((R) => R.originalStoryFn(R.args, R), "undecoratedStoryFn"), { applyDecorators: u = jr, runStep: y } = t,
2931
- g = [
2925
+ }, "applyAfterEach"), p = /* @__PURE__ */ n((w) => w.originalStoryFn(w.args, w), "undecoratedStoryFn"), { applyDecorators: u = Br, runStep: y } = t,
2926
+ h = [
2932
2927
  ...v(r?.decorators),
2933
2928
  ...v(e?.decorators),
2934
2929
  ...v(t?.decorators)
2935
- ], b = r?.userStoryFn || r?.render || e.render || t.render, S = xr(u)(p, g), h = /* @__PURE__ */ n((R) => S(R), "unboundStoryFn"), T = r?.
2936
- play ?? e?.play, m = no(T);
2937
- if (!b && !m)
2938
- throw new Es({ id: s });
2939
- let f = /* @__PURE__ */ n((R) => async () => (await R.renderToCanvas(), R.canvas), "defaultMount"), x = r.mount ?? e.mount ?? t.mount ?? f,
2940
- E = t.testingLibraryRender;
2930
+ ], g = r?.userStoryFn || r?.render || e.render || t.render, b = wr(u)(p, h), m = /* @__PURE__ */ n((w) => b(w), "unboundStoryFn"), T = r?.
2931
+ play ?? e?.play, x = xo(T);
2932
+ if (!g && !x)
2933
+ throw new Bs({ id: s });
2934
+ let f = /* @__PURE__ */ n((w) => async () => (await w.renderToCanvas(), w.canvas), "defaultMount"), S = r.mount ?? e.mount ?? t.mount ?? f,
2935
+ R = t.testingLibraryRender;
2941
2936
  return {
2942
2937
  storyGlobals: {},
2943
2938
  ...a,
@@ -2945,40 +2940,40 @@ function Oe(r, e, t) {
2945
2940
  id: s,
2946
2941
  name: i,
2947
2942
  story: i,
2948
- originalStoryFn: b,
2943
+ originalStoryFn: g,
2949
2944
  undecoratedStoryFn: p,
2950
- unboundStoryFn: h,
2945
+ unboundStoryFn: m,
2951
2946
  applyLoaders: l,
2952
2947
  applyBeforeEach: c,
2953
2948
  applyAfterEach: d,
2954
2949
  playFunction: T,
2955
2950
  runStep: y,
2956
- mount: x,
2957
- testingLibraryRender: E,
2951
+ mount: S,
2952
+ testingLibraryRender: R,
2958
2953
  renderToCanvas: t.renderToCanvas,
2959
- usesMount: m
2954
+ usesMount: x
2960
2955
  };
2961
2956
  }
2962
2957
  n(Oe, "prepareStory");
2963
- function Mr(r, e, t) {
2958
+ function zr(r, e, t) {
2964
2959
  return {
2965
- ...ao(void 0, r, e),
2960
+ ...Eo(void 0, r, e),
2966
2961
  moduleExport: t
2967
2962
  };
2968
2963
  }
2969
- n(Mr, "prepareMeta");
2970
- function ao(r, e, t) {
2971
- let o = ["dev", "test"], s = Cs.DOCS_OPTIONS?.autodocs === !0 ? ["autodocs"] : [], i = Rs(
2964
+ n(zr, "prepareMeta");
2965
+ function Eo(r, e, t) {
2966
+ let o = ["dev", "test"], s = Gs.DOCS_OPTIONS?.autodocs === !0 ? ["autodocs"] : [], i = Ns(
2972
2967
  ...o,
2973
2968
  ...s,
2974
2969
  ...t.tags ?? [],
2975
2970
  ...e.tags ?? [],
2976
2971
  ...r?.tags ?? []
2977
- ), a = L(
2972
+ ), a = _(
2978
2973
  t.parameters,
2979
2974
  e.parameters,
2980
2975
  r?.parameters
2981
- ), { argTypesEnhancers: l = [], argsEnhancers: c = [] } = t, d = L(
2976
+ ), { argTypesEnhancers: l = [], argsEnhancers: c = [] } = t, d = _(
2982
2977
  t.argTypes,
2983
2978
  e.argTypes,
2984
2979
  r?.argTypes
@@ -3013,37 +3008,37 @@ function ao(r, e, t) {
3013
3008
  storyGlobals: u
3014
3009
  };
3015
3010
  y.argTypes = l.reduce(
3016
- (T, m) => m({ ...y, argTypes: T }),
3011
+ (T, x) => x({ ...y, argTypes: T }),
3017
3012
  y.argTypes
3018
3013
  );
3019
- let g = { ...p };
3014
+ let h = { ...p };
3020
3015
  y.initialArgs = [...c].reduce(
3021
- (T, m) => ({
3016
+ (T, x) => ({
3022
3017
  ...T,
3023
- ...m({
3018
+ ...x({
3024
3019
  ...y,
3025
3020
  initialArgs: T
3026
3021
  })
3027
3022
  }),
3028
- g
3023
+ h
3029
3024
  );
3030
- let { name: b, story: S, ...h } = y;
3031
- return h;
3025
+ let { name: g, story: b, ...m } = y;
3026
+ return m;
3032
3027
  }
3033
- n(ao, "preparePartialAnnotations");
3034
- function Ke(r) {
3028
+ n(Eo, "preparePartialAnnotations");
3029
+ function Xe(r) {
3035
3030
  let { args: e } = r, t = {
3036
3031
  ...r,
3037
3032
  allArgs: void 0,
3038
3033
  argsByTarget: void 0
3039
3034
  };
3040
- if (As.FEATURES?.argTypeTargetsV7) {
3041
- let i = Jt(r);
3035
+ if (zs.FEATURES?.argTypeTargetsV7) {
3036
+ let i = mo(r);
3042
3037
  t = {
3043
3038
  ...r,
3044
3039
  allArgs: r.args,
3045
3040
  argsByTarget: i,
3046
- args: i[kr] || {}
3041
+ args: i[Lr] || {}
3047
3042
  };
3048
3043
  }
3049
3044
  let o = Object.entries(t.args).reduce((i, [a, l]) => {
@@ -3056,15 +3051,15 @@ function Ke(r) {
3056
3051
  return i[a] = Array.isArray(l) ? l.map(c) : c(l), i;
3057
3052
  }, {}), s = Object.entries(o).reduce((i, [a, l]) => {
3058
3053
  let c = t.argTypes[a] || {};
3059
- return ws(c, o, t.globals) && (i[a] = l), i;
3054
+ return qs(c, o, t.globals) && (i[a] = l), i;
3060
3055
  }, {});
3061
3056
  return { ...t, unmappedArgs: e, args: s };
3062
3057
  }
3063
- n(Ke, "prepareContext");
3058
+ n(Xe, "prepareContext");
3064
3059
 
3065
3060
  // src/preview-api/modules/store/inferArgTypes.ts
3066
- import { logger as vs } from "storybook/internal/client-logger";
3067
- var _r = /* @__PURE__ */ n((r, e, t) => {
3061
+ import { logger as Us } from "storybook/internal/client-logger";
3062
+ var Gr = /* @__PURE__ */ n((r, e, t) => {
3068
3063
  let o = typeof r;
3069
3064
  switch (o) {
3070
3065
  case "boolean":
@@ -3076,44 +3071,44 @@ var _r = /* @__PURE__ */ n((r, e, t) => {
3076
3071
  default:
3077
3072
  break;
3078
3073
  }
3079
- return r ? t.has(r) ? (vs.warn(P`
3074
+ return r ? t.has(r) ? (Us.warn(P`
3080
3075
  We've detected a cycle in arg '${e}'. Args should be JSON-serializable.
3081
3076
 
3082
3077
  Consider using the mapping feature or fully custom args:
3083
3078
  - Mapping: https://storybook.js.org/docs/writing-stories/args#mapping-to-complex-arg-values
3084
3079
  - Custom args: https://storybook.js.org/docs/essentials/controls#fully-custom-args
3085
- `), { name: "other", value: "cyclic object" }) : (t.add(r), Array.isArray(r) ? { name: "array", value: r.length > 0 ? _r(r[0], e, new Set(
3086
- t)) : { name: "other", value: "unknown" } } : { name: "object", value: H(r, (i) => _r(i, e, new Set(t))) }) : { name: "object", value: {} };
3087
- }, "inferType"), Lr = /* @__PURE__ */ n((r) => {
3080
+ `), { name: "other", value: "cyclic object" }) : (t.add(r), Array.isArray(r) ? { name: "array", value: r.length > 0 ? Gr(r[0], e, new Set(
3081
+ t)) : { name: "other", value: "unknown" } } : { name: "object", value: H(r, (i) => Gr(i, e, new Set(t))) }) : { name: "object", value: {} };
3082
+ }, "inferType"), Ur = /* @__PURE__ */ n((r) => {
3088
3083
  let { id: e, argTypes: t = {}, initialArgs: o = {} } = r, s = H(o, (a, l) => ({
3089
3084
  name: l,
3090
- type: _r(a, `${e}.${l}`, /* @__PURE__ */ new Set())
3085
+ type: Gr(a, `${e}.${l}`, /* @__PURE__ */ new Set())
3091
3086
  })), i = H(t, (a, l) => ({
3092
3087
  name: l
3093
3088
  }));
3094
- return L(s, i, t);
3089
+ return _(s, i, t);
3095
3090
  }, "inferArgTypes");
3096
- Lr.secondPass = !0;
3091
+ Ur.secondPass = !0;
3097
3092
 
3098
3093
  // src/preview-api/modules/store/inferControls.ts
3099
- import { logger as Ps } from "storybook/internal/client-logger";
3094
+ import { logger as Hs } from "storybook/internal/client-logger";
3100
3095
 
3101
3096
  // src/preview-api/modules/store/filterArgTypes.ts
3102
- var lo = /* @__PURE__ */ n((r, e) => Array.isArray(e) ? e.includes(r) : r.match(e), "matches"), Xe = /* @__PURE__ */ n((r, e, t) => !e && !t ?
3103
- r : r && vr(r, (o, s) => {
3097
+ var Ao = /* @__PURE__ */ n((r, e) => Array.isArray(e) ? e.includes(r) : r.match(e), "matches"), Je = /* @__PURE__ */ n((r, e, t) => !e && !t ?
3098
+ r : r && Ir(r, (o, s) => {
3104
3099
  let i = o.name || s.toString();
3105
- return !!(!e || lo(i, e)) && (!t || !lo(i, t));
3100
+ return !!(!e || Ao(i, e)) && (!t || !Ao(i, t));
3106
3101
  }), "filterArgTypes");
3107
3102
 
3108
3103
  // src/preview-api/modules/store/inferControls.ts
3109
- var Fs = /* @__PURE__ */ n((r, e, t) => {
3104
+ var Vs = /* @__PURE__ */ n((r, e, t) => {
3110
3105
  let { type: o, options: s } = r;
3111
3106
  if (o) {
3112
3107
  if (t.color && t.color.test(e)) {
3113
3108
  let i = o.name;
3114
3109
  if (i === "string")
3115
3110
  return { control: { type: "color" } };
3116
- i !== "enum" && Ps.warn(
3111
+ i !== "enum" && Hs.warn(
3117
3112
  `Addon controls: Control of type color only supports string, received "${i}" instead`
3118
3113
  );
3119
3114
  }
@@ -3146,8 +3141,8 @@ var Fs = /* @__PURE__ */ n((r, e, t) => {
3146
3141
  } = r;
3147
3142
  if (!t)
3148
3143
  return e;
3149
- let a = Xe(e, o, s), l = H(a, (c, d) => c?.type && Fs(c, d.toString(), i));
3150
- return L(l, a);
3144
+ let a = Je(e, o, s), l = H(a, (c, d) => c?.type && Vs(c, d.toString(), i));
3145
+ return _(l, a);
3151
3146
  }, "inferControls");
3152
3147
  De.secondPass = !0;
3153
3148
 
@@ -3172,7 +3167,7 @@ function he({
3172
3167
  experimental_afterEach: v(a),
3173
3168
  argTypesEnhancers: [
3174
3169
  ...t || [],
3175
- Lr,
3170
+ Ur,
3176
3171
  // There's an architectural decision to be made regarding embedded addons in core:
3177
3172
  //
3178
3173
  // Option 1: Keep embedded addons but ensure consistency by moving addon-specific code
@@ -3197,10 +3192,10 @@ function he({
3197
3192
  n(he, "normalizeProjectAnnotations");
3198
3193
 
3199
3194
  // src/preview-api/modules/store/csf/composeConfigs.ts
3200
- import { global as Is } from "@storybook/global";
3195
+ import { global as Ws } from "@storybook/global";
3201
3196
 
3202
3197
  // src/preview-api/modules/store/csf/beforeAll.ts
3203
- var co = /* @__PURE__ */ n((r) => async () => {
3198
+ var Co = /* @__PURE__ */ n((r) => async () => {
3204
3199
  let e = [];
3205
3200
  for (let t of r) {
3206
3201
  let o = await t();
@@ -3213,7 +3208,7 @@ var co = /* @__PURE__ */ n((r) => async () => {
3213
3208
  }, "composeBeforeAllHooks");
3214
3209
 
3215
3210
  // src/preview-api/modules/store/csf/stepRunners.ts
3216
- function Nr(r) {
3211
+ function Hr(r) {
3217
3212
  return async (e, t, o) => {
3218
3213
  await r.reduceRight(
3219
3214
  (i, a) => async () => a(e, i, o),
@@ -3221,7 +3216,7 @@ function Nr(r) {
3221
3216
  )();
3222
3217
  };
3223
3218
  }
3224
- n(Nr, "composeStepRunners");
3219
+ n(Hr, "composeStepRunners");
3225
3220
 
3226
3221
  // src/preview-api/modules/store/csf/composeConfigs.ts
3227
3222
  function je(r, e) {
@@ -3235,10 +3230,10 @@ function $(r, e, t = {}) {
3235
3230
  }, []);
3236
3231
  }
3237
3232
  n($, "getArrayField");
3238
- function Je(r, e) {
3233
+ function Qe(r, e) {
3239
3234
  return Object.assign({}, ...je(r, e));
3240
3235
  }
3241
- n(Je, "getObjectField");
3236
+ n(Qe, "getObjectField");
3242
3237
  function ke(r, e) {
3243
3238
  return je(r, e).pop();
3244
3239
  }
@@ -3246,27 +3241,27 @@ n(ke, "getSingletonField");
3246
3241
  function Y(r) {
3247
3242
  let e = [te(), ...r], t = $(e, "argTypesEnhancers"), o = je(e, "runStep"), s = $(e, "beforeAll");
3248
3243
  return {
3249
- parameters: L(...je(e, "parameters")),
3244
+ parameters: _(...je(e, "parameters")),
3250
3245
  decorators: $(e, "decorators", {
3251
- reverseFileOrder: !(Is.FEATURES?.legacyDecoratorFileOrder ?? !1)
3246
+ reverseFileOrder: !(Ws.FEATURES?.legacyDecoratorFileOrder ?? !1)
3252
3247
  }),
3253
- args: Je(e, "args"),
3248
+ args: Qe(e, "args"),
3254
3249
  argsEnhancers: $(e, "argsEnhancers"),
3255
- argTypes: Je(e, "argTypes"),
3250
+ argTypes: Qe(e, "argTypes"),
3256
3251
  argTypesEnhancers: [
3257
3252
  ...t.filter((i) => !i.secondPass),
3258
3253
  ...t.filter((i) => i.secondPass)
3259
3254
  ],
3260
- initialGlobals: Je(e, "initialGlobals"),
3261
- globalTypes: Je(e, "globalTypes"),
3255
+ initialGlobals: Qe(e, "initialGlobals"),
3256
+ globalTypes: Qe(e, "globalTypes"),
3262
3257
  loaders: $(e, "loaders"),
3263
- beforeAll: co(s),
3258
+ beforeAll: Co(s),
3264
3259
  beforeEach: $(e, "beforeEach"),
3265
3260
  experimental_afterEach: $(e, "experimental_afterEach"),
3266
3261
  render: ke(e, "render"),
3267
3262
  renderToCanvas: ke(e, "renderToCanvas"),
3268
3263
  applyDecorators: ke(e, "applyDecorators"),
3269
- runStep: Nr(o),
3264
+ runStep: Hr(o),
3270
3265
  tags: $(e, "tags"),
3271
3266
  mount: ke(e, "mount"),
3272
3267
  testingLibraryRender: ke(e, "testingLibraryRender")
@@ -3275,57 +3270,56 @@ function Y(r) {
3275
3270
  n(Y, "composeConfigs");
3276
3271
 
3277
3272
  // src/preview-api/modules/store/csf/portable-stories.ts
3278
- import { isExportStory as Ds } from "storybook/internal/csf";
3279
- import { MountMustBeDestructuredError as ks } from "storybook/internal/preview-errors";
3273
+ import { isExportStory as Ys } from "storybook/internal/csf";
3274
+ import { MountMustBeDestructuredError as Ks } from "storybook/internal/preview-errors";
3280
3275
 
3281
3276
  // src/preview-api/modules/store/reporter-api.ts
3282
- var se = class {
3277
+ var Vr = class Vr {
3283
3278
  constructor() {
3284
3279
  this.reports = [];
3285
3280
  }
3286
- static {
3287
- n(this, "ReporterAPI");
3288
- }
3289
3281
  async addReport(e) {
3290
3282
  this.reports.push(e);
3291
3283
  }
3292
3284
  };
3285
+ n(Vr, "ReporterAPI");
3286
+ var se = Vr;
3293
3287
 
3294
3288
  // src/preview-api/modules/store/csf/csf-factory-utils.ts
3295
- import { isStory as Os } from "storybook/internal/csf";
3296
- function qr(r, e, t) {
3297
- return Os(r) ? {
3289
+ import { isStory as $s } from "storybook/internal/csf";
3290
+ function Wr(r, e, t) {
3291
+ return $s(r) ? {
3298
3292
  story: r.input,
3299
3293
  meta: r.meta.input,
3300
3294
  preview: r.meta.preview.composed
3301
3295
  } : { story: r, meta: e, preview: t };
3302
3296
  }
3303
- n(qr, "getCsfFactoryAnnotations");
3297
+ n(Wr, "getCsfFactoryAnnotations");
3304
3298
 
3305
3299
  // src/preview-api/modules/store/csf/portable-stories.ts
3306
- function js(r) {
3300
+ function Xs(r) {
3307
3301
  globalThis.defaultProjectAnnotations = r;
3308
3302
  }
3309
- n(js, "setDefaultProjectAnnotations");
3310
- var Ms = "ComposedStory", _s = "Unnamed Story";
3311
- function Ls(r) {
3303
+ n(Xs, "setDefaultProjectAnnotations");
3304
+ var Js = "ComposedStory", Qs = "Unnamed Story";
3305
+ function Zs(r) {
3312
3306
  return r ? Y([r]) : {};
3313
3307
  }
3314
- n(Ls, "extractAnnotation");
3315
- function Ns(r) {
3308
+ n(Zs, "extractAnnotation");
3309
+ function ei(r) {
3316
3310
  let e = Array.isArray(r) ? r : [r];
3317
3311
  return globalThis.globalProjectAnnotations = Y([
3318
3312
  globalThis.defaultProjectAnnotations ?? {},
3319
- Y(e.map(Ls))
3313
+ Y(e.map(Zs))
3320
3314
  ]), globalThis.globalProjectAnnotations ?? {};
3321
3315
  }
3322
- n(Ns, "setProjectAnnotations");
3316
+ n(ei, "setProjectAnnotations");
3323
3317
  var K = [];
3324
- function po(r, e, t, o, s) {
3318
+ function vo(r, e, t, o, s) {
3325
3319
  if (r === void 0)
3326
3320
  throw new Error("Expected a story but received undefined.");
3327
- e.title = e.title ?? Ms;
3328
- let i = Ie(e), a = s || r.storyName || r.story?.name || r.name || _s, l = me(
3321
+ e.title = e.title ?? Js;
3322
+ let i = Ie(e), a = s || r.storyName || r.story?.name || r.name || Qs, l = me(
3329
3323
  a,
3330
3324
  r,
3331
3325
  i
@@ -3339,19 +3333,20 @@ function po(r, e, t, o, s) {
3339
3333
  l,
3340
3334
  i,
3341
3335
  c
3342
- ), p = {
3336
+ ), u = {
3337
+ ...We(c.globalTypes),
3343
3338
  ...c.initialGlobals,
3344
3339
  ...d.storyGlobals
3345
- }, u = new se(), y = /* @__PURE__ */ n(() => {
3346
- let m = Ke({
3340
+ }, y = new se(), h = /* @__PURE__ */ n(() => {
3341
+ let f = Xe({
3347
3342
  hooks: new re(),
3348
- globals: p,
3343
+ globals: u,
3349
3344
  args: { ...d.initialArgs },
3350
3345
  viewMode: "story",
3351
- reporting: u,
3346
+ reporting: y,
3352
3347
  loaded: {},
3353
3348
  abortSignal: new AbortController().signal,
3354
- step: /* @__PURE__ */ n((f, x) => d.runStep(f, x, m), "step"),
3349
+ step: /* @__PURE__ */ n((S, R) => d.runStep(S, R, f), "step"),
3355
3350
  canvasElement: null,
3356
3351
  canvas: {},
3357
3352
  userEvent: {},
@@ -3360,8 +3355,8 @@ function po(r, e, t, o, s) {
3360
3355
  context: null,
3361
3356
  mount: null
3362
3357
  });
3363
- return m.parameters.__isPortableStory = !0, m.context = m, d.renderToCanvas && (m.renderToCanvas = async () => {
3364
- let f = await d.renderToCanvas?.(
3358
+ return f.parameters.__isPortableStory = !0, f.context = f, d.renderToCanvas && (f.renderToCanvas = async () => {
3359
+ let S = await d.renderToCanvas?.(
3365
3360
  {
3366
3361
  componentId: d.componentId,
3367
3362
  title: d.title,
@@ -3370,74 +3365,74 @@ function po(r, e, t, o, s) {
3370
3365
  tags: d.tags,
3371
3366
  showMain: /* @__PURE__ */ n(() => {
3372
3367
  }, "showMain"),
3373
- showError: /* @__PURE__ */ n((x) => {
3374
- throw new Error(`${x.title}
3375
- ${x.description}`);
3368
+ showError: /* @__PURE__ */ n((R) => {
3369
+ throw new Error(`${R.title}
3370
+ ${R.description}`);
3376
3371
  }, "showError"),
3377
- showException: /* @__PURE__ */ n((x) => {
3378
- throw x;
3372
+ showException: /* @__PURE__ */ n((R) => {
3373
+ throw R;
3379
3374
  }, "showException"),
3380
3375
  forceRemount: !0,
3381
- storyContext: m,
3382
- storyFn: /* @__PURE__ */ n(() => d.unboundStoryFn(m), "storyFn"),
3376
+ storyContext: f,
3377
+ storyFn: /* @__PURE__ */ n(() => d.unboundStoryFn(f), "storyFn"),
3383
3378
  unboundStoryFn: d.unboundStoryFn
3384
3379
  },
3385
- m.canvasElement
3380
+ f.canvasElement
3386
3381
  );
3387
- f && K.push(f);
3388
- }), m.mount = d.mount(m), m;
3389
- }, "initializeContext"), g, b = /* @__PURE__ */ n(async (m) => {
3390
- let f = y();
3391
- return f.canvasElement ??= globalThis?.document?.body, g && (f.loaded = g.loaded), Object.assign(f, m), d.playFunction(f);
3392
- }, "play"), S = /* @__PURE__ */ n((m) => {
3393
- let f = y();
3394
- return Object.assign(f, m), Gs(d, f);
3395
- }, "run"), h = d.playFunction ? b : void 0;
3382
+ S && K.push(S);
3383
+ }), f.mount = d.mount(f), f;
3384
+ }, "initializeContext"), g, b = /* @__PURE__ */ n(async (f) => {
3385
+ let S = h();
3386
+ return S.canvasElement ??= globalThis?.document?.body, g && (S.loaded = g.loaded), Object.assign(S, f), d.playFunction(S);
3387
+ }, "play"), m = /* @__PURE__ */ n((f) => {
3388
+ let S = h();
3389
+ return Object.assign(S, f), ni(d, S);
3390
+ }, "run"), T = d.playFunction ? b : void 0;
3396
3391
  return Object.assign(
3397
- /* @__PURE__ */ n(function(f) {
3398
- let x = y();
3399
- return g && (x.loaded = g.loaded), x.args = {
3400
- ...x.initialArgs,
3401
- ...f
3402
- }, d.unboundStoryFn(x);
3392
+ /* @__PURE__ */ n(function(S) {
3393
+ let R = h();
3394
+ return g && (R.loaded = g.loaded), R.args = {
3395
+ ...R.initialArgs,
3396
+ ...S
3397
+ }, d.unboundStoryFn(R);
3403
3398
  }, "storyFn"),
3404
3399
  {
3405
3400
  id: d.id,
3406
3401
  storyName: a,
3407
3402
  load: /* @__PURE__ */ n(async () => {
3408
- for (let f of [...K].reverse())
3409
- await f();
3403
+ for (let S of [...K].reverse())
3404
+ await S();
3410
3405
  K.length = 0;
3411
- let m = y();
3412
- m.loaded = await d.applyLoaders(m), K.push(...(await d.applyBeforeEach(m)).filter(Boolean)), g = m;
3406
+ let f = h();
3407
+ f.loaded = await d.applyLoaders(f), K.push(...(await d.applyBeforeEach(f)).filter(Boolean)), g = f;
3413
3408
  }, "load"),
3414
- globals: p,
3409
+ globals: u,
3415
3410
  args: d.initialArgs,
3416
3411
  parameters: d.parameters,
3417
3412
  argTypes: d.argTypes,
3418
- play: h,
3419
- run: S,
3420
- reporting: u,
3413
+ play: T,
3414
+ run: m,
3415
+ reporting: y,
3421
3416
  tags: d.tags
3422
3417
  }
3423
3418
  );
3424
3419
  }
3425
- n(po, "composeStory");
3426
- var qs = /* @__PURE__ */ n((r, e, t, o) => po(r, e, t, {}, o), "defaultComposeStory");
3427
- function Bs(r, e, t = qs) {
3420
+ n(vo, "composeStory");
3421
+ var ri = /* @__PURE__ */ n((r, e, t, o) => vo(r, e, t, {}, o), "defaultComposeStory");
3422
+ function ti(r, e, t = ri) {
3428
3423
  let { default: o, __esModule: s, __namedExportsOrder: i, ...a } = r, l = o;
3429
3424
  return Object.entries(a).reduce(
3430
3425
  (d, [p, u]) => {
3431
- let { story: y, meta: g } = qr(u);
3432
- return !l && g && (l = g), Ds(p, l) ? Object.assign(d, {
3426
+ let { story: y, meta: h } = Wr(u);
3427
+ return !l && h && (l = h), Ys(p, l) ? Object.assign(d, {
3433
3428
  [p]: t(y, l, e, p)
3434
3429
  }) : d;
3435
3430
  },
3436
3431
  {}
3437
3432
  );
3438
3433
  }
3439
- n(Bs, "composeStories");
3440
- function zs(r) {
3434
+ n(ti, "composeStories");
3435
+ function oi(r) {
3441
3436
  return r.extend({
3442
3437
  mount: /* @__PURE__ */ n(async ({ mount: e, page: t }, o) => {
3443
3438
  await o(async (s, ...i) => {
@@ -3467,8 +3462,8 @@ function zs(r) {
3467
3462
  }, "mount")
3468
3463
  });
3469
3464
  }
3470
- n(zs, "createPlaywrightTest");
3471
- async function Gs(r, e) {
3465
+ n(oi, "createPlaywrightTest");
3466
+ async function ni(r, e) {
3472
3467
  for (let s of [...K].reverse())
3473
3468
  await s();
3474
3469
  if (K.length = 0, !e.canvasElement) {
@@ -3482,24 +3477,21 @@ async function Gs(r, e) {
3482
3477
  K.push(...(await r.applyBeforeEach(e)).filter(Boolean));
3483
3478
  let t = r.playFunction, o = r.usesMount;
3484
3479
  o || await e.mount(), !e.abortSignal.aborted && (t && (o || (e.mount = async () => {
3485
- throw new ks({ playFunction: t.toString() });
3480
+ throw new Ks({ playFunction: t.toString() });
3486
3481
  }), await t(e)), await r.applyAfterEach(e));
3487
3482
  }
3488
- n(Gs, "runStory");
3483
+ n(ni, "runStory");
3489
3484
 
3490
3485
  // src/preview-api/modules/store/StoryStore.ts
3491
- var uo = 1e3, Vs = 1e4, ge = class {
3486
+ var Po = 1e3, ai = 1e4, $r = class $r {
3492
3487
  constructor(e, t, o) {
3493
3488
  this.importFn = t;
3494
- this.storyIndex = new $e(e), this.projectAnnotations = he(
3489
+ this.storyIndex = new Ye(e), this.projectAnnotations = he(
3495
3490
  Y([...te(), o])
3496
3491
  );
3497
3492
  let { initialGlobals: s, globalTypes: i } = this.projectAnnotations;
3498
- this.args = new Ve(), this.userGlobals = new We({ globals: s, globalTypes: i }), this.hooks = {}, this.cleanupCallbacks = {}, this.processCSFFileWithCache =
3499
- (0, Qe.default)(uo)(to), this.prepareMetaWithCache = (0, Qe.default)(uo)(Mr), this.prepareStoryWithCache = (0, Qe.default)(Vs)(Oe);
3500
- }
3501
- static {
3502
- n(this, "StoryStore");
3493
+ this.args = new Ve(), this.userGlobals = new $e({ globals: s, globalTypes: i }), this.hooks = {}, this.cleanupCallbacks = {}, this.processCSFFileWithCache =
3494
+ (0, Ze.default)(Po)(So), this.prepareMetaWithCache = (0, Ze.default)(Po)(zr), this.prepareStoryWithCache = (0, Ze.default)(ai)(Oe);
3503
3495
  }
3504
3496
  setProjectAnnotations(e) {
3505
3497
  this.projectAnnotations = he(e);
@@ -3563,7 +3555,7 @@ var uo = 1e3, Vs = 1e4, ge = class {
3563
3555
  }) {
3564
3556
  let o = t.stories[e];
3565
3557
  if (!o)
3566
- throw new Hs({ storyId: e });
3558
+ throw new ii({ storyId: e });
3567
3559
  let s = t.meta, i = this.prepareStoryWithCache(
3568
3560
  o,
3569
3561
  s,
@@ -3591,7 +3583,7 @@ var uo = 1e3, Vs = 1e4, ge = class {
3591
3583
  // and updated separtely to the (immutable) story.
3592
3584
  getStoryContext(e, { forceInitialArgs: t = !1 } = {}) {
3593
3585
  let o = this.userGlobals.get(), { initialGlobals: s } = this.userGlobals, i = new se();
3594
- return Ke({
3586
+ return Xe({
3595
3587
  ...e,
3596
3588
  args: t ? e.initialArgs : this.args.get(e.id),
3597
3589
  initialGlobals: s,
@@ -3619,7 +3611,7 @@ var uo = 1e3, Vs = 1e4, ge = class {
3619
3611
  extract(e = { includeDocsOnly: !1 }) {
3620
3612
  let { cachedCSFFiles: t } = this;
3621
3613
  if (!t)
3622
- throw new Us();
3614
+ throw new si();
3623
3615
  return Object.entries(this.storyIndex.entries).reduce(
3624
3616
  (o, [s, { type: i, importPath: a }]) => {
3625
3617
  if (i === "docs")
@@ -3643,18 +3635,20 @@ var uo = 1e3, Vs = 1e4, ge = class {
3643
3635
  );
3644
3636
  }
3645
3637
  };
3638
+ n($r, "StoryStore");
3639
+ var ge = $r;
3646
3640
 
3647
3641
  // src/preview-api/modules/store/autoTitle.ts
3648
- import { once as Ws } from "storybook/internal/client-logger";
3642
+ import { once as li } from "storybook/internal/client-logger";
3649
3643
 
3650
3644
  // ../node_modules/slash/index.js
3651
- function Br(r) {
3645
+ function Yr(r) {
3652
3646
  return r.startsWith("\\\\?\\") ? r : r.replace(/\\/g, "/");
3653
3647
  }
3654
- n(Br, "slash");
3648
+ n(Yr, "slash");
3655
3649
 
3656
3650
  // src/preview-api/modules/store/autoTitle.ts
3657
- var $s = /* @__PURE__ */ n((r) => {
3651
+ var ci = /* @__PURE__ */ n((r) => {
3658
3652
  if (r.length === 0)
3659
3653
  return r;
3660
3654
  let e = r[r.length - 1], t = e?.replace(/(?:[.](?:story|stories))?([.][^.]+)$/i, "");
@@ -3664,28 +3658,28 @@ var $s = /* @__PURE__ */ n((r) => {
3664
3658
  return t && o && t.toLowerCase() === o.toLowerCase() ? [...r.slice(0, -2), t] : t && (/^(story|stories)([.][^.]+)$/i.test(e) || /^index$/i.
3665
3659
  test(t)) ? r.slice(0, -1) : [...r.slice(0, -1), t];
3666
3660
  }, "sanitize");
3667
- function fo(r) {
3661
+ function Fo(r) {
3668
3662
  return r.flatMap((e) => e.split("/")).filter(Boolean).join("/");
3669
3663
  }
3670
- n(fo, "pathJoin");
3671
- var yo = /* @__PURE__ */ n((r, e, t) => {
3664
+ n(Fo, "pathJoin");
3665
+ var Io = /* @__PURE__ */ n((r, e, t) => {
3672
3666
  let { directory: o, importPathMatcher: s, titlePrefix: i = "" } = e || {};
3673
- typeof r == "number" && Ws.warn(P`
3667
+ typeof r == "number" && li.warn(P`
3674
3668
  CSF Auto-title received a numeric fileName. This typically happens when
3675
3669
  webpack is mis-configured in production mode. To force webpack to produce
3676
3670
  filenames, set optimization.moduleIds = "named" in your webpack config.
3677
3671
  `);
3678
- let a = Br(String(r));
3672
+ let a = Yr(String(r));
3679
3673
  if (s.exec(a)) {
3680
3674
  if (!t) {
3681
- let l = a.replace(o, ""), c = fo([i, l]).split("/");
3682
- return c = $s(c), c.join("/");
3675
+ let l = a.replace(o, ""), c = Fo([i, l]).split("/");
3676
+ return c = ci(c), c.join("/");
3683
3677
  }
3684
- return i ? fo([i, t]) : t;
3678
+ return i ? Fo([i, t]) : t;
3685
3679
  }
3686
- }, "userOrAutoTitleFromSpecifier"), Ys = /* @__PURE__ */ n((r, e, t) => {
3680
+ }, "userOrAutoTitleFromSpecifier"), di = /* @__PURE__ */ n((r, e, t) => {
3687
3681
  for (let o = 0; o < e.length; o += 1) {
3688
- let s = yo(r, e[o], t);
3682
+ let s = Io(r, e[o], t);
3689
3683
  if (s)
3690
3684
  return s;
3691
3685
  }
@@ -3693,10 +3687,10 @@ var yo = /* @__PURE__ */ n((r, e, t) => {
3693
3687
  }, "userOrAutoTitle");
3694
3688
 
3695
3689
  // src/preview-api/modules/store/storySort.ts
3696
- var mo = /\s*\/\s*/, ho = /* @__PURE__ */ n((r = {}) => (e, t) => {
3690
+ var Oo = /\s*\/\s*/, Do = /* @__PURE__ */ n((r = {}) => (e, t) => {
3697
3691
  if (e.title === t.title && !r.includeNames)
3698
3692
  return 0;
3699
- let o = r.method || "configure", s = r.order || [], i = e.title.trim().split(mo), a = t.title.trim().split(mo);
3693
+ let o = r.method || "configure", s = r.order || [], i = e.title.trim().split(Oo), a = t.title.trim().split(Oo);
3700
3694
  r.includeNames && (i.push(e.name), a.push(t.name));
3701
3695
  let l = 0;
3702
3696
  for (; i[l] || a[l]; ) {
@@ -3706,8 +3700,8 @@ var mo = /\s*\/\s*/, ho = /* @__PURE__ */ n((r = {}) => (e, t) => {
3706
3700
  return 1;
3707
3701
  let c = i[l], d = a[l];
3708
3702
  if (c !== d) {
3709
- let u = s.indexOf(c), y = s.indexOf(d), g = s.indexOf("*");
3710
- return u !== -1 || y !== -1 ? (u === -1 && (g !== -1 ? u = g : u = s.length), y === -1 && (g !== -1 ? y = g : y = s.length), u - y) : o ===
3703
+ let u = s.indexOf(c), y = s.indexOf(d), h = s.indexOf("*");
3704
+ return u !== -1 || y !== -1 ? (u === -1 && (h !== -1 ? u = h : u = s.length), y === -1 && (h !== -1 ? y = h : y = s.length), u - y) : o ===
3711
3705
  "configure" ? 0 : c.localeCompare(d, r.locales ? r.locales : void 0, {
3712
3706
  numeric: !0,
3713
3707
  sensitivity: "accent"
@@ -3720,18 +3714,18 @@ var mo = /\s*\/\s*/, ho = /* @__PURE__ */ n((r = {}) => (e, t) => {
3720
3714
  }, "storySort");
3721
3715
 
3722
3716
  // src/preview-api/modules/store/sortStories.ts
3723
- var Ks = /* @__PURE__ */ n((r, e, t) => {
3717
+ var pi = /* @__PURE__ */ n((r, e, t) => {
3724
3718
  if (e) {
3725
3719
  let o;
3726
- typeof e == "function" ? o = e : o = ho(e), r.sort(o);
3720
+ typeof e == "function" ? o = e : o = Do(e), r.sort(o);
3727
3721
  } else
3728
3722
  r.sort(
3729
3723
  (o, s) => t.indexOf(o.importPath) - t.indexOf(s.importPath)
3730
3724
  );
3731
3725
  return r;
3732
- }, "sortStoriesCommon"), Xs = /* @__PURE__ */ n((r, e, t) => {
3726
+ }, "sortStoriesCommon"), ui = /* @__PURE__ */ n((r, e, t) => {
3733
3727
  try {
3734
- return Ks(r, e, t);
3728
+ return pi(r, e, t);
3735
3729
  } catch (o) {
3736
3730
  throw new Error(P`
3737
3731
  Error sorting stories with sort parameter ${e}:
@@ -3746,48 +3740,48 @@ var Ks = /* @__PURE__ */ n((r, e, t) => {
3746
3740
  }, "sortStoriesV7");
3747
3741
 
3748
3742
  // src/preview-api/modules/preview-web/Preview.tsx
3749
- import { deprecate as ti, logger as xo } from "storybook/internal/client-logger";
3743
+ import { deprecate as bi, logger as _o } from "storybook/internal/client-logger";
3750
3744
  import {
3751
- ARGTYPES_INFO_REQUEST as oi,
3752
- ARGTYPES_INFO_RESPONSE as Ro,
3753
- CONFIG_ERROR as ni,
3754
- FORCE_REMOUNT as si,
3755
- FORCE_RE_RENDER as ii,
3756
- GLOBALS_UPDATED as wo,
3757
- RESET_STORY_ARGS as ai,
3758
- SET_GLOBALS as li,
3759
- STORY_ARGS_UPDATED as ci,
3760
- STORY_INDEX_INVALIDATED as di,
3761
- UPDATE_GLOBALS as pi,
3762
- UPDATE_STORY_ARGS as ui
3745
+ ARGTYPES_INFO_REQUEST as Si,
3746
+ ARGTYPES_INFO_RESPONSE as No,
3747
+ CONFIG_ERROR as Ti,
3748
+ FORCE_REMOUNT as xi,
3749
+ FORCE_RE_RENDER as Ri,
3750
+ GLOBALS_UPDATED as qo,
3751
+ RESET_STORY_ARGS as wi,
3752
+ SET_GLOBALS as Ei,
3753
+ STORY_ARGS_UPDATED as Ai,
3754
+ STORY_INDEX_INVALIDATED as Ci,
3755
+ UPDATE_GLOBALS as vi,
3756
+ UPDATE_STORY_ARGS as Pi
3763
3757
  } from "storybook/internal/core-events";
3764
3758
  import {
3765
3759
  CalledPreviewMethodBeforeInitializationError as V,
3766
- MissingRenderToCanvasError as fi,
3767
- StoryIndexFetchError as yi,
3768
- StoryStoreAccessedBeforeInitializationError as mi
3760
+ MissingRenderToCanvasError as Fi,
3761
+ StoryIndexFetchError as Ii,
3762
+ StoryStoreAccessedBeforeInitializationError as Oi
3769
3763
  } from "storybook/internal/preview-errors";
3770
- import { global as hi } from "@storybook/global";
3764
+ import { global as Di } from "@storybook/global";
3771
3765
 
3772
3766
  // src/preview-api/modules/preview-web/render/StoryRender.ts
3773
3767
  import {
3774
- PLAY_FUNCTION_THREW_EXCEPTION as Js,
3775
- STORY_FINISHED as go,
3776
- STORY_RENDERED as Qs,
3777
- STORY_RENDER_PHASE_CHANGED as bo,
3778
- UNHANDLED_ERRORS_WHILE_PLAYING as Zs
3768
+ PLAY_FUNCTION_THREW_EXCEPTION as fi,
3769
+ STORY_FINISHED as ko,
3770
+ STORY_RENDERED as yi,
3771
+ STORY_RENDER_PHASE_CHANGED as jo,
3772
+ UNHANDLED_ERRORS_WHILE_PLAYING as mi
3779
3773
  } from "storybook/internal/core-events";
3780
3774
  import {
3781
- MountMustBeDestructuredError as ei,
3782
- NoStoryMountedError as ri
3775
+ MountMustBeDestructuredError as hi,
3776
+ NoStoryMountedError as gi
3783
3777
  } from "storybook/internal/preview-errors";
3784
3778
 
3785
3779
  // src/preview-api/modules/preview-web/render/Render.ts
3786
3780
  var X = new Error("prepareAborted");
3787
3781
 
3788
3782
  // src/preview-api/modules/preview-web/render/StoryRender.ts
3789
- var { AbortController: So } = globalThis;
3790
- function To(r) {
3783
+ var { AbortController: Mo } = globalThis;
3784
+ function Lo(r) {
3791
3785
  try {
3792
3786
  let { name: e = "Error", message: t = String(r), stack: o } = r;
3793
3787
  return { name: e, message: t, stack: o };
@@ -3795,8 +3789,8 @@ function To(r) {
3795
3789
  return { name: "Error", message: String(r) };
3796
3790
  }
3797
3791
  }
3798
- n(To, "serializeError");
3799
- var ie = class {
3792
+ n(Lo, "serializeError");
3793
+ var Kr = class Kr {
3800
3794
  constructor(e, t, o, s, i, a, l = { autoplay: !0, forceInitialArgs: !1 }, c) {
3801
3795
  this.channel = e;
3802
3796
  this.store = t;
@@ -3812,16 +3806,13 @@ var ie = class {
3812
3806
  this.teardownRender = /* @__PURE__ */ n(() => {
3813
3807
  }, "teardownRender");
3814
3808
  this.torndown = !1;
3815
- this.abortController = new So(), c && (this.story = c, this.phase = "preparing");
3816
- }
3817
- static {
3818
- n(this, "StoryRender");
3809
+ this.abortController = new Mo(), c && (this.story = c, this.phase = "preparing");
3819
3810
  }
3820
3811
  async runPhase(e, t, o) {
3821
- this.phase = t, this.channel.emit(bo, { newPhase: this.phase, storyId: this.id }), o && (await o(), this.checkIfAborted(e));
3812
+ this.phase = t, this.channel.emit(jo, { newPhase: this.phase, storyId: this.id }), o && (await o(), this.checkIfAborted(e));
3822
3813
  }
3823
3814
  checkIfAborted(e) {
3824
- return e.aborted ? (this.phase = "aborted", this.channel.emit(bo, { newPhase: this.phase, storyId: this.id }), !0) : !1;
3815
+ return e.aborted ? (this.phase = "aborted", this.channel.emit(jo, { newPhase: this.phase, storyId: this.id }), !0) : !1;
3825
3816
  }
3826
3817
  async prepare() {
3827
3818
  if (await this.runPhase(this.abortController.signal, "preparing", async () => {
@@ -3869,25 +3860,25 @@ var ie = class {
3869
3860
  applyLoaders: p,
3870
3861
  applyBeforeEach: u,
3871
3862
  applyAfterEach: y,
3872
- unboundStoryFn: g,
3873
- playFunction: b,
3874
- runStep: S
3863
+ unboundStoryFn: h,
3864
+ playFunction: g,
3865
+ runStep: b
3875
3866
  } = s;
3876
- t && !e && (this.cancelRender(), this.abortController = new So());
3877
- let h = this.abortController.signal, T = !1, m = s.usesMount;
3867
+ t && !e && (this.cancelRender(), this.abortController = new Mo());
3868
+ let m = this.abortController.signal, T = !1, x = s.usesMount;
3878
3869
  try {
3879
3870
  let f = {
3880
3871
  ...this.storyContext(),
3881
3872
  viewMode: this.viewMode,
3882
- abortSignal: h,
3873
+ abortSignal: m,
3883
3874
  canvasElement: o,
3884
3875
  loaded: {},
3885
- step: /* @__PURE__ */ n((C, B) => S(C, B, f), "step"),
3876
+ step: /* @__PURE__ */ n((C, B) => b(C, B, f), "step"),
3886
3877
  context: null,
3887
3878
  canvas: {},
3888
3879
  userEvent: {},
3889
3880
  renderToCanvas: /* @__PURE__ */ n(async () => {
3890
- let C = await this.renderToScreen(x, o);
3881
+ let C = await this.renderToScreen(S, o);
3891
3882
  this.teardownRender = C || (() => {
3892
3883
  }), T = !0;
3893
3884
  }, "renderToCanvas"),
@@ -3899,13 +3890,13 @@ var ie = class {
3899
3890
  mount: /* @__PURE__ */ n(async (...C) => {
3900
3891
  this.callbacks.showStoryDuringRender?.();
3901
3892
  let B = null;
3902
- return await this.runPhase(h, "rendering", async () => {
3893
+ return await this.runPhase(m, "rendering", async () => {
3903
3894
  B = await s.mount(f)(...C);
3904
- }), m && await this.runPhase(h, "playing"), B;
3895
+ }), x && await this.runPhase(m, "playing"), B;
3905
3896
  }, "mount")
3906
3897
  };
3907
3898
  f.context = f;
3908
- let x = {
3899
+ let S = {
3909
3900
  componentId: a,
3910
3901
  title: l,
3911
3902
  kind: l,
@@ -3918,53 +3909,53 @@ var ie = class {
3918
3909
  showException: /* @__PURE__ */ n((C) => (this.phase = "errored", this.callbacks.showException(C)), "showException"),
3919
3910
  forceRemount: t || this.notYetRendered,
3920
3911
  storyContext: f,
3921
- storyFn: /* @__PURE__ */ n(() => g(f), "storyFn"),
3922
- unboundStoryFn: g
3912
+ storyFn: /* @__PURE__ */ n(() => h(f), "storyFn"),
3913
+ unboundStoryFn: h
3923
3914
  };
3924
- if (await this.runPhase(h, "loading", async () => {
3915
+ if (await this.runPhase(m, "loading", async () => {
3925
3916
  f.loaded = await p(f);
3926
- }), h.aborted)
3917
+ }), m.aborted)
3927
3918
  return;
3928
- let E = await u(f);
3929
- if (this.store.addCleanupCallbacks(s, E), this.checkIfAborted(h) || (!T && !m && await f.mount(), this.notYetRendered = !1, h.aborted))
3919
+ let R = await u(f);
3920
+ if (this.store.addCleanupCallbacks(s, R), this.checkIfAborted(m) || (!T && !x && await f.mount(), this.notYetRendered = !1, m.aborted))
3930
3921
  return;
3931
- let R = this.story.parameters?.test?.dangerouslyIgnoreUnhandledErrors === !0, A = /* @__PURE__ */ new Set(), F = /* @__PURE__ */ n((C) => A.
3922
+ let w = this.story.parameters?.test?.dangerouslyIgnoreUnhandledErrors === !0, A = /* @__PURE__ */ new Set(), F = /* @__PURE__ */ n((C) => A.
3932
3923
  add("error" in C ? C.error : C.reason), "onError");
3933
- if (this.renderOptions.autoplay && t && b && this.phase !== "errored") {
3924
+ if (this.renderOptions.autoplay && t && g && this.phase !== "errored") {
3934
3925
  window.addEventListener("error", F), window.addEventListener("unhandledrejection", F), this.disableKeyListeners = !0;
3935
3926
  try {
3936
- if (m ? await b(f) : (f.mount = async () => {
3937
- throw new ei({ playFunction: b.toString() });
3938
- }, await this.runPhase(h, "playing", async () => b(f))), !T)
3939
- throw new ri();
3940
- this.checkIfAborted(h), !R && A.size > 0 ? await this.runPhase(h, "errored") : await this.runPhase(h, "played");
3927
+ if (x ? await g(f) : (f.mount = async () => {
3928
+ throw new hi({ playFunction: g.toString() });
3929
+ }, await this.runPhase(m, "playing", async () => g(f))), !T)
3930
+ throw new gi();
3931
+ this.checkIfAborted(m), !w && A.size > 0 ? await this.runPhase(m, "errored") : await this.runPhase(m, "played");
3941
3932
  } catch (C) {
3942
- if (this.callbacks.showStoryDuringRender?.(), await this.runPhase(h, "errored", async () => {
3943
- this.channel.emit(Js, To(C));
3933
+ if (this.callbacks.showStoryDuringRender?.(), await this.runPhase(m, "errored", async () => {
3934
+ this.channel.emit(fi, Lo(C));
3944
3935
  }), this.story.parameters.throwPlayFunctionExceptions !== !1)
3945
3936
  throw C;
3946
3937
  console.error(C);
3947
3938
  }
3948
- if (!R && A.size > 0 && this.channel.emit(
3949
- Zs,
3950
- Array.from(A).map(To)
3951
- ), this.disableKeyListeners = !1, window.removeEventListener("unhandledrejection", F), window.removeEventListener("error", F), h.aborted)
3939
+ if (!w && A.size > 0 && this.channel.emit(
3940
+ mi,
3941
+ Array.from(A).map(Lo)
3942
+ ), this.disableKeyListeners = !1, window.removeEventListener("unhandledrejection", F), window.removeEventListener("error", F), m.aborted)
3952
3943
  return;
3953
3944
  }
3954
3945
  await this.runPhase(
3955
- h,
3946
+ m,
3956
3947
  "completed",
3957
- async () => this.channel.emit(Qs, i)
3958
- ), this.phase !== "errored" && await this.runPhase(h, "afterEach", async () => {
3948
+ async () => this.channel.emit(yi, i)
3949
+ ), this.phase !== "errored" && await this.runPhase(m, "afterEach", async () => {
3959
3950
  await y(f);
3960
3951
  });
3961
- let j = !R && A.size > 0, N = f.reporting.reports.some(
3952
+ let j = !w && A.size > 0, N = f.reporting.reports.some(
3962
3953
  (C) => C.status === "failed"
3963
3954
  ), pe = j || N;
3964
3955
  await this.runPhase(
3965
- h,
3956
+ m,
3966
3957
  "finished",
3967
- async () => this.channel.emit(go, {
3958
+ async () => this.channel.emit(ko, {
3968
3959
  storyId: i,
3969
3960
  status: pe ? "error" : "success",
3970
3961
  reporters: f.reporting.reports
@@ -3972,9 +3963,9 @@ var ie = class {
3972
3963
  );
3973
3964
  } catch (f) {
3974
3965
  this.phase = "errored", this.callbacks.showException(f), await this.runPhase(
3975
- h,
3966
+ m,
3976
3967
  "finished",
3977
- async () => this.channel.emit(go, {
3968
+ async () => this.channel.emit(ko, {
3978
3969
  storyId: i,
3979
3970
  status: "error",
3980
3971
  reporters: []
@@ -4019,10 +4010,12 @@ var ie = class {
4019
4010
  });
4020
4011
  }
4021
4012
  };
4013
+ n(Kr, "StoryRender");
4014
+ var ie = Kr;
4022
4015
 
4023
4016
  // src/preview-api/modules/preview-web/Preview.tsx
4024
- var { fetch: gi } = hi, bi = "./index.json", be = class {
4025
- constructor(e, t, o = _.getChannel(), s = !0) {
4017
+ var { fetch: ki } = Di, ji = "./index.json", Xr = class Xr {
4018
+ constructor(e, t, o = L.getChannel(), s = !0) {
4026
4019
  this.importFn = e;
4027
4020
  this.getProjectAnnotations = t;
4028
4021
  this.channel = o;
@@ -4031,9 +4024,6 @@ var { fetch: gi } = hi, bi = "./index.json", be = class {
4031
4024
  this.resolveStoreInitializationPromise = i, this.rejectStoreInitializationPromise = a;
4032
4025
  }), s && this.initialize();
4033
4026
  }
4034
- static {
4035
- n(this, "Preview");
4036
- }
4037
4027
  // Create a proxy object for `__STORYBOOK_STORY_STORE__` and `__STORYBOOK_PREVIEW__.storyStore`
4038
4028
  // That proxies through to the store once ready, and errors beforehand. This means we can set
4039
4029
  // `__STORYBOOK_STORY_STORE__ = __STORYBOOK_PREVIEW__.storyStore` without having to wait, and
@@ -4045,8 +4035,8 @@ var { fetch: gi } = hi, bi = "./index.json", be = class {
4045
4035
  {
4046
4036
  get: /* @__PURE__ */ n((e, t) => {
4047
4037
  if (this.storyStoreValue)
4048
- return ti("Accessing the Story Store is deprecated and will be removed in 9.0"), this.storyStoreValue[t];
4049
- throw new mi();
4038
+ return bi("Accessing the Story Store is deprecated and will be removed in 9.0"), this.storyStoreValue[t];
4039
+ throw new Oi();
4050
4040
  }, "get")
4051
4041
  }
4052
4042
  );
@@ -4065,15 +4055,15 @@ var { fetch: gi } = hi, bi = "./index.json", be = class {
4065
4055
  return this.storeInitializationPromise;
4066
4056
  }
4067
4057
  setupListeners() {
4068
- this.channel.on(di, this.onStoryIndexChanged.bind(this)), this.channel.on(pi, this.onUpdateGlobals.bind(this)), this.channel.on(ui, this.
4069
- onUpdateArgs.bind(this)), this.channel.on(oi, this.onRequestArgTypesInfo.bind(this)), this.channel.on(ai, this.onResetArgs.bind(this)), this.
4070
- channel.on(ii, this.onForceReRender.bind(this)), this.channel.on(si, this.onForceRemount.bind(this));
4058
+ this.channel.on(Ci, this.onStoryIndexChanged.bind(this)), this.channel.on(vi, this.onUpdateGlobals.bind(this)), this.channel.on(Pi, this.
4059
+ onUpdateArgs.bind(this)), this.channel.on(Si, this.onRequestArgTypesInfo.bind(this)), this.channel.on(wi, this.onResetArgs.bind(this)), this.
4060
+ channel.on(Ri, this.onForceReRender.bind(this)), this.channel.on(xi, this.onForceRemount.bind(this));
4071
4061
  }
4072
4062
  async getProjectAnnotationsOrRenderError() {
4073
4063
  try {
4074
4064
  let e = await this.getProjectAnnotations();
4075
4065
  if (this.renderToCanvas = e.renderToCanvas, !this.renderToCanvas)
4076
- throw new fi();
4066
+ throw new Fi();
4077
4067
  return e;
4078
4068
  } catch (e) {
4079
4069
  throw this.renderPreviewEntryError("Error reading preview.js:", e), e;
@@ -4097,10 +4087,10 @@ var { fetch: gi } = hi, bi = "./index.json", be = class {
4097
4087
  }
4098
4088
  }
4099
4089
  async getStoryIndexFromServer() {
4100
- let e = await gi(bi);
4090
+ let e = await ki(ji);
4101
4091
  if (e.status === 200)
4102
4092
  return e.json();
4103
- throw new yi({ text: await e.text() });
4093
+ throw new Ii({ text: await e.text() });
4104
4094
  }
4105
4095
  // If initialization gets as far as the story index, this function runs.
4106
4096
  initializeWithStoryIndex(e) {
@@ -4122,7 +4112,7 @@ var { fetch: gi } = hi, bi = "./index.json", be = class {
4122
4112
  globals: this.storyStoreValue.userGlobals.get() || {},
4123
4113
  globalTypes: this.storyStoreValue.projectAnnotations.globalTypes || {}
4124
4114
  };
4125
- this.channel.emit(li, e);
4115
+ this.channel.emit(Ei, e);
4126
4116
  }
4127
4117
  // EVENT HANDLERS
4128
4118
  // This happens when a config file gets reloaded
@@ -4167,7 +4157,7 @@ var { fetch: gi } = hi, bi = "./index.json", be = class {
4167
4157
  throw new V({ methodName: "onUpdateGlobals" });
4168
4158
  if (this.storyStoreValue.userGlobals.update(e), t) {
4169
4159
  let { initialGlobals: o, storyGlobals: s, userGlobals: i, globals: a } = this.storyStoreValue.getStoryContext(t);
4170
- this.channel.emit(wo, {
4160
+ this.channel.emit(qo, {
4171
4161
  initialGlobals: o,
4172
4162
  userGlobals: i,
4173
4163
  storyGlobals: s,
@@ -4175,7 +4165,7 @@ var { fetch: gi } = hi, bi = "./index.json", be = class {
4175
4165
  });
4176
4166
  } else {
4177
4167
  let { initialGlobals: o, globals: s } = this.storyStoreValue.userGlobals;
4178
- this.channel.emit(wo, {
4168
+ this.channel.emit(qo, {
4179
4169
  initialGlobals: o,
4180
4170
  userGlobals: s,
4181
4171
  storyGlobals: {},
@@ -4195,7 +4185,7 @@ var { fetch: gi } = hi, bi = "./index.json", be = class {
4195
4185
  o.story && o.story.usesMount ? o.remount() : o.rerender()
4196
4186
  )
4197
4187
  )
4198
- ), this.channel.emit(ci, {
4188
+ ), this.channel.emit(Ai, {
4199
4189
  storyId: e,
4200
4190
  args: this.storyStoreValue.args.get(e)
4201
4191
  });
@@ -4204,14 +4194,14 @@ var { fetch: gi } = hi, bi = "./index.json", be = class {
4204
4194
  try {
4205
4195
  await this.storeInitializationPromise;
4206
4196
  let o = await this.storyStoreValue?.loadStory(t);
4207
- this.channel.emit(Ro, {
4197
+ this.channel.emit(No, {
4208
4198
  id: e,
4209
4199
  success: !0,
4210
4200
  payload: { argTypes: o?.argTypes || {} },
4211
4201
  error: null
4212
4202
  });
4213
4203
  } catch (o) {
4214
- this.channel.emit(Ro, {
4204
+ this.channel.emit(No, {
4215
4205
  id: e,
4216
4206
  success: !1,
4217
4207
  error: o?.message
@@ -4284,57 +4274,59 @@ var { fetch: gi } = hi, bi = "./index.json", be = class {
4284
4274
  }
4285
4275
  // UTILITIES
4286
4276
  renderPreviewEntryError(e, t) {
4287
- this.previewEntryError = t, xo.error(e), xo.error(t), this.channel.emit(ni, t);
4277
+ this.previewEntryError = t, _o.error(e), _o.error(t), this.channel.emit(Ti, t);
4288
4278
  }
4289
4279
  };
4280
+ n(Xr, "Preview");
4281
+ var be = Xr;
4290
4282
 
4291
4283
  // src/preview-api/modules/preview-web/PreviewWeb.tsx
4292
- import { global as nl } from "@storybook/global";
4284
+ import { global as Tl } from "@storybook/global";
4293
4285
 
4294
4286
  // src/preview-api/modules/preview-web/PreviewWithSelection.tsx
4295
- import { logger as er } from "storybook/internal/client-logger";
4287
+ import { logger as rr } from "storybook/internal/client-logger";
4296
4288
  import {
4297
- CURRENT_STORY_WAS_SET as Eo,
4298
- DOCS_PREPARED as wi,
4299
- GLOBALS_UPDATED as Ao,
4300
- PRELOAD_ENTRIES as Ei,
4301
- PREVIEW_KEYDOWN as Ai,
4302
- SET_CURRENT_STORY as Ci,
4303
- STORY_CHANGED as vi,
4304
- STORY_ERRORED as Pi,
4305
- STORY_MISSING as Co,
4306
- STORY_PREPARED as Fi,
4307
- STORY_RENDER_PHASE_CHANGED as vo,
4308
- STORY_SPECIFIED as Ii,
4309
- STORY_THREW_EXCEPTION as Oi,
4310
- STORY_UNCHANGED as Di,
4311
- UPDATE_QUERY_PARAMS as ki
4289
+ CURRENT_STORY_WAS_SET as Bo,
4290
+ DOCS_PREPARED as qi,
4291
+ GLOBALS_UPDATED as zo,
4292
+ PRELOAD_ENTRIES as Bi,
4293
+ PREVIEW_KEYDOWN as zi,
4294
+ SET_CURRENT_STORY as Gi,
4295
+ STORY_CHANGED as Ui,
4296
+ STORY_ERRORED as Hi,
4297
+ STORY_MISSING as Go,
4298
+ STORY_PREPARED as Vi,
4299
+ STORY_RENDER_PHASE_CHANGED as Uo,
4300
+ STORY_SPECIFIED as Wi,
4301
+ STORY_THREW_EXCEPTION as $i,
4302
+ STORY_UNCHANGED as Yi,
4303
+ UPDATE_QUERY_PARAMS as Ki
4312
4304
  } from "storybook/internal/core-events";
4313
4305
  import {
4314
- CalledPreviewMethodBeforeInitializationError as Gr,
4315
- EmptyIndexError as ji,
4316
- MdxFileWithNoCsfReferencesError as Mi,
4317
- NoStoryMatchError as _i
4306
+ CalledPreviewMethodBeforeInitializationError as rt,
4307
+ EmptyIndexError as Xi,
4308
+ MdxFileWithNoCsfReferencesError as Ji,
4309
+ NoStoryMatchError as Qi
4318
4310
  } from "storybook/internal/preview-errors";
4319
4311
 
4320
4312
  // ../node_modules/tiny-invariant/dist/esm/tiny-invariant.js
4321
- var Si = !1, zr = "Invariant failed";
4322
- function Ze(r, e) {
4313
+ var Mi = !1, Jr = "Invariant failed";
4314
+ function er(r, e) {
4323
4315
  if (!r) {
4324
- if (Si)
4325
- throw new Error(zr);
4326
- var t = typeof e == "function" ? e() : e, o = t ? "".concat(zr, ": ").concat(t) : zr;
4316
+ if (Mi)
4317
+ throw new Error(Jr);
4318
+ var t = typeof e == "function" ? e() : e, o = t ? "".concat(Jr, ": ").concat(t) : Jr;
4327
4319
  throw new Error(o);
4328
4320
  }
4329
4321
  }
4330
- n(Ze, "invariant");
4322
+ n(er, "invariant");
4331
4323
 
4332
4324
  // src/preview-api/modules/preview-web/render/CsfDocsRender.ts
4333
- import { DOCS_RENDERED as xi } from "storybook/internal/core-events";
4325
+ import { DOCS_RENDERED as _i } from "storybook/internal/core-events";
4334
4326
 
4335
4327
  // src/preview-api/modules/preview-web/docs-context/DocsContext.ts
4336
- import { isStory as Ti } from "storybook/internal/csf";
4337
- var J = class {
4328
+ import { isStory as Li } from "storybook/internal/csf";
4329
+ var Qr = class Qr {
4338
4330
  constructor(e, t, o, s) {
4339
4331
  this.channel = e;
4340
4332
  this.store = t;
@@ -4373,9 +4365,6 @@ mCSFFile");
4373
4365
  this.referenceCSFFile(i);
4374
4366
  });
4375
4367
  }
4376
- static {
4377
- n(this, "DocsContext");
4378
- }
4379
4368
  // This docs entry references this CSF file and can synchronously load the stories, as well
4380
4369
  // as reference them by module export. If the CSF is part of the "component" stories, they
4381
4370
  // can also be referenced by name and are in the componentStories list.
@@ -4437,7 +4426,7 @@ CSF file?"
4437
4426
  if (t)
4438
4427
  return { type: "meta", csfFile: t };
4439
4428
  let o = this.exportToStory.get(
4440
- Ti(e) ? e.input : e
4429
+ Li(e) ? e.input : e
4441
4430
  );
4442
4431
  return o ? { type: "story", story: o } : { type: "component", component: e };
4443
4432
  }
@@ -4475,9 +4464,11 @@ CSF file?"
4475
4464
  }
4476
4465
  }
4477
4466
  };
4467
+ n(Qr, "DocsContext");
4468
+ var J = Qr;
4478
4469
 
4479
4470
  // src/preview-api/modules/preview-web/render/CsfDocsRender.ts
4480
- var Me = class {
4471
+ var Zr = class Zr {
4481
4472
  constructor(e, t, o, s) {
4482
4473
  this.channel = e;
4483
4474
  this.store = t;
@@ -4490,9 +4481,6 @@ var Me = class {
4490
4481
  this.preparing = !1;
4491
4482
  this.id = o.id;
4492
4483
  }
4493
- static {
4494
- n(this, "CsfDocsRender");
4495
- }
4496
4484
  isPreparing() {
4497
4485
  return this.preparing;
4498
4486
  }
@@ -4532,7 +4520,7 @@ var Me = class {
4532
4520
  );
4533
4521
  let i = await s.renderer(), { render: a } = i, l = /* @__PURE__ */ n(async () => {
4534
4522
  try {
4535
- await a(o, s, e), this.channel.emit(xi, this.id);
4523
+ await a(o, s, e), this.channel.emit(_i, this.id);
4536
4524
  } catch (c) {
4537
4525
  this.callbacks.showException(c);
4538
4526
  }
@@ -4545,10 +4533,12 @@ var Me = class {
4545
4533
  this.teardownRender?.({ viewModeChanged: e }), this.torndown = !0;
4546
4534
  }
4547
4535
  };
4536
+ n(Zr, "CsfDocsRender");
4537
+ var Me = Zr;
4548
4538
 
4549
4539
  // src/preview-api/modules/preview-web/render/MdxDocsRender.ts
4550
- import { DOCS_RENDERED as Ri } from "storybook/internal/core-events";
4551
- var _e = class {
4540
+ import { DOCS_RENDERED as Ni } from "storybook/internal/core-events";
4541
+ var et = class et {
4552
4542
  constructor(e, t, o, s) {
4553
4543
  this.channel = e;
4554
4544
  this.store = t;
@@ -4561,9 +4551,6 @@ var _e = class {
4561
4551
  this.preparing = !1;
4562
4552
  this.id = o.id;
4563
4553
  }
4564
- static {
4565
- n(this, "MdxDocsRender");
4566
- }
4567
4554
  isPreparing() {
4568
4555
  return this.preparing;
4569
4556
  }
@@ -4597,7 +4584,7 @@ var _e = class {
4597
4584
  );
4598
4585
  let i = { ...s, page: this.exports.default }, a = await s.renderer(), { render: l } = a, c = /* @__PURE__ */ n(async () => {
4599
4586
  try {
4600
- await l(o, i, e), this.channel.emit(Ri, this.id);
4587
+ await l(o, i, e), this.channel.emit(Ni, this.id);
4601
4588
  } catch (d) {
4602
4589
  this.callbacks.showException(d);
4603
4590
  }
@@ -4610,32 +4597,34 @@ var _e = class {
4610
4597
  this.teardownRender?.({ viewModeChanged: e }), this.torndown = !0;
4611
4598
  }
4612
4599
  };
4600
+ n(et, "MdxDocsRender");
4601
+ var Le = et;
4613
4602
 
4614
4603
  // src/preview-api/modules/preview-web/PreviewWithSelection.tsx
4615
- var Li = globalThis;
4616
- function Ni(r) {
4604
+ var Zi = globalThis;
4605
+ function ea(r) {
4617
4606
  let e = r.composedPath && r.composedPath()[0] || r.target;
4618
4607
  return /input|textarea/i.test(e.tagName) || e.getAttribute("contenteditable") !== null;
4619
4608
  }
4620
- n(Ni, "focusInInput");
4621
- var Po = "attached-mdx", qi = "unattached-mdx";
4622
- function Bi({ tags: r }) {
4623
- return r?.includes(qi) || r?.includes(Po);
4609
+ n(ea, "focusInInput");
4610
+ var Ho = "attached-mdx", ra = "unattached-mdx";
4611
+ function ta({ tags: r }) {
4612
+ return r?.includes(ra) || r?.includes(Ho);
4624
4613
  }
4625
- n(Bi, "isMdxEntry");
4626
- function Ur(r) {
4614
+ n(ta, "isMdxEntry");
4615
+ function tt(r) {
4627
4616
  return r.type === "story";
4628
4617
  }
4629
- n(Ur, "isStoryRender");
4630
- function zi(r) {
4618
+ n(tt, "isStoryRender");
4619
+ function oa(r) {
4631
4620
  return r.type === "docs";
4632
4621
  }
4633
- n(zi, "isDocsRender");
4634
- function Gi(r) {
4635
- return zi(r) && r.subtype === "csf";
4622
+ n(oa, "isDocsRender");
4623
+ function na(r) {
4624
+ return oa(r) && r.subtype === "csf";
4636
4625
  }
4637
- n(Gi, "isCsfDocsRender");
4638
- var Se = class extends be {
4626
+ n(na, "isCsfDocsRender");
4627
+ var ot = class ot extends be {
4639
4628
  constructor(t, o, s, i) {
4640
4629
  super(t, o, void 0, !1);
4641
4630
  this.importFn = t;
@@ -4644,16 +4633,13 @@ var Se = class extends be {
4644
4633
  this.view = i;
4645
4634
  this.initialize();
4646
4635
  }
4647
- static {
4648
- n(this, "PreviewWithSelection");
4649
- }
4650
4636
  setupListeners() {
4651
- super.setupListeners(), Li.onkeydown = this.onKeydown.bind(this), this.channel.on(Ci, this.onSetCurrentStory.bind(this)), this.channel.on(
4652
- ki, this.onUpdateQueryParams.bind(this)), this.channel.on(Ei, this.onPreloadStories.bind(this));
4637
+ super.setupListeners(), Zi.onkeydown = this.onKeydown.bind(this), this.channel.on(Gi, this.onSetCurrentStory.bind(this)), this.channel.on(
4638
+ Ki, this.onUpdateQueryParams.bind(this)), this.channel.on(Bi, this.onPreloadStories.bind(this));
4653
4639
  }
4654
4640
  async setInitialGlobals() {
4655
4641
  if (!this.storyStoreValue)
4656
- throw new Gr({ methodName: "setInitialGlobals" });
4642
+ throw new rt({ methodName: "setInitialGlobals" });
4657
4643
  let { globals: t } = this.selectionStore.selectionSpecifier || {};
4658
4644
  t && this.storyStoreValue.userGlobals.updateFromPersisted(t), this.emitGlobals();
4659
4645
  }
@@ -4664,7 +4650,7 @@ var Se = class extends be {
4664
4650
  // Use the selection specifier to choose a story, then render it
4665
4651
  async selectSpecifiedStory() {
4666
4652
  if (!this.storyStoreValue)
4667
- throw new Gr({
4653
+ throw new rt({
4668
4654
  methodName: "selectSpecifiedStory"
4669
4655
  });
4670
4656
  if (this.selectionStore.selection) {
@@ -4677,14 +4663,14 @@ var Se = class extends be {
4677
4663
  }
4678
4664
  let { storySpecifier: t, args: o } = this.selectionStore.selectionSpecifier, s = this.storyStoreValue.storyIndex.entryFromSpecifier(t);
4679
4665
  if (!s) {
4680
- t === "*" ? this.renderStoryLoadingException(t, new ji()) : this.renderStoryLoadingException(
4666
+ t === "*" ? this.renderStoryLoadingException(t, new Xi()) : this.renderStoryLoadingException(
4681
4667
  t,
4682
- new _i({ storySpecifier: t.toString() })
4668
+ new Qi({ storySpecifier: t.toString() })
4683
4669
  );
4684
4670
  return;
4685
4671
  }
4686
4672
  let { id: i, type: a } = s;
4687
- this.selectionStore.setSelection({ storyId: i, viewMode: a }), this.channel.emit(Ii, this.selectionStore.selection), this.channel.emit(Eo,
4673
+ this.selectionStore.setSelection({ storyId: i, viewMode: a }), this.channel.emit(Wi, this.selectionStore.selection), this.channel.emit(Bo,
4688
4674
  this.selectionStore.selection), await this.renderSelection({ persistedArgs: o });
4689
4675
  }
4690
4676
  // EVENT HANDLERS
@@ -4703,15 +4689,15 @@ var Se = class extends be {
4703
4689
  selectSpecifiedStory();
4704
4690
  }
4705
4691
  onKeydown(t) {
4706
- if (!this.storyRenders.find((o) => o.disableKeyListeners) && !Ni(t)) {
4692
+ if (!this.storyRenders.find((o) => o.disableKeyListeners) && !ea(t)) {
4707
4693
  let { altKey: o, ctrlKey: s, metaKey: i, shiftKey: a, key: l, code: c, keyCode: d } = t;
4708
- this.channel.emit(Ai, {
4694
+ this.channel.emit(zi, {
4709
4695
  event: { altKey: o, ctrlKey: s, metaKey: i, shiftKey: a, key: l, code: c, keyCode: d }
4710
4696
  });
4711
4697
  }
4712
4698
  }
4713
4699
  async onSetCurrentStory(t) {
4714
- this.selectionStore.setSelection({ viewMode: "story", ...t }), await this.storeInitializationPromise, this.channel.emit(Eo, this.selectionStore.
4700
+ this.selectionStore.setSelection({ viewMode: "story", ...t }), await this.storeInitializationPromise, this.channel.emit(Bo, this.selectionStore.
4715
4701
  selection), this.renderSelection();
4716
4702
  }
4717
4703
  onUpdateQueryParams(t) {
@@ -4719,7 +4705,7 @@ var Se = class extends be {
4719
4705
  }
4720
4706
  async onUpdateGlobals({ globals: t }) {
4721
4707
  let o = this.currentRender instanceof ie && this.currentRender.story || void 0;
4722
- super.onUpdateGlobals({ globals: t, currentStory: o }), (this.currentRender instanceof _e || this.currentRender instanceof Me) && await this.
4708
+ super.onUpdateGlobals({ globals: t, currentStory: o }), (this.currentRender instanceof Le || this.currentRender instanceof Me) && await this.
4723
4709
  currentRender.rerender?.();
4724
4710
  }
4725
4711
  async onUpdateArgs({ storyId: t, updatedArgs: o }) {
@@ -4737,15 +4723,15 @@ var Se = class extends be {
4737
4723
  async renderSelection({ persistedArgs: t } = {}) {
4738
4724
  let { renderToCanvas: o } = this;
4739
4725
  if (!this.storyStoreValue || !o)
4740
- throw new Gr({ methodName: "renderSelection" });
4726
+ throw new rt({ methodName: "renderSelection" });
4741
4727
  let { selection: s } = this.selectionStore;
4742
4728
  if (!s)
4743
4729
  throw new Error("Cannot call renderSelection as no selection was made");
4744
4730
  let { storyId: i } = s, a;
4745
4731
  try {
4746
4732
  a = await this.storyStoreValue.storyIdToEntry(i);
4747
- } catch (g) {
4748
- this.currentRender && await this.teardownRender(this.currentRender), this.renderStoryLoadingException(i, g);
4733
+ } catch (h) {
4734
+ this.currentRender && await this.teardownRender(this.currentRender), this.renderStoryLoadingException(i, h);
4749
4735
  return;
4750
4736
  }
4751
4737
  let l = this.currentSelection?.storyId !== i, c = this.currentRender?.type !== a.type;
@@ -4759,7 +4745,7 @@ var Se = class extends be {
4759
4745
  this.mainStoryCallbacks(i),
4760
4746
  i,
4761
4747
  "story"
4762
- ) : Bi(a) ? d = new _e(
4748
+ ) : ta(a) ? d = new Le(
4763
4749
  this.channel,
4764
4750
  this.storyStoreValue,
4765
4751
  a,
@@ -4776,54 +4762,54 @@ var Se = class extends be {
4776
4762
  this.currentRender = d;
4777
4763
  try {
4778
4764
  await d.prepare();
4779
- } catch (g) {
4780
- u && await this.teardownRender(u), g !== X && this.renderStoryLoadingException(i, g);
4765
+ } catch (h) {
4766
+ u && await this.teardownRender(u), h !== X && this.renderStoryLoadingException(i, h);
4781
4767
  return;
4782
4768
  }
4783
4769
  let y = !l && u && !d.isEqual(u);
4784
- if (t && Ur(d) && (Ze(!!d.story), this.storyStoreValue.args.updateFromPersisted(d.story, t)), u && !u.torndown && !l && !y && !c) {
4785
- this.currentRender = u, this.channel.emit(Di, i), this.view.showMain();
4770
+ if (t && tt(d) && (er(!!d.story), this.storyStoreValue.args.updateFromPersisted(d.story, t)), u && !u.torndown && !l && !y && !c) {
4771
+ this.currentRender = u, this.channel.emit(Yi, i), this.view.showMain();
4786
4772
  return;
4787
4773
  }
4788
- if (u && await this.teardownRender(u, { viewModeChanged: c }), p && (l || c) && this.channel.emit(vi, i), Ur(d)) {
4789
- Ze(!!d.story);
4774
+ if (u && await this.teardownRender(u, { viewModeChanged: c }), p && (l || c) && this.channel.emit(Ui, i), tt(d)) {
4775
+ er(!!d.story);
4790
4776
  let {
4791
- parameters: g,
4792
- initialArgs: b,
4793
- argTypes: S,
4794
- unmappedArgs: h,
4777
+ parameters: h,
4778
+ initialArgs: g,
4779
+ argTypes: b,
4780
+ unmappedArgs: m,
4795
4781
  initialGlobals: T,
4796
- userGlobals: m,
4782
+ userGlobals: x,
4797
4783
  storyGlobals: f,
4798
- globals: x
4784
+ globals: S
4799
4785
  } = this.storyStoreValue.getStoryContext(d.story);
4800
- this.channel.emit(Fi, {
4786
+ this.channel.emit(Vi, {
4801
4787
  id: i,
4802
- parameters: g,
4803
- initialArgs: b,
4804
- argTypes: S,
4805
- args: h
4806
- }), this.channel.emit(Ao, { userGlobals: m, storyGlobals: f, globals: x, initialGlobals: T });
4788
+ parameters: h,
4789
+ initialArgs: g,
4790
+ argTypes: b,
4791
+ args: m
4792
+ }), this.channel.emit(zo, { userGlobals: x, storyGlobals: f, globals: S, initialGlobals: T });
4807
4793
  } else {
4808
- let { parameters: g } = this.storyStoreValue.projectAnnotations, { initialGlobals: b, globals: S } = this.storyStoreValue.userGlobals;
4809
- if (this.channel.emit(Ao, {
4810
- globals: S,
4811
- initialGlobals: b,
4794
+ let { parameters: h } = this.storyStoreValue.projectAnnotations, { initialGlobals: g, globals: b } = this.storyStoreValue.userGlobals;
4795
+ if (this.channel.emit(zo, {
4796
+ globals: b,
4797
+ initialGlobals: g,
4812
4798
  storyGlobals: {},
4813
- userGlobals: S
4814
- }), Gi(d) || d.entry.tags?.includes(Po)) {
4799
+ userGlobals: b
4800
+ }), na(d) || d.entry.tags?.includes(Ho)) {
4815
4801
  if (!d.csfFiles)
4816
- throw new Mi({ storyId: i });
4817
- ({ parameters: g } = this.storyStoreValue.preparedMetaFromCSFFile({
4802
+ throw new Ji({ storyId: i });
4803
+ ({ parameters: h } = this.storyStoreValue.preparedMetaFromCSFFile({
4818
4804
  csfFile: d.csfFiles[0]
4819
4805
  }));
4820
4806
  }
4821
- this.channel.emit(wi, {
4807
+ this.channel.emit(qi, {
4822
4808
  id: i,
4823
- parameters: g
4809
+ parameters: h
4824
4810
  });
4825
4811
  }
4826
- Ur(d) ? (Ze(!!d.story), this.storyRenders.push(d), this.currentRender.renderToElement(
4812
+ tt(d) ? (er(!!d.story), this.storyRenders.push(d), this.currentRender.renderToElement(
4827
4813
  this.view.prepareForStory(d.story)
4828
4814
  )) : this.currentRender.renderToElement(
4829
4815
  this.view.prepareForDocs(),
@@ -4847,39 +4833,41 @@ var Se = class extends be {
4847
4833
  super.renderPreviewEntryError(t, o), this.view.showErrorDisplay(o);
4848
4834
  }
4849
4835
  renderMissingStory() {
4850
- this.view.showNoPreview(), this.channel.emit(Co);
4836
+ this.view.showNoPreview(), this.channel.emit(Go);
4851
4837
  }
4852
4838
  renderStoryLoadingException(t, o) {
4853
- er.error(o), this.view.showErrorDisplay(o), this.channel.emit(Co, t);
4839
+ rr.error(o), this.view.showErrorDisplay(o), this.channel.emit(Go, t);
4854
4840
  }
4855
4841
  // renderException is used if we fail to render the story and it is uncaught by the app layer
4856
4842
  renderException(t, o) {
4857
4843
  let { name: s = "Error", message: i = String(o), stack: a } = o;
4858
- this.channel.emit(Oi, { name: s, message: i, stack: a }), this.channel.emit(vo, { newPhase: "errored", storyId: t }), this.view.showErrorDisplay(
4859
- o), er.error(`Error rendering story '${t}':`), er.error(o);
4844
+ this.channel.emit($i, { name: s, message: i, stack: a }), this.channel.emit(Uo, { newPhase: "errored", storyId: t }), this.view.showErrorDisplay(
4845
+ o), rr.error(`Error rendering story '${t}':`), rr.error(o);
4860
4846
  }
4861
4847
  // renderError is used by the various app layers to inform the user they have done something
4862
4848
  // wrong -- for instance returned the wrong thing from a story
4863
4849
  renderError(t, { title: o, description: s }) {
4864
- er.error(`Error rendering story ${o}: ${s}`), this.channel.emit(Pi, { title: o, description: s }), this.channel.emit(vo, { newPhase: "er\
4850
+ rr.error(`Error rendering story ${o}: ${s}`), this.channel.emit(Hi, { title: o, description: s }), this.channel.emit(Uo, { newPhase: "er\
4865
4851
  rored", storyId: t }), this.view.showErrorDisplay({
4866
4852
  message: o,
4867
4853
  stack: s
4868
4854
  });
4869
4855
  }
4870
4856
  };
4857
+ n(ot, "PreviewWithSelection");
4858
+ var Se = ot;
4871
4859
 
4872
4860
  // src/preview-api/modules/preview-web/UrlStore.ts
4873
- var Ne = ue(sr(), 1);
4874
- import { global as ga } from "@storybook/global";
4861
+ var Ne = ue(ir(), 1);
4862
+ import { global as ka } from "@storybook/global";
4875
4863
 
4876
4864
  // src/preview-api/modules/preview-web/parseArgsParam.ts
4877
- import { once as ya } from "storybook/internal/client-logger";
4878
- var zo = ue(sr(), 1);
4879
- var Bo = /^[a-zA-Z0-9 _-]*$/, Go = /^-?[0-9]+(\.[0-9]+)?$/, ma = /^#([a-f0-9]{3,4}|[a-f0-9]{6}|[a-f0-9]{8})$/i, Uo = /^(rgba?|hsla?)\(([0-9]{1,3}),\s?([0-9]{1,3})%?,\s?([0-9]{1,3})%?,?\s?([0-9](\.[0-9]{1,2})?)?\)$/i,
4880
- Xr = /* @__PURE__ */ n((r = "", e) => r === null || r === "" || !Bo.test(r) ? !1 : e == null || e instanceof Date || typeof e == "number" ||
4881
- typeof e == "boolean" ? !0 : typeof e == "string" ? Bo.test(e) || Go.test(e) || ma.test(e) || Uo.test(e) : Array.isArray(e) ? e.every((t) => Xr(
4882
- r, t)) : k(e) ? Object.entries(e).every(([t, o]) => Xr(t, o)) : !1, "validateArgs"), ha = {
4865
+ import { once as Ia } from "storybook/internal/client-logger";
4866
+ var on = ue(ir(), 1);
4867
+ var tn = /^[a-zA-Z0-9 _-]*$/, nn = /^-?[0-9]+(\.[0-9]+)?$/, Oa = /^#([a-f0-9]{3,4}|[a-f0-9]{6}|[a-f0-9]{8})$/i, sn = /^(rgba?|hsla?)\(([0-9]{1,3}),\s?([0-9]{1,3})%?,\s?([0-9]{1,3})%?,?\s?([0-9](\.[0-9]{1,2})?)?\)$/i,
4868
+ dt = /* @__PURE__ */ n((r = "", e) => r === null || r === "" || !tn.test(r) ? !1 : e == null || e instanceof Date || typeof e == "number" ||
4869
+ typeof e == "boolean" ? !0 : typeof e == "string" ? tn.test(e) || nn.test(e) || Oa.test(e) || sn.test(e) : Array.isArray(e) ? e.every((t) => dt(
4870
+ r, t)) : k(e) ? Object.entries(e).every(([t, o]) => dt(t, o)) : !1, "validateArgs"), Da = {
4883
4871
  delimiter: ";",
4884
4872
  // we're parsing a single query param
4885
4873
  nesting: !0,
@@ -4901,17 +4889,17 @@ r, t)) : k(e) ? Object.entries(e).every(([t, o]) => Xr(t, o)) : !1, "validateArg
4901
4889
  return new Date(r.replaceAll(" ", "+").slice(6, -1));
4902
4890
  if (r.startsWith("!hex(") && r.endsWith(")"))
4903
4891
  return `#${r.slice(5, -1)}`;
4904
- let e = r.slice(1).match(Uo);
4892
+ let e = r.slice(1).match(sn);
4905
4893
  if (e)
4906
4894
  return r.startsWith("!rgba") || r.startsWith("!RGBA") ? `${e[1]}(${e[2]}, ${e[3]}, ${e[4]}, ${e[5]})` : r.startsWith("!hsla") || r.startsWith(
4907
4895
  "!HSLA") ? `${e[1]}(${e[2]}, ${e[3]}%, ${e[4]}%, ${e[5]})` : r.startsWith("!rgb") || r.startsWith("!RGB") ? `${e[1]}(${e[2]}, ${e[3]}\
4908
4896
  , ${e[4]})` : `${e[1]}(${e[2]}, ${e[3]}%, ${e[4]}%)`;
4909
4897
  }
4910
- return Go.test(r) ? Number(r) : r;
4898
+ return nn.test(r) ? Number(r) : r;
4911
4899
  }
4912
- }, Jr = /* @__PURE__ */ n((r) => {
4900
+ }, pt = /* @__PURE__ */ n((r) => {
4913
4901
  let e = r.split(";").map((t) => t.replace("=", "~").replace(":", "="));
4914
- return Object.entries((0, zo.parse)(e.join(";"), ha)).reduce((t, [o, s]) => Xr(o, s) ? Object.assign(t, { [o]: s }) : (ya.warn(P`
4902
+ return Object.entries((0, on.parse)(e.join(";"), Da)).reduce((t, [o, s]) => dt(o, s) ? Object.assign(t, { [o]: s }) : (Ia.warn(P`
4915
4903
  Omitted potentially unsafe URL args.
4916
4904
 
4917
4905
  More info: https://storybook.js.org/docs/writing-stories/args#setting-args-through-the-url
@@ -4919,15 +4907,15 @@ r, t)) : k(e) ? Object.entries(e).every(([t, o]) => Xr(t, o)) : !1, "validateArg
4919
4907
  }, "parseArgsParam");
4920
4908
 
4921
4909
  // src/preview-api/modules/preview-web/UrlStore.ts
4922
- var { history: Ho, document: Q } = ga;
4923
- function ba(r) {
4910
+ var { history: an, document: Q } = ka;
4911
+ function ja(r) {
4924
4912
  let e = (r || "").match(/^\/story\/(.+)/);
4925
4913
  if (!e)
4926
4914
  throw new Error(`Invalid path '${r}', must start with '/story/'`);
4927
4915
  return e[1];
4928
4916
  }
4929
- n(ba, "pathToId");
4930
- var Vo = /* @__PURE__ */ n(({
4917
+ n(ja, "pathToId");
4918
+ var ln = /* @__PURE__ */ n(({
4931
4919
  selection: r,
4932
4920
  extraParams: e
4933
4921
  }) => {
@@ -4937,71 +4925,70 @@ var Vo = /* @__PURE__ */ n(({
4937
4925
  ...e,
4938
4926
  ...r && { id: r.storyId, viewMode: r.viewMode }
4939
4927
  })}`;
4940
- }, "getQueryString"), Sa = /* @__PURE__ */ n((r) => {
4928
+ }, "getQueryString"), Ma = /* @__PURE__ */ n((r) => {
4941
4929
  if (!r)
4942
4930
  return;
4943
- let e = Vo({ selection: r }), { hash: t = "" } = Q.location;
4944
- Q.title = r.storyId, Ho.replaceState({}, "", `${Q.location.pathname}${e}${t}`);
4945
- }, "setPath"), Ta = /* @__PURE__ */ n((r) => r != null && typeof r == "object" && Array.isArray(r) === !1, "isObject"), Le = /* @__PURE__ */ n(
4931
+ let e = ln({ selection: r }), { hash: t = "" } = Q.location;
4932
+ Q.title = r.storyId, an.replaceState({}, "", `${Q.location.pathname}${e}${t}`);
4933
+ }, "setPath"), La = /* @__PURE__ */ n((r) => r != null && typeof r == "object" && Array.isArray(r) === !1, "isObject"), _e = /* @__PURE__ */ n(
4946
4934
  (r) => {
4947
4935
  if (r !== void 0) {
4948
4936
  if (typeof r == "string")
4949
4937
  return r;
4950
4938
  if (Array.isArray(r))
4951
- return Le(r[0]);
4952
- if (Ta(r))
4953
- return Le(
4939
+ return _e(r[0]);
4940
+ if (La(r))
4941
+ return _e(
4954
4942
  Object.values(r).filter(Boolean)
4955
4943
  );
4956
4944
  }
4957
- }, "getFirstString"), xa = /* @__PURE__ */ n(() => {
4945
+ }, "getFirstString"), _a = /* @__PURE__ */ n(() => {
4958
4946
  if (typeof Q < "u") {
4959
- let r = Q.location.search.slice(1), e = (0, Ne.parse)(r), t = typeof e.args == "string" ? Jr(e.args) : void 0, o = typeof e.globals == "\
4960
- string" ? Jr(e.globals) : void 0, s = Le(e.viewMode);
4947
+ let r = Q.location.search.slice(1), e = (0, Ne.parse)(r), t = typeof e.args == "string" ? pt(e.args) : void 0, o = typeof e.globals == "\
4948
+ string" ? pt(e.globals) : void 0, s = _e(e.viewMode);
4961
4949
  (typeof s != "string" || !s.match(/docs|story/)) && (s = "story");
4962
- let i = Le(e.path), a = i ? ba(i) : Le(e.id);
4950
+ let i = _e(e.path), a = i ? ja(i) : _e(e.id);
4963
4951
  if (a)
4964
4952
  return { storySpecifier: a, args: t, globals: o, viewMode: s };
4965
4953
  }
4966
4954
  return null;
4967
- }, "getSelectionSpecifierFromPath"), Te = class {
4968
- static {
4969
- n(this, "UrlStore");
4970
- }
4955
+ }, "getSelectionSpecifierFromPath"), ut = class ut {
4971
4956
  constructor() {
4972
- this.selectionSpecifier = xa();
4957
+ this.selectionSpecifier = _a();
4973
4958
  }
4974
4959
  setSelection(e) {
4975
- this.selection = e, Sa(this.selection);
4960
+ this.selection = e, Ma(this.selection);
4976
4961
  }
4977
4962
  setQueryParams(e) {
4978
- let t = Vo({ extraParams: e }), { hash: o = "" } = Q.location;
4979
- Ho.replaceState({}, "", `${Q.location.pathname}${t}${o}`);
4963
+ let t = ln({ extraParams: e }), { hash: o = "" } = Q.location;
4964
+ an.replaceState({}, "", `${Q.location.pathname}${t}${o}`);
4980
4965
  }
4981
4966
  };
4967
+ n(ut, "UrlStore");
4968
+ var Te = ut;
4982
4969
 
4983
4970
  // src/preview-api/modules/preview-web/WebView.ts
4984
- var En = ue(xn(), 1), An = ue(sr(), 1);
4985
- import { logger as tl } from "storybook/internal/client-logger";
4986
- import { global as ol } from "@storybook/global";
4987
- var { document: D } = ol, Rn = 100, Cn = /* @__PURE__ */ ((i) => (i.MAIN = "MAIN", i.NOPREVIEW = "NOPREVIEW", i.PREPARING_STORY = "PREPARING\
4988
- _STORY", i.PREPARING_DOCS = "PREPARING_DOCS", i.ERROR = "ERROR", i))(Cn || {}), nt = {
4971
+ var Bn = ue(_n(), 1), zn = ue(ir(), 1);
4972
+ import { logger as bl } from "storybook/internal/client-logger";
4973
+ import { global as Sl } from "@storybook/global";
4974
+ var { document: D } = Sl, Nn = 100, Gn = /* @__PURE__ */ ((i) => (i.MAIN = "MAIN", i.NOPREVIEW = "NOPREVIEW", i.PREPARING_STORY = "PREPARING\
4975
+ _STORY", i.PREPARING_DOCS = "PREPARING_DOCS", i.ERROR = "ERROR", i))(Gn || {}), St = {
4989
4976
  PREPARING_STORY: "sb-show-preparing-story",
4990
4977
  PREPARING_DOCS: "sb-show-preparing-docs",
4991
4978
  MAIN: "sb-show-main",
4992
4979
  NOPREVIEW: "sb-show-nopreview",
4993
4980
  ERROR: "sb-show-errordisplay"
4994
- }, st = {
4981
+ }, Tt = {
4995
4982
  centered: "sb-main-centered",
4996
4983
  fullscreen: "sb-main-fullscreen",
4997
4984
  padded: "sb-main-padded"
4998
- }, wn = new En.default({
4985
+ }, qn = new Bn.default({
4999
4986
  escapeXML: !0
5000
- }), xe = class {
4987
+ }), xt = class xt {
5001
4988
  constructor() {
5002
4989
  this.testing = !1;
5003
4990
  if (typeof D < "u") {
5004
- let { __SPECIAL_TEST_PARAMETER__: e } = (0, An.parse)(D.location.search.slice(1));
4991
+ let { __SPECIAL_TEST_PARAMETER__: e } = (0, zn.parse)(D.location.search.slice(1));
5005
4992
  switch (e) {
5006
4993
  case "preparing-story": {
5007
4994
  this.showPreparingStory(), this.testing = !0;
@@ -5015,9 +5002,6 @@ _STORY", i.PREPARING_DOCS = "PREPARING_DOCS", i.ERROR = "ERROR", i))(Cn || {}),
5015
5002
  }
5016
5003
  }
5017
5004
  }
5018
- static {
5019
- n(this, "WebView");
5020
- }
5021
5005
  // Get ready to render a story, returning the element to render to
5022
5006
  prepareForStory(e) {
5023
5007
  return this.showStory(), this.applyLayout(e.parameters.layout), D.documentElement.scrollTop = 0, D.documentElement.scrollLeft = 0, this.
@@ -5039,27 +5023,27 @@ _STORY", i.PREPARING_DOCS = "PREPARING_DOCS", i.ERROR = "ERROR", i))(Cn || {}),
5039
5023
  return;
5040
5024
  }
5041
5025
  this.checkIfLayoutExists(e);
5042
- let t = st[e];
5026
+ let t = Tt[e];
5043
5027
  D.body.classList.remove(this.currentLayoutClass), D.body.classList.add(t), this.currentLayoutClass = t;
5044
5028
  }
5045
5029
  checkIfLayoutExists(e) {
5046
- st[e] || tl.warn(
5030
+ Tt[e] || bl.warn(
5047
5031
  P`
5048
5032
  The desired layout: ${e} is not a valid option.
5049
- The possible options are: ${Object.keys(st).join(", ")}, none.
5033
+ The possible options are: ${Object.keys(Tt).join(", ")}, none.
5050
5034
  `
5051
5035
  );
5052
5036
  }
5053
5037
  showMode(e) {
5054
- clearTimeout(this.preparingTimeout), Object.keys(Cn).forEach((t) => {
5055
- t === e ? D.body.classList.add(nt[t]) : D.body.classList.remove(nt[t]);
5038
+ clearTimeout(this.preparingTimeout), Object.keys(Gn).forEach((t) => {
5039
+ t === e ? D.body.classList.add(St[t]) : D.body.classList.remove(St[t]);
5056
5040
  });
5057
5041
  }
5058
5042
  showErrorDisplay({ message: e = "", stack: t = "" }) {
5059
5043
  let o = e, s = t, i = e.split(`
5060
5044
  `);
5061
5045
  i.length > 1 && ([o] = i, s = i.slice(1).join(`
5062
- `).replace(/^\n/, "")), D.getElementById("error-message").innerHTML = wn.toHtml(o), D.getElementById("error-stack").innerHTML = wn.toHtml(s),
5046
+ `).replace(/^\n/, "")), D.getElementById("error-message").innerHTML = qn.toHtml(o), D.getElementById("error-stack").innerHTML = qn.toHtml(s),
5063
5047
  this.showMode("ERROR");
5064
5048
  }
5065
5049
  showNoPreview() {
@@ -5069,12 +5053,12 @@ true"));
5069
5053
  showPreparingStory({ immediate: e = !1 } = {}) {
5070
5054
  clearTimeout(this.preparingTimeout), e ? this.showMode("PREPARING_STORY") : this.preparingTimeout = setTimeout(
5071
5055
  () => this.showMode("PREPARING_STORY"),
5072
- Rn
5056
+ Nn
5073
5057
  );
5074
5058
  }
5075
5059
  showPreparingDocs({ immediate: e = !1 } = {}) {
5076
5060
  clearTimeout(this.preparingTimeout), e ? this.showMode("PREPARING_DOCS") : this.preparingTimeout = setTimeout(() => this.showMode("PREPA\
5077
- RING_DOCS"), Rn);
5061
+ RING_DOCS"), Nn);
5078
5062
  }
5079
5063
  showMain() {
5080
5064
  this.showMode("MAIN");
@@ -5086,26 +5070,27 @@ RING_DOCS"), Rn);
5086
5070
  this.docsRoot().setAttribute("hidden", "true"), this.storyRoot().removeAttribute("hidden");
5087
5071
  }
5088
5072
  showStoryDuringRender() {
5089
- D.body.classList.add(nt.MAIN);
5073
+ D.body.classList.add(St.MAIN);
5090
5074
  }
5091
5075
  };
5076
+ n(xt, "WebView");
5077
+ var xe = xt;
5092
5078
 
5093
5079
  // src/preview-api/modules/preview-web/PreviewWeb.tsx
5094
- var fr = class extends Se {
5080
+ var Rt = class Rt extends Se {
5095
5081
  constructor(t, o) {
5096
5082
  super(t, o, new Te(), new xe());
5097
5083
  this.importFn = t;
5098
5084
  this.getProjectAnnotations = o;
5099
- nl.__STORYBOOK_PREVIEW__ = this;
5100
- }
5101
- static {
5102
- n(this, "PreviewWeb");
5085
+ Tl.__STORYBOOK_PREVIEW__ = this;
5103
5086
  }
5104
5087
  };
5088
+ n(Rt, "PreviewWeb");
5089
+ var yr = Rt;
5105
5090
 
5106
5091
  // src/preview-api/modules/preview-web/simulate-pageload.ts
5107
- import { global as sl } from "@storybook/global";
5108
- var { document: de } = sl, il = [
5092
+ import { global as xl } from "@storybook/global";
5093
+ var { document: de } = xl, Rl = [
5109
5094
  "application/javascript",
5110
5095
  "application/ecmascript",
5111
5096
  "application/x-ecmascript",
@@ -5124,103 +5109,103 @@ var { document: de } = sl, il = [
5124
5109
  "text/x-javascript",
5125
5110
  // Support modern javascript
5126
5111
  "module"
5127
- ], al = "script", vn = "scripts-root";
5128
- function yr() {
5112
+ ], wl = "script", Un = "scripts-root";
5113
+ function mr() {
5129
5114
  let r = de.createEvent("Event");
5130
5115
  r.initEvent("DOMContentLoaded", !0, !0), de.dispatchEvent(r);
5131
5116
  }
5132
- n(yr, "simulateDOMContentLoaded");
5133
- function ll(r, e, t) {
5117
+ n(mr, "simulateDOMContentLoaded");
5118
+ function El(r, e, t) {
5134
5119
  let o = de.createElement("script");
5135
5120
  o.type = r.type === "module" ? "module" : "text/javascript", r.src ? (o.onload = e, o.onerror = e, o.src = r.src) : o.textContent = r.innerText,
5136
5121
  t ? t.appendChild(o) : de.head.appendChild(o), r.parentNode.removeChild(r), r.src || e();
5137
5122
  }
5138
- n(ll, "insertScript");
5139
- function Pn(r, e, t = 0) {
5123
+ n(El, "insertScript");
5124
+ function Hn(r, e, t = 0) {
5140
5125
  r[t](() => {
5141
- t++, t === r.length ? e() : Pn(r, e, t);
5126
+ t++, t === r.length ? e() : Hn(r, e, t);
5142
5127
  });
5143
5128
  }
5144
- n(Pn, "insertScriptsSequentially");
5145
- function Fn(r) {
5146
- let e = de.getElementById(vn);
5147
- e ? e.innerHTML = "" : (e = de.createElement("div"), e.id = vn, de.body.appendChild(e));
5148
- let t = Array.from(r.querySelectorAll(al));
5129
+ n(Hn, "insertScriptsSequentially");
5130
+ function Vn(r) {
5131
+ let e = de.getElementById(Un);
5132
+ e ? e.innerHTML = "" : (e = de.createElement("div"), e.id = Un, de.body.appendChild(e));
5133
+ let t = Array.from(r.querySelectorAll(wl));
5149
5134
  if (t.length) {
5150
5135
  let o = [];
5151
5136
  t.forEach((s) => {
5152
5137
  let i = s.getAttribute("type");
5153
- (!i || il.includes(i)) && o.push((a) => ll(s, a, e));
5154
- }), o.length && Pn(o, yr, void 0);
5138
+ (!i || Rl.includes(i)) && o.push((a) => El(s, a, e));
5139
+ }), o.length && Hn(o, mr, void 0);
5155
5140
  } else
5156
- yr();
5141
+ mr();
5157
5142
  }
5158
- n(Fn, "simulatePageLoad");
5143
+ n(Vn, "simulatePageLoad");
5159
5144
 
5160
5145
  // src/docs-tools/shared.ts
5161
- var In = "storybook/docs", zf = `${In}/panel`;
5162
- var On = `${In}/snippet-rendered`;
5146
+ var Wn = "storybook/docs", ny = `${Wn}/panel`;
5147
+ var $n = `${Wn}/snippet-rendered`;
5163
5148
 
5164
5149
  // src/preview-api/modules/preview-web/emitTransformCode.ts
5165
- async function Dn(r, e) {
5150
+ async function Yn(r, e) {
5166
5151
  let t = e.parameters?.docs?.source?.transform, { id: o, unmappedArgs: s } = e, i = t && r ? t?.(r, e) : r, a = i ? await i : void 0;
5167
- _.getChannel().emit(On, {
5152
+ L.getChannel().emit($n, {
5168
5153
  id: o,
5169
5154
  source: a,
5170
5155
  args: s
5171
5156
  });
5172
5157
  }
5173
- n(Dn, "emitTransformCode");
5158
+ n(Yn, "emitTransformCode");
5174
5159
  export {
5175
5160
  J as DocsContext,
5176
5161
  re as HooksContext,
5177
5162
  be as Preview,
5178
- fr as PreviewWeb,
5163
+ yr as PreviewWeb,
5179
5164
  Se as PreviewWithSelection,
5180
5165
  se as ReporterAPI,
5181
5166
  ge as StoryStore,
5182
5167
  Te as UrlStore,
5183
5168
  xe as WebView,
5184
- _ as addons,
5185
- xr as applyHooks,
5169
+ L as addons,
5170
+ wr as applyHooks,
5186
5171
  Fe as combineArgs,
5187
- L as combineParameters,
5172
+ _ as combineParameters,
5188
5173
  Y as composeConfigs,
5189
- Nr as composeStepRunners,
5190
- Bs as composeStories,
5191
- po as composeStory,
5192
- zs as createPlaywrightTest,
5193
- so as decorateStory,
5194
- jr as defaultDecorateStory,
5195
- zn as definePreview,
5196
- Dn as emitTransformCode,
5197
- Xe as filterArgTypes,
5174
+ Hr as composeStepRunners,
5175
+ ti as composeStories,
5176
+ vo as composeStory,
5177
+ oi as createPlaywrightTest,
5178
+ Ro as decorateStory,
5179
+ Br as defaultDecorateStory,
5180
+ os as definePreview,
5181
+ Yn as emitTransformCode,
5182
+ Je as filterArgTypes,
5198
5183
  te as getCoreAnnotations,
5199
- qr as getCsfFactoryAnnotations,
5184
+ Wr as getCsfFactoryAnnotations,
5200
5185
  De as inferControls,
5201
- ns as makeDecorator,
5202
- hr as mockChannel,
5186
+ Ts as makeDecorator,
5187
+ gr as mockChannel,
5203
5188
  he as normalizeProjectAnnotations,
5204
5189
  me as normalizeStory,
5205
- Mr as prepareMeta,
5190
+ zr as prepareMeta,
5206
5191
  Oe as prepareStory,
5207
- io as sanitizeStoryContextUpdate,
5208
- js as setDefaultProjectAnnotations,
5209
- Ns as setProjectAnnotations,
5210
- yr as simulateDOMContentLoaded,
5211
- Fn as simulatePageLoad,
5212
- Xs as sortStoriesV7,
5213
- ts as useArgs,
5192
+ wo as sanitizeStoryContextUpdate,
5193
+ Xs as setDefaultProjectAnnotations,
5194
+ ei as setProjectAnnotations,
5195
+ mr as simulateDOMContentLoaded,
5196
+ Vn as simulatePageLoad,
5197
+ ui as sortStoriesV7,
5198
+ bs as useArgs,
5214
5199
  Ce as useCallback,
5215
- es as useChannel,
5216
- ut as useEffect,
5217
- os as useGlobals,
5218
- Kn as useMemo,
5219
- rs as useParameter,
5220
- Zn as useReducer,
5221
- Xn as useRef,
5222
- Qn as useState,
5200
+ hs as useChannel,
5201
+ Ft as useEffect,
5202
+ Ss as useGlobals,
5203
+ ps as useMemo,
5204
+ gs as useParameter,
5205
+ ms as useReducer,
5206
+ us as useRef,
5207
+ ys as useState,
5223
5208
  Ue as useStoryContext,
5224
- Ys as userOrAutoTitle,
5225
- yo as userOrAutoTitleFromSpecifier
5209
+ di as userOrAutoTitle,
5210
+ Io as userOrAutoTitleFromSpecifier
5226
5211
  };