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,38 +1,38 @@
1
- var wa = Object.create;
2
- var je = Object.defineProperty;
3
- var Ra = Object.getOwnPropertyDescriptor;
4
- var Sa = Object.getOwnPropertyNames;
5
- var Ea = Object.getPrototypeOf, Ia = Object.prototype.hasOwnProperty;
6
- var o = (e, t) => je(e, "name", { value: t, configurable: !0 }), we = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy <
1
+ var Ma = Object.create;
2
+ var Ue = Object.defineProperty;
3
+ var Ca = Object.getOwnPropertyDescriptor;
4
+ var Ta = Object.getOwnPropertyNames;
5
+ var Oa = Object.getPrototypeOf, za = Object.prototype.hasOwnProperty;
6
+ var o = (e, t) => Ue(e, "name", { value: t, configurable: !0 }), Re = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy <
7
7
  "u" ? new Proxy(e, {
8
8
  get: (t, r) => (typeof require < "u" ? require : t)[r]
9
9
  }) : e)(function(e) {
10
10
  if (typeof require < "u") return require.apply(this, arguments);
11
11
  throw Error('Dynamic require of "' + e + '" is not supported');
12
12
  });
13
- var Or = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), N = (e, t) => {
13
+ var Ur = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), V = (e, t) => {
14
14
  for (var r in t)
15
- je(e, r, { get: t[r], enumerable: !0 });
16
- }, xa = (e, t, r, a) => {
15
+ Ue(e, r, { get: t[r], enumerable: !0 });
16
+ }, La = (e, t, r, a) => {
17
17
  if (t && typeof t == "object" || typeof t == "function")
18
- for (let n of Sa(t))
19
- !Ia.call(e, n) && n !== r && je(e, n, { get: () => t[n], enumerable: !(a = Ra(t, n)) || a.enumerable });
18
+ for (let n of Ta(t))
19
+ !za.call(e, n) && n !== r && Ue(e, n, { get: () => t[n], enumerable: !(a = Ca(t, n)) || a.enumerable });
20
20
  return e;
21
21
  };
22
- var _t = (e, t, r) => (r = e != null ? wa(Ea(e)) : {}, xa(
22
+ var Tt = (e, t, r) => (r = e != null ? Ma(Oa(e)) : {}, La(
23
23
  // If the importer is in node compatibility mode or this is not an ESM
24
24
  // file that has been converted to a CommonJS file using a Babel-
25
25
  // compatible transform (i.e. "__esModule" has not been set), then set
26
26
  // "default" to the CommonJS "module.exports" for node compatibility.
27
- t || !e || !e.__esModule ? je(r, "default", { value: e, enumerable: !0 }) : r,
27
+ t || !e || !e.__esModule ? Ue(r, "default", { value: e, enumerable: !0 }) : r,
28
28
  e
29
29
  ));
30
30
 
31
31
  // ../node_modules/memoizerific/memoizerific.js
32
- var kt = Or((Qr, Vt) => {
32
+ var Gt = Ur((l0, Ft) => {
33
33
  (function(e) {
34
- if (typeof Qr == "object" && typeof Vt < "u")
35
- Vt.exports = e();
34
+ if (typeof l0 == "object" && typeof Ft < "u")
35
+ Ft.exports = e();
36
36
  else if (typeof define == "function" && define.amd)
37
37
  define([], e);
38
38
  else {
@@ -45,7 +45,7 @@ var kt = Or((Qr, Vt) => {
45
45
  function l(f, u) {
46
46
  if (!s[f]) {
47
47
  if (!n[f]) {
48
- var h = typeof we == "function" && we;
48
+ var h = typeof Re == "function" && Re;
49
49
  if (!u && h) return h(f, !0);
50
50
  if (c) return c(f, !0);
51
51
  var p = new Error("Cannot find module '" + f + "'");
@@ -60,7 +60,7 @@ var kt = Or((Qr, Vt) => {
60
60
  return s[f].exports;
61
61
  }
62
62
  o(l, "s");
63
- for (var c = typeof we == "function" && we, d = 0; d < i.length; d++) l(i[d]);
63
+ for (var c = typeof Re == "function" && Re, d = 0; d < i.length; d++) l(i[d]);
64
64
  return l;
65
65
  }, "e"))({ 1: [function(a, n, s) {
66
66
  n.exports = function(i) {
@@ -111,24 +111,24 @@ var kt = Or((Qr, Vt) => {
111
111
  var u = new i(!1), h = [];
112
112
  return function(p) {
113
113
  var m = /* @__PURE__ */ o(function() {
114
- var v = u, g, y, w = arguments.length - 1, S = Array(w + 1), E = !0, x;
115
- if ((m.numArgs || m.numArgs === 0) && m.numArgs !== w + 1)
114
+ var v = u, g, y, R = arguments.length - 1, E = Array(R + 1), I = !0, A;
115
+ if ((m.numArgs || m.numArgs === 0) && m.numArgs !== R + 1)
116
116
  throw new Error("Memoizerific functions should always be called with the same number of arguments");
117
- for (x = 0; x < w; x++) {
118
- if (S[x] = {
117
+ for (A = 0; A < R; A++) {
118
+ if (E[A] = {
119
119
  cacheItem: v,
120
- arg: arguments[x]
121
- }, v.has(arguments[x])) {
122
- v = v.get(arguments[x]);
120
+ arg: arguments[A]
121
+ }, v.has(arguments[A])) {
122
+ v = v.get(arguments[A]);
123
123
  continue;
124
124
  }
125
- E = !1, g = new i(!1), v.set(arguments[x], g), v = g;
125
+ I = !1, g = new i(!1), v.set(arguments[A], g), v = g;
126
126
  }
127
- return E && (v.has(arguments[w]) ? y = v.get(arguments[w]) : E = !1), E || (y = p.apply(null, arguments), v.set(arguments[w], y)),
128
- f > 0 && (S[w] = {
127
+ return I && (v.has(arguments[R]) ? y = v.get(arguments[R]) : I = !1), I || (y = p.apply(null, arguments), v.set(arguments[R], y)),
128
+ f > 0 && (E[R] = {
129
129
  cacheItem: v,
130
- arg: arguments[w]
131
- }, E ? l(h, S) : h.push(S), h.length > f && c(h.shift())), m.wasMemoized = E, m.numArgs = w + 1, y;
130
+ arg: arguments[R]
131
+ }, I ? l(h, E) : h.push(E), h.length > f && c(h.shift())), m.wasMemoized = I, m.numArgs = R + 1, y;
132
132
  }, "memoizerific");
133
133
  return m.limit = f, m.wasMemoized = !1, m.cache = u, m.lru = h, m;
134
134
  };
@@ -162,7 +162,7 @@ var kt = Or((Qr, Vt) => {
162
162
  });
163
163
 
164
164
  // ../node_modules/store2/dist/store2.js
165
- var b0 = Or((gt, yt) => {
165
+ var B0 = Ur((wt, Rt) => {
166
166
  (function(e, t) {
167
167
  var r = {
168
168
  version: "2.14.4",
@@ -378,29 +378,29 @@ var b0 = Or((gt, yt) => {
378
378
  }
379
379
  }()), a.area("page", r.storage("page")), typeof t == "function" && t.amd !== void 0 ? t("store2", [], function() {
380
380
  return a;
381
- }) : typeof yt < "u" && yt.exports ? yt.exports = a : (e.store && (r.conflict = e.store), e.store = a);
382
- })(gt, gt && gt.define);
381
+ }) : typeof Rt < "u" && Rt.exports ? Rt.exports = a : (e.store && (r.conflict = e.store), e.store = a);
382
+ })(wt, wt && wt.define);
383
383
  });
384
384
 
385
385
  // src/manager-api/root.tsx
386
- import pe, {
387
- Component as hi,
388
- Fragment as pi,
389
- useCallback as xt,
390
- useContext as br,
391
- useEffect as na,
392
- useMemo as Ar,
393
- useRef as ra
386
+ import me, {
387
+ Component as Ii,
388
+ Fragment as xi,
389
+ useCallback as bt,
390
+ useContext as Br,
391
+ useEffect as ma,
392
+ useMemo as Hr,
393
+ useRef as ua
394
394
  } from "react";
395
395
  import {
396
- SET_STORIES as mi,
397
- SHARED_STATE_CHANGED as aa,
398
- SHARED_STATE_SET as ze,
399
- STORY_CHANGED as vi
396
+ SET_STORIES as Ai,
397
+ SHARED_STATE_CHANGED as ha,
398
+ SHARED_STATE_SET as Le,
399
+ STORY_CHANGED as bi
400
400
  } from "storybook/internal/core-events";
401
401
 
402
402
  // ../node_modules/es-toolkit/dist/array/countBy.mjs
403
- function Pt(e, t) {
403
+ function Ot(e, t) {
404
404
  let r = {};
405
405
  for (let a = 0; a < e.length; a++) {
406
406
  let n = e[a], s = t(n);
@@ -408,10 +408,10 @@ function Pt(e, t) {
408
408
  }
409
409
  return r;
410
410
  }
411
- o(Pt, "countBy");
411
+ o(Ot, "countBy");
412
412
 
413
413
  // ../node_modules/es-toolkit/dist/array/partition.mjs
414
- function Ue(e, t) {
414
+ function Fe(e, t) {
415
415
  let r = [], a = [];
416
416
  for (let n = 0; n < e.length; n++) {
417
417
  let s = e[n];
@@ -419,50 +419,50 @@ function Ue(e, t) {
419
419
  }
420
420
  return [r, a];
421
421
  }
422
- o(Ue, "partition");
422
+ o(Fe, "partition");
423
423
 
424
424
  // ../node_modules/es-toolkit/dist/function/noop.mjs
425
- function zr() {
425
+ function Fr() {
426
426
  }
427
- o(zr, "noop");
427
+ o(Fr, "noop");
428
428
 
429
429
  // ../node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
430
- function Lr(e) {
430
+ function Gr(e) {
431
431
  return e == null || typeof e != "object" && typeof e != "function";
432
432
  }
433
- o(Lr, "isPrimitive");
433
+ o(Gr, "isPrimitive");
434
434
 
435
435
  // ../node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
436
- function Hr(e) {
436
+ function Wr(e) {
437
437
  return ArrayBuffer.isView(e) && !(e instanceof DataView);
438
438
  }
439
- o(Hr, "isTypedArray");
439
+ o(Wr, "isTypedArray");
440
440
 
441
441
  // ../node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
442
- function Re(e) {
442
+ function Se(e) {
443
443
  return Object.getOwnPropertySymbols(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
444
444
  }
445
- o(Re, "getSymbols");
445
+ o(Se, "getSymbols");
446
446
 
447
447
  // ../node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
448
- function Se(e) {
448
+ function Ee(e) {
449
449
  return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
450
450
  }
451
- o(Se, "getTag");
451
+ o(Ee, "getTag");
452
452
 
453
453
  // ../node_modules/es-toolkit/dist/compat/_internal/tags.mjs
454
- var Fe = "[object RegExp]", Ge = "[object String]", We = "[object Number]", $e = "[object Boolean]", Ee = "[object Arguments]", Ke = "[objec\
455
- t Symbol]", qe = "[object Date]", Ye = "[object Map]", Je = "[object Set]", Xe = "[object Array]", Br = "[object Function]", Qe = "[object A\
456
- rrayBuffer]", ae = "[object Object]", Nr = "[object Error]", Ze = "[object DataView]", et = "[object Uint8Array]", tt = "[object Uint8Clampe\
457
- dArray]", rt = "[object Uint16Array]", at = "[object Uint32Array]", Vr = "[object BigUint64Array]", ot = "[object Int8Array]", nt = "[object\
458
- Int16Array]", it = "[object Int32Array]", kr = "[object BigInt64Array]", st = "[object Float32Array]", lt = "[object Float64Array]";
454
+ var Ge = "[object RegExp]", We = "[object String]", $e = "[object Number]", Ke = "[object Boolean]", Ie = "[object Arguments]", qe = "[objec\
455
+ t Symbol]", Ye = "[object Date]", Je = "[object Map]", Xe = "[object Set]", Qe = "[object Array]", $r = "[object Function]", Ze = "[object A\
456
+ rrayBuffer]", oe = "[object Object]", Kr = "[object Error]", et = "[object DataView]", tt = "[object Uint8Array]", rt = "[object Uint8Clampe\
457
+ dArray]", at = "[object Uint16Array]", ot = "[object Uint32Array]", qr = "[object BigUint64Array]", nt = "[object Int8Array]", it = "[object\
458
+ Int16Array]", st = "[object Int32Array]", Yr = "[object BigInt64Array]", lt = "[object Float32Array]", ct = "[object Float64Array]";
459
459
 
460
460
  // ../node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
461
- function X(e, t, r, a = /* @__PURE__ */ new Map(), n = void 0) {
461
+ function Q(e, t, r, a = /* @__PURE__ */ new Map(), n = void 0) {
462
462
  let s = n?.(e, t, r, a);
463
463
  if (s != null)
464
464
  return s;
465
- if (Lr(e))
465
+ if (Gr(e))
466
466
  return e;
467
467
  if (a.has(e))
468
468
  return a.get(e);
@@ -470,7 +470,7 @@ function X(e, t, r, a = /* @__PURE__ */ new Map(), n = void 0) {
470
470
  let i = new Array(e.length);
471
471
  a.set(e, i);
472
472
  for (let l = 0; l < e.length; l++)
473
- i[l] = X(e[l], l, r, a, n);
473
+ i[l] = Q(e[l], l, r, a, n);
474
474
  return Object.hasOwn(e, "index") && (i.index = e.index), Object.hasOwn(e, "input") && (i.input = e.input), i;
475
475
  }
476
476
  if (e instanceof Date)
@@ -483,109 +483,109 @@ function X(e, t, r, a = /* @__PURE__ */ new Map(), n = void 0) {
483
483
  let i = /* @__PURE__ */ new Map();
484
484
  a.set(e, i);
485
485
  for (let [l, c] of e)
486
- i.set(l, X(c, l, r, a, n));
486
+ i.set(l, Q(c, l, r, a, n));
487
487
  return i;
488
488
  }
489
489
  if (e instanceof Set) {
490
490
  let i = /* @__PURE__ */ new Set();
491
491
  a.set(e, i);
492
492
  for (let l of e)
493
- i.add(X(l, void 0, r, a, n));
493
+ i.add(Q(l, void 0, r, a, n));
494
494
  return i;
495
495
  }
496
496
  if (typeof Buffer < "u" && Buffer.isBuffer(e))
497
497
  return e.subarray();
498
- if (Hr(e)) {
498
+ if (Wr(e)) {
499
499
  let i = new (Object.getPrototypeOf(e)).constructor(e.length);
500
500
  a.set(e, i);
501
501
  for (let l = 0; l < e.length; l++)
502
- i[l] = X(e[l], l, r, a, n);
502
+ i[l] = Q(e[l], l, r, a, n);
503
503
  return i;
504
504
  }
505
505
  if (e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer)
506
506
  return e.slice(0);
507
507
  if (e instanceof DataView) {
508
508
  let i = new DataView(e.buffer.slice(0), e.byteOffset, e.byteLength);
509
- return a.set(e, i), Ie(i, e, r, a, n), i;
509
+ return a.set(e, i), xe(i, e, r, a, n), i;
510
510
  }
511
511
  if (typeof File < "u" && e instanceof File) {
512
512
  let i = new File([e], e.name, {
513
513
  type: e.type
514
514
  });
515
- return a.set(e, i), Ie(i, e, r, a, n), i;
515
+ return a.set(e, i), xe(i, e, r, a, n), i;
516
516
  }
517
517
  if (e instanceof Blob) {
518
518
  let i = new Blob([e], { type: e.type });
519
- return a.set(e, i), Ie(i, e, r, a, n), i;
519
+ return a.set(e, i), xe(i, e, r, a, n), i;
520
520
  }
521
521
  if (e instanceof Error) {
522
522
  let i = new e.constructor();
523
- return a.set(e, i), i.message = e.message, i.name = e.name, i.stack = e.stack, i.cause = e.cause, Ie(i, e, r, a, n), i;
523
+ return a.set(e, i), i.message = e.message, i.name = e.name, i.stack = e.stack, i.cause = e.cause, xe(i, e, r, a, n), i;
524
524
  }
525
- if (typeof e == "object" && Aa(e)) {
525
+ if (typeof e == "object" && Ha(e)) {
526
526
  let i = Object.create(Object.getPrototypeOf(e));
527
- return a.set(e, i), Ie(i, e, r, a, n), i;
527
+ return a.set(e, i), xe(i, e, r, a, n), i;
528
528
  }
529
529
  return e;
530
530
  }
531
- o(X, "cloneDeepWithImpl");
532
- function Ie(e, t, r = e, a, n) {
533
- let s = [...Object.keys(t), ...Re(t)];
531
+ o(Q, "cloneDeepWithImpl");
532
+ function xe(e, t, r = e, a, n) {
533
+ let s = [...Object.keys(t), ...Se(t)];
534
534
  for (let i = 0; i < s.length; i++) {
535
535
  let l = s[i], c = Object.getOwnPropertyDescriptor(e, l);
536
- (c == null || c.writable) && (e[l] = X(t[l], l, r, a, n));
536
+ (c == null || c.writable) && (e[l] = Q(t[l], l, r, a, n));
537
537
  }
538
538
  }
539
- o(Ie, "copyProperties");
540
- function Aa(e) {
541
- switch (Se(e)) {
542
- case Ee:
543
- case Xe:
539
+ o(xe, "copyProperties");
540
+ function Ha(e) {
541
+ switch (Ee(e)) {
542
+ case Ie:
544
543
  case Qe:
545
544
  case Ze:
546
- case $e:
547
- case qe:
548
- case st:
545
+ case et:
546
+ case Ke:
547
+ case Ye:
549
548
  case lt:
550
- case ot:
549
+ case ct:
551
550
  case nt:
552
551
  case it:
553
- case Ye:
554
- case We:
555
- case ae:
556
- case Fe:
552
+ case st:
557
553
  case Je:
554
+ case $e:
555
+ case oe:
558
556
  case Ge:
559
- case Ke:
560
- case et:
557
+ case Xe:
558
+ case We:
559
+ case qe:
561
560
  case tt:
562
561
  case rt:
563
562
  case at:
563
+ case ot:
564
564
  return !0;
565
565
  default:
566
566
  return !1;
567
567
  }
568
568
  }
569
- o(Aa, "isCloneableObject");
569
+ o(Ha, "isCloneableObject");
570
570
 
571
571
  // ../node_modules/es-toolkit/dist/object/cloneDeep.mjs
572
- function Dr(e) {
573
- return X(e, void 0, e, /* @__PURE__ */ new Map(), void 0);
572
+ function Jr(e) {
573
+ return Q(e, void 0, e, /* @__PURE__ */ new Map(), void 0);
574
574
  }
575
- o(Dr, "cloneDeep");
575
+ o(Jr, "cloneDeep");
576
576
 
577
577
  // ../node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
578
- function oe(e) {
578
+ function ne(e) {
579
579
  if (!e || typeof e != "object")
580
580
  return !1;
581
581
  let t = Object.getPrototypeOf(e);
582
582
  return t === null || t === Object.prototype || Object.getPrototypeOf(t) === null ? Object.prototype.toString.call(e) === "[object Object]" :
583
583
  !1;
584
584
  }
585
- o(oe, "isPlainObject");
585
+ o(ne, "isPlainObject");
586
586
 
587
587
  // ../node_modules/es-toolkit/dist/object/mapValues.mjs
588
- function Mt(e, t) {
588
+ function zt(e, t) {
589
589
  let r = {}, a = Object.keys(e);
590
590
  for (let n = 0; n < a.length; n++) {
591
591
  let s = a[n], i = e[s];
@@ -593,40 +593,40 @@ function Mt(e, t) {
593
593
  }
594
594
  return r;
595
595
  }
596
- o(Mt, "mapValues");
596
+ o(zt, "mapValues");
597
597
 
598
598
  // ../node_modules/es-toolkit/dist/object/merge.mjs
599
- function ne(e, t) {
599
+ function ie(e, t) {
600
600
  let r = Object.keys(t);
601
601
  for (let a = 0; a < r.length; a++) {
602
602
  let n = r[a], s = t[n], i = e[n];
603
- Array.isArray(s) ? Array.isArray(i) ? e[n] = ne(i, s) : e[n] = ne([], s) : oe(s) ? oe(i) ? e[n] = ne(i, s) : e[n] = ne({}, s) : (i === void 0 ||
603
+ Array.isArray(s) ? Array.isArray(i) ? e[n] = ie(i, s) : e[n] = ie([], s) : ne(s) ? ne(i) ? e[n] = ie(i, s) : e[n] = ie({}, s) : (i === void 0 ||
604
604
  s !== void 0) && (e[n] = s);
605
605
  }
606
606
  return e;
607
607
  }
608
- o(ne, "merge");
608
+ o(ie, "merge");
609
609
 
610
610
  // ../node_modules/es-toolkit/dist/compat/predicate/isObjectLike.mjs
611
- function Ct(e) {
611
+ function Lt(e) {
612
612
  return typeof e == "object" && e !== null;
613
613
  }
614
- o(Ct, "isObjectLike");
614
+ o(Lt, "isObjectLike");
615
615
 
616
616
  // ../node_modules/es-toolkit/dist/object/mergeWith.mjs
617
- function K(e, t, r) {
617
+ function q(e, t, r) {
618
618
  let a = Object.keys(t);
619
619
  for (let n = 0; n < a.length; n++) {
620
620
  let s = a[n], i = t[s], l = e[s], c = r(l, i, s, e, t);
621
- c != null ? e[s] = c : Array.isArray(i) ? e[s] = K(l ?? [], i, r) : Ct(l) && Ct(i) ? e[s] = K(l ?? {}, i, r) : (l === void 0 || i !== void 0) &&
621
+ c != null ? e[s] = c : Array.isArray(i) ? e[s] = q(l ?? [], i, r) : Lt(l) && Lt(i) ? e[s] = q(l ?? {}, i, r) : (l === void 0 || i !== void 0) &&
622
622
  (e[s] = i);
623
623
  }
624
624
  return e;
625
625
  }
626
- o(K, "mergeWith");
626
+ o(q, "mergeWith");
627
627
 
628
628
  // ../node_modules/es-toolkit/dist/object/pick.mjs
629
- function Q(e, t) {
629
+ function Z(e, t) {
630
630
  let r = {};
631
631
  for (let a = 0; a < t.length; a++) {
632
632
  let n = t[a];
@@ -634,26 +634,26 @@ function Q(e, t) {
634
634
  }
635
635
  return r;
636
636
  }
637
- o(Q, "pick");
637
+ o(Z, "pick");
638
638
 
639
639
  // ../node_modules/es-toolkit/dist/object/toMerged.mjs
640
- function xe(e, t) {
641
- return ne(Dr(e), t);
640
+ function Ae(e, t) {
641
+ return ie(Jr(e), t);
642
642
  }
643
- o(xe, "toMerged");
643
+ o(Ae, "toMerged");
644
644
 
645
645
  // ../node_modules/es-toolkit/dist/compat/util/eq.mjs
646
- function jr(e, t) {
646
+ function Xr(e, t) {
647
647
  return e === t || Number.isNaN(e) && Number.isNaN(t);
648
648
  }
649
- o(jr, "eq");
649
+ o(Xr, "eq");
650
650
 
651
651
  // ../node_modules/es-toolkit/dist/predicate/isEqualWith.mjs
652
- function Ur(e, t, r) {
653
- return Ae(e, t, void 0, void 0, void 0, void 0, r);
652
+ function Qr(e, t, r) {
653
+ return be(e, t, void 0, void 0, void 0, void 0, r);
654
654
  }
655
- o(Ur, "isEqualWith");
656
- function Ae(e, t, r, a, n, s, i) {
655
+ o(Qr, "isEqualWith");
656
+ function be(e, t, r, a, n, s, i) {
657
657
  let l = i(e, t, r, a, n, s);
658
658
  if (l !== void 0)
659
659
  return l;
@@ -670,31 +670,31 @@ function Ae(e, t, r, a, n, s, i) {
670
670
  case "function":
671
671
  return e === t;
672
672
  case "object":
673
- return be(e, t, s, i);
673
+ return Pe(e, t, s, i);
674
674
  }
675
- return be(e, t, s, i);
675
+ return Pe(e, t, s, i);
676
676
  }
677
- o(Ae, "isEqualWithImpl");
678
- function be(e, t, r, a) {
677
+ o(be, "isEqualWithImpl");
678
+ function Pe(e, t, r, a) {
679
679
  if (Object.is(e, t))
680
680
  return !0;
681
- let n = Se(e), s = Se(t);
682
- if (n === Ee && (n = ae), s === Ee && (s = ae), n !== s)
681
+ let n = Ee(e), s = Ee(t);
682
+ if (n === Ie && (n = oe), s === Ie && (s = oe), n !== s)
683
683
  return !1;
684
684
  switch (n) {
685
- case Ge:
685
+ case We:
686
686
  return e.toString() === t.toString();
687
- case We: {
687
+ case $e: {
688
688
  let c = e.valueOf(), d = t.valueOf();
689
- return jr(c, d);
689
+ return Xr(c, d);
690
690
  }
691
- case $e:
692
- case qe:
693
691
  case Ke:
692
+ case Ye:
693
+ case qe:
694
694
  return Object.is(e.valueOf(), t.valueOf());
695
- case Fe:
695
+ case Ge:
696
696
  return e.source === t.source && e.flags === t.flags;
697
- case Br:
697
+ case $r:
698
698
  return e === t;
699
699
  }
700
700
  r = r ?? /* @__PURE__ */ new Map();
@@ -704,55 +704,55 @@ function be(e, t, r, a) {
704
704
  r.set(e, t), r.set(t, e);
705
705
  try {
706
706
  switch (n) {
707
- case Ye: {
707
+ case Je: {
708
708
  if (e.size !== t.size)
709
709
  return !1;
710
710
  for (let [c, d] of e.entries())
711
- if (!t.has(c) || !Ae(d, t.get(c), c, e, t, r, a))
711
+ if (!t.has(c) || !be(d, t.get(c), c, e, t, r, a))
712
712
  return !1;
713
713
  return !0;
714
714
  }
715
- case Je: {
715
+ case Xe: {
716
716
  if (e.size !== t.size)
717
717
  return !1;
718
718
  let c = Array.from(e.values()), d = Array.from(t.values());
719
719
  for (let f = 0; f < c.length; f++) {
720
- let u = c[f], h = d.findIndex((p) => Ae(u, p, void 0, e, t, r, a));
720
+ let u = c[f], h = d.findIndex((p) => be(u, p, void 0, e, t, r, a));
721
721
  if (h === -1)
722
722
  return !1;
723
723
  d.splice(h, 1);
724
724
  }
725
725
  return !0;
726
726
  }
727
- case Xe:
728
- case et:
727
+ case Qe:
729
728
  case tt:
730
729
  case rt:
731
730
  case at:
732
- case Vr:
733
731
  case ot:
732
+ case qr:
734
733
  case nt:
735
734
  case it:
736
- case kr:
737
735
  case st:
738
- case lt: {
736
+ case Yr:
737
+ case lt:
738
+ case ct: {
739
739
  if (typeof Buffer < "u" && Buffer.isBuffer(e) !== Buffer.isBuffer(t) || e.length !== t.length)
740
740
  return !1;
741
741
  for (let c = 0; c < e.length; c++)
742
- if (!Ae(e[c], t[c], c, e, t, r, a))
742
+ if (!be(e[c], t[c], c, e, t, r, a))
743
743
  return !1;
744
744
  return !0;
745
745
  }
746
- case Qe:
747
- return e.byteLength !== t.byteLength ? !1 : be(new Uint8Array(e), new Uint8Array(t), r, a);
748
746
  case Ze:
749
- return e.byteLength !== t.byteLength || e.byteOffset !== t.byteOffset ? !1 : be(new Uint8Array(e), new Uint8Array(t), r, a);
750
- case Nr:
747
+ return e.byteLength !== t.byteLength ? !1 : Pe(new Uint8Array(e), new Uint8Array(t), r, a);
748
+ case et:
749
+ return e.byteLength !== t.byteLength || e.byteOffset !== t.byteOffset ? !1 : Pe(new Uint8Array(e), new Uint8Array(t), r, a);
750
+ case Kr:
751
751
  return e.name === t.name && e.message === t.message;
752
- case ae: {
753
- if (!(be(e.constructor, t.constructor, r, a) || oe(e) && oe(t)))
752
+ case oe: {
753
+ if (!(Pe(e.constructor, t.constructor, r, a) || ne(e) && ne(t)))
754
754
  return !1;
755
- let d = [...Object.keys(e), ...Re(e)], f = [...Object.keys(t), ...Re(t)];
755
+ let d = [...Object.keys(e), ...Se(e)], f = [...Object.keys(t), ...Se(t)];
756
756
  if (d.length !== f.length)
757
757
  return !1;
758
758
  for (let u = 0; u < d.length; u++) {
@@ -760,7 +760,7 @@ function be(e, t, r, a) {
760
760
  if (!Object.hasOwn(t, h))
761
761
  return !1;
762
762
  let m = t[h];
763
- if (!Ae(p, m, h, e, t, r, a))
763
+ if (!be(p, m, h, e, t, r, a))
764
764
  return !1;
765
765
  }
766
766
  return !0;
@@ -772,47 +772,47 @@ function be(e, t, r, a) {
772
772
  r.delete(e), r.delete(t);
773
773
  }
774
774
  }
775
- o(be, "areObjectsEqual");
775
+ o(Pe, "areObjectsEqual");
776
776
 
777
777
  // ../node_modules/es-toolkit/dist/predicate/isEqual.mjs
778
- function H(e, t) {
779
- return Ur(e, t, zr);
778
+ function B(e, t) {
779
+ return Qr(e, t, Fr);
780
780
  }
781
- o(H, "isEqual");
781
+ o(B, "isEqual");
782
782
 
783
783
  // src/manager-api/context.ts
784
- import { createContext as ba } from "react";
785
- var Fr = /* @__PURE__ */ o(({ api: e, state: t }) => ba({ api: e, state: t }), "createContext");
784
+ import { createContext as Ba } from "react";
785
+ var Zr = /* @__PURE__ */ o(({ api: e, state: t }) => Ba({ api: e, state: t }), "createContext");
786
786
 
787
787
  // src/manager-api/lib/merge.ts
788
- import { logger as Gr } from "storybook/internal/client-logger";
789
- var G = /* @__PURE__ */ o((e, ...t) => {
788
+ import { logger as e0 } from "storybook/internal/client-logger";
789
+ var W = /* @__PURE__ */ o((e, ...t) => {
790
790
  let r = {};
791
- r = K(
791
+ r = q(
792
792
  {},
793
793
  e,
794
794
  (a, n) => {
795
795
  if (Array.isArray(n) && Array.isArray(a))
796
796
  return n.forEach((s) => {
797
- a.find((l) => l === s || H(l, s)) || a.push(s);
797
+ a.find((l) => l === s || B(l, s)) || a.push(s);
798
798
  }), a;
799
799
  if (Array.isArray(a))
800
- return Gr.log(["the types mismatch, picking", a]), a;
800
+ return e0.log(["the types mismatch, picking", a]), a;
801
801
  }
802
802
  );
803
803
  for (let a of t)
804
- r = K(r, a, (n, s) => {
804
+ r = q(r, a, (n, s) => {
805
805
  if (Array.isArray(s) && Array.isArray(n))
806
806
  return s.forEach((i) => {
807
- n.find((c) => c === i || H(c, i)) || n.push(i);
807
+ n.find((c) => c === i || B(c, i)) || n.push(i);
808
808
  }), n;
809
809
  if (Array.isArray(n))
810
- return Gr.log(["the types mismatch, picking", n]), n;
810
+ return e0.log(["the types mismatch, picking", n]), n;
811
811
  });
812
812
  return r;
813
- }, "default"), Wr = /* @__PURE__ */ o((e, ...t) => {
813
+ }, "default"), t0 = /* @__PURE__ */ o((e, ...t) => {
814
814
  let r = {};
815
- r = K(
815
+ r = q(
816
816
  {},
817
817
  e,
818
818
  (a, n) => {
@@ -821,7 +821,7 @@ var G = /* @__PURE__ */ o((e, ...t) => {
821
821
  }
822
822
  );
823
823
  for (let a of t)
824
- r = K(r, a, (n, s) => {
824
+ r = q(r, a, (n, s) => {
825
825
  if (Array.isArray(s))
826
826
  return s;
827
827
  });
@@ -829,42 +829,42 @@ var G = /* @__PURE__ */ o((e, ...t) => {
829
829
  }, "noArrayMerge");
830
830
 
831
831
  // src/manager-api/initial-state.ts
832
- var _a = /* @__PURE__ */ o((...e) => e.reduce((t, r) => G(t, r), {}), "main"), ct = _a;
832
+ var Na = /* @__PURE__ */ o((...e) => e.reduce((t, r) => W(t, r), {}), "main"), dt = Na;
833
833
 
834
834
  // src/manager-api/lib/addons.ts
835
- import { logger as Ma } from "storybook/internal/client-logger";
836
- import { SET_CONFIG as $r } from "storybook/internal/core-events";
837
- import { Addon_TypesEnum as Kr } from "storybook/internal/types";
838
- import { global as Ot } from "@storybook/global";
835
+ import { logger as ka } from "storybook/internal/client-logger";
836
+ import { SET_CONFIG as r0 } from "storybook/internal/core-events";
837
+ import { Addon_TypesEnum as a0 } from "storybook/internal/types";
838
+ import { global as Bt } from "@storybook/global";
839
839
 
840
840
  // src/manager-api/lib/storybook-channel-mock.ts
841
- import { Channel as Pa } from "storybook/internal/channels";
842
- function Tt() {
841
+ import { Channel as Va } from "storybook/internal/channels";
842
+ function Ht() {
843
843
  let e = {
844
844
  setHandler: /* @__PURE__ */ o(() => {
845
845
  }, "setHandler"),
846
846
  send: /* @__PURE__ */ o(() => {
847
847
  }, "send")
848
848
  };
849
- return new Pa({ transport: e });
849
+ return new Va({ transport: e });
850
850
  }
851
- o(Tt, "mockChannel");
851
+ o(Ht, "mockChannel");
852
852
 
853
853
  // src/manager-api/lib/addons.ts
854
- var Lt = class {
854
+ var kt = class kt {
855
855
  constructor() {
856
856
  this.loaders = {};
857
857
  this.elements = {};
858
858
  this.config = {};
859
- this.getChannel = /* @__PURE__ */ o(() => (this.channel || this.setChannel(Tt()), this.channel), "getChannel");
859
+ this.getChannel = /* @__PURE__ */ o(() => (this.channel || this.setChannel(Ht()), this.channel), "getChannel");
860
860
  this.ready = /* @__PURE__ */ o(() => this.promise, "ready");
861
861
  this.hasChannel = /* @__PURE__ */ o(() => !!this.channel, "hasChannel");
862
862
  this.setChannel = /* @__PURE__ */ o((t) => {
863
863
  this.channel = t, this.resolve();
864
864
  }, "setChannel");
865
865
  this.setConfig = /* @__PURE__ */ o((t) => {
866
- Object.assign(this.config, t), this.hasChannel() ? this.getChannel().emit($r, this.config) : this.ready().then((r) => {
867
- r.emit($r, this.config);
866
+ Object.assign(this.config, t), this.hasChannel() ? this.getChannel().emit(r0, this.config) : this.ready().then((r) => {
867
+ r.emit(r0, this.config);
868
868
  });
869
869
  }, "setConfig");
870
870
  this.getConfig = /* @__PURE__ */ o(() => this.config, "getConfig");
@@ -876,7 +876,7 @@ var Lt = class {
876
876
  * @returns {void}
877
877
  */
878
878
  this.register = /* @__PURE__ */ o((t, r) => {
879
- this.loaders[t] && Ma.warn(`${t} was loaded twice, this could have bad side-effects`), this.loaders[t] = r;
879
+ this.loaders[t] && ka.warn(`${t} was loaded twice, this could have bad side-effects`), this.loaders[t] = r;
880
880
  }, "register");
881
881
  this.loadAddons = /* @__PURE__ */ o((t) => {
882
882
  Object.values(this.loaders).forEach((r) => r(t));
@@ -885,9 +885,6 @@ var Lt = class {
885
885
  this.resolve = () => t(this.getChannel());
886
886
  });
887
887
  }
888
- static {
889
- o(this, "AddonStore");
890
- }
891
888
  getElements(t) {
892
889
  return this.elements[t] || (this.elements[t] = {}), this.elements[t];
893
890
  }
@@ -905,31 +902,33 @@ var Lt = class {
905
902
  experimental_getRegisteredAddons() {
906
903
  return Object.keys(this.loaders);
907
904
  }
908
- }, zt = "__STORYBOOK_ADDONS_MANAGER";
909
- function Ca() {
910
- return Ot[zt] || (Ot[zt] = new Lt()), Ot[zt];
905
+ };
906
+ o(kt, "AddonStore");
907
+ var Vt = kt, Nt = "__STORYBOOK_ADDONS_MANAGER";
908
+ function Da() {
909
+ return Bt[Nt] || (Bt[Nt] = new Vt()), Bt[Nt];
911
910
  }
912
- o(Ca, "getAddonsStore");
913
- var Ta = Ca();
911
+ o(Da, "getAddonsStore");
912
+ var ja = Da();
914
913
 
915
914
  // src/manager-api/modules/addons.ts
916
- var Bt = {};
917
- N(Bt, {
918
- ensurePanel: () => Ht,
919
- init: () => Oa
915
+ var jt = {};
916
+ V(jt, {
917
+ ensurePanel: () => Dt,
918
+ init: () => Ua
920
919
  });
921
- import { Addon_TypesEnum as qr } from "storybook/internal/types";
922
- function Ht(e, t, r) {
920
+ import { Addon_TypesEnum as o0 } from "storybook/internal/types";
921
+ function Dt(e, t, r) {
923
922
  let a = Object.keys(e);
924
923
  return a.indexOf(t) >= 0 ? t : a.length ? a[0] : r;
925
924
  }
926
- o(Ht, "ensurePanel");
927
- var Oa = /* @__PURE__ */ o(({ provider: e, store: t, fullAPI: r }) => {
925
+ o(Dt, "ensurePanel");
926
+ var Ua = /* @__PURE__ */ o(({ provider: e, store: t, fullAPI: r }) => {
928
927
  let a = {
929
928
  getElements: /* @__PURE__ */ o((n) => e.getElements(n), "getElements"),
930
929
  getSelectedPanel: /* @__PURE__ */ o(() => {
931
930
  let { selectedPanel: n } = t.getState();
932
- return Ht(a.getElements(qr.PANEL), n, n);
931
+ return Dt(a.getElements(o0.PANEL), n, n);
933
932
  }, "getSelectedPanel"),
934
933
  setSelectedPanel: /* @__PURE__ */ o((n) => {
935
934
  t.setState({ selectedPanel: n }, { persistence: "session" });
@@ -946,8 +945,8 @@ var Oa = /* @__PURE__ */ o(({ provider: e, store: t, fullAPI: r }) => {
946
945
  return {
947
946
  api: a,
948
947
  state: {
949
- selectedPanel: Ht(
950
- a.getElements(qr.PANEL),
948
+ selectedPanel: Dt(
949
+ a.getElements(o0.PANEL),
951
950
  t.getState().selectedPanel
952
951
  ),
953
952
  addons: {}
@@ -956,11 +955,11 @@ var Oa = /* @__PURE__ */ o(({ provider: e, store: t, fullAPI: r }) => {
956
955
  }, "init");
957
956
 
958
957
  // src/manager-api/modules/channel.ts
959
- var Nt = {};
960
- N(Nt, {
961
- init: () => za
958
+ var Ut = {};
959
+ V(Ut, {
960
+ init: () => Fa
962
961
  });
963
- var za = /* @__PURE__ */ o(({ provider: e }) => ({ api: {
962
+ var Fa = /* @__PURE__ */ o(({ provider: e }) => ({ api: {
964
963
  getChannel: /* @__PURE__ */ o(() => e.channel, "getChannel"),
965
964
  on: /* @__PURE__ */ o((r, a) => (e.channel?.on(r, a), () => e.channel?.off(r, a)), "on"),
966
965
  off: /* @__PURE__ */ o((r, a) => e.channel?.off(r, a), "off"),
@@ -972,21 +971,21 @@ var za = /* @__PURE__ */ o(({ provider: e }) => ({ api: {
972
971
  }, state: {} }), "init");
973
972
 
974
973
  // src/manager-api/modules/globals.ts
975
- var Gt = {};
976
- N(Gt, {
977
- init: () => Ka
974
+ var Yt = {};
975
+ V(Yt, {
976
+ init: () => ao
978
977
  });
979
- import { logger as d0 } from "storybook/internal/client-logger";
980
- import { GLOBALS_UPDATED as Ga, SET_GLOBALS as Wa, UPDATE_GLOBALS as $a } from "storybook/internal/core-events";
978
+ import { logger as R0 } from "storybook/internal/client-logger";
979
+ import { GLOBALS_UPDATED as eo, SET_GLOBALS as to, UPDATE_GLOBALS as ro } from "storybook/internal/core-events";
981
980
 
982
981
  // ../node_modules/dequal/dist/index.mjs
983
- var Yr = Object.prototype.hasOwnProperty;
984
- function Jr(e, t, r) {
982
+ var n0 = Object.prototype.hasOwnProperty;
983
+ function i0(e, t, r) {
985
984
  for (r of e.keys())
986
- if (V(r, t)) return r;
985
+ if (k(r, t)) return r;
987
986
  }
988
- o(Jr, "find");
989
- function V(e, t) {
987
+ o(i0, "find");
988
+ function k(e, t) {
990
989
  var r, a, n;
991
990
  if (e === t) return !0;
992
991
  if (e && t && (r = e.constructor) === t.constructor) {
@@ -994,21 +993,21 @@ function V(e, t) {
994
993
  if (r === RegExp) return e.toString() === t.toString();
995
994
  if (r === Array) {
996
995
  if ((a = e.length) === t.length)
997
- for (; a-- && V(e[a], t[a]); ) ;
996
+ for (; a-- && k(e[a], t[a]); ) ;
998
997
  return a === -1;
999
998
  }
1000
999
  if (r === Set) {
1001
1000
  if (e.size !== t.size)
1002
1001
  return !1;
1003
1002
  for (a of e)
1004
- if (n = a, n && typeof n == "object" && (n = Jr(t, n), !n) || !t.has(n)) return !1;
1003
+ if (n = a, n && typeof n == "object" && (n = i0(t, n), !n) || !t.has(n)) return !1;
1005
1004
  return !0;
1006
1005
  }
1007
1006
  if (r === Map) {
1008
1007
  if (e.size !== t.size)
1009
1008
  return !1;
1010
1009
  for (a of e)
1011
- if (n = a[0], n && typeof n == "object" && (n = Jr(t, n), !n) || !V(a[1], t.get(n)))
1010
+ if (n = a[0], n && typeof n == "object" && (n = i0(t, n), !n) || !k(a[1], t.get(n)))
1012
1011
  return !1;
1013
1012
  return !0;
1014
1013
  }
@@ -1027,28 +1026,28 @@ function V(e, t) {
1027
1026
  if (!r || typeof e == "object") {
1028
1027
  a = 0;
1029
1028
  for (r in e)
1030
- if (Yr.call(e, r) && ++a && !Yr.call(t, r) || !(r in t) || !V(e[r], t[r])) return !1;
1029
+ if (n0.call(e, r) && ++a && !n0.call(t, r) || !(r in t) || !k(e[r], t[r])) return !1;
1031
1030
  return Object.keys(t).length === a;
1032
1031
  }
1033
1032
  }
1034
1033
  return e !== e && t !== t;
1035
1034
  }
1036
- o(V, "dequal");
1035
+ o(k, "dequal");
1037
1036
 
1038
1037
  // src/manager-api/lib/events.ts
1039
- import { logger as Fa } from "storybook/internal/client-logger";
1038
+ import { logger as Za } from "storybook/internal/client-logger";
1040
1039
 
1041
1040
  // src/manager-api/modules/refs.ts
1042
- var Ft = {};
1043
- N(Ft, {
1044
- defaultStoryMapper: () => c0,
1045
- getSourceType: () => Ut,
1046
- init: () => Ua
1041
+ var qt = {};
1042
+ V(qt, {
1043
+ defaultStoryMapper: () => w0,
1044
+ getSourceType: () => Kt,
1045
+ init: () => Qa
1047
1046
  });
1048
- import { global as l0 } from "@storybook/global";
1047
+ import { global as y0 } from "@storybook/global";
1049
1048
 
1050
1049
  // ../node_modules/ts-dedent/esm/index.js
1051
- function O(e) {
1050
+ function z(e) {
1052
1051
  for (var t = [], r = 1; r < arguments.length; r++)
1053
1052
  t[r - 1] = arguments[r];
1054
1053
  var a = Array.from(typeof e == "string" ? [e] : e);
@@ -1080,30 +1079,30 @@ function O(e) {
1080
1079
  `)), i += u + a[c + 1];
1081
1080
  }), i;
1082
1081
  }
1083
- o(O, "dedent");
1084
- var Xr = O;
1082
+ o(z, "dedent");
1083
+ var s0 = z;
1085
1084
 
1086
1085
  // src/manager-api/lib/stories.ts
1087
- import { sanitize as La } from "storybook/internal/csf";
1088
- var Dt = _t(kt(), 1);
1086
+ import { sanitize as Ga } from "storybook/internal/csf";
1087
+ var Wt = Tt(Gt(), 1);
1089
1088
 
1090
1089
  // src/manager-api/lib/intersect.ts
1091
- var Zr = /* @__PURE__ */ o((e, t) => !Array.isArray(e) || !Array.isArray(t) || !e.length || !t.length ? [] : e.reduce((r, a) => (t.includes(
1090
+ var c0 = /* @__PURE__ */ o((e, t) => !Array.isArray(e) || !Array.isArray(t) || !e.length || !t.length ? [] : e.reduce((r, a) => (t.includes(
1092
1091
  a) && r.push(a), r), []), "default");
1093
1092
 
1094
1093
  // src/manager-api/lib/stories.ts
1095
- var Ha = /\s*\/\s*/, e0 = /* @__PURE__ */ o(({
1094
+ var Wa = /\s*\/\s*/, d0 = /* @__PURE__ */ o(({
1096
1095
  globalParameters: e,
1097
1096
  kindParameters: t,
1098
1097
  stories: r
1099
- }) => Mt(r, (a) => ({
1098
+ }) => zt(r, (a) => ({
1100
1099
  ...a,
1101
- parameters: o0(
1100
+ parameters: p0(
1102
1101
  e,
1103
1102
  t[a.kind],
1104
1103
  a.parameters
1105
1104
  )
1106
- })), "denormalizeStoryParameters"), t0 = /* @__PURE__ */ o((e) => ({ v: 5, entries: Object.entries(e).reduce(
1105
+ })), "denormalizeStoryParameters"), f0 = /* @__PURE__ */ o((e) => ({ v: 5, entries: Object.entries(e).reduce(
1107
1106
  (r, [a, n]) => {
1108
1107
  if (!n)
1109
1108
  return r;
@@ -1134,7 +1133,7 @@ var Ha = /\s*\/\s*/, e0 = /* @__PURE__ */ o(({
1134
1133
  return r;
1135
1134
  },
1136
1135
  {}
1137
- ) }), "transformSetStoriesStoryDataToPreparedStoryIndex"), Ba = /* @__PURE__ */ o((e) => ({
1136
+ ) }), "transformSetStoriesStoryDataToPreparedStoryIndex"), $a = /* @__PURE__ */ o((e) => ({
1138
1137
  v: 3,
1139
1138
  stories: Object.values(e.stories).reduce(
1140
1139
  (t, r) => (t[r.id] = {
@@ -1145,8 +1144,8 @@ var Ha = /\s*\/\s*/, e0 = /* @__PURE__ */ o(({
1145
1144
  }, t),
1146
1145
  {}
1147
1146
  )
1148
- }), "transformStoryIndexV2toV3"), Na = /* @__PURE__ */ o((e) => {
1149
- let t = Pt(Object.values(e.stories), (r) => r.title);
1147
+ }), "transformStoryIndexV2toV3"), Ka = /* @__PURE__ */ o((e) => {
1148
+ let t = Ot(Object.values(e.stories), (r) => r.title);
1150
1149
  return {
1151
1150
  v: 4,
1152
1151
  entries: Object.values(e.stories).reduce(
@@ -1161,7 +1160,7 @@ var Ha = /\s*\/\s*/, e0 = /* @__PURE__ */ o(({
1161
1160
  {}
1162
1161
  )
1163
1162
  };
1164
- }, "transformStoryIndexV3toV4"), Va = /* @__PURE__ */ o((e) => ({
1163
+ }, "transformStoryIndexV3toV4"), qa = /* @__PURE__ */ o((e) => ({
1165
1164
  v: 5,
1166
1165
  entries: Object.values(e.entries).reduce(
1167
1166
  (t, r) => (t[r.id] = {
@@ -1170,106 +1169,106 @@ var Ha = /\s*\/\s*/, e0 = /* @__PURE__ */ o(({
1170
1169
  }, t),
1171
1170
  {}
1172
1171
  )
1173
- }), "transformStoryIndexV4toV5"), ie = /* @__PURE__ */ o((e, { provider: t, docsOptions: r, filters: a, allStatuses: n }) => {
1172
+ }), "transformStoryIndexV4toV5"), se = /* @__PURE__ */ o((e, { provider: t, docsOptions: r, filters: a, allStatuses: n }) => {
1174
1173
  if (!e.v)
1175
1174
  throw new Error("Composition: Missing stories.json version");
1176
1175
  let s = e;
1177
- s = s.v === 2 ? Ba(s) : s, s = s.v === 3 ? Na(s) : s, s = s.v === 4 ? Va(s) : s, s = s;
1176
+ s = s.v === 2 ? $a(s) : s, s = s.v === 3 ? Ka(s) : s, s = s.v === 4 ? qa(s) : s, s = s;
1178
1177
  let i = Object.values(s.entries).filter((v) => {
1179
1178
  let g = !0, y = n[v.id] ?? {};
1180
- return Object.values(y).some(({ value: w }) => w === "status-value:error") || Object.values(a).forEach((w) => {
1181
- g !== !1 && (g = w({ ...v, statuses: y }));
1179
+ return Object.values(y).some(({ value: R }) => R === "status-value:error") || Object.values(a).forEach((R) => {
1180
+ g !== !1 && (g = R({ ...v, statuses: y }));
1182
1181
  }), g;
1183
1182
  }), { sidebar: l = {} } = t.getConfig(), { showRoots: c, collapsedRoots: d = [], renderLabel: f } = l, u = typeof c < "u", h = i.reduce((v, g) => {
1184
1183
  if (r.docsMode && g.type !== "docs")
1185
1184
  return v;
1186
- let { title: y } = g, w = y.trim().split(Ha), S = (!u || c) && w.length > 1 ? [w.shift()] : [], E = [...S, ...w], x = E.reduce((I, P, C) => {
1187
- let A = C > 0 && I[C - 1], me = La(A ? `${A}-${P}` : P);
1188
- if (P.trim() === "")
1189
- throw new Error(O`Invalid title ${y} ending in slash.`);
1190
- if (A === me)
1185
+ let { title: y } = g, R = y.trim().split(Wa), E = (!u || c) && R.length > 1 ? [R.shift()] : [], I = [...E, ...R], A = I.reduce((x, M, T) => {
1186
+ let b = T > 0 && x[T - 1], ve = Ga(b ? `${b}-${M}` : M);
1187
+ if (M.trim() === "")
1188
+ throw new Error(z`Invalid title ${y} ending in slash.`);
1189
+ if (b === ve)
1191
1190
  throw new Error(
1192
- O`
1193
- Invalid part '${P}', leading to id === parentId ('${me}'), inside title '${y}'
1191
+ z`
1192
+ Invalid part '${M}', leading to id === parentId ('${ve}'), inside title '${y}'
1194
1193
 
1195
1194
  Did you create a path that uses the separator char accidentally, such as 'Vue <docs/>' where '/' is a separator char? See https://github.com/storybookjs/storybook/issues/6128
1196
1195
  `
1197
1196
  );
1198
- return I.push(me), I;
1197
+ return x.push(ve), x;
1199
1198
  }, []);
1200
- return x.forEach((I, P) => {
1201
- let C = x[P + 1] || g.id;
1202
- S.length && P === 0 ? v[I] = G(v[I] || {}, {
1199
+ return A.forEach((x, M) => {
1200
+ let T = A[M + 1] || g.id;
1201
+ E.length && M === 0 ? v[x] = W(v[x] || {}, {
1203
1202
  type: "root",
1204
- id: I,
1205
- name: E[P],
1203
+ id: x,
1204
+ name: I[M],
1206
1205
  tags: [],
1207
- depth: P,
1206
+ depth: M,
1208
1207
  renderLabel: f,
1209
- startCollapsed: d.includes(I),
1208
+ startCollapsed: d.includes(x),
1210
1209
  // Note that this will later get appended to the previous list of children (see below)
1211
- children: [C]
1212
- }) : (!v[I] || v[I].type === "component") && P === x.length - 1 ? v[I] = G(v[I] || {}, {
1210
+ children: [T]
1211
+ }) : (!v[x] || v[x].type === "component") && M === A.length - 1 ? v[x] = W(v[x] || {}, {
1213
1212
  type: "component",
1214
- id: I,
1215
- name: E[P],
1213
+ id: x,
1214
+ name: I[M],
1216
1215
  tags: [],
1217
- parent: x[P - 1],
1218
- depth: P,
1216
+ parent: A[M - 1],
1217
+ depth: M,
1219
1218
  renderLabel: f,
1220
- ...C && {
1221
- children: [C]
1219
+ ...T && {
1220
+ children: [T]
1222
1221
  }
1223
- }) : v[I] = G(v[I] || {}, {
1222
+ }) : v[x] = W(v[x] || {}, {
1224
1223
  type: "group",
1225
- id: I,
1226
- name: E[P],
1224
+ id: x,
1225
+ name: I[M],
1227
1226
  tags: [],
1228
- parent: x[P - 1],
1229
- depth: P,
1227
+ parent: A[M - 1],
1228
+ depth: M,
1230
1229
  renderLabel: f,
1231
- ...C && {
1232
- children: [C]
1230
+ ...T && {
1231
+ children: [T]
1233
1232
  }
1234
1233
  });
1235
1234
  }), v[g.id] = {
1236
1235
  type: "story",
1237
1236
  tags: [],
1238
1237
  ...g,
1239
- depth: x.length,
1240
- parent: x[x.length - 1],
1238
+ depth: A.length,
1239
+ parent: A[A.length - 1],
1241
1240
  renderLabel: f,
1242
1241
  prepared: !!g.parameters
1243
1242
  }, v;
1244
1243
  }, {});
1245
1244
  function p(v, g) {
1246
1245
  return v[g.id] || (v[g.id] = g, (g.type === "root" || g.type === "group" || g.type === "component") && (g.children.forEach((y) => p(v, h[y])),
1247
- g.tags = g.children.reduce((y, w) => {
1248
- let S = v[w];
1249
- return y === null ? S.tags : Zr(y, S.tags);
1246
+ g.tags = g.children.reduce((y, R) => {
1247
+ let E = v[R];
1248
+ return y === null ? E.tags : c0(y, E.tags);
1250
1249
  }, null))), v;
1251
1250
  }
1252
1251
  o(p, "addItem");
1253
1252
  let m = Object.values(h).filter((v) => v.type !== "root" && !v.parent).reduce(p, {});
1254
1253
  return Object.values(h).filter((v) => v.type === "root").reduce(p, m);
1255
- }, "transformStoryIndexToStoriesHash"), jt = /* @__PURE__ */ o((e, t) => t ? Object.fromEntries(
1254
+ }, "transformStoryIndexToStoriesHash"), $t = /* @__PURE__ */ o((e, t) => t ? Object.fromEntries(
1256
1255
  Object.entries(e).map(([r, a]) => {
1257
1256
  let n = t[r];
1258
1257
  return a.type === "story" && n?.type === "story" && n.prepared ? [r, { ...n, ...a, prepared: !0 }] : [r, a];
1259
1258
  })
1260
- ) : e, "addPreparedStories"), r0 = (0, Dt.default)(1)((e) => Object.entries(e).reduce((t, r) => {
1259
+ ) : e, "addPreparedStories"), u0 = (0, Wt.default)(1)((e) => Object.entries(e).reduce((t, r) => {
1261
1260
  let a = r[1];
1262
1261
  return a.type === "component" && t.push([...a.children]), t;
1263
- }, [])), a0 = (0, Dt.default)(1)((e) => Object.keys(e).filter((t) => ["story", "docs"].includes(e[t].type)));
1262
+ }, [])), h0 = (0, Wt.default)(1)((e) => Object.keys(e).filter((t) => ["story", "docs"].includes(e[t].type)));
1264
1263
 
1265
1264
  // src/manager-api/modules/refs.ts
1266
- var { location: ka, fetch: n0 } = l0, Ut = /* @__PURE__ */ o((e, t) => {
1267
- let { origin: r, pathname: a } = ka, { origin: n, pathname: s } = new URL(e), i = `${r + a}`.replace("/iframe.html", "").replace(/\/$/, ""),
1265
+ var { location: Ya, fetch: m0 } = y0, Kt = /* @__PURE__ */ o((e, t) => {
1266
+ let { origin: r, pathname: a } = Ya, { origin: n, pathname: s } = new URL(e), i = `${r + a}`.replace("/iframe.html", "").replace(/\/$/, ""),
1268
1267
  l = `${n + s}`.replace("/iframe.html", "").replace(/\/$/, "");
1269
1268
  return i === l ? ["local", l] : t || e ? ["external", l] : [null, null];
1270
- }, "getSourceType"), c0 = /* @__PURE__ */ o((e, t) => ({ ...t, kind: t.kind.replace("|", "/") }), "defaultStoryMapper"), i0 = /* @__PURE__ */ o(
1269
+ }, "getSourceType"), w0 = /* @__PURE__ */ o((e, t) => ({ ...t, kind: t.kind.replace("|", "/") }), "defaultStoryMapper"), v0 = /* @__PURE__ */ o(
1271
1270
  (e, t) => Object.entries(e).reduce((r, [a, n]) => ({ ...r, [a]: { ...n, refId: t.id } }), {}), "addRefIds");
1272
- async function s0(e) {
1271
+ async function g0(e) {
1273
1272
  if (!e)
1274
1273
  return {};
1275
1274
  try {
@@ -1284,17 +1283,17 @@ async function s0(e) {
1284
1283
  return { indexError: t };
1285
1284
  }
1286
1285
  }
1287
- o(s0, "handleRequest");
1288
- var Da = /* @__PURE__ */ o((e) => {
1286
+ o(g0, "handleRequest");
1287
+ var Ja = /* @__PURE__ */ o((e) => {
1289
1288
  let t = /https?:\/\/(.+:.+)@/, r = e, a, [, n] = e.match(t) || [];
1290
1289
  return n && (r = e.replace(`${n}@`, ""), a = btoa(`${n}`)), {
1291
1290
  url: r,
1292
1291
  authorization: a
1293
1292
  };
1294
- }, "parseUrl"), ja = /* @__PURE__ */ o((e, t, r) => {
1293
+ }, "parseUrl"), Xa = /* @__PURE__ */ o((e, t, r) => {
1295
1294
  let { storyMapper: a } = r;
1296
1295
  return a ? Object.entries(e).reduce((n, [s, i]) => ({ ...n, [s]: a(t, i) }), {}) : e;
1297
- }, "map"), Ua = /* @__PURE__ */ o(({ store: e, provider: t, singleStory: r, docsOptions: a = {} }, { runCheck: n = !0 } = {}) => {
1296
+ }, "map"), Qa = /* @__PURE__ */ o(({ store: e, provider: t, singleStory: r, docsOptions: a = {} }, { runCheck: n = !0 } = {}) => {
1298
1297
  let s = {
1299
1298
  findRef: /* @__PURE__ */ o((c) => {
1300
1299
  let d = s.getRefs();
@@ -1320,36 +1319,36 @@ var Da = /* @__PURE__ */ o((e) => {
1320
1319
  }, "changeRefState"),
1321
1320
  checkRef: /* @__PURE__ */ o(async (c) => {
1322
1321
  let { id: d, url: f, version: u, type: h } = c, p = h === "server-checked", m = {}, v = u ? `?version=${u}` : "", g = p ? "omit" : "in\
1323
- clude", y = Da(f), w = {
1322
+ clude", y = Ja(f), R = {
1324
1323
  Accept: "application/json"
1325
1324
  };
1326
- y.authorization && Object.assign(w, {
1325
+ y.authorization && Object.assign(R, {
1327
1326
  Authorization: `Basic ${y.authorization}`
1328
1327
  });
1329
- let [S, E] = await Promise.all(
1328
+ let [E, I] = await Promise.all(
1330
1329
  ["index.json", "stories.json"].map(
1331
- async (I) => s0(
1332
- n0(`${y.url}/${I}${v}`, {
1333
- headers: w,
1330
+ async (x) => g0(
1331
+ m0(`${y.url}/${x}${v}`, {
1332
+ headers: R,
1334
1333
  credentials: g
1335
1334
  })
1336
1335
  )
1337
1336
  )
1338
1337
  );
1339
- if (!S.indexError || !E.indexError) {
1340
- let I = await s0(
1341
- n0(`${y.url}/metadata.json${v}`, {
1342
- headers: w,
1338
+ if (!E.indexError || !I.indexError) {
1339
+ let x = await g0(
1340
+ m0(`${y.url}/metadata.json${v}`, {
1341
+ headers: R,
1343
1342
  credentials: g,
1344
1343
  cache: "no-cache"
1345
1344
  }).catch(() => !1)
1346
1345
  );
1347
1346
  Object.assign(m, {
1348
- ...S.indexError ? E : S,
1349
- ...!I.indexError && I
1347
+ ...E.indexError ? I : E,
1348
+ ...!x.indexError && x
1350
1349
  });
1351
1350
  } else p || (m.indexError = {
1352
- message: O`
1351
+ message: z`
1353
1352
  Error: Loading of ref failed
1354
1353
  at fetch (lib/api/src/modules/refs.ts)
1355
1354
 
@@ -1361,12 +1360,12 @@ clude", y = Da(f), w = {
1361
1360
  Please check your dev-tools network tab.
1362
1361
  `
1363
1362
  });
1364
- let x = c.versions && Object.keys(c.versions).length ? c.versions : m.versions;
1363
+ let A = c.versions && Object.keys(c.versions).length ? c.versions : m.versions;
1365
1364
  await s.setRef(d, {
1366
1365
  id: d,
1367
1366
  url: y.url,
1368
1367
  ...m,
1369
- ...x ? { versions: x } : {},
1368
+ ...A ? { versions: A } : {},
1370
1369
  type: m.storyIndex ? "lazy" : "auto-inject"
1371
1370
  });
1372
1371
  }, "checkRef"),
@@ -1377,20 +1376,20 @@ clude", y = Da(f), w = {
1377
1376
  setRef: /* @__PURE__ */ o(async (c, { storyIndex: d, setStoriesData: f, ...u }, h = !1) => {
1378
1377
  if (r)
1379
1378
  return;
1380
- let p, m, v, { filters: g } = e.getState(), { storyMapper: y = c0 } = t.getConfig(), w = s.getRefs()[c];
1381
- (d || f) && (p = f ? t0(
1382
- ja(f, w, { storyMapper: y })
1383
- ) : d, v = ie(d, {
1379
+ let p, m, v, { filters: g } = e.getState(), { storyMapper: y = w0 } = t.getConfig(), R = s.getRefs()[c];
1380
+ (d || f) && (p = f ? f0(
1381
+ Xa(f, R, { storyMapper: y })
1382
+ ) : d, v = se(d, {
1384
1383
  provider: t,
1385
1384
  docsOptions: a,
1386
1385
  filters: g,
1387
1386
  allStatuses: {}
1388
- }), m = ie(d, {
1387
+ }), m = se(d, {
1389
1388
  provider: t,
1390
1389
  docsOptions: a,
1391
1390
  filters: {},
1392
1391
  allStatuses: {}
1393
- })), m && (m = i0(m, w)), v && (v = i0(v, w)), await s.updateRef(c, { ...w, ...u, index: m, filteredIndex: v, internal_index: p });
1392
+ })), m && (m = v0(m, R)), v && (v = v0(v, R)), await s.updateRef(c, { ...R, ...u, index: m, filteredIndex: v, internal_index: p });
1394
1393
  }, "setRef"),
1395
1394
  updateRef: /* @__PURE__ */ o(async (c, d) => {
1396
1395
  let { [c]: f, ...u } = s.getRefs();
@@ -1400,7 +1399,7 @@ clude", y = Da(f), w = {
1400
1399
  refs: h
1401
1400
  });
1402
1401
  }, "updateRef")
1403
- }, i = !r && l0.REFS || {}, l = i;
1402
+ }, i = !r && y0.REFS || {}, l = i;
1404
1403
  return n && new Promise(async (c) => {
1405
1404
  for (let d of Object.values(i))
1406
1405
  await s.checkRef({ ...d, stories: {} });
@@ -1414,8 +1413,8 @@ clude", y = Da(f), w = {
1414
1413
  }, "init");
1415
1414
 
1416
1415
  // src/manager-api/lib/events.ts
1417
- var z = /* @__PURE__ */ o((e, t) => {
1418
- let { source: r, refId: a, type: n } = e, [s, i] = Ut(r, a), l;
1416
+ var L = /* @__PURE__ */ o((e, t) => {
1417
+ let { source: r, refId: a, type: n } = e, [s, i] = Kt(r, a), l;
1419
1418
  (a || s === "external") && (l = a && t.getRefs()[a] ? t.getRefs()[a] : t.findRef(i));
1420
1419
  let c = {
1421
1420
  source: r,
@@ -1432,12 +1431,12 @@ var z = /* @__PURE__ */ o((e, t) => {
1432
1431
  return c;
1433
1432
  // if we couldn't find the source, something risky happened, we ignore the input, and log a warning
1434
1433
  default:
1435
- return Fa.warn(`Received a ${n} frame that was not configured as a ref`), null;
1434
+ return Za.warn(`Received a ${n} frame that was not configured as a ref`), null;
1436
1435
  }
1437
1436
  }, "getEventMetadata");
1438
1437
 
1439
1438
  // src/manager-api/modules/globals.ts
1440
- var Ka = /* @__PURE__ */ o(({ store: e, fullAPI: t, provider: r }) => {
1439
+ var ao = /* @__PURE__ */ o(({ store: e, fullAPI: t, provider: r }) => {
1441
1440
  let a = {
1442
1441
  getGlobals() {
1443
1442
  return e.getState().globals;
@@ -1452,7 +1451,7 @@ var Ka = /* @__PURE__ */ o(({ store: e, fullAPI: t, provider: r }) => {
1452
1451
  return e.getState().globalTypes;
1453
1452
  },
1454
1453
  updateGlobals(i) {
1455
- r.channel?.emit($a, {
1454
+ r.channel?.emit(ro, {
1456
1455
  globals: i,
1457
1456
  options: {
1458
1457
  target: "storybook-preview-iframe"
@@ -1474,22 +1473,22 @@ var Ka = /* @__PURE__ */ o(({ store: e, fullAPI: t, provider: r }) => {
1474
1473
  userGlobals: f,
1475
1474
  storyGlobals: u
1476
1475
  } = e.getState();
1477
- V(i, d) || e.setState({ globals: i }), V(c, f) || e.setState({ userGlobals: c }), V(l, u) || e.setState({ storyGlobals: l });
1476
+ k(i, d) || e.setState({ globals: i }), k(c, f) || e.setState({ userGlobals: c }), k(l, u) || e.setState({ storyGlobals: l });
1478
1477
  }, "updateGlobals");
1479
1478
  return r.channel?.on(
1480
- Ga,
1479
+ eo,
1481
1480
  /* @__PURE__ */ o(function({ globals: l, storyGlobals: c, userGlobals: d }) {
1482
- let { ref: f } = z(this, t);
1483
- f ? d0.warn(
1481
+ let { ref: f } = L(this, t);
1482
+ f ? R0.warn(
1484
1483
  "received a GLOBALS_UPDATED from a non-local ref. This is not currently supported."
1485
1484
  ) : s({ globals: l, storyGlobals: c, userGlobals: d });
1486
1485
  }, "handleGlobalsUpdated")
1487
1486
  ), r.channel?.on(
1488
- Wa,
1487
+ to,
1489
1488
  /* @__PURE__ */ o(function({ globals: l, globalTypes: c }) {
1490
- let { ref: d } = z(this, t), f = e.getState()?.globals;
1491
- d ? Object.keys(l).length > 0 && d0.warn("received globals from a non-local ref. This is not currently supported.") : e.setState({ globals: l,
1492
- userGlobals: l, globalTypes: c }), f && Object.keys(f).length !== 0 && !V(l, f) && a.updateGlobals(f);
1489
+ let { ref: d } = L(this, t), f = e.getState()?.globals;
1490
+ d ? Object.keys(l).length > 0 && R0.warn("received globals from a non-local ref. This is not currently supported.") : e.setState({ globals: l,
1491
+ userGlobals: l, globalTypes: c }), f && Object.keys(f).length !== 0 && !k(l, f) && a.updateGlobals(f);
1493
1492
  }, "handleSetGlobals")
1494
1493
  ), {
1495
1494
  api: a,
@@ -1498,26 +1497,26 @@ var Ka = /* @__PURE__ */ o(({ store: e, fullAPI: t, provider: r }) => {
1498
1497
  }, "init");
1499
1498
 
1500
1499
  // src/manager-api/modules/layout.ts
1501
- var ft = {};
1502
- N(ft, {
1503
- ActiveTabs: () => h0,
1504
- defaultLayoutState: () => B,
1500
+ var ut = {};
1501
+ V(ut, {
1502
+ ActiveTabs: () => I0,
1503
+ defaultLayoutState: () => N,
1505
1504
  focusableUIElements: () => _e,
1506
- init: () => Qa
1505
+ init: () => lo
1507
1506
  });
1508
- import { SET_CONFIG as qa } from "storybook/internal/core-events";
1509
- import { global as Ya } from "@storybook/global";
1510
- import { create as Ja } from "storybook/theming/create";
1511
- var { document: Xa } = Ya, f0 = /* @__PURE__ */ o((e) => typeof e == "function", "isFunction"), h0 = {
1507
+ import { SET_CONFIG as oo } from "storybook/internal/core-events";
1508
+ import { global as no } from "@storybook/global";
1509
+ import { create as io } from "storybook/theming/create";
1510
+ var { document: so } = no, S0 = /* @__PURE__ */ o((e) => typeof e == "function", "isFunction"), I0 = {
1512
1511
  SIDEBAR: "sidebar",
1513
1512
  CANVAS: "canvas",
1514
1513
  ADDONS: "addons"
1515
- }, B = {
1514
+ }, N = {
1516
1515
  ui: {
1517
1516
  enableShortcuts: !0
1518
1517
  },
1519
1518
  layout: {
1520
- initialActive: h0.CANVAS,
1519
+ initialActive: I0.CANVAS,
1521
1520
  showToolbar: !0,
1522
1521
  navSize: 300,
1523
1522
  bottomPanelHeight: 300,
@@ -1535,31 +1534,31 @@ var { document: Xa } = Ya, f0 = /* @__PURE__ */ o((e) => typeof e == "function",
1535
1534
  showToolbar: void 0
1536
1535
  },
1537
1536
  selectedPanel: void 0,
1538
- theme: Ja()
1537
+ theme: io()
1539
1538
  }, _e = {
1540
1539
  storySearchField: "storybook-explorer-searchfield",
1541
1540
  storyListMenu: "storybook-explorer-menu",
1542
1541
  storyPanelRoot: "storybook-panel-root"
1543
- }, Wt = /* @__PURE__ */ o((e) => e.layout.navSize > 0, "getIsNavShown"), $t = /* @__PURE__ */ o((e) => {
1542
+ }, Jt = /* @__PURE__ */ o((e) => e.layout.navSize > 0, "getIsNavShown"), Xt = /* @__PURE__ */ o((e) => {
1544
1543
  let { bottomPanelHeight: t, rightPanelWidth: r, panelPosition: a } = e.layout;
1545
1544
  return a === "bottom" && t > 0 || a === "right" && r > 0;
1546
- }, "getIsPanelShown"), u0 = /* @__PURE__ */ o((e) => !Wt(e) && !$t(e), "getIsFullscreen"), dt = /* @__PURE__ */ o((e) => ({
1545
+ }, "getIsPanelShown"), E0 = /* @__PURE__ */ o((e) => !Jt(e) && !Xt(e), "getIsFullscreen"), ft = /* @__PURE__ */ o((e) => ({
1547
1546
  navSize: e.navSize > 0 ? e.navSize : e.recentVisibleSizes.navSize,
1548
1547
  bottomPanelHeight: e.bottomPanelHeight > 0 ? e.bottomPanelHeight : e.recentVisibleSizes.bottomPanelHeight,
1549
1548
  rightPanelWidth: e.rightPanelWidth > 0 ? e.rightPanelWidth : e.recentVisibleSizes.rightPanelWidth
1550
- }), "getRecentVisibleSizes"), Qa = /* @__PURE__ */ o(({ store: e, provider: t, singleStory: r }) => {
1549
+ }), "getRecentVisibleSizes"), lo = /* @__PURE__ */ o(({ store: e, provider: t, singleStory: r }) => {
1551
1550
  let a = {
1552
1551
  toggleFullscreen(s) {
1553
1552
  return e.setState(
1554
1553
  (i) => {
1555
- let l = u0(i), c = typeof s == "boolean" ? s : !l;
1554
+ let l = E0(i), c = typeof s == "boolean" ? s : !l;
1556
1555
  return c === l ? { layout: i.layout } : c ? {
1557
1556
  layout: {
1558
1557
  ...i.layout,
1559
1558
  navSize: 0,
1560
1559
  bottomPanelHeight: 0,
1561
1560
  rightPanelWidth: 0,
1562
- recentVisibleSizes: dt(i.layout)
1561
+ recentVisibleSizes: ft(i.layout)
1563
1562
  }
1564
1563
  } : {
1565
1564
  layout: {
@@ -1576,7 +1575,7 @@ var { document: Xa } = Ya, f0 = /* @__PURE__ */ o((e) => typeof e == "function",
1576
1575
  togglePanel(s) {
1577
1576
  return e.setState(
1578
1577
  (i) => {
1579
- let l = $t(i), c = typeof s == "boolean" ? s : !l;
1578
+ let l = Xt(i), c = typeof s == "boolean" ? s : !l;
1580
1579
  return c === l ? { layout: i.layout } : c ? {
1581
1580
  layout: {
1582
1581
  ...i.layout,
@@ -1588,7 +1587,7 @@ var { document: Xa } = Ya, f0 = /* @__PURE__ */ o((e) => typeof e == "function",
1588
1587
  ...i.layout,
1589
1588
  bottomPanelHeight: 0,
1590
1589
  rightPanelWidth: 0,
1591
- recentVisibleSizes: dt(i.layout)
1590
+ recentVisibleSizes: ft(i.layout)
1592
1591
  }
1593
1592
  };
1594
1593
  },
@@ -1616,7 +1615,7 @@ var { document: Xa } = Ya, f0 = /* @__PURE__ */ o((e) => typeof e == "function",
1616
1615
  (i) => {
1617
1616
  if (i.singleStory)
1618
1617
  return { layout: i.layout };
1619
- let l = Wt(i), c = typeof s == "boolean" ? s : !l;
1618
+ let l = Jt(i), c = typeof s == "boolean" ? s : !l;
1620
1619
  return c === l ? { layout: i.layout } : c ? {
1621
1620
  layout: {
1622
1621
  ...i.layout,
@@ -1626,7 +1625,7 @@ var { document: Xa } = Ya, f0 = /* @__PURE__ */ o((e) => typeof e == "function",
1626
1625
  layout: {
1627
1626
  ...i.layout,
1628
1627
  navSize: 0,
1629
- recentVisibleSizes: dt(i.layout)
1628
+ recentVisibleSizes: ft(i.layout)
1630
1629
  }
1631
1630
  };
1632
1631
  },
@@ -1663,7 +1662,7 @@ var { document: Xa } = Ya, f0 = /* @__PURE__ */ o((e) => typeof e == "function",
1663
1662
  return {
1664
1663
  layout: {
1665
1664
  ...d,
1666
- recentVisibleSizes: dt(d)
1665
+ recentVisibleSizes: ft(d)
1667
1666
  }
1668
1667
  };
1669
1668
  },
@@ -1673,45 +1672,45 @@ var { document: Xa } = Ya, f0 = /* @__PURE__ */ o((e) => typeof e == "function",
1673
1672
  focusOnUIElement(s, i) {
1674
1673
  if (!s)
1675
1674
  return;
1676
- let l = Xa.getElementById(s);
1675
+ let l = so.getElementById(s);
1677
1676
  l && (l.focus(), i && l.select());
1678
1677
  },
1679
1678
  getInitialOptions() {
1680
1679
  let { theme: s, selectedPanel: i, layoutCustomisations: l, ...c } = t.getConfig();
1681
1680
  return {
1682
- ...B,
1681
+ ...N,
1683
1682
  layout: {
1684
- ...xe(
1685
- B.layout,
1686
- Q(c, Object.keys(B.layout))
1683
+ ...Ae(
1684
+ N.layout,
1685
+ Z(c, Object.keys(N.layout))
1687
1686
  ),
1688
1687
  ...r && { navSize: 0 }
1689
1688
  },
1690
1689
  layoutCustomisations: {
1691
- ...B.layoutCustomisations,
1690
+ ...N.layoutCustomisations,
1692
1691
  ...l ?? {}
1693
1692
  },
1694
- ui: xe(B.ui, Q(c, Object.keys(B.ui))),
1695
- selectedPanel: i || B.selectedPanel,
1696
- theme: s || B.theme
1693
+ ui: Ae(N.ui, Z(c, Object.keys(N.ui))),
1694
+ selectedPanel: i || N.selectedPanel,
1695
+ theme: s || N.theme
1697
1696
  };
1698
1697
  },
1699
1698
  getIsFullscreen() {
1700
- return u0(e.getState());
1699
+ return E0(e.getState());
1701
1700
  },
1702
1701
  getIsPanelShown() {
1703
- return $t(e.getState());
1702
+ return Xt(e.getState());
1704
1703
  },
1705
1704
  getIsNavShown() {
1706
- return Wt(e.getState());
1705
+ return Jt(e.getState());
1707
1706
  },
1708
1707
  getShowToolbarWithCustomisations(s) {
1709
1708
  let i = e.getState();
1710
- return f0(i.layoutCustomisations.showToolbar) ? i.layoutCustomisations.showToolbar(i, s) ?? s : s;
1709
+ return S0(i.layoutCustomisations.showToolbar) ? i.layoutCustomisations.showToolbar(i, s) ?? s : s;
1711
1710
  },
1712
1711
  getNavSizeWithCustomisations(s) {
1713
1712
  let i = e.getState();
1714
- if (f0(i.layoutCustomisations.showSidebar)) {
1713
+ if (S0(i.layoutCustomisations.showSidebar)) {
1715
1714
  let l = i.layoutCustomisations.showSidebar(i, s !== 0);
1716
1715
  if (s === 0 && l === !0)
1717
1716
  return i.layout.recentVisibleSizes.navSize;
@@ -1727,37 +1726,37 @@ var { document: Xa } = Ya, f0 = /* @__PURE__ */ o((e) => typeof e == "function",
1727
1726
  let f = {
1728
1727
  ...i,
1729
1728
  ...s.layout || {},
1730
- ...Q(s, Object.keys(i)),
1729
+ ...Z(s, Object.keys(i)),
1731
1730
  ...r && { navSize: 0 }
1732
1731
  }, u = {
1733
1732
  ...l,
1734
1733
  ...s.ui,
1735
- ...xe(s.ui || {}, Q(s, Object.keys(l)))
1734
+ ...Ae(s.ui || {}, Z(s, Object.keys(l)))
1736
1735
  }, h = {
1737
1736
  ...d,
1738
1737
  ...s.theme
1739
1738
  }, p = {};
1740
- H(l, u) || (p.ui = u), H(i, f) || (p.layout = f), s.selectedPanel && !H(c, s.selectedPanel) && (p.selectedPanel = s.selectedPanel), Object.
1741
- keys(p).length && e.setState(p, { persistence: "permanent" }), H(d, h) || e.setState({ theme: h });
1739
+ B(l, u) || (p.ui = u), B(i, f) || (p.layout = f), s.selectedPanel && !B(c, s.selectedPanel) && (p.selectedPanel = s.selectedPanel), Object.
1740
+ keys(p).length && e.setState(p, { persistence: "permanent" }), B(d, h) || e.setState({ theme: h });
1742
1741
  }, "setOptions")
1743
- }, n = Q(e.getState(), ["layout", "selectedPanel"]);
1744
- return t.channel?.on(qa, () => {
1745
- a.setOptions(G(a.getInitialOptions(), n));
1742
+ }, n = Z(e.getState(), ["layout", "selectedPanel"]);
1743
+ return t.channel?.on(oo, () => {
1744
+ a.setOptions(W(a.getInitialOptions(), n));
1746
1745
  }), {
1747
1746
  api: a,
1748
- state: G(a.getInitialOptions(), n)
1747
+ state: W(a.getInitialOptions(), n)
1749
1748
  };
1750
1749
  }, "init");
1751
1750
 
1752
1751
  // src/manager-api/modules/notifications.ts
1753
- var Kt = {};
1754
- N(Kt, {
1755
- init: () => Za
1752
+ var Qt = {};
1753
+ V(Qt, {
1754
+ init: () => co
1756
1755
  });
1757
- var Za = /* @__PURE__ */ o(({ store: e }) => ({ api: {
1756
+ var co = /* @__PURE__ */ o(({ store: e }) => ({ api: {
1758
1757
  addNotification: /* @__PURE__ */ o((a) => {
1759
1758
  e.setState(({ notifications: n }) => {
1760
- let [s, i] = Ue(n, (l) => l.id === a.id);
1759
+ let [s, i] = Fe(n, (l) => l.id === a.id);
1761
1760
  return s.forEach((l) => {
1762
1761
  l.onClear && l.onClear({ dismissed: !1, timeout: !1 });
1763
1762
  }), { notifications: [...i, a] };
@@ -1765,7 +1764,7 @@ var Za = /* @__PURE__ */ o(({ store: e }) => ({ api: {
1765
1764
  }, "addNotification"),
1766
1765
  clearNotification: /* @__PURE__ */ o((a) => {
1767
1766
  e.setState(({ notifications: n }) => {
1768
- let [s, i] = Ue(n, (l) => l.id === a);
1767
+ let [s, i] = Fe(n, (l) => l.id === a);
1769
1768
  return s.forEach((l) => {
1770
1769
  l.onClear && l.onClear({ dismissed: !1, timeout: !1 });
1771
1770
  }), { notifications: i };
@@ -1774,11 +1773,11 @@ var Za = /* @__PURE__ */ o(({ store: e }) => ({ api: {
1774
1773
  }, state: { notifications: [] } }), "init");
1775
1774
 
1776
1775
  // src/manager-api/modules/provider.ts
1777
- var qt = {};
1778
- N(qt, {
1779
- init: () => eo
1776
+ var Zt = {};
1777
+ V(Zt, {
1778
+ init: () => fo
1780
1779
  });
1781
- var eo = /* @__PURE__ */ o(({ provider: e, fullAPI: t }) => ({
1780
+ var fo = /* @__PURE__ */ o(({ provider: e, fullAPI: t }) => ({
1782
1781
  api: e.renderPreview ? { renderPreview: e.renderPreview } : {},
1783
1782
  state: {},
1784
1783
  init: /* @__PURE__ */ o(() => {
@@ -1787,11 +1786,11 @@ var eo = /* @__PURE__ */ o(({ provider: e, fullAPI: t }) => ({
1787
1786
  }), "init");
1788
1787
 
1789
1788
  // src/manager-api/modules/settings.ts
1790
- var Yt = {};
1791
- N(Yt, {
1792
- init: () => to
1789
+ var er = {};
1790
+ V(er, {
1791
+ init: () => uo
1793
1792
  });
1794
- var to = /* @__PURE__ */ o(({ store: e, navigate: t, fullAPI: r }) => ({
1793
+ var uo = /* @__PURE__ */ o(({ store: e, navigate: t, fullAPI: r }) => ({
1795
1794
  state: { settings: { lastTrackedStoryId: null } },
1796
1795
  api: {
1797
1796
  closeSettings: /* @__PURE__ */ o(() => {
@@ -1821,28 +1820,28 @@ var to = /* @__PURE__ */ o(({ store: e, navigate: t, fullAPI: r }) => ({
1821
1820
  }), "init");
1822
1821
 
1823
1822
  // src/manager-api/modules/shortcuts.ts
1824
- var ar = {};
1825
- N(ar, {
1826
- controlOrMetaKey: () => se,
1827
- defaultShortcuts: () => le,
1828
- init: () => uo,
1829
- isMacLike: () => m0,
1830
- keys: () => rr
1823
+ var lr = {};
1824
+ V(lr, {
1825
+ controlOrMetaKey: () => le,
1826
+ defaultShortcuts: () => ce,
1827
+ init: () => Eo,
1828
+ isMacLike: () => A0,
1829
+ keys: () => sr
1831
1830
  });
1832
1831
  import {
1833
- FORCE_REMOUNT as no,
1834
- PREVIEW_KEYDOWN as io,
1835
- STORIES_COLLAPSE_ALL as so,
1836
- STORIES_EXPAND_ALL as lo
1832
+ FORCE_REMOUNT as vo,
1833
+ PREVIEW_KEYDOWN as go,
1834
+ STORIES_COLLAPSE_ALL as yo,
1835
+ STORIES_EXPAND_ALL as wo
1837
1836
  } from "storybook/internal/core-events";
1838
- import { global as co } from "@storybook/global";
1837
+ import { global as Ro } from "@storybook/global";
1839
1838
 
1840
1839
  // src/manager-api/lib/shortcut.ts
1841
- import { global as ro } from "@storybook/global";
1842
- var { navigator: Jt } = ro, Xt = /* @__PURE__ */ o(() => Jt && Jt.platform ? !!Jt.platform.match(/(Mac|iPhone|iPod|iPad)/i) : !1, "isMacLike"),
1843
- Jl = /* @__PURE__ */ o(() => Xt() ? "\u2318" : "ctrl", "controlOrMetaSymbol"), Xl = /* @__PURE__ */ o(() => Xt() ? "meta" : "control", "cont\
1844
- rolOrMetaKey"), ao = /* @__PURE__ */ o(() => Xt() ? "\u2325" : "alt", "optionOrAltSymbol"), Ql = /* @__PURE__ */ o((e, t) => JSON.stringify(
1845
- e) === JSON.stringify(t), "isShortcutTaken"), Qt = /* @__PURE__ */ o((e) => {
1840
+ import { global as ho } from "@storybook/global";
1841
+ var { navigator: tr } = ho, rr = /* @__PURE__ */ o(() => tr && tr.platform ? !!tr.platform.match(/(Mac|iPhone|iPod|iPad)/i) : !1, "isMacLike"),
1842
+ ic = /* @__PURE__ */ o(() => rr() ? "\u2318" : "ctrl", "controlOrMetaSymbol"), sc = /* @__PURE__ */ o(() => rr() ? "meta" : "control", "cont\
1843
+ rolOrMetaKey"), po = /* @__PURE__ */ o(() => rr() ? "\u2325" : "alt", "optionOrAltSymbol"), lc = /* @__PURE__ */ o((e, t) => JSON.stringify(
1844
+ e) === JSON.stringify(t), "isShortcutTaken"), ar = /* @__PURE__ */ o((e) => {
1846
1845
  if (["Meta", "Alt", "Control", "Shift"].includes(e.key))
1847
1846
  return null;
1848
1847
  let t = [];
@@ -1854,28 +1853,28 @@ e) === JSON.stringify(t), "isShortcutTaken"), Qt = /* @__PURE__ */ o((e) => {
1854
1853
  return e.key === " " && t.push("space"), e.key === "Escape" && t.push("escape"), e.key === "ArrowRight" && t.push("ArrowRight"), e.key ===
1855
1854
  "ArrowDown" && t.push("ArrowDown"), e.key === "ArrowUp" && t.push("ArrowUp"), e.key === "ArrowLeft" && t.push("ArrowLeft"), t.length > 0 ?
1856
1855
  t : null;
1857
- }, "eventToShortcut"), Zt = /* @__PURE__ */ o((e, t) => !e || !t || (e.join("").startsWith("shift/") && e.shift(), e.length !== t.length) ? !1 :
1856
+ }, "eventToShortcut"), or = /* @__PURE__ */ o((e, t) => !e || !t || (e.join("").startsWith("shift/") && e.shift(), e.length !== t.length) ? !1 :
1858
1857
  !e.find(
1859
1858
  (r, a) => Array.isArray(r) ? !r.includes(t[a]) : r !== t[a]
1860
- ), "shortcutMatchesShortcut"), Zl = /* @__PURE__ */ o((e, t) => Zt(Qt(e), t), "eventMatchesShortcut"), oo = /* @__PURE__ */ o((e) => e === "\
1861
- alt" ? ao() : e === "control" ? "\u2303" : e === "meta" ? "\u2318" : e === "shift" ? "\u21E7\u200B" : e === "Enter" || e === "Backspace" || e ===
1859
+ ), "shortcutMatchesShortcut"), cc = /* @__PURE__ */ o((e, t) => or(ar(e), t), "eventMatchesShortcut"), mo = /* @__PURE__ */ o((e) => e === "\
1860
+ alt" ? po() : e === "control" ? "\u2303" : e === "meta" ? "\u2318" : e === "shift" ? "\u21E7\u200B" : e === "Enter" || e === "Backspace" || e ===
1862
1861
  "Esc" || e === "escape" ? "" : e === " " ? "SPACE" : e === "ArrowUp" ? "\u2191" : e === "ArrowDown" ? "\u2193" : e === "ArrowLeft" ? "\u2190" :
1863
- e === "ArrowRight" ? "\u2192" : e.toUpperCase(), "keyToSymbol"), ec = /* @__PURE__ */ o((e) => e.map(oo).join(" "), "shortcutToHumanString");
1862
+ e === "ArrowRight" ? "\u2192" : e.toUpperCase(), "keyToSymbol"), dc = /* @__PURE__ */ o((e) => e.map(mo).join(" "), "shortcutToHumanString");
1864
1863
 
1865
1864
  // src/manager-api/modules/shortcuts.ts
1866
- var { navigator: er, document: p0 } = co, m0 = /* @__PURE__ */ o(() => er && er.platform ? !!er.platform.match(/(Mac|iPhone|iPod|iPad)/i) : !1,
1867
- "isMacLike"), se = /* @__PURE__ */ o(() => m0() ? "meta" : "control", "controlOrMetaKey");
1868
- function rr(e) {
1865
+ var { navigator: nr, document: x0 } = Ro, A0 = /* @__PURE__ */ o(() => nr && nr.platform ? !!nr.platform.match(/(Mac|iPhone|iPod|iPad)/i) : !1,
1866
+ "isMacLike"), le = /* @__PURE__ */ o(() => A0() ? "meta" : "control", "controlOrMetaKey");
1867
+ function sr(e) {
1869
1868
  return Object.keys(e);
1870
1869
  }
1871
- o(rr, "keys");
1872
- var le = Object.freeze({
1870
+ o(sr, "keys");
1871
+ var ce = Object.freeze({
1873
1872
  fullScreen: ["alt", "F"],
1874
1873
  togglePanel: ["alt", "A"],
1875
1874
  panelPosition: ["alt", "D"],
1876
1875
  toggleNav: ["alt", "S"],
1877
1876
  toolbar: ["alt", "T"],
1878
- search: [se(), "K"],
1877
+ search: [le(), "K"],
1879
1878
  focusNav: ["1"],
1880
1879
  focusIframe: ["2"],
1881
1880
  focusPanel: ["3"],
@@ -1883,20 +1882,20 @@ var le = Object.freeze({
1883
1882
  nextComponent: ["alt", "ArrowDown"],
1884
1883
  prevStory: ["alt", "ArrowLeft"],
1885
1884
  nextStory: ["alt", "ArrowRight"],
1886
- shortcutsPage: [se(), "shift", ","],
1887
- aboutPage: [se(), ","],
1885
+ shortcutsPage: [le(), "shift", ","],
1886
+ aboutPage: [le(), ","],
1888
1887
  escape: ["escape"],
1889
1888
  // This one is not customizable
1890
- collapseAll: [se(), "shift", "ArrowUp"],
1891
- expandAll: [se(), "shift", "ArrowDown"],
1889
+ collapseAll: [le(), "shift", "ArrowUp"],
1890
+ expandAll: [le(), "shift", "ArrowDown"],
1892
1891
  remount: ["alt", "R"]
1893
- }), tr = {};
1894
- function fo(e) {
1892
+ }), ir = {};
1893
+ function So(e) {
1895
1894
  let t = e.target;
1896
1895
  return /input|textarea/i.test(t.tagName) || t.getAttribute("contenteditable") !== null;
1897
1896
  }
1898
- o(fo, "focusInInput");
1899
- var uo = /* @__PURE__ */ o(({ store: e, fullAPI: t, provider: r }) => {
1897
+ o(So, "focusInInput");
1898
+ var Eo = /* @__PURE__ */ o(({ store: e, fullAPI: t, provider: r }) => {
1900
1899
  let a = {
1901
1900
  // Getting and setting shortcuts
1902
1901
  getShortcutKeys() {
@@ -1904,12 +1903,12 @@ var uo = /* @__PURE__ */ o(({ store: e, fullAPI: t, provider: r }) => {
1904
1903
  },
1905
1904
  getDefaultShortcuts() {
1906
1905
  return {
1907
- ...le,
1906
+ ...ce,
1908
1907
  ...a.getAddonsShortcutDefaults()
1909
1908
  };
1910
1909
  },
1911
1910
  getAddonsShortcuts() {
1912
- return tr;
1911
+ return ir;
1913
1912
  },
1914
1913
  getAddonsShortcutLabels() {
1915
1914
  let l = {};
@@ -1938,7 +1937,7 @@ var uo = /* @__PURE__ */ o(({ store: e, fullAPI: t, provider: r }) => {
1938
1937
  return await a.setShortcuts({
1939
1938
  ...d,
1940
1939
  [`${l}-${c.actionName}`]: c.defaultShortcut
1941
- }), tr[`${l}-${c.actionName}`] = c, c;
1940
+ }), ir[`${l}-${c.actionName}`] = c, c;
1942
1941
  },
1943
1942
  async restoreDefaultShortcut(l) {
1944
1943
  let c = a.getDefaultShortcuts()[l];
@@ -1946,8 +1945,8 @@ var uo = /* @__PURE__ */ o(({ store: e, fullAPI: t, provider: r }) => {
1946
1945
  },
1947
1946
  // Listening to shortcut events
1948
1947
  handleKeydownEvent(l) {
1949
- let c = Qt(l), d = a.getShortcutKeys(), u = rr(d).find(
1950
- (h) => Zt(c, d[h])
1948
+ let c = ar(l), d = a.getShortcutKeys(), u = sr(d).find(
1949
+ (h) => or(c, d[h])
1951
1950
  );
1952
1951
  u && a.handleShortcutFeature(u, l);
1953
1952
  },
@@ -1974,7 +1973,7 @@ var uo = /* @__PURE__ */ o(({ store: e, fullAPI: t, provider: r }) => {
1974
1973
  break;
1975
1974
  }
1976
1975
  case "focusIframe": {
1977
- let u = p0.getElementById("storybook-preview-iframe");
1976
+ let u = x0.getElementById("storybook-preview-iframe");
1978
1977
  if (u)
1979
1978
  try {
1980
1979
  u.contentWindow.focus();
@@ -2031,79 +2030,79 @@ var uo = /* @__PURE__ */ o(({ store: e, fullAPI: t, provider: r }) => {
2031
2030
  break;
2032
2031
  }
2033
2032
  case "collapseAll": {
2034
- t.emit(so);
2033
+ t.emit(yo);
2035
2034
  break;
2036
2035
  }
2037
2036
  case "expandAll": {
2038
- t.emit(lo);
2037
+ t.emit(wo);
2039
2038
  break;
2040
2039
  }
2041
2040
  case "remount": {
2042
- t.emit(no, { storyId: f });
2041
+ t.emit(vo, { storyId: f });
2043
2042
  break;
2044
2043
  }
2045
2044
  default:
2046
- tr[l].action();
2045
+ ir[l].action();
2047
2046
  break;
2048
2047
  }
2049
2048
  }
2050
- }, { shortcuts: n = le } = e.getState(), s = {
2049
+ }, { shortcuts: n = ce } = e.getState(), s = {
2051
2050
  // Any saved shortcuts that are still in our set of defaults
2052
- shortcuts: rr(le).reduce(
2053
- (l, c) => ({ ...l, [c]: n[c] || le[c] }),
2054
- le
2051
+ shortcuts: sr(ce).reduce(
2052
+ (l, c) => ({ ...l, [c]: n[c] || ce[c] }),
2053
+ ce
2055
2054
  )
2056
2055
  };
2057
2056
  return { api: a, state: s, init: /* @__PURE__ */ o(() => {
2058
- p0.addEventListener("keydown", (l) => {
2059
- fo(l) || a.handleKeydownEvent(l);
2060
- }), r.channel?.on(io, (l) => {
2057
+ x0.addEventListener("keydown", (l) => {
2058
+ So(l) || a.handleKeydownEvent(l);
2059
+ }), r.channel?.on(go, (l) => {
2061
2060
  a.handleKeydownEvent(l.event);
2062
2061
  });
2063
2062
  }, "initModule") };
2064
2063
  }, "init");
2065
2064
 
2066
2065
  // src/manager-api/modules/stories.ts
2067
- var sr = {};
2068
- N(sr, {
2069
- init: () => jo
2066
+ var mr = {};
2067
+ V(mr, {
2068
+ init: () => Xo
2070
2069
  });
2071
- import { logger as yo } from "storybook/internal/client-logger";
2070
+ import { logger as _o } from "storybook/internal/client-logger";
2072
2071
  import {
2073
- CONFIG_ERROR as wo,
2074
- CURRENT_STORY_WAS_SET as Ro,
2075
- DOCS_PREPARED as So,
2076
- PRELOAD_ENTRIES as Eo,
2077
- RESET_STORY_ARGS as Io,
2078
- SELECT_STORY as xo,
2079
- SET_CONFIG as Ao,
2080
- SET_CURRENT_STORY as bo,
2081
- SET_FILTER as _o,
2082
- SET_INDEX as Po,
2083
- SET_STORIES as Mo,
2084
- STORY_ARGS_UPDATED as Co,
2085
- STORY_CHANGED as To,
2086
- STORY_INDEX_INVALIDATED as Oo,
2087
- STORY_MISSING as zo,
2088
- STORY_PREPARED as Lo,
2089
- STORY_SPECIFIED as Ho,
2090
- UPDATE_STORY_ARGS as Bo
2072
+ CONFIG_ERROR as Mo,
2073
+ CURRENT_STORY_WAS_SET as Co,
2074
+ DOCS_PREPARED as To,
2075
+ PRELOAD_ENTRIES as Oo,
2076
+ RESET_STORY_ARGS as zo,
2077
+ SELECT_STORY as Lo,
2078
+ SET_CONFIG as Ho,
2079
+ SET_CURRENT_STORY as Bo,
2080
+ SET_FILTER as No,
2081
+ SET_INDEX as Vo,
2082
+ SET_STORIES as ko,
2083
+ STORY_ARGS_UPDATED as Do,
2084
+ STORY_CHANGED as jo,
2085
+ STORY_INDEX_INVALIDATED as Uo,
2086
+ STORY_MISSING as Fo,
2087
+ STORY_PREPARED as Go,
2088
+ STORY_SPECIFIED as Wo,
2089
+ UPDATE_STORY_ARGS as $o
2091
2090
  } from "storybook/internal/core-events";
2092
- import { sanitize as w0, toId as vt } from "storybook/internal/csf";
2093
- import { global as No } from "@storybook/global";
2091
+ import { sanitize as M0, toId as yt } from "storybook/internal/csf";
2092
+ import { global as Ko } from "@storybook/global";
2094
2093
 
2095
2094
  // src/storybook-error.ts
2096
- function v0({
2095
+ function b0({
2097
2096
  code: e,
2098
2097
  category: t
2099
2098
  }) {
2100
2099
  let r = String(e).padStart(4, "0");
2101
2100
  return `SB_${t}_${r}`;
2102
2101
  }
2103
- o(v0, "parseErrorCode");
2104
- var q = class e extends Error {
2102
+ o(b0, "parseErrorCode");
2103
+ var ht = class ht extends Error {
2105
2104
  constructor(r) {
2106
- super(e.getFullMessage(r));
2105
+ super(ht.getFullMessage(r));
2107
2106
  /**
2108
2107
  * Data associated with the error. Used to provide additional information in the error message or
2109
2108
  * to be passed to telemetry.
@@ -2113,11 +2112,8 @@ var q = class e extends Error {
2113
2112
  this.fromStorybook = !0;
2114
2113
  this.category = r.category, this.documentation = r.documentation ?? !1, this.code = r.code;
2115
2114
  }
2116
- static {
2117
- o(this, "StorybookError");
2118
- }
2119
2115
  get fullErrorCode() {
2120
- return v0({ code: this.code, category: this.category });
2116
+ return b0({ code: this.code, category: this.category });
2121
2117
  }
2122
2118
  /** Overrides the default `Error.name` property in the format: SB_<CATEGORY>_<CODE>. */
2123
2119
  get name() {
@@ -2132,7 +2128,7 @@ var q = class e extends Error {
2132
2128
  message: s
2133
2129
  }) {
2134
2130
  let i;
2135
- return r === !0 ? i = `https://storybook.js.org/error/${v0({ code: a, category: n })}` : typeof r == "string" ? i = r : Array.isArray(r) &&
2131
+ return r === !0 ? i = `https://storybook.js.org/error/${b0({ code: a, category: n })}` : typeof r == "string" ? i = r : Array.isArray(r) &&
2136
2132
  (i = `
2137
2133
  ${r.map((l) => ` - ${l}`).join(`
2138
2134
  `)}`), `${s}${i != null ? `
@@ -2141,9 +2137,11 @@ More info: ${i}
2141
2137
  ` : ""}`;
2142
2138
  }
2143
2139
  };
2140
+ o(ht, "StorybookError");
2141
+ var Y = ht;
2144
2142
 
2145
2143
  // src/manager-errors.ts
2146
- var ut = class extends q {
2144
+ var cr = class cr extends Y {
2147
2145
  constructor(r) {
2148
2146
  super({
2149
2147
  category: "MANAGER_API",
@@ -2156,13 +2154,12 @@ var ut = class extends q {
2156
2154
  });
2157
2155
  this.data = r;
2158
2156
  }
2159
- static {
2160
- o(this, "StatusTypeIdMismatchError");
2161
- }
2162
2157
  };
2158
+ o(cr, "StatusTypeIdMismatchError");
2159
+ var pt = cr;
2163
2160
 
2164
2161
  // src/preview-errors.ts
2165
- var ht = class extends q {
2162
+ var dr = class dr extends Y {
2166
2163
  constructor(r) {
2167
2164
  super({
2168
2165
  category: "PREVIEW_API",
@@ -2175,13 +2172,12 @@ var ht = class extends q {
2175
2172
  });
2176
2173
  this.data = r;
2177
2174
  }
2178
- static {
2179
- o(this, "StatusTypeIdMismatchError");
2180
- }
2181
2175
  };
2176
+ o(dr, "StatusTypeIdMismatchError");
2177
+ var mt = dr;
2182
2178
 
2183
2179
  // src/server-errors.ts
2184
- var pt = class extends q {
2180
+ var fr = class fr extends Y {
2185
2181
  constructor(r) {
2186
2182
  super({
2187
2183
  category: "CORE-SERVER",
@@ -2194,20 +2190,19 @@ var pt = class extends q {
2194
2190
  });
2195
2191
  this.data = r;
2196
2192
  }
2197
- static {
2198
- o(this, "StatusTypeIdMismatchError");
2199
- }
2200
2193
  };
2194
+ o(fr, "StatusTypeIdMismatchError");
2195
+ var vt = fr;
2201
2196
 
2202
2197
  // src/shared/status-store/index.ts
2203
- var g0 = {
2198
+ var P0 = {
2204
2199
  id: "storybook/status",
2205
2200
  leader: !0,
2206
2201
  initialState: {}
2207
- }, or = {
2202
+ }, ur = {
2208
2203
  SELECT: "select"
2209
2204
  };
2210
- function y0({
2205
+ function _0({
2211
2206
  universalStatusStore: e,
2212
2207
  useUniversalStore: t,
2213
2208
  environment: r
@@ -2232,12 +2227,12 @@ function y0({
2232
2227
  });
2233
2228
  },
2234
2229
  onSelect(s) {
2235
- return e.subscribe(or.SELECT, (i) => {
2230
+ return e.subscribe(ur.SELECT, (i) => {
2236
2231
  s(i.payload);
2237
2232
  });
2238
2233
  },
2239
2234
  selectStatuses: /* @__PURE__ */ o((s) => {
2240
- e.send({ type: or.SELECT, payload: s });
2235
+ e.send({ type: ur.SELECT, payload: s });
2241
2236
  }, "selectStatuses"),
2242
2237
  unset(s) {
2243
2238
  if (!s) {
@@ -2262,18 +2257,18 @@ function y0({
2262
2257
  if (d.typeId !== s)
2263
2258
  switch (r) {
2264
2259
  case "server":
2265
- throw new pt({
2260
+ throw new vt({
2266
2261
  status: d,
2267
2262
  typeId: s
2268
2263
  });
2269
2264
  case "manager":
2270
- throw new ut({
2265
+ throw new pt({
2271
2266
  status: d,
2272
2267
  typeId: s
2273
2268
  });
2274
2269
  case "preview":
2275
2270
  default:
2276
- throw new ht({
2271
+ throw new mt({
2277
2272
  status: d,
2278
2273
  typeId: s
2279
2274
  });
@@ -2285,7 +2280,7 @@ function y0({
2285
2280
  },
2286
2281
  onAllStatusChange: a.onAllStatusChange,
2287
2282
  onSelect(i) {
2288
- return e.subscribe(or.SELECT, (l) => {
2283
+ return e.subscribe(ur.SELECT, (l) => {
2289
2284
  l.payload.some((c) => c.typeId === s) && i(l.payload);
2290
2285
  });
2291
2286
  },
@@ -2309,17 +2304,17 @@ function y0({
2309
2304
  useStatusStore: /* @__PURE__ */ o((s) => t(e, s)[0], "useStatusStore")
2310
2305
  } : { getStatusStoreByTypeId: n, fullStatusStore: a, universalStatusStore: e };
2311
2306
  }
2312
- o(y0, "createStatusStore");
2307
+ o(_0, "createStatusStore");
2313
2308
 
2314
2309
  // src/shared/universal-store/instances.ts
2315
- var nr = /* @__PURE__ */ new Map();
2310
+ var hr = /* @__PURE__ */ new Map();
2316
2311
 
2317
2312
  // src/shared/universal-store/index.ts
2318
- var ho = "UNIVERSAL_STORE:", k = {
2313
+ var Io = "UNIVERSAL_STORE:", D = {
2319
2314
  PENDING: "PENDING",
2320
2315
  RESOLVED: "RESOLVED",
2321
2316
  REJECTED: "REJECTED"
2322
- }, D = class e {
2317
+ }, w = class w {
2323
2318
  constructor(t, r) {
2324
2319
  /** Enable debug logs for this store */
2325
2320
  this.debugging = !1;
@@ -2345,9 +2340,9 @@ var ho = "UNIVERSAL_STORE:", k = {
2345
2340
  }, "subscribe");
2346
2341
  /** Sends a custom event to the other stores */
2347
2342
  this.send = /* @__PURE__ */ o((t) => {
2348
- if (this.debug("send", { event: t }), this.status !== e.Status.READY)
2343
+ if (this.debug("send", { event: t }), this.status !== w.Status.READY)
2349
2344
  throw new TypeError(
2350
- O`Cannot send event before store is ready. You can get the current status with store.status,
2345
+ z`Cannot send event before store is ready. You can get the current status with store.status,
2351
2346
  or await store.readyPromise to wait for the store to be ready before sending events.
2352
2347
  ${JSON.stringify(
2353
2348
  {
@@ -2362,31 +2357,31 @@ var ho = "UNIVERSAL_STORE:", k = {
2362
2357
  );
2363
2358
  this.emitToListeners(t, { actor: this.actor }), this.emitToChannel(t, { actor: this.actor });
2364
2359
  }, "send");
2365
- if (this.debugging = t.debug ?? !1, !e.isInternalConstructing)
2360
+ if (this.debugging = t.debug ?? !1, !w.isInternalConstructing)
2366
2361
  throw new TypeError(
2367
2362
  "UniversalStore is not constructable - use UniversalStore.create() instead"
2368
2363
  );
2369
- if (e.isInternalConstructing = !1, this.id = t.id, this.actorId = Date.now().toString(36) + Math.random().toString(36).substring(2), this.
2370
- actorType = t.leader ? e.ActorType.LEADER : e.ActorType.FOLLOWER, this.state = t.initialState, this.channelEventName = `${ho}${this.id}`,
2364
+ if (w.isInternalConstructing = !1, this.id = t.id, this.actorId = Date.now().toString(36) + Math.random().toString(36).substring(2), this.
2365
+ actorType = t.leader ? w.ActorType.LEADER : w.ActorType.FOLLOWER, this.state = t.initialState, this.channelEventName = `${Io}${this.id}`,
2371
2366
  this.debug("constructor", {
2372
2367
  options: t,
2373
2368
  environmentOverrides: r,
2374
2369
  channelEventName: this.channelEventName
2375
- }), this.actor.type === e.ActorType.LEADER)
2370
+ }), this.actor.type === w.ActorType.LEADER)
2376
2371
  this.syncing = {
2377
- state: k.RESOLVED,
2372
+ state: D.RESOLVED,
2378
2373
  promise: Promise.resolve()
2379
2374
  };
2380
2375
  else {
2381
2376
  let a, n, s = new Promise((i, l) => {
2382
2377
  a = /* @__PURE__ */ o(() => {
2383
- this.syncing.state === k.PENDING && (this.syncing.state = k.RESOLVED, i());
2378
+ this.syncing.state === D.PENDING && (this.syncing.state = D.RESOLVED, i());
2384
2379
  }, "syncingResolve"), n = /* @__PURE__ */ o((c) => {
2385
- this.syncing.state === k.PENDING && (this.syncing.state = k.REJECTED, l(c));
2380
+ this.syncing.state === D.PENDING && (this.syncing.state = D.REJECTED, l(c));
2386
2381
  }, "syncingReject");
2387
2382
  });
2388
2383
  this.syncing = {
2389
- state: k.PENDING,
2384
+ state: D.PENDING,
2390
2385
  promise: s,
2391
2386
  resolve: a,
2392
2387
  reject: n
@@ -2395,66 +2390,9 @@ var ho = "UNIVERSAL_STORE:", k = {
2395
2390
  this.getState = this.getState.bind(this), this.setState = this.setState.bind(this), this.subscribe = this.subscribe.bind(this), this.onStateChange =
2396
2391
  this.onStateChange.bind(this), this.send = this.send.bind(this), this.emitToChannel = this.emitToChannel.bind(this), this.prepareThis = this.
2397
2392
  prepareThis.bind(this), this.emitToListeners = this.emitToListeners.bind(this), this.handleChannelEvents = this.handleChannelEvents.bind(
2398
- this), this.debug = this.debug.bind(this), this.channel = r?.channel ?? e.preparation.channel, this.environment = r?.environment ?? e.preparation.
2399
- environment, this.channel && this.environment ? (e.preparation.resolve({ channel: this.channel, environment: this.environment }), this.prepareThis(
2400
- { channel: this.channel, environment: this.environment })) : e.preparation.promise.then(this.prepareThis);
2401
- }
2402
- static {
2403
- o(this, "UniversalStore");
2404
- }
2405
- static {
2406
- /**
2407
- * Defines the possible actor types in the store system
2408
- *
2409
- * @readonly
2410
- */
2411
- this.ActorType = {
2412
- LEADER: "LEADER",
2413
- FOLLOWER: "FOLLOWER"
2414
- };
2415
- }
2416
- static {
2417
- /**
2418
- * Defines the possible environments the store can run in
2419
- *
2420
- * @readonly
2421
- */
2422
- this.Environment = {
2423
- SERVER: "SERVER",
2424
- MANAGER: "MANAGER",
2425
- PREVIEW: "PREVIEW",
2426
- UNKNOWN: "UNKNOWN",
2427
- MOCK: "MOCK"
2428
- };
2429
- }
2430
- static {
2431
- /**
2432
- * Internal event types used for store synchronization
2433
- *
2434
- * @readonly
2435
- */
2436
- this.InternalEventType = {
2437
- EXISTING_STATE_REQUEST: "__EXISTING_STATE_REQUEST",
2438
- EXISTING_STATE_RESPONSE: "__EXISTING_STATE_RESPONSE",
2439
- SET_STATE: "__SET_STATE",
2440
- LEADER_CREATED: "__LEADER_CREATED",
2441
- FOLLOWER_CREATED: "__FOLLOWER_CREATED"
2442
- };
2443
- }
2444
- static {
2445
- this.Status = {
2446
- UNPREPARED: "UNPREPARED",
2447
- SYNCING: "SYNCING",
2448
- READY: "READY",
2449
- ERROR: "ERROR"
2450
- };
2451
- }
2452
- static {
2453
- // This is used to check if constructor was called from the static factory create()
2454
- this.isInternalConstructing = !1;
2455
- }
2456
- static {
2457
- e.setupPreparationPromise();
2393
+ this), this.debug = this.debug.bind(this), this.channel = r?.channel ?? w.preparation.channel, this.environment = r?.environment ?? w.preparation.
2394
+ environment, this.channel && this.environment ? (w.preparation.resolve({ channel: this.channel, environment: this.environment }), this.prepareThis(
2395
+ { channel: this.channel, environment: this.environment })) : w.preparation.promise.then(this.prepareThis);
2458
2396
  }
2459
2397
  static setupPreparationPromise() {
2460
2398
  let t, r, a = new Promise(
@@ -2466,7 +2404,7 @@ var ho = "UNIVERSAL_STORE:", k = {
2466
2404
  }, "rejectRef");
2467
2405
  }
2468
2406
  );
2469
- e.preparation = {
2407
+ w.preparation = {
2470
2408
  resolve: t,
2471
2409
  reject: r,
2472
2410
  promise: a
@@ -2477,7 +2415,7 @@ var ho = "UNIVERSAL_STORE:", k = {
2477
2415
  return Object.freeze({
2478
2416
  id: this.actorId,
2479
2417
  type: this.actorType,
2480
- environment: this.environment ?? e.Environment.UNKNOWN
2418
+ environment: this.environment ?? w.Environment.UNKNOWN
2481
2419
  });
2482
2420
  }
2483
2421
  /**
@@ -2486,16 +2424,16 @@ var ho = "UNIVERSAL_STORE:", k = {
2486
2424
  */
2487
2425
  get status() {
2488
2426
  if (!this.channel || !this.environment)
2489
- return e.Status.UNPREPARED;
2427
+ return w.Status.UNPREPARED;
2490
2428
  switch (this.syncing?.state) {
2491
- case k.PENDING:
2429
+ case D.PENDING:
2492
2430
  case void 0:
2493
- return e.Status.SYNCING;
2494
- case k.REJECTED:
2495
- return e.Status.ERROR;
2496
- case k.RESOLVED:
2431
+ return w.Status.SYNCING;
2432
+ case D.REJECTED:
2433
+ return w.Status.ERROR;
2434
+ case D.RESOLVED:
2497
2435
  default:
2498
- return e.Status.READY;
2436
+ return w.Status.READY;
2499
2437
  }
2500
2438
  }
2501
2439
  /**
@@ -2506,24 +2444,24 @@ var ho = "UNIVERSAL_STORE:", k = {
2506
2444
  * hundred milliseconds.
2507
2445
  */
2508
2446
  untilReady() {
2509
- return Promise.all([e.preparation.promise, this.syncing?.promise]);
2447
+ return Promise.all([w.preparation.promise, this.syncing?.promise]);
2510
2448
  }
2511
2449
  /** Creates a new instance of UniversalStore */
2512
2450
  static create(t) {
2513
2451
  if (!t || typeof t?.id != "string")
2514
2452
  throw new TypeError("id is required and must be a string, when creating a UniversalStore");
2515
2453
  t.debug && console.debug(
2516
- O`[UniversalStore]
2454
+ z`[UniversalStore]
2517
2455
  create`,
2518
2456
  { options: t }
2519
2457
  );
2520
- let r = nr.get(t.id);
2458
+ let r = hr.get(t.id);
2521
2459
  if (r)
2522
- return console.warn(O`UniversalStore with id "${t.id}" already exists in this environment, re-using existing.
2460
+ return console.warn(z`UniversalStore with id "${t.id}" already exists in this environment, re-using existing.
2523
2461
  You should reuse the existing instance instead of trying to create a new one.`), r;
2524
- e.isInternalConstructing = !0;
2525
- let a = new e(t);
2526
- return nr.set(t.id, a), a;
2462
+ w.isInternalConstructing = !0;
2463
+ let a = new w(t);
2464
+ return hr.set(t.id, a), a;
2527
2465
  }
2528
2466
  /**
2529
2467
  * Used by Storybook to set the channel for all instances of UniversalStore in the given
@@ -2532,7 +2470,7 @@ var ho = "UNIVERSAL_STORE:", k = {
2532
2470
  * @internal
2533
2471
  */
2534
2472
  static __prepare(t, r) {
2535
- e.preparation.channel = t, e.preparation.environment = r, e.preparation.resolve({ channel: t, environment: r });
2473
+ w.preparation.channel = t, w.preparation.environment = r, w.preparation.resolve({ channel: t, environment: r });
2536
2474
  }
2537
2475
  /**
2538
2476
  * Updates the store's state
@@ -2541,9 +2479,9 @@ var ho = "UNIVERSAL_STORE:", k = {
2541
2479
  */
2542
2480
  setState(t) {
2543
2481
  let r = this.state, a = typeof t == "function" ? t(r) : t;
2544
- if (this.debug("setState", { newState: a, previousState: r, updater: t }), this.status !== e.Status.READY)
2482
+ if (this.debug("setState", { newState: a, previousState: r, updater: t }), this.status !== w.Status.READY)
2545
2483
  throw new TypeError(
2546
- O`Cannot set state before store is ready. You can get the current status with store.status,
2484
+ z`Cannot set state before store is ready. You can get the current status with store.status,
2547
2485
  or await store.readyPromise to wait for the store to be ready before sending events.
2548
2486
  ${JSON.stringify(
2549
2487
  {
@@ -2558,7 +2496,7 @@ var ho = "UNIVERSAL_STORE:", k = {
2558
2496
  );
2559
2497
  this.state = a;
2560
2498
  let n = {
2561
- type: e.InternalEventType.SET_STATE,
2499
+ type: w.InternalEventType.SET_STATE,
2562
2500
  payload: {
2563
2501
  state: a,
2564
2502
  previousState: r
@@ -2573,7 +2511,7 @@ var ho = "UNIVERSAL_STORE:", k = {
2573
2511
  */
2574
2512
  onStateChange(t) {
2575
2513
  return this.debug("onStateChange", { listener: t }), this.subscribe(
2576
- e.InternalEventType.SET_STATE,
2514
+ w.InternalEventType.SET_STATE,
2577
2515
  ({ payload: r }, a) => {
2578
2516
  t(r.state, r.previousState, a);
2579
2517
  }
@@ -2590,14 +2528,14 @@ var ho = "UNIVERSAL_STORE:", k = {
2590
2528
  environment: r
2591
2529
  }) {
2592
2530
  this.channel = t, this.environment = r, this.debug("prepared", { channel: !!t, environment: r }), this.channel.on(this.channelEventName,
2593
- this.handleChannelEvents), this.actor.type === e.ActorType.LEADER ? this.emitToChannel(
2594
- { type: e.InternalEventType.LEADER_CREATED },
2531
+ this.handleChannelEvents), this.actor.type === w.ActorType.LEADER ? this.emitToChannel(
2532
+ { type: w.InternalEventType.LEADER_CREATED },
2595
2533
  { actor: this.actor }
2596
2534
  ) : (this.emitToChannel(
2597
- { type: e.InternalEventType.FOLLOWER_CREATED },
2535
+ { type: w.InternalEventType.FOLLOWER_CREATED },
2598
2536
  { actor: this.actor }
2599
2537
  ), this.emitToChannel(
2600
- { type: e.InternalEventType.EXISTING_STATE_REQUEST },
2538
+ { type: w.InternalEventType.EXISTING_STATE_REQUEST },
2601
2539
  { actor: this.actor }
2602
2540
  ), setTimeout(() => {
2603
2541
  this.syncing.reject(
@@ -2624,28 +2562,28 @@ var ho = "UNIVERSAL_STORE:", k = {
2624
2562
  if ([a.actor.id, a.forwardingActor?.id].includes(this.actor.id)) {
2625
2563
  this.debug("handleChannelEvents: Ignoring event from self", { channelEvent: t });
2626
2564
  return;
2627
- } else if (this.syncing?.state === k.PENDING && r.type !== e.InternalEventType.EXISTING_STATE_RESPONSE) {
2565
+ } else if (this.syncing?.state === D.PENDING && r.type !== w.InternalEventType.EXISTING_STATE_RESPONSE) {
2628
2566
  this.debug("handleChannelEvents: Ignoring event while syncing", { channelEvent: t });
2629
2567
  return;
2630
2568
  }
2631
- if (this.debug("handleChannelEvents", { channelEvent: t }), this.actor.type === e.ActorType.LEADER) {
2569
+ if (this.debug("handleChannelEvents", { channelEvent: t }), this.actor.type === w.ActorType.LEADER) {
2632
2570
  let n = !0;
2633
2571
  switch (r.type) {
2634
- case e.InternalEventType.EXISTING_STATE_REQUEST:
2572
+ case w.InternalEventType.EXISTING_STATE_REQUEST:
2635
2573
  n = !1;
2636
2574
  let s = {
2637
- type: e.InternalEventType.EXISTING_STATE_RESPONSE,
2575
+ type: w.InternalEventType.EXISTING_STATE_RESPONSE,
2638
2576
  payload: this.state
2639
2577
  };
2640
2578
  this.debug("handleChannelEvents: responding to existing state request", {
2641
2579
  responseEvent: s
2642
2580
  }), this.emitToChannel(s, { actor: this.actor }), this.emitToListeners(s, { actor: this.actor });
2643
2581
  break;
2644
- case e.InternalEventType.LEADER_CREATED:
2645
- n = !1, this.syncing.state = k.REJECTED, this.debug("handleChannelEvents: erroring due to second leader being created", {
2582
+ case w.InternalEventType.LEADER_CREATED:
2583
+ n = !1, this.syncing.state = D.REJECTED, this.debug("handleChannelEvents: erroring due to second leader being created", {
2646
2584
  event: r
2647
2585
  }), console.error(
2648
- O`Detected multiple UniversalStore leaders created with the same id "${this.id}".
2586
+ z`Detected multiple UniversalStore leaders created with the same id "${this.id}".
2649
2587
  Only one leader can exists at a time, your stores are now in an invalid state.
2650
2588
  Leaders detected:
2651
2589
  this: ${JSON.stringify(this.actor, null, 2)}
@@ -2656,16 +2594,16 @@ var ho = "UNIVERSAL_STORE:", k = {
2656
2594
  n && (this.debug("handleChannelEvents: forwarding event", { channelEvent: t }), this.emitToChannel(r, { actor: a.actor, forwardingActor: this.
2657
2595
  actor }));
2658
2596
  }
2659
- if (this.actor.type === e.ActorType.FOLLOWER)
2597
+ if (this.actor.type === w.ActorType.FOLLOWER)
2660
2598
  switch (r.type) {
2661
- case e.InternalEventType.EXISTING_STATE_RESPONSE:
2599
+ case w.InternalEventType.EXISTING_STATE_RESPONSE:
2662
2600
  if (this.debug("handleChannelEvents: Setting state from leader's existing state response", {
2663
2601
  event: r
2664
- }), this.syncing?.state !== k.PENDING)
2602
+ }), this.syncing?.state !== D.PENDING)
2665
2603
  break;
2666
2604
  this.syncing.resolve?.();
2667
2605
  let n = {
2668
- type: e.InternalEventType.SET_STATE,
2606
+ type: w.InternalEventType.SET_STATE,
2669
2607
  payload: {
2670
2608
  state: r.payload,
2671
2609
  previousState: this.state
@@ -2675,7 +2613,7 @@ var ho = "UNIVERSAL_STORE:", k = {
2675
2613
  break;
2676
2614
  }
2677
2615
  switch (r.type) {
2678
- case e.InternalEventType.SET_STATE:
2616
+ case w.InternalEventType.SET_STATE:
2679
2617
  this.debug("handleChannelEvents: Setting state", { event: r }), this.state = r.payload.state;
2680
2618
  break;
2681
2619
  }
@@ -2683,7 +2621,7 @@ var ho = "UNIVERSAL_STORE:", k = {
2683
2621
  }
2684
2622
  debug(t, r) {
2685
2623
  this.debugging && console.debug(
2686
- O`[UniversalStore::${this.id}::${this.environment ?? e.Environment.UNKNOWN}]
2624
+ z`[UniversalStore::${this.id}::${this.environment ?? w.Environment.UNKNOWN}]
2687
2625
  ${t}`,
2688
2626
  JSON.stringify(
2689
2627
  {
@@ -2703,54 +2641,92 @@ var ho = "UNIVERSAL_STORE:", k = {
2703
2641
  * @internal
2704
2642
  */
2705
2643
  static __reset() {
2706
- e.preparation.reject(new Error("reset")), e.setupPreparationPromise(), e.isInternalConstructing = !1;
2644
+ w.preparation.reject(new Error("reset")), w.setupPreparationPromise(), w.isInternalConstructing = !1;
2707
2645
  }
2708
2646
  };
2647
+ o(w, "UniversalStore"), /**
2648
+ * Defines the possible actor types in the store system
2649
+ *
2650
+ * @readonly
2651
+ */
2652
+ w.ActorType = {
2653
+ LEADER: "LEADER",
2654
+ FOLLOWER: "FOLLOWER"
2655
+ }, /**
2656
+ * Defines the possible environments the store can run in
2657
+ *
2658
+ * @readonly
2659
+ */
2660
+ w.Environment = {
2661
+ SERVER: "SERVER",
2662
+ MANAGER: "MANAGER",
2663
+ PREVIEW: "PREVIEW",
2664
+ UNKNOWN: "UNKNOWN",
2665
+ MOCK: "MOCK"
2666
+ }, /**
2667
+ * Internal event types used for store synchronization
2668
+ *
2669
+ * @readonly
2670
+ */
2671
+ w.InternalEventType = {
2672
+ EXISTING_STATE_REQUEST: "__EXISTING_STATE_REQUEST",
2673
+ EXISTING_STATE_RESPONSE: "__EXISTING_STATE_RESPONSE",
2674
+ SET_STATE: "__SET_STATE",
2675
+ LEADER_CREATED: "__LEADER_CREATED",
2676
+ FOLLOWER_CREATED: "__FOLLOWER_CREATED"
2677
+ }, w.Status = {
2678
+ UNPREPARED: "UNPREPARED",
2679
+ SYNCING: "SYNCING",
2680
+ READY: "READY",
2681
+ ERROR: "ERROR"
2682
+ }, // This is used to check if constructor was called from the static factory create()
2683
+ w.isInternalConstructing = !1, w.setupPreparationPromise();
2684
+ var j = w;
2709
2685
 
2710
2686
  // src/shared/universal-store/use-universal-store-manager.ts
2711
- import * as Z from "react";
2712
- var Pe = /* @__PURE__ */ o((e, t) => {
2713
- let r = Z.useRef(
2687
+ import * as ee from "react";
2688
+ var Me = /* @__PURE__ */ o((e, t) => {
2689
+ let r = ee.useRef(
2714
2690
  t ? t(e.getState()) : e.getState()
2715
- ), a = Z.useCallback(
2691
+ ), a = ee.useCallback(
2716
2692
  (i) => e.onStateChange((l, c) => {
2717
2693
  if (!t) {
2718
2694
  r.current = l, i();
2719
2695
  return;
2720
2696
  }
2721
2697
  let d = t(l), f = t(c);
2722
- !H(d, f) && (r.current = d, i());
2698
+ !B(d, f) && (r.current = d, i());
2723
2699
  }),
2724
2700
  [e, t]
2725
- ), n = Z.useCallback(() => {
2701
+ ), n = ee.useCallback(() => {
2726
2702
  let i = e.getState(), l = t ? t(i) : i;
2727
- return H(l, r.current) || (r.current = l), r.current;
2703
+ return B(l, r.current) || (r.current = l), r.current;
2728
2704
  }, [e, t]);
2729
- return [Z.useSyncExternalStore(a, n), e.setState];
2705
+ return [ee.useSyncExternalStore(a, n), e.setState];
2730
2706
  }, "useUniversalStore");
2731
2707
 
2732
2708
  // src/manager-api/stores/status.ts
2733
- var po = y0({
2734
- universalStatusStore: D.create({
2735
- ...g0,
2709
+ var xo = _0({
2710
+ universalStatusStore: j.create({
2711
+ ...P0,
2736
2712
  leader: globalThis.CONFIG_TYPE === "PRODUCTION"
2737
2713
  }),
2738
- useUniversalStore: Pe,
2714
+ useUniversalStore: Me,
2739
2715
  environment: "manager"
2740
- }), { fullStatusStore: mt, getStatusStoreByTypeId: mo, useStatusStore: vo, universalStatusStore: go } = po;
2716
+ }), { fullStatusStore: gt, getStatusStoreByTypeId: Ao, useStatusStore: bo, universalStatusStore: Po } = xo;
2741
2717
 
2742
2718
  // src/manager-api/modules/stories.ts
2743
- var { fetch: Vo } = No, ko = "./index.json", Do = ["enableShortcuts", "theme", "showRoots"];
2744
- function ir(e) {
2719
+ var { fetch: qo } = Ko, Yo = "./index.json", Jo = ["enableShortcuts", "theme", "showRoots"];
2720
+ function pr(e) {
2745
2721
  if (!e || typeof e == "string")
2746
2722
  return e;
2747
2723
  let t = { ...e };
2748
- return Do.forEach((r) => {
2724
+ return Jo.forEach((r) => {
2749
2725
  r in t && delete t[r];
2750
2726
  }), t;
2751
2727
  }
2752
- o(ir, "removeRemovedOptions");
2753
- var jo = /* @__PURE__ */ o(({
2728
+ o(pr, "removeRemovedOptions");
2729
+ var Xo = /* @__PURE__ */ o(({
2754
2730
  fullAPI: e,
2755
2731
  store: t,
2756
2732
  navigate: r,
@@ -2760,7 +2736,7 @@ var jo = /* @__PURE__ */ o(({
2760
2736
  docsOptions: i = {}
2761
2737
  }) => {
2762
2738
  let l = {
2763
- storyId: vt,
2739
+ storyId: yt,
2764
2740
  getData: /* @__PURE__ */ o((d, f) => {
2765
2741
  let u = l.resolveStory(d, f);
2766
2742
  if (u?.type === "story" || u?.type === "docs")
@@ -2828,29 +2804,29 @@ var jo = /* @__PURE__ */ o(({
2828
2804
  if (g)
2829
2805
  if (f)
2830
2806
  if (d) {
2831
- let w = h ? `${h}_${vt(d, f)}` : vt(d, f);
2832
- if (g[w])
2833
- l.selectStory(w, void 0, u);
2807
+ let R = h ? `${h}_${yt(d, f)}` : yt(d, f);
2808
+ if (g[R])
2809
+ l.selectStory(R, void 0, u);
2834
2810
  else {
2835
- let S = g[w0(d)];
2836
- if (S?.type === "component") {
2837
- let E = S.children.find((x) => g[x].name === f);
2838
- E && l.selectStory(E, void 0, u);
2811
+ let E = g[M0(d)];
2812
+ if (E?.type === "component") {
2813
+ let I = E.children.find((A) => g[A].name === f);
2814
+ I && l.selectStory(I, void 0, u);
2839
2815
  }
2840
2816
  }
2841
2817
  } else {
2842
- let w = vt(y, f);
2843
- l.selectStory(w, void 0, u);
2818
+ let R = yt(y, f);
2819
+ l.selectStory(R, void 0, u);
2844
2820
  }
2845
2821
  else {
2846
- let w = d ? g[d] || g[w0(d)] : g[y];
2847
- if (!w)
2822
+ let R = d ? g[d] || g[M0(d)] : g[y];
2823
+ if (!R)
2848
2824
  throw new Error(`Unknown id or title: '${d}'`);
2849
2825
  t.setState({
2850
- settings: { ...t.getState().settings, lastTrackedStoryId: w.id }
2826
+ settings: { ...t.getState().settings, lastTrackedStoryId: R.id }
2851
2827
  });
2852
- let S = l.findLeafEntry(g, w.id), E = S.refId ? `${S.refId}_${S.id}` : S.id;
2853
- r(`/${S.type}/${E}`);
2828
+ let E = l.findLeafEntry(g, R.id), I = E.refId ? `${E.refId}_${E.id}` : E.id;
2829
+ r(`/${E.type}/${I}`);
2854
2830
  }
2855
2831
  }, "selectStory"),
2856
2832
  findLeafEntry(d, f) {
@@ -2875,16 +2851,16 @@ var jo = /* @__PURE__ */ o(({
2875
2851
  },
2876
2852
  findSiblingStoryId(d, f, u, h) {
2877
2853
  if (h) {
2878
- let v = r0(f), g = v.findIndex((y) => y.includes(d));
2854
+ let v = u0(f), g = v.findIndex((y) => y.includes(d));
2879
2855
  return g === v.length - 1 && u > 0 || g === 0 && u < 0 ? void 0 : v[g + u] ? v[g + u][0] : void 0;
2880
2856
  }
2881
- let p = a0(f), m = p.indexOf(d);
2857
+ let p = h0(f), m = p.indexOf(d);
2882
2858
  if (!(m === p.length - 1 && u > 0) && !(m === 0 && u < 0))
2883
2859
  return p[m + u];
2884
2860
  },
2885
2861
  updateStoryArgs: /* @__PURE__ */ o((d, f) => {
2886
2862
  let { id: u, refId: h } = d;
2887
- a.channel?.emit(Bo, {
2863
+ a.channel?.emit($o, {
2888
2864
  storyId: u,
2889
2865
  updatedArgs: f,
2890
2866
  options: { target: h }
@@ -2892,7 +2868,7 @@ var jo = /* @__PURE__ */ o(({
2892
2868
  }, "updateStoryArgs"),
2893
2869
  resetStoryArgs: /* @__PURE__ */ o((d, f) => {
2894
2870
  let { id: u, refId: h } = d;
2895
- a.channel?.emit(Io, {
2871
+ a.channel?.emit(zo, {
2896
2872
  storyId: u,
2897
2873
  argNames: f,
2898
2874
  options: { target: h }
@@ -2900,12 +2876,12 @@ var jo = /* @__PURE__ */ o(({
2900
2876
  }, "resetStoryArgs"),
2901
2877
  fetchIndex: /* @__PURE__ */ o(async () => {
2902
2878
  try {
2903
- let d = await Vo(ko);
2879
+ let d = await qo(Yo);
2904
2880
  if (d.status !== 200)
2905
2881
  throw new Error(await d.text());
2906
2882
  let f = await d.json();
2907
2883
  if (f.v < 3) {
2908
- yo.warn(`Skipping story index with version v${f.v}, awaiting SET_STORIES.`);
2884
+ _o.warn(`Skipping story index with version v${f.v}, awaiting SET_STORIES.`);
2909
2885
  return;
2910
2886
  }
2911
2887
  await l.setIndex(f);
@@ -2917,12 +2893,12 @@ var jo = /* @__PURE__ */ o(({
2917
2893
  // The story index we receive on fetchStoryIndex is not, but all the prepared fields are optional
2918
2894
  // so we can cast one to the other easily enough
2919
2895
  setIndex: /* @__PURE__ */ o(async (d) => {
2920
- let { filteredIndex: f, index: u, filters: h } = t.getState(), p = mt.getAll(), m = ie(d, {
2896
+ let { filteredIndex: f, index: u, filters: h } = t.getState(), p = gt.getAll(), m = se(d, {
2921
2897
  provider: a,
2922
2898
  docsOptions: i,
2923
2899
  filters: h,
2924
2900
  allStatuses: p
2925
- }), v = ie(d, {
2901
+ }), v = se(d, {
2926
2902
  provider: a,
2927
2903
  docsOptions: i,
2928
2904
  filters: {},
@@ -2930,8 +2906,8 @@ var jo = /* @__PURE__ */ o(({
2930
2906
  });
2931
2907
  await t.setState({
2932
2908
  internal_index: d,
2933
- filteredIndex: jt(m, f),
2934
- index: jt(v, u),
2909
+ filteredIndex: $t(m, f),
2910
+ index: $t(v, u),
2935
2911
  indexError: void 0
2936
2912
  });
2937
2913
  }, "setIndex"),
@@ -2990,41 +2966,41 @@ var jo = /* @__PURE__ */ o(({
2990
2966
  let h = await e.getRefs();
2991
2967
  Object.entries(h).forEach(([p, { internal_index: m, ...v }]) => {
2992
2968
  e.setRef(p, { ...v, storyIndex: m }, !0);
2993
- }), a.channel?.emit(_o, { id: d });
2969
+ }), a.channel?.emit(No, { id: d });
2994
2970
  }, "experimental_setFilter")
2995
2971
  };
2996
2972
  a.channel?.on(
2997
- Ho,
2973
+ Wo,
2998
2974
  /* @__PURE__ */ o(function({
2999
2975
  storyId: f,
3000
2976
  viewMode: u
3001
2977
  }) {
3002
- let { sourceType: h } = z(this, e);
2978
+ let { sourceType: h } = L(this, e);
3003
2979
  if (h === "local") {
3004
2980
  let p = t.getState(), m = p.path === "/" || p.viewMode === "story" || p.viewMode === "docs", v = p.viewMode && p.storyId, g = p.viewMode !==
3005
2981
  u || p.storyId !== f, { type: y } = p.index?.[p.storyId] || {};
3006
- m && (v && g && !(y === "root" || y === "component" || y === "group") ? a.channel?.emit(bo, {
2982
+ m && (v && g && !(y === "root" || y === "component" || y === "group") ? a.channel?.emit(Bo, {
3007
2983
  storyId: p.storyId,
3008
2984
  viewMode: p.viewMode
3009
2985
  }) : g && r(`/${u}/${f}`));
3010
2986
  }
3011
2987
  }, "handler")
3012
- ), a.channel?.on(Ro, /* @__PURE__ */ o(function() {
3013
- let { ref: f } = z(this, e);
2988
+ ), a.channel?.on(Co, /* @__PURE__ */ o(function() {
2989
+ let { ref: f } = L(this, e);
3014
2990
  l.setPreviewInitialized(f);
3015
- }, "handler")), a.channel?.on(To, /* @__PURE__ */ o(function() {
3016
- let { sourceType: f } = z(this, e);
2991
+ }, "handler")), a.channel?.on(jo, /* @__PURE__ */ o(function() {
2992
+ let { sourceType: f } = L(this, e);
3017
2993
  if (f === "local") {
3018
2994
  let u = l.getCurrentParameter("options");
3019
- u && e.setOptions(ir(u));
2995
+ u && e.setOptions(pr(u));
3020
2996
  }
3021
2997
  }, "handler")), a.channel?.on(
3022
- Lo,
2998
+ Go,
3023
2999
  /* @__PURE__ */ o(function({ id: f, ...u }) {
3024
- let { ref: h, sourceType: p } = z(this, e);
3000
+ let { ref: h, sourceType: p } = L(this, e);
3025
3001
  if (l.updateStory(f, { ...u, prepared: !0 }, h), !h && !t.getState().hasCalledSetOptions) {
3026
3002
  let { options: m } = u.parameters;
3027
- e.setOptions(ir(m)), t.setState({ hasCalledSetOptions: !0 });
3003
+ e.setOptions(pr(m)), t.setState({ hasCalledSetOptions: !0 });
3028
3004
  }
3029
3005
  if (p === "local") {
3030
3006
  let { storyId: m, index: v, refId: g } = t.getState();
@@ -3036,35 +3012,35 @@ var jo = /* @__PURE__ */ o(({
3036
3012
  l.findSiblingStoryId(m, v, -1, !0)
3037
3013
  ])
3038
3014
  ).filter(Boolean);
3039
- a.channel?.emit(Eo, {
3015
+ a.channel?.emit(Oo, {
3040
3016
  ids: y,
3041
3017
  options: { target: g }
3042
3018
  });
3043
3019
  }
3044
3020
  }, "handler")
3045
3021
  ), a.channel?.on(
3046
- So,
3022
+ To,
3047
3023
  /* @__PURE__ */ o(function({ id: f, ...u }) {
3048
- let { ref: h } = z(this, e);
3024
+ let { ref: h } = L(this, e);
3049
3025
  l.updateStory(f, { ...u, prepared: !0 }, h);
3050
3026
  }, "handler")
3051
- ), a.channel?.on(Po, /* @__PURE__ */ o(function(f) {
3052
- let { ref: u } = z(this, e);
3027
+ ), a.channel?.on(Vo, /* @__PURE__ */ o(function(f) {
3028
+ let { ref: u } = L(this, e);
3053
3029
  if (u)
3054
3030
  e.setRef(u.id, { ...u, storyIndex: f }, !0);
3055
3031
  else {
3056
3032
  l.setIndex(f);
3057
3033
  let h = l.getCurrentParameter("options");
3058
- e.setOptions(ir(h));
3034
+ e.setOptions(pr(h));
3059
3035
  }
3060
- }, "handler")), a.channel?.on(Mo, /* @__PURE__ */ o(function(f) {
3061
- let { ref: u } = z(this, e), h = f.v ? e0(f) : f.stories;
3036
+ }, "handler")), a.channel?.on(ko, /* @__PURE__ */ o(function(f) {
3037
+ let { ref: u } = L(this, e), h = f.v ? d0(f) : f.stories;
3062
3038
  if (u)
3063
3039
  e.setRef(u.id, { ...u, setStoriesData: h }, !0);
3064
3040
  else
3065
3041
  throw new Error("Cannot call SET_STORIES for local frame");
3066
3042
  }, "handler")), a.channel?.on(
3067
- xo,
3043
+ Lo,
3068
3044
  /* @__PURE__ */ o(function({
3069
3045
  kind: f,
3070
3046
  title: u = f,
@@ -3073,22 +3049,22 @@ var jo = /* @__PURE__ */ o(({
3073
3049
  storyId: m,
3074
3050
  ...v
3075
3051
  }) {
3076
- let { ref: g } = z(this, e);
3052
+ let { ref: g } = L(this, e);
3077
3053
  g ? e.selectStory(m || u, p, { ...v, ref: g.id }) : e.selectStory(m || u, p, v);
3078
3054
  }, "handler")
3079
3055
  ), a.channel?.on(
3080
- Co,
3056
+ Do,
3081
3057
  /* @__PURE__ */ o(function({ storyId: f, args: u }) {
3082
- let { ref: h } = z(this, e);
3058
+ let { ref: h } = L(this, e);
3083
3059
  l.updateStory(f, { args: u }, h);
3084
3060
  }, "handleStoryArgsUpdated")
3085
- ), a.channel?.on(wo, /* @__PURE__ */ o(function(f) {
3086
- let { ref: u } = z(this, e);
3061
+ ), a.channel?.on(Mo, /* @__PURE__ */ o(function(f) {
3062
+ let { ref: u } = L(this, e);
3087
3063
  l.setPreviewInitialized(u);
3088
- }, "handleConfigError")), a.channel?.on(zo, /* @__PURE__ */ o(function(f) {
3089
- let { ref: u } = z(this, e);
3064
+ }, "handleConfigError")), a.channel?.on(Fo, /* @__PURE__ */ o(function(f) {
3065
+ let { ref: u } = L(this, e);
3090
3066
  l.setPreviewInitialized(u);
3091
- }, "handleConfigError")), a.channel?.on(Ao, () => {
3067
+ }, "handleConfigError")), a.channel?.on(Ho, () => {
3092
3068
  let d = a.getConfig();
3093
3069
  d?.sidebar?.filters && t.setState({
3094
3070
  filters: {
@@ -3096,7 +3072,7 @@ var jo = /* @__PURE__ */ o(({
3096
3072
  ...d?.sidebar?.filters
3097
3073
  }
3098
3074
  });
3099
- }), mt.onAllStatusChange(async () => {
3075
+ }), gt.onAllStatusChange(async () => {
3100
3076
  let { internal_index: d } = t.getState();
3101
3077
  if (!d)
3102
3078
  return;
@@ -3117,31 +3093,31 @@ var jo = /* @__PURE__ */ o(({
3117
3093
  filters: c?.sidebar?.filters || {}
3118
3094
  },
3119
3095
  init: /* @__PURE__ */ o(async () => {
3120
- a.channel?.on(Oo, () => l.fetchIndex()), await l.fetchIndex();
3096
+ a.channel?.on(Uo, () => l.fetchIndex()), await l.fetchIndex();
3121
3097
  }, "init")
3122
3098
  };
3123
3099
  }, "init");
3124
3100
 
3125
3101
  // src/manager-api/modules/url.ts
3126
- var dr = {};
3127
- N(dr, {
3128
- init: () => Jo
3102
+ var yr = {};
3103
+ V(yr, {
3104
+ init: () => sn
3129
3105
  });
3130
3106
  import {
3131
- GLOBALS_UPDATED as Uo,
3132
- NAVIGATE_URL as Fo,
3133
- SET_CURRENT_STORY as Go,
3134
- STORY_ARGS_UPDATED as Wo,
3135
- UPDATE_QUERY_PARAMS as $o
3107
+ GLOBALS_UPDATED as Qo,
3108
+ NAVIGATE_URL as Zo,
3109
+ SET_CURRENT_STORY as en,
3110
+ STORY_ARGS_UPDATED as tn,
3111
+ UPDATE_QUERY_PARAMS as rn
3136
3112
  } from "storybook/internal/core-events";
3137
- import { buildArgsParam as R0, queryFromLocation as Ko } from "storybook/internal/router";
3138
- import { global as qo } from "@storybook/global";
3139
- var { window: lr } = qo, ee = /* @__PURE__ */ o((e) => {
3113
+ import { buildArgsParam as C0, queryFromLocation as an } from "storybook/internal/router";
3114
+ import { global as on } from "@storybook/global";
3115
+ var { window: vr } = on, te = /* @__PURE__ */ o((e) => {
3140
3116
  if (e === "true" || e === "1")
3141
3117
  return !0;
3142
3118
  if (e === "false" || e === "0")
3143
3119
  return !1;
3144
- }, "parseBoolean"), cr, Yo = /* @__PURE__ */ o(({
3120
+ }, "parseBoolean"), gr, nn = /* @__PURE__ */ o(({
3145
3121
  state: { location: e, path: t, viewMode: r, storyId: a },
3146
3122
  singleStory: n
3147
3123
  }) => {
@@ -3155,20 +3131,20 @@ var { window: lr } = qo, ee = /* @__PURE__ */ o((e) => {
3155
3131
  path: u,
3156
3132
  ...h
3157
3133
  // the rest gets passed to the iframe
3158
- } = Ko(e), p, m, v;
3159
- ee(s) === !0 ? (p = 0, m = 0, v = 0) : ee(s) === !1 && (p = B.layout.navSize, m = B.layout.bottomPanelHeight, v = B.layout.rightPanelWidth),
3160
- n || (ee(l) === !0 && (p = B.layout.navSize), ee(l) === !1 && (p = 0)), ee(i) === !1 && (m = 0, v = 0);
3134
+ } = an(e), p, m, v;
3135
+ te(s) === !0 ? (p = 0, m = 0, v = 0) : te(s) === !1 && (p = N.layout.navSize, m = N.layout.bottomPanelHeight, v = N.layout.rightPanelWidth),
3136
+ n || (te(l) === !0 && (p = N.layout.navSize), te(l) === !1 && (p = 0)), te(i) === !1 && (m = 0, v = 0);
3161
3137
  let g = {
3162
3138
  navSize: p,
3163
3139
  bottomPanelHeight: m,
3164
3140
  rightPanelWidth: v,
3165
3141
  panelPosition: ["right", "bottom"].includes(i) ? i : void 0,
3166
- showTabs: ee(f)
3142
+ showTabs: te(f)
3167
3143
  }, y = {
3168
- enableShortcuts: ee(c)
3169
- }, w = d || void 0, S = a, E = V(cr, h) ? cr : h;
3170
- return cr = E, { viewMode: r, layout: g, ui: y, selectedPanel: w, location: e, path: t, customQueryParams: E, storyId: S };
3171
- }, "initialUrlSupport"), Jo = /* @__PURE__ */ o((e) => {
3144
+ enableShortcuts: te(c)
3145
+ }, R = d || void 0, E = a, I = k(gr, h) ? gr : h;
3146
+ return gr = I, { viewMode: r, layout: g, ui: y, selectedPanel: R, location: e, path: t, customQueryParams: I, storyId: E };
3147
+ }, "initialUrlSupport"), sn = /* @__PURE__ */ o((e) => {
3172
3148
  let { store: t, navigate: r, provider: a, fullAPI: n } = e, s = /* @__PURE__ */ o((d, f = {}, u = {}) => {
3173
3149
  let h = Object.entries(f).filter(([, m]) => m).sort(([m], [v]) => m < v ? -1 : 1).map(([m, v]) => `${m}=${v}`), p = [d, ...h].join("&");
3174
3150
  return r(p, u);
@@ -3193,7 +3169,7 @@ var { window: lr } = qo, ee = /* @__PURE__ */ o((e) => {
3193
3169
  ...f,
3194
3170
  ...Object.entries(d).reduce((p, [m, v]) => (v !== null && (p[m] = v), p), u)
3195
3171
  };
3196
- V(f, h) || (t.setState({ customQueryParams: h }), a.channel?.emit($o, h));
3172
+ k(f, h) || (t.setState({ customQueryParams: h }), a.channel?.emit(rn, h));
3197
3173
  },
3198
3174
  applyQueryParams(d, f) {
3199
3175
  let { path: u, hash: h = "", queryParams: p } = i.getUrlState();
@@ -3209,51 +3185,51 @@ var { window: lr } = qo, ee = /* @__PURE__ */ o((e) => {
3209
3185
  let p = n.getCurrentStoryData();
3210
3186
  if (p?.type !== "story")
3211
3187
  return;
3212
- let { args: m, initialArgs: v } = p, g = R0(v, m);
3188
+ let { args: m, initialArgs: v } = p, g = C0(v, m);
3213
3189
  s(`${d}${f}`, { ...u, args: g }, { replace: !0 }), i.setQueryParams({ args: g });
3214
3190
  }, "updateArgsParam");
3215
- a.channel?.on(Go, () => l());
3191
+ a.channel?.on(en, () => l());
3216
3192
  let c;
3217
- return a.channel?.on(Wo, () => {
3218
- "requestIdleCallback" in lr ? (c && lr.cancelIdleCallback(c), c = lr.requestIdleCallback(l, { timeout: 1e3 })) : (c && clearTimeout(c), setTimeout(
3193
+ return a.channel?.on(tn, () => {
3194
+ "requestIdleCallback" in vr ? (c && vr.cancelIdleCallback(c), c = vr.requestIdleCallback(l, { timeout: 1e3 })) : (c && clearTimeout(c), setTimeout(
3219
3195
  l, 100));
3220
- }), a.channel?.on(Uo, ({ userGlobals: d, initialGlobals: f }) => {
3221
- let { path: u, hash: h = "", queryParams: p } = i.getUrlState(), m = R0(f, d);
3196
+ }), a.channel?.on(Qo, ({ userGlobals: d, initialGlobals: f }) => {
3197
+ let { path: u, hash: h = "", queryParams: p } = i.getUrlState(), m = C0(f, d);
3222
3198
  s(`${u}${h}`, { ...p, globals: m }, { replace: !0 }), i.setQueryParams({ globals: m });
3223
- }), a.channel?.on(Fo, (d, f) => {
3199
+ }), a.channel?.on(Zo, (d, f) => {
3224
3200
  i.navigateUrl(d, f);
3225
3201
  }), {
3226
3202
  api: i,
3227
- state: Yo(e)
3203
+ state: nn(e)
3228
3204
  };
3229
3205
  }, "init");
3230
3206
 
3231
3207
  // src/manager-api/modules/versions.ts
3232
- var ur = {};
3233
- N(ur, {
3234
- init: () => Zo
3208
+ var Rr = {};
3209
+ V(Rr, {
3210
+ init: () => dn
3235
3211
  });
3236
- var I0 = _t(kt(), 1);
3237
- import { global as fr } from "@storybook/global";
3238
- import j from "semver";
3212
+ var z0 = Tt(Gt(), 1);
3213
+ import { global as wr } from "@storybook/global";
3214
+ import U from "semver";
3239
3215
 
3240
3216
  // src/manager-api/version.ts
3241
- var S0 = "9.0.0-beta.7";
3217
+ var T0 = "9.0.0-beta.9";
3242
3218
 
3243
3219
  // src/manager-api/modules/versions.ts
3244
- var { VERSIONCHECK: Xo } = fr, E0 = (0, I0.default)(1)(() => {
3220
+ var { VERSIONCHECK: ln } = wr, O0 = (0, z0.default)(1)(() => {
3245
3221
  try {
3246
- return { ...JSON.parse(Xo).data || {} };
3222
+ return { ...JSON.parse(ln).data || {} };
3247
3223
  } catch {
3248
3224
  return {};
3249
3225
  }
3250
- }), Qo = /* @__PURE__ */ o((e) => e.includes("vue") ? "vue" : e, "normalizeRendererName"), Zo = /* @__PURE__ */ o(({ store: e }) => {
3226
+ }), cn = /* @__PURE__ */ o((e) => e.includes("vue") ? "vue" : e, "normalizeRendererName"), dn = /* @__PURE__ */ o(({ store: e }) => {
3251
3227
  let { dismissedVersionNotification: t } = e.getState(), r = {
3252
3228
  versions: {
3253
3229
  current: {
3254
- version: S0
3230
+ version: T0
3255
3231
  },
3256
- ...E0()
3232
+ ...O0()
3257
3233
  },
3258
3234
  dismissedVersionNotification: t
3259
3235
  }, a = {
@@ -3267,7 +3243,7 @@ var { VERSIONCHECK: Xo } = fr, E0 = (0, I0.default)(1)(() => {
3267
3243
  let {
3268
3244
  versions: { latest: s, next: i, current: l }
3269
3245
  } = e.getState();
3270
- return l && j.prerelease(l.version) && i ? s && j.gt(s.version, i.version) ? s : i : s;
3246
+ return l && U.prerelease(l.version) && i ? s && U.gt(s.version, i.version) ? s : i : s;
3271
3247
  }, "getLatestVersion"),
3272
3248
  // TODO: Move this to it's own "info" module later
3273
3249
  getDocsUrl: /* @__PURE__ */ o(({ subpath: s, versioned: i, renderer: l }) => {
@@ -3275,14 +3251,14 @@ var { VERSIONCHECK: Xo } = fr, E0 = (0, I0.default)(1)(() => {
3275
3251
  versions: { latest: c, current: d }
3276
3252
  } = e.getState(), f = "https://storybook.js.org/docs/";
3277
3253
  if (i && d?.version && c?.version) {
3278
- let p = j.diff(c.version, d.version);
3254
+ let p = U.diff(c.version, d.version);
3279
3255
  p === "patch" || p === null || // assume latest version when current version is a 0.0.0 canary
3280
- j.satisfies(d.version, "0.0.0", { includePrerelease: !0 }) || (f += `${j.major(d.version)}.${j.minor(d.version)}/`);
3256
+ U.satisfies(d.version, "0.0.0", { includePrerelease: !0 }) || (f += `${U.major(d.version)}.${U.minor(d.version)}/`);
3281
3257
  }
3282
3258
  let [u, h] = s?.split("#") || [];
3283
- if (u && (f += `${u}/`), l && typeof fr.STORYBOOK_RENDERER < "u") {
3284
- let p = fr.STORYBOOK_RENDERER;
3285
- p && (f += `?renderer=${Qo(p)}`);
3259
+ if (u && (f += `${u}/`), l && typeof wr.STORYBOOK_RENDERER < "u") {
3260
+ let p = wr.STORYBOOK_RENDERER;
3261
+ p && (f += `?renderer=${cn(p)}`);
3286
3262
  }
3287
3263
  return h && (f += `#${h}`), f;
3288
3264
  }, "getDocsUrl"),
@@ -3291,16 +3267,16 @@ var { VERSIONCHECK: Xo } = fr, E0 = (0, I0.default)(1)(() => {
3291
3267
  if (s) {
3292
3268
  if (!s.version || !i.version)
3293
3269
  return !0;
3294
- let c = !!j.prerelease(i.version) ? `${j.major(i.version)}.${j.minor(i.version)}.${j.patch(
3270
+ let c = !!U.prerelease(i.version) ? `${U.major(i.version)}.${U.minor(i.version)}.${U.patch(
3295
3271
  i.version
3296
- )}` : i.version, d = j.diff(c, s.version);
3297
- return j.gt(s.version, c) && d !== "patch" && !d.includes("pre");
3272
+ )}` : i.version, d = U.diff(c, s.version);
3273
+ return U.gt(s.version, c) && d !== "patch" && !d.includes("pre");
3298
3274
  }
3299
3275
  return !1;
3300
3276
  }, "versionUpdateAvailable")
3301
3277
  };
3302
3278
  return { init: /* @__PURE__ */ o(async () => {
3303
- let { versions: s = {} } = e.getState(), { latest: i, next: l } = E0();
3279
+ let { versions: s = {} } = e.getState(), { latest: i, next: l } = O0();
3304
3280
  await e.setState({
3305
3281
  versions: { ...s, latest: i, next: l }
3306
3282
  });
@@ -3308,22 +3284,22 @@ var { VERSIONCHECK: Xo } = fr, E0 = (0, I0.default)(1)(() => {
3308
3284
  }, "init");
3309
3285
 
3310
3286
  // src/manager-api/modules/whatsnew.tsx
3311
- var hr = {};
3312
- N(hr, {
3313
- init: () => sn
3287
+ var Sr = {};
3288
+ V(Sr, {
3289
+ init: () => gn
3314
3290
  });
3315
- import en from "react";
3291
+ import fn from "react";
3316
3292
  import {
3317
- REQUEST_WHATS_NEW_DATA as tn,
3318
- RESULT_WHATS_NEW_DATA as rn,
3319
- SET_WHATS_NEW_CACHE as an,
3320
- TOGGLE_WHATS_NEW_NOTIFICATIONS as on
3293
+ REQUEST_WHATS_NEW_DATA as un,
3294
+ RESULT_WHATS_NEW_DATA as hn,
3295
+ SET_WHATS_NEW_CACHE as pn,
3296
+ TOGGLE_WHATS_NEW_NOTIFICATIONS as mn
3321
3297
  } from "storybook/internal/core-events";
3322
- import { global as nn } from "@storybook/global";
3298
+ import { global as vn } from "@storybook/global";
3323
3299
 
3324
3300
  // ../node_modules/@storybook/icons/dist/index.mjs
3325
- import * as Me from "react";
3326
- var x0 = /* @__PURE__ */ Me.forwardRef(({ color: e = "currentColor", size: t = 14, ...r }, a) => /* @__PURE__ */ Me.createElement(
3301
+ import * as Ce from "react";
3302
+ var L0 = /* @__PURE__ */ Ce.forwardRef(({ color: e = "currentColor", size: t = 14, ...r }, a) => /* @__PURE__ */ Ce.createElement(
3327
3303
  "svg",
3328
3304
  {
3329
3305
  width: t,
@@ -3334,7 +3310,7 @@ var x0 = /* @__PURE__ */ Me.forwardRef(({ color: e = "currentColor", size: t = 1
3334
3310
  ref: a,
3335
3311
  ...r
3336
3312
  },
3337
- /* @__PURE__ */ Me.createElement(
3313
+ /* @__PURE__ */ Ce.createElement(
3338
3314
  "path",
3339
3315
  {
3340
3316
  fillRule: "evenodd",
@@ -3350,7 +3326,7 @@ var x0 = /* @__PURE__ */ Me.forwardRef(({ color: e = "currentColor", size: t = 1
3350
3326
  ));
3351
3327
 
3352
3328
  // src/manager-api/modules/whatsnew.tsx
3353
- var A0 = "whats-new", sn = /* @__PURE__ */ o(({ fullAPI: e, store: t, provider: r }) => {
3329
+ var H0 = "whats-new", gn = /* @__PURE__ */ o(({ fullAPI: e, store: t, provider: r }) => {
3354
3330
  let a = {
3355
3331
  whatsNewData: void 0
3356
3332
  };
@@ -3364,44 +3340,44 @@ var A0 = "whats-new", sn = /* @__PURE__ */ o(({ fullAPI: e, store: t, provider:
3364
3340
  },
3365
3341
  whatsNewHasBeenRead() {
3366
3342
  a.whatsNewData?.status === "SUCCESS" && (l({ lastReadPost: a.whatsNewData.url }), n({ ...a.whatsNewData, postIsRead: !0 }), e.clearNotification(
3367
- A0));
3343
+ H0));
3368
3344
  },
3369
3345
  toggleWhatsNewNotifications() {
3370
3346
  a.whatsNewData?.status === "SUCCESS" && (n({
3371
3347
  ...a.whatsNewData,
3372
3348
  disableWhatsNewNotifications: !a.whatsNewData.disableWhatsNewNotifications
3373
- }), r.channel?.emit(on, {
3349
+ }), r.channel?.emit(mn, {
3374
3350
  disableWhatsNewNotifications: a.whatsNewData.disableWhatsNewNotifications
3375
3351
  }));
3376
3352
  }
3377
3353
  };
3378
3354
  function i() {
3379
- return r.channel?.emit(tn), new Promise(
3355
+ return r.channel?.emit(un), new Promise(
3380
3356
  (d) => r.channel?.once(
3381
- rn,
3357
+ hn,
3382
3358
  ({ data: f }) => d(f)
3383
3359
  )
3384
3360
  );
3385
3361
  }
3386
3362
  o(i, "getLatestWhatsNewPost");
3387
3363
  function l(d) {
3388
- r.channel?.emit(an, d);
3364
+ r.channel?.emit(pn, d);
3389
3365
  }
3390
3366
  return o(l, "setWhatsNewCache"), { init: /* @__PURE__ */ o(async () => {
3391
- if (nn.CONFIG_TYPE !== "DEVELOPMENT")
3367
+ if (vn.CONFIG_TYPE !== "DEVELOPMENT")
3392
3368
  return;
3393
3369
  let d = await i();
3394
3370
  n(d);
3395
3371
  let f = e.getUrlState();
3396
3372
  !(f?.path === "/onboarding" || f.queryParams?.onboarding === "true") && d.status === "SUCCESS" && !d.disableWhatsNewNotifications && d.showNotification &&
3397
3373
  e.addNotification({
3398
- id: A0,
3374
+ id: H0,
3399
3375
  link: "/settings/whats-new",
3400
3376
  content: {
3401
3377
  headline: d.title,
3402
3378
  subHeadline: "Learn what's new in Storybook"
3403
3379
  },
3404
- icon: /* @__PURE__ */ en.createElement(x0, null),
3380
+ icon: /* @__PURE__ */ fn.createElement(L0, null),
3405
3381
  onClear({ dismissed: h }) {
3406
3382
  h && l({ lastDismissedPost: d.url });
3407
3383
  }
@@ -3410,25 +3386,25 @@ var A0 = "whats-new", sn = /* @__PURE__ */ o(({ fullAPI: e, store: t, provider:
3410
3386
  }, "init");
3411
3387
 
3412
3388
  // src/manager-api/store.ts
3413
- var he = _t(b0(), 1);
3389
+ var pe = Tt(B0(), 1);
3414
3390
 
3415
3391
  // ../node_modules/telejson/dist/chunk-EAFQLD22.mjs
3416
- var ln = Object.create, _0 = Object.defineProperty, cn = Object.getOwnPropertyDescriptor, P0 = Object.getOwnPropertyNames, dn = Object.getPrototypeOf,
3417
- fn = Object.prototype.hasOwnProperty, R = /* @__PURE__ */ o((e, t) => /* @__PURE__ */ o(function() {
3418
- return t || (0, e[P0(e)[0]])((t = { exports: {} }).exports, t), t.exports;
3419
- }, "__require"), "__commonJS"), un = /* @__PURE__ */ o((e, t, r, a) => {
3392
+ var yn = Object.create, N0 = Object.defineProperty, wn = Object.getOwnPropertyDescriptor, V0 = Object.getOwnPropertyNames, Rn = Object.getPrototypeOf,
3393
+ Sn = Object.prototype.hasOwnProperty, S = /* @__PURE__ */ o((e, t) => /* @__PURE__ */ o(function() {
3394
+ return t || (0, e[V0(e)[0]])((t = { exports: {} }).exports, t), t.exports;
3395
+ }, "__require"), "__commonJS"), En = /* @__PURE__ */ o((e, t, r, a) => {
3420
3396
  if (t && typeof t == "object" || typeof t == "function")
3421
- for (let n of P0(t))
3422
- !fn.call(e, n) && n !== r && _0(e, n, { get: /* @__PURE__ */ o(() => t[n], "get"), enumerable: !(a = cn(t, n)) || a.enumerable });
3397
+ for (let n of V0(t))
3398
+ !Sn.call(e, n) && n !== r && N0(e, n, { get: /* @__PURE__ */ o(() => t[n], "get"), enumerable: !(a = wn(t, n)) || a.enumerable });
3423
3399
  return e;
3424
- }, "__copyProps"), wt = /* @__PURE__ */ o((e, t, r) => (r = e != null ? ln(dn(e)) : {}, un(
3400
+ }, "__copyProps"), St = /* @__PURE__ */ o((e, t, r) => (r = e != null ? yn(Rn(e)) : {}, En(
3425
3401
  // If the importer is in node compatibility mode or this is not an ESM
3426
3402
  // file that has been converted to a CommonJS file using a Babel-
3427
3403
  // compatible transform (i.e. "__esModule" has not been set), then set
3428
3404
  // "default" to the CommonJS "module.exports" for node compatibility.
3429
- t || !e || !e.__esModule ? _0(r, "default", { value: e, enumerable: !0 }) : r,
3405
+ t || !e || !e.__esModule ? N0(r, "default", { value: e, enumerable: !0 }) : r,
3430
3406
  e
3431
- )), "__toESM"), hn = [
3407
+ )), "__toESM"), In = [
3432
3408
  "bubbles",
3433
3409
  "cancelBubble",
3434
3410
  "cancelable",
@@ -3442,113 +3418,113 @@ fn = Object.prototype.hasOwnProperty, R = /* @__PURE__ */ o((e, t) => /* @__PURE
3442
3418
  "target",
3443
3419
  "timeStamp",
3444
3420
  "type"
3445
- ], pn = ["detail"];
3446
- function M0(e) {
3447
- let t = hn.filter((r) => e[r] !== void 0).reduce((r, a) => (r[a] = e[a], r), {});
3421
+ ], xn = ["detail"];
3422
+ function k0(e) {
3423
+ let t = In.filter((r) => e[r] !== void 0).reduce((r, a) => (r[a] = e[a], r), {});
3448
3424
  if (e instanceof CustomEvent)
3449
- for (let r of pn.filter(
3425
+ for (let r of xn.filter(
3450
3426
  (a) => e[a] !== void 0
3451
3427
  ))
3452
3428
  t[r] = e[r];
3453
3429
  return t;
3454
3430
  }
3455
- o(M0, "extractEventHiddenProperties");
3431
+ o(k0, "extractEventHiddenProperties");
3456
3432
 
3457
3433
  // ../node_modules/telejson/dist/index.mjs
3458
- var H0 = R({
3434
+ var W0 = S({
3459
3435
  "node_modules/.pnpm/es-object-atoms@1.1.1/node_modules/es-object-atoms/index.js"(e, t) {
3460
3436
  "use strict";
3461
3437
  t.exports = Object;
3462
3438
  }
3463
- }), mn = R({
3439
+ }), An = S({
3464
3440
  "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js"(e, t) {
3465
3441
  "use strict";
3466
3442
  t.exports = Error;
3467
3443
  }
3468
- }), vn = R({
3444
+ }), bn = S({
3469
3445
  "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js"(e, t) {
3470
3446
  "use strict";
3471
3447
  t.exports = EvalError;
3472
3448
  }
3473
- }), gn = R({
3449
+ }), Pn = S({
3474
3450
  "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js"(e, t) {
3475
3451
  "use strict";
3476
3452
  t.exports = RangeError;
3477
3453
  }
3478
- }), yn = R({
3454
+ }), _n = S({
3479
3455
  "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js"(e, t) {
3480
3456
  "use strict";
3481
3457
  t.exports = ReferenceError;
3482
3458
  }
3483
- }), wn = R({
3459
+ }), Mn = S({
3484
3460
  "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js"(e, t) {
3485
3461
  "use strict";
3486
3462
  t.exports = SyntaxError;
3487
3463
  }
3488
- }), mr = R({
3464
+ }), Ir = S({
3489
3465
  "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js"(e, t) {
3490
3466
  "use strict";
3491
3467
  t.exports = TypeError;
3492
3468
  }
3493
- }), Rn = R({
3469
+ }), Cn = S({
3494
3470
  "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js"(e, t) {
3495
3471
  "use strict";
3496
3472
  t.exports = URIError;
3497
3473
  }
3498
- }), Sn = R({
3474
+ }), Tn = S({
3499
3475
  "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.js"(e, t) {
3500
3476
  "use strict";
3501
3477
  t.exports = Math.abs;
3502
3478
  }
3503
- }), En = R({
3479
+ }), On = S({
3504
3480
  "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.js"(e, t) {
3505
3481
  "use strict";
3506
3482
  t.exports = Math.floor;
3507
3483
  }
3508
- }), In = R({
3484
+ }), zn = S({
3509
3485
  "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.js"(e, t) {
3510
3486
  "use strict";
3511
3487
  t.exports = Math.max;
3512
3488
  }
3513
- }), xn = R({
3489
+ }), Ln = S({
3514
3490
  "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.js"(e, t) {
3515
3491
  "use strict";
3516
3492
  t.exports = Math.min;
3517
3493
  }
3518
- }), An = R({
3494
+ }), Hn = S({
3519
3495
  "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.js"(e, t) {
3520
3496
  "use strict";
3521
3497
  t.exports = Math.pow;
3522
3498
  }
3523
- }), bn = R({
3499
+ }), Bn = S({
3524
3500
  "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/round.js"(e, t) {
3525
3501
  "use strict";
3526
3502
  t.exports = Math.round;
3527
3503
  }
3528
- }), _n = R({
3504
+ }), Nn = S({
3529
3505
  "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.js"(e, t) {
3530
3506
  "use strict";
3531
3507
  t.exports = Number.isNaN || /* @__PURE__ */ o(function(a) {
3532
3508
  return a !== a;
3533
3509
  }, "isNaN2");
3534
3510
  }
3535
- }), Pn = R({
3511
+ }), Vn = S({
3536
3512
  "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/sign.js"(e, t) {
3537
3513
  "use strict";
3538
- var r = _n();
3514
+ var r = Nn();
3539
3515
  t.exports = /* @__PURE__ */ o(function(n) {
3540
3516
  return r(n) || n === 0 ? n : n < 0 ? -1 : 1;
3541
3517
  }, "sign");
3542
3518
  }
3543
- }), Mn = R({
3519
+ }), kn = S({
3544
3520
  "node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.js"(e, t) {
3545
3521
  "use strict";
3546
3522
  t.exports = Object.getOwnPropertyDescriptor;
3547
3523
  }
3548
- }), vr = R({
3524
+ }), xr = S({
3549
3525
  "node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.js"(e, t) {
3550
3526
  "use strict";
3551
- var r = Mn();
3527
+ var r = kn();
3552
3528
  if (r)
3553
3529
  try {
3554
3530
  r([], "length");
@@ -3557,7 +3533,7 @@ var H0 = R({
3557
3533
  }
3558
3534
  t.exports = r;
3559
3535
  }
3560
- }), Cn = R({
3536
+ }), Dn = S({
3561
3537
  "node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.js"(e, t) {
3562
3538
  "use strict";
3563
3539
  var r = Object.defineProperty || !1;
@@ -3569,7 +3545,7 @@ var H0 = R({
3569
3545
  }
3570
3546
  t.exports = r;
3571
3547
  }
3572
- }), B0 = R({
3548
+ }), $0 = S({
3573
3549
  "node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.js"(e, t) {
3574
3550
  "use strict";
3575
3551
  t.exports = /* @__PURE__ */ o(function() {
@@ -3602,27 +3578,27 @@ Symbol]")
3602
3578
  return !0;
3603
3579
  }, "hasSymbols");
3604
3580
  }
3605
- }), N0 = R({
3581
+ }), K0 = S({
3606
3582
  "node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.js"(e, t) {
3607
3583
  "use strict";
3608
- var r = typeof Symbol < "u" && Symbol, a = B0();
3584
+ var r = typeof Symbol < "u" && Symbol, a = $0();
3609
3585
  t.exports = /* @__PURE__ */ o(function() {
3610
3586
  return typeof r != "function" || typeof Symbol != "function" || typeof r("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 :
3611
3587
  a();
3612
3588
  }, "hasNativeSymbols");
3613
3589
  }
3614
- }), V0 = R({
3590
+ }), q0 = S({
3615
3591
  "node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Reflect.getPrototypeOf.js"(e, t) {
3616
3592
  "use strict";
3617
3593
  t.exports = typeof Reflect < "u" && Reflect.getPrototypeOf || null;
3618
3594
  }
3619
- }), k0 = R({
3595
+ }), Y0 = S({
3620
3596
  "node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.js"(e, t) {
3621
3597
  "use strict";
3622
- var r = H0();
3598
+ var r = W0();
3623
3599
  t.exports = r.getPrototypeOf || null;
3624
3600
  }
3625
- }), Tn = R({
3601
+ }), jn = S({
3626
3602
  "node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(e, t) {
3627
3603
  "use strict";
3628
3604
  var r = "Function.prototype.bind called on incompatible ", a = Object.prototype.toString, n = Math.max, s = "[object Function]", i = /* @__PURE__ */ o(
@@ -3647,11 +3623,11 @@ Symbol]")
3647
3623
  throw new TypeError(r + u);
3648
3624
  for (var h = l(arguments, 1), p, m = /* @__PURE__ */ o(function() {
3649
3625
  if (this instanceof p) {
3650
- var S = u.apply(
3626
+ var E = u.apply(
3651
3627
  this,
3652
3628
  i(h, arguments)
3653
3629
  );
3654
- return Object(S) === S ? S : this;
3630
+ return Object(E) === E ? E : this;
3655
3631
  }
3656
3632
  return u.apply(
3657
3633
  f,
@@ -3660,54 +3636,54 @@ Symbol]")
3660
3636
  }, "binder"), v = n(0, u.length - h.length), g = [], y = 0; y < v; y++)
3661
3637
  g[y] = "$" + y;
3662
3638
  if (p = Function("binder", "return function (" + c(g, ",") + "){ return binder.apply(this,arguments); }")(m), u.prototype) {
3663
- var w = /* @__PURE__ */ o(function() {
3639
+ var R = /* @__PURE__ */ o(function() {
3664
3640
  }, "Empty2");
3665
- w.prototype = u.prototype, p.prototype = new w(), w.prototype = null;
3641
+ R.prototype = u.prototype, p.prototype = new R(), R.prototype = null;
3666
3642
  }
3667
3643
  return p;
3668
3644
  }, "bind");
3669
3645
  }
3670
- }), Rt = R({
3646
+ }), Et = S({
3671
3647
  "node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(e, t) {
3672
3648
  "use strict";
3673
- var r = Tn();
3649
+ var r = jn();
3674
3650
  t.exports = Function.prototype.bind || r;
3675
3651
  }
3676
- }), gr = R({
3652
+ }), Ar = S({
3677
3653
  "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionCall.js"(e, t) {
3678
3654
  "use strict";
3679
3655
  t.exports = Function.prototype.call;
3680
3656
  }
3681
- }), D0 = R({
3657
+ }), J0 = S({
3682
3658
  "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionApply.js"(e, t) {
3683
3659
  "use strict";
3684
3660
  t.exports = Function.prototype.apply;
3685
3661
  }
3686
- }), On = R({
3662
+ }), Un = S({
3687
3663
  "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/reflectApply.js"(e, t) {
3688
3664
  "use strict";
3689
3665
  t.exports = typeof Reflect < "u" && Reflect && Reflect.apply;
3690
3666
  }
3691
- }), zn = R({
3667
+ }), Fn = S({
3692
3668
  "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/actualApply.js"(e, t) {
3693
3669
  "use strict";
3694
- var r = Rt(), a = D0(), n = gr(), s = On();
3670
+ var r = Et(), a = J0(), n = Ar(), s = Un();
3695
3671
  t.exports = s || r.call(n, a);
3696
3672
  }
3697
- }), j0 = R({
3673
+ }), X0 = S({
3698
3674
  "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.js"(e, t) {
3699
3675
  "use strict";
3700
- var r = Rt(), a = mr(), n = gr(), s = zn();
3676
+ var r = Et(), a = Ir(), n = Ar(), s = Fn();
3701
3677
  t.exports = /* @__PURE__ */ o(function(l) {
3702
3678
  if (l.length < 1 || typeof l[0] != "function")
3703
3679
  throw new a("a function is required");
3704
3680
  return s(r, n, l);
3705
3681
  }, "callBindBasic");
3706
3682
  }
3707
- }), Ln = R({
3683
+ }), Gn = S({
3708
3684
  "node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.js"(e, t) {
3709
3685
  "use strict";
3710
- var r = j0(), a = vr(), n;
3686
+ var r = X0(), a = xr(), n;
3711
3687
  try {
3712
3688
  n = /** @type {{ __proto__?: typeof Array.prototype }} */
3713
3689
  [].__proto__ === Array.prototype;
@@ -3727,10 +3703,10 @@ Symbol]")
3727
3703
  }, "getDunder")
3728
3704
  ) : !1;
3729
3705
  }
3730
- }), Hn = R({
3706
+ }), Wn = S({
3731
3707
  "node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/index.js"(e, t) {
3732
3708
  "use strict";
3733
- var r = V0(), a = k0(), n = Ln();
3709
+ var r = q0(), a = Y0(), n = Gn();
3734
3710
  t.exports = r ? /* @__PURE__ */ o(function(i) {
3735
3711
  return r(i);
3736
3712
  }, "getProto") : a ? /* @__PURE__ */ o(function(i) {
@@ -3741,45 +3717,45 @@ Symbol]")
3741
3717
  return n(i);
3742
3718
  }, "getProto") : null;
3743
3719
  }
3744
- }), U0 = R({
3720
+ }), Q0 = S({
3745
3721
  "node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js"(e, t) {
3746
3722
  "use strict";
3747
- var r = Function.prototype.call, a = Object.prototype.hasOwnProperty, n = Rt();
3723
+ var r = Function.prototype.call, a = Object.prototype.hasOwnProperty, n = Et();
3748
3724
  t.exports = n.call(r, a);
3749
3725
  }
3750
- }), Bn = R({
3726
+ }), $n = S({
3751
3727
  "node_modules/.pnpm/get-intrinsic@1.3.0/node_modules/get-intrinsic/index.js"(e, t) {
3752
3728
  "use strict";
3753
- var r, a = H0(), n = mn(), s = vn(), i = gn(), l = yn(), c = wn(), d = mr(), f = Rn(), u = Sn(), h = En(), p = In(), m = xn(), v = An(),
3754
- g = bn(), y = Pn(), w = Function, S = /* @__PURE__ */ o(function(U) {
3729
+ var r, a = W0(), n = An(), s = bn(), i = Pn(), l = _n(), c = Mn(), d = Ir(), f = Cn(), u = Tn(), h = On(), p = zn(), m = Ln(), v = Hn(),
3730
+ g = Bn(), y = Vn(), R = Function, E = /* @__PURE__ */ o(function(F) {
3755
3731
  try {
3756
- return w('"use strict"; return (' + U + ").constructor;")();
3732
+ return R('"use strict"; return (' + F + ").constructor;")();
3757
3733
  } catch {
3758
3734
  }
3759
- }, "getEvalledConstructor"), E = vr(), x = Cn(), I = /* @__PURE__ */ o(function() {
3735
+ }, "getEvalledConstructor"), I = xr(), A = Dn(), x = /* @__PURE__ */ o(function() {
3760
3736
  throw new d();
3761
- }, "throwTypeError"), P = E ? function() {
3737
+ }, "throwTypeError"), M = I ? function() {
3762
3738
  try {
3763
- return arguments.callee, I;
3739
+ return arguments.callee, x;
3764
3740
  } catch {
3765
3741
  try {
3766
- return E(arguments, "callee").get;
3742
+ return I(arguments, "callee").get;
3767
3743
  } catch {
3768
- return I;
3744
+ return x;
3769
3745
  }
3770
3746
  }
3771
- }() : I, C = N0()(), A = Hn(), me = k0(), ca = V0(), Pr = D0(), ve = gr(), te = {}, da = typeof Uint8Array > "u" || !A ? r : A(Uint8Array),
3772
- J = {
3747
+ }() : x, T = K0()(), b = Wn(), ve = Y0(), wa = q0(), Vr = J0(), ge = Ar(), re = {}, Ra = typeof Uint8Array > "u" || !b ? r : b(Uint8Array),
3748
+ X = {
3773
3749
  __proto__: null,
3774
3750
  "%AggregateError%": typeof AggregateError > "u" ? r : AggregateError,
3775
3751
  "%Array%": Array,
3776
3752
  "%ArrayBuffer%": typeof ArrayBuffer > "u" ? r : ArrayBuffer,
3777
- "%ArrayIteratorPrototype%": C && A ? A([][Symbol.iterator]()) : r,
3753
+ "%ArrayIteratorPrototype%": T && b ? b([][Symbol.iterator]()) : r,
3778
3754
  "%AsyncFromSyncIteratorPrototype%": r,
3779
- "%AsyncFunction%": te,
3780
- "%AsyncGenerator%": te,
3781
- "%AsyncGeneratorFunction%": te,
3782
- "%AsyncIteratorPrototype%": te,
3755
+ "%AsyncFunction%": re,
3756
+ "%AsyncGenerator%": re,
3757
+ "%AsyncGeneratorFunction%": re,
3758
+ "%AsyncIteratorPrototype%": re,
3783
3759
  "%Atomics%": typeof Atomics > "u" ? r : Atomics,
3784
3760
  "%BigInt%": typeof BigInt > "u" ? r : BigInt,
3785
3761
  "%BigInt64Array%": typeof BigInt64Array > "u" ? r : BigInt64Array,
@@ -3799,21 +3775,21 @@ Symbol]")
3799
3775
  "%Float32Array%": typeof Float32Array > "u" ? r : Float32Array,
3800
3776
  "%Float64Array%": typeof Float64Array > "u" ? r : Float64Array,
3801
3777
  "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? r : FinalizationRegistry,
3802
- "%Function%": w,
3803
- "%GeneratorFunction%": te,
3778
+ "%Function%": R,
3779
+ "%GeneratorFunction%": re,
3804
3780
  "%Int8Array%": typeof Int8Array > "u" ? r : Int8Array,
3805
3781
  "%Int16Array%": typeof Int16Array > "u" ? r : Int16Array,
3806
3782
  "%Int32Array%": typeof Int32Array > "u" ? r : Int32Array,
3807
3783
  "%isFinite%": isFinite,
3808
3784
  "%isNaN%": isNaN,
3809
- "%IteratorPrototype%": C && A ? A(A([][Symbol.iterator]())) : r,
3785
+ "%IteratorPrototype%": T && b ? b(b([][Symbol.iterator]())) : r,
3810
3786
  "%JSON%": typeof JSON == "object" ? JSON : r,
3811
3787
  "%Map%": typeof Map > "u" ? r : Map,
3812
- "%MapIteratorPrototype%": typeof Map > "u" || !C || !A ? r : A((/* @__PURE__ */ new Map())[Symbol.iterator]()),
3788
+ "%MapIteratorPrototype%": typeof Map > "u" || !T || !b ? r : b((/* @__PURE__ */ new Map())[Symbol.iterator]()),
3813
3789
  "%Math%": Math,
3814
3790
  "%Number%": Number,
3815
3791
  "%Object%": a,
3816
- "%Object.getOwnPropertyDescriptor%": E,
3792
+ "%Object.getOwnPropertyDescriptor%": I,
3817
3793
  "%parseFloat%": parseFloat,
3818
3794
  "%parseInt%": parseInt,
3819
3795
  "%Promise%": typeof Promise > "u" ? r : Promise,
@@ -3823,14 +3799,14 @@ Symbol]")
3823
3799
  "%Reflect%": typeof Reflect > "u" ? r : Reflect,
3824
3800
  "%RegExp%": RegExp,
3825
3801
  "%Set%": typeof Set > "u" ? r : Set,
3826
- "%SetIteratorPrototype%": typeof Set > "u" || !C || !A ? r : A((/* @__PURE__ */ new Set())[Symbol.iterator]()),
3802
+ "%SetIteratorPrototype%": typeof Set > "u" || !T || !b ? r : b((/* @__PURE__ */ new Set())[Symbol.iterator]()),
3827
3803
  "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? r : SharedArrayBuffer,
3828
3804
  "%String%": String,
3829
- "%StringIteratorPrototype%": C && A ? A(""[Symbol.iterator]()) : r,
3830
- "%Symbol%": C ? Symbol : r,
3805
+ "%StringIteratorPrototype%": T && b ? b(""[Symbol.iterator]()) : r,
3806
+ "%Symbol%": T ? Symbol : r,
3831
3807
  "%SyntaxError%": c,
3832
- "%ThrowTypeError%": P,
3833
- "%TypedArray%": da,
3808
+ "%ThrowTypeError%": M,
3809
+ "%TypedArray%": Ra,
3834
3810
  "%TypeError%": d,
3835
3811
  "%Uint8Array%": typeof Uint8Array > "u" ? r : Uint8Array,
3836
3812
  "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? r : Uint8ClampedArray,
@@ -3840,10 +3816,10 @@ Symbol]")
3840
3816
  "%WeakMap%": typeof WeakMap > "u" ? r : WeakMap,
3841
3817
  "%WeakRef%": typeof WeakRef > "u" ? r : WeakRef,
3842
3818
  "%WeakSet%": typeof WeakSet > "u" ? r : WeakSet,
3843
- "%Function.prototype.call%": ve,
3844
- "%Function.prototype.apply%": Pr,
3845
- "%Object.defineProperty%": x,
3846
- "%Object.getPrototypeOf%": me,
3819
+ "%Function.prototype.call%": ge,
3820
+ "%Function.prototype.apply%": Vr,
3821
+ "%Object.defineProperty%": A,
3822
+ "%Object.getPrototypeOf%": ve,
3847
3823
  "%Math.abs%": u,
3848
3824
  "%Math.floor%": h,
3849
3825
  "%Math.max%": p,
@@ -3851,31 +3827,31 @@ Symbol]")
3851
3827
  "%Math.pow%": v,
3852
3828
  "%Math.round%": g,
3853
3829
  "%Math.sign%": y,
3854
- "%Reflect.getPrototypeOf%": ca
3830
+ "%Reflect.getPrototypeOf%": wa
3855
3831
  };
3856
- if (A)
3832
+ if (b)
3857
3833
  try {
3858
3834
  null.error;
3859
- } catch (U) {
3860
- Mr = A(A(U)), J["%Error.prototype%"] = Mr;
3835
+ } catch (F) {
3836
+ kr = b(b(F)), X["%Error.prototype%"] = kr;
3861
3837
  }
3862
- var Mr, fa = /* @__PURE__ */ o(function U(b) {
3863
- var M;
3864
- if (b === "%AsyncFunction%")
3865
- M = S("async function () {}");
3866
- else if (b === "%GeneratorFunction%")
3867
- M = S("function* () {}");
3868
- else if (b === "%AsyncGeneratorFunction%")
3869
- M = S("async function* () {}");
3870
- else if (b === "%AsyncGenerator%") {
3871
- var _ = U("%AsyncGeneratorFunction%");
3872
- _ && (M = _.prototype);
3873
- } else if (b === "%AsyncIteratorPrototype%") {
3874
- var T = U("%AsyncGenerator%");
3875
- T && A && (M = A(T.prototype));
3838
+ var kr, Sa = /* @__PURE__ */ o(function F(P) {
3839
+ var C;
3840
+ if (P === "%AsyncFunction%")
3841
+ C = E("async function () {}");
3842
+ else if (P === "%GeneratorFunction%")
3843
+ C = E("function* () {}");
3844
+ else if (P === "%AsyncGeneratorFunction%")
3845
+ C = E("async function* () {}");
3846
+ else if (P === "%AsyncGenerator%") {
3847
+ var _ = F("%AsyncGeneratorFunction%");
3848
+ _ && (C = _.prototype);
3849
+ } else if (P === "%AsyncIteratorPrototype%") {
3850
+ var O = F("%AsyncGenerator%");
3851
+ O && b && (C = b(O.prototype));
3876
3852
  }
3877
- return J[b] = M, M;
3878
- }, "doEval2"), Cr = {
3853
+ return X[P] = C, C;
3854
+ }, "doEval2"), Dr = {
3879
3855
  __proto__: null,
3880
3856
  "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
3881
3857
  "%ArrayPrototype%": ["Array", "prototype"],
@@ -3928,68 +3904,68 @@ Symbol]")
3928
3904
  "%URIErrorPrototype%": ["URIError", "prototype"],
3929
3905
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
3930
3906
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
3931
- }, ge = Rt(), Le = U0(), ua = ge.call(ve, Array.prototype.concat), ha = ge.call(Pr, Array.prototype.splice), Tr = ge.call(ve, String.prototype.
3932
- replace), He = ge.call(ve, String.prototype.slice), pa = ge.call(ve, RegExp.prototype.exec), ma = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,
3933
- va = /\\(\\)?/g, ga = /* @__PURE__ */ o(function(b) {
3934
- var M = He(b, 0, 1), _ = He(b, -1);
3935
- if (M === "%" && _ !== "%")
3907
+ }, ye = Et(), He = Q0(), Ea = ye.call(ge, Array.prototype.concat), Ia = ye.call(Vr, Array.prototype.splice), jr = ye.call(ge, String.prototype.
3908
+ replace), Be = ye.call(ge, String.prototype.slice), xa = ye.call(ge, RegExp.prototype.exec), Aa = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,
3909
+ ba = /\\(\\)?/g, Pa = /* @__PURE__ */ o(function(P) {
3910
+ var C = Be(P, 0, 1), _ = Be(P, -1);
3911
+ if (C === "%" && _ !== "%")
3936
3912
  throw new c("invalid intrinsic syntax, expected closing `%`");
3937
- if (_ === "%" && M !== "%")
3913
+ if (_ === "%" && C !== "%")
3938
3914
  throw new c("invalid intrinsic syntax, expected opening `%`");
3939
- var T = [];
3940
- return Tr(b, ma, function(F, re, L, Be) {
3941
- T[T.length] = L ? Tr(Be, va, "$1") : re || F;
3942
- }), T;
3943
- }, "stringToPath3"), ya = /* @__PURE__ */ o(function(b, M) {
3944
- var _ = b, T;
3945
- if (Le(Cr, _) && (T = Cr[_], _ = "%" + T[0] + "%"), Le(J, _)) {
3946
- var F = J[_];
3947
- if (F === te && (F = fa(_)), typeof F > "u" && !M)
3948
- throw new d("intrinsic " + b + " exists, but is not available. Please file an issue!");
3915
+ var O = [];
3916
+ return jr(P, Aa, function(G, ae, H, Ne) {
3917
+ O[O.length] = H ? jr(Ne, ba, "$1") : ae || G;
3918
+ }), O;
3919
+ }, "stringToPath3"), _a = /* @__PURE__ */ o(function(P, C) {
3920
+ var _ = P, O;
3921
+ if (He(Dr, _) && (O = Dr[_], _ = "%" + O[0] + "%"), He(X, _)) {
3922
+ var G = X[_];
3923
+ if (G === re && (G = Sa(_)), typeof G > "u" && !C)
3924
+ throw new d("intrinsic " + P + " exists, but is not available. Please file an issue!");
3949
3925
  return {
3950
- alias: T,
3926
+ alias: O,
3951
3927
  name: _,
3952
- value: F
3928
+ value: G
3953
3929
  };
3954
3930
  }
3955
- throw new c("intrinsic " + b + " does not exist!");
3931
+ throw new c("intrinsic " + P + " does not exist!");
3956
3932
  }, "getBaseIntrinsic2");
3957
- t.exports = /* @__PURE__ */ o(function(b, M) {
3958
- if (typeof b != "string" || b.length === 0)
3933
+ t.exports = /* @__PURE__ */ o(function(P, C) {
3934
+ if (typeof P != "string" || P.length === 0)
3959
3935
  throw new d("intrinsic name must be a non-empty string");
3960
- if (arguments.length > 1 && typeof M != "boolean")
3936
+ if (arguments.length > 1 && typeof C != "boolean")
3961
3937
  throw new d('"allowMissing" argument must be a boolean');
3962
- if (pa(/^%?[^%]*%?$/, b) === null)
3938
+ if (xa(/^%?[^%]*%?$/, P) === null)
3963
3939
  throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
3964
- var _ = ga(b), T = _.length > 0 ? _[0] : "", F = ya("%" + T + "%", M), re = F.name, L = F.value, Be = !1, bt = F.alias;
3965
- bt && (T = bt[0], ha(_, ua([0, 1], bt)));
3966
- for (var Ne = 1, ye = !0; Ne < _.length; Ne += 1) {
3967
- var $ = _[Ne], Ve = He($, 0, 1), ke = He($, -1);
3968
- if ((Ve === '"' || Ve === "'" || Ve === "`" || ke === '"' || ke === "'" || ke === "`") && Ve !== ke)
3940
+ var _ = Pa(P), O = _.length > 0 ? _[0] : "", G = _a("%" + O + "%", C), ae = G.name, H = G.value, Ne = !1, Ct = G.alias;
3941
+ Ct && (O = Ct[0], Ia(_, Ea([0, 1], Ct)));
3942
+ for (var Ve = 1, we = !0; Ve < _.length; Ve += 1) {
3943
+ var K = _[Ve], ke = Be(K, 0, 1), De = Be(K, -1);
3944
+ if ((ke === '"' || ke === "'" || ke === "`" || De === '"' || De === "'" || De === "`") && ke !== De)
3969
3945
  throw new c("property names with quotes must have matching quotes");
3970
- if (($ === "constructor" || !ye) && (Be = !0), T += "." + $, re = "%" + T + "%", Le(J, re))
3971
- L = J[re];
3972
- else if (L != null) {
3973
- if (!($ in L)) {
3974
- if (!M)
3975
- throw new d("base intrinsic for " + b + " exists, but the property is not available.");
3946
+ if ((K === "constructor" || !we) && (Ne = !0), O += "." + K, ae = "%" + O + "%", He(X, ae))
3947
+ H = X[ae];
3948
+ else if (H != null) {
3949
+ if (!(K in H)) {
3950
+ if (!C)
3951
+ throw new d("base intrinsic for " + P + " exists, but the property is not available.");
3976
3952
  return;
3977
3953
  }
3978
- if (E && Ne + 1 >= _.length) {
3979
- var De = E(L, $);
3980
- ye = !!De, ye && "get" in De && !("originalValue" in De.get) ? L = De.get : L = L[$];
3954
+ if (I && Ve + 1 >= _.length) {
3955
+ var je = I(H, K);
3956
+ we = !!je, we && "get" in je && !("originalValue" in je.get) ? H = je.get : H = H[K];
3981
3957
  } else
3982
- ye = Le(L, $), L = L[$];
3983
- ye && !Be && (J[re] = L);
3958
+ we = He(H, K), H = H[K];
3959
+ we && !Ne && (X[ae] = H);
3984
3960
  }
3985
3961
  }
3986
- return L;
3962
+ return H;
3987
3963
  }, "GetIntrinsic");
3988
3964
  }
3989
- }), yr = R({
3965
+ }), br = S({
3990
3966
  "node_modules/.pnpm/call-bound@1.0.4/node_modules/call-bound/index.js"(e, t) {
3991
3967
  "use strict";
3992
- var r = Bn(), a = j0(), n = a([r("%String.prototype.indexOf%")]);
3968
+ var r = $n(), a = X0(), n = a([r("%String.prototype.indexOf%")]);
3993
3969
  t.exports = /* @__PURE__ */ o(function(i, l) {
3994
3970
  var c = (
3995
3971
  /** @type {(this: unknown, ...args: unknown[]) => unknown} */
@@ -4001,18 +3977,18 @@ Symbol]")
4001
3977
  ) : c;
4002
3978
  }, "callBoundIntrinsic");
4003
3979
  }
4004
- }), Nn = R({
3980
+ }), Kn = S({
4005
3981
  "node_modules/.pnpm/has-tostringtag@1.0.2/node_modules/has-tostringtag/shams.js"(e, t) {
4006
3982
  "use strict";
4007
- var r = B0();
3983
+ var r = $0();
4008
3984
  t.exports = /* @__PURE__ */ o(function() {
4009
3985
  return r() && !!Symbol.toStringTag;
4010
3986
  }, "hasToStringTagShams");
4011
3987
  }
4012
- }), F0 = R({
3988
+ }), Z0 = S({
4013
3989
  "node_modules/.pnpm/is-regex@1.2.1/node_modules/is-regex/index.js"(e, t) {
4014
3990
  "use strict";
4015
- var r = yr(), a = Nn()(), n = U0(), s = vr(), i;
3991
+ var r = br(), a = Kn()(), n = Q0(), s = xr(), i;
4016
3992
  a ? (l = r("RegExp.prototype.exec"), c = {}, d = /* @__PURE__ */ o(function() {
4017
3993
  throw c;
4018
3994
  }, "throwRegexMarker"), f = {
@@ -4047,7 +4023,7 @@ Symbol]")
4047
4023
  var l, c, d, f, u, h;
4048
4024
  t.exports = i;
4049
4025
  }
4050
- }), Vn = R({
4026
+ }), qn = S({
4051
4027
  "node_modules/.pnpm/is-function@1.0.2/node_modules/is-function/index.js"(e, t) {
4052
4028
  t.exports = a;
4053
4029
  var r = Object.prototype.toString;
@@ -4060,10 +4036,10 @@ Symbol]")
4060
4036
  }
4061
4037
  o(a, "isFunction3");
4062
4038
  }
4063
- }), kn = R({
4039
+ }), Yn = S({
4064
4040
  "node_modules/.pnpm/safe-regex-test@1.1.0/node_modules/safe-regex-test/index.js"(e, t) {
4065
4041
  "use strict";
4066
- var r = yr(), a = F0(), n = r("RegExp.prototype.exec"), s = mr();
4042
+ var r = br(), a = Z0(), n = r("RegExp.prototype.exec"), s = Ir();
4067
4043
  t.exports = /* @__PURE__ */ o(function(l) {
4068
4044
  if (!a(l))
4069
4045
  throw new s("`regex` must be a RegExp");
@@ -4072,10 +4048,10 @@ Symbol]")
4072
4048
  }, "test");
4073
4049
  }, "regexTester");
4074
4050
  }
4075
- }), Dn = R({
4051
+ }), Jn = S({
4076
4052
  "node_modules/.pnpm/is-symbol@1.1.1/node_modules/is-symbol/index.js"(e, t) {
4077
4053
  "use strict";
4078
- var r = yr(), a = r("Object.prototype.toString"), n = N0()(), s = kn();
4054
+ var r = br(), a = r("Object.prototype.toString"), n = K0()(), s = Yn();
4079
4055
  n ? (i = r("Symbol.prototype.toString"), l = s(/^Symbol\(.*\)$/), c = /* @__PURE__ */ o(function(f) {
4080
4056
  return typeof f.valueOf() != "symbol" ? !1 : l(i(f));
4081
4057
  }, "isRealSymbolObject"), t.exports = /* @__PURE__ */ o(function(f) {
@@ -4093,91 +4069,91 @@ Symbol]")
4093
4069
  }, "isSymbol3");
4094
4070
  var i, l, c;
4095
4071
  }
4096
- }), jn = wt(F0()), Un = wt(Vn()), Fn = wt(Dn());
4097
- function Gn(e) {
4072
+ }), Xn = St(Z0()), Qn = St(qn()), Zn = St(Jn());
4073
+ function e1(e) {
4098
4074
  return e != null && typeof e == "object" && Array.isArray(e) === !1;
4099
4075
  }
4100
- o(Gn, "isObject");
4101
- var Wn = typeof global == "object" && global && global.Object === Object && global, $n = Wn, Kn = typeof self == "object" && self && self.Object ===
4102
- Object && self, qn = $n || Kn || Function("return this")(), wr = qn, Yn = wr.Symbol, ce = Yn, G0 = Object.prototype, Jn = G0.hasOwnProperty,
4103
- Xn = G0.toString, Ce = ce ? ce.toStringTag : void 0;
4104
- function Qn(e) {
4105
- var t = Jn.call(e, Ce), r = e[Ce];
4076
+ o(e1, "isObject");
4077
+ var t1 = typeof global == "object" && global && global.Object === Object && global, r1 = t1, a1 = typeof self == "object" && self && self.Object ===
4078
+ Object && self, o1 = r1 || a1 || Function("return this")(), Pr = o1, n1 = Pr.Symbol, de = n1, ea = Object.prototype, i1 = ea.hasOwnProperty,
4079
+ s1 = ea.toString, Te = de ? de.toStringTag : void 0;
4080
+ function l1(e) {
4081
+ var t = i1.call(e, Te), r = e[Te];
4106
4082
  try {
4107
- e[Ce] = void 0;
4083
+ e[Te] = void 0;
4108
4084
  var a = !0;
4109
4085
  } catch {
4110
4086
  }
4111
- var n = Xn.call(e);
4112
- return a && (t ? e[Ce] = r : delete e[Ce]), n;
4087
+ var n = s1.call(e);
4088
+ return a && (t ? e[Te] = r : delete e[Te]), n;
4113
4089
  }
4114
- o(Qn, "getRawTag");
4115
- var Zn = Qn, e1 = Object.prototype, t1 = e1.toString;
4116
- function r1(e) {
4117
- return t1.call(e);
4090
+ o(l1, "getRawTag");
4091
+ var c1 = l1, d1 = Object.prototype, f1 = d1.toString;
4092
+ function u1(e) {
4093
+ return f1.call(e);
4118
4094
  }
4119
- o(r1, "objectToString");
4120
- var a1 = r1, o1 = "[object Null]", n1 = "[object Undefined]", C0 = ce ? ce.toStringTag : void 0;
4121
- function i1(e) {
4122
- return e == null ? e === void 0 ? n1 : o1 : C0 && C0 in Object(e) ? Zn(e) : a1(e);
4095
+ o(u1, "objectToString");
4096
+ var h1 = u1, p1 = "[object Null]", m1 = "[object Undefined]", D0 = de ? de.toStringTag : void 0;
4097
+ function v1(e) {
4098
+ return e == null ? e === void 0 ? m1 : p1 : D0 && D0 in Object(e) ? c1(e) : h1(e);
4123
4099
  }
4124
- o(i1, "baseGetTag");
4125
- var W0 = i1;
4126
- function s1(e) {
4100
+ o(v1, "baseGetTag");
4101
+ var ta = v1;
4102
+ function g1(e) {
4127
4103
  return e != null && typeof e == "object";
4128
4104
  }
4129
- o(s1, "isObjectLike");
4130
- var l1 = s1, c1 = "[object Symbol]";
4131
- function d1(e) {
4132
- return typeof e == "symbol" || l1(e) && W0(e) == c1;
4105
+ o(g1, "isObjectLike");
4106
+ var y1 = g1, w1 = "[object Symbol]";
4107
+ function R1(e) {
4108
+ return typeof e == "symbol" || y1(e) && ta(e) == w1;
4133
4109
  }
4134
- o(d1, "isSymbol");
4135
- var Rr = d1;
4136
- function f1(e, t) {
4110
+ o(R1, "isSymbol");
4111
+ var _r = R1;
4112
+ function S1(e, t) {
4137
4113
  for (var r = -1, a = e == null ? 0 : e.length, n = Array(a); ++r < a; )
4138
4114
  n[r] = t(e[r], r, e);
4139
4115
  return n;
4140
4116
  }
4141
- o(f1, "arrayMap");
4142
- var u1 = f1, h1 = Array.isArray, Sr = h1, p1 = 1 / 0, T0 = ce ? ce.prototype : void 0, O0 = T0 ? T0.toString : void 0;
4143
- function $0(e) {
4117
+ o(S1, "arrayMap");
4118
+ var E1 = S1, I1 = Array.isArray, Mr = I1, x1 = 1 / 0, j0 = de ? de.prototype : void 0, U0 = j0 ? j0.toString : void 0;
4119
+ function ra(e) {
4144
4120
  if (typeof e == "string")
4145
4121
  return e;
4146
- if (Sr(e))
4147
- return u1(e, $0) + "";
4148
- if (Rr(e))
4149
- return O0 ? O0.call(e) : "";
4122
+ if (Mr(e))
4123
+ return E1(e, ra) + "";
4124
+ if (_r(e))
4125
+ return U0 ? U0.call(e) : "";
4150
4126
  var t = e + "";
4151
- return t == "0" && 1 / e == -p1 ? "-0" : t;
4127
+ return t == "0" && 1 / e == -x1 ? "-0" : t;
4152
4128
  }
4153
- o($0, "baseToString");
4154
- var m1 = $0;
4155
- function v1(e) {
4129
+ o(ra, "baseToString");
4130
+ var A1 = ra;
4131
+ function b1(e) {
4156
4132
  var t = typeof e;
4157
4133
  return e != null && (t == "object" || t == "function");
4158
4134
  }
4159
- o(v1, "isObject2");
4160
- var K0 = v1, g1 = "[object AsyncFunction]", y1 = "[object Function]", w1 = "[object GeneratorFunction]", R1 = "[object Proxy]";
4161
- function S1(e) {
4162
- if (!K0(e))
4135
+ o(b1, "isObject2");
4136
+ var aa = b1, P1 = "[object AsyncFunction]", _1 = "[object Function]", M1 = "[object GeneratorFunction]", C1 = "[object Proxy]";
4137
+ function T1(e) {
4138
+ if (!aa(e))
4163
4139
  return !1;
4164
- var t = W0(e);
4165
- return t == y1 || t == w1 || t == g1 || t == R1;
4140
+ var t = ta(e);
4141
+ return t == _1 || t == M1 || t == P1 || t == C1;
4166
4142
  }
4167
- o(S1, "isFunction");
4168
- var E1 = S1, I1 = wr["__core-js_shared__"], pr = I1, z0 = function() {
4169
- var e = /[^.]+$/.exec(pr && pr.keys && pr.keys.IE_PROTO || "");
4143
+ o(T1, "isFunction");
4144
+ var O1 = T1, z1 = Pr["__core-js_shared__"], Er = z1, F0 = function() {
4145
+ var e = /[^.]+$/.exec(Er && Er.keys && Er.keys.IE_PROTO || "");
4170
4146
  return e ? "Symbol(src)_1." + e : "";
4171
4147
  }();
4172
- function x1(e) {
4173
- return !!z0 && z0 in e;
4148
+ function L1(e) {
4149
+ return !!F0 && F0 in e;
4174
4150
  }
4175
- o(x1, "isMasked");
4176
- var A1 = x1, b1 = Function.prototype, _1 = b1.toString;
4177
- function P1(e) {
4151
+ o(L1, "isMasked");
4152
+ var H1 = L1, B1 = Function.prototype, N1 = B1.toString;
4153
+ function V1(e) {
4178
4154
  if (e != null) {
4179
4155
  try {
4180
- return _1.call(e);
4156
+ return N1.call(e);
4181
4157
  } catch {
4182
4158
  }
4183
4159
  try {
@@ -4187,204 +4163,204 @@ function P1(e) {
4187
4163
  }
4188
4164
  return "";
4189
4165
  }
4190
- o(P1, "toSource");
4191
- var M1 = P1, C1 = /[\\^$.*+?()[\]{}|]/g, T1 = /^\[object .+?Constructor\]$/, O1 = Function.prototype, z1 = Object.prototype, L1 = O1.toString,
4192
- H1 = z1.hasOwnProperty, B1 = RegExp(
4193
- "^" + L1.call(H1).replace(C1, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
4166
+ o(V1, "toSource");
4167
+ var k1 = V1, D1 = /[\\^$.*+?()[\]{}|]/g, j1 = /^\[object .+?Constructor\]$/, U1 = Function.prototype, F1 = Object.prototype, G1 = U1.toString,
4168
+ W1 = F1.hasOwnProperty, $1 = RegExp(
4169
+ "^" + G1.call(W1).replace(D1, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
4194
4170
  );
4195
- function N1(e) {
4196
- if (!K0(e) || A1(e))
4171
+ function K1(e) {
4172
+ if (!aa(e) || H1(e))
4197
4173
  return !1;
4198
- var t = E1(e) ? B1 : T1;
4199
- return t.test(M1(e));
4174
+ var t = O1(e) ? $1 : j1;
4175
+ return t.test(k1(e));
4200
4176
  }
4201
- o(N1, "baseIsNative");
4202
- var V1 = N1;
4203
- function k1(e, t) {
4177
+ o(K1, "baseIsNative");
4178
+ var q1 = K1;
4179
+ function Y1(e, t) {
4204
4180
  return e?.[t];
4205
4181
  }
4206
- o(k1, "getValue");
4207
- var D1 = k1;
4208
- function j1(e, t) {
4209
- var r = D1(e, t);
4210
- return V1(r) ? r : void 0;
4182
+ o(Y1, "getValue");
4183
+ var J1 = Y1;
4184
+ function X1(e, t) {
4185
+ var r = J1(e, t);
4186
+ return q1(r) ? r : void 0;
4211
4187
  }
4212
- o(j1, "getNative");
4213
- var q0 = j1;
4214
- function U1(e, t) {
4188
+ o(X1, "getNative");
4189
+ var oa = X1;
4190
+ function Q1(e, t) {
4215
4191
  return e === t || e !== e && t !== t;
4216
4192
  }
4217
- o(U1, "eq");
4218
- var F1 = U1, G1 = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, W1 = /^\w*$/;
4219
- function $1(e, t) {
4220
- if (Sr(e))
4193
+ o(Q1, "eq");
4194
+ var Z1 = Q1, e5 = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, t5 = /^\w*$/;
4195
+ function r5(e, t) {
4196
+ if (Mr(e))
4221
4197
  return !1;
4222
4198
  var r = typeof e;
4223
- return r == "number" || r == "symbol" || r == "boolean" || e == null || Rr(e) ? !0 : W1.test(e) || !G1.test(e) || t != null && e in Object(
4199
+ return r == "number" || r == "symbol" || r == "boolean" || e == null || _r(e) ? !0 : t5.test(e) || !e5.test(e) || t != null && e in Object(
4224
4200
  t);
4225
4201
  }
4226
- o($1, "isKey");
4227
- var K1 = $1, q1 = q0(Object, "create"), Te = q1;
4228
- function Y1() {
4229
- this.__data__ = Te ? Te(null) : {}, this.size = 0;
4202
+ o(r5, "isKey");
4203
+ var a5 = r5, o5 = oa(Object, "create"), Oe = o5;
4204
+ function n5() {
4205
+ this.__data__ = Oe ? Oe(null) : {}, this.size = 0;
4230
4206
  }
4231
- o(Y1, "hashClear");
4232
- var J1 = Y1;
4233
- function X1(e) {
4207
+ o(n5, "hashClear");
4208
+ var i5 = n5;
4209
+ function s5(e) {
4234
4210
  var t = this.has(e) && delete this.__data__[e];
4235
4211
  return this.size -= t ? 1 : 0, t;
4236
4212
  }
4237
- o(X1, "hashDelete");
4238
- var Q1 = X1, Z1 = "__lodash_hash_undefined__", e5 = Object.prototype, t5 = e5.hasOwnProperty;
4239
- function r5(e) {
4213
+ o(s5, "hashDelete");
4214
+ var l5 = s5, c5 = "__lodash_hash_undefined__", d5 = Object.prototype, f5 = d5.hasOwnProperty;
4215
+ function u5(e) {
4240
4216
  var t = this.__data__;
4241
- if (Te) {
4217
+ if (Oe) {
4242
4218
  var r = t[e];
4243
- return r === Z1 ? void 0 : r;
4219
+ return r === c5 ? void 0 : r;
4244
4220
  }
4245
- return t5.call(t, e) ? t[e] : void 0;
4221
+ return f5.call(t, e) ? t[e] : void 0;
4246
4222
  }
4247
- o(r5, "hashGet");
4248
- var a5 = r5, o5 = Object.prototype, n5 = o5.hasOwnProperty;
4249
- function i5(e) {
4223
+ o(u5, "hashGet");
4224
+ var h5 = u5, p5 = Object.prototype, m5 = p5.hasOwnProperty;
4225
+ function v5(e) {
4250
4226
  var t = this.__data__;
4251
- return Te ? t[e] !== void 0 : n5.call(t, e);
4227
+ return Oe ? t[e] !== void 0 : m5.call(t, e);
4252
4228
  }
4253
- o(i5, "hashHas");
4254
- var s5 = i5, l5 = "__lodash_hash_undefined__";
4255
- function c5(e, t) {
4229
+ o(v5, "hashHas");
4230
+ var g5 = v5, y5 = "__lodash_hash_undefined__";
4231
+ function w5(e, t) {
4256
4232
  var r = this.__data__;
4257
- return this.size += this.has(e) ? 0 : 1, r[e] = Te && t === void 0 ? l5 : t, this;
4233
+ return this.size += this.has(e) ? 0 : 1, r[e] = Oe && t === void 0 ? y5 : t, this;
4258
4234
  }
4259
- o(c5, "hashSet");
4260
- var d5 = c5;
4261
- function de(e) {
4235
+ o(w5, "hashSet");
4236
+ var R5 = w5;
4237
+ function fe(e) {
4262
4238
  var t = -1, r = e == null ? 0 : e.length;
4263
4239
  for (this.clear(); ++t < r; ) {
4264
4240
  var a = e[t];
4265
4241
  this.set(a[0], a[1]);
4266
4242
  }
4267
4243
  }
4268
- o(de, "Hash");
4269
- de.prototype.clear = J1;
4270
- de.prototype.delete = Q1;
4271
- de.prototype.get = a5;
4272
- de.prototype.has = s5;
4273
- de.prototype.set = d5;
4274
- var L0 = de;
4275
- function f5() {
4244
+ o(fe, "Hash");
4245
+ fe.prototype.clear = i5;
4246
+ fe.prototype.delete = l5;
4247
+ fe.prototype.get = h5;
4248
+ fe.prototype.has = g5;
4249
+ fe.prototype.set = R5;
4250
+ var G0 = fe;
4251
+ function S5() {
4276
4252
  this.__data__ = [], this.size = 0;
4277
4253
  }
4278
- o(f5, "listCacheClear");
4279
- var u5 = f5;
4280
- function h5(e, t) {
4254
+ o(S5, "listCacheClear");
4255
+ var E5 = S5;
4256
+ function I5(e, t) {
4281
4257
  for (var r = e.length; r--; )
4282
- if (F1(e[r][0], t))
4258
+ if (Z1(e[r][0], t))
4283
4259
  return r;
4284
4260
  return -1;
4285
4261
  }
4286
- o(h5, "assocIndexOf");
4287
- var St = h5, p5 = Array.prototype, m5 = p5.splice;
4288
- function v5(e) {
4289
- var t = this.__data__, r = St(t, e);
4262
+ o(I5, "assocIndexOf");
4263
+ var It = I5, x5 = Array.prototype, A5 = x5.splice;
4264
+ function b5(e) {
4265
+ var t = this.__data__, r = It(t, e);
4290
4266
  if (r < 0)
4291
4267
  return !1;
4292
4268
  var a = t.length - 1;
4293
- return r == a ? t.pop() : m5.call(t, r, 1), --this.size, !0;
4269
+ return r == a ? t.pop() : A5.call(t, r, 1), --this.size, !0;
4294
4270
  }
4295
- o(v5, "listCacheDelete");
4296
- var g5 = v5;
4297
- function y5(e) {
4298
- var t = this.__data__, r = St(t, e);
4271
+ o(b5, "listCacheDelete");
4272
+ var P5 = b5;
4273
+ function _5(e) {
4274
+ var t = this.__data__, r = It(t, e);
4299
4275
  return r < 0 ? void 0 : t[r][1];
4300
4276
  }
4301
- o(y5, "listCacheGet");
4302
- var w5 = y5;
4303
- function R5(e) {
4304
- return St(this.__data__, e) > -1;
4277
+ o(_5, "listCacheGet");
4278
+ var M5 = _5;
4279
+ function C5(e) {
4280
+ return It(this.__data__, e) > -1;
4305
4281
  }
4306
- o(R5, "listCacheHas");
4307
- var S5 = R5;
4308
- function E5(e, t) {
4309
- var r = this.__data__, a = St(r, e);
4282
+ o(C5, "listCacheHas");
4283
+ var T5 = C5;
4284
+ function O5(e, t) {
4285
+ var r = this.__data__, a = It(r, e);
4310
4286
  return a < 0 ? (++this.size, r.push([e, t])) : r[a][1] = t, this;
4311
4287
  }
4312
- o(E5, "listCacheSet");
4313
- var I5 = E5;
4314
- function fe(e) {
4288
+ o(O5, "listCacheSet");
4289
+ var z5 = O5;
4290
+ function ue(e) {
4315
4291
  var t = -1, r = e == null ? 0 : e.length;
4316
4292
  for (this.clear(); ++t < r; ) {
4317
4293
  var a = e[t];
4318
4294
  this.set(a[0], a[1]);
4319
4295
  }
4320
4296
  }
4321
- o(fe, "ListCache");
4322
- fe.prototype.clear = u5;
4323
- fe.prototype.delete = g5;
4324
- fe.prototype.get = w5;
4325
- fe.prototype.has = S5;
4326
- fe.prototype.set = I5;
4327
- var x5 = fe, A5 = q0(wr, "Map"), b5 = A5;
4328
- function _5() {
4297
+ o(ue, "ListCache");
4298
+ ue.prototype.clear = E5;
4299
+ ue.prototype.delete = P5;
4300
+ ue.prototype.get = M5;
4301
+ ue.prototype.has = T5;
4302
+ ue.prototype.set = z5;
4303
+ var L5 = ue, H5 = oa(Pr, "Map"), B5 = H5;
4304
+ function N5() {
4329
4305
  this.size = 0, this.__data__ = {
4330
- hash: new L0(),
4331
- map: new (b5 || x5)(),
4332
- string: new L0()
4306
+ hash: new G0(),
4307
+ map: new (B5 || L5)(),
4308
+ string: new G0()
4333
4309
  };
4334
4310
  }
4335
- o(_5, "mapCacheClear");
4336
- var P5 = _5;
4337
- function M5(e) {
4311
+ o(N5, "mapCacheClear");
4312
+ var V5 = N5;
4313
+ function k5(e) {
4338
4314
  var t = typeof e;
4339
4315
  return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
4340
4316
  }
4341
- o(M5, "isKeyable");
4342
- var C5 = M5;
4343
- function T5(e, t) {
4317
+ o(k5, "isKeyable");
4318
+ var D5 = k5;
4319
+ function j5(e, t) {
4344
4320
  var r = e.__data__;
4345
- return C5(t) ? r[typeof t == "string" ? "string" : "hash"] : r.map;
4321
+ return D5(t) ? r[typeof t == "string" ? "string" : "hash"] : r.map;
4346
4322
  }
4347
- o(T5, "getMapData");
4348
- var Et = T5;
4349
- function O5(e) {
4350
- var t = Et(this, e).delete(e);
4323
+ o(j5, "getMapData");
4324
+ var xt = j5;
4325
+ function U5(e) {
4326
+ var t = xt(this, e).delete(e);
4351
4327
  return this.size -= t ? 1 : 0, t;
4352
4328
  }
4353
- o(O5, "mapCacheDelete");
4354
- var z5 = O5;
4355
- function L5(e) {
4356
- return Et(this, e).get(e);
4329
+ o(U5, "mapCacheDelete");
4330
+ var F5 = U5;
4331
+ function G5(e) {
4332
+ return xt(this, e).get(e);
4357
4333
  }
4358
- o(L5, "mapCacheGet");
4359
- var H5 = L5;
4360
- function B5(e) {
4361
- return Et(this, e).has(e);
4334
+ o(G5, "mapCacheGet");
4335
+ var W5 = G5;
4336
+ function $5(e) {
4337
+ return xt(this, e).has(e);
4362
4338
  }
4363
- o(B5, "mapCacheHas");
4364
- var N5 = B5;
4365
- function V5(e, t) {
4366
- var r = Et(this, e), a = r.size;
4339
+ o($5, "mapCacheHas");
4340
+ var K5 = $5;
4341
+ function q5(e, t) {
4342
+ var r = xt(this, e), a = r.size;
4367
4343
  return r.set(e, t), this.size += r.size == a ? 0 : 1, this;
4368
4344
  }
4369
- o(V5, "mapCacheSet");
4370
- var k5 = V5;
4371
- function ue(e) {
4345
+ o(q5, "mapCacheSet");
4346
+ var Y5 = q5;
4347
+ function he(e) {
4372
4348
  var t = -1, r = e == null ? 0 : e.length;
4373
4349
  for (this.clear(); ++t < r; ) {
4374
4350
  var a = e[t];
4375
4351
  this.set(a[0], a[1]);
4376
4352
  }
4377
4353
  }
4378
- o(ue, "MapCache");
4379
- ue.prototype.clear = P5;
4380
- ue.prototype.delete = z5;
4381
- ue.prototype.get = H5;
4382
- ue.prototype.has = N5;
4383
- ue.prototype.set = k5;
4384
- var Y0 = ue, D5 = "Expected a function";
4385
- function Er(e, t) {
4354
+ o(he, "MapCache");
4355
+ he.prototype.clear = V5;
4356
+ he.prototype.delete = F5;
4357
+ he.prototype.get = W5;
4358
+ he.prototype.has = K5;
4359
+ he.prototype.set = Y5;
4360
+ var na = he, J5 = "Expected a function";
4361
+ function Cr(e, t) {
4386
4362
  if (typeof e != "function" || t != null && typeof t != "function")
4387
- throw new TypeError(D5);
4363
+ throw new TypeError(J5);
4388
4364
  var r = /* @__PURE__ */ o(function() {
4389
4365
  var a = arguments, n = t ? t.apply(this, a) : a[0], s = r.cache;
4390
4366
  if (s.has(n))
@@ -4392,63 +4368,63 @@ function Er(e, t) {
4392
4368
  var i = e.apply(this, a);
4393
4369
  return r.cache = s.set(n, i) || s, i;
4394
4370
  }, "memoized");
4395
- return r.cache = new (Er.Cache || Y0)(), r;
4371
+ return r.cache = new (Cr.Cache || na)(), r;
4396
4372
  }
4397
- o(Er, "memoize");
4398
- Er.Cache = Y0;
4399
- var j5 = Er, U5 = 500;
4400
- function F5(e) {
4401
- var t = j5(e, function(a) {
4402
- return r.size === U5 && r.clear(), a;
4373
+ o(Cr, "memoize");
4374
+ Cr.Cache = na;
4375
+ var X5 = Cr, Q5 = 500;
4376
+ function Z5(e) {
4377
+ var t = X5(e, function(a) {
4378
+ return r.size === Q5 && r.clear(), a;
4403
4379
  }), r = t.cache;
4404
4380
  return t;
4405
4381
  }
4406
- o(F5, "memoizeCapped");
4407
- var G5 = F5, W5 = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, $5 = /\\(\\)?/g, K5 = G5(
4382
+ o(Z5, "memoizeCapped");
4383
+ var ei = Z5, ti = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ri = /\\(\\)?/g, ai = ei(
4408
4384
  function(e) {
4409
4385
  var t = [];
4410
- return e.charCodeAt(0) === 46 && t.push(""), e.replace(W5, function(r, a, n, s) {
4411
- t.push(n ? s.replace($5, "$1") : a || r);
4386
+ return e.charCodeAt(0) === 46 && t.push(""), e.replace(ti, function(r, a, n, s) {
4387
+ t.push(n ? s.replace(ri, "$1") : a || r);
4412
4388
  }), t;
4413
- }), q5 = K5;
4414
- function Y5(e) {
4415
- return e == null ? "" : m1(e);
4389
+ }), oi = ai;
4390
+ function ni(e) {
4391
+ return e == null ? "" : A1(e);
4416
4392
  }
4417
- o(Y5, "toString");
4418
- var J5 = Y5;
4419
- function X5(e, t) {
4420
- return Sr(e) ? e : K1(e, t) ? [e] : q5(J5(e));
4393
+ o(ni, "toString");
4394
+ var ii = ni;
4395
+ function si(e, t) {
4396
+ return Mr(e) ? e : a5(e, t) ? [e] : oi(ii(e));
4421
4397
  }
4422
- o(X5, "castPath");
4423
- var Q5 = X5, Z5 = 1 / 0;
4424
- function ei(e) {
4425
- if (typeof e == "string" || Rr(e))
4398
+ o(si, "castPath");
4399
+ var li = si, ci = 1 / 0;
4400
+ function di(e) {
4401
+ if (typeof e == "string" || _r(e))
4426
4402
  return e;
4427
4403
  var t = e + "";
4428
- return t == "0" && 1 / e == -Z5 ? "-0" : t;
4404
+ return t == "0" && 1 / e == -ci ? "-0" : t;
4429
4405
  }
4430
- o(ei, "toKey");
4431
- var ti = ei;
4432
- function ri(e, t) {
4433
- t = Q5(t, e);
4406
+ o(di, "toKey");
4407
+ var fi = di;
4408
+ function ui(e, t) {
4409
+ t = li(t, e);
4434
4410
  for (var r = 0, a = t.length; e != null && r < a; )
4435
- e = e[ti(t[r++])];
4411
+ e = e[fi(t[r++])];
4436
4412
  return r && r == a ? e : void 0;
4437
4413
  }
4438
- o(ri, "baseGet");
4439
- var ai = ri;
4440
- function oi(e, t, r) {
4441
- var a = e == null ? void 0 : ai(e, t);
4414
+ o(ui, "baseGet");
4415
+ var hi = ui;
4416
+ function pi(e, t, r) {
4417
+ var a = e == null ? void 0 : hi(e, t);
4442
4418
  return a === void 0 ? r : a;
4443
4419
  }
4444
- o(oi, "get");
4445
- var ni = oi, Ir = Gn, ii = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z$/, si = /* @__PURE__ */ o((e) => e.match(/^[\[\{\"\}].*[\]\}\"]$/),
4420
+ o(pi, "get");
4421
+ var mi = pi, Tr = e1, vi = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z$/, gi = /* @__PURE__ */ o((e) => e.match(/^[\[\{\"\}].*[\]\}\"]$/),
4446
4422
  "isJSON");
4447
- function J0(e) {
4448
- if (!Ir(e))
4423
+ function ia(e) {
4424
+ if (!Tr(e))
4449
4425
  return e;
4450
4426
  let t = e, r = !1;
4451
- return typeof Event < "u" && e instanceof Event && (t = M0(t), r = !0), t = Object.keys(t).reduce((a, n) => {
4427
+ return typeof Event < "u" && e instanceof Event && (t = k0(t), r = !0), t = Object.keys(t).reduce((a, n) => {
4452
4428
  try {
4453
4429
  t[n] && t[n].toJSON, a[n] = t[n];
4454
4430
  } catch {
@@ -4457,8 +4433,8 @@ function J0(e) {
4457
4433
  return a;
4458
4434
  }, {}), r ? t : e;
4459
4435
  }
4460
- o(J0, "convertUnconventionalData");
4461
- var li = /* @__PURE__ */ o(function(t) {
4436
+ o(ia, "convertUnconventionalData");
4437
+ var yi = /* @__PURE__ */ o(function(t) {
4462
4438
  let r, a, n, s;
4463
4439
  return /* @__PURE__ */ o(function(l, c) {
4464
4440
  try {
@@ -4478,12 +4454,12 @@ var li = /* @__PURE__ */ o(function(t) {
4478
4454
  if (typeof c == "bigint")
4479
4455
  return `_bigint_${c.toString()}`;
4480
4456
  if (typeof c == "string")
4481
- return ii.test(c) ? t.allowDate ? `_date_${c}` : void 0 : c;
4482
- if ((0, jn.default)(c))
4457
+ return vi.test(c) ? t.allowDate ? `_date_${c}` : void 0 : c;
4458
+ if ((0, Xn.default)(c))
4483
4459
  return t.allowRegExp ? `_regexp_${c.flags}|${c.source}` : void 0;
4484
- if ((0, Un.default)(c))
4460
+ if ((0, Qn.default)(c))
4485
4461
  return;
4486
- if ((0, Fn.default)(c)) {
4462
+ if ((0, Zn.default)(c)) {
4487
4463
  if (!t.allowSymbol)
4488
4464
  return;
4489
4465
  let u = Symbol.keyFor(c);
@@ -4529,7 +4505,7 @@ var li = /* @__PURE__ */ o(function(t) {
4529
4505
  }
4530
4506
  let f = r.get(c);
4531
4507
  if (!f) {
4532
- let u = Array.isArray(c) ? c : J0(c);
4508
+ let u = Array.isArray(c) ? c : ia(c);
4533
4509
  return s.push(l), n.unshift(u), r.set(c, JSON.stringify(s)), c !== u && a.set(c, u), u;
4534
4510
  }
4535
4511
  return `_duplicate_${f}`;
@@ -4537,15 +4513,15 @@ var li = /* @__PURE__ */ o(function(t) {
4537
4513
  return;
4538
4514
  }
4539
4515
  }, "replace");
4540
- }, "replacer2"), ci = /* @__PURE__ */ o(function(t) {
4516
+ }, "replacer2"), wi = /* @__PURE__ */ o(function(t) {
4541
4517
  let r = [], a;
4542
4518
  return /* @__PURE__ */ o(function(s, i) {
4543
4519
  if (s === "" && (a = i, r.forEach(({ target: l, container: c, replacement: d }) => {
4544
- let f = si(d) ? JSON.parse(d) : d.split(".");
4545
- f.length === 0 ? c[l] = a : c[l] = ni(a, f);
4520
+ let f = gi(d) ? JSON.parse(d) : d.split(".");
4521
+ f.length === 0 ? c[l] = a : c[l] = mi(a, f);
4546
4522
  })), s === "_constructor-name_")
4547
4523
  return i;
4548
- if (Ir(i) && i.__isConvertedError__) {
4524
+ if (Tr(i) && i.__isConvertedError__) {
4549
4525
  let { message: l, ...c } = i.errorProperties, d = new Error(l);
4550
4526
  return Object.assign(d, c), d;
4551
4527
  }
@@ -4560,7 +4536,7 @@ var li = /* @__PURE__ */ o(function(t) {
4560
4536
  i === "_Infinity_" ? Number.POSITIVE_INFINITY : typeof i == "string" && i === "_NaN_" ? Number.NaN : typeof i == "string" && i.startsWith(
4561
4537
  "_bigint_") && typeof BigInt == "function" ? BigInt(i.replace("_bigint_", "")) : i;
4562
4538
  }, "revive");
4563
- }, "reviver2"), X0 = {
4539
+ }, "reviver2"), sa = {
4564
4540
  maxDepth: 10,
4565
4541
  space: void 0,
4566
4542
  allowRegExp: !0,
@@ -4568,66 +4544,63 @@ var li = /* @__PURE__ */ o(function(t) {
4568
4544
  allowError: !0,
4569
4545
  allowUndefined: !0,
4570
4546
  allowSymbol: !0
4571
- }, Q0 = /* @__PURE__ */ o((e, t = {}) => {
4572
- let r = { ...X0, ...t };
4573
- return JSON.stringify(J0(e), li(r), t.space);
4574
- }, "stringify"), di = /* @__PURE__ */ o(() => {
4547
+ }, la = /* @__PURE__ */ o((e, t = {}) => {
4548
+ let r = { ...sa, ...t };
4549
+ return JSON.stringify(ia(e), yi(r), t.space);
4550
+ }, "stringify"), Ri = /* @__PURE__ */ o(() => {
4575
4551
  let e = /* @__PURE__ */ new Map();
4576
4552
  return /* @__PURE__ */ o(function t(r) {
4577
- Ir(r) && Object.entries(r).forEach(([a, n]) => {
4553
+ Tr(r) && Object.entries(r).forEach(([a, n]) => {
4578
4554
  n === "_undefined_" ? r[a] = void 0 : e.get(n) || (e.set(n, !0), t(n));
4579
4555
  }), Array.isArray(r) && r.forEach((a, n) => {
4580
4556
  a === "_undefined_" ? (e.set(a, !0), r[n] = void 0) : e.get(a) || (e.set(a, !0), t(a));
4581
4557
  });
4582
4558
  }, "mutateUndefined");
4583
- }, "mutator"), Z0 = /* @__PURE__ */ o((e, t = {}) => {
4584
- let r = { ...X0, ...t }, a = JSON.parse(e, ci(r));
4585
- return di()(a), a;
4559
+ }, "mutator"), ca = /* @__PURE__ */ o((e, t = {}) => {
4560
+ let r = { ...sa, ...t }, a = JSON.parse(e, wi(r));
4561
+ return Ri()(a), a;
4586
4562
  }, "parse");
4587
4563
 
4588
4564
  // src/manager-api/lib/store-setup.ts
4589
- var ea = /* @__PURE__ */ o((e) => {
4565
+ var da = /* @__PURE__ */ o((e) => {
4590
4566
  e.fn("set", function(t, r) {
4591
4567
  return e.set(
4592
4568
  // @ts-expect-error('this' implicitly has type 'any')
4593
4569
  this._area,
4594
4570
  // @ts-expect-error('this' implicitly has type 'any')
4595
4571
  this._in(t),
4596
- Q0(r, { maxDepth: 50 })
4572
+ la(r, { maxDepth: 50 })
4597
4573
  );
4598
4574
  }), e.fn("get", function(t, r) {
4599
4575
  let a = e.get(this._area, this._in(t));
4600
- return a !== null ? Z0(a) : r || a;
4576
+ return a !== null ? ca(a) : r || a;
4601
4577
  });
4602
4578
  }, "default");
4603
4579
 
4604
4580
  // src/manager-api/store.ts
4605
- ea(he.default._);
4606
- var ta = "@storybook/manager/store";
4607
- function xr(e) {
4608
- return e.get(ta) || {};
4581
+ da(pe.default._);
4582
+ var fa = "@storybook/manager/store";
4583
+ function Or(e) {
4584
+ return e.get(fa) || {};
4609
4585
  }
4610
- o(xr, "get");
4611
- function fi(e, t) {
4612
- return e.set(ta, t);
4586
+ o(Or, "get");
4587
+ function Si(e, t) {
4588
+ return e.set(fa, t);
4613
4589
  }
4614
- o(fi, "set");
4615
- function ui(e, t) {
4616
- let r = xr(e);
4617
- return fi(e, { ...r, ...t });
4590
+ o(Si, "set");
4591
+ function Ei(e, t) {
4592
+ let r = Or(e);
4593
+ return Si(e, { ...r, ...t });
4618
4594
  }
4619
- o(ui, "update");
4620
- var Oe = class {
4621
- static {
4622
- o(this, "Store");
4623
- }
4595
+ o(Ei, "update");
4596
+ var zr = class zr {
4624
4597
  constructor({ setState: t, getState: r }) {
4625
4598
  this.upstreamSetState = t, this.upstreamGetState = r;
4626
4599
  }
4627
4600
  // The assumption is that this will be called once, to initialize the React state
4628
4601
  // when the module is instantiated
4629
4602
  getInitialState(t) {
4630
- return { ...t, ...xr(he.default.local), ...xr(he.default.session) };
4603
+ return { ...t, ...Or(pe.default.local), ...Or(pe.default.session) };
4631
4604
  }
4632
4605
  getState() {
4633
4606
  return this.upstreamGetState();
@@ -4643,41 +4616,42 @@ var Oe = class {
4643
4616
  });
4644
4617
  });
4645
4618
  if (i !== "none") {
4646
- let f = i === "session" ? he.default.session : he.default.local;
4647
- await ui(f, c);
4619
+ let f = i === "session" ? pe.default.session : pe.default.local;
4620
+ await Ei(f, c);
4648
4621
  }
4649
4622
  return n && n(d), d;
4650
4623
  }
4651
4624
  };
4625
+ o(zr, "Store");
4626
+ var ze = zr;
4652
4627
 
4653
4628
  // src/manager-api/lib/request-response.ts
4654
- var It = class extends Error {
4629
+ var Lr = class Lr extends Error {
4655
4630
  constructor(r, a) {
4656
4631
  super(r);
4657
4632
  this.payload = void 0;
4658
4633
  this.payload = a;
4659
4634
  }
4660
- static {
4661
- o(this, "RequestResponseError");
4662
- }
4663
- }, E4 = /* @__PURE__ */ o((e, t, r, a, n = 5e3) => {
4635
+ };
4636
+ o(Lr, "RequestResponseError");
4637
+ var At = Lr, O4 = /* @__PURE__ */ o((e, t, r, a, n = 5e3) => {
4664
4638
  let s;
4665
4639
  return new Promise((i, l) => {
4666
4640
  let c = {
4667
4641
  id: Math.random().toString(16).slice(2),
4668
4642
  payload: a
4669
4643
  }, d = /* @__PURE__ */ o((f) => {
4670
- f.id === c.id && (clearTimeout(s), e.off(r, d), f.success ? i(f.payload) : l(new It(f.error, f.payload)));
4644
+ f.id === c.id && (clearTimeout(s), e.off(r, d), f.success ? i(f.payload) : l(new At(f.error, f.payload)));
4671
4645
  }, "responseHandler");
4672
4646
  e.emit(t, c), e.on(r, d), s = setTimeout(() => {
4673
- e.off(r, d), l(new It("Timed out waiting for response"));
4647
+ e.off(r, d), l(new At("Timed out waiting for response"));
4674
4648
  }, n);
4675
4649
  });
4676
4650
  }, "experimental_requestResponse");
4677
4651
 
4678
4652
  // src/manager-api/root.tsx
4679
- var { ActiveTabs: z4 } = ft;
4680
- var At = Fr({ api: void 0, state: ct({}) }), o0 = /* @__PURE__ */ o((...e) => Wr({}, ...e), "combineParameters"), oa = class extends hi {
4653
+ var { ActiveTabs: F4 } = ut;
4654
+ var _t = Zr({ api: void 0, state: dt({}) }), p0 = /* @__PURE__ */ o((...e) => t0({}, ...e), "combineParameters"), Pt = class Pt extends Ii {
4681
4655
  constructor(r) {
4682
4656
  super(r);
4683
4657
  this.api = {};
@@ -4695,42 +4669,36 @@ var At = Fr({ api: void 0, state: ct({}) }), o0 = /* @__PURE__ */ o((...e) => Wr
4695
4669
  storyId: c,
4696
4670
  docsOptions: d,
4697
4671
  navigate: f
4698
- } = r, u = new Oe({
4672
+ } = r, u = new ze({
4699
4673
  getState: /* @__PURE__ */ o(() => this.state, "getState"),
4700
- setState: /* @__PURE__ */ o((y, w) => (this.setState(y, () => w(this.state)), this.state), "setState")
4674
+ setState: /* @__PURE__ */ o((y, R) => (this.setState(y, () => R(this.state)), this.state), "setState")
4701
4675
  }), h = { location: a, path: n, viewMode: i, singleStory: l, storyId: c, refId: s }, p = { docsOptions: d };
4702
- this.state = u.getInitialState(ct({ ...h, ...p }));
4676
+ this.state = u.getInitialState(dt({ ...h, ...p }));
4703
4677
  let m = {
4704
4678
  navigate: f,
4705
4679
  store: u,
4706
4680
  provider: r.provider
4707
4681
  };
4708
4682
  this.modules = [
4683
+ Zt,
4684
+ Ut,
4685
+ jt,
4686
+ ut,
4687
+ Qt,
4688
+ er,
4689
+ lr,
4690
+ mr,
4709
4691
  qt,
4710
- Nt,
4711
- Bt,
4712
- ft,
4713
- Kt,
4714
4692
  Yt,
4715
- ar,
4716
- sr,
4717
- Ft,
4718
- Gt,
4719
- dr,
4720
- ur,
4721
- hr
4693
+ yr,
4694
+ Rr,
4695
+ Sr
4722
4696
  ].map(
4723
4697
  (y) => y.init({ ...h, ...p, ...m, state: this.state, fullAPI: this.api })
4724
4698
  );
4725
- let v = ct(this.state, ...this.modules.map((y) => y.state)), g = Object.assign(this.api, { navigate: f }, ...this.modules.map((y) => y.api));
4699
+ let v = dt(this.state, ...this.modules.map((y) => y.state)), g = Object.assign(this.api, { navigate: f }, ...this.modules.map((y) => y.api));
4726
4700
  this.state = v, this.api = g;
4727
4701
  }
4728
- static {
4729
- o(this, "ManagerProvider");
4730
- }
4731
- static {
4732
- this.displayName = "Manager";
4733
- }
4734
4702
  static getDerivedStateFromProps(r, a) {
4735
4703
  return a.path !== r.path ? {
4736
4704
  ...a,
@@ -4743,167 +4711,166 @@ var At = Fr({ api: void 0, state: ct({}) }), o0 = /* @__PURE__ */ o((...e) => Wr
4743
4711
  }
4744
4712
  shouldComponentUpdate(r, a) {
4745
4713
  let n = this.props, s = this.state;
4746
- return n.path !== r.path || !H(s, a);
4714
+ return n.path !== r.path || !B(s, a);
4747
4715
  }
4748
4716
  render() {
4749
4717
  let { children: r } = this.props, a = {
4750
4718
  state: this.state,
4751
4719
  api: this.api
4752
4720
  };
4753
- return /* @__PURE__ */ pe.createElement(gi, { effect: this.initModules }, /* @__PURE__ */ pe.createElement(At.Provider, { value: a }, /* @__PURE__ */ pe.
4754
- createElement(wi, null, r)));
4721
+ return /* @__PURE__ */ me.createElement(Pi, { effect: this.initModules }, /* @__PURE__ */ me.createElement(_t.Provider, { value: a }, /* @__PURE__ */ me.
4722
+ createElement(Mi, null, r)));
4755
4723
  }
4756
- }, gi = /* @__PURE__ */ o(({ children: e, effect: t }) => (pe.useEffect(t, []), e), "EffectOnMount"), yi = /* @__PURE__ */ o((e) => e, "defa\
4757
- ultFilter");
4758
- function wi({
4724
+ };
4725
+ o(Pt, "ManagerProvider"), Pt.displayName = "Manager";
4726
+ var pa = Pt, Pi = /* @__PURE__ */ o(({ children: e, effect: t }) => (me.useEffect(t, []), e), "EffectOnMount"), _i = /* @__PURE__ */ o((e) => e,
4727
+ "defaultFilter");
4728
+ function Mi({
4759
4729
  // @ts-expect-error (Converted from ts-ignore)
4760
- filter: e = yi,
4730
+ filter: e = _i,
4761
4731
  children: t
4762
4732
  }) {
4763
- let r = br(At), a = ra(t), n = ra(e);
4733
+ let r = Br(_t), a = ua(t), n = ua(e);
4764
4734
  if (typeof a.current != "function")
4765
- return /* @__PURE__ */ pe.createElement(pi, null, a.current);
4766
- let s = n.current(r), i = Ar(() => [...Object.entries(s).reduce((l, c) => l.concat(c), [])], [r.state]);
4767
- return Ar(() => {
4735
+ return /* @__PURE__ */ me.createElement(xi, null, a.current);
4736
+ let s = n.current(r), i = Hr(() => [...Object.entries(s).reduce((l, c) => l.concat(c), [])], [r.state]);
4737
+ return Hr(() => {
4768
4738
  let l = a.current;
4769
- return /* @__PURE__ */ pe.createElement(l, { ...s });
4739
+ return /* @__PURE__ */ me.createElement(l, { ...s });
4770
4740
  }, i);
4771
4741
  }
4772
- o(wi, "ManagerConsumer");
4773
- function L4() {
4774
- let { state: e } = br(At);
4742
+ o(Mi, "ManagerConsumer");
4743
+ function G4() {
4744
+ let { state: e } = Br(_t);
4775
4745
  return e;
4776
4746
  }
4777
- o(L4, "useStorybookState");
4778
- function Y() {
4779
- let { api: e } = br(At);
4747
+ o(G4, "useStorybookState");
4748
+ function J() {
4749
+ let { api: e } = Br(_t);
4780
4750
  return e;
4781
4751
  }
4782
- o(Y, "useStorybookApi");
4783
- function ia(e, t) {
4752
+ o(J, "useStorybookApi");
4753
+ function va(e, t) {
4784
4754
  return typeof e > "u" ? t : e;
4785
4755
  }
4786
- o(ia, "orDefault");
4787
- var Ri = /* @__PURE__ */ o((e, t = []) => {
4788
- let r = Y();
4789
- return na(() => (Object.entries(e).forEach(([a, n]) => r.on(a, n)), () => {
4756
+ o(va, "orDefault");
4757
+ var Ci = /* @__PURE__ */ o((e, t = []) => {
4758
+ let r = J();
4759
+ return ma(() => (Object.entries(e).forEach(([a, n]) => r.on(a, n)), () => {
4790
4760
  Object.entries(e).forEach(([a, n]) => r.off(a, n));
4791
4761
  }), t), r.emit;
4792
4762
  }, "useChannel");
4793
- function H4(e) {
4794
- return Y().isPrepared(e);
4763
+ function W4(e) {
4764
+ return J().isPrepared(e);
4795
4765
  }
4796
- o(H4, "useStoryPrepared");
4797
- function B4(e, t) {
4798
- let a = Y().getCurrentParameter(e);
4799
- return ia(a, t);
4766
+ o(W4, "useStoryPrepared");
4767
+ function $4(e, t) {
4768
+ let a = J().getCurrentParameter(e);
4769
+ return va(a, t);
4800
4770
  }
4801
- o(B4, "useParameter");
4771
+ o($4, "useParameter");
4802
4772
  globalThis.STORYBOOK_ADDON_STATE = {};
4803
- var { STORYBOOK_ADDON_STATE: W } = globalThis;
4804
- function Si(e, t) {
4805
- let r = Y(), a = r.getAddonState(e) || W[e], n = ia(
4773
+ var { STORYBOOK_ADDON_STATE: $ } = globalThis;
4774
+ function Ti(e, t) {
4775
+ let r = J(), a = r.getAddonState(e) || $[e], n = va(
4806
4776
  a,
4807
- W[e] ? W[e] : t
4777
+ $[e] ? $[e] : t
4808
4778
  ), s = !1;
4809
- n === t && t !== void 0 && (W[e] = t, s = !0), na(() => {
4779
+ n === t && t !== void 0 && ($[e] = t, s = !0), ma(() => {
4810
4780
  s && r.setAddonState(e, t);
4811
4781
  }, [s]);
4812
- let i = xt(
4782
+ let i = bt(
4813
4783
  async (f, u) => {
4814
4784
  await r.setAddonState(e, f, u);
4815
4785
  let h = r.getAddonState(e);
4816
- return W[e] = h, h;
4786
+ return $[e] = h, h;
4817
4787
  },
4818
4788
  [r, e]
4819
- ), l = Ar(() => {
4789
+ ), l = Hr(() => {
4820
4790
  let f = {
4821
- [`${aa}-client-${e}`]: i,
4822
- [`${ze}-client-${e}`]: i
4791
+ [`${ha}-client-${e}`]: i,
4792
+ [`${Le}-client-${e}`]: i
4823
4793
  }, u = {
4824
- [mi]: async () => {
4794
+ [Ai]: async () => {
4825
4795
  let h = r.getAddonState(e);
4826
- h ? (W[e] = h, r.emit(`${ze}-manager-${e}`, h)) : W[e] ? (await i(W[e]), r.emit(`${ze}-manager-${e}`, W[e])) : t !== void 0 && (await i(
4827
- t), W[e] = t, r.emit(`${ze}-manager-${e}`, t));
4796
+ h ? ($[e] = h, r.emit(`${Le}-manager-${e}`, h)) : $[e] ? (await i($[e]), r.emit(`${Le}-manager-${e}`, $[e])) : t !== void 0 && (await i(
4797
+ t), $[e] = t, r.emit(`${Le}-manager-${e}`, t));
4828
4798
  },
4829
- [vi]: () => {
4799
+ [bi]: () => {
4830
4800
  let h = r.getAddonState(e);
4831
- h !== void 0 && r.emit(`${ze}-manager-${e}`, h);
4801
+ h !== void 0 && r.emit(`${Le}-manager-${e}`, h);
4832
4802
  }
4833
4803
  };
4834
4804
  return {
4835
4805
  ...f,
4836
4806
  ...u
4837
4807
  };
4838
- }, [e]), c = Ri(l), d = xt(
4808
+ }, [e]), c = Ci(l), d = bt(
4839
4809
  async (f, u) => {
4840
4810
  await i(f, u);
4841
4811
  let h = r.getAddonState(e);
4842
- c(`${aa}-manager-${e}`, h);
4812
+ c(`${ha}-manager-${e}`, h);
4843
4813
  },
4844
4814
  [r, c, i, e]
4845
4815
  );
4846
4816
  return [n, d];
4847
4817
  }
4848
- o(Si, "useSharedState");
4849
- function N4(e, t) {
4850
- return Si(e, t);
4818
+ o(Ti, "useSharedState");
4819
+ function K4(e, t) {
4820
+ return Ti(e, t);
4851
4821
  }
4852
- o(N4, "useAddonState");
4853
- function V4() {
4854
- let { getCurrentStoryData: e, updateStoryArgs: t, resetStoryArgs: r } = Y(), a = e(), n = a?.type === "story" ? a.args : {}, s = a?.type ===
4855
- "story" ? a.initialArgs : {}, i = xt(
4822
+ o(K4, "useAddonState");
4823
+ function q4() {
4824
+ let { getCurrentStoryData: e, updateStoryArgs: t, resetStoryArgs: r } = J(), a = e(), n = a?.type === "story" ? a.args : {}, s = a?.type ===
4825
+ "story" ? a.initialArgs : {}, i = bt(
4856
4826
  (c) => t(a, c),
4857
4827
  [a, t]
4858
- ), l = xt(
4828
+ ), l = bt(
4859
4829
  (c) => r(a, c),
4860
4830
  [a, r]
4861
4831
  );
4862
4832
  return [n, i, l, s];
4863
4833
  }
4864
- o(V4, "useArgs");
4865
- function k4() {
4866
- let e = Y();
4834
+ o(q4, "useArgs");
4835
+ function Y4() {
4836
+ let e = J();
4867
4837
  return [e.getGlobals(), e.updateGlobals, e.getStoryGlobals(), e.getUserGlobals()];
4868
4838
  }
4869
- o(k4, "useGlobals");
4870
- function D4() {
4871
- return Y().getGlobalTypes();
4839
+ o(Y4, "useGlobals");
4840
+ function J4() {
4841
+ return J().getGlobalTypes();
4872
4842
  }
4873
- o(D4, "useGlobalTypes");
4874
- function Ei() {
4875
- let { getCurrentStoryData: e } = Y();
4843
+ o(J4, "useGlobalTypes");
4844
+ function Oi() {
4845
+ let { getCurrentStoryData: e } = J();
4876
4846
  return e();
4877
4847
  }
4878
- o(Ei, "useCurrentStory");
4879
- function j4() {
4880
- let e = Ei();
4848
+ o(Oi, "useCurrentStory");
4849
+ function X4() {
4850
+ let e = Oi();
4881
4851
  return e?.type === "story" && e.argTypes || {};
4882
4852
  }
4883
- o(j4, "useArgTypes");
4884
- var U4 = Kr;
4853
+ o(X4, "useArgTypes");
4854
+ var Q4 = a0;
4885
4855
 
4886
4856
  // src/shared/universal-store/mock.ts
4887
- import { Channel as Ii } from "storybook/internal/channels";
4888
- var _r = class e extends D {
4889
- static {
4890
- o(this, "MockUniversalStore");
4891
- }
4857
+ import { Channel as zi } from "storybook/internal/channels";
4858
+ var Mt = class Mt extends j {
4892
4859
  constructor(t, r) {
4893
- D.isInternalConstructing = !0, super(
4860
+ j.isInternalConstructing = !0, super(
4894
4861
  { ...t, leader: !0 },
4895
- { channel: new Ii({}), environment: D.Environment.MOCK }
4896
- ), D.isInternalConstructing = !1, typeof r?.fn == "function" && (this.testUtils = r, this.getState = r.fn(this.getState), this.setState =
4862
+ { channel: new zi({}), environment: j.Environment.MOCK }
4863
+ ), j.isInternalConstructing = !1, typeof r?.fn == "function" && (this.testUtils = r, this.getState = r.fn(this.getState), this.setState =
4897
4864
  r.fn(this.setState), this.subscribe = r.fn(this.subscribe), this.onStateChange = r.fn(this.onStateChange), this.send = r.fn(this.send));
4898
4865
  }
4899
4866
  /** Create a mock universal store. This is just an alias for the constructor */
4900
4867
  static create(t, r) {
4901
- return new e(t, r);
4868
+ return new Mt(t, r);
4902
4869
  }
4903
4870
  unsubscribeAll() {
4904
4871
  if (!this.testUtils)
4905
4872
  throw new Error(
4906
- Xr`Cannot call unsubscribeAll on a store that does not have testUtils.
4873
+ s0`Cannot call unsubscribeAll on a store that does not have testUtils.
4907
4874
  Please provide testUtils as the second argument when creating the store.`
4908
4875
  );
4909
4876
  let t = /* @__PURE__ */ o((r) => {
@@ -4915,14 +4882,16 @@ var _r = class e extends D {
4915
4882
  this.subscribe.mock?.results.forEach(t), this.onStateChange.mock?.results.forEach(t);
4916
4883
  }
4917
4884
  };
4885
+ o(Mt, "MockUniversalStore");
4886
+ var Nr = Mt;
4918
4887
 
4919
4888
  // src/shared/test-provider-store/index.ts
4920
- var sa = {
4889
+ var ga = {
4921
4890
  id: "storybook/test-provider",
4922
4891
  leader: !0,
4923
4892
  initialState: {}
4924
4893
  };
4925
- function la({
4894
+ function ya({
4926
4895
  universalTestProviderStore: e,
4927
4896
  useUniversalStore: t
4928
4897
  }) {
@@ -4980,63 +4949,63 @@ function la({
4980
4949
  universalTestProviderStore: e
4981
4950
  };
4982
4951
  }
4983
- o(la, "createTestProviderStore");
4952
+ o(ya, "createTestProviderStore");
4984
4953
 
4985
4954
  // src/manager-api/stores/test-provider.ts
4986
- var xi = la({
4987
- universalTestProviderStore: D.create({
4988
- ...sa,
4955
+ var Li = ya({
4956
+ universalTestProviderStore: j.create({
4957
+ ...ga,
4989
4958
  leader: globalThis.CONFIG_TYPE === "PRODUCTION"
4990
4959
  }),
4991
- useUniversalStore: Pe
4960
+ useUniversalStore: Me
4992
4961
  }), {
4993
- fullTestProviderStore: Ai,
4994
- getTestProviderStoreById: bi,
4995
- useTestProviderStore: _i,
4996
- universalTestProviderStore: Pi
4997
- } = xi;
4962
+ fullTestProviderStore: Hi,
4963
+ getTestProviderStoreById: Bi,
4964
+ useTestProviderStore: Ni,
4965
+ universalTestProviderStore: Vi
4966
+ } = Li;
4998
4967
  export {
4999
- z4 as ActiveTabs,
5000
- wi as Consumer,
5001
- At as ManagerContext,
5002
- oa as Provider,
5003
- It as RequestResponseError,
5004
- Ta as addons,
5005
- o0 as combineParameters,
5006
- Xl as controlOrMetaKey,
5007
- Jl as controlOrMetaSymbol,
5008
- Zl as eventMatchesShortcut,
5009
- Qt as eventToShortcut,
5010
- _r as experimental_MockUniversalStore,
5011
- D as experimental_UniversalStore,
5012
- mo as experimental_getStatusStore,
5013
- bi as experimental_getTestProviderStore,
5014
- E4 as experimental_requestResponse,
5015
- vo as experimental_useStatusStore,
5016
- _i as experimental_useTestProviderStore,
5017
- Pe as experimental_useUniversalStore,
5018
- mt as internal_fullStatusStore,
5019
- Ai as internal_fullTestProviderStore,
5020
- go as internal_universalStatusStore,
5021
- Pi as internal_universalTestProviderStore,
5022
- Xt as isMacLike,
5023
- Ql as isShortcutTaken,
5024
- oo as keyToSymbol,
5025
- G as merge,
5026
- Tt as mockChannel,
5027
- ao as optionOrAltSymbol,
5028
- Zt as shortcutMatchesShortcut,
5029
- ec as shortcutToHumanString,
5030
- U4 as types,
5031
- N4 as useAddonState,
5032
- j4 as useArgTypes,
5033
- V4 as useArgs,
5034
- Ri as useChannel,
5035
- D4 as useGlobalTypes,
5036
- k4 as useGlobals,
5037
- B4 as useParameter,
5038
- Si as useSharedState,
5039
- H4 as useStoryPrepared,
5040
- Y as useStorybookApi,
5041
- L4 as useStorybookState
4968
+ F4 as ActiveTabs,
4969
+ Mi as Consumer,
4970
+ _t as ManagerContext,
4971
+ pa as Provider,
4972
+ At as RequestResponseError,
4973
+ ja as addons,
4974
+ p0 as combineParameters,
4975
+ sc as controlOrMetaKey,
4976
+ ic as controlOrMetaSymbol,
4977
+ cc as eventMatchesShortcut,
4978
+ ar as eventToShortcut,
4979
+ Nr as experimental_MockUniversalStore,
4980
+ j as experimental_UniversalStore,
4981
+ Ao as experimental_getStatusStore,
4982
+ Bi as experimental_getTestProviderStore,
4983
+ O4 as experimental_requestResponse,
4984
+ bo as experimental_useStatusStore,
4985
+ Ni as experimental_useTestProviderStore,
4986
+ Me as experimental_useUniversalStore,
4987
+ gt as internal_fullStatusStore,
4988
+ Hi as internal_fullTestProviderStore,
4989
+ Po as internal_universalStatusStore,
4990
+ Vi as internal_universalTestProviderStore,
4991
+ rr as isMacLike,
4992
+ lc as isShortcutTaken,
4993
+ mo as keyToSymbol,
4994
+ W as merge,
4995
+ Ht as mockChannel,
4996
+ po as optionOrAltSymbol,
4997
+ or as shortcutMatchesShortcut,
4998
+ dc as shortcutToHumanString,
4999
+ Q4 as types,
5000
+ K4 as useAddonState,
5001
+ X4 as useArgTypes,
5002
+ q4 as useArgs,
5003
+ Ci as useChannel,
5004
+ J4 as useGlobalTypes,
5005
+ Y4 as useGlobals,
5006
+ $4 as useParameter,
5007
+ Ti as useSharedState,
5008
+ W4 as useStoryPrepared,
5009
+ J as useStorybookApi,
5010
+ G4 as useStorybookState
5042
5011
  };